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-10-23 03:22:05 +0400
committerJoseph Eagar <joeedh@gmail.com>2009-10-23 03:22:05 +0400
commit8f788c64db587e74079d812dbcea40c2bd4b91ff (patch)
treec767e8318a9e7aded16be6cab2042f3ea11e7912 /source/blender
parent36bb566d4e6e06e08d782d610d60d755cbda2396 (diff)
merge with trunk/2.5 at r23876
[[Split portion of a mixed commit.]]
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/CMakeLists.txt1
-rw-r--r--source/blender/Makefile2
-rw-r--r--source/blender/SConscript3
-rw-r--r--source/blender/blenfont/CMakeLists.txt1
-rw-r--r--source/blender/blenfont/Makefile4
-rw-r--r--source/blender/blenfont/SConscript8
-rw-r--r--source/blender/blenfont/intern/blf_font.c4
-rw-r--r--source/blender/blenfont/intern/blf_lang.c55
-rw-r--r--source/blender/blenkernel/BKE_DerivedMesh.h2
-rw-r--r--source/blender/blenkernel/BKE_action.h53
-rw-r--r--source/blender/blenkernel/BKE_anim.h9
-rw-r--r--source/blender/blenkernel/BKE_armature.h7
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenkernel/BKE_boids.h4
-rw-r--r--source/blender/blenkernel/BKE_brush.h4
-rw-r--r--source/blender/blenkernel/BKE_bvhutils.h4
-rw-r--r--source/blender/blenkernel/BKE_collision.h11
-rw-r--r--source/blender/blenkernel/BKE_constraint.h8
-rw-r--r--source/blender/blenkernel/BKE_depsgraph.h3
-rw-r--r--source/blender/blenkernel/BKE_effect.h110
-rw-r--r--source/blender/blenkernel/BKE_fcurve.h7
-rw-r--r--source/blender/blenkernel/BKE_image.h11
-rw-r--r--source/blender/blenkernel/BKE_material.h5
-rw-r--r--source/blender/blenkernel/BKE_mesh.h1
-rw-r--r--source/blender/blenkernel/BKE_modifier.h2
-rw-r--r--source/blender/blenkernel/BKE_node.h8
-rw-r--r--source/blender/blenkernel/BKE_object.h2
-rw-r--r--source/blender/blenkernel/BKE_paint.h2
-rw-r--r--source/blender/blenkernel/BKE_particle.h176
-rw-r--r--source/blender/blenkernel/BKE_screen.h11
-rw-r--r--source/blender/blenkernel/BKE_sound.h2
-rw-r--r--source/blender/blenkernel/BKE_text.h8
-rw-r--r--source/blender/blenkernel/BKE_texture.h33
-rw-r--r--source/blender/blenkernel/BKE_utildefines.h8
-rw-r--r--source/blender/blenkernel/CMakeLists.txt14
-rw-r--r--source/blender/blenkernel/SConscript14
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c213
-rw-r--r--source/blender/blenkernel/intern/Makefile19
-rw-r--r--source/blender/blenkernel/intern/action.c428
-rw-r--r--source/blender/blenkernel/intern/anim.c78
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c143
-rw-r--r--source/blender/blenkernel/intern/armature.c541
-rw-r--r--source/blender/blenkernel/intern/blender.c17
-rw-r--r--source/blender/blenkernel/intern/boids.c252
-rw-r--r--source/blender/blenkernel/intern/brush.c115
-rw-r--r--source/blender/blenkernel/intern/bvhutils.c88
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c1096
-rw-r--r--source/blender/blenkernel/intern/cloth.c88
-rw-r--r--source/blender/blenkernel/intern/collision.c122
-rw-r--r--source/blender/blenkernel/intern/constraint.c30
-rw-r--r--source/blender/blenkernel/intern/context.c2
-rw-r--r--source/blender/blenkernel/intern/curve.c2
-rw-r--r--source/blender/blenkernel/intern/customdata.c4
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c102
-rw-r--r--source/blender/blenkernel/intern/editderivedbmesh.c24
-rw-r--r--source/blender/blenkernel/intern/effect.c865
-rw-r--r--source/blender/blenkernel/intern/fcurve.c81
-rw-r--r--source/blender/blenkernel/intern/image.c215
-rw-r--r--source/blender/blenkernel/intern/implicit.c26
-rw-r--r--source/blender/blenkernel/intern/ipo.c88
-rw-r--r--source/blender/blenkernel/intern/key.c2
-rw-r--r--source/blender/blenkernel/intern/lattice.c144
-rw-r--r--source/blender/blenkernel/intern/library.c47
-rw-r--r--source/blender/blenkernel/intern/material.c41
-rw-r--r--source/blender/blenkernel/intern/mesh.c186
-rw-r--r--source/blender/blenkernel/intern/modifier.c66
-rw-r--r--source/blender/blenkernel/intern/multires.c1
-rw-r--r--source/blender/blenkernel/intern/nla.c3
-rw-r--r--source/blender/blenkernel/intern/node.c39
-rw-r--r--source/blender/blenkernel/intern/object.c143
-rw-r--r--source/blender/blenkernel/intern/packedFile.c7
-rw-r--r--source/blender/blenkernel/intern/paint.c27
-rw-r--r--source/blender/blenkernel/intern/particle.c924
-rw-r--r--source/blender/blenkernel/intern/particle_system.c1756
-rw-r--r--source/blender/blenkernel/intern/pointcache.c298
-rw-r--r--source/blender/blenkernel/intern/report.c2
-rw-r--r--source/blender/blenkernel/intern/sca.c18
-rw-r--r--source/blender/blenkernel/intern/scene.c20
-rw-r--r--source/blender/blenkernel/intern/screen.c6
-rw-r--r--source/blender/blenkernel/intern/sequence.c4
-rw-r--r--source/blender/blenkernel/intern/smoke.c309
-rw-r--r--source/blender/blenkernel/intern/softbody.c67
-rw-r--r--source/blender/blenkernel/intern/sound.c8
-rw-r--r--source/blender/blenkernel/intern/text.c63
-rw-r--r--source/blender/blenkernel/intern/texture.c285
-rw-r--r--source/blender/blenkernel/intern/unit.c4
-rw-r--r--source/blender/blenkernel/intern/world.c11
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c13
-rw-r--r--source/blender/blenlib/BLI_arithb.h18
-rw-r--r--source/blender/blenlib/BLI_bfile.h138
-rw-r--r--source/blender/blenlib/BLI_listbase.h4
-rw-r--r--source/blender/blenlib/BLI_memarena.h11
-rw-r--r--source/blender/blenlib/BLI_string.h23
-rw-r--r--source/blender/blenlib/BLI_threads.h53
-rw-r--r--source/blender/blenlib/BLI_util.h9
-rw-r--r--source/blender/blenlib/BLI_winstuff.h21
-rw-r--r--source/blender/blenlib/intern/BLI_bfile.c236
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c92
-rw-r--r--source/blender/blenlib/intern/BLI_memarena.c24
-rw-r--r--source/blender/blenlib/intern/arithb.c48
-rw-r--r--source/blender/blenlib/intern/dynlib.c200
-rw-r--r--source/blender/blenlib/intern/listbase.c14
-rw-r--r--source/blender/blenlib/intern/string.c95
-rw-r--r--source/blender/blenlib/intern/threads.c94
-rw-r--r--source/blender/blenlib/intern/util.c169
-rw-r--r--source/blender/blenloader/BLO_readfile.h2
-rw-r--r--source/blender/blenloader/intern/readfile.c411
-rw-r--r--source/blender/blenloader/intern/writefile.c49
-rw-r--r--source/blender/blenpluginapi/CMakeLists.txt4
-rw-r--r--source/blender/blenpluginapi/SConscript9
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c17
-rw-r--r--source/blender/bmesh/intern/bmesh_operators_private.h2
-rw-r--r--source/blender/bmesh/operators/removedoubles.c56
-rw-r--r--source/blender/bmesh/operators/utils.c10
-rw-r--r--source/blender/editors/CMakeLists.txt1
-rw-r--r--source/blender/editors/Makefile2
-rw-r--r--source/blender/editors/SConscript2
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c225
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c147
-rw-r--r--source/blender/editors/animation/anim_deps.c14
-rw-r--r--source/blender/editors/animation/anim_draw.c59
-rw-r--r--source/blender/editors/animation/anim_filter.c309
-rw-r--r--source/blender/editors/animation/anim_intern.h42
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c45
-rw-r--r--source/blender/editors/animation/anim_markers.c7
-rw-r--r--source/blender/editors/animation/anim_ops.c26
-rw-r--r--source/blender/editors/animation/drivers.c280
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c2
-rw-r--r--source/blender/editors/animation/keyframes_draw.c169
-rw-r--r--source/blender/editors/animation/keyframes_edit.c166
-rw-r--r--source/blender/editors/animation/keyframes_general.c1
-rw-r--r--source/blender/editors/animation/keyframing.c111
-rw-r--r--source/blender/editors/animation/keyingsets.c312
-rw-r--r--source/blender/editors/armature/SConscript7
-rw-r--r--source/blender/editors/armature/armature_intern.h8
-rw-r--r--source/blender/editors/armature/armature_ops.c38
-rw-r--r--source/blender/editors/armature/editarmature.c263
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c33
-rw-r--r--source/blender/editors/armature/meshlaplacian.c131
-rw-r--r--source/blender/editors/armature/poseSlide.c936
-rw-r--r--source/blender/editors/armature/poselib.c120
-rw-r--r--source/blender/editors/armature/poseobject.c262
-rw-r--r--source/blender/editors/curve/curve_ops.c12
-rw-r--r--source/blender/editors/curve/editcurve.c5
-rw-r--r--source/blender/editors/curve/editfont.c10
-rw-r--r--source/blender/editors/datafiles/B.blend.c5391
-rw-r--r--source/blender/editors/datafiles/blenderbuttons.c11816
-rw-r--r--source/blender/editors/gpencil/gpencil_ops.c6
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c2
-rw-r--r--source/blender/editors/include/BIF_glutil.h1
-rw-r--r--source/blender/editors/include/ED_anim_api.h24
-rw-r--r--source/blender/editors/include/ED_armature.h4
-rw-r--r--source/blender/editors/include/ED_curve.h4
-rw-r--r--source/blender/editors/include/ED_fileselect.h32
-rw-r--r--source/blender/editors/include/ED_gpencil.h4
-rw-r--r--source/blender/editors/include/ED_image.h8
-rw-r--r--source/blender/editors/include/ED_keyframes_draw.h7
-rw-r--r--source/blender/editors/include/ED_keyframes_edit.h1
-rw-r--r--source/blender/editors/include/ED_keyframing.h46
-rw-r--r--source/blender/editors/include/ED_markers.h4
-rw-r--r--source/blender/editors/include/ED_mball.h4
-rw-r--r--source/blender/editors/include/ED_mesh.h41
-rw-r--r--source/blender/editors/include/ED_node.h6
-rw-r--r--source/blender/editors/include/ED_object.h12
-rw-r--r--source/blender/editors/include/ED_particle.h21
-rw-r--r--source/blender/editors/include/ED_physics.h9
-rw-r--r--source/blender/editors/include/ED_render.h (renamed from source/blender/editors/include/ED_previewrender.h)41
-rw-r--r--source/blender/editors/include/ED_screen.h5
-rw-r--r--source/blender/editors/include/ED_sculpt.h4
-rw-r--r--source/blender/editors/include/ED_transform.h19
-rw-r--r--source/blender/editors/include/ED_uvedit.h4
-rw-r--r--source/blender/editors/include/ED_view3d.h6
-rw-r--r--source/blender/editors/include/UI_icons.h38
-rw-r--r--source/blender/editors/include/UI_interface.h46
-rw-r--r--source/blender/editors/include/UI_interface_icons.h6
-rw-r--r--source/blender/editors/include/UI_view2d.h4
-rw-r--r--source/blender/editors/interface/SConscript5
-rw-r--r--source/blender/editors/interface/interface.c59
-rw-r--r--source/blender/editors/interface/interface_anim.c25
-rw-r--r--source/blender/editors/interface/interface_handlers.c269
-rw-r--r--source/blender/editors/interface/interface_icons.c467
-rw-r--r--source/blender/editors/interface/interface_intern.h10
-rw-r--r--source/blender/editors/interface/interface_layout.c138
-rw-r--r--source/blender/editors/interface/interface_panel.c13
-rw-r--r--source/blender/editors/interface/interface_regions.c39
-rw-r--r--source/blender/editors/interface/interface_templates.c772
-rw-r--r--source/blender/editors/interface/interface_utils.c1083
-rw-r--r--source/blender/editors/interface/interface_widgets.c80
-rw-r--r--source/blender/editors/interface/resources.c23
-rw-r--r--source/blender/editors/interface/view2d.c57
-rw-r--r--source/blender/editors/interface/view2d_ops.c18
-rw-r--r--source/blender/editors/mesh/SConscript7
-rw-r--r--source/blender/editors/mesh/bmesh_select.c116
-rw-r--r--source/blender/editors/mesh/bmesh_tools.c74
-rw-r--r--source/blender/editors/mesh/editface.c61
-rw-r--r--source/blender/editors/mesh/editmesh.c21
-rw-r--r--source/blender/editors/mesh/editmesh_add.c240
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c27
-rw-r--r--source/blender/editors/mesh/loopcut.c65
-rw-r--r--source/blender/editors/mesh/mesh_data.c (renamed from source/blender/editors/mesh/mesh_layers.c)446
-rw-r--r--source/blender/editors/mesh/mesh_intern.h8
-rw-r--r--source/blender/editors/mesh/mesh_ops.c237
-rw-r--r--source/blender/editors/mesh/meshtools.c4
-rw-r--r--source/blender/editors/metaball/mball_ops.c9
-rw-r--r--source/blender/editors/object/Makefile1
-rw-r--r--source/blender/editors/object/SConscript2
-rw-r--r--source/blender/editors/object/object_add.c352
-rw-r--r--source/blender/editors/object/object_constraint.c44
-rw-r--r--source/blender/editors/object/object_edit.c29
-rw-r--r--source/blender/editors/object/object_group.c9
-rw-r--r--source/blender/editors/object/object_hook.c1
-rw-r--r--source/blender/editors/object/object_intern.h9
-rw-r--r--source/blender/editors/object/object_lattice.c1
-rw-r--r--source/blender/editors/object/object_modifier.c33
-rw-r--r--source/blender/editors/object/object_ops.c70
-rw-r--r--source/blender/editors/object/object_relations.c32
-rw-r--r--source/blender/editors/object/object_select.c13
-rw-r--r--source/blender/editors/object/object_transform.c98
-rw-r--r--source/blender/editors/object/object_vgroup.c12
-rw-r--r--source/blender/editors/physics/SConscript7
-rw-r--r--source/blender/editors/physics/particle_boids.c (renamed from source/blender/editors/physics/physics_boids.c)116
-rw-r--r--source/blender/editors/physics/particle_edit.c (renamed from source/blender/editors/physics/editparticle.c)160
-rw-r--r--source/blender/editors/physics/particle_object.c651
-rw-r--r--source/blender/editors/physics/physics_fluid.c (renamed from source/blender/editors/physics/ed_fluidsim.c)7
-rw-r--r--source/blender/editors/physics/physics_intern.h69
-rw-r--r--source/blender/editors/physics/physics_ops.c176
-rw-r--r--source/blender/editors/physics/physics_pointcache.c (renamed from source/blender/editors/physics/ed_pointcache.c)24
-rw-r--r--source/blender/editors/preview/SConscript12
-rw-r--r--source/blender/editors/render/Makefile (renamed from source/blender/editors/preview/Makefile)2
-rw-r--r--source/blender/editors/render/SConscript19
-rw-r--r--source/blender/editors/render/render_intern.h53
-rw-r--r--source/blender/editors/render/render_ops.c57
-rw-r--r--source/blender/editors/render/render_preview.c (renamed from source/blender/editors/preview/previewrender.c)254
-rw-r--r--source/blender/editors/render/render_shading.c762
-rw-r--r--source/blender/editors/screen/SConscript7
-rw-r--r--source/blender/editors/screen/area.c49
-rw-r--r--source/blender/editors/screen/glutil.c12
-rw-r--r--source/blender/editors/screen/screen_context.c2
-rw-r--r--source/blender/editors/screen/screen_edit.c2
-rw-r--r--source/blender/editors/screen/screen_ops.c197
-rw-r--r--source/blender/editors/screen/screendump.c2
-rw-r--r--source/blender/editors/sculpt_paint/SConscript7
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c131
-rw-r--r--source/blender/editors/sculpt_paint/paint_intern.h7
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c46
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c36
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c187
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h3
-rw-r--r--source/blender/editors/space_action/action_draw.c10
-rw-r--r--source/blender/editors/space_action/action_edit.c51
-rw-r--r--source/blender/editors/space_action/action_header.c104
-rw-r--r--source/blender/editors/space_action/action_intern.h4
-rw-r--r--source/blender/editors/space_action/action_ops.c15
-rw-r--r--source/blender/editors/space_action/action_select.c36
-rw-r--r--source/blender/editors/space_action/space_action.c9
-rw-r--r--source/blender/editors/space_api/spacetypes.c51
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c41
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c10
-rw-r--r--source/blender/editors/space_buttons/buttons_intern.h27
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c990
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c106
-rw-r--r--source/blender/editors/space_console/console_ops.c99
-rw-r--r--source/blender/editors/space_console/space_console.c19
-rw-r--r--source/blender/editors/space_file/SConscript7
-rw-r--r--source/blender/editors/space_file/file_draw.c84
-rw-r--r--source/blender/editors/space_file/file_intern.h2
-rw-r--r--source/blender/editors/space_file/file_ops.c110
-rw-r--r--source/blender/editors/space_file/file_panels.c12
-rw-r--r--source/blender/editors/space_file/filelist.c10
-rw-r--r--source/blender/editors/space_file/filesel.c82
-rw-r--r--source/blender/editors/space_file/space_file.c44
-rw-r--r--source/blender/editors/space_file/writeimage.c14
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c147
-rw-r--r--source/blender/editors/space_graph/graph_draw.c71
-rw-r--r--source/blender/editors/space_graph/graph_edit.c86
-rw-r--r--source/blender/editors/space_graph/graph_header.c39
-rw-r--r--source/blender/editors/space_graph/graph_intern.h3
-rw-r--r--source/blender/editors/space_graph/graph_ops.c18
-rw-r--r--source/blender/editors/space_graph/graph_select.c9
-rw-r--r--source/blender/editors/space_graph/graph_utils.c28
-rw-r--r--source/blender/editors/space_graph/space_graph.c17
-rw-r--r--source/blender/editors/space_image/image_buttons.c809
-rw-r--r--source/blender/editors/space_image/image_draw.c14
-rw-r--r--source/blender/editors/space_image/image_ops.c210
-rw-r--r--source/blender/editors/space_image/space_image.c141
-rw-r--r--source/blender/editors/space_info/space_info.c2
-rw-r--r--source/blender/editors/space_logic/logic_buttons.c4
-rw-r--r--source/blender/editors/space_logic/logic_window.c274
-rw-r--r--source/blender/editors/space_logic/space_logic.c12
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c83
-rw-r--r--source/blender/editors/space_nla/nla_channels.c47
-rw-r--r--source/blender/editors/space_nla/nla_header.c37
-rw-r--r--source/blender/editors/space_nla/nla_intern.h2
-rw-r--r--source/blender/editors/space_nla/nla_ops.c22
-rw-r--r--source/blender/editors/space_nla/space_nla.c17
-rw-r--r--source/blender/editors/space_node/SConscript7
-rw-r--r--source/blender/editors/space_node/drawnode.c2411
-rw-r--r--source/blender/editors/space_node/node_draw.c249
-rw-r--r--source/blender/editors/space_node/node_edit.c110
-rw-r--r--source/blender/editors/space_node/node_header.c2
-rw-r--r--source/blender/editors/space_node/node_intern.h5
-rw-r--r--source/blender/editors/space_node/node_ops.c10
-rw-r--r--source/blender/editors/space_node/node_select.c19
-rw-r--r--source/blender/editors/space_node/space_node.c12
-rw-r--r--source/blender/editors/space_outliner/outliner.c64
-rw-r--r--source/blender/editors/space_outliner/outliner_header.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.h2
-rw-r--r--source/blender/editors/space_outliner/outliner_ops.c4
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c11
-rw-r--r--source/blender/editors/space_script/script_intern.h2
-rw-r--r--source/blender/editors/space_script/script_ops.c4
-rw-r--r--source/blender/editors/space_script/space_script.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_buttons.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_intern.h5
-rw-r--r--source/blender/editors/space_sequencer/sequencer_ops.c11
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c4
-rw-r--r--source/blender/editors/space_sound/space_sound.c6
-rw-r--r--source/blender/editors/space_text/space_text.c12
-rw-r--r--source/blender/editors/space_text/text_draw.c54
-rw-r--r--source/blender/editors/space_text/text_ops.c71
-rw-r--r--source/blender/editors/space_time/space_time.c4
-rw-r--r--source/blender/editors/space_time/time_intern.h2
-rw-r--r--source/blender/editors/space_time/time_ops.c4
-rw-r--r--source/blender/editors/space_userpref/space_userpref.c4
-rw-r--r--source/blender/editors/space_view3d/Makefile5
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c121
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c101
-rw-r--r--source/blender/editors/space_view3d/drawobject.c1288
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c1
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c189
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c139
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c9
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c305
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c72
-rw-r--r--source/blender/editors/space_view3d/view3d_intern.h20
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c108
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c13
-rw-r--r--source/blender/editors/space_view3d/view3d_toolbar.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c874
-rw-r--r--source/blender/editors/transform/transform.c1463
-rw-r--r--source/blender/editors/transform/transform.h79
-rw-r--r--source/blender/editors/transform/transform_constraints.c5
-rw-r--r--source/blender/editors/transform/transform_conversions.c447
-rw-r--r--source/blender/editors/transform/transform_generics.c170
-rw-r--r--source/blender/editors/transform/transform_input.c48
-rw-r--r--source/blender/editors/transform/transform_manipulator.c19
-rw-r--r--source/blender/editors/transform/transform_ops.c191
-rw-r--r--source/blender/editors/transform/transform_orientations.c273
-rw-r--r--source/blender/editors/transform/transform_snap.c127
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c28
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c12
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c4
-rw-r--r--source/blender/gpu/intern/gpu_material.c107
-rw-r--r--source/blender/gpu/intern/gpu_shader_material.glsl42
-rw-r--r--source/blender/ikplugin/BIK_api.h93
-rw-r--r--source/blender/ikplugin/CMakeLists.txt35
-rw-r--r--source/blender/ikplugin/Makefile31
-rw-r--r--source/blender/ikplugin/SConscript9
-rw-r--r--source/blender/ikplugin/intern/Makefile51
-rw-r--r--source/blender/ikplugin/intern/ikplugin_api.c138
-rw-r--r--source/blender/ikplugin/intern/ikplugin_api.h60
-rw-r--r--source/blender/ikplugin/intern/iksolver_plugin.c530
-rw-r--r--source/blender/ikplugin/intern/iksolver_plugin.h (renamed from source/blender/editors/preview/previewrender_intern.h)30
-rw-r--r--source/blender/ikplugin/intern/itasc_plugin.cpp1777
-rw-r--r--source/blender/ikplugin/intern/itasc_plugin.h52
-rw-r--r--source/blender/imbuf/intern/divers.c14
-rw-r--r--source/blender/makesdna/DNA_action_types.h110
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h21
-rw-r--r--source/blender/makesdna/DNA_anim_types.h15
-rw-r--r--source/blender/makesdna/DNA_armature_types.h6
-rw-r--r--source/blender/makesdna/DNA_brush_types.h4
-rw-r--r--source/blender/makesdna/DNA_cloth_types.h2
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h57
-rw-r--r--source/blender/makesdna/DNA_curve_types.h3
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h6
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h3
-rw-r--r--source/blender/makesdna/DNA_material_types.h58
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h7
-rw-r--r--source/blender/makesdna/DNA_meta_types.h2
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h25
-rw-r--r--source/blender/makesdna/DNA_node_types.h4
-rw-r--r--source/blender/makesdna/DNA_object_force.h125
-rw-r--r--source/blender/makesdna/DNA_object_types.h27
-rw-r--r--source/blender/makesdna/DNA_particle_types.h54
-rw-r--r--source/blender/makesdna/DNA_scene_types.h72
-rw-r--r--source/blender/makesdna/DNA_sensor_types.h17
-rw-r--r--source/blender/makesdna/DNA_smoke_types.h3
-rw-r--r--source/blender/makesdna/DNA_space_types.h29
-rw-r--r--source/blender/makesdna/DNA_texture_types.h27
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h16
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h6
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h73
-rw-r--r--source/blender/makesdna/intern/SConscript2
-rw-r--r--source/blender/makesrna/RNA_access.h30
-rw-r--r--source/blender/makesrna/RNA_define.h2
-rw-r--r--source/blender/makesrna/RNA_enum_types.h13
-rw-r--r--source/blender/makesrna/RNA_types.h66
-rw-r--r--source/blender/makesrna/SConscript10
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt6
-rw-r--r--source/blender/makesrna/intern/Makefile1
-rw-r--r--source/blender/makesrna/intern/SConscript14
-rw-r--r--source/blender/makesrna/intern/makesrna.c21
-rw-r--r--source/blender/makesrna/intern/rna_ID.c53
-rw-r--r--source/blender/makesrna/intern/rna_access.c46
-rw-r--r--source/blender/makesrna/intern/rna_action.c2
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c1
-rw-r--r--source/blender/makesrna/intern/rna_animation.c95
-rw-r--r--source/blender/makesrna/intern/rna_animation_api.c1
-rw-r--r--source/blender/makesrna/intern/rna_armature.c118
-rw-r--r--source/blender/makesrna/intern/rna_boid.c27
-rw-r--r--source/blender/makesrna/intern/rna_brush.c141
-rw-r--r--source/blender/makesrna/intern/rna_camera.c21
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c5
-rw-r--r--source/blender/makesrna/intern/rna_color.c6
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c221
-rw-r--r--source/blender/makesrna/intern/rna_curve.c4
-rw-r--r--source/blender/makesrna/intern/rna_define.c29
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c67
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c1
-rw-r--r--source/blender/makesrna/intern/rna_image.c180
-rw-r--r--source/blender/makesrna/intern/rna_internal.h10
-rw-r--r--source/blender/makesrna/intern/rna_key.c12
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c219
-rw-r--r--source/blender/makesrna/intern/rna_main.c4
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c129
-rw-r--r--source/blender/makesrna/intern/rna_material.c697
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c78
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c201
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c57
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c490
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h4
-rw-r--r--source/blender/makesrna/intern/rna_object.c302
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c383
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c528
-rw-r--r--source/blender/makesrna/intern/rna_particle.c442
-rw-r--r--source/blender/makesrna/intern/rna_pose.c478
-rw-r--r--source/blender/makesrna/intern/rna_rna.c9
-rw-r--r--source/blender/makesrna/intern/rna_scene.c429
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c78
-rw-r--r--source/blender/makesrna/intern/rna_screen.c31
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c30
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c38
-rw-r--r--source/blender/makesrna/intern/rna_sequence.c45
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c11
-rw-r--r--source/blender/makesrna/intern/rna_space.c232
-rw-r--r--source/blender/makesrna/intern/rna_text.c6
-rw-r--r--source/blender/makesrna/intern/rna_texture.c454
-rw-r--r--source/blender/makesrna/intern/rna_ui.c27
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c69
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c415
-rw-r--r--source/blender/makesrna/intern/rna_wm.c391
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c74
-rw-r--r--source/blender/makesrna/intern/rna_world.c134
-rw-r--r--source/blender/nodes/CMakeLists.txt16
-rw-r--r--source/blender/nodes/SConscript14
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_blur.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_composite.c11
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_filter.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_image.c14
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_levels.c6
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_texture.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_viewer.c4
-rw-r--r--source/blender/nodes/intern/CMP_util.c40
-rw-r--r--source/blender/nodes/intern/CMP_util.h2
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_at.c2
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_bricks.c4
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_checker.c4
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_compose.c2
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_coord.c4
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_curves.c4
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_decompose.c8
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_distance.c4
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c2
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_image.c4
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_invert.c4
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_math.c4
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_mixRgb.c4
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_output.c21
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_proc.c5
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_rotate.c2
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_scale.c2
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_texture.c4
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_translate.c2
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c4
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c6
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_viewer.c11
-rw-r--r--source/blender/nodes/intern/TEX_util.c93
-rw-r--r--source/blender/nodes/intern/TEX_util.h7
-rw-r--r--source/blender/python/CMakeLists.txt2
-rw-r--r--source/blender/python/generic/Mathutils.c2
-rw-r--r--source/blender/python/generic/matrix.c2
-rw-r--r--source/blender/python/intern/bpy_interface.c136
-rw-r--r--source/blender/python/intern/bpy_operator.c12
-rw-r--r--source/blender/python/intern/bpy_operator_wrap.c63
-rw-r--r--source/blender/python/intern/bpy_rna.c159
-rw-r--r--source/blender/render/CMakeLists.txt10
-rw-r--r--source/blender/render/SConscript22
-rw-r--r--source/blender/render/extern/include/RE_pipeline.h7
-rw-r--r--source/blender/render/extern/include/RE_raytrace.h227
-rw-r--r--source/blender/render/extern/include/RE_render_ext.h2
-rw-r--r--source/blender/render/extern/include/RE_shader_ext.h7
-rw-r--r--source/blender/render/intern/Makefile2
-rw-r--r--source/blender/render/intern/include/render_types.h39
-rw-r--r--source/blender/render/intern/include/rendercore.h1
-rw-r--r--source/blender/render/intern/include/volume_precache.h4
-rw-r--r--source/blender/render/intern/include/volumetric.h3
-rw-r--r--source/blender/render/intern/include/zbuf.h7
-rw-r--r--source/blender/render/intern/raytrace/Makefile65
-rw-r--r--source/blender/render/intern/raytrace/bvh.h400
-rw-r--r--source/blender/render/intern/raytrace/rayobject.cpp580
-rw-r--r--source/blender/render/intern/raytrace/rayobject_hint.h70
-rw-r--r--source/blender/render/intern/raytrace/rayobject_qbvh.cpp149
-rw-r--r--source/blender/render/intern/raytrace/rayobject_rtbuild.cpp496
-rw-r--r--source/blender/render/intern/raytrace/rayobject_rtbuild.h121
-rw-r--r--source/blender/render/intern/raytrace/rayobject_svbvh.cpp181
-rw-r--r--source/blender/render/intern/raytrace/rayobject_vbvh.cpp191
-rw-r--r--source/blender/render/intern/raytrace/reorganize.h516
-rw-r--r--source/blender/render/intern/raytrace/svbvh.h249
-rw-r--r--source/blender/render/intern/raytrace/vbvh.h237
-rw-r--r--source/blender/render/intern/source/convertblender.c76
-rw-r--r--source/blender/render/intern/source/pipeline.c188
-rw-r--r--source/blender/render/intern/source/pointdensity.c5
-rw-r--r--source/blender/render/intern/source/rayshade.c710
-rw-r--r--source/blender/render/intern/source/raytrace.c1442
-rw-r--r--source/blender/render/intern/source/rendercore.c43
-rw-r--r--source/blender/render/intern/source/renderdatabase.c32
-rw-r--r--source/blender/render/intern/source/shadbuf.c488
-rw-r--r--source/blender/render/intern/source/shadeinput.c31
-rw-r--r--source/blender/render/intern/source/sss.c4
-rw-r--r--source/blender/render/intern/source/strand.c71
-rw-r--r--source/blender/render/intern/source/texture.c134
-rw-r--r--source/blender/render/intern/source/volume_precache.c164
-rw-r--r--source/blender/render/intern/source/volumetric.c389
-rw-r--r--source/blender/render/intern/source/voxeldata.c6
-rw-r--r--source/blender/render/intern/source/zbuf.c172
-rw-r--r--source/blender/windowmanager/CMakeLists.txt4
-rw-r--r--source/blender/windowmanager/SConscript7
-rw-r--r--source/blender/windowmanager/WM_api.h65
-rw-r--r--source/blender/windowmanager/WM_types.h16
-rw-r--r--source/blender/windowmanager/intern/wm.c86
-rw-r--r--source/blender/windowmanager/intern/wm_cursors.c17
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c242
-rw-r--r--source/blender/windowmanager/intern/wm_files.c7
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c19
-rw-r--r--source/blender/windowmanager/intern/wm_jobs.c33
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c327
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c254
-rw-r--r--source/blender/windowmanager/intern/wm_subwindow.c4
-rw-r--r--source/blender/windowmanager/intern/wm_window.c114
-rw-r--r--source/blender/windowmanager/wm.h2
-rw-r--r--source/blender/windowmanager/wm_event_system.h3
-rw-r--r--source/blender/windowmanager/wm_event_types.h22
-rw-r--r--source/blender/windowmanager/wm_subwindow.h1
-rw-r--r--source/blender/windowmanager/wm_window.h1
564 files changed, 47104 insertions, 28089 deletions
diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index f1e58f828b4..025ffc49ab1 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -41,6 +41,7 @@ ADD_SUBDIRECTORY(readblenfile)
ADD_SUBDIRECTORY(render)
ADD_SUBDIRECTORY(blenfont)
ADD_SUBDIRECTORY(bmesh)
+ADD_SUBDIRECTORY(ikplugin)
IF(WITH_OPENEXR)
ADD_SUBDIRECTORY(imbuf/intern/openexr)
diff --git a/source/blender/Makefile b/source/blender/Makefile
index 31636f838c3..6bc874c3c93 100644
--- a/source/blender/Makefile
+++ b/source/blender/Makefile
@@ -34,7 +34,7 @@ DIRS = windowmanager editors blenloader readblenfile
DIRS += avi imbuf render blenlib blenkernel blenpluginapi
DIRS += makesdna makesrna
DIRS += python nodes gpu
-DIRS += blenfont
+DIRS += blenfont ikplugin
ifeq ($(WITH_QUICKTIME), true)
DIRS += quicktime
diff --git a/source/blender/SConscript b/source/blender/SConscript
index cce0354643b..71971e7c072 100644
--- a/source/blender/SConscript
+++ b/source/blender/SConscript
@@ -17,8 +17,9 @@ SConscript(['avi/SConscript',
'readblenfile/SConscript',
'render/SConscript',
'nodes/SConscript',
+ 'ikplugin/SConscript',
'windowmanager/SConscript',
- 'blenfont/SConscript'])
+ 'blenfont/SConscript'])
diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt
index 844a6899bf5..9b7e950526d 100644
--- a/source/blender/blenfont/CMakeLists.txt
+++ b/source/blender/blenfont/CMakeLists.txt
@@ -32,6 +32,7 @@ SET(INC
IF(WITH_INTERNATIONAL)
SET(INC ${INC} ${GETTEXT_INC})
+ ADD_DEFINITIONS(-DINTERNATIONAL)
ENDIF(WITH_INTERNATIONAL)
IF(WIN32)
diff --git a/source/blender/blenfont/Makefile b/source/blender/blenfont/Makefile
index 70dd2e5052b..43eda027855 100644
--- a/source/blender/blenfont/Makefile
+++ b/source/blender/blenfont/Makefile
@@ -28,3 +28,7 @@ SOURCEDIR = source/blender/blenfont
DIRS = intern
include nan_subdirs.mk
+
+ifeq ($(INTERNATIONAL), true)
+ CPPFLAGS += -DINTERNATIONAL
+endif
diff --git a/source/blender/blenfont/SConscript b/source/blender/blenfont/SConscript
index d070d985247..91edc46ba8b 100644
--- a/source/blender/blenfont/SConscript
+++ b/source/blender/blenfont/SConscript
@@ -9,9 +9,13 @@ incs += ' #/extern/glew/include'
incs += ' ' + env['BF_FREETYPE_INC']
incs += ' ' + env['BF_GETTEXT_INC']
-defs = ''
+defs = []
if sys.platform == 'win32':
- defs += ' _WIN32 USE_GETTEXT_DLL'
+ defs.append('_WIN32')
+ defs.append('USE_GETTEXT_DLL')
+
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('INTERNATIONAL')
env.BlenderLib ( 'bf_blenfont', sources, Split(incs), Split(defs), libtype=['core','player'], priority=[210,210] )
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 0a3dd259f6c..8721e49f06b 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -353,8 +353,8 @@ void blf_font_boundbox(FontBLF *font, char *str, rctf *box)
pen_x += delta.x >> 6;
}
- gbox.xmin= g->box.xmin + pen_x;
- gbox.xmax= g->box.xmax + pen_x;
+ gbox.xmin= pen_x;
+ gbox.xmax= pen_x + g->advance;
gbox.ymin= g->box.ymin + pen_y;
gbox.ymax= g->box.ymax + pen_y;
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
index 024172d6db4..ed684eda46f 100644
--- a/source/blender/blenfont/intern/blf_lang.c
+++ b/source/blender/blenfont/intern/blf_lang.c
@@ -60,17 +60,14 @@ char global_messagepath[1024];
char global_language[32];
char global_encoding_name[32];
-
-void BLF_lang_init(void)
+#if defined(__APPLE__)
+void BLF_lang_init(void) /* Apple Only, todo - use BLI_gethome_folder */
{
-#ifdef __APPLE__
char *bundlepath;
-#endif
strcpy(global_encoding_name, SYSTEM_ENCODING_DEFAULT);
/* set messagepath directory */
-
#ifndef LOCALEDIR
#define LOCALEDIR "/usr/share/locale"
#endif
@@ -81,44 +78,52 @@ void BLF_lang_init(void)
BLI_make_file_string("/", global_messagepath, BLI_gethome(), ".blender/locale");
if (!BLI_exist(global_messagepath)) { /* locale not in home dir */
-#ifdef WIN32
- BLI_make_file_string("/", global_messagepath, BLI_gethome(), "/locale");
- if (!BLI_exist(global_messagepath)) {
-#endif
-#ifdef __APPLE__
/* message catalogs are stored inside the application bundle */
bundlepath= BLI_getbundle();
strcpy(global_messagepath, bundlepath);
strcat(global_messagepath, "/Contents/Resources/locale");
if (!BLI_exist(global_messagepath)) { /* locale not in bundle (now that's odd..) */
-#endif
strcpy(global_messagepath, LOCALEDIR);
if (!BLI_exist(global_messagepath)) { /* locale not in LOCALEDIR */
strcpy(global_messagepath, "message"); /* old compatibility as last */
}
-#ifdef WIN32
}
-#endif
-#ifdef __APPLE__
- }
-#endif
}
}
}
-
-void BLF_lang_set(const char *str)
+#elif defined(_WIN32)
+void BLF_lang_init(void) /* Windows Only, todo - use BLI_gethome_folder */
{
-#if defined (_WIN32) || defined(__APPLE__)
- char envstr[12];
+ strcpy(global_encoding_name, SYSTEM_ENCODING_DEFAULT);
+
+ strcpy(global_messagepath, ".blender/locale");
+
+ if (!BLI_exist(global_messagepath)) { /* locale not in current dir */
+ BLI_make_file_string("/", global_messagepath, BLI_gethome(), ".blender/locale");
- sprintf(envstr, "LANG=%s", str);
- envstr[strlen(envstr)]= '\0';
-#ifdef _WIN32
- gettext_putenv(envstr);
+ if (!BLI_exist(global_messagepath)) { /* locale not in home dir */
+ BLI_make_file_string("/", global_messagepath, BLI_gethome(), "/locale");
+ }
+ }
+}
#else
- putenv(envstr);
+void BLF_lang_init(void) /* not win or mac */
+{
+ char *messagepath= BLI_gethome_folder("locale", BLI_GETHOME_ALL);
+
+ if(messagepath)
+ strncpy(global_messagepath, messagepath, sizeof(global_messagepath));
+ else
+ global_messagepath[0]= '\0';
+
+}
#endif
+
+void BLF_lang_set(const char *str)
+{
+#if defined (_WIN32) || defined(__APPLE__)
+ BLI_setenv("LANG", str);
#else
char *locreturn= setlocale(LC_ALL, str);
if (locreturn == NULL) {
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h
index c35900ef2be..ec7998cc064 100644
--- a/source/blender/blenkernel/BKE_DerivedMesh.h
+++ b/source/blender/blenkernel/BKE_DerivedMesh.h
@@ -99,6 +99,7 @@ struct ModifierData;
struct MCol;
struct ColorBand;
struct GPUVertexAttribs;
+struct GPUDrawObject;
struct BMEditMesh;
/* number of sub-elements each mesh element has (for interpolation) */
@@ -166,6 +167,7 @@ struct DerivedMesh {
int needsFree; /* checked on ->release, is set to 0 for cached results */
int deformedOnly; /* set by modifier stack if only deformed from original */
BVHCache bvhCache;
+ struct GPUDrawObject *drawObject;
/* Misc. Queries */
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index 4724ee19aaa..17b56864d1e 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -41,6 +41,7 @@ struct bAction;
struct bActionGroup;
struct FCurve;
struct bPose;
+struct bItasc;
struct bPoseChannel;
struct Object;
struct Scene;
@@ -51,7 +52,7 @@ struct ID;
extern "C" {
#endif
-/* Action API ----------------- */
+/* Action Lib Stuff ----------------- */
/* Allocate a new bAction with the given name */
struct bAction *add_empty_action(const char name[]);
@@ -65,6 +66,31 @@ void free_action(struct bAction *act);
// XXX is this needed?
void make_local_action(struct bAction *act);
+
+/* Action API ----------------- */
+
+/* types of transforms applied to the given item
+ * - these are the return falgs for action_get_item_transforms()
+ */
+typedef enum eAction_TransformFlags {
+ /* location */
+ ACT_TRANS_LOC = (1<<0),
+ /* rotation */
+ ACT_TRANS_ROT = (1<<1),
+ /* scaling */
+ ACT_TRANS_SCALE = (1<<2),
+
+ /* all flags */
+ ACT_TRANS_ALL = (ACT_TRANS_LOC|ACT_TRANS_ROT|ACT_TRANS_SCALE),
+} eAction_TransformFlags;
+
+/* Return flags indicating which transforms the given object/posechannel has
+ * - if 'curves' is provided, a list of links to these curves are also returned
+ * whose nodes WILL NEED FREEING
+ */
+short action_get_item_transforms(struct bAction *act, struct Object *ob, struct bPoseChannel *pchan, ListBase *curves);
+
+
/* Some kind of bounding box operation on the action */
void calc_action_range(const struct bAction *act, float *start, float *end, short incl_modifiers);
@@ -73,6 +99,9 @@ short action_has_motion(const struct bAction *act);
/* Action Groups API ----------------- */
+/* Get the active action-group for an Action */
+struct bActionGroup *get_active_actiongroup(struct bAction *act);
+
/* Make the given Action Group the active one */
void set_active_action_group(struct bAction *act, struct bActionGroup *agrp, short select);
@@ -126,11 +155,21 @@ struct bPoseChannel *get_active_posechannel(struct Object *ob);
*/
struct bPoseChannel *verify_pose_channel(struct bPose* pose, const char* name);
-
+/* Copy the data from the action-pose (src) into the pose */
+void extract_pose_from_pose(struct bPose *pose, const struct bPose *src);
/* sets constraint flags */
void update_pose_constraint_flags(struct bPose *pose);
+/* return the name of structure pointed by pose->ikparam */
+const char *get_ikparam_name(struct bPose *pose);
+
+/* allocate and initialize pose->ikparam according to pose->iksolver */
+void init_pose_ikparam(struct bPose *pose);
+
+/* initialize a bItasc structure with default value */
+void init_pose_itasc(struct bItasc *itasc);
+
/* clears BONE_UNKEYED flags for frame changing */
// XXX to be depreceated for a more general solution in animsys...
void framechange_poses_clear_unkeyed(void);
@@ -153,16 +192,6 @@ void copy_pose_result(struct bPose *to, struct bPose *from);
/* clear all transforms */
void rest_pose(struct bPose *pose);
-/* Game Engine ------------------------- */
-
-/* exported for game engine */
-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);
-
-/* functions used by the game engine */
-void game_copy_pose(struct bPose **dst, struct bPose *src);
-void game_free_pose(struct bPose *pose);
-
#ifdef __cplusplus
};
#endif
diff --git a/source/blender/blenkernel/BKE_anim.h b/source/blender/blenkernel/BKE_anim.h
index 4b1e758da54..32c5ff81740 100644
--- a/source/blender/blenkernel/BKE_anim.h
+++ b/source/blender/blenkernel/BKE_anim.h
@@ -39,14 +39,7 @@ struct PartEff;
struct Scene;
struct ListBase;
-typedef struct DupliObject {
- struct DupliObject *next, *prev;
- struct Object *ob;
- unsigned int origlay;
- int index, no_draw, type, animated;
- float mat[4][4], omat[4][4];
- float orco[3], uv[2];
-} DupliObject;
+#include "DNA_object_types.h"
void free_path(struct Path *path);
void calc_curvepath(struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index 1cbb2331782..8f109034e3e 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -89,6 +89,7 @@ void where_is_armature (struct bArmature *arm);
void where_is_armature_bone(struct Bone *bone, struct Bone *prevbone);
void armature_rebuild_pose(struct Object *ob, struct bArmature *arm);
void where_is_pose (struct Scene *scene, struct Object *ob);
+void where_is_pose_bone(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime);
/* get_objectspace_bone_matrix has to be removed still */
void get_objectspace_bone_matrix (struct Bone* bone, float M_accumulatedMatrix[][4], int root, int posed);
@@ -102,10 +103,8 @@ void armature_mat_pose_to_bone(struct bPoseChannel *pchan, float inmat[][4], flo
void armature_loc_pose_to_bone(struct bPoseChannel *pchan, float *inloc, float *outloc);
void armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], float arm_mat[][4]);
-/* Animation functions */
-struct PoseTree *ik_tree_to_posetree(struct Object *ob, struct Bone *bone);
-void solve_posetree(PoseTree *tree);
-void free_posetree(PoseTree *tree);
+/* Rotation Mode Conversions - Used for PoseChannels + Objects... */
+void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode);
/* B-Bone support */
typedef struct Mat4 {
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index abc04450ae9..cbce20a4980 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -43,7 +43,7 @@ struct bContext;
struct ReportList;
#define BLENDER_VERSION 250
-#define BLENDER_SUBVERSION 3
+#define BLENDER_SUBVERSION 6
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0
diff --git a/source/blender/blenkernel/BKE_boids.h b/source/blender/blenkernel/BKE_boids.h
index acceff863b9..fb65c9c8920 100644
--- a/source/blender/blenkernel/BKE_boids.h
+++ b/source/blender/blenkernel/BKE_boids.h
@@ -35,9 +35,7 @@
#include "DNA_boid_types.h"
typedef struct BoidBrainData {
- Scene *scene;
- struct Object *ob;
- struct ParticleSystem *psys;
+ struct ParticleSimulationData *sim;
struct ParticleSettings *part;
float timestep, cfra, dfra;
float wanted_co[3], wanted_speed;
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h
index 4d24a2433b3..f302618e60d 100644
--- a/source/blender/blenkernel/BKE_brush.h
+++ b/source/blender/blenkernel/BKE_brush.h
@@ -60,10 +60,10 @@ typedef enum {
BRUSH_PRESET_MAX
} BrushCurvePreset;
void brush_curve_preset(struct Brush *b, BrushCurvePreset preset);
-float brush_curve_strength(struct Brush *br, float p, const float len);
+float brush_curve_strength_clamp(struct Brush *br, float p, const float len);
+float brush_curve_strength(struct Brush *br, float p, const float len); /* used for sculpt */
/* sampling */
-float brush_sample_falloff(struct Brush *brush, float dist);
void brush_sample_tex(struct Brush *brush, float *xy, float *rgba);
void brush_imbuf_new(struct Brush *brush, short flt, short texfalloff, int size,
struct ImBuf **imbuf);
diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h
index 66c8d99959a..e2911a30b25 100644
--- a/source/blender/blenkernel/BKE_bvhutils.h
+++ b/source/blender/blenkernel/BKE_bvhutils.h
@@ -57,6 +57,7 @@ typedef struct BVHTreeFromMesh
/* Vertex array, so that callbacks have instante access to data */
struct MVert *vert;
+ struct MEdge *edge; /* only used for BVHTreeFromMeshEdges */
struct MFace *face;
/* radius for raycast */
@@ -96,6 +97,8 @@ BVHTree* bvhtree_from_mesh_verts(struct BVHTreeFromMesh *data, struct DerivedMes
*/
BVHTree* bvhtree_from_mesh_faces(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
+BVHTree* bvhtree_from_mesh_edges(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
+
/*
* Frees data allocated by a call to bvhtree_from_mesh_*.
*/
@@ -109,6 +112,7 @@ void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data);
//Using local coordinates
#define BVHTREE_FROM_FACES 0
#define BVHTREE_FROM_VERTICES 1
+#define BVHTREE_FROM_EDGES 2
typedef LinkNode* BVHCache;
diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h
index e4eed084a3d..5ca8ad892ac 100644
--- a/source/blender/blenkernel/BKE_collision.h
+++ b/source/blender/blenkernel/BKE_collision.h
@@ -139,7 +139,16 @@ void interpolateOnTriangle ( float to[3], float v1[3], float v2[3], float v3[3],
/////////////////////////////////////////////////
// used in effect.c
/////////////////////////////////////////////////
-CollisionModifierData **get_collisionobjects(struct Scene *scene, Object *self, int *numcollobj);
+Object **get_collisionobjects(struct Scene *scene, Object *self, int *numcollobj);
+
+typedef struct ColliderCache {
+ struct ColliderCache *next, *prev;
+ struct Object *ob;
+ struct CollisionModifierData *collmd;
+} ColliderCache;
+
+struct ListBase *get_collider_cache(struct Scene *scene, Object *self);
+void free_collider_cache(struct ListBase **colliders);
/////////////////////////////////////////////////
diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h
index a0061173438..6446b48d553 100644
--- a/source/blender/blenkernel/BKE_constraint.h
+++ b/source/blender/blenkernel/BKE_constraint.h
@@ -38,6 +38,9 @@ struct Scene;
struct bPoseChannel;
/* ---------------------------------------------------------------------------- */
+#ifdef __cplusplus
+extern "C" {
+#endif
/* special struct for use in constraint evaluation */
typedef struct bConstraintOb {
@@ -128,9 +131,12 @@ void constraints_clear_evalob(struct bConstraintOb *cob);
void constraint_mat_convertspace(struct Object *ob, struct bPoseChannel *pchan, float mat[][4], short from, short to);
-void get_constraint_target_matrix(struct bConstraint *con, int n, short ownertype, void *ownerdata, float mat[][4], float ctime);
+void get_constraint_target_matrix(struct Scene *scene, struct bConstraint *con, int n, short ownertype, void *ownerdata, float mat[][4], float ctime);
void solve_constraints(struct ListBase *conlist, struct bConstraintOb *cob, float ctime);
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h
index 17a4749f704..44f8238d4d9 100644
--- a/source/blender/blenkernel/BKE_depsgraph.h
+++ b/source/blender/blenkernel/BKE_depsgraph.h
@@ -115,5 +115,8 @@ void DAG_ids_flush_update(int time);
/* (re)-create dependency graph for armature pose */
void DAG_pose_sort(struct Object *ob);
+
+ /* callback for editors module to do updates */
+void DAG_editors_update_cb(void (*func)(struct Main *bmain, struct ID *id));
#endif
diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h
index e21e83bf5cf..9a0a724ab9a 100644
--- a/source/blender/blenkernel/BKE_effect.h
+++ b/source/blender/blenkernel/BKE_effect.h
@@ -32,6 +32,7 @@
#define BKE_EFFECT_H
#include "DNA_object_types.h"
+#include "DNA_modifier_types.h"
struct Object;
struct Scene;
@@ -40,20 +41,72 @@ struct ListBase;
struct Particle;
struct Group;
struct RNG;
+struct ParticleSimulationData;
+struct ParticleData;
+struct ParticleKey;
-struct PartDeflect *object_add_collision_fields(void);
+struct EffectorWeights *BKE_add_effector_weights(struct Group *group);
+struct PartDeflect *object_add_collision_fields(int type);
-typedef struct pEffectorCache {
- struct pEffectorCache *next, *prev;
- Object *ob;
-
- /* precalculated variables */
- float oldloc[3], oldspeed[3];
- float scale, time_scale;
- float guide_dist;
+/* Input to effector code */
+typedef struct EffectedPoint {
+ float *loc;
+ float *vel;
+ float *ave; /* angular velocity for particles with dynamic rotation */
+ float *rot; /* rotation quaternion for particles with dynamic rotation */
+ float vel_to_frame;
+ float vel_to_sec;
+
+ /* only for particles */
+ float size, charge;
+
+ unsigned int flag;
+ int index;
+
+ struct ParticleSystem *psys; /* particle system the point belongs to */
+} EffectedPoint;
+
+typedef struct GuideEffectorData {
+ float vec_to_point[3];
+ float strength;
+} GuideEffectorData;
+
+typedef struct EffectorData {
+ /* Effector point */
+ float loc[3];
+ float nor[3];
+ float vel[3];
+
+ float vec_to_point[3];
+ float distance, falloff;
+
+ /* only for effector particles */
+ float size, charge;
+
+ /* only for vortex effector with surface falloff */
+ float nor2[3], vec_to_point2[3];
+
+ int *index; /* point index */
+} EffectorData;
+
+/* used for calculating the effector force */
+typedef struct EffectorCache {
+ struct EffectorCache *next, *prev;
+
+ struct Scene *scene;
+ struct Object *ob;
+ struct ParticleSystem *psys;
+ struct SurfaceModifierData *surmd;
- Object obcopy; /* for restoring transformation data */
-} pEffectorCache;
+ struct PartDeflect *pd;
+
+ /* precalculated for guides */
+ struct GuideEffectorData *guide_data;
+ float guide_loc[4], guide_dir[3], guide_radius;
+
+ float frame;
+ int flag;
+} EffectorCache;
void free_effect(struct Effect *eff);
void free_effects(struct ListBase *lb);
@@ -61,23 +114,34 @@ struct Effect *copy_effect(struct Effect *eff);
void copy_effects(struct ListBase *lbn, struct ListBase *lb);
void deselectall_eff(struct Object *ob);
-/* particle deflector */
-#define PE_WIND_AS_SPEED 0x00000001
-
struct PartEff *give_parteff(struct Object *ob);
-struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *obsrc, struct Group *group);
-void pdEndEffectors(struct ListBase *lb);
-void pdDoEffectors(struct Scene *scene, struct ListBase *lb, float *opco, float *force,
- float *speed, float cur_time, float loc_time, unsigned int flags);
+
+
+void free_partdeflect(struct PartDeflect *pd);
+struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights);
+void pdEndEffectors(struct ListBase **effectors);
+void pdDoEffectors(struct ListBase *effectors, struct ListBase *colliders, struct EffectorWeights *weights, struct EffectedPoint *point, float *force, float *impulse);
+
+void pd_point_from_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleKey *state, struct EffectedPoint *point);
+void pd_point_from_loc(struct Scene *scene, float *loc, float *vel, int index, struct EffectedPoint *point);
+void pd_point_from_soft(struct Scene *scene, float *loc, float *vel, int index, struct EffectedPoint *point);
+
+/* needed for boids */
+float effector_falloff(struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, struct EffectorWeights *weights);
+int closest_point_on_surface(struct SurfaceModifierData *surmd, float *co, float *surface_co, float *surface_nor, float *surface_vel);
+int get_effector_data(struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, int real_velocity);
/* required for particle_system.c */
-void do_physical_effector(struct Scene *scene, struct Object *ob, float *opco, short type, float force_val, float distance,
- float falloff, float size, float damp, float *eff_velocity, float *vec_to_part,
- float *velocity, float *field, int planar, struct RNG *rng, float noise_factor,
- float charge, float pa_size);
-float effector_falloff(struct PartDeflect *pd, float *eff_velocity, float *vec_to_part);
+//void do_physical_effector(struct EffectorData *eff, struct EffectorPoint *point, float *total_force);
+//float effector_falloff(struct EffectorData *eff, struct EffectorPoint *point, struct EffectorWeights *weights);
+/* EffectedPoint->flag */
+#define PE_WIND_AS_SPEED 1
+#define PE_DYNAMIC_ROTATION 2
+#define PE_USE_NORMAL_DATA 4
+/* EffectorData->flag */
+#define PE_VELOCITY_TO_IMPULSE 1
#endif
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h
index cda64c6b241..94d0864024b 100644
--- a/source/blender/blenkernel/BKE_fcurve.h
+++ b/source/blender/blenkernel/BKE_fcurve.h
@@ -35,6 +35,8 @@ struct DriverTarget;
struct BezTriple;
+#include "DNA_curve_types.h"
+
/* ************** Keyframe Tools ***************** */
// XXX this stuff is defined in BKE_ipo.h too, so maybe skip for now?
@@ -153,6 +155,11 @@ 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);
+/* Binary search algorithm for finding where to 'insert' BezTriple with given frame number.
+ * Returns the index to insert at (data already at that index will be offset if replace is 0)
+ */
+int binarysearch_bezt_index(struct BezTriple array[], float frame, int arraylen, short *replace);
+
/* 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_image.h b/source/blender/blenkernel/BKE_image.h
index 816baa20467..85c3c716b8b 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -107,6 +107,11 @@ struct RenderResult;
/* always call to make signals work */
struct ImBuf *BKE_image_get_ibuf(struct Image *ima, struct ImageUser *iuser);
+/* same as above, but can be used to retrieve images being rendered in
+ * a thread safe way, always call both acquire and release */
+struct ImBuf *BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **lock_r);
+void BKE_image_release_ibuf(struct Image *ima, void *lock);
+
/* returns existing Image when filename/type is same (frame optional) */
struct Image *BKE_add_image_file(const char *name, int frame);
@@ -125,6 +130,9 @@ void BKE_image_assign_ibuf(struct Image *ima, struct ImBuf *ibuf);
/* called on frame change or before render */
void BKE_image_user_calc_imanr(struct ImageUser *iuser, int cfra, int fieldnr);
+/* produce image export path */
+int BKE_get_image_export_path(struct Image *im, const char *dest_dir, char *abs, int abs_size, char *rel, int rel_size);
+
/* fix things in ImageUser when new image gets assigned */
void BKE_image_user_new_image(struct Image *ima, struct ImageUser *iuser);
@@ -132,7 +140,8 @@ void BKE_image_user_new_image(struct Image *ima, struct ImageUser *iuser);
struct RenderPass *BKE_image_multilayer_index(struct RenderResult *rr, struct ImageUser *iuser);
/* for multilayer images as well as for render-viewer */
-struct RenderResult *BKE_image_get_renderresult(struct Scene *scene, struct Image *ima);
+struct RenderResult *BKE_image_acquire_renderresult(struct Scene *scene, struct Image *ima);
+void BKE_image_release_renderresult(struct Scene *scene, struct Image *ima);
/* goes over all textures that use images */
void BKE_image_free_all_textures(void);
diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h
index 382754ee2b2..85316dddedf 100644
--- a/source/blender/blenkernel/BKE_material.h
+++ b/source/blender/blenkernel/BKE_material.h
@@ -58,11 +58,12 @@ 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 assign_matarar(struct Object *ob, struct Material ***matar, int totcol);
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);
+int object_add_material_slot(struct Object *ob);
+int object_remove_material_slot(struct Object *ob);
/* rendering */
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 97023e783c2..249da2478b7 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -90,6 +90,7 @@ struct Mesh *get_mesh(struct Object *ob);
void set_mesh(struct Object *ob, struct Mesh *me);
void mball_to_mesh(struct ListBase *lb, struct Mesh *me);
void nurbs_to_mesh(struct Object *ob);
+void mesh_to_curve(struct Scene *scene, struct Object *ob);
void free_dverts(struct MDeformVert *dvert, int totvert);
void copy_dverts(struct MDeformVert *dst, struct MDeformVert *src, int totvert); /* __NLA */
void mesh_delete_material_index(struct Mesh *me, int index);
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index b5471758ea6..8a3c8c64575 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -275,6 +275,8 @@ ModifierTypeInfo *modifierType_getInfo (ModifierType type);
struct ModifierData *modifier_new(int type);
void modifier_free(struct ModifierData *md);
+void modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md);
+
void modifier_copyData(struct ModifierData *md, struct ModifierData *target);
int modifier_dependsOnTime(struct ModifierData *md);
int modifier_supportsMapping(struct ModifierData *md);
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index cbb37918d04..66776d086d6 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -42,7 +42,7 @@ struct bNode;
struct bNodeLink;
struct bNodeSocket;
struct bNodeStack;
-struct uiBlock;
+struct uiLayout;
struct rctf;
struct ListBase;
struct RenderData;
@@ -52,6 +52,7 @@ struct Tex;
struct GPUMaterial;
struct GPUNode;
struct GPUNodeStack;
+struct PointerRNA;
/* ************** NODE TYPE DEFINITIONS ***** */
@@ -82,7 +83,7 @@ typedef struct bNodeType {
void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **);
/* this line is set on startup of blender */
- int (*butfunc)(struct uiBlock *, struct bNodeTree *, struct bNode *, struct rctf *);
+ void (*uifunc)(struct uiLayout *, struct PointerRNA *ptr);
void (*initfunc)(struct bNode *);
void (*freestoragefunc)(struct bNode *);
@@ -180,6 +181,7 @@ int nodeCountSocketLinks(struct bNodeTree *ntree, struct bNodeSocket *sock);
void nodeSetActive(struct bNodeTree *ntree, struct bNode *node);
struct bNode *nodeGetActive(struct bNodeTree *ntree);
struct bNode *nodeGetActiveID(struct bNodeTree *ntree, short idtype);
+int nodeSetActiveID(struct bNodeTree *ntree, short idtype, struct ID *id);
void nodeClearActiveID(struct bNodeTree *ntree, short idtype);
void NodeTagChanged(struct bNodeTree *ntree, struct bNode *node);
@@ -425,7 +427,7 @@ extern struct ListBase node_all_textures;
/* API */
int ntreeTexTagAnimated(struct bNodeTree *ntree);
void ntreeTexSetPreviewFlag(int);
-void ntreeTexExecTree(struct bNodeTree *ntree, struct TexResult *target, float *coord, float *dxt, float *dyt, short thread, struct Tex *tex, short which_output, int cfra);
+void ntreeTexExecTree(struct bNodeTree *ntree, struct TexResult *target, float *coord, float *dxt, float *dyt, short thread, struct Tex *tex, short which_output, int cfra, int preview);
void ntreeTexCheckCyclics(struct bNodeTree *ntree);
char* ntreeTexOutputMenu(struct bNodeTree *ntree);
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 1cb6efeb838..aeb33cd3628 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -114,7 +114,7 @@ int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float ray_normal[3
void object_handle_update(struct Scene *scene, struct Object *ob);
float give_timeoffset(struct Object *ob);
-int give_obdata_texspace(struct Object *ob, int **texflag, float **loc, float **size, float **rot);
+int give_obdata_texspace(struct Object *ob, short **texflag, float **loc, float **size, float **rot);
int object_insert_ptcache(struct Object *ob);
// void object_delete_ptcache(struct Object *ob, int index);
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 7dc9e4499c6..ba42aca1872 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -88,6 +88,8 @@ typedef struct SculptSession {
struct SculptStroke *stroke;
struct StrokeCache *cache;
+
+ struct GPUDrawObject *drawobject;
} SculptSession;
void free_sculptsession(SculptSession **);
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index c22778f5a30..2291601bd47 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -61,37 +61,33 @@ struct BVHTreeRayHit;
#define PARTICLE_P ParticleData *pa; int p
#define LOOP_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++)
+#define LOOP_EXISTING_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & PARS_UNEXIST))
+#define LOOP_SHOWN_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & (PARS_UNEXIST|PARS_NO_DISP)))
-typedef struct ParticleEffectorCache {
- struct ParticleEffectorCache *next, *prev;
- struct Object *ob;
-
- /* precalculated variables for guides */
- float firstloc[4], firstdir[3];
- float *distances;
- float *locations;
- /* precalculated variables for deflection */
- float ob_minmax[6];
- float *face_minmax;
- float *vert_cos;
- /* precalculated variables for boids */
- struct KDTree *tree;
+#define PSYS_FRAND_COUNT 1024
+#define PSYS_FRAND(seed) psys->frand[(seed) % PSYS_FRAND_COUNT]
- short type, psys_nbr;
-
- struct Object obcopy; /* for restoring transformation data */
- struct RNG *rng; /* random noise generator for e.g. wind */
-} ParticleEffectorCache;
+/* fast but sure way to get the modifier*/
+#define PARTICLE_PSMD ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys)
-typedef struct ParticleReactEvent {
- struct ParticleReactEvent *next, *prev;
- int event, pa_num;
- Object *ob;
+/* common stuff that many particle functions need */
+typedef struct ParticleSimulationData {
+ struct Scene *scene;
+ struct Object *ob;
struct ParticleSystem *psys;
- struct ParticleKey state;
-
- float time, size;
-}ParticleReactEvent;
+ struct ParticleSystemModifierData *psmd;
+ struct ListBase *colliders;
+} ParticleSimulationData;
+
+//typedef struct ParticleReactEvent {
+// struct ParticleReactEvent *next, *prev;
+// int event, pa_num;
+// Object *ob;
+// struct ParticleSystem *psys;
+// struct ParticleKey state;
+//
+// float time, size;
+//}ParticleReactEvent;
typedef struct ParticleTexture{
float ivel; /* used in reset */
@@ -118,11 +114,8 @@ typedef struct ParticleCacheKey{
typedef struct ParticleThreadContext {
/* shared */
- struct Scene *scene;
- struct Object *ob;
+ struct ParticleSimulationData sim;
struct DerivedMesh *dm;
- struct ParticleSystemModifierData *psmd;
- struct ParticleSystem *psys;
struct Material *ma;
/* distribution */
@@ -166,53 +159,55 @@ typedef struct ParticleBillboardData
int lock, num;
int totnum;
short align, uv_split, anim, split_offset;
-}
-ParticleBillboardData;
+} ParticleBillboardData;
/* container for moving data between deflet_particle and particle_intersect_face */
typedef struct ParticleCollision
{
- struct Object *ob, *ob_t; // collided and current objects
- struct CollisionModifierData *md; // collision modifier for ob_t;
+ struct Object *ob, *hit_ob; // collided and current objects
+ struct CollisionModifierData *md, *hit_md; // collision modifiers for current and hit object;
float nor[3]; // normal at collision point
float vel[3]; // velocity of collision point
float co1[3], co2[3]; // ray start and end points
float ray_len; // original length of co2-co1, needed for collision time evaluation
float t; // time of previous collision, needed for substracting face velocity
-}
-ParticleCollision;
+} ParticleCollision;
+
+typedef struct ParticleDrawData {
+ float *vdata, *vd; /* vertice data */
+ float *ndata, *nd; /* normal data */
+ float *cdata, *cd; /* color data */
+ float *vedata, *ved; /* velocity data */
+ float *ma_r, *ma_g, *ma_b;
+ int tot_vec_size, flag;
+ int totpoint, totve;
+} ParticleDrawData;
+
+#define PARTICLE_DRAW_DATA_UPDATED 1
/* ----------- functions needed outside particlesystem ---------------- */
/* particle.c */
int count_particles(struct ParticleSystem *psys);
int count_particles_mod(struct ParticleSystem *psys, int totgr, int cur);
-int psys_count_keys(struct ParticleSystem *psys);
-char *psys_menu_string(struct Object *ob, int for_sb);
struct ParticleSystem *psys_get_current(struct Object *ob);
+/* for rna */
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);
-void psys_change_act(void *ob_v, void *act_v);
-struct Object *psys_get_lattice(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys);
-void psys_disable_all(struct Object *ob);
-void psys_enable_all(struct Object *ob);
-int psys_ob_has_hair(struct Object *ob);
+
+struct Object *psys_get_lattice(struct ParticleSimulationData *sim);
+
int psys_in_edit_mode(struct Scene *scene, struct ParticleSystem *psys);
int psys_check_enabled(struct Object *ob, struct ParticleSystem *psys);
+int psys_check_edited(struct ParticleSystem *psys);
+
+void psys_check_group_weights(struct ParticleSettings *part);
-void psys_free_boid_rules(struct ListBase *list);
+/* free */
void psys_free_settings(struct ParticleSettings *part);
-void free_child_path_cache(struct ParticleSystem *psys);
void psys_free_path_cache(struct ParticleSystem *psys, struct PTCacheEdit *edit);
-void free_hair(struct Object *ob, struct ParticleSystem *psys, int dynamics);
-void free_keyed_keys(struct ParticleSystem *psys);
-void psys_free_particles(struct ParticleSystem *psys);
void psys_free(struct Object * ob, struct ParticleSystem * psys);
-void psys_free_children(struct ParticleSystem *psys);
void psys_render_set(struct Object *ob, struct ParticleSystem *psys, float viewmat[][4], float winmat[][4], int winx, int winy, int timeoffset);
void psys_render_restore(struct Object *ob, struct ParticleSystem *psys);
@@ -231,48 +226,39 @@ 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_reset(struct ParticleSystem *psys, int mode);
-void psys_find_parents(struct Object *ob, struct ParticleSystemModifierData *psmd, struct ParticleSystem *psys);
+void psys_find_parents(struct ParticleSimulationData *sim);
-void psys_cache_paths(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys, float cfra);
+void psys_cache_paths(struct ParticleSimulationData *sim, float cfra);
void psys_cache_edit_paths(struct Scene *scene, struct Object *ob, struct PTCacheEdit *edit, float cfra);
-void psys_cache_child_paths(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys, float cfra, int editupdate);
-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);
+void psys_cache_child_paths(struct ParticleSimulationData *sim, float cfra, int editupdate);
+int do_guides(struct ListBase *effectors, ParticleKey *state, int pa_num, float time);
+void precalc_guides(struct ParticleSimulationData *sim, struct ListBase *effectors);
+float psys_get_timestep(struct ParticleSimulationData *sim);
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);
+void psys_get_particle_on_path(struct ParticleSimulationData *sim, int pa_num, struct ParticleKey *state, int vel);
+int psys_get_particle_state(struct ParticleSimulationData *sim, int p, struct ParticleKey *state, int always);
+
+/* for anim.c */
void psys_get_dupli_texture(struct Object *ob, struct ParticleSettings *part, struct ParticleSystemModifierData *psmd, struct ParticleData *pa, struct ChildParticle *cpa, float *uv, float *orco);
-void psys_get_dupli_path_transform(struct Object *ob, struct ParticleSystem *psys, struct ParticleSystemModifierData *psmd, struct ParticleData *pa, struct ChildParticle *cpa, struct ParticleCacheKey *cache, float mat[][4], float *scale);
+void psys_get_dupli_path_transform(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ChildParticle *cpa, struct ParticleCacheKey *cache, float mat[][4], float *scale);
-ParticleThread *psys_threads_create(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys);
-int psys_threads_init_distribution(ParticleThread *threads, struct Scene *scene, struct DerivedMesh *dm, int from);
-int psys_threads_init_path(ParticleThread *threads, struct Scene *scene, float cfra, int editupdate);
+ParticleThread *psys_threads_create(struct ParticleSimulationData *sim);
void psys_threads_free(ParticleThread *threads);
-void psys_thread_distribute_particle(ParticleThread *thread, struct ParticleData *pa, struct ChildParticle *cpa, int p);
-void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa, ParticleCacheKey *keys, int i);
-
void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3], float zvec[3], float center[3]);
/* particle_system.c */
struct ParticleSystem *psys_get_target_system(struct Object *ob, struct ParticleTarget *pt);
-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_count_keyed_targets(struct ParticleSimulationData *sim);
+void psys_update_particle_tree(struct ParticleSystem *psys, float cfra);
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 psys_get_pointcache_start_end(struct Scene *scene, ParticleSystem *psys, int *sfra, int *efra);
void psys_check_boid_data(struct ParticleSystem *psys);
@@ -280,40 +266,40 @@ void particle_system_update(struct Scene *scene, struct Object *ob, struct Parti
/* ----------- functions needed only inside particlesystem ------------ */
/* particle.c */
+void psys_disable_all(struct Object *ob);
+void psys_enable_all(struct Object *ob);
+
+void free_hair(struct Object *ob, struct ParticleSystem *psys, int dynamics);
+void free_keyed_keys(struct ParticleSystem *psys);
+void psys_free_particles(struct ParticleSystem *psys);
+void psys_free_children(struct ParticleSystem *psys);
+
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);
-//void psys_face_mat(struct DerivedMesh *dm, struct ParticleData *pa, float mat[][4]);
void psys_vec_rot_to_face(struct DerivedMesh *dm, struct ParticleData *pa, float *vec);
-//void psys_vec_rot_from_face(struct DerivedMesh *dm, struct ParticleData *pa, float *vec);
void psys_mat_hair_to_object(struct Object *ob, struct DerivedMesh *dm, short from, struct ParticleData *pa, float hairmat[][4]);
void psys_mat_hair_to_global(struct Object *ob, struct DerivedMesh *dm, short from, struct ParticleData *pa, float hairmat[][4]);
void psys_mat_hair_to_orco(struct Object *ob, struct DerivedMesh *dm, short from, struct ParticleData *pa, float hairmat[][4]);
+void psys_free_pdd(struct ParticleSystem *psys);
+
float *psys_cache_vgroup(struct DerivedMesh *dm, struct ParticleSystem *psys, int vgroup);
-void psys_get_texture(struct Object *ob, struct Material *ma, struct ParticleSystemModifierData *psmd, struct ParticleSystem *psys, struct ParticleData *pa, struct ParticleTexture *ptex, int event);
+void psys_get_texture(struct ParticleSimulationData *sim, struct Material *ma, struct ParticleData *pa, struct ParticleTexture *ptex, int event);
void psys_interpolate_face(struct MVert *mvert, struct MFace *mface, struct MTFace *tface, float (*orcodata)[3], float *uv, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor);
float psys_particle_value_from_verts(struct DerivedMesh *dm, short from, struct ParticleData *pa, float *values);
-float psys_interpolate_value_from_verts(struct DerivedMesh *dm, short from, int index, float *fw, float *values);
void psys_get_from_key(struct ParticleKey *key, float *loc, float *vel, float *rot, float *time);
+/* only in edisparticle.c*/
int psys_intersect_dm(struct Scene *scene, struct Object *ob, struct DerivedMesh *dm, float *vert_cos, float *co1, float* co2, float *min_d, int *min_face, float *min_uv, float *face_minmax, float *pa_minmax, float radius, float *ipoint);
+/* BLI_bvhtree_ray_cast callback */
void particle_intersect_face(void *userdata, int index, const struct BVHTreeRay *ray, struct BVHTreeRayHit *hit);
void psys_particle_on_dm(struct DerivedMesh *dm, int from, int index, int index_dmcache, float *fw, float foffset, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor);
/* particle_system.c */
-void initialize_particle(struct ParticleData *pa, int p, struct Object *ob, struct ParticleSystem *psys, struct ParticleSystemModifierData *psmd);
-
-int effector_find_co(struct Scene *scene, float *pco, struct SurfaceModifierData *sur, struct Object *ob, struct PartDeflect *pd, float *co, float *nor, float *vel, int *index);
-void do_effectors(int pa_no, struct ParticleData *pa, struct ParticleKey *state, struct Scene *scene, struct Object *ob, struct ParticleSystem *psys, float *texco, float *force_field, float *vel,float framestep, float cfra);
-
+void initialize_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, int p);
void psys_calc_dmcache(struct Object *ob, struct DerivedMesh *dm, struct ParticleSystem *psys);
int psys_particle_dm_face_lookup(struct Object *ob, struct DerivedMesh *dm, int index, float *fw, struct LinkNode *node);
-void reset_particle(struct Scene *scene, struct ParticleData *pa, struct ParticleSystem *psys, struct ParticleSystemModifierData *psmd, struct Object *ob,
- float dtime, float cfra, float *vg_vel, float *vg_tan, float *vg_rot);
-
+void reset_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, float dtime, float cfra);
/* psys_reset */
#define PSYS_RESET_ALL 1
@@ -321,12 +307,6 @@ void reset_particle(struct Scene *scene, struct ParticleData *pa, struct Particl
#define PSYS_RESET_CHILDREN 3
#define PSYS_RESET_CACHE_MISS 4
-/* ParticleEffectorCache->type */
-#define PSYS_EC_EFFECTOR 1
-#define PSYS_EC_DEFLECT 2
-#define PSYS_EC_PARTICLE 4
-#define PSYS_EC_REACTOR 8
-
/* index_dmcache */
#define DMCACHE_NOTFOUND -1
#define DMCACHE_ISCHILD -2
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index ee04d4f47bc..39a90fe3074 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -44,6 +44,7 @@ struct SpaceType;
struct wmNotifier;
struct wmWindow;
struct wmWindowManager;
+struct wmKeyConfig;
struct uiLayout;
struct uiMenuItem;
@@ -81,7 +82,7 @@ typedef struct SpaceType {
/* register operator types on startup */
void (*operatortypes)(void);
/* add default items to WM keymap */
- void (*keymap)(struct wmWindowManager *);
+ void (*keymap)(struct wmKeyConfig *);
/* return context data */
int (*context)(const struct bContext *, const char*, struct bContextDataResult *);
@@ -122,7 +123,7 @@ typedef struct ARegionType {
/* register operator types on startup */
void (*operatortypes)(void);
/* add own items to keymap */
- void (*keymap)(struct wmWindowManager *);
+ void (*keymap)(struct wmKeyConfig *);
/* allows default cursor per region */
void (*cursor)(struct wmWindow *, struct ScrArea *, struct ARegion *ar);
@@ -137,9 +138,6 @@ typedef struct ARegionType {
/* header type definitions */
ListBase headertypes;
-
- /* menu type definitions */
- ListBase menutypes;
/* hardcoded constraints, smaller than these values region is not visible */
int minsizex, minsizey;
@@ -199,7 +197,6 @@ typedef struct MenuType {
char idname[BKE_ST_MAXNAME]; /* unique name */
char label[BKE_ST_MAXNAME]; /* for button text */
- int space_type;
/* verify if the menu should draw or not */
int (*poll)(const struct bContext *, struct MenuType *);
@@ -222,6 +219,8 @@ const struct ListBase *BKE_spacetypes_list(void);
void BKE_spacetype_register(struct SpaceType *st);
void BKE_spacetypes_free(void); /* only for quitting blender */
+// MenuType *BKE_spacemenu_find(const char *idname, int spacetype);
+
/* spacedata */
void BKE_spacedata_freelist(ListBase *lb);
void BKE_spacedata_copylist(ListBase *lb1, ListBase *lb2);
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h
index e9f6eb21e36..cbce4663d6f 100644
--- a/source/blender/blenkernel/BKE_sound.h
+++ b/source/blender/blenkernel/BKE_sound.h
@@ -71,7 +71,7 @@ void sound_update_playing(struct bContext *C);
void sound_scrub(struct bContext *C);
#ifdef AUD_CAPI
-AUD_Device* sound_mixdown(struct Scene *scene, AUD_Specs specs, int start, int end);
+AUD_Device* sound_mixdown(struct Scene *scene, AUD_Specs specs, int start, int end, float volume);
#endif
void sound_stop_all(struct bContext *C);
diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h
index 07e05756ea3..185e32ecdfa 100644
--- a/source/blender/blenkernel/BKE_text.h
+++ b/source/blender/blenkernel/BKE_text.h
@@ -104,6 +104,14 @@ struct TextMarker *txt_next_marker (struct Text *text, struct TextMarker *marke
struct TextMarker *txt_prev_marker_color (struct Text *text, struct TextMarker *marker);
struct TextMarker *txt_next_marker_color (struct Text *text, struct TextMarker *marker);
+/* utility functions, could be moved somewhere more generic but are python/text related */
+int text_check_bracket(char ch);
+int text_check_delim(char ch);
+int text_check_digit(char ch);
+int text_check_identifier(char ch);
+int text_check_whitespace(char ch);
+
+
/* Undo opcodes */
/* Simple main cursor movement */
diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h
index a9862ba586b..b9dc5916e69 100644
--- a/source/blender/blenkernel/BKE_texture.h
+++ b/source/blender/blenkernel/BKE_texture.h
@@ -31,17 +31,20 @@
#ifndef BKE_TEXTURE_H
#define BKE_TEXTURE_H
-struct Scene;
-struct Tex;
-struct MTex;
-struct PluginTex;
-struct LampRen;
+struct Brush;
struct ColorBand;
-struct HaloRen;
-struct TexMapping;
struct EnvMap;
+struct HaloRen;
+struct Lamp;
+struct LampRen;
+struct Material;
+struct MTex;
+struct PluginTex;
struct PointDensity;
+struct Tex;
+struct TexMapping;
struct VoxelData;
+struct World;
/* in ColorBand struct */
#define MAXCOLORBAND 32
@@ -65,8 +68,20 @@ struct MTex *add_mtex(void);
struct Tex *copy_texture(struct Tex *tex);
void make_local_texture(struct Tex *tex);
void autotexname(struct Tex *tex);
-struct Tex *give_current_texture(struct Object *ob, int act);
-struct Tex *give_current_world_texture(struct Scene *scene);
+
+struct Tex *give_current_object_texture(struct Object *ob);
+struct Tex *give_current_material_texture(struct Material *ma);
+struct Tex *give_current_lamp_texture(struct Lamp *la);
+struct Tex *give_current_world_texture(struct World *world);
+struct Tex *give_current_brush_texture(struct Brush *br);
+
+int give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act);
+void set_active_mtex(struct ID *id, short act);
+
+void set_current_brush_texture(struct Brush *br, struct Tex *tex);
+void set_current_world_texture(struct World *wo, struct Tex *tex);
+void set_current_material_texture(struct Material *ma, struct Tex *tex);
+void set_current_lamp_texture(struct Lamp *la, struct Tex *tex);
struct TexMapping *add_mapping(void);
void init_mapping(struct TexMapping *texmap);
diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h
index 06d58714423..1bf581b9435 100644
--- a/source/blender/blenkernel/BKE_utildefines.h
+++ b/source/blender/blenkernel/BKE_utildefines.h
@@ -75,6 +75,14 @@
#define INIT_MINMAX2(min, max) { (min)[0]= (min)[1]= 1.0e30f; (max)[0]= (max)[1]= -1.0e30f; }
+#define DO_MIN(vec, min) { if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \
+ if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \
+ if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; } \
+
+#define DO_MAX(vec, max) { if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \
+ if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \
+ if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; } \
+
#define DO_MINMAX(vec, min, max) { if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \
if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \
if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; \
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 68aed2b0184..f60cade61ed 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -30,12 +30,10 @@ SET(INC
. ../../../intern/guardedalloc ../../../intern/memutil ../editors/include ../blenlib ../makesdna
../render/extern/include ../../../intern/decimation/extern
../imbuf ../avi ../../../intern/elbeem/extern ../../../intern/opennl/extern
- ../../../intern/iksolver/extern ../blenloader
+ ../../../intern/iksolver/extern ../blenloader ../ikplugin
../nodes ../../../extern/glew/include ../gpu ../makesrna ../../../intern/smoke/extern
../../../intern/bsp/extern ../blenfont
../../../intern/audaspace/intern
- ../../../extern/lzo/minilzo
- ../../../extern/lzma
${ZLIB_INC}
)
@@ -76,6 +74,16 @@ IF(NOT WITH_ELBEEM)
ADD_DEFINITIONS(-DDISABLE_ELBEEM)
ENDIF(NOT WITH_ELBEEM)
+IF(WITH_LZO)
+ SET(INC ${INC} ../../../extern/lzo/minilzo)
+ ADD_DEFINITIONS(-DWITH_LZO)
+ENDIF(WITH_LZO)
+
+IF(WITH_LZMA)
+ SET(INC ${INC} ../../../extern/lzma)
+ ADD_DEFINITIONS(-DWITH_LZMA)
+ENDIF(WITH_LZMA)
+
IF(WIN32)
SET(INC ${INC} ${PTHREADS_INC})
ENDIF(WIN32)
diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript
index 4e616d292bd..43e50bb4f1f 100644
--- a/source/blender/blenkernel/SConscript
+++ b/source/blender/blenkernel/SConscript
@@ -5,15 +5,13 @@ sources = env.Glob('intern/*.c')
incs = '. #/intern/guardedalloc #/intern/memutil ../editors/include ../blenlib ../blenfont ../makesdna'
incs += ' ../render/extern/include #/intern/decimation/extern ../makesrna'
-incs += ' ../imbuf ../avi #/intern/elbeem/extern ../nodes'
+incs += ' ../imbuf ../ikplugin ../avi #/intern/elbeem/extern ../nodes'
incs += ' #/intern/iksolver/extern ../blenloader'
incs += ' #/extern/bullet2/src'
incs += ' #/intern/opennl/extern #/intern/bsp/extern'
incs += ' ../gpu #/extern/glew/include'
incs += ' ../bmesh'
incs += ' #/intern/smoke/extern'
-incs += ' #/extern/lzo/minilzo'
-incs += ' #/extern/lzma'
incs += ' #/intern/audaspace/intern'
incs += ' ' + env['BF_OPENGL_INC']
@@ -62,7 +60,15 @@ if env['BF_NO_ELBEEM']:
if env['WITH_BF_LCMS']:
defs.append('WITH_LCMS')
-
+
+if env['WITH_BF_LZO']:
+ incs += ' #/extern/lzo/minilzo'
+ defs.append('WITH_LZO')
+
+if env['WITH_BF_LZMA']:
+ incs += ' #/extern/lzma'
+ defs.append('WITH_LZMA')
+
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index b679e892606..91279597768 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -86,6 +86,7 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
+#include "gpu_buffers.h"
#include "GPU_draw.h"
#include "GPU_extensions.h"
#include "GPU_material.h"
@@ -260,7 +261,7 @@ int DM_release(DerivedMesh *dm)
{
if (dm->needsFree) {
bvhcache_free(&dm->bvhCache);
-
+ GPU_drawobject_free( dm );
CustomData_free(&dm->vertData, dm->numVertData);
CustomData_free(&dm->edgeData, dm->numEdgeData);
CustomData_free(&dm->faceData, dm->numFaceData);
@@ -705,14 +706,56 @@ static void emDM_drawMappedEdges(void *dm, int (*setDrawOptions)(void *userData,
}
glEnd();
} else {
- glBegin(GL_LINES);
- for(i=0,eed= emdm->em->edges.first; eed; i++,eed= eed->next) {
- if(!setDrawOptions || setDrawOptions(userData, i)) {
- glVertex3fv(eed->v1->co);
- glVertex3fv(eed->v2->co);
+ GPUBuffer *buffer = NULL;
+ float *varray;
+
+ if(GPU_buffer_legacy(dm)==FALSE)
+ buffer = GPU_buffer_alloc( sizeof(float)*3*2*emdm->em->totedge, 0 );
+
+ if( buffer != 0 && (varray = GPU_buffer_lock_stream( buffer )) ) {
+ int prevdraw = 0;
+ int numedges = 0;
+ int draw = 0;
+ int datatype[] = { GPU_BUFFER_INTER_V3F, GPU_BUFFER_INTER_END };
+ GPU_buffer_unlock( buffer );
+ GPU_interleaved_setup( buffer, datatype );
+ varray = GPU_buffer_lock_stream( buffer );
+ for(i=0,eed= emdm->em->edges.first; eed; i++,eed= eed->next) {
+ if(!setDrawOptions || setDrawOptions(userData, i)) {
+ draw = 1;
+ } else {
+ draw = 0;
+ }
+ if( prevdraw != draw && prevdraw != 0 && numedges > 0) {
+ GPU_buffer_unlock( buffer );
+ glDrawArrays(GL_LINES,0,numedges*2);
+ varray = GPU_buffer_lock_stream( buffer );
+ numedges = 0;
+ }
+ if( draw != 0 ) {
+ VECCOPY(&varray[numedges*6],eed->v1->co);
+ VECCOPY(&varray[numedges*6+3],eed->v2->co);
+ numedges++;
+ }
+ prevdraw = draw;
}
+ GPU_buffer_unlock( buffer );
+ if( prevdraw != 0 && numedges > 0) {
+ glDrawArrays(GL_LINES,0,numedges*2);
+ }
+ GPU_buffer_unbind();
+ } else {
+ glBegin(GL_LINES);
+ for(i=0,eed= emdm->em->edges.first; eed; i++,eed= eed->next) {
+ if(!setDrawOptions || setDrawOptions(userData, i)) {
+ glVertex3fv(eed->v1->co);
+ glVertex3fv(eed->v2->co);
+ }
+ }
+ glEnd();
}
- glEnd();
+ if( buffer != 0 )
+ GPU_buffer_free( buffer, 0 );
}
}
static void emDM_drawEdges(void *dm, int drawLooseEdges)
@@ -841,8 +884,8 @@ static void emDM_drawMappedFaces(void *dm, int (*setDrawOptions)(void *userData,
draw = setDrawOptions==NULL ? 1 : setDrawOptions(userData, i, &drawSmooth);
if(draw) {
if (draw==2) { /* enabled with stipple */
- glEnable(GL_POLYGON_STIPPLE);
- glPolygonStipple(stipple_quarttone);
+ glEnable(GL_POLYGON_STIPPLE);
+ glPolygonStipple(stipple_quarttone);
}
glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);
@@ -873,41 +916,135 @@ static void emDM_drawMappedFaces(void *dm, int (*setDrawOptions)(void *userData,
}
}
} else {
- for (i=0,efa= emdm->em->faces.first; efa; i++,efa= efa->next) {
- int drawSmooth = (efa->flag & ME_SMOOTH);
- draw = setDrawOptions==NULL ? 1 : setDrawOptions(userData, i, &drawSmooth);
- if(draw) {
- if (draw==2) { /* enabled with stipple */
- glEnable(GL_POLYGON_STIPPLE);
- glPolygonStipple(stipple_quarttone);
+ GPUBuffer *buffer = 0;
+ float *varray;
+ if( setDrawOptions == 0 ) {
+ /* 3 floats for position, 3 for normal and times two because the faces may actually be quads instead of triangles */
+ buffer = GPU_buffer_alloc( sizeof(float)*6*emdm->em->totface*3*2, 0 );
+ }
+ if( buffer != 0 && (varray = GPU_buffer_lock_stream( buffer )) ) {
+ int prevdraw = 0;
+ int numfaces = 0;
+ int datatype[] = { GPU_BUFFER_INTER_V3F, GPU_BUFFER_INTER_N3F, GPU_BUFFER_INTER_END };
+ GPU_buffer_unlock( buffer );
+ GPU_interleaved_setup( buffer, datatype );
+ glShadeModel(GL_SMOOTH);
+ varray = GPU_buffer_lock_stream( buffer );
+ for (i=0,efa= emdm->em->faces.first; efa; i++,efa= efa->next) {
+ int drawSmooth = (efa->flag & ME_SMOOTH);
+ draw = setDrawOptions==NULL ? 1 : setDrawOptions(userData, i, &drawSmooth);
+ if( prevdraw != draw && prevdraw != 0 && numfaces > 0) {
+ if( prevdraw==2 ) {
+ glEnable(GL_POLYGON_STIPPLE);
+ glPolygonStipple(stipple_quarttone);
+ }
+ GPU_buffer_unlock( buffer );
+ glDrawArrays(GL_TRIANGLES,0,numfaces*3);
+ if( prevdraw==2 ) {
+ glDisable(GL_POLYGON_STIPPLE);
+ }
+ varray = GPU_buffer_lock_stream( buffer );
+ numfaces = 0;
}
- glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);
-
- glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
- if (!drawSmooth) {
- glNormal3fv(efa->n);
- glVertex3fv(efa->v1->co);
- glVertex3fv(efa->v2->co);
- glVertex3fv(efa->v3->co);
- if(efa->v4) glVertex3fv(efa->v4->co);
- } else {
- glNormal3fv(efa->v1->no);
- glVertex3fv(efa->v1->co);
- glNormal3fv(efa->v2->no);
- glVertex3fv(efa->v2->co);
- glNormal3fv(efa->v3->no);
- glVertex3fv(efa->v3->co);
- if(efa->v4) {
- glNormal3fv(efa->v4->no);
- glVertex3fv(efa->v4->co);
+ if( draw != 0 ) {
+ if(!drawSmooth) {
+ VECCOPY(&varray[numfaces*18],efa->v1->co);
+ VECCOPY(&varray[numfaces*18+3],efa->n);
+
+ VECCOPY(&varray[numfaces*18+6],efa->v2->co);
+ VECCOPY(&varray[numfaces*18+9],efa->n);
+
+ VECCOPY(&varray[numfaces*18+12],efa->v3->co);
+ VECCOPY(&varray[numfaces*18+15],efa->n);
+ numfaces++;
+ if( efa->v4 ) {
+ VECCOPY(&varray[numfaces*18],efa->v3->co);
+ VECCOPY(&varray[numfaces*18+3],efa->n);
+
+ VECCOPY(&varray[numfaces*18+6],efa->v4->co);
+ VECCOPY(&varray[numfaces*18+9],efa->n);
+
+ VECCOPY(&varray[numfaces*18+12],efa->v1->co);
+ VECCOPY(&varray[numfaces*18+15],efa->n);
+ numfaces++;
+ }
+ }
+ else {
+ VECCOPY(&varray[numfaces*18],efa->v1->co);
+ VECCOPY(&varray[numfaces*18+3],efa->v1->no);
+
+ VECCOPY(&varray[numfaces*18+6],efa->v2->co);
+ VECCOPY(&varray[numfaces*18+9],efa->v2->no);
+
+ VECCOPY(&varray[numfaces*18+12],efa->v3->co);
+ VECCOPY(&varray[numfaces*18+15],efa->v3->no);
+ numfaces++;
+ if( efa->v4 ) {
+ VECCOPY(&varray[numfaces*18],efa->v3->co);
+ VECCOPY(&varray[numfaces*18+3],efa->v3->no);
+
+ VECCOPY(&varray[numfaces*18+6],efa->v4->co);
+ VECCOPY(&varray[numfaces*18+9],efa->v4->no);
+
+ VECCOPY(&varray[numfaces*18+12],efa->v1->co);
+ VECCOPY(&varray[numfaces*18+15],efa->v1->no);
+ numfaces++;
+ }
}
}
- glEnd();
-
- if (draw==2)
+ prevdraw = draw;
+ }
+ GPU_buffer_unlock( buffer );
+ if( prevdraw != 0 && numfaces > 0) {
+ if( prevdraw==2 ) {
+ glEnable(GL_POLYGON_STIPPLE);
+ glPolygonStipple(stipple_quarttone);
+ }
+ glDrawArrays(GL_TRIANGLES,0,numfaces*3);
+ if( prevdraw==2 ) {
glDisable(GL_POLYGON_STIPPLE);
+ }
+ }
+ GPU_buffer_unbind();
+ } else {
+ for (i=0,efa= emdm->em->faces.first; efa; i++,efa= efa->next) {
+ int drawSmooth = (efa->flag & ME_SMOOTH);
+ draw = setDrawOptions==NULL ? 1 : setDrawOptions(userData, i, &drawSmooth);
+ if(draw) {
+ if (draw==2) { /* enabled with stipple */
+ glEnable(GL_POLYGON_STIPPLE);
+ glPolygonStipple(stipple_quarttone);
+ }
+ glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);
+
+ glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
+ if (!drawSmooth) {
+ glNormal3fv(efa->n);
+ glVertex3fv(efa->v1->co);
+ glVertex3fv(efa->v2->co);
+ glVertex3fv(efa->v3->co);
+ if(efa->v4) glVertex3fv(efa->v4->co);
+ } else {
+ glNormal3fv(efa->v1->no);
+ glVertex3fv(efa->v1->co);
+ glNormal3fv(efa->v2->no);
+ glVertex3fv(efa->v2->co);
+ glNormal3fv(efa->v3->no);
+ glVertex3fv(efa->v3->co);
+ if(efa->v4) {
+ glNormal3fv(efa->v4->no);
+ glVertex3fv(efa->v4->co);
+ }
+ }
+ glEnd();
+
+ if (draw==2)
+ glDisable(GL_POLYGON_STIPPLE);
+ }
}
}
+ if( buffer != 0 )
+ GPU_buffer_free( buffer, 0 );
}
}
diff --git a/source/blender/blenkernel/intern/Makefile b/source/blender/blenkernel/intern/Makefile
index 6c2edc9e25f..26b9b9ef0dd 100644
--- a/source/blender/blenkernel/intern/Makefile
+++ b/source/blender/blenkernel/intern/Makefile
@@ -47,6 +47,7 @@ CPPFLAGS += -I$(NAN_AUDASPACE)/include
CPPFLAGS += -I../../makesdna
CPPFLAGS += -I../../makesrna
CPPFLAGS += -I../../imbuf
+CPPFLAGS += -I../../ikplugin
# This mod uses the BLI and BLO module
CPPFLAGS += -I../../blenlib
CPPFLAGS += -I../../blenloader
@@ -85,14 +86,24 @@ CPPFLAGS += -I../../gpu
# path to our own external headerfiles
CPPFLAGS += -I..
-# path to bullet2, for cloth
-CPPFLAGS += -I$(NAN_BULLET2)/include
CPPFLAGS += -I$(NAN_FREETYPE)/include
CPPFLAGS += -I$(NAN_FREETYPE)/include/freetype2
+# path to bullet2, for cloth
+ifeq ($(NAN_USE_BULLET), true)
+ CPPFLAGS += -I$(NAN_BULLET2)/include
+endif
+
# lzo and lzma, for pointcache
-CPPFLAGS += -I$(NAN_LZO)/minilzo
-CPPFLAGS += -I$(NAN_LZMA)
+ifeq ($(WITH_LZO),true)
+ CPPFLAGS += -I$(NAN_LZO)/minilzo
+ CPPFLAGS += -DWITH_LZO
+endif
+
+ifeq ($(WITH_LZO),true)
+ CPPFLAGS += -I$(NAN_LZMA)
+ CPPFLAGS += -DWITH_LZMA
+endif
ifeq ($(WITH_FFMPEG),true)
CPPFLAGS += -DWITH_FFMPEG
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 2bde61818bf..25f539a1992 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -62,6 +62,7 @@
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_utildefines.h"
+#include "BIK_api.h"
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
@@ -212,9 +213,10 @@ bAction *copy_action (bAction *src)
return dst;
}
+/* *************** Action Groups *************** */
/* Get the active action-group for an Action */
-static bActionGroup *get_active_actiongroup (bAction *act)
+bActionGroup *get_active_actiongroup (bAction *act)
{
bActionGroup *agrp= NULL;
@@ -404,7 +406,7 @@ bActionGroup *action_groups_find_named (bAction *act, const char name[])
return NULL;
}
-/* ************************ Pose channels *************** */
+/* *************** Pose channels *************** */
/* usually used within a loop, so we got a N^2 slowdown */
bPoseChannel *get_pose_channel(const bPose *pose, const char *name)
@@ -444,13 +446,13 @@ bPoseChannel *verify_pose_channel(bPose* pose, const char* name)
strncpy(chan->name, name, 31);
/* init vars to prevent math errors */
- chan->quat[0] = 1.0f;
+ chan->quat[0] = chan->rotAxis[1]= 1.0f;
chan->size[0] = chan->size[1] = chan->size[2] = 1.0f;
chan->limitmin[0]= chan->limitmin[1]= chan->limitmin[2]= -180.0f;
chan->limitmax[0]= chan->limitmax[1]= chan->limitmax[2]= 180.0f;
chan->stiffness[0]= chan->stiffness[1]= chan->stiffness[2]= 0.0f;
-
+ chan->ikrotweight = chan->iklinweight = 0.0f;
Mat4One(chan->constinv);
BLI_addtail(&pose->chanbase, chan);
@@ -476,7 +478,18 @@ bPoseChannel *get_active_posechannel (Object *ob)
return NULL;
}
-
+const char *get_ikparam_name(bPose *pose)
+{
+ if (pose) {
+ switch (pose->iksolver) {
+ case IKSOLVER_LEGACY:
+ return NULL;
+ case IKSOLVER_ITASC:
+ return "bItasc";
+ }
+ }
+ return NULL;
+}
/* dst should be freed already, makes entire duplicate */
void copy_pose (bPose **dst, bPose *src, int copycon)
{
@@ -499,17 +512,58 @@ void copy_pose (bPose **dst, bPose *src, int copycon)
BLI_duplicatelist(&outPose->chanbase, &src->chanbase);
+ outPose->iksolver = src->iksolver;
+ outPose->ikdata = NULL;
+ outPose->ikparam = MEM_dupallocN(src->ikparam);
+
+ // TODO: rename this argument...
if (copycon) {
for (pchan=outPose->chanbase.first; pchan; pchan=pchan->next) {
copy_constraints(&listb, &pchan->constraints); // copy_constraints NULLs listb
pchan->constraints= listb;
pchan->path= NULL;
}
+
+ /* for now, duplicate Bone Groups too when doing this */
+ BLI_duplicatelist(&outPose->agroups, &src->agroups);
}
*dst=outPose;
}
+void init_pose_itasc(bItasc *itasc)
+{
+ if (itasc) {
+ itasc->iksolver = IKSOLVER_ITASC;
+ itasc->minstep = 0.01f;
+ itasc->maxstep = 0.06f;
+ itasc->numiter = 100;
+ itasc->numstep = 4;
+ itasc->precision = 0.005f;
+ itasc->flag = ITASC_AUTO_STEP|ITASC_INITIAL_REITERATION;
+ itasc->feedback = 20.f;
+ itasc->maxvel = 50.f;
+ itasc->solver = ITASC_SOLVER_SDLS;
+ itasc->dampmax = 0.5;
+ itasc->dampeps = 0.15;
+ }
+}
+void init_pose_ikparam(bPose *pose)
+{
+ bItasc *itasc;
+ switch (pose->iksolver) {
+ case IKSOLVER_ITASC:
+ itasc = MEM_callocN(sizeof(bItasc), "itasc");
+ init_pose_itasc(itasc);
+ pose->ikparam = itasc;
+ break;
+ case IKSOLVER_LEGACY:
+ default:
+ pose->ikparam = NULL;
+ break;
+ }
+}
+
void free_pose_channels(bPose *pose)
{
bPoseChannel *pchan;
@@ -533,133 +587,15 @@ void free_pose(bPose *pose)
/* free pose-groups */
if (pose->agroups.first)
BLI_freelistN(&pose->agroups);
-
- /* free pose */
- MEM_freeN(pose);
- }
-}
-
-void game_copy_pose(bPose **dst, bPose *src)
-{
- bPose *out;
- bPoseChannel *pchan, *outpchan;
- GHash *ghash;
-
- /* the game engine copies the current armature pose and then swaps
- * the object pose pointer. this makes it possible to change poses
- * without affecting the original blender data. */
-
- if (!src) {
- *dst=NULL;
- return;
- }
- else if (*dst==src) {
- printf("copy_pose source and target are the same\n");
- *dst=NULL;
- return;
- }
-
- out= MEM_dupallocN(src);
- out->agroups.first= out->agroups.last= NULL;
- BLI_duplicatelist(&out->chanbase, &src->chanbase);
-
- /* remap pointers */
- ghash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
-
- pchan= src->chanbase.first;
- outpchan= out->chanbase.first;
- for (; pchan; pchan=pchan->next, outpchan=outpchan->next)
- BLI_ghash_insert(ghash, pchan, outpchan);
-
- for (pchan=out->chanbase.first; pchan; pchan=pchan->next) {
- pchan->parent= BLI_ghash_lookup(ghash, pchan->parent);
- pchan->child= BLI_ghash_lookup(ghash, pchan->child);
- pchan->path= NULL;
- }
-
- BLI_ghash_free(ghash, NULL, NULL);
-
- *dst=out;
-}
+ /* free IK solver state */
+ BIK_clear_data(pose);
-/* 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;
+ /* free IK solver param */
+ if (pose->ikparam)
+ MEM_freeN(pose->ikparam);
- 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) {
- /* we don't free constraints, those are owned by the original pose */
- if(pose->chanbase.first)
- BLI_freelistN(&pose->chanbase);
-
+ /* free pose */
MEM_freeN(pose);
}
}
@@ -671,6 +607,8 @@ static void copy_pose_channel_data(bPoseChannel *pchan, const bPoseChannel *chan
VECCOPY(pchan->loc, chan->loc);
VECCOPY(pchan->size, chan->size);
VECCOPY(pchan->eul, chan->eul);
+ VECCOPY(pchan->rotAxis, chan->rotAxis);
+ pchan->rotAngle= chan->rotAngle;
QUATCOPY(pchan->quat, chan->quat);
pchan->rotmode= chan->rotmode;
Mat4CpyMat4(pchan->chan_mat, (float(*)[4])chan->chan_mat);
@@ -818,7 +756,7 @@ void pose_remove_group (Object *ob)
}
}
-/* ************** time ****************** */
+/* ************** F-Curve Utilities for Actions ****************** */
/* Check if the given action has any keyframes */
short action_has_motion(const bAction *act)
@@ -916,6 +854,98 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_
}
}
+/* Return flags indicating which transforms the given object/posechannel has
+ * - if 'curves' is provided, a list of links to these curves are also returned
+ */
+short action_get_item_transforms (bAction *act, Object *ob, bPoseChannel *pchan, ListBase *curves)
+{
+ PointerRNA ptr;
+ FCurve *fcu;
+ char *basePath=NULL;
+ short flags=0;
+
+ /* build PointerRNA from provided data to obtain the paths to use */
+ if (pchan)
+ RNA_pointer_create((ID *)ob, &RNA_PoseChannel, pchan, &ptr);
+ else if (ob)
+ RNA_id_pointer_create((ID *)ob, &ptr);
+ else
+ return 0;
+
+ /* get the basic path to the properties of interest */
+ basePath= RNA_path_from_ID_to_struct(&ptr);
+ if (basePath == NULL)
+ return 0;
+
+ /* search F-Curves for the given properties
+ * - we cannot use the groups, since they may not be grouped in that way...
+ */
+ for (fcu= act->curves.first; fcu; fcu= fcu->next) {
+ char *bPtr=NULL, *pPtr=NULL;
+
+ /* if enough flags have been found, we can stop checking unless we're also getting the curves */
+ if ((flags == ACT_TRANS_ALL) && (curves == NULL))
+ break;
+
+ /* just in case... */
+ if (fcu->rna_path == NULL)
+ continue;
+
+ /* step 1: check for matching base path */
+ bPtr= strstr(fcu->rna_path, basePath);
+
+ if (bPtr) {
+ /* step 2: check for some property with transforms
+ * - to speed things up, only check for the ones not yet found
+ * unless we're getting the curves too
+ * - if we're getting the curves, the BLI_genericNodeN() creates a LinkData
+ * node wrapping the F-Curve, which then gets added to the list
+ * - once a match has been found, the curve cannot possibly be any other one
+ */
+ if ((curves) || (flags & ACT_TRANS_LOC) == 0) {
+ pPtr= strstr(fcu->rna_path, "location");
+ if ((pPtr) && (pPtr >= bPtr)) {
+ flags |= ACT_TRANS_LOC;
+
+ if (curves)
+ BLI_addtail(curves, BLI_genericNodeN(fcu));
+ continue;
+ }
+ }
+
+ if ((curves) || (flags & ACT_TRANS_SCALE) == 0) {
+ pPtr= strstr(fcu->rna_path, "scale");
+ if ((pPtr) && (pPtr >= bPtr)) {
+ flags |= ACT_TRANS_SCALE;
+
+ if (curves)
+ BLI_addtail(curves, BLI_genericNodeN(fcu));
+ continue;
+ }
+ }
+
+ if ((curves) || (flags & ACT_TRANS_ROT) == 0) {
+ pPtr= strstr(fcu->rna_path, "rotation");
+ if ((pPtr) && (pPtr >= bPtr)) {
+ flags |= ACT_TRANS_ROT;
+
+ if (curves)
+ BLI_addtail(curves, BLI_genericNodeN(fcu));
+ continue;
+ }
+ }
+ }
+ }
+
+ /* free basePath */
+ MEM_freeN(basePath);
+
+ /* return flags found */
+ return flags;
+}
+
+/* ************** Pose Management Tools ****************** */
+
/* Copy the data from the action-pose (src) into the pose */
/* both args are assumed to be valid */
/* exported to game engine */
@@ -947,14 +977,16 @@ void rest_pose(bPose *pose)
memset(pose->stride_offset, 0, sizeof(pose->stride_offset));
memset(pose->cyclic_offset, 0, sizeof(pose->cyclic_offset));
- for (pchan=pose->chanbase.first; pchan; pchan= pchan->next){
+ for (pchan=pose->chanbase.first; pchan; pchan= pchan->next) {
for (i=0; i<3; i++) {
pchan->loc[i]= 0.0f;
pchan->quat[i+1]= 0.0f;
pchan->eul[i]= 0.0f;
pchan->size[i]= 1.0f;
+ pchan->rotAxis[i]= 0.0f;
}
- pchan->quat[0]= 1.0f;
+ pchan->quat[0]= pchan->rotAxis[1]= 1.0f;
+ pchan->rotAngle= 0.0f;
pchan->flag &= ~(POSE_LOC|POSE_ROT|POSE_SIZE);
}
@@ -1158,138 +1190,6 @@ static void blend_pose_offset_bone(bActionStrip *strip, bPose *dst, bPose *src,
VecAddf(dst->cyclic_offset, dst->cyclic_offset, src->cyclic_offset);
}
-typedef struct NlaIpoChannel {
- struct NlaIpoChannel *next, *prev;
- float val;
- void *poin;
- int type;
-} NlaIpoChannel;
-
-static void extract_ipochannels_from_action(ListBase *lb, ID *id, bAction *act, const char *name, float ctime)
-{
- bActionChannel *achan= get_action_channel(act, name);
- IpoCurve *icu;
- NlaIpoChannel *nic;
-
- if(achan==NULL) return;
-
- if(achan->ipo) {
- calc_ipo(achan->ipo, ctime);
-
- for(icu= achan->ipo->curve.first; icu; icu= icu->next) {
- /* skip IPO_BITS, is for layers and cannot be blended */
- if(icu->vartype != IPO_BITS) {
- nic= MEM_callocN(sizeof(NlaIpoChannel), "NlaIpoChannel");
- BLI_addtail(lb, nic);
- nic->val= icu->curval;
- nic->poin= get_ipo_poin(id, icu, &nic->type);
- }
- }
- }
-
- /* constraint channels only for objects */
- if(GS(id->name)==ID_OB) {
- Object *ob= (Object *)id;
- bConstraint *con;
- bConstraintChannel *conchan;
-
- for (con=ob->constraints.first; con; con=con->next) {
- conchan = get_constraint_channel(&achan->constraintChannels, con->name);
-
- if(conchan && conchan->ipo) {
- calc_ipo(conchan->ipo, ctime);
-
- icu= conchan->ipo->curve.first; // only one ipo now
- if(icu) {
- nic= MEM_callocN(sizeof(NlaIpoChannel), "NlaIpoChannel constr");
- BLI_addtail(lb, nic);
- nic->val= icu->curval;
- nic->poin= &con->enforce;
- nic->type= IPO_FLOAT;
- }
- }
- }
- }
-}
-
-static NlaIpoChannel *find_nla_ipochannel(ListBase *lb, void *poin)
-{
- NlaIpoChannel *nic;
-
- if(poin) {
- for(nic= lb->first; nic; nic= nic->next) {
- if(nic->poin==poin)
- return nic;
- }
- }
- return NULL;
-}
-
-
-static void blend_ipochannels(ListBase *dst, ListBase *src, float srcweight, int mode)
-{
- NlaIpoChannel *snic, *dnic, *next;
- float dstweight;
-
- switch (mode){
- case ACTSTRIPMODE_BLEND:
- dstweight = 1.0F - srcweight;
- break;
- case ACTSTRIPMODE_ADD:
- dstweight = 1.0F;
- break;
- default :
- dstweight = 1.0F;
- }
-
- for(snic= src->first; snic; snic= next) {
- next= snic->next;
-
- dnic= find_nla_ipochannel(dst, snic->poin);
- if(dnic==NULL) {
- /* remove from src list, and insert in dest */
- BLI_remlink(src, snic);
- BLI_addtail(dst, snic);
- }
- else {
- /* we do the blend */
- dnic->val= dstweight*dnic->val + srcweight*snic->val;
- }
- }
-}
-
-static int execute_ipochannels(ListBase *lb)
-{
- NlaIpoChannel *nic;
- int count = 0;
-
- for(nic= lb->first; nic; nic= nic->next) {
- if(nic->poin) {
- write_ipo_poin(nic->poin, nic->type, nic->val);
- count++;
- }
- }
- return count;
-}
-
-/* nla timing */
-
-/* this now only used for repeating cycles, to enable fields and blur. */
-/* the whole time control in blender needs serious thinking... */
-static float nla_time(Scene *scene, float cfra, float unit)
-{
- extern float bluroffs; // bad construct, borrowed from object.c for now
- extern float fieldoffs;
-
- /* motion blur & fields */
- cfra+= unit*(bluroffs+fieldoffs);
-
- /* global time */
- cfra*= scene->r.framelen;
-
- return cfra;
-}
-
/* added "sizecorr" here, to allow armatures to be scaled and still have striding.
Only works for uniform scaling. In general I'd advise against scaling armatures ever though! (ton)
*/
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 63092379825..2007e35b131 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -281,17 +281,27 @@ int where_on_path(Object *ob, float ctime, float *vec, float *dir, float *quat,
if (quat) {
float totfac, q1[4], q2[4];
+ /* checks for totfac are needed when 'fac' is 1.0 key_curve_position_weights can assign zero
+ * to more then one index in data which can give divide by zero error */
+/*
totfac= data[0]+data[1];
- QuatInterpol(q1, p0->quat, p1->quat, data[0] / totfac);
+ if(totfac>0.000001) QuatInterpol(q1, p0->quat, p1->quat, data[0] / totfac);
+ else QUATCOPY(q1, p1->quat);
+
NormalQuat(q1);
totfac= data[2]+data[3];
- QuatInterpol(q2, p2->quat, p3->quat, data[2] / totfac);
+ if(totfac>0.000001) QuatInterpol(q2, p2->quat, p3->quat, data[2] / totfac);
+ else QUATCOPY(q1, p3->quat);
NormalQuat(q2);
totfac = data[0]+data[1]+data[2]+data[3];
- QuatInterpol(quat, q1, q2, (data[0]+data[1]) / totfac);
+ if(totfac>0.000001) QuatInterpol(quat, q1, q2, (data[0]+data[1]) / totfac);
+ else QUATCOPY(quat, q2);
NormalQuat(quat);
+ */
+ // XXX - find some way to make quat interpolation work correctly, above code fails in rare but nasty cases.
+ QUATCOPY(quat, p1->quat);
}
if(radius)
@@ -539,7 +549,7 @@ static void vertex_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, fl
/* mballs have a different dupli handling */
if(ob->type!=OB_MBALL) ob->flag |= OB_DONE; /* doesnt render */
- if(par==scene->obedit) {
+ if(par->mode & OB_MODE_EDIT) {
dm->foreachMappedVert(dm, vertex_dupli__mapFunc, (void*) &vdd);
}
else {
@@ -747,7 +757,7 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa
else go= go->next; /* group loop */
}
- if(par==scene->obedit) {
+ if(par->mode & OB_MODE_EDIT) {
MEM_freeN(mface);
MEM_freeN(mvert);
}
@@ -763,14 +773,15 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
GroupObject *go;
Object *ob=0, **oblist=0, obcopy, *obcopylist=0;
DupliObject *dob;
+ ParticleDupliWeight *dw;
+ ParticleSimulationData sim = {scene, par, psys, psys_get_modifier(par, psys)};
ParticleSettings *part;
ParticleData *pa;
ChildParticle *cpa=0;
ParticleKey state;
ParticleCacheKey *cache;
- ParticleSystemModifierData *psmd;
float ctime, pa_time, scale = 1.0f;
- float tmat[4][4], mat[4][4], pamat[4][4], size=0.0;
+ float tmat[4][4], mat[4][4], pamat[4][4], vec[3], size=0.0;
float (*obmat)[4], (*oldobmat)[4];
int lay, a, b, counter, hair = 0;
int totpart, totchild, totgroup=0, pa_num;
@@ -781,7 +792,6 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
if(level>MAX_DUPLI_RECUR) return;
part=psys->part;
- psmd= psys_get_modifier(par, psys);
if(part==0)
return;
@@ -801,6 +811,8 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
((part->ren_as == PART_DRAW_OB && part->dup_ob) ||
(part->ren_as == PART_DRAW_GR && part->dup_group && part->dup_group->gobject.first))) {
+ psys_check_group_weights(part);
+
/* if we have a hair particle system, use the path cache */
if(part->type == PART_HAIR) {
if(psys->flag & PSYS_HAIR_DONE)
@@ -813,24 +825,43 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
totpart = psys->totcached;
}
- psys->lattice = psys_get_lattice(scene, par, psys);
+ psys->lattice = psys_get_lattice(&sim);
/* gather list of objects or single object */
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)
- totgroup++;
+ if(part->draw & PART_DRAW_COUNT_GR) {
+ for(dw=part->dupliweights.first; dw; dw=dw->next)
+ totgroup += dw->count;
+ }
+ else {
+ for(go=part->dup_group->gobject.first; go; go=go->next)
+ totgroup++;
+ }
/* we also copy the actual objects to restore afterwards, since
* where_is_object_time will change the object which breaks transform */
oblist = MEM_callocN(totgroup*sizeof(Object *), "dupgroup object list");
obcopylist = MEM_callocN(totgroup*sizeof(Object), "dupgroup copy list");
- go = part->dup_group->gobject.first;
- for(a=0; a<totgroup; a++, go=go->next) {
- oblist[a] = go->ob;
- obcopylist[a] = *go->ob;
+
+ if(part->draw & PART_DRAW_COUNT_GR && totgroup) {
+ dw = part->dupliweights.first;
+
+ for(a=0; a<totgroup; dw=dw->next) {
+ for(b=0; b<dw->count; b++, a++) {
+ oblist[a] = dw->ob;
+ obcopylist[a] = *dw->ob;
+ }
+ }
+ }
+ else {
+ go = part->dup_group->gobject.first;
+ for(a=0; a<totgroup; a++, go=go->next) {
+ oblist[a] = go->ob;
+ obcopylist[a] = *go->ob;
+ }
}
}
else {
@@ -884,11 +915,11 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
/* hair we handle separate and compute transform based on hair keys */
if(a < totpart) {
cache = psys->pathcache[a];
- psys_get_dupli_path_transform(par, psys, psmd, pa, 0, cache, pamat, &scale);
+ psys_get_dupli_path_transform(&sim, pa, 0, cache, pamat, &scale);
}
else {
cache = psys->childcache[a-totpart];
- psys_get_dupli_path_transform(par, psys, psmd, 0, cpa, cache, pamat, &scale);
+ psys_get_dupli_path_transform(&sim, 0, cpa, cache, pamat, &scale);
}
VECCOPY(pamat[3], cache->co);
@@ -898,7 +929,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
else {
/* first key */
state.time = ctime;
- if(psys_get_particle_state(scene, par, psys, a, &state, 0) == 0)
+ if(psys_get_particle_state(&sim, a, &state, 0) == 0)
continue;
QuatToMat4(state.rot, pamat);
@@ -918,17 +949,24 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
dob= new_dupli_object(lb, go->ob, mat, par->lay, counter, OB_DUPLIPARTS, animated);
Mat4CpyMat4(dob->omat, obcopylist[b].obmat);
if(G.rendering)
- psys_get_dupli_texture(par, part, psmd, pa, cpa, dob->uv, dob->orco);
+ psys_get_dupli_texture(par, part, sim.psmd, pa, cpa, dob->uv, dob->orco);
}
}
else {
/* to give ipos in object correct offset */
where_is_object_time(scene, ob, ctime-pa_time);
+
+ VECCOPY(vec, obmat[3]);
+ obmat[3][0] = obmat[3][1] = obmat[3][2] = 0.0f;
Mat4CpyMat4(mat, pamat);
Mat4MulMat4(tmat, obmat, mat);
Mat4MulFloat3((float *)tmat, size*scale);
+
+ if(part->draw & PART_DRAW_GLOBAL_OB)
+ VECADD(tmat[3], tmat[3], vec);
+
if(par_space_mat)
Mat4MulMat4(mat, tmat, par_space_mat);
else
@@ -937,7 +975,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
dob= new_dupli_object(lb, ob, mat, ob->lay, counter, OB_DUPLIPARTS, animated);
Mat4CpyMat4(dob->omat, oldobmat);
if(G.rendering)
- psys_get_dupli_texture(par, part, psmd, pa, cpa, dob->uv, dob->orco);
+ psys_get_dupli_texture(par, part, sim.psmd, pa, cpa, dob->uv, dob->orco);
}
}
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 643aa6bc779..47f5dd116d7 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -40,6 +40,7 @@
#include "BLI_dynstr.h"
#include "DNA_anim_types.h"
+#include "DNA_scene_types.h"
#include "BKE_animsys.h"
#include "BKE_action.h"
@@ -71,7 +72,7 @@ static short id_has_animdata (ID *id)
switch (GS(id->name)) {
/* has AnimData */
case ID_OB:
- case ID_MB: case ID_CU:
+ case ID_MB: case ID_CU: case ID_AR:
case ID_KE:
case ID_PA:
case ID_MA: case ID_TE: case ID_NT:
@@ -186,8 +187,6 @@ AnimData *BKE_copy_animdata (AnimData *adt)
dadt= MEM_dupallocN(adt);
/* make a copy of action - at worst, user has to delete copies... */
- // 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);
@@ -210,26 +209,113 @@ static void make_local_strips(ListBase *strips)
{
NlaStrip *strip;
- for(strip=strips->first; strip; strip=strip->next) {
- if(strip->act) make_local_action(strip->act);
- if(strip->remap && strip->remap->target) make_local_action(strip->remap->target);
-
+ for (strip=strips->first; strip; strip=strip->next) {
+ if (strip->act) make_local_action(strip->act);
+ if (strip->remap && strip->remap->target) make_local_action(strip->remap->target);
+
make_local_strips(&strip->strips);
}
}
+/* Use local copy instead of linked copy of various ID-blocks */
void BKE_animdata_make_local(AnimData *adt)
{
NlaTrack *nlt;
+
+ /* Actions - Active and Temp */
+ if (adt->action) make_local_action(adt->action);
+ if (adt->tmpact) make_local_action(adt->tmpact);
+ /* Remaps */
+ if (adt->remap && adt->remap->target) make_local_action(adt->remap->target);
+
+ /* Drivers */
+ // TODO: need to remap the ID-targets too?
+
+ /* NLA Data */
+ for (nlt=adt->nla_tracks.first; nlt; nlt=nlt->next)
+ make_local_strips(&nlt->strips);
+}
- if(adt->action) make_local_action(adt->action);
- if(adt->tmpact) make_local_action(adt->tmpact);
- if(adt->remap && adt->remap->target) make_local_action(adt->remap->target);
+/* Path Validation -------------------------------------------- */
- for(nlt=adt->nla_tracks.first; nlt; nlt=nlt->next)
- make_local_strips(&nlt->strips);
+#if 0
+/* Check if some given RNA Path needs fixing - free the given path and set a new one as appropriate */
+static char *rna_path_rename_fix (ID *owner_id, PointerRNA *modPtr, char *newName, char *oldpath)
+{
+
+
+ return oldpath; // FIXME!!!
+}
+
+/* Check RNA-Paths for a list of F-Curves */
+static void fcurves_path_rename_fix (ID *owner_id, PointerRNA *modPtr, char *newName, ListBase *curves)
+{
+ FCurve *fcu;
+
+ /* we need to check every curve... */
+ for (fcu= curves->first; fcu; fcu= fcu->next) {
+ /* firstly, handle the F-Curve's own path */
+ fcu->rna_path= rna_path_rename_fix(owner_id, modPtr, newName, fcu->rna_path);
+
+ /* driver? */
+ if (fcu->driver) {
+ ChannelDriver *driver= fcu->driver;
+ DriverTarget *dtar;
+
+ /* driver targets */
+ for (dtar= driver->targets.first; dtar; dtar=dtar->next) {
+ dtat->rna_path= rna_path_rename_fix(dtar->id, modPtr, newName, dtar->rna_path);
+ }
+ }
+ }
}
+/* Fix all RNA-Paths for Actions linked to NLA Strips */
+static void nlastrips_path_rename_fix (ID *owner_id, PointerRNA *modPtr, char *newName, ListBase *strips)
+{
+ NlaStrip *strip;
+
+ /* recursively check strips, fixing only actions... */
+ for (strip= strips->first; strip; strip= strip->next) {
+ /* fix strip's action */
+ if (strip->act)
+ fcurves_path_rename_fix(owner_id, modPtr, newName, &strip->act->curves);
+ /* ignore own F-Curves, since those are local... */
+
+ /* check sub-strips (if metas) */
+ nlastrips_path_rename_fix(owner_id, modPtr, newName, &strip->strips);
+ }
+}
+
+/* Fix all RNA-Paths in the AnimData block used by the given ID block
+ * - the pointer of interest must not have had its new name assigned already, otherwise
+ * path matching for this will never work
+ */
+void BKE_animdata_fix_paths_rename (ID *owner_id, PointerRNA *modPtr, char *newName)
+{
+ AnimData *adt= BKE_animdata_from_id(owner_id);
+ NlaTrack *nlt;
+
+ /* if no AnimData, no need to proceed */
+ if (ELEM4(NULL, owner_id, adt, modPtr, newName))
+ return;
+
+ /* Active action and temp action */
+ if (adt->action)
+ fcurves_path_rename_fix(owner_id, modPtr, newName, &adt->action->curves);
+ if (adt->tmpact)
+ fcurves_path_rename_fix(owner_id, modPtr, newName, &adt->tmpact->curves);
+
+ /* Drivers - Drivers are really F-Curves */
+ fcurves_path_rename_fix(owner_id, modPtr, newName, &adt->drivers);
+
+ /* NLA Data - Animation Data for Strips */
+ for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
+
+ }
+}
+#endif
+
/* *********************************** */
/* KeyingSet API */
@@ -1378,7 +1464,11 @@ static void animsys_evaluate_overrides (PointerRNA *ptr, AnimData *adt, float ct
*
* Unresolved things:
* - Handling of multi-user settings (i.e. time-offset, group-instancing) -> big cache grids or nodal system? but stored where?
- * - Multiple-block dependencies (i.e. drivers for settings are in both local and higher levels) -> split into separate lists?
+ * - Multiple-block dependencies (i.e. drivers for settings are in both local and higher levels) -> split into separate lists?
+ *
+ * Current Status:
+ * - Currently (as of September 2009), overrides we haven't needed to (fully) implement overrides.
+ * However, the code fo this is relatively harmless, so is left in the code for now.
*/
/* Evaluation loop for evaluation animation data
@@ -1485,7 +1575,7 @@ void BKE_animsys_evaluate_all_animation (Main *main, float ctime)
}
/* nodes */
- // TODO...
+ EVAL_ANIM_IDS(main->nodetree.first, ADT_RECALC_ANIM);
/* textures */
EVAL_ANIM_IDS(main->tex.first, ADT_RECALC_ANIM);
@@ -1517,10 +1607,16 @@ void BKE_animsys_evaluate_all_animation (Main *main, float ctime)
AnimData *adt= BKE_animdata_from_id(id);
Curve *cu= (Curve *)id;
+ /* set ctime variable for curve */
cu->ctime= ctime;
+
+ /* now execute animation data on top of this as per normal */
BKE_animsys_evaluate_animdata(id, adt, ctime, ADT_RECALC_ANIM);
}
+ /* armatures */
+ EVAL_ANIM_IDS(main->armature.first, ADT_RECALC_ANIM);
+
/* meshes */
// TODO...
@@ -1529,15 +1625,28 @@ void BKE_animsys_evaluate_all_animation (Main *main, float ctime)
/* objects */
/* ADT_RECALC_ANIM doesn't need to be supplied here, since object AnimData gets
- * this tagged by Depsgraph on framechange
+ * this tagged by Depsgraph on framechange. This optimisation means that objects
+ * linked from other (not-visible) scenes will not need their data calculated.
*/
- EVAL_ANIM_IDS(main->object.first, /*ADT_RECALC_ANIM*/0);
+ EVAL_ANIM_IDS(main->object.first, 0);
/* worlds */
EVAL_ANIM_IDS(main->world.first, ADT_RECALC_ANIM);
/* scenes */
- EVAL_ANIM_IDS(main->scene.first, ADT_RECALC_ANIM);
+ for (id= main->scene.first; id; id= id->next) {
+ AnimData *adt= BKE_animdata_from_id(id);
+ Scene *scene= (Scene *)id;
+
+ /* do compositing nodes first (since these aren't included in main tree) */
+ if (scene->nodetree) {
+ AnimData *adt2= BKE_animdata_from_id((ID *)scene->nodetree);
+ BKE_animsys_evaluate_animdata((ID *)scene->nodetree, adt2, ctime, ADT_RECALC_ANIM);
+ }
+
+ /* now execute scene animation data as per normal */
+ BKE_animsys_evaluate_animdata(id, adt, ctime, ADT_RECALC_ANIM);
+ }
}
/* ***************************************** */
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 5f74edb97d4..afc5a972a65 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -67,10 +67,9 @@
#include "BKE_object.h"
#include "BKE_object.h"
#include "BKE_utildefines.h"
+#include "BIK_api.h"
#include "BKE_sketch.h"
-#include "IK_solver.h"
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -1281,6 +1280,55 @@ void armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], float
Mat4MulMat4(delta_mat, pose_mat, imat);
}
+/* **************** Rotation Mode Conversions ****************************** */
+/* Used for Objects and Pose Channels, since both can have multiple rotation representations */
+
+/* Called from RNA when rotation mode changes
+ * - the result should be that the rotations given in the provided pointers have had conversions
+ * applied (as appropriate), such that the rotation of the element hasn't 'visually' changed
+ */
+void BKE_rotMode_change_values (float quat[4], float eul[3], float *axis, float angle[3], short oldMode, short newMode)
+{
+ /* check if any change - if so, need to convert data */
+ if (newMode > 0) { /* to euler */
+ if (oldMode == ROT_MODE_AXISANGLE) {
+ /* axis-angle to euler */
+ AxisAngleToEulO(axis, *angle, eul, newMode);
+ }
+ else if (oldMode == ROT_MODE_QUAT) {
+ /* quat to euler */
+ QuatToEulO(quat, eul, newMode);
+ }
+ /* else { no conversion needed } */
+ }
+ else if (newMode == ROT_MODE_QUAT) { /* to quat */
+ if (oldMode == ROT_MODE_AXISANGLE) {
+ /* axis angle to quat */
+ AxisAngleToQuat(quat, axis, *angle);
+ }
+ else if (oldMode > 0) {
+ /* euler to quat */
+ EulOToQuat(eul, oldMode, quat);
+ }
+ /* else { no conversion needed } */
+ }
+ else if (newMode == ROT_MODE_AXISANGLE) { /* to axis-angle */
+ if (oldMode > 0) {
+ /* euler to axis angle */
+ EulOToAxisAngle(eul, oldMode, axis, angle);
+ }
+ else if (oldMode == ROT_MODE_QUAT) {
+ /* quat to axis angle */
+ QuatToAxisAngle(quat, axis, angle);
+ }
+
+ /* when converting to axis-angle, we need a special exception for the case when there is no axis */
+ if (IS_EQ(axis[0], axis[1]) && IS_EQ(axis[1], axis[2])) {
+ /* for now, rotate around y-axis then (so that it simply becomes the roll) */
+ axis[1]= 1.0f;
+ }
+ }
+}
/* **************** The new & simple (but OK!) armature evaluation ********* */
@@ -1570,409 +1618,10 @@ void armature_rebuild_pose(Object *ob, bArmature *arm)
DAG_pose_sort(ob);
ob->pose->flag &= ~POSE_RECALC;
+ ob->pose->flag |= POSE_WAS_REBUILT;
}
-/* ********************** THE IK SOLVER ******************* */
-
-
-
-/* allocates PoseTree, and links that to root bone/channel */
-/* Note: detecting the IK chain is duplicate code... in drawarmature.c and in transform_conversions.c */
-static void initialize_posetree(struct Object *ob, bPoseChannel *pchan_tip)
-{
- bPoseChannel *curchan, *pchan_root=NULL, *chanlist[256], **oldchan;
- PoseTree *tree;
- PoseTarget *target;
- bConstraint *con;
- bKinematicConstraint *data= NULL;
- int a, segcount= 0, size, newsize, *oldparent, parent;
-
- /* find IK constraint, and validate it */
- for(con= pchan_tip->constraints.first; con; con= con->next) {
- if(con->type==CONSTRAINT_TYPE_KINEMATIC) {
- data=(bKinematicConstraint*)con->data;
- if (data->flag & CONSTRAINT_IK_AUTO) break;
- if (data->tar==NULL) continue;
- if (data->tar->type==OB_ARMATURE && data->subtarget[0]==0) continue;
- if ((con->flag & CONSTRAINT_DISABLE)==0 && (con->enforce!=0.0)) break;
- }
- }
- if(con==NULL) return;
-
- /* exclude tip from chain? */
- if(!(data->flag & CONSTRAINT_IK_TIP))
- pchan_tip= pchan_tip->parent;
-
- /* Find the chain's root & count the segments needed */
- for (curchan = pchan_tip; curchan; curchan=curchan->parent){
- pchan_root = curchan;
-
- curchan->flag |= POSE_CHAIN; // don't forget to clear this
- chanlist[segcount]=curchan;
- segcount++;
-
- if(segcount==data->rootbone || segcount>255) break; // 255 is weak
- }
- if (!segcount) return;
-
- /* setup the chain data */
-
- /* we make tree-IK, unless all existing targets are in this chain */
- for(tree= pchan_root->iktree.first; tree; tree= tree->next) {
- for(target= tree->targets.first; target; target= target->next) {
- curchan= tree->pchan[target->tip];
- if(curchan->flag & POSE_CHAIN)
- curchan->flag &= ~POSE_CHAIN;
- else
- break;
- }
- if(target) break;
- }
-
- /* create a target */
- target= MEM_callocN(sizeof(PoseTarget), "posetarget");
- target->con= con;
- pchan_tip->flag &= ~POSE_CHAIN;
-
- if(tree==NULL) {
- /* make new tree */
- tree= MEM_callocN(sizeof(PoseTree), "posetree");
-
- tree->iterations= data->iterations;
- tree->totchannel= segcount;
- tree->stretch = (data->flag & CONSTRAINT_IK_STRETCH);
-
- tree->pchan= MEM_callocN(segcount*sizeof(void*), "ik tree pchan");
- tree->parent= MEM_callocN(segcount*sizeof(int), "ik tree parent");
- for(a=0; a<segcount; a++) {
- tree->pchan[a]= chanlist[segcount-a-1];
- tree->parent[a]= a-1;
- }
- target->tip= segcount-1;
-
- /* AND! link the tree to the root */
- BLI_addtail(&pchan_root->iktree, tree);
- }
- else {
- tree->iterations= MAX2(data->iterations, tree->iterations);
- tree->stretch= tree->stretch && !(data->flag & CONSTRAINT_IK_STRETCH);
-
- /* skip common pose channels and add remaining*/
- size= MIN2(segcount, tree->totchannel);
- for(a=0; a<size && tree->pchan[a]==chanlist[segcount-a-1]; a++);
- parent= a-1;
-
- segcount= segcount-a;
- target->tip= tree->totchannel + segcount - 1;
-
- if (segcount > 0) {
- /* resize array */
- newsize= tree->totchannel + segcount;
- oldchan= tree->pchan;
- oldparent= tree->parent;
-
- tree->pchan= MEM_callocN(newsize*sizeof(void*), "ik tree pchan");
- tree->parent= MEM_callocN(newsize*sizeof(int), "ik tree parent");
- memcpy(tree->pchan, oldchan, sizeof(void*)*tree->totchannel);
- memcpy(tree->parent, oldparent, sizeof(int)*tree->totchannel);
- MEM_freeN(oldchan);
- MEM_freeN(oldparent);
-
- /* add new pose channels at the end, in reverse order */
- for(a=0; a<segcount; a++) {
- tree->pchan[tree->totchannel+a]= chanlist[segcount-a-1];
- tree->parent[tree->totchannel+a]= tree->totchannel+a-1;
- }
- tree->parent[tree->totchannel]= parent;
-
- tree->totchannel= newsize;
- }
-
- /* move tree to end of list, for correct evaluation order */
- BLI_remlink(&pchan_root->iktree, tree);
- BLI_addtail(&pchan_root->iktree, tree);
- }
-
- /* add target to the tree */
- BLI_addtail(&tree->targets, target);
-}
-
-/* called from within the core where_is_pose loop, all animsystems and constraints
-were executed & assigned. Now as last we do an IK pass */
-static void execute_posetree(Object *ob, PoseTree *tree)
-{
- float R_parmat[3][3], identity[3][3];
- float iR_parmat[3][3];
- float R_bonemat[3][3];
- float goalrot[3][3], goalpos[3];
- float rootmat[4][4], imat[4][4];
- float goal[4][4], goalinv[4][4];
- float irest_basis[3][3], full_basis[3][3];
- float end_pose[4][4], world_pose[4][4];
- float length, basis[3][3], rest_basis[3][3], start[3], *ikstretch=NULL;
- float resultinf=0.0f;
- int a, flag, hasstretch=0, resultblend=0;
- bPoseChannel *pchan;
- IK_Segment *seg, *parent, **iktree, *iktarget;
- IK_Solver *solver;
- PoseTarget *target;
- bKinematicConstraint *data, *poleangledata=NULL;
- Bone *bone;
-
- if (tree->totchannel == 0)
- return;
-
- iktree= MEM_mallocN(sizeof(void*)*tree->totchannel, "ik tree");
-
- for(a=0; a<tree->totchannel; a++) {
- pchan= tree->pchan[a];
- bone= pchan->bone;
-
- /* set DoF flag */
- flag= 0;
- if(!(pchan->ikflag & BONE_IK_NO_XDOF) && !(pchan->ikflag & BONE_IK_NO_XDOF_TEMP))
- flag |= IK_XDOF;
- if(!(pchan->ikflag & BONE_IK_NO_YDOF) && !(pchan->ikflag & BONE_IK_NO_YDOF_TEMP))
- flag |= IK_YDOF;
- if(!(pchan->ikflag & BONE_IK_NO_ZDOF) && !(pchan->ikflag & BONE_IK_NO_ZDOF_TEMP))
- flag |= IK_ZDOF;
-
- if(tree->stretch && (pchan->ikstretch > 0.0)) {
- flag |= IK_TRANS_YDOF;
- hasstretch = 1;
- }
-
- seg= iktree[a]= IK_CreateSegment(flag);
-
- /* find parent */
- if(a == 0)
- parent= NULL;
- else
- parent= iktree[tree->parent[a]];
-
- IK_SetParent(seg, parent);
-
- /* get the matrix that transforms from prevbone into this bone */
- Mat3CpyMat4(R_bonemat, pchan->pose_mat);
-
- /* gather transformations for this IK segment */
-
- if (pchan->parent)
- Mat3CpyMat4(R_parmat, pchan->parent->pose_mat);
- else
- Mat3One(R_parmat);
-
- /* bone offset */
- if (pchan->parent && (a > 0))
- VecSubf(start, pchan->pose_head, pchan->parent->pose_tail);
- else
- /* only root bone (a = 0) has no parent */
- start[0]= start[1]= start[2]= 0.0f;
-
- /* change length based on bone size */
- length= bone->length*VecLength(R_bonemat[1]);
-
- /* compute rest basis and its inverse */
- Mat3CpyMat3(rest_basis, bone->bone_mat);
- Mat3CpyMat3(irest_basis, bone->bone_mat);
- Mat3Transp(irest_basis);
-
- /* compute basis with rest_basis removed */
- Mat3Inv(iR_parmat, R_parmat);
- Mat3MulMat3(full_basis, iR_parmat, R_bonemat);
- Mat3MulMat3(basis, irest_basis, full_basis);
-
- /* basis must be pure rotation */
- Mat3Ortho(basis);
-
- /* transform offset into local bone space */
- Mat3Ortho(iR_parmat);
- Mat3MulVecfl(iR_parmat, start);
-
- IK_SetTransform(seg, start, rest_basis, basis, length);
-
- if (pchan->ikflag & BONE_IK_XLIMIT)
- IK_SetLimit(seg, IK_X, pchan->limitmin[0], pchan->limitmax[0]);
- if (pchan->ikflag & BONE_IK_YLIMIT)
- IK_SetLimit(seg, IK_Y, pchan->limitmin[1], pchan->limitmax[1]);
- if (pchan->ikflag & BONE_IK_ZLIMIT)
- IK_SetLimit(seg, IK_Z, pchan->limitmin[2], pchan->limitmax[2]);
-
- IK_SetStiffness(seg, IK_X, pchan->stiffness[0]);
- IK_SetStiffness(seg, IK_Y, pchan->stiffness[1]);
- IK_SetStiffness(seg, IK_Z, pchan->stiffness[2]);
-
- if(tree->stretch && (pchan->ikstretch > 0.0f)) {
- float ikstretch = pchan->ikstretch*pchan->ikstretch;
- IK_SetStiffness(seg, IK_TRANS_Y, MIN2(1.0f-ikstretch, 0.99f));
- IK_SetLimit(seg, IK_TRANS_Y, 0.001f, 1e10);
- }
- }
-
- solver= IK_CreateSolver(iktree[0]);
-
- /* set solver goals */
-
- /* first set the goal inverse transform, assuming the root of tree was done ok! */
- pchan= tree->pchan[0];
- if (pchan->parent)
- /* transform goal by parent mat, so this rotation is not part of the
- segment's basis. otherwise rotation limits do not work on the
- local transform of the segment itself. */
- Mat4CpyMat4(rootmat, pchan->parent->pose_mat);
- else
- Mat4One(rootmat);
- VECCOPY(rootmat[3], pchan->pose_head);
-
- Mat4MulMat4 (imat, rootmat, ob->obmat);
- Mat4Invert (goalinv, imat);
-
- for (target=tree->targets.first; target; target=target->next) {
- float polepos[3];
- int poleconstrain= 0;
-
- data= (bKinematicConstraint*)target->con->data;
-
- /* 1.0=ctime, we pass on object for auto-ik (owner-type here is object, even though
- * strictly speaking, it is a posechannel)
- */
- get_constraint_target_matrix(target->con, 0, CONSTRAINT_OBTYPE_OBJECT, ob, rootmat, 1.0);
-
- /* and set and transform goal */
- Mat4MulMat4(goal, rootmat, goalinv);
-
- VECCOPY(goalpos, goal[3]);
- Mat3CpyMat4(goalrot, goal);
-
- /* same for pole vector target */
- if(data->poletar) {
- get_constraint_target_matrix(target->con, 1, CONSTRAINT_OBTYPE_OBJECT, ob, rootmat, 1.0);
-
- if(data->flag & CONSTRAINT_IK_SETANGLE) {
- /* don't solve IK when we are setting the pole angle */
- break;
- }
- else {
- Mat4MulMat4(goal, rootmat, goalinv);
- VECCOPY(polepos, goal[3]);
- poleconstrain= 1;
-
- /* for pole targets, we blend the result of the ik solver
- * instead of the target position, otherwise we can't get
- * a smooth transition */
- resultblend= 1;
- resultinf= target->con->enforce;
-
- if(data->flag & CONSTRAINT_IK_GETANGLE) {
- poleangledata= data;
- data->flag &= ~CONSTRAINT_IK_GETANGLE;
- }
- }
- }
-
- /* do we need blending? */
- if (!resultblend && target->con->enforce!=1.0f) {
- float q1[4], q2[4], q[4];
- float fac= target->con->enforce;
- float mfac= 1.0f-fac;
-
- pchan= tree->pchan[target->tip];
-
- /* end effector in world space */
- Mat4CpyMat4(end_pose, pchan->pose_mat);
- VECCOPY(end_pose[3], pchan->pose_tail);
- Mat4MulSerie(world_pose, goalinv, ob->obmat, end_pose, 0, 0, 0, 0, 0);
-
- /* blend position */
- goalpos[0]= fac*goalpos[0] + mfac*world_pose[3][0];
- goalpos[1]= fac*goalpos[1] + mfac*world_pose[3][1];
- goalpos[2]= fac*goalpos[2] + mfac*world_pose[3][2];
-
- /* blend rotation */
- Mat3ToQuat(goalrot, q1);
- Mat4ToQuat(world_pose, q2);
- QuatInterpol(q, q1, q2, mfac);
- QuatToMat3(q, goalrot);
- }
-
- iktarget= iktree[target->tip];
-
- if(data->weight != 0.0f) {
- if(poleconstrain)
- IK_SolverSetPoleVectorConstraint(solver, iktarget, goalpos,
- polepos, data->poleangle*(float)M_PI/180.0f, (poleangledata == data));
- IK_SolverAddGoal(solver, iktarget, goalpos, data->weight);
- }
- if((data->flag & CONSTRAINT_IK_ROT) && (data->orientweight != 0.0f))
- if((data->flag & CONSTRAINT_IK_AUTO)==0)
- IK_SolverAddGoalOrientation(solver, iktarget, goalrot,
- data->orientweight);
- }
-
- /* solve */
- IK_Solve(solver, 0.0f, tree->iterations);
-
- if(poleangledata)
- poleangledata->poleangle= IK_SolverGetPoleAngle(solver)*180.0f/(float)M_PI;
-
- IK_FreeSolver(solver);
-
- /* gather basis changes */
- tree->basis_change= MEM_mallocN(sizeof(float[3][3])*tree->totchannel, "ik basis change");
- if(hasstretch)
- ikstretch= MEM_mallocN(sizeof(float)*tree->totchannel, "ik stretch");
-
- for(a=0; a<tree->totchannel; a++) {
- IK_GetBasisChange(iktree[a], tree->basis_change[a]);
-
- if(hasstretch) {
- /* have to compensate for scaling received from parent */
- float parentstretch, stretch;
-
- pchan= tree->pchan[a];
- parentstretch= (tree->parent[a] >= 0)? ikstretch[tree->parent[a]]: 1.0f;
-
- if(tree->stretch && (pchan->ikstretch > 0.0f)) {
- float trans[3], length;
-
- IK_GetTranslationChange(iktree[a], trans);
- length= pchan->bone->length*VecLength(pchan->pose_mat[1]);
-
- ikstretch[a]= (length == 0.0f)? 1.0f: (trans[1]+length)/length;
- }
- else
- ikstretch[a] = 1.0f;
-
- stretch= (parentstretch == 0.0f)? 1.0f: ikstretch[a]/parentstretch;
-
- VecMulf(tree->basis_change[a][0], stretch);
- VecMulf(tree->basis_change[a][1], stretch);
- VecMulf(tree->basis_change[a][2], stretch);
- }
-
- if(resultblend && resultinf!=1.0f) {
- Mat3One(identity);
- Mat3BlendMat3(tree->basis_change[a], identity,
- tree->basis_change[a], resultinf);
- }
-
- IK_FreeSegment(iktree[a]);
- }
-
- MEM_freeN(iktree);
- if(ikstretch) MEM_freeN(ikstretch);
-}
-
-void free_posetree(PoseTree *tree)
-{
- BLI_freelistN(&tree->targets);
- if(tree->pchan) MEM_freeN(tree->pchan);
- if(tree->parent) MEM_freeN(tree->parent);
- if(tree->basis_change) MEM_freeN(tree->basis_change);
- MEM_freeN(tree);
-}
-
/* ********************** THE POSE SOLVER ******************* */
@@ -1992,9 +1641,9 @@ void chan_calc_mat(bPoseChannel *chan)
/* euler rotations (will cause gimble lock, but this can be alleviated a bit with rotation orders) */
EulOToMat3(chan->eul, chan->rotmode, rmat);
}
- else if (chan->rotmode == PCHAN_ROT_AXISANGLE) {
- /* axis-angle - stored in quaternion data, but not really that great for 3D-changing orientations */
- AxisAngleToMat3(&chan->quat[1], chan->quat[0], rmat);
+ else if (chan->rotmode == ROT_MODE_AXISANGLE) {
+ /* axis-angle - not really that great for 3D-changing orientations */
+ AxisAngleToMat3(chan->rotAxis, chan->rotAngle, rmat);
}
else {
/* quats are normalised before use to eliminate scaling issues */
@@ -2013,41 +1662,6 @@ void chan_calc_mat(bPoseChannel *chan)
}
}
-/* transform from bone(b) to bone(b+1), store in chan_mat */
-static void make_dmats(bPoseChannel *pchan)
-{
- if (pchan->parent) {
- float iR_parmat[4][4];
- Mat4Invert(iR_parmat, pchan->parent->pose_mat);
- Mat4MulMat4(pchan->chan_mat, pchan->pose_mat, iR_parmat); // delta mat
- }
- else Mat4CpyMat4(pchan->chan_mat, pchan->pose_mat);
-}
-
-/* applies IK matrix to pchan, IK is done separated */
-/* formula: pose_mat(b) = pose_mat(b-1) * diffmat(b-1, b) * ik_mat(b) */
-/* to make this work, the diffmats have to be precalculated! Stored in chan_mat */
-static void where_is_ik_bone(bPoseChannel *pchan, float ik_mat[][3]) // nr = to detect if this is first bone
-{
- float vec[3], ikmat[4][4];
-
- Mat4CpyMat3(ikmat, ik_mat);
-
- if (pchan->parent)
- Mat4MulSerie(pchan->pose_mat, pchan->parent->pose_mat, pchan->chan_mat, ikmat, NULL, NULL, NULL, NULL, NULL);
- else
- Mat4MulMat4(pchan->pose_mat, ikmat, pchan->chan_mat);
-
- /* calculate head */
- VECCOPY(pchan->pose_head, pchan->pose_mat[3]);
- /* calculate tail */
- VECCOPY(vec, pchan->pose_mat[1]);
- VecMulf(vec, pchan->bone->length);
- VecAddf(pchan->pose_tail, pchan->pose_head, vec);
-
- pchan->flag |= POSE_DONE;
-}
-
/* NLA strip modifiers */
static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseChannel *pchan)
{
@@ -2173,7 +1787,7 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha
/* The main armature solver, does all constraints excluding IK */
/* pchan is validated, as having bone and parent pointer */
-static void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float ctime)
+void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float ctime)
{
Bone *bone, *parbone;
bPoseChannel *parchan;
@@ -2313,48 +1927,27 @@ void where_is_pose (Scene *scene, Object *ob)
else {
Mat4Invert(ob->imat, ob->obmat); // imat is needed
- /* 1. construct the PoseTrees, clear flags */
+ /* 1. clear flags */
for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- pchan->flag &= ~(POSE_DONE|POSE_CHAIN);
- if(pchan->constflag & PCHAN_HAS_IK) // flag is set on editing constraints
- initialize_posetree(ob, pchan); // will attach it to root!
+ pchan->flag &= ~(POSE_DONE|POSE_CHAIN|POSE_IKTREE);
}
-
- /* 2. the main loop, channels are already hierarchical sorted from root to children */
+ /* 2. construct the IK tree */
+ BIK_initialize_tree(scene, ob, ctime);
+
+ /* 3. the main loop, channels are already hierarchical sorted from root to children */
for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- /* 3. if we find an IK root, we handle it separated */
- if(pchan->iktree.first) {
- while(pchan->iktree.first) {
- PoseTree *tree= pchan->iktree.first;
- int a;
-
- /* 4. walk over the tree for regular solving */
- for(a=0; a<tree->totchannel; a++) {
- if(!(tree->pchan[a]->flag & POSE_DONE)) // successive trees can set the flag
- where_is_pose_bone(scene, ob, tree->pchan[a], ctime);
- }
- /* 5. execute the IK solver */
- execute_posetree(ob, tree);
-
- /* 6. apply the differences to the channels,
- we need to calculate the original differences first */
- for(a=0; a<tree->totchannel; a++)
- make_dmats(tree->pchan[a]);
-
- for(a=0; a<tree->totchannel; a++)
- /* sets POSE_DONE */
- where_is_ik_bone(tree->pchan[a], tree->basis_change[a]);
-
- /* 7. and free */
- BLI_remlink(&pchan->iktree, tree);
- free_posetree(tree);
- }
+ /* 4. if we find an IK root, we handle it separated */
+ if(pchan->flag & POSE_IKTREE) {
+ BIK_execute_tree(scene, ob, pchan, ctime);
}
+ /* 5. otherwise just call the normal solver */
else if(!(pchan->flag & POSE_DONE)) {
where_is_pose_bone(scene, ob, pchan, ctime);
}
}
+ /* 6. release the IK tree */
+ BIK_release_tree(scene, ob, ctime);
}
/* calculating deform matrices */
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index b443114344e..9c1b93f2bf8 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -74,6 +74,7 @@
#include "BKE_displist.h"
#include "BKE_font.h"
#include "BKE_global.h"
+#include "BKE_idprop.h"
#include "BKE_library.h"
#include "BKE_ipo.h"
#include "BKE_main.h"
@@ -406,10 +407,26 @@ static int handle_subversion_warning(Main *main)
void BKE_userdef_free(void)
{
+ wmKeyMap *km;
+ wmKeyMapItem *kmi;
+
+ for(km=U.keymaps.first; km; km=km->next) {
+ for(kmi=km->items.first; kmi; kmi=kmi->next) {
+ if(kmi->properties) {
+ IDP_FreeProperty(kmi->properties);
+ MEM_freeN(kmi->properties);
+ }
+ if(kmi->ptr)
+ MEM_freeN(kmi->ptr);
+ }
+
+ BLI_freelistN(&km->items);
+ }
BLI_freelistN(&U.uistyles);
BLI_freelistN(&U.uifonts);
BLI_freelistN(&U.themes);
+ BLI_freelistN(&U.keymaps);
}
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index 18f065b59d9..712fb13cfc0 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -47,6 +47,7 @@
#include "BLI_blenlib.h"
#include "BLI_kdtree.h"
#include "BLI_kdopbvh.h"
+#include "BKE_collision.h"
#include "BKE_effect.h"
#include "BKE_boids.h"
#include "BKE_particle.h"
@@ -72,112 +73,89 @@ static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val,
{
BoidRuleGoalAvoid *gabr = (BoidRuleGoalAvoid*) rule;
BoidSettings *boids = bbd->part->boids;
- ParticleEffectorCache *ec;
- Object *priority_ob = NULL;
BoidParticle *bpa = pa->boid;
- float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f};
+ EffectedPoint epoint;
+ ListBase *effectors = bbd->sim->psys->effectors;
+ EffectorCache *cur, *eff = NULL;
+ EffectorData efd, cur_efd;
float mul = (rule->type == eBoidRuleType_Avoid ? 1.0 : -1.0);
float priority = 0.0f, len = 0.0f;
int ret = 0;
- /* first find out goal/predator with highest priority */
- /* if rule->ob specified use it */
- if(gabr->ob && (rule->type != eBoidRuleType_Goal || gabr->ob != bpa->ground)) {
- PartDeflect *pd = gabr->ob->pd;
- float vec_to_part[3];
-
- if(pd && pd->forcefield == PFIELD_BOID) {
- effector_find_co(bbd->scene, pa->prev_state.co, NULL, gabr->ob, pd, loc, vec, NULL, NULL);
-
- VecSubf(vec_to_part, pa->prev_state.co, loc);
-
- priority = mul * pd->f_strength * effector_falloff(pd, vec, vec_to_part);
- }
- else
- priority = 1.0;
-
- priority = 1.0;
- priority_ob = gabr->ob;
- }
- else for(ec=bbd->psys->effectors.first; ec; ec=ec->next) {
- if(ec->type & PSYS_EC_EFFECTOR) {
- Object *eob = ec->ob;
- PartDeflect *pd = eob->pd;
-
- /* skip current object */
- if(rule->type == eBoidRuleType_Goal && eob == bpa->ground)
- continue;
-
- if(pd->forcefield == PFIELD_BOID && mul * pd->f_strength > 0.0f) {
- float vec_to_part[3], temp;
-
- effector_find_co(bbd->scene, pa->prev_state.co, NULL, eob, pd, loc, vec, NULL, NULL);
-
- VecSubf(vec_to_part, pa->prev_state.co, loc);
+ pd_point_from_particle(bbd->sim, pa, &pa->state, &epoint);
- temp = mul * pd->f_strength * effector_falloff(pd, vec, vec_to_part);
-
- if(temp == 0.0f)
- ; /* do nothing */
- else if(temp > priority) {
- priority = temp;
- priority_ob = eob;
- len = VecLength(vec_to_part);
- }
- /* choose closest object with same priority */
- else if(temp == priority) {
- float len2 = VecLength(vec_to_part);
-
- if(len2 < len) {
- priority_ob = eob;
- len = len2;
- }
+ /* first find out goal/predator with highest priority */
+ if(effectors) for(cur = effectors->first; cur; cur=cur->next) {
+ Object *eob = cur->ob;
+ PartDeflect *pd = cur->pd;
+
+ if(gabr->ob && (rule->type != eBoidRuleType_Goal || gabr->ob != bpa->ground)) {
+ if(gabr->ob == eob) {
+ /* TODO: objects without any effector and effectors with multiple points */
+ if(get_effector_data(cur, &efd, &epoint, 0)) {
+ if(cur->pd && cur->pd->forcefield == PFIELD_BOID)
+ priority = mul * pd->f_strength * effector_falloff(cur, &efd, &epoint, bbd->part->effector_weights);
+ else
+ priority = 1.0;
+
+ eff = cur;
}
+ break;
+ }
+ }
+ else if(rule->type == eBoidRuleType_Goal && eob == bpa->ground)
+ ; /* skip current object */
+ else if(pd->forcefield == PFIELD_BOID && mul * pd->f_strength > 0.0f && get_effector_data(eff, &efd, &epoint, 0)) {
+ float temp = mul * pd->f_strength * effector_falloff(cur, &cur_efd, &epoint, bbd->part->effector_weights);
+
+ if(temp == 0.0f)
+ ; /* do nothing */
+ else if(temp > priority) {
+ priority = temp;
+ eff = cur;
+ efd = cur_efd;
+ len = efd.distance;
+ }
+ /* choose closest object with same priority */
+ else if(temp == priority && efd.distance < len) {
+ eff = cur;
+ efd = cur_efd;
+ len = efd.distance;
}
}
}
/* then use that effector */
if(priority > (rule->type==eBoidRuleType_Avoid ? gabr->fear_factor : 0.0f)) { /* with avoid, factor is "fear factor" */
- Object *eob = priority_ob;
+ Object *eob = eff->ob;
PartDeflect *pd = eob->pd;
- float vec_to_part[3];
- float surface = 0.0f;
- float nor[3];
+ float surface = pd->shape == PFIELD_SHAPE_SURFACE ? 1.0f : 0.0f;
if(gabr->options & BRULE_GOAL_AVOID_PREDICT) {
/* estimate future location of target */
- surface = (float)effector_find_co(bbd->scene, pa->prev_state.co, NULL, eob, pd, loc, nor, vec, NULL);
-
- VecSubf(vec_to_part, pa->prev_state.co, loc);
- len = Normalize(vec_to_part);
+ get_effector_data(eff, &efd, &epoint, 1);
- VecMulf(vec, len / (val->max_speed * bbd->timestep));
- VecAddf(loc, loc, vec);
- VecSubf(vec_to_part, pa->prev_state.co, loc);
- }
- else {
- surface = (float)effector_find_co(bbd->scene, pa->prev_state.co, NULL, eob, pd, loc, nor, NULL, NULL);
-
- VecSubf(vec_to_part, pa->prev_state.co, loc);
- len = VecLength(vec_to_part);
+ VecMulf(efd.vel, efd.distance / (val->max_speed * bbd->timestep));
+ VecAddf(efd.loc, efd.loc, efd.vel);
+ VecSubf(efd.vec_to_point, pa->prev_state.co, efd.loc);
+ efd.distance = VecLength(efd.vec_to_point);
}
if(rule->type == eBoidRuleType_Goal && boids->options & BOID_ALLOW_CLIMB && surface!=0.0f) {
if(!bbd->goal_ob || bbd->goal_priority < priority) {
bbd->goal_ob = eob;
- VECCOPY(bbd->goal_co, loc);
- VECCOPY(bbd->goal_nor, nor);
+ VECCOPY(bbd->goal_co, efd.loc);
+ VECCOPY(bbd->goal_nor, efd.nor);
}
}
else if(rule->type == eBoidRuleType_Avoid && bpa->data.mode == eBoidMode_Climbing &&
priority > 2.0f * gabr->fear_factor) {
/* detach from surface and try to fly away from danger */
- VECCOPY(vec_to_part, bpa->gravity);
- VecMulf(vec_to_part, -1.0f);
+ VECCOPY(efd.vec_to_point, bpa->gravity);
+ VecMulf(efd.vec_to_point, -1.0f);
}
- VECCOPY(bbd->wanted_co, vec_to_part);
+ VECCOPY(bbd->wanted_co, efd.vec_to_point);
VecMulf(bbd->wanted_co, mul);
bbd->wanted_speed = val->max_speed * priority;
@@ -188,8 +166,8 @@ static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val,
surface *= pa->size * boids->height;
- if(len2 > 0.0f && len - surface < len2) {
- len2 = (len - surface)/len2;
+ if(len2 > 0.0f && efd.distance - surface < len2) {
+ len2 = (efd.distance - surface)/len2;
bbd->wanted_speed *= pow(len2, boids->landing_smoothness);
}
}
@@ -204,9 +182,9 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
{
BoidRuleAvoidCollision *acbr = (BoidRuleAvoidCollision*) rule;
KDTreeNearest *ptn = NULL;
- ParticleEffectorCache *ec;
ParticleTarget *pt;
BoidParticle *bpa = pa->boid;
+ ColliderCache *coll;
float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f};
float co1[3], vel1[3], co2[3], vel2[3];
float len, t, inp, t_min = 2.0f;
@@ -214,7 +192,7 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
int ret = 0;
//check deflector objects first
- if(acbr->options & BRULE_ACOLL_WITH_DEFLECTORS) {
+ if(acbr->options & BRULE_ACOLL_WITH_DEFLECTORS && bbd->sim->colliders) {
ParticleCollision col;
BVHTreeRayHit hit;
float radius = val->personal_space * pa->size, ray_dir[3];
@@ -228,20 +206,16 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
hit.dist = col.ray_len = VecLength(ray_dir);
/* find out closest deflector object */
- for(ec=bbd->psys->effectors.first; ec; ec=ec->next) {
- if(ec->type & PSYS_EC_DEFLECT) {
- Object *eob = ec->ob;
-
- /* don't check with current ground object */
- if(eob == bpa->ground)
- continue;
+ for(coll = bbd->sim->colliders->first; coll; coll=coll->next) {
+ /* don't check with current ground object */
+ if(coll->ob == bpa->ground)
+ continue;
- col.md = ( CollisionModifierData * ) ( modifiers_findByType ( eob, eModifierType_Collision ) );
- col.ob_t = eob;
+ col.ob = coll->ob;
+ col.md = coll->collmd;
- if(col.md && col.md->bvhtree)
- BLI_bvhtree_ray_cast(col.md->bvhtree, col.co1, ray_dir, radius, &hit, particle_intersect_face, &col);
- }
+ if(col.md && col.md->bvhtree)
+ BLI_bvhtree_ray_cast(col.md->bvhtree, col.co1, ray_dir, radius, &hit, particle_intersect_face, &col);
}
/* then avoid that object */
if(hit.index>=0) {
@@ -261,12 +235,12 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
//check boids in own system
if(acbr->options & BRULE_ACOLL_WITH_BOIDS)
{
- neighbors = BLI_kdtree_range_search(bbd->psys->tree, acbr->look_ahead * VecLength(pa->prev_state.vel), pa->prev_state.co, pa->prev_state.ave, &ptn);
+ neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, acbr->look_ahead * VecLength(pa->prev_state.vel), pa->prev_state.co, pa->prev_state.ave, &ptn);
if(neighbors > 1) for(n=1; n<neighbors; n++) {
VECCOPY(co1, pa->prev_state.co);
VECCOPY(vel1, pa->prev_state.vel);
- VECCOPY(co2, (bbd->psys->particles + ptn[n].index)->prev_state.co);
- VECCOPY(vel2, (bbd->psys->particles + ptn[n].index)->prev_state.vel);
+ VECCOPY(co2, (bbd->sim->psys->particles + ptn[n].index)->prev_state.co);
+ VECCOPY(vel2, (bbd->sim->psys->particles + ptn[n].index)->prev_state.vel);
VecSubf(loc, co1, co2);
@@ -303,8 +277,8 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
if(ptn){ MEM_freeN(ptn); ptn=NULL; }
/* check boids in other systems */
- for(pt=bbd->psys->targets.first; pt; pt=pt->next) {
- ParticleSystem *epsys = psys_get_target_system(bbd->ob, pt);
+ for(pt=bbd->sim->psys->targets.first; pt; pt=pt->next) {
+ ParticleSystem *epsys = psys_get_target_system(bbd->sim->ob, pt);
if(epsys) {
neighbors = BLI_kdtree_range_search(epsys->tree, acbr->look_ahead * VecLength(pa->prev_state.vel), pa->prev_state.co, pa->prev_state.ave, &ptn);
@@ -362,11 +336,11 @@ static int rule_separate(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Pa
ParticleTarget *pt;
float len = 2.0f * val->personal_space * pa->size + 1.0f;
float vec[3] = {0.0f, 0.0f, 0.0f};
- int neighbors = BLI_kdtree_range_search(bbd->psys->tree, 2.0f * val->personal_space * pa->size, pa->prev_state.co, NULL, &ptn);
+ int neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, 2.0f * val->personal_space * pa->size, pa->prev_state.co, NULL, &ptn);
int ret = 0;
if(neighbors > 1 && ptn[1].dist!=0.0f) {
- VecSubf(vec, pa->prev_state.co, bbd->psys->particles[ptn[1].index].state.co);
+ VecSubf(vec, pa->prev_state.co, bbd->sim->psys->particles[ptn[1].index].state.co);
VecMulf(vec, (2.0f * val->personal_space * pa->size - ptn[1].dist) / ptn[1].dist);
VecAddf(bbd->wanted_co, bbd->wanted_co, vec);
bbd->wanted_speed = val->max_speed;
@@ -376,8 +350,8 @@ static int rule_separate(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Pa
if(ptn){ MEM_freeN(ptn); ptn=NULL; }
/* check other boid systems */
- for(pt=bbd->psys->targets.first; pt; pt=pt->next) {
- ParticleSystem *epsys = psys_get_target_system(bbd->ob, pt);
+ for(pt=bbd->sim->psys->targets.first; pt; pt=pt->next) {
+ ParticleSystem *epsys = psys_get_target_system(bbd->sim->ob, pt);
if(epsys) {
neighbors = BLI_kdtree_range_search(epsys->tree, 2.0f * val->personal_space * pa->size, pa->prev_state.co, NULL, &ptn);
@@ -400,14 +374,14 @@ static int rule_flock(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
{
KDTreeNearest ptn[11];
float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f};
- int neighbors = BLI_kdtree_find_n_nearest(bbd->psys->tree, 11, pa->state.co, pa->prev_state.ave, ptn);
+ int neighbors = BLI_kdtree_find_n_nearest(bbd->sim->psys->tree, 11, pa->state.co, pa->prev_state.ave, ptn);
int n;
int ret = 0;
if(neighbors > 1) {
for(n=1; n<neighbors; n++) {
- VecAddf(loc, loc, bbd->psys->particles[ptn[n].index].prev_state.co);
- VecAddf(vec, vec, bbd->psys->particles[ptn[n].index].prev_state.vel);
+ VecAddf(loc, loc, bbd->sim->psys->particles[ptn[n].index].prev_state.co);
+ VecAddf(vec, vec, bbd->sim->psys->particles[ptn[n].index].prev_state.vel);
}
VecMulf(loc, 1.0f/((float)neighbors - 1.0f));
@@ -429,8 +403,8 @@ static int rule_follow_leader(BoidRule *rule, BoidBrainData *bbd, BoidValues *va
BoidRuleFollowLeader *flbr = (BoidRuleFollowLeader*) rule;
float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f};
float mul, len;
- int n = (flbr->queue_size <= 1) ? bbd->psys->totpart : flbr->queue_size;
- int i, ret = 0, p = pa - bbd->psys->particles;
+ int n = (flbr->queue_size <= 1) ? bbd->sim->psys->totpart : flbr->queue_size;
+ int i, ret = 0, p = pa - bbd->sim->psys->particles;
if(flbr->ob) {
float vec2[3], t;
@@ -475,8 +449,8 @@ static int rule_follow_leader(BoidRule *rule, BoidBrainData *bbd, BoidValues *va
/* not blocking so try to follow leader */
if(p && flbr->options & BRULE_LEADER_IN_LINE) {
- VECCOPY(vec, bbd->psys->particles[p-1].prev_state.vel);
- VECCOPY(loc, bbd->psys->particles[p-1].prev_state.co);
+ VECCOPY(vec, bbd->sim->psys->particles[p-1].prev_state.vel);
+ VECCOPY(loc, bbd->sim->psys->particles[p-1].prev_state.co);
}
else {
VECCOPY(loc, flbr->oloc);
@@ -496,10 +470,10 @@ static int rule_follow_leader(BoidRule *rule, BoidBrainData *bbd, BoidValues *va
float vec2[3], t, t_min = 3.0f;
/* first check we're not blocking any leaders */
- for(i = 0; i< bbd->psys->totpart; i+=n){
- VECCOPY(vec, bbd->psys->particles[i].prev_state.vel);
+ for(i = 0; i< bbd->sim->psys->totpart; i+=n){
+ VECCOPY(vec, bbd->sim->psys->particles[i].prev_state.vel);
- VecSubf(loc, pa->prev_state.co, bbd->psys->particles[i].prev_state.co);
+ VecSubf(loc, pa->prev_state.co, bbd->sim->psys->particles[i].prev_state.co);
mul = Inpf(vec, vec);
@@ -539,12 +513,12 @@ static int rule_follow_leader(BoidRule *rule, BoidBrainData *bbd, BoidValues *va
/* not blocking so try to follow leader */
if(flbr->options & BRULE_LEADER_IN_LINE) {
- VECCOPY(vec, bbd->psys->particles[p-1].prev_state.vel);
- VECCOPY(loc, bbd->psys->particles[p-1].prev_state.co);
+ VECCOPY(vec, bbd->sim->psys->particles[p-1].prev_state.vel);
+ VECCOPY(loc, bbd->sim->psys->particles[p-1].prev_state.co);
}
else {
- VECCOPY(vec, bbd->psys->particles[p - p%n].prev_state.vel);
- VECCOPY(loc, bbd->psys->particles[p - p%n].prev_state.co);
+ VECCOPY(vec, bbd->sim->psys->particles[p - p%n].prev_state.vel);
+ VECCOPY(loc, bbd->sim->psys->particles[p - p%n].prev_state.co);
}
/* fac is seconds behind leader */
@@ -584,7 +558,7 @@ static int rule_average_speed(BoidRule *rule, BoidBrainData *bbd, BoidValues *va
/* leveling */
if(asbr->level > 0.0f) {
- Projf(vec, bbd->wanted_co, bbd->psys->part->acc);
+ Projf(vec, bbd->wanted_co, bbd->sim->psys->part->acc);
VecMulf(vec, asbr->level);
VecSubf(bbd->wanted_co, bbd->wanted_co, vec);
}
@@ -601,7 +575,7 @@ static int rule_average_speed(BoidRule *rule, BoidBrainData *bbd, BoidValues *va
/* leveling */
if(asbr->level > 0.0f) {
- Projf(vec, bbd->wanted_co, bbd->psys->part->acc);
+ Projf(vec, bbd->wanted_co, bbd->sim->psys->part->acc);
VecMulf(vec, asbr->level);
VecSubf(bbd->wanted_co, bbd->wanted_co, vec);
}
@@ -627,9 +601,9 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
int n, ret = 0;
/* calculate own group strength */
- int neighbors = BLI_kdtree_range_search(bbd->psys->tree, fbr->distance, pa->prev_state.co, NULL, &ptn);
+ int neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, fbr->distance, pa->prev_state.co, NULL, &ptn);
for(n=0; n<neighbors; n++) {
- bpa = bbd->psys->particles[ptn[n].index].boid;
+ bpa = bbd->sim->psys->particles[ptn[n].index].boid;
health += bpa->data.health;
}
@@ -638,8 +612,8 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
if(ptn){ MEM_freeN(ptn); ptn=NULL; }
/* add other friendlies and calculate enemy strength and find closest enemy */
- for(pt=bbd->psys->targets.first; pt; pt=pt->next) {
- ParticleSystem *epsys = psys_get_target_system(bbd->ob, pt);
+ for(pt=bbd->sim->psys->targets.first; pt; pt=pt->next) {
+ ParticleSystem *epsys = psys_get_target_system(bbd->sim->ob, pt);
if(epsys) {
epars = epsys->particles;
@@ -756,25 +730,28 @@ static Object *boid_find_ground(BoidBrainData *bbd, ParticleData *pa, float *gro
if(bpa->data.mode == eBoidMode_Climbing) {
SurfaceModifierData *surmd = NULL;
float x[3], v[3];
-
+
surmd = (SurfaceModifierData *)modifiers_findByType ( bpa->ground, eModifierType_Surface );
/* take surface velocity into account */
- effector_find_co(bbd->scene, pa->state.co, surmd, NULL, NULL, x, NULL, v, NULL);
+ closest_point_on_surface(surmd, pa->state.co, x, NULL, v);
VecAddf(x, x, v);
/* get actual position on surface */
- effector_find_co(bbd->scene, x, surmd, NULL, NULL, ground_co, ground_nor, NULL, NULL);
+ closest_point_on_surface(surmd, x, ground_co, ground_nor, NULL);
return bpa->ground;
}
else {
float zvec[3] = {0.0f, 0.0f, 2000.0f};
ParticleCollision col;
+ ColliderCache *coll;
BVHTreeRayHit hit;
- ParticleEffectorCache *ec;
float radius = 0.0f, t, ray_dir[3];
+ if(!bbd->sim->colliders)
+ return NULL;
+
VECCOPY(col.co1, pa->state.co);
VECCOPY(col.co2, pa->state.co);
VecAddf(col.co1, col.co1, zvec);
@@ -785,16 +762,12 @@ static Object *boid_find_ground(BoidBrainData *bbd, ParticleData *pa, float *gro
hit.dist = col.ray_len = VecLength(ray_dir);
/* find out upmost deflector object */
- for(ec=bbd->psys->effectors.first; ec; ec=ec->next) {
- if(ec->type & PSYS_EC_DEFLECT) {
- Object *eob = ec->ob;
+ for(coll = bbd->sim->colliders->first; coll; coll = coll->next){
+ col.ob = coll->ob;
+ col.md = coll->collmd;
- col.md = ( CollisionModifierData * ) ( modifiers_findByType ( eob, eModifierType_Collision ) );
- col.ob_t = eob;
-
- if(col.md && col.md->bvhtree)
- BLI_bvhtree_ray_cast(col.md->bvhtree, col.co1, ray_dir, radius, &hit, particle_intersect_face, &col);
- }
+ if(col.md && col.md->bvhtree)
+ BLI_bvhtree_ray_cast(col.md->bvhtree, col.co1, ray_dir, radius, &hit, particle_intersect_face, &col);
}
/* then use that object */
if(hit.index>=0) {
@@ -802,7 +775,7 @@ static Object *boid_find_ground(BoidBrainData *bbd, ParticleData *pa, float *gro
VecLerpf(ground_co, col.co1, col.co2, t);
VECCOPY(ground_nor, col.nor);
Normalize(ground_nor);
- return col.ob;
+ return col.hit_ob;
}
else {
/* default to z=0 */
@@ -941,7 +914,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
bbd->wanted_co[0]=bbd->wanted_co[1]=bbd->wanted_co[2]=bbd->wanted_speed=0.0f;
/* create random seed for every particle & frame */
- BLI_srandom(bbd->psys->seed + p);
+ BLI_srandom(bbd->sim->psys->seed + p);
rand = BLI_rand();
BLI_srandom((int)bbd->cfra + rand);
@@ -1068,6 +1041,7 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
BoidSettings *boids = bbd->part->boids;
BoidParticle *bpa = pa->boid;
BoidValues val;
+ EffectedPoint epoint;
float acc[3] = {0.0f, 0.0f, 0.0f}, tan_acc[3], nor_acc[3];
float dvec[3], bvec[3];
float new_dir[3], new_speed;
@@ -1075,9 +1049,8 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
float wanted_dir[3];
float q[4], mat[3][3]; /* rotation */
float ground_co[3] = {0.0f, 0.0f, 0.0f}, ground_nor[3] = {0.0f, 0.0f, 1.0f};
- float force[3] = {0.0f, 0.0f, 0.0f}, tvel[3] = {0.0f, 0.0f, 1.0f};
+ float force[3] = {0.0f, 0.0f, 0.0f};
float pa_mass=bbd->part->mass, dtime=bbd->dfra*bbd->timestep;
- int p = pa - bbd->psys->particles;
set_boid_values(&val, boids, pa);
@@ -1208,7 +1181,8 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
}
/* account for effectors */
- do_effectors(p, pa, &pa->state, bbd->scene, bbd->ob, bbd->psys, pa->state.co, force, tvel, bbd->dfra, bbd->cfra);
+ pd_point_from_particle(bbd->sim, pa, &pa->state, &epoint);
+ pdDoEffectors(bbd->sim->psys->effectors, bbd->sim->colliders, bbd->part->effector_weights, &epoint, force, NULL);
if(ELEM(bpa->data.mode, eBoidMode_OnLand, eBoidMode_Climbing)) {
float length = Normalize(force);
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 76a26762abe..115d31b587c 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -44,6 +44,7 @@
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
+#include "BLI_rand.h"
#include "BKE_brush.h"
#include "BKE_colortools.h"
@@ -78,7 +79,7 @@ Brush *add_brush(const char *name)
brush->smooth_stroke_radius= 75;
brush->smooth_stroke_factor= 0.9;
brush->rate= 0.1f;
- brush->innerradius= 0.5f;
+ brush->jitter= 0.0f;
brush->clone.alpha= 0.5;
brush->sculpt_tool = SCULPT_TOOL_DRAW;
@@ -379,36 +380,6 @@ void brush_check_exists(Brush **brush, const char *name)
}
/* Brush Sampling */
-
-/*static float taylor_approx_cos(float f)
-{
- f = f*f;
- f = 1.0f - f/2.0f + f*f/24.0f;
- return f;
-}*/
-
-float brush_sample_falloff(Brush *brush, float dist)
-{
- float a, outer, inner;
-
- outer = brush->size >> 1;
- inner = outer*brush->innerradius;
-
- if (dist <= inner) {
- return brush->alpha;
- }
- else if ((dist < outer) && (inner < outer)) {
- a = sqrt((dist - inner)/(outer - inner));
- return (1 - a)*brush->alpha;
-
- /* formula used by sculpt, with taylor approx
- a = 0.5f*(taylor_approx_cos(3.0f*(dist - inner)/(outer - inner)) + 1.0f);
- return a*brush->alpha; */
- }
- else
- return 0.0f;
-}
-
void brush_sample_tex(Brush *brush, float *xy, float *rgba)
{
MTex *mtex= brush->mtex[brush->texact];
@@ -446,6 +417,7 @@ void brush_imbuf_new(Brush *brush, short flt, short texfall, int size, ImBuf **o
ImBuf *ibuf;
float xy[2], dist, rgba[4], *dstf;
int x, y, rowbytes, xoff, yoff, imbflag;
+ int maxsize = brush->size >> 1;
char *dst, crgb[3];
imbflag= (flt)? IB_rectfloat: IB_rect;
@@ -470,7 +442,7 @@ void brush_imbuf_new(Brush *brush, short flt, short texfall, int size, ImBuf **o
dist = sqrt(xy[0]*xy[0] + xy[1]*xy[1]);
VECCOPY(dstf, brush->rgb);
- dstf[3]= brush_sample_falloff(brush, dist);
+ dstf[3]= brush->alpha*brush_curve_strength_clamp(brush, dist, maxsize);
}
else if (texfall == 1) {
brush_sample_tex(brush, xy, dstf);
@@ -483,7 +455,7 @@ void brush_imbuf_new(Brush *brush, short flt, short texfall, int size, ImBuf **o
dstf[0] = rgba[0]*brush->rgb[0];
dstf[1] = rgba[1]*brush->rgb[1];
dstf[2] = rgba[2]*brush->rgb[2];
- dstf[3] = rgba[3]*brush_sample_falloff(brush, dist);
+ dstf[3] = rgba[3]*brush->alpha*brush_curve_strength_clamp(brush, dist, maxsize);
}
}
}
@@ -506,7 +478,7 @@ void brush_imbuf_new(Brush *brush, short flt, short texfall, int size, ImBuf **o
dst[0]= crgb[0];
dst[1]= crgb[1];
dst[2]= crgb[2];
- dst[3]= FTOCHAR(brush_sample_falloff(brush, dist));
+ dst[3]= FTOCHAR(brush->alpha*brush_curve_strength(brush, dist, maxsize));
}
else if (texfall == 1) {
brush_sample_tex(brush, xy, rgba);
@@ -522,7 +494,7 @@ void brush_imbuf_new(Brush *brush, short flt, short texfall, int size, ImBuf **o
dst[0] = FTOCHAR(rgba[0]*brush->rgb[0]);
dst[1] = FTOCHAR(rgba[1]*brush->rgb[1]);
dst[2] = FTOCHAR(rgba[2]*brush->rgb[2]);
- dst[3] = FTOCHAR(rgba[3]*brush_sample_falloff(brush, dist));
+ dst[3] = FTOCHAR(rgba[3]*brush->alpha*brush_curve_strength_clamp(brush, dist, maxsize));
}
}
}
@@ -542,7 +514,7 @@ typedef struct BrushPainterCache {
int lastsize;
float lastalpha;
- float lastinnerradius;
+ float lastjitter;
ImBuf *ibuf;
ImBuf *texibuf;
@@ -567,7 +539,7 @@ struct BrushPainter {
float startsize;
float startalpha;
- float startinnerradius;
+ float startjitter;
float startspacing;
BrushPainterCache cache;
@@ -583,7 +555,7 @@ BrushPainter *brush_painter_new(Brush *brush)
painter->startsize = brush->size;
painter->startalpha = brush->alpha;
- painter->startinnerradius = brush->innerradius;
+ painter->startjitter = brush->jitter;
painter->startspacing = brush->spacing;
return painter;
@@ -617,7 +589,7 @@ void brush_painter_free(BrushPainter *painter)
brush->size = painter->startsize;
brush->alpha = painter->startalpha;
- brush->innerradius = painter->startinnerradius;
+ brush->jitter = painter->startjitter;
brush->spacing = painter->startspacing;
if (painter->cache.ibuf) IMB_freeImBuf(painter->cache.ibuf);
@@ -773,7 +745,7 @@ static void brush_painter_refresh_cache(BrushPainter *painter, float *pos)
short flt;
if ((brush->size != cache->lastsize) || (brush->alpha != cache->lastalpha)
- || (brush->innerradius != cache->lastinnerradius)) {
+ || (brush->jitter != cache->lastjitter)) {
if (cache->ibuf) {
IMB_freeImBuf(cache->ibuf);
cache->ibuf= NULL;
@@ -798,7 +770,7 @@ static void brush_painter_refresh_cache(BrushPainter *painter, float *pos)
cache->lastsize= brush->size;
cache->lastalpha= brush->alpha;
- cache->lastinnerradius= brush->innerradius;
+ cache->lastjitter= brush->jitter;
}
else if ((brush->flag & BRUSH_FIXED_TEX) && mtex && mtex->tex) {
int dx = (int)painter->lastpaintpos[0] - (int)pos[0];
@@ -820,20 +792,34 @@ static void brush_apply_pressure(BrushPainter *painter, Brush *brush, float pres
brush->alpha = MAX2(0.0, painter->startalpha*pressure);
if (brush->flag & BRUSH_SIZE_PRESSURE)
brush->size = MAX2(1.0, painter->startsize*pressure);
- if (brush->flag & BRUSH_RAD_PRESSURE)
- brush->innerradius = MAX2(0.0, painter->startinnerradius*pressure);
+ if (brush->flag & BRUSH_JITTER_PRESSURE)
+ brush->jitter = MAX2(0.0, painter->startjitter*pressure);
if (brush->flag & BRUSH_SPACING_PRESSURE)
brush->spacing = MAX2(1.0, painter->startspacing*(1.5f-pressure));
}
+static void brush_jitter_pos(Brush *brush, float *pos, float *jitterpos)
+{
+ if(brush->jitter){
+ jitterpos[0] = pos[0] + ((BLI_frand()-0.5f) * brush->size * brush->jitter * 2);
+ jitterpos[1] = pos[1] + ((BLI_frand()-0.5f) * brush->size * brush->jitter * 2);
+ }
+ else {
+ VECCOPY2D(jitterpos, pos);
+ }
+}
+
int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, double time, float pressure, void *user)
{
Brush *brush= painter->brush;
int totpaintops= 0;
- if (pressure == 0.0f)
- pressure = 1.0f; /* zero pressure == not using tablet */
-
+ if (pressure == 0.0f) {
+ if(painter->lastpressure) // XXX - hack, operator misses
+ pressure= painter->lastpressure;
+ else
+ pressure = 1.0f; /* zero pressure == not using tablet */
+ }
if (painter->firsttouch) {
/* paint exactly once on first touch */
painter->startpaintpos[0]= pos[0];
@@ -884,7 +870,7 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, doubl
}
#endif
else {
- float startdistance, spacing, step, paintpos[2], dmousepos[2];
+ float startdistance, spacing, step, paintpos[2], dmousepos[2], finalpos[2];
float t, len, press;
/* compute brush spacing adapted to brush size, spacing may depend
@@ -909,11 +895,13 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, doubl
brush_apply_pressure(painter, brush, press);
spacing= MAX2(1.0f, brush->size)*brush->spacing*0.01f;
+ brush_jitter_pos(brush, paintpos, finalpos);
+
if (painter->cache.enabled)
- brush_painter_refresh_cache(painter, paintpos);
+ brush_painter_refresh_cache(painter, finalpos);
totpaintops +=
- func(user, painter->cache.ibuf, painter->lastpaintpos, paintpos);
+ func(user, painter->cache.ibuf, painter->lastpaintpos, finalpos);
painter->lastpaintpos[0]= paintpos[0];
painter->lastpaintpos[1]= paintpos[1];
@@ -936,10 +924,14 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, doubl
while (painter->accumtime >= brush->rate) {
brush_apply_pressure(painter, brush, pressure);
+
+ brush_jitter_pos(brush, pos, finalpos);
+
if (painter->cache.enabled)
- brush_painter_refresh_cache(painter, paintpos);
+ brush_painter_refresh_cache(painter, finalpos);
+
totpaintops +=
- func(user, painter->cache.ibuf, painter->lastmousepos, pos);
+ func(user, painter->cache.ibuf, painter->lastmousepos, finalpos);
painter->accumtime -= brush->rate;
}
@@ -953,17 +945,30 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, doubl
brush->alpha = painter->startalpha;
brush->size = painter->startsize;
- brush->innerradius = painter->startinnerradius;
+ brush->jitter = painter->startjitter;
brush->spacing = painter->startspacing;
return totpaintops;
}
/* Uses the brush curve control to find a strength value between 0 and 1 */
+float brush_curve_strength_clamp(Brush *br, float p, const float len)
+{
+ if(p >= len) p= 1.0f;
+ else p= p/len;
+
+ p= curvemapping_evaluateF(br->curve, 0, p);
+ if(p < 0.0) p= 0.0f;
+ else if(p > 1.0f) p= 1.0f;
+ return p;
+}
+/* same as above but can return negative values if the curve enables
+ * used for sculpt only */
float brush_curve_strength(Brush *br, float p, const float len)
{
- if(p > len) p= len;
- return curvemapping_evaluateF(br->curve, 0, p/len);
+ if(p >= len) p= 1.0f;
+ else p= p/len;
+ return curvemapping_evaluateF(br->curve, 0, p);
}
/* TODO: should probably be unified with BrushPainter stuff? */
@@ -1030,7 +1035,7 @@ static struct ImBuf *brush_gen_radial_control_imbuf(Brush *br)
for(i=0; i<side; ++i) {
for(j=0; j<side; ++j) {
float magn= sqrt(pow(i - half, 2) + pow(j - half, 2));
- im->rect_float[i*side + j]= brush_curve_strength(br, magn, half);
+ im->rect_float[i*side + j]= brush_curve_strength_clamp(br, magn, half);
}
}
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index 08bcd9c2820..c47bed65b69 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -479,6 +479,32 @@ static void mesh_faces_spherecast(void *userdata, int index, const BVHTreeRay *r
} while(t2);
}
+// Callback to bvh tree nearest point. The tree must bust have been built using bvhtree_from_mesh_edges.
+// userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree.
+static void mesh_edges_nearest_point(void *userdata, int index, const float *co, BVHTreeNearest *nearest)
+{
+ const BVHTreeFromMesh *data = (BVHTreeFromMesh*) userdata;
+ MVert *vert = data->vert;
+ MEdge *edge = data->edge + index;
+ float nearest_tmp[3], dist;
+
+ float *t0, *t1;
+ t0 = vert[ edge->v1 ].co;
+ t1 = vert[ edge->v2 ].co;
+
+ PclosestVL3Dfl(nearest_tmp, co, t0, t1);
+ dist = VecLenf(nearest_tmp, co);
+
+ if(dist < nearest->dist)
+ {
+ nearest->index = index;
+ nearest->dist = dist;
+ VECCOPY(nearest->co, nearest_tmp);
+ VecSubf(nearest->no, t0, t1);
+ Normalize(nearest->no);
+ }
+}
+
/*
* BVH builders
*/
@@ -605,6 +631,68 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
}
+// Builds a bvh tree.. where nodes are the faces of the given mesh.
+BVHTree* bvhtree_from_mesh_edges(BVHTreeFromMesh *data, DerivedMesh *mesh, float epsilon, int tree_type, int axis)
+{
+ BVHTree *tree = bvhcache_find(&mesh->bvhCache, BVHTREE_FROM_EDGES);
+
+ //Not in cache
+ if(tree == NULL)
+ {
+ int i;
+ int numEdges= mesh->getNumEdges(mesh);
+ MVert *vert = mesh->getVertDataArray(mesh, CD_MVERT);
+ MEdge *edge = mesh->getEdgeDataArray(mesh, CD_MEDGE);
+
+ if(vert != NULL && edge != NULL)
+ {
+ /* Create a bvh-tree of the given target */
+ tree = BLI_bvhtree_new(numEdges, epsilon, tree_type, axis);
+ if(tree != NULL)
+ {
+ for(i = 0; i < numEdges; i++)
+ {
+ float co[4][3];
+ VECCOPY(co[0], vert[ edge[i].v1 ].co);
+ VECCOPY(co[1], vert[ edge[i].v2 ].co);
+
+ BLI_bvhtree_insert(tree, i, co[0], 2);
+ }
+ BLI_bvhtree_balance(tree);
+
+ //Save on cache for later use
+// printf("BVHTree built and saved on cache\n");
+ bvhcache_insert(&mesh->bvhCache, tree, BVHTREE_FROM_EDGES);
+ }
+ }
+ }
+ else
+ {
+// printf("BVHTree is already build, using cached tree\n");
+ }
+
+
+ //Setup BVHTreeFromMesh
+ memset(data, 0, sizeof(*data));
+ data->tree = tree;
+
+ if(data->tree)
+ {
+ data->cached = TRUE;
+
+ data->nearest_callback = mesh_edges_nearest_point;
+ data->raycast_callback = NULL;
+
+ data->mesh = mesh;
+ data->vert = mesh->getVertDataArray(mesh, CD_MVERT);
+ data->edge = mesh->getEdgeDataArray(mesh, CD_MEDGE);
+
+ data->sphere_radius = epsilon;
+ }
+ return data->tree;
+
+}
+
// Frees data allocated by a call to bvhtree_from_mesh_*.
void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data)
{
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 5cc64c9d3e2..94f2fcae9fb 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -63,6 +63,7 @@
#include "MEM_guardedalloc.h"
+#include "gpu_buffers.h"
#include "GPU_draw.h"
#include "GPU_extensions.h"
#include "GPU_material.h"
@@ -188,10 +189,19 @@ static void cdDM_drawVerts(DerivedMesh *dm)
MVert *mv = cddm->mvert;
int i;
- glBegin(GL_POINTS);
- for(i = 0; i < dm->numVertData; i++, mv++)
- glVertex3fv(mv->co);
- glEnd();
+ if( GPU_buffer_legacy(dm) ) {
+ glBegin(GL_POINTS);
+ for(i = 0; i < dm->numVertData; i++, mv++)
+ glVertex3fv(mv->co);
+ glEnd();
+ }
+ else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
+ GPU_vertex_setup(dm);
+ if( !GPU_buffer_legacy(dm) ) {
+ glDrawArrays(GL_POINTS,0,dm->drawObject->nelements);
+ }
+ GPU_buffer_unbind();
+ }
}
static void cdDM_drawUVEdges(DerivedMesh *dm)
@@ -202,28 +212,65 @@ static void cdDM_drawUVEdges(DerivedMesh *dm)
int i;
if(mf) {
- glBegin(GL_LINES);
- for(i = 0; i < dm->numFaceData; i++, mf++, tf++) {
- if(!(mf->flag&ME_HIDE)) {
- glVertex2fv(tf->uv[0]);
- glVertex2fv(tf->uv[1]);
-
- glVertex2fv(tf->uv[1]);
- glVertex2fv(tf->uv[2]);
-
- if(!mf->v4) {
- glVertex2fv(tf->uv[2]);
+ if( GPU_buffer_legacy(dm) ) {
+ glBegin(GL_LINES);
+ for(i = 0; i < dm->numFaceData; i++, mf++, tf++) {
+ if(!(mf->flag&ME_HIDE)) {
glVertex2fv(tf->uv[0]);
- } else {
+ glVertex2fv(tf->uv[1]);
+
+ glVertex2fv(tf->uv[1]);
glVertex2fv(tf->uv[2]);
- glVertex2fv(tf->uv[3]);
- glVertex2fv(tf->uv[3]);
- glVertex2fv(tf->uv[0]);
+ if(!mf->v4) {
+ glVertex2fv(tf->uv[2]);
+ glVertex2fv(tf->uv[0]);
+ } else {
+ glVertex2fv(tf->uv[2]);
+ glVertex2fv(tf->uv[3]);
+
+ glVertex2fv(tf->uv[3]);
+ glVertex2fv(tf->uv[0]);
+ }
+ }
+ }
+ glEnd();
+ }
+ else {
+ int prevstart = 0;
+ int prevdraw = 1;
+ int draw = 1;
+ int curpos = 0;
+
+ GPU_uvedge_setup(dm);
+ if( !GPU_buffer_legacy(dm) ) {
+ for(i = 0; i < dm->numFaceData; i++, mf++) {
+ if(mf->flag&ME_LOOSEEDGE) {
+ draw = 1;
+ }
+ else {
+ draw = 0;
+ }
+ if( prevdraw != draw ) {
+ if( prevdraw > 0 && (curpos-prevstart) > 0) {
+ glDrawArrays(GL_LINES,prevstart,curpos-prevstart);
+ }
+ prevstart = curpos;
+ }
+ if( mf->v4 ) {
+ curpos += 8;
+ }
+ else {
+ curpos += 6;
+ }
+ prevdraw = draw;
+ }
+ if( prevdraw > 0 && (curpos-prevstart) > 0 ) {
+ glDrawArrays(GL_LINES,prevstart,curpos-prevstart);
}
}
+ GPU_buffer_unbind();
}
- glEnd();
}
}
@@ -233,16 +280,48 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges)
MVert *mvert = cddm->mvert;
MEdge *medge = cddm->medge;
int i;
-
- glBegin(GL_LINES);
- for(i = 0; i < dm->numEdgeData; i++, medge++) {
- if((medge->flag&ME_EDGEDRAW)
- && (drawLooseEdges || !(medge->flag&ME_LOOSEEDGE))) {
- glVertex3fv(mvert[medge->v1].co);
- glVertex3fv(mvert[medge->v2].co);
+
+ if( GPU_buffer_legacy(dm) ) {
+ DEBUG_VBO( "Using legacy code. cdDM_drawEdges\n" );
+ glBegin(GL_LINES);
+ for(i = 0; i < dm->numEdgeData; i++, medge++) {
+ if((medge->flag&ME_EDGEDRAW)
+ && (drawLooseEdges || !(medge->flag&ME_LOOSEEDGE))) {
+ glVertex3fv(mvert[medge->v1].co);
+ glVertex3fv(mvert[medge->v2].co);
+ }
}
+ glEnd();
+ }
+ else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
+ int prevstart = 0;
+ int prevdraw = 1;
+ int draw = 1;
+
+ GPU_edge_setup(dm);
+ if( !GPU_buffer_legacy(dm) ) {
+ for(i = 0; i < dm->numEdgeData; i++, medge++) {
+ if((medge->flag&ME_EDGEDRAW)
+ && (drawLooseEdges || !(medge->flag&ME_LOOSEEDGE))) {
+ draw = 1;
+ }
+ else {
+ draw = 0;
+ }
+ if( prevdraw != draw ) {
+ if( prevdraw > 0 && (i-prevstart) > 0 ) {
+ GPU_buffer_draw_elements( dm->drawObject->edges, GL_LINES, prevstart*2, (i-prevstart)*2 );
+ }
+ prevstart = i;
+ }
+ prevdraw = draw;
+ }
+ if( prevdraw > 0 && (i-prevstart) > 0 ) {
+ GPU_buffer_draw_elements( dm->drawObject->edges, GL_LINES, prevstart*2, (i-prevstart)*2 );
+ }
+ }
+ GPU_buffer_unbind();
}
- glEnd();
}
static void cdDM_drawLooseEdges(DerivedMesh *dm)
@@ -252,14 +331,45 @@ static void cdDM_drawLooseEdges(DerivedMesh *dm)
MEdge *medge = cddm->medge;
int i;
- glBegin(GL_LINES);
- for(i = 0; i < dm->numEdgeData; i++, medge++) {
- if(medge->flag&ME_LOOSEEDGE) {
- glVertex3fv(mvert[medge->v1].co);
- glVertex3fv(mvert[medge->v2].co);
+ if( GPU_buffer_legacy(dm) ) {
+ DEBUG_VBO( "Using legacy code. cdDM_drawLooseEdges\n" );
+ glBegin(GL_LINES);
+ for(i = 0; i < dm->numEdgeData; i++, medge++) {
+ if(medge->flag&ME_LOOSEEDGE) {
+ glVertex3fv(mvert[medge->v1].co);
+ glVertex3fv(mvert[medge->v2].co);
+ }
}
+ glEnd();
+ }
+ else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
+ int prevstart = 0;
+ int prevdraw = 1;
+ int draw = 1;
+
+ GPU_edge_setup(dm);
+ if( !GPU_buffer_legacy(dm) ) {
+ for(i = 0; i < dm->numEdgeData; i++, medge++) {
+ if(medge->flag&ME_LOOSEEDGE) {
+ draw = 1;
+ }
+ else {
+ draw = 0;
+ }
+ if( prevdraw != draw ) {
+ if( prevdraw > 0 && (i-prevstart) > 0) {
+ GPU_buffer_draw_elements( dm->drawObject->edges, GL_LINES, prevstart*2, (i-prevstart)*2 );
+ }
+ prevstart = i;
+ }
+ prevdraw = draw;
+ }
+ if( prevdraw > 0 && (i-prevstart) > 0 ) {
+ GPU_buffer_draw_elements( dm->drawObject->edges, GL_LINES, prevstart*2, (i-prevstart)*2 );
+ }
+ }
+ GPU_buffer_unbind();
}
- glEnd();
}
static void cdDM_drawFacesSolid(DerivedMesh *dm, int (*setMaterial)(int, void *attribs))
@@ -278,58 +388,73 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm, int (*setMaterial)(int, void *a
glVertex3fv(mvert[index].co); \
}
- glBegin(glmode = GL_QUADS);
- for(a = 0; a < dm->numFaceData; a++, mface++) {
- int new_glmode, new_matnr, new_shademodel;
+ if( GPU_buffer_legacy(dm) ) {
+ DEBUG_VBO( "Using legacy code. cdDM_drawFacesSolid\n" );
+ glBegin(glmode = GL_QUADS);
+ for(a = 0; a < dm->numFaceData; a++, mface++) {
+ int new_glmode, new_matnr, new_shademodel;
- new_glmode = mface->v4?GL_QUADS:GL_TRIANGLES;
- new_matnr = mface->mat_nr + 1;
- new_shademodel = (mface->flag & ME_SMOOTH)?GL_SMOOTH:GL_FLAT;
-
- if(new_glmode != glmode || new_matnr != matnr
- || new_shademodel != shademodel) {
- glEnd();
+ new_glmode = mface->v4?GL_QUADS:GL_TRIANGLES;
+ new_matnr = mface->mat_nr + 1;
+ new_shademodel = (mface->flag & ME_SMOOTH)?GL_SMOOTH:GL_FLAT;
+
+ if(new_glmode != glmode || new_matnr != matnr
+ || new_shademodel != shademodel) {
+ glEnd();
- drawCurrentMat = setMaterial(matnr = new_matnr, NULL);
+ drawCurrentMat = setMaterial(matnr = new_matnr, NULL);
- glShadeModel(shademodel = new_shademodel);
- glBegin(glmode = new_glmode);
- }
-
- if(drawCurrentMat) {
- if(shademodel == GL_FLAT) {
- if (nors) {
- glNormal3fv(nors);
- }
- else {
- /* TODO make this better (cache facenormals as layer?) */
- float nor[3];
- if(mface->v4) {
- CalcNormFloat4(mvert[mface->v1].co, mvert[mface->v2].co,
- mvert[mface->v3].co, mvert[mface->v4].co,
- nor);
- } else {
- CalcNormFloat(mvert[mface->v1].co, mvert[mface->v2].co,
- mvert[mface->v3].co, nor);
+ glShadeModel(shademodel = new_shademodel);
+ glBegin(glmode = new_glmode);
+ }
+
+ if(drawCurrentMat) {
+ if(shademodel == GL_FLAT) {
+ if (nors) {
+ glNormal3fv(nors);
+ }
+ else {
+ /* TODO make this better (cache facenormals as layer?) */
+ float nor[3];
+ if(mface->v4) {
+ CalcNormFloat4(mvert[mface->v1].co, mvert[mface->v2].co,
+ mvert[mface->v3].co, mvert[mface->v4].co,
+ nor);
+ } else {
+ CalcNormFloat(mvert[mface->v1].co, mvert[mface->v2].co,
+ mvert[mface->v3].co, nor);
+ }
+ glNormal3fv(nor);
}
- glNormal3fv(nor);
+ }
+
+ PASSVERT(mface->v1);
+ PASSVERT(mface->v2);
+ PASSVERT(mface->v3);
+ if(mface->v4) {
+ PASSVERT(mface->v4);
}
}
- PASSVERT(mface->v1);
- PASSVERT(mface->v2);
- PASSVERT(mface->v3);
- if(mface->v4) {
- PASSVERT(mface->v4);
+ if(nors) nors += 3;
+ }
+ glEnd();
+ }
+ else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
+ GPU_vertex_setup( dm );
+ GPU_normal_setup( dm );
+ if( !GPU_buffer_legacy(dm) ) {
+ glShadeModel(GL_SMOOTH);
+ for( a = 0; a < dm->drawObject->nmaterials; a++ ) {
+ if( setMaterial(dm->drawObject->materials[a].mat_nr+1, NULL) )
+ glDrawArrays(GL_TRIANGLES, dm->drawObject->materials[a].start, dm->drawObject->materials[a].end-dm->drawObject->materials[a].start);
}
}
-
- if(nors) nors += 3;
+ GPU_buffer_unbind( );
}
- glEnd();
- glShadeModel(GL_FLAT);
#undef PASSVERT
+ glShadeModel(GL_FLAT);
}
static void cdDM_drawFacesColored(DerivedMesh *dm, int useTwoSided, unsigned char *col1, unsigned char *col2)
@@ -353,43 +478,64 @@ static void cdDM_drawFacesColored(DerivedMesh *dm, int useTwoSided, unsigned cha
/* we need that as mesh option builtin, next to double sided lighting */
if(col1 && col2)
glEnable(GL_CULL_FACE);
-
- glShadeModel(GL_SMOOTH);
- glBegin(glmode = GL_QUADS);
- for(a = 0; a < dm->numFaceData; a++, mface++, cp1 += 16) {
- int new_glmode = mface->v4?GL_QUADS:GL_TRIANGLES;
- if(new_glmode != glmode) {
- glEnd();
- glBegin(glmode = new_glmode);
- }
-
- glColor3ub(cp1[0], cp1[1], cp1[2]);
- glVertex3fv(mvert[mface->v1].co);
- glColor3ub(cp1[4], cp1[5], cp1[6]);
- glVertex3fv(mvert[mface->v2].co);
- glColor3ub(cp1[8], cp1[9], cp1[10]);
- glVertex3fv(mvert[mface->v3].co);
- if(mface->v4) {
- glColor3ub(cp1[12], cp1[13], cp1[14]);
- glVertex3fv(mvert[mface->v4].co);
- }
-
- if(useTwoSided) {
- glColor3ub(cp2[8], cp2[9], cp2[10]);
- glVertex3fv(mvert[mface->v3].co );
- glColor3ub(cp2[4], cp2[5], cp2[6]);
- glVertex3fv(mvert[mface->v2].co );
- glColor3ub(cp2[0], cp2[1], cp2[2]);
- glVertex3fv(mvert[mface->v1].co );
+ if( GPU_buffer_legacy(dm) ) {
+ DEBUG_VBO( "Using legacy code. cdDM_drawFacesColored\n" );
+ glShadeModel(GL_SMOOTH);
+ glBegin(glmode = GL_QUADS);
+ for(a = 0; a < dm->numFaceData; a++, mface++, cp1 += 16) {
+ int new_glmode = mface->v4?GL_QUADS:GL_TRIANGLES;
+
+ if(new_glmode != glmode) {
+ glEnd();
+ glBegin(glmode = new_glmode);
+ }
+
+ glColor3ub(cp1[0], cp1[1], cp1[2]);
+ glVertex3fv(mvert[mface->v1].co);
+ glColor3ub(cp1[4], cp1[5], cp1[6]);
+ glVertex3fv(mvert[mface->v2].co);
+ glColor3ub(cp1[8], cp1[9], cp1[10]);
+ glVertex3fv(mvert[mface->v3].co);
if(mface->v4) {
- glColor3ub(cp2[12], cp2[13], cp2[14]);
- glVertex3fv(mvert[mface->v4].co );
+ glColor3ub(cp1[12], cp1[13], cp1[14]);
+ glVertex3fv(mvert[mface->v4].co);
+ }
+
+ if(useTwoSided) {
+ glColor3ub(cp2[8], cp2[9], cp2[10]);
+ glVertex3fv(mvert[mface->v3].co );
+ glColor3ub(cp2[4], cp2[5], cp2[6]);
+ glVertex3fv(mvert[mface->v2].co );
+ glColor3ub(cp2[0], cp2[1], cp2[2]);
+ glVertex3fv(mvert[mface->v1].co );
+ if(mface->v4) {
+ glColor3ub(cp2[12], cp2[13], cp2[14]);
+ glVertex3fv(mvert[mface->v4].co );
+ }
}
+ if(col2) cp2 += 16;
}
- if(col2) cp2 += 16;
+ glEnd();
+ }
+ else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
+ GPU_color4_upload(dm,cp1);
+ GPU_vertex_setup(dm);
+ GPU_color_setup(dm);
+ if( !GPU_buffer_legacy(dm) ) {
+ glShadeModel(GL_SMOOTH);
+ glDrawArrays(GL_TRIANGLES, 0, dm->drawObject->nelements);
+
+ if( useTwoSided ) {
+ GPU_color4_upload(dm,cp2);
+ GPU_color_setup(dm);
+ glCullFace(GL_FRONT);
+ glDrawArrays(GL_TRIANGLES, 0, dm->drawObject->nelements);
+ glCullFace(GL_BACK);
+ }
+ }
+ GPU_buffer_unbind();
}
- glEnd();
glShadeModel(GL_FLAT);
glDisable(GL_CULL_FACE);
@@ -402,85 +548,171 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
{
CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
MVert *mv = cddm->mvert;
- MFace *mf = cddm->mface;
- MCol *mcol = dm->getTessFaceDataArray(dm, CD_MCOL);
+ MFace *mf = DM_get_tessface_data_layer(dm, CD_MFACE);
+ MCol *realcol = dm->getTessFaceDataArray(dm, CD_TEXTURE_MCOL);
float *nors= dm->getTessFaceDataArray(dm, CD_NORMAL);
MTFace *tf = DM_get_tessface_data_layer(dm, CD_MTFACE);
- int i, orig, *index = DM_get_tessface_data_layer(dm, CD_ORIGINDEX);
+ int i, j, orig, *index = DM_get_tessface_data_layer(dm, CD_ORIGINDEX);
+ int startFace = 0, lastFlag = 0xdeadbeef;
+ MCol *mcol = dm->getTessFaceDataArray(dm, CD_WEIGHT_MCOL);
+ if(!mcol)
+ mcol = dm->getTessFaceDataArray(dm, CD_MCOL);
+
+ if( GPU_buffer_legacy(dm) ) {
+ DEBUG_VBO( "Using legacy code. cdDM_drawFacesTex_common\n" );
+ for(i = 0; i < dm->numFaceData; i++, mf++) {
+ MVert *mvert;
+ int flag;
+ unsigned char *cp = NULL;
- for(i = 0; i < dm->numFaceData; i++, mf++) {
- MVert *mvert;
- int flag;
- unsigned char *cp = NULL;
+ if(drawParams) {
+ flag = drawParams(tf? &tf[i]: NULL, mcol? &mcol[i*4]: NULL, mf->mat_nr);
+ }
+ else {
+ if(index) {
+ orig = *index++;
+ if(orig == ORIGINDEX_NONE) { if(nors) nors += 3; continue; }
+ if(drawParamsMapped) flag = drawParamsMapped(userData, orig);
+ else { if(nors) nors += 3; continue; }
+ }
+ else
+ if(drawParamsMapped) flag = drawParamsMapped(userData, i);
+ else { if(nors) nors += 3; continue; }
+ }
+
+ if(flag != 0) {
+ if (flag==1 && mcol)
+ cp= (unsigned char*) &mcol[i*4];
+
+ if(!(mf->flag&ME_SMOOTH)) {
+ if (nors) {
+ glNormal3fv(nors);
+ }
+ else {
+ float nor[3];
+ if(mf->v4) {
+ CalcNormFloat4(mv[mf->v1].co, mv[mf->v2].co,
+ mv[mf->v3].co, mv[mf->v4].co,
+ nor);
+ } else {
+ CalcNormFloat(mv[mf->v1].co, mv[mf->v2].co,
+ mv[mf->v3].co, nor);
+ }
+ glNormal3fv(nor);
+ }
+ }
+
+ glBegin(mf->v4?GL_QUADS:GL_TRIANGLES);
+ if(tf) glTexCoord2fv(tf[i].uv[0]);
+ if(cp) glColor3ub(cp[3], cp[2], cp[1]);
+ mvert = &mv[mf->v1];
+ if(mf->flag&ME_SMOOTH) glNormal3sv(mvert->no);
+ glVertex3fv(mvert->co);
+
+ if(tf) glTexCoord2fv(tf[i].uv[1]);
+ if(cp) glColor3ub(cp[7], cp[6], cp[5]);
+ mvert = &mv[mf->v2];
+ if(mf->flag&ME_SMOOTH) glNormal3sv(mvert->no);
+ glVertex3fv(mvert->co);
- if(drawParams) {
- flag = drawParams(tf? &tf[i]: NULL, mcol != NULL, mf->mat_nr);
+ if(tf) glTexCoord2fv(tf[i].uv[2]);
+ if(cp) glColor3ub(cp[11], cp[10], cp[9]);
+ mvert = &mv[mf->v3];
+ if(mf->flag&ME_SMOOTH) glNormal3sv(mvert->no);
+ glVertex3fv(mvert->co);
+
+ if(mf->v4) {
+ if(tf) glTexCoord2fv(tf[i].uv[3]);
+ if(cp) glColor3ub(cp[15], cp[14], cp[13]);
+ mvert = &mv[mf->v4];
+ if(mf->flag&ME_SMOOTH) glNormal3sv(mvert->no);
+ glVertex3fv(mvert->co);
+ }
+ glEnd();
+ }
+
+ if(nors) nors += 3;
}
- else {
- if(index) {
- orig = *index++;
- if(orig == ORIGINDEX_NONE) { if(nors) nors += 3; continue; }
- if(drawParamsMapped) flag = drawParamsMapped(userData, orig);
- else { if(nors) nors += 3; continue; }
+ } else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
+ MCol *col = realcol;
+ if(!col)
+ col = mcol;
+
+ GPU_vertex_setup( dm );
+ GPU_normal_setup( dm );
+ GPU_uv_setup( dm );
+ if( col != 0 ) {
+ /*if( realcol && dm->drawObject->colType == CD_TEXTURE_MCOL ) {
+ col = 0;
+ } else if( mcol && dm->drawObject->colType == CD_MCOL ) {
+ col = 0;
}
- else
- if(drawParamsMapped) flag = drawParamsMapped(userData, i);
- else { if(nors) nors += 3; continue; }
+
+ if( col != 0 ) {*/
+ unsigned char *colors = MEM_mallocN(dm->getNumTessFaces(dm)*4*3*sizeof(unsigned char), "cdDM_drawFacesTex_common");
+ for( i=0; i < dm->getNumTessFaces(dm); i++ ) {
+ for( j=0; j < 4; j++ ) {
+ colors[i*12+j*3] = col[i*4+j].r;
+ colors[i*12+j*3+1] = col[i*4+j].g;
+ colors[i*12+j*3+2] = col[i*4+j].b;
+ }
+ }
+ GPU_color3_upload(dm,colors);
+ MEM_freeN(colors);
+ if(realcol)
+ dm->drawObject->colType = CD_TEXTURE_MCOL;
+ else if(mcol)
+ dm->drawObject->colType = CD_MCOL;
+ //}
+ GPU_color_setup( dm );
}
-
- if(flag != 0) { /* if the flag is 0 it means the face is hidden or invisible */
- if (flag==1 && mcol)
- cp= (unsigned char*) &mcol[i*4];
- if(!(mf->flag&ME_SMOOTH)) {
- if (nors) {
- glNormal3fv(nors);
+ if( !GPU_buffer_legacy(dm) ) {
+ glShadeModel( GL_SMOOTH );
+ for(i = 0; i < dm->drawObject->nelements/3; i++) {
+ int actualFace = dm->drawObject->faceRemap[i];
+ int flag = 1;
+
+ if(drawParams) {
+ flag = drawParams(tf? &tf[actualFace]: NULL, mcol? &mcol[actualFace*4]: NULL, mf[actualFace].mat_nr);
}
else {
- /* TODO make this better (cache facenormals as layer?) */
- float nor[3];
- if(mf->v4) {
- CalcNormFloat4(mv[mf->v1].co, mv[mf->v2].co,
- mv[mf->v3].co, mv[mf->v4].co,
- nor);
- } else {
- CalcNormFloat(mv[mf->v1].co, mv[mf->v2].co,
- mv[mf->v3].co, nor);
+ if(index) {
+ orig = index[actualFace];
+ if(drawParamsMapped)
+ flag = drawParamsMapped(userData, orig);
}
- glNormal3fv(nor);
+ else
+ if(drawParamsMapped)
+ flag = drawParamsMapped(userData, actualFace);
+ }
+ if( flag != lastFlag ) {
+ if( startFace < i ) {
+ if( lastFlag != 0 ) { /* if the flag is 0 it means the face is hidden or invisible */
+ if (lastFlag==1 && mcol)
+ GPU_color_switch(1);
+ else
+ GPU_color_switch(0);
+ glDrawArrays(GL_TRIANGLES,startFace*3,(i-startFace)*3);
+ }
+ }
+ lastFlag = flag;
+ startFace = i;
}
}
-
- glBegin(mf->v4?GL_QUADS:GL_TRIANGLES);
- if(tf) glTexCoord2fv(tf[i].uv[0]);
- if(cp) glColor3ub(cp[3], cp[2], cp[1]);
- mvert = &mv[mf->v1];
- if(mf->flag&ME_SMOOTH) glNormal3sv(mvert->no);
- glVertex3fv(mvert->co);
-
- if(tf) glTexCoord2fv(tf[i].uv[1]);
- if(cp) glColor3ub(cp[7], cp[6], cp[5]);
- mvert = &mv[mf->v2];
- if(mf->flag&ME_SMOOTH) glNormal3sv(mvert->no);
- glVertex3fv(mvert->co);
-
- if(tf) glTexCoord2fv(tf[i].uv[2]);
- if(cp) glColor3ub(cp[11], cp[10], cp[9]);
- mvert = &mv[mf->v3];
- if(mf->flag&ME_SMOOTH) glNormal3sv(mvert->no);
- glVertex3fv(mvert->co);
-
- if(mf->v4) {
- if(tf) glTexCoord2fv(tf[i].uv[3]);
- if(cp) glColor3ub(cp[15], cp[14], cp[13]);
- mvert = &mv[mf->v4];
- if(mf->flag&ME_SMOOTH) glNormal3sv(mvert->no);
- glVertex3fv(mvert->co);
+ if( startFace < dm->drawObject->nelements/3 ) {
+ if( lastFlag != 0 ) { /* if the flag is 0 it means the face is hidden or invisible */
+ if (lastFlag==1 && mcol)
+ GPU_color_switch(1);
+ else
+ GPU_color_switch(0);
+ glDrawArrays(GL_TRIANGLES,startFace*3,dm->drawObject->nelements-startFace*3);
+ }
}
- glEnd();
}
-
- if(nors) nors += 3;
+
+ GPU_buffer_unbind();
+ glShadeModel( GL_FLAT );
}
}
@@ -498,79 +730,130 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
float *nors= dm->getTessFaceDataArray(dm, CD_NORMAL);
int i, orig, *index = DM_get_tessface_data_layer(dm, CD_ORIGINDEX);
- mc = DM_get_tessface_data_layer(dm, CD_WEIGHT_MCOL);
+ mc = DM_get_tessface_data_layer(dm, CD_ID_MCOL);
+ if(!mc)
+ mc = DM_get_tessface_data_layer(dm, CD_WEIGHT_MCOL);
if(!mc)
mc = DM_get_tessface_data_layer(dm, CD_MCOL);
- for(i = 0; i < dm->numFaceData; i++, mf++) {
- int drawSmooth = (mf->flag & ME_SMOOTH);
+ if( GPU_buffer_legacy(dm) ) {
+ DEBUG_VBO( "Using legacy code. cdDM_drawMappedFaces\n" );
+ for(i = 0; i < dm->numFaceData; i++, mf++) {
+ int drawSmooth = (mf->flag & ME_SMOOTH);
- if(index) {
- orig = *index++;
- if(setDrawOptions && orig == ORIGINDEX_NONE)
- { if(nors) nors += 3; continue; }
- }
- else
- orig = i;
+ if(index) {
+ orig = *index++;
+ if(setDrawOptions && orig == ORIGINDEX_NONE)
+ { if(nors) nors += 3; continue; }
+ }
+ else
+ orig = i;
- if(!setDrawOptions || setDrawOptions(userData, orig, &drawSmooth)) {
- unsigned char *cp = NULL;
+ if(!setDrawOptions || setDrawOptions(userData, orig, &drawSmooth)) {
+ unsigned char *cp = NULL;
- if(useColors && mc)
- cp = (unsigned char *)&mc[i * 4];
+ if(useColors && mc)
+ cp = (unsigned char *)&mc[i * 4];
- glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);
- glBegin(mf->v4?GL_QUADS:GL_TRIANGLES);
+ glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);
+ glBegin(mf->v4?GL_QUADS:GL_TRIANGLES);
- if (!drawSmooth) {
- if (nors) {
- glNormal3fv(nors);
- }
- else {
- /* TODO make this better (cache facenormals as layer?) */
- float nor[3];
+ if (!drawSmooth) {
+ if (nors) {
+ glNormal3fv(nors);
+ }
+ else {
+ float nor[3];
+ if(mf->v4) {
+ CalcNormFloat4(mv[mf->v1].co, mv[mf->v2].co,
+ mv[mf->v3].co, mv[mf->v4].co,
+ nor);
+ } else {
+ CalcNormFloat(mv[mf->v1].co, mv[mf->v2].co,
+ mv[mf->v3].co, nor);
+ }
+ glNormal3fv(nor);
+ }
+
+ if(cp) glColor3ub(cp[3], cp[2], cp[1]);
+ glVertex3fv(mv[mf->v1].co);
+ if(cp) glColor3ub(cp[7], cp[6], cp[5]);
+ glVertex3fv(mv[mf->v2].co);
+ if(cp) glColor3ub(cp[11], cp[10], cp[9]);
+ glVertex3fv(mv[mf->v3].co);
if(mf->v4) {
- CalcNormFloat4(mv[mf->v1].co, mv[mf->v2].co,
- mv[mf->v3].co, mv[mf->v4].co,
- nor);
- } else {
- CalcNormFloat(mv[mf->v1].co, mv[mf->v2].co,
- mv[mf->v3].co, nor);
+ if(cp) glColor3ub(cp[15], cp[14], cp[13]);
+ glVertex3fv(mv[mf->v4].co);
+ }
+ } else {
+ if(cp) glColor3ub(cp[3], cp[2], cp[1]);
+ glNormal3sv(mv[mf->v1].no);
+ glVertex3fv(mv[mf->v1].co);
+ if(cp) glColor3ub(cp[7], cp[6], cp[5]);
+ glNormal3sv(mv[mf->v2].no);
+ glVertex3fv(mv[mf->v2].co);
+ if(cp) glColor3ub(cp[11], cp[10], cp[9]);
+ glNormal3sv(mv[mf->v3].no);
+ glVertex3fv(mv[mf->v3].co);
+ if(mf->v4) {
+ if(cp) glColor3ub(cp[15], cp[14], cp[13]);
+ glNormal3sv(mv[mf->v4].no);
+ glVertex3fv(mv[mf->v4].co);
}
- glNormal3fv(nor);
}
- if(cp) glColor3ub(cp[3], cp[2], cp[1]);
- glVertex3fv(mv[mf->v1].co);
- if(cp) glColor3ub(cp[7], cp[6], cp[5]);
- glVertex3fv(mv[mf->v2].co);
- if(cp) glColor3ub(cp[11], cp[10], cp[9]);
- glVertex3fv(mv[mf->v3].co);
- if(mf->v4) {
- if(cp) glColor3ub(cp[15], cp[14], cp[13]);
- glVertex3fv(mv[mf->v4].co);
+ glEnd();
+ }
+
+ if (nors) nors += 3;
+ }
+ }
+ else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
+ int state = 1;
+ int prevstate = 1;
+ int prevstart = 0;
+ GPU_vertex_setup(dm);
+ GPU_normal_setup(dm);
+ if( useColors && mc )
+ GPU_color_setup(dm);
+ if( !GPU_buffer_legacy(dm) ) {
+ glShadeModel(GL_SMOOTH);
+ for( i = 0; i < dm->drawObject->nelements/3; i++ ) {
+ int actualFace = dm->drawObject->faceRemap[i];
+ int drawSmooth = (mf[actualFace].flag & ME_SMOOTH);
+ int dontdraw = 0;
+ if(index) {
+ orig = index[actualFace];
+ if(setDrawOptions && orig == ORIGINDEX_NONE)
+ dontdraw = 1;
}
- } else {
- if(cp) glColor3ub(cp[3], cp[2], cp[1]);
- glNormal3sv(mv[mf->v1].no);
- glVertex3fv(mv[mf->v1].co);
- if(cp) glColor3ub(cp[7], cp[6], cp[5]);
- glNormal3sv(mv[mf->v2].no);
- glVertex3fv(mv[mf->v2].co);
- if(cp) glColor3ub(cp[11], cp[10], cp[9]);
- glNormal3sv(mv[mf->v3].no);
- glVertex3fv(mv[mf->v3].co);
- if(mf->v4) {
- if(cp) glColor3ub(cp[15], cp[14], cp[13]);
- glNormal3sv(mv[mf->v4].no);
- glVertex3fv(mv[mf->v4].co);
+ else
+ orig = i;
+ if( dontdraw ) {
+ state = 0;
+ }
+ else {
+ if(!setDrawOptions || setDrawOptions(userData, orig, &drawSmooth)) {
+ state = 1;
+ }
+ else {
+ state = 0;
+ }
+ }
+ if( prevstate != state && prevstate == 1 ) {
+ if( i-prevstart > 0 ) {
+ glDrawArrays(GL_TRIANGLES,prevstart*3,(i-prevstart)*3);
+ }
+ prevstart = i;
}
+ prevstate = state;
}
-
- glEnd();
+ if(state==1) {
+ glDrawArrays(GL_TRIANGLES,prevstart*3,dm->drawObject->nelements-prevstart*3);
+ }
+ glShadeModel(GL_FLAT);
}
-
- if (nors) nors += 3;
+ GPU_buffer_unbind();
}
}
@@ -598,106 +881,309 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
transp = GPU_get_material_blend_mode();
orig_transp = transp;
- memset(&attribs, 0, sizeof(attribs));
-
glShadeModel(GL_SMOOTH);
- glBegin(GL_QUADS);
- for(a = 0; a < dm->numFaceData; a++, mface++) {
- new_matnr = mface->mat_nr + 1;
+ if( GPU_buffer_legacy(dm) || setDrawOptions != 0 ) {
+ DEBUG_VBO( "Using legacy code. cdDM_drawMappedFacesGLSL\n" );
+ memset(&attribs, 0, sizeof(attribs));
- if(new_matnr != matnr) {
- glEnd();
+ glBegin(GL_QUADS);
- dodraw = setMaterial(matnr = new_matnr, &gattribs);
- if(dodraw)
- DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
+ for(a = 0; a < dm->numFaceData; a++, mface++) {
+ new_matnr = mface->mat_nr + 1;
- glBegin(GL_QUADS);
- }
+ if(new_matnr != matnr) {
+ glEnd();
- if(!dodraw) {
- continue;
- }
- else if(setDrawOptions) {
- orig = index[a];
+ dodraw = setMaterial(matnr = new_matnr, &gattribs);
+ if(dodraw)
+ DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
- if(orig == ORIGINDEX_NONE)
- continue;
- else if(!setDrawOptions(userData, orig))
+ glBegin(GL_QUADS);
+ }
+
+ if(!dodraw) {
continue;
- }
+ }
+ else if(setDrawOptions) {
+ orig = index[a];
- if(tf) {
- new_transp = tf[a].transp;
+ if(orig == ORIGINDEX_NONE)
+ continue;
+ else if(!setDrawOptions(userData, orig))
+ continue;
+ }
- if(new_transp != transp) {
- glEnd();
+ if(tf) {
+ new_transp = tf[a].transp;
- if(new_transp == GPU_BLEND_SOLID && orig_transp != GPU_BLEND_SOLID)
- GPU_set_material_blend_mode(orig_transp);
- else
- GPU_set_material_blend_mode(new_transp);
- transp = new_transp;
+ if(new_transp != transp) {
+ glEnd();
- glBegin(GL_QUADS);
+ if(new_transp == GPU_BLEND_SOLID && orig_transp != GPU_BLEND_SOLID)
+ GPU_set_material_blend_mode(orig_transp);
+ else
+ GPU_set_material_blend_mode(new_transp);
+ transp = new_transp;
+
+ glBegin(GL_QUADS);
+ }
}
- }
- smoothnormal = (mface->flag & ME_SMOOTH);
+ smoothnormal = (mface->flag & ME_SMOOTH);
- if(!smoothnormal) {
- if(nors) {
- glNormal3fv(nors[a]);
- }
- else {
- /* TODO ideally a normal layer should always be available */
- float nor[3];
- if(mface->v4) {
- CalcNormFloat4(mvert[mface->v1].co, mvert[mface->v2].co,
- mvert[mface->v3].co, mvert[mface->v4].co,
- nor);
- } else {
- CalcNormFloat(mvert[mface->v1].co, mvert[mface->v2].co,
- mvert[mface->v3].co, nor);
+ if(!smoothnormal) {
+ if(nors) {
+ glNormal3fv(nors[a]);
+ }
+ else {
+ /* TODO ideally a normal layer should always be available */
+ float nor[3];
+ if(mface->v4) {
+ CalcNormFloat4(mvert[mface->v1].co, mvert[mface->v2].co,
+ mvert[mface->v3].co, mvert[mface->v4].co,
+ nor);
+ } else {
+ CalcNormFloat(mvert[mface->v1].co, mvert[mface->v2].co,
+ mvert[mface->v3].co, nor);
+ }
+ glNormal3fv(nor);
}
- glNormal3fv(nor);
}
- }
#define PASSVERT(index, vert) { \
- if(attribs.totorco) \
- glVertexAttrib3fvARB(attribs.orco.glIndex, attribs.orco.array[index]); \
- for(b = 0; b < attribs.tottface; b++) { \
- MTFace *tf = &attribs.tface[b].array[a]; \
- glVertexAttrib2fvARB(attribs.tface[b].glIndex, tf->uv[vert]); \
- } \
- for(b = 0; b < attribs.totmcol; b++) { \
- MCol *cp = &attribs.mcol[b].array[a*4 + vert]; \
- GLubyte col[4]; \
- col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a; \
- glVertexAttrib4ubvARB(attribs.mcol[b].glIndex, col); \
- } \
- if(attribs.tottang) { \
- float *tang = attribs.tang.array[a*4 + vert]; \
- glVertexAttrib3fvARB(attribs.tang.glIndex, tang); \
- } \
- if(smoothnormal) \
- glNormal3sv(mvert[index].no); \
- glVertex3fv(mvert[index].co); \
-}
-
- PASSVERT(mface->v1, 0);
- PASSVERT(mface->v2, 1);
- PASSVERT(mface->v3, 2);
- if(mface->v4)
- PASSVERT(mface->v4, 3)
- else
- PASSVERT(mface->v3, 2)
+ if(attribs.totorco) \
+ glVertexAttrib3fvARB(attribs.orco.glIndex, attribs.orco.array[index]); \
+ for(b = 0; b < attribs.tottface; b++) { \
+ MTFace *tf = &attribs.tface[b].array[a]; \
+ glVertexAttrib2fvARB(attribs.tface[b].glIndex, tf->uv[vert]); \
+ } \
+ for(b = 0; b < attribs.totmcol; b++) { \
+ MCol *cp = &attribs.mcol[b].array[a*4 + vert]; \
+ GLubyte col[4]; \
+ col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a; \
+ glVertexAttrib4ubvARB(attribs.mcol[b].glIndex, col); \
+ } \
+ if(attribs.tottang) { \
+ float *tang = attribs.tang.array[a*4 + vert]; \
+ glVertexAttrib3fvARB(attribs.tang.glIndex, tang); \
+ } \
+ if(smoothnormal) \
+ glNormal3sv(mvert[index].no); \
+ glVertex3fv(mvert[index].co); \
+ }
+
+ PASSVERT(mface->v1, 0);
+ PASSVERT(mface->v2, 1);
+ PASSVERT(mface->v3, 2);
+ if(mface->v4)
+ PASSVERT(mface->v4, 3)
+ else
+ PASSVERT(mface->v3, 2)
#undef PASSVERT
+ }
+ glEnd();
+ }
+ else {
+ GPUBuffer *buffer = 0;
+ char *varray = 0;
+ int numdata = 0, elementsize = 0, offset;
+ int start = 0, numfaces = 0, prevdraw = 0, curface = 0;
+ GPUAttrib datatypes[32];
+ memset(&attribs, 0, sizeof(attribs));
+
+ GPU_vertex_setup(dm);
+ GPU_normal_setup(dm);
+
+ if( !GPU_buffer_legacy(dm) ) {
+ for(a = 0; a < dm->numFaceData; a++, mface++) {
+ new_matnr = mface->mat_nr + 1;
+
+ if(new_matnr != matnr ) {
+ numfaces = curface - start;
+ if( numfaces > 0 ) {
+ if( prevdraw ) {
+ GPU_buffer_unlock(buffer);
+ GPU_interleaved_attrib_setup(buffer,datatypes,numdata);
+ glDrawArrays(GL_TRIANGLES,start*3,numfaces*3);
+ GPU_buffer_free(buffer,0);
+ }
+ }
+ start = curface;
+ prevdraw = dodraw;
+ dodraw = setMaterial(matnr = new_matnr, &gattribs);
+ if(dodraw) {
+ DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
+
+ if(attribs.totorco) {
+ datatypes[numdata].index = attribs.orco.glIndex;
+ datatypes[numdata].size = 3;
+ datatypes[numdata].type = GL_FLOAT;
+ numdata++;
+ }
+ for(b = 0; b < attribs.tottface; b++) {
+ datatypes[numdata].index = attribs.tface[b].glIndex;
+ datatypes[numdata].size = 2;
+ datatypes[numdata].type = GL_FLOAT;
+ numdata++;
+ }
+ for(b = 0; b < attribs.totmcol; b++) {
+ datatypes[numdata].index = attribs.mcol[b].glIndex;
+ datatypes[numdata].size = 4;
+ datatypes[numdata].type = GL_UNSIGNED_BYTE;
+ numdata++;
+ }
+ if(attribs.tottang) {
+ datatypes[numdata].index = attribs.tang.glIndex;
+ datatypes[numdata].size = 3;
+ datatypes[numdata].type = GL_FLOAT;
+ numdata++;
+ }
+ if( numdata != 0 ) {
+ elementsize = GPU_attrib_element_size( datatypes, numdata );
+ buffer = GPU_buffer_alloc( elementsize*dm->drawObject->nelements, 0 );
+ if( buffer == 0 ) {
+ GPU_buffer_unbind();
+ dm->drawObject->legacy = 1;
+ return;
+ }
+ varray = GPU_buffer_lock_stream(buffer);
+ if( varray == 0 ) {
+ GPU_buffer_unbind();
+ GPU_buffer_free(buffer, 0);
+ dm->drawObject->legacy = 1;
+ return;
+ }
+ }
+ }
+ }
+ if(!dodraw) {
+ continue;
+ }
+
+ if(tf) {
+ new_transp = tf[a].transp;
+
+ if(new_transp != transp) {
+ numfaces = curface - start;
+ if( numfaces > 0 ) {
+ if( dodraw ) {
+ if( numdata != 0 ) {
+ GPU_buffer_unlock(buffer);
+ GPU_interleaved_attrib_setup(buffer,datatypes,numdata);
+ }
+ glDrawArrays(GL_TRIANGLES,start*3,(curface-start)*3);
+ if( numdata != 0 ) {
+ varray = GPU_buffer_lock_stream(buffer);
+ }
+ }
+ }
+ start = curface;
+
+ if(new_transp == GPU_BLEND_SOLID && orig_transp != GPU_BLEND_SOLID)
+ GPU_set_material_blend_mode(orig_transp);
+ else
+ GPU_set_material_blend_mode(new_transp);
+ transp = new_transp;
+ }
+ }
+
+ if( numdata != 0 ) {
+ offset = 0;
+ if(attribs.totorco) {
+ VECCOPY((float *)&varray[elementsize*curface*3],(float *)attribs.orco.array[mface->v1]);
+ VECCOPY((float *)&varray[elementsize*curface*3+elementsize],(float *)attribs.orco.array[mface->v2]);
+ VECCOPY((float *)&varray[elementsize*curface*3+elementsize*2],(float *)attribs.orco.array[mface->v3]);
+ offset += sizeof(float)*3;
+ }
+ for(b = 0; b < attribs.tottface; b++) {
+ MTFace *tf = &attribs.tface[b].array[a];
+ VECCOPY((float *)&varray[elementsize*curface*3+offset],tf->uv[0]);
+ VECCOPY((float *)&varray[elementsize*curface*3+offset+elementsize],tf->uv[1]);
+ VECCOPY((float *)&varray[elementsize*curface*3+offset+elementsize*2],tf->uv[2]);
+ offset += sizeof(float)*2;
+ }
+ for(b = 0; b < attribs.totmcol; b++) {
+ MCol *cp = &attribs.mcol[b].array[a*4 + 0];
+ GLubyte col[4];
+ col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
+ QUATCOPY((unsigned char *)&varray[elementsize*curface*3+offset], col);
+ cp = &attribs.mcol[b].array[a*4 + 1];
+ col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
+ QUATCOPY((unsigned char *)&varray[elementsize*curface*3+offset+elementsize], col);
+ cp = &attribs.mcol[b].array[a*4 + 2];
+ col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
+ QUATCOPY((unsigned char *)&varray[elementsize*curface*3+offset+elementsize*2], col);
+ offset += sizeof(unsigned char)*4;
+ }
+ if(attribs.tottang) {
+ float *tang = attribs.tang.array[a*4 + 0];
+ VECCOPY((float *)&varray[elementsize*curface*3+offset], tang);
+ tang = attribs.tang.array[a*4 + 1];
+ VECCOPY((float *)&varray[elementsize*curface*3+offset+elementsize], tang);
+ tang = attribs.tang.array[a*4 + 2];
+ VECCOPY((float *)&varray[elementsize*curface*3+offset+elementsize], tang);
+ offset += sizeof(float)*3;
+ }
+ }
+ curface++;
+ if(mface->v4) {
+ if( numdata != 0 ) {
+ offset = 0;
+ if(attribs.totorco) {
+ VECCOPY((float *)&varray[elementsize*curface*3],(float *)attribs.orco.array[mface->v3]);
+ VECCOPY((float *)&varray[elementsize*curface*3+elementsize],(float *)attribs.orco.array[mface->v4]);
+ VECCOPY((float *)&varray[elementsize*curface*3+elementsize*2],(float *)attribs.orco.array[mface->v1]);
+ offset += sizeof(float)*3;
+ }
+ for(b = 0; b < attribs.tottface; b++) {
+ MTFace *tf = &attribs.tface[b].array[a];
+ VECCOPY((float *)&varray[elementsize*curface*3+offset],tf->uv[2]);
+ VECCOPY((float *)&varray[elementsize*curface*3+offset+elementsize],tf->uv[3]);
+ VECCOPY((float *)&varray[elementsize*curface*3+offset+elementsize*2],tf->uv[0]);
+ offset += sizeof(float)*2;
+ }
+ for(b = 0; b < attribs.totmcol; b++) {
+ MCol *cp = &attribs.mcol[b].array[a*4 + 2];
+ GLubyte col[4];
+ col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
+ QUATCOPY((unsigned char *)&varray[elementsize*curface*3+offset], col);
+ cp = &attribs.mcol[b].array[a*4 + 3];
+ col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
+ QUATCOPY((unsigned char *)&varray[elementsize*curface*3+offset+elementsize], col);
+ cp = &attribs.mcol[b].array[a*4 + 0];
+ col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
+ QUATCOPY((unsigned char *)&varray[elementsize*curface*3+offset+elementsize*2], col);
+ offset += sizeof(unsigned char)*4;
+ }
+ if(attribs.tottang) {
+ float *tang = attribs.tang.array[a*4 + 2];
+ VECCOPY((float *)&varray[elementsize*curface*3+offset], tang);
+ tang = attribs.tang.array[a*4 + 3];
+ VECCOPY((float *)&varray[elementsize*curface*3+offset+elementsize], tang);
+ tang = attribs.tang.array[a*4 + 0];
+ VECCOPY((float *)&varray[elementsize*curface*3+offset+elementsize], tang);
+ offset += sizeof(float)*3;
+ }
+ }
+ curface++;
+ }
+ }
+ numfaces = curface - start;
+ if( numfaces > 0 ) {
+ if( dodraw ) {
+ if( numdata != 0 ) {
+ GPU_buffer_unlock(buffer);
+ GPU_interleaved_attrib_setup(buffer,datatypes,numdata);
+ }
+ glDrawArrays(GL_TRIANGLES,start*3,(curface-start)*3);
+ }
+ }
+ GPU_buffer_unbind();
+ }
+ GPU_buffer_free( buffer, 0 );
}
- glEnd();
glShadeModel(GL_FLAT);
}
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index bd737ccdc3f..8a9c88e2ce5 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -154,6 +154,9 @@ void cloth_init ( ClothModifierData *clmd )
clmd->sim_parms->defgoal = 0.0f;
clmd->sim_parms->goalspring = 1.0f;
clmd->sim_parms->goalfrict = 0.0f;
+
+ if(!clmd->sim_parms->effector_weights)
+ clmd->sim_parms->effector_weights = BKE_add_effector_weights(NULL);
}
static BVHTree *bvhselftree_build_from_cloth (ClothModifierData *clmd, float epsilon)
@@ -403,6 +406,8 @@ static int do_step_cloth(Object *ob, ClothModifierData *clmd, DerivedMesh *resul
VECCOPY(verts->xconst, mvert[i].co);
Mat4MulVecfl(ob->obmat, verts->xconst);
}
+
+ effectors = pdInitEffectors(clmd->scene, ob, NULL, clmd->sim_parms->effector_weights);
tstart();
@@ -412,6 +417,8 @@ static int do_step_cloth(Object *ob, ClothModifierData *clmd, DerivedMesh *resul
tend();
+ pdEndEffectors(&effectors);
+
// printf ( "%f\n", ( float ) tval() );
return ret;
@@ -1161,25 +1168,66 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
BLI_linklist_prepend ( &cloth->springs, spring );
}
- // bending springs
- search2 = cloth->springs;
- for ( i = struct_springs; i < struct_springs+shear_springs; i++ )
- {
- if ( !search2 )
- break;
+ if(numfaces) {
+ // bending springs
+ search2 = cloth->springs;
+ for ( i = struct_springs; i < struct_springs+shear_springs; i++ )
+ {
+ if ( !search2 )
+ break;
- tspring2 = search2->link;
- search = edgelist[tspring2->kl];
- while ( search )
+ tspring2 = search2->link;
+ search = edgelist[tspring2->kl];
+ while ( search )
+ {
+ tspring = search->link;
+ index2 = ( ( tspring->ij==tspring2->kl ) ? ( tspring->kl ) : ( tspring->ij ) );
+
+ // check for existing spring
+ // check also if startpoint is equal to endpoint
+ if ( !BLI_edgehash_haskey ( edgehash, MIN2(tspring2->ij, index2), MAX2(tspring2->ij, index2) )
+ && ( index2!=tspring2->ij ) )
+ {
+ spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
+
+ if(!spring)
+ {
+ cloth_free_errorsprings(cloth, edgehash, edgelist);
+ return 0;
+ }
+
+ spring->ij = MIN2(tspring2->ij, index2);
+ spring->kl = MAX2(tspring2->ij, index2);
+ VECSUB ( temp, cloth->verts[spring->kl].x, cloth->verts[spring->ij].x );
+ spring->restlen = sqrt ( INPR ( temp, temp ) );
+ spring->type = CLOTH_SPRING_TYPE_BENDING;
+ spring->stiffness = (cloth->verts[spring->kl].bend_stiff + cloth->verts[spring->ij].bend_stiff) / 2.0;
+ BLI_edgehash_insert ( edgehash, spring->ij, spring->kl, NULL );
+ bend_springs++;
+
+ BLI_linklist_prepend ( &cloth->springs, spring );
+ }
+ search = search->next;
+ }
+ search2 = search2->next;
+ }
+ }
+ else if(struct_springs > 2) {
+ /* bending springs for hair strands */
+ /* The current algorightm only goes through the edges in order of the mesh edges list */
+ /* and makes springs between the outer vert of edges sharing a vertice. This works just */
+ /* fine for hair, but not for user generated string meshes. This could/should be later */
+ /* extended to work with non-ordered edges so that it can be used for general "rope */
+ /* dynamics" without the need for the vertices or edges to be ordered through the length*/
+ /* of the strands. -jahka */
+ search = cloth->springs;
+ search2 = search->next;
+ while(search && search2)
{
tspring = search->link;
- index2 = ( ( tspring->ij==tspring2->kl ) ? ( tspring->kl ) : ( tspring->ij ) );
-
- // check for existing spring
- // check also if startpoint is equal to endpoint
- if ( !BLI_edgehash_haskey ( edgehash, MIN2(tspring2->ij, index2), MAX2(tspring2->ij, index2) )
- && ( index2!=tspring2->ij ) )
- {
+ tspring2 = search2->link;
+
+ if(tspring->ij == tspring2->kl) {
spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
if(!spring)
@@ -1188,20 +1236,20 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
return 0;
}
- spring->ij = MIN2(tspring2->ij, index2);
- spring->kl = MAX2(tspring2->ij, index2);
+ spring->ij = tspring2->ij;
+ spring->kl = tspring->kl;
VECSUB ( temp, cloth->verts[spring->kl].x, cloth->verts[spring->ij].x );
spring->restlen = sqrt ( INPR ( temp, temp ) );
spring->type = CLOTH_SPRING_TYPE_BENDING;
spring->stiffness = (cloth->verts[spring->kl].bend_stiff + cloth->verts[spring->ij].bend_stiff) / 2.0;
- BLI_edgehash_insert ( edgehash, spring->ij, spring->kl, NULL );
bend_springs++;
BLI_linklist_prepend ( &cloth->springs, spring );
}
+
search = search->next;
+ search2 = search2->next;
}
- search2 = search2->next;
}
/* insert other near springs in edgehash AFTER bending springs are calculated (for selfcolls) */
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index 8ef1c285370..8c664bc1a57 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -45,9 +45,9 @@
#include "BKE_modifier.h"
#include "BKE_utildefines.h"
#include "BKE_DerivedMesh.h"
-
+#ifdef USE_BULLET
#include "Bullet-C-Api.h"
-
+#endif
#include "BLI_kdopbvh.h"
#include "BKE_collision.h"
@@ -1296,15 +1296,15 @@ static int cloth_collision_moving ( ClothModifierData *clmd, CollisionModifierDa
// return all collision objects in scene
// collision object will exclude self
-CollisionModifierData **get_collisionobjects(Scene *scene, Object *self, int *numcollobj)
+Object **get_collisionobjects(Scene *scene, Object *self, int *numcollobj)
{
Base *base=NULL;
- CollisionModifierData **objs = NULL;
+ Object **objs = NULL;
Object *coll_ob = NULL;
CollisionModifierData *collmd = NULL;
int numobj = 0, maxobj = 100;
- objs = MEM_callocN(sizeof(CollisionModifierData *)*maxobj, "CollisionObjectsArray");
+ objs = MEM_callocN(sizeof(Object *)*maxobj, "CollisionObjectsArray");
// check all collision objects
for ( base = scene->base.first; base; base = base->next )
{
@@ -1330,16 +1330,16 @@ CollisionModifierData **get_collisionobjects(Scene *scene, Object *self, int *nu
{
// realloc
int oldmax = maxobj;
- CollisionModifierData **tmp;
+ Object **tmp;
maxobj *= 2;
- tmp = MEM_callocN(sizeof(CollisionModifierData *)*maxobj, "CollisionObjectsArray");
- memcpy(tmp, objs, sizeof(CollisionModifierData *)*oldmax);
+ tmp = MEM_callocN(sizeof(Object *)*maxobj, "CollisionObjectsArray");
+ memcpy(tmp, objs, sizeof(Object *)*oldmax);
MEM_freeN(objs);
objs = tmp;
}
- objs[numobj] = collmd;
+ objs[numobj] = coll_ob;
numobj++;
}
else
@@ -1374,15 +1374,15 @@ CollisionModifierData **get_collisionobjects(Scene *scene, Object *self, int *nu
{
// realloc
int oldmax = maxobj;
- CollisionModifierData **tmp;
+ Object **tmp;
maxobj *= 2;
- tmp = MEM_callocN(sizeof(CollisionModifierData *)*maxobj, "CollisionObjectsArray");
- memcpy(tmp, objs, sizeof(CollisionModifierData *)*oldmax);
+ tmp = MEM_callocN(sizeof(Object *)*maxobj, "CollisionObjectsArray");
+ memcpy(tmp, objs, sizeof(Object *)*oldmax);
MEM_freeN(objs);
objs = tmp;
}
- objs[numobj] = collmd;
+ objs[numobj] = coll_ob;
numobj++;
}
}
@@ -1392,6 +1392,97 @@ CollisionModifierData **get_collisionobjects(Scene *scene, Object *self, int *nu
return objs;
}
+ListBase *get_collider_cache(Scene *scene, Object *self)
+{
+ Base *base=NULL;
+ ListBase *objs = NULL;
+ Object *coll_ob = NULL;
+ CollisionModifierData *collmd = NULL;
+ ColliderCache *col;
+
+ // check all collision objects
+ for ( base = scene->base.first; base; base = base->next )
+ {
+ /*Only proceed for mesh object in same layer */
+ if(base->object->type!=OB_MESH)
+ continue;
+
+ if(self && (base->lay & self->lay)==0)
+ continue;
+
+
+ coll_ob = base->object;
+
+ if(coll_ob == self)
+ continue;
+
+ if(coll_ob->pd && coll_ob->pd->deflect)
+ {
+ collmd = ( CollisionModifierData * ) modifiers_findByType ( coll_ob, eModifierType_Collision );
+ }
+ else
+ collmd = NULL;
+
+ if ( collmd )
+ {
+ if(objs == NULL)
+ objs = MEM_callocN(sizeof(ListBase), "ColliderCache array");
+
+ col = MEM_callocN(sizeof(ColliderCache), "ColliderCache");
+ col->ob = coll_ob;
+ col->collmd = collmd;
+ /* make sure collider is properly set up */
+ collision_move_object(collmd, 1.0, 0.0);
+ BLI_addtail(objs, col);
+ }
+ else if ( coll_ob->dup_group )
+ {
+ GroupObject *go;
+ Group *group = coll_ob->dup_group;
+
+ for ( go= group->gobject.first; go; go= go->next )
+ {
+ coll_ob = go->ob;
+ collmd = NULL;
+
+ if(coll_ob == self)
+ continue;
+
+ if(coll_ob->pd && coll_ob->pd->deflect)
+ {
+ collmd = ( CollisionModifierData * ) modifiers_findByType ( coll_ob, eModifierType_Collision );
+ }
+ else
+ collmd = NULL;
+
+ if ( !collmd )
+ continue;
+
+ if( !collmd->bvhtree)
+ continue;
+
+ if(objs == NULL)
+ objs = MEM_callocN(sizeof(ListBase), "ColliderCache array");
+
+ col = MEM_callocN(sizeof(ColliderCache), "ColliderCache");
+ col->ob = coll_ob;
+ col->collmd = collmd;
+ /* make sure collider is properly set up */
+ collision_move_object(collmd, 1.0, 0.0);
+ BLI_addtail(objs, col);
+ }
+ }
+ }
+ return objs;
+}
+void free_collider_cache(ListBase **colliders)
+{
+ if(*colliders) {
+ BLI_freelistN(*colliders);
+ MEM_freeN(*colliders);
+ *colliders = NULL;
+ }
+}
static void cloth_bvh_objcollisions_nearcheck ( ClothModifierData * clmd, CollisionModifierData *collmd, CollPair **collisions, CollPair **collisions_index, int numresult, BVHTreeOverlap *overlap)
{
int i;
@@ -1459,7 +1550,7 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
int rounds = 0; // result counts applied collisions; ic is for debug output;
ClothVertex *verts = NULL;
int ret = 0, ret2 = 0;
- CollisionModifierData **collobjs = NULL;
+ Object **collobjs = NULL;
int numcollobj = 0;
if ( ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) || ! ( ( ( Cloth * ) clmd->clothObject )->bvhtree ) )
@@ -1498,7 +1589,8 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
// check all collision objects
for(i = 0; i < numcollobj; i++)
{
- CollisionModifierData *collmd = collobjs[i];
+ Object *collob= collobjs[i];
+ CollisionModifierData *collmd = (CollisionModifierData*)modifiers_findByType(collob, eModifierType_Collision);
BVHTreeOverlap *overlap = NULL;
int result = 0;
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index ad474fb7910..af8fed15efe 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -687,9 +687,19 @@ static void default_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstrain
ct->flag= CONSTRAINT_TAR_TEMP; \
\
if (ct->tar) { \
- if ((ct->tar->type==OB_ARMATURE) && (ct->subtarget[0])) ct->type = CONSTRAINT_OBTYPE_BONE; \
- else if (ELEM(ct->tar->type, OB_MESH, OB_LATTICE) && (ct->subtarget[0])) ct->type = CONSTRAINT_OBTYPE_VERT; \
- else ct->type = CONSTRAINT_OBTYPE_OBJECT; \
+ if ((ct->tar->type==OB_ARMATURE) && (ct->subtarget[0])) { \
+ bPoseChannel *pchan= get_pose_channel(ct->tar->pose, ct->subtarget); \
+ ct->type = CONSTRAINT_OBTYPE_BONE; \
+ ct->rotOrder= (pchan) ? (pchan->rotmode) : EULER_ORDER_DEFAULT; \
+ }\
+ else if (ELEM(ct->tar->type, OB_MESH, OB_LATTICE) && (ct->subtarget[0])) { \
+ ct->type = CONSTRAINT_OBTYPE_VERT; \
+ ct->rotOrder = EULER_ORDER_DEFAULT; \
+ } \
+ else {\
+ ct->type = CONSTRAINT_OBTYPE_OBJECT; \
+ ct->rotOrder= ct->tar->rotmode; \
+ } \
} \
\
BLI_addtail(list, ct); \
@@ -1047,6 +1057,7 @@ static void kinematic_new_data (void *cdata)
data->weight= (float)1.0;
data->orientweight= (float)1.0;
data->iterations = 500;
+ data->dist= (float)1.0;
data->flag= CONSTRAINT_IK_TIP|CONSTRAINT_IK_STRETCH|CONSTRAINT_IK_POS;
}
@@ -1182,7 +1193,10 @@ static void followpath_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr
if (cu->path && cu->path->data) {
if ((data->followflag & FOLLOWPATH_STATIC) == 0) {
/* animated position along curve depending on time */
- curvetime= bsystem_time(cob->scene, ct->tar, ctime, 0.0) - data->offset;
+ if (cob->scene)
+ curvetime= bsystem_time(cob->scene, ct->tar, ctime, 0.0) - data->offset;
+ else
+ curvetime= ctime - data->offset;
/* ctime is now a proper var setting of Curve which gets set by Animato like any other var that's animated,
* but this will only work if it actually is animated...
@@ -1582,7 +1596,8 @@ static void rotlike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
VECCOPY(loc, cob->matrix[3]);
Mat4ToSize(cob->matrix, size);
- Mat4ToEulO(ct->matrix, eul, ct->rotOrder);
+ /* to allow compatible rotations, must get both rotations in the order of the owner... */
+ Mat4ToEulO(ct->matrix, eul, cob->rotOrder);
Mat4ToEulO(cob->matrix, obeul, cob->rotOrder);
if ((data->flag & ROTLIKE_X)==0)
@@ -3540,7 +3555,7 @@ short proxylocked_constraints_owner (Object *ob, bPoseChannel *pchan)
* None of the actual calculations of the matricies should be done here! Also, this function is
* not to be used by any new constraints, particularly any that have multiple targets.
*/
-void get_constraint_target_matrix (bConstraint *con, int n, short ownertype, void *ownerdata, float mat[][4], float ctime)
+void get_constraint_target_matrix (struct Scene *scene, bConstraint *con, int n, short ownertype, void *ownerdata, float mat[][4], float ctime)
{
bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
@@ -3551,6 +3566,7 @@ void get_constraint_target_matrix (bConstraint *con, int n, short ownertype, voi
/* make 'constraint-ob' */
cob= MEM_callocN(sizeof(bConstraintOb), "tempConstraintOb");
cob->type= ownertype;
+ cob->scene = scene;
switch (ownertype) {
case CONSTRAINT_OBTYPE_OBJECT: /* it is usually this case */
{
@@ -3633,7 +3649,7 @@ void solve_constraints (ListBase *conlist, bConstraintOb *cob, float ctime)
/* these we can skip completely (invalid constraints...) */
if (cti == NULL) continue;
- if (con->flag & CONSTRAINT_DISABLE) continue;
+ if (con->flag & (CONSTRAINT_DISABLE|CONSTRAINT_OFF)) continue;
/* these constraints can't be evaluated anyway */
if (cti->evaluate_constraint == NULL) continue;
/* influence == 0 should be ignored */
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index bbfe077c15e..d5cc31d918a 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -441,7 +441,7 @@ static void *ctx_data_pointer_get(const bContext *C, const char *member)
{
bContextDataResult result;
- if(ctx_data_get((bContext*)C, member, &result))
+ if(C && ctx_data_get((bContext*)C, member, &result))
return result.ptr.data;
return NULL;
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index ea3fce9ffaf..2ce877bd847 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -1616,7 +1616,7 @@ static void bevel_list_flip_tangents(BevList *bl)
nr= bl->nr;
while(nr--) {
- if(VecAngle2(bevp0->tan, bevp1->tan) > 90)
+ if(RAD2DEG(VecAngle2(bevp0->tan, bevp1->tan)) > 90)
VecNegf(bevp1->tan);
bevp0= bevp1;
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 814b85dad2a..2d743a33106 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -871,6 +871,10 @@ const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
{sizeof(MLoopCol), "MLoopCol", 1, "WeightLoopCol", NULL, NULL, layerInterp_mloopcol, NULL,
layerDefault_mloopcol, layerEqual_mloopcol, layerMultiply_mloopcol, layerInitMinMax_mloopcol,
layerAdd_mloopcol, layerDoMinMax_mloopcol, layerCopyValue_mloopcol},
+ {sizeof(MCol)*4, "MCol", 4, "IDCol", NULL, NULL, layerInterp_mcol,
+ layerSwap_mcol, layerDefault_mcol},
+ {sizeof(MCol)*4, "MCol", 4, "TextureCol", NULL, NULL, layerInterp_mcol,
+ layerSwap_mcol, layerDefault_mcol},
};
const char *LAYERTYPENAMES[CD_NUMTYPES] = {
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 58f3db50d0f..26ea17a296a 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -521,8 +521,8 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
/* softbody collision */
if((ob->type==OB_MESH) || (ob->type==OB_CURVE) || (ob->type==OB_LATTICE))
- if(modifiers_isSoftbodyEnabled(ob) || modifiers_isClothEnabled(ob))
- dag_add_collision_field_relation(dag, scene, ob, node);
+ if(modifiers_isSoftbodyEnabled(ob) || modifiers_isClothEnabled(ob) || ob->particlesystem.first)
+ dag_add_collision_field_relation(dag, scene, ob, node); /* TODO: use effectorweight->group */
if (ob->type==OB_MBALL) {
Object *mom= find_basis_mball(scene, ob);
@@ -554,13 +554,14 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
psys= ob->particlesystem.first;
if(psys) {
- ParticleEffectorCache *nec;
GroupObject *go;
for(; psys; psys=psys->next) {
BoidRule *rule = NULL;
BoidState *state = NULL;
ParticleSettings *part= psys->part;
+ ListBase *effectors = NULL;
+ EffectorCache *eff;
dag_add_relation(dag, node, node, DAG_RL_OB_DATA, "Particle-Object Relation");
@@ -592,34 +593,17 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
}
}
- psys_end_effectors(psys);
- psys_init_effectors(scene, ob, psys->part->eff_group, psys);
+ effectors = pdInitEffectors(scene, ob, psys, part->effector_weights);
- for(nec= psys->effectors.first; nec; nec= nec->next) {
- Object *ob1= nec->ob;
-
- if(nec->type & PSYS_EC_EFFECTOR) {
- node2 = dag_get_node(dag, ob1);
- if(ob1->pd->forcefield==PFIELD_GUIDE)
- dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Particle Field");
- else
- dag_add_relation(dag, node2, node, DAG_RL_OB_DATA, "Particle Field");
- }
- else if(nec->type & PSYS_EC_DEFLECT) {
- node2 = dag_get_node(dag, ob1);
- dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Particle Collision");
- }
- else if(nec->type & PSYS_EC_PARTICLE) {
- node2 = dag_get_node(dag, ob1);
- dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA, "Particle Field");
- }
-
- if(nec->type & PSYS_EC_REACTOR) {
- node2 = dag_get_node(dag, ob1);
- dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA, "Particle Reactor");
+ if(effectors) for(eff = effectors->first; eff; eff=eff->next) {
+ if(eff->psys) {
+ node2 = dag_get_node(dag, eff->ob);
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Particle Field");
}
}
+ pdEndEffectors(&effectors);
+
if(part->boids) {
for(state = part->boids->states.first; state; state=state->next) {
for(rule = state->rules.first; rule; rule=rule->next) {
@@ -1607,6 +1591,21 @@ void graph_print_adj_list(void)
/* ************************ API *********************** */
+/* mechanism to allow editors to be informed of depsgraph updates,
+ to do their own updates based on changes... */
+static void (*EditorsUpdateCb)(Main *bmain, ID *id)= NULL;
+
+void DAG_editors_update_cb(void (*func)(Main *bmain, ID *id))
+{
+ EditorsUpdateCb= func;
+}
+
+static void dag_editors_update(Main *bmain, ID *id)
+{
+ if(EditorsUpdateCb)
+ EditorsUpdateCb(bmain, id);
+}
+
/* groups with objects in this scene need to be put in the right order as well */
static void scene_sort_groups(Scene *sce)
{
@@ -2038,7 +2037,6 @@ static void dag_object_time_update_flags(Object *ob)
if(me->key) {
if(!(ob->shapeflag & OB_SHAPE_LOCK)) {
ob->recalc |= OB_RECALC_DATA;
- ob->shapeflag &= ~OB_SHAPE_TEMPLOCK;
}
}
if(ob->particlesystem.first)
@@ -2050,7 +2048,6 @@ static void dag_object_time_update_flags(Object *ob)
if(cu->key) {
if(!(ob->shapeflag & OB_SHAPE_LOCK)) {
ob->recalc |= OB_RECALC_DATA;
- ob->shapeflag &= ~OB_SHAPE_TEMPLOCK;
}
}
break;
@@ -2064,7 +2061,6 @@ static void dag_object_time_update_flags(Object *ob)
if(lt->key) {
if(!(ob->shapeflag & OB_SHAPE_LOCK)) {
ob->recalc |= OB_RECALC_DATA;
- ob->shapeflag &= ~OB_SHAPE_TEMPLOCK;
}
}
break;
@@ -2202,7 +2198,7 @@ void DAG_id_flush_update(ID *id, short flag)
/* set flags & pointcache for object */
if(GS(id->name) == ID_OB) {
ob= (Object*)id;
- ob->recalc |= flag;
+ ob->recalc |= (flag & OB_RECALC);
BKE_ptcache_object_reset(sce, ob, PTCACHE_RESET_DEPSGRAPH);
if(flag & OB_RECALC_DATA) {
@@ -2217,7 +2213,7 @@ void DAG_id_flush_update(ID *id, short flag)
else if(ob->type==OB_CURVE || ob->type==OB_SURF)
id= NULL;
/* also for locked shape keys we make an exception */
- else if(ob_get_key(ob) && (ob->shapeflag & (OB_SHAPE_LOCK|OB_SHAPE_TEMPLOCK)))
+ else if(ob_get_key(ob) && (ob->shapeflag & OB_SHAPE_LOCK))
id= NULL;
}
}
@@ -2239,6 +2235,23 @@ void DAG_id_flush_update(ID *id, short flag)
}
}
}
+
+ /* set flags based on particle settings */
+ if(idtype == ID_PA) {
+ ParticleSystem *psys;
+ for(obt=bmain->object.first; obt; obt= obt->id.next) {
+ for(psys=obt->particlesystem.first; psys; psys=psys->next) {
+ if(&psys->part->id == id) {
+ BKE_ptcache_object_reset(sce, obt, PTCACHE_RESET_DEPSGRAPH);
+ obt->recalc |= (flag & OB_RECALC);
+ psys->recalc |= (flag & PSYS_RECALC);
+ }
+ }
+ }
+ }
+
+ /* update editors */
+ dag_editors_update(bmain, id);
}
/* flush to other objects that depend on this one */
@@ -2375,29 +2388,6 @@ void DAG_pose_sort(Object *ob)
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
-#if 0 // XXX old animation system... driver stuff to watch out for
- if(con->ipo) {
- IpoCurve *icu;
- for(icu= con->ipo->curve.first; icu; icu= icu->next) {
- /* icu->driver->ob should actually point to ob->proxy if it
- * is a proxy, but since it wasn't set correct it older
- * files comparing with ob->proxy makes it work for those */
- if(icu->driver && (icu->driver->ob==ob || icu->driver->ob==ob->proxy)) {
- bPoseChannel *target= get_pose_channel(ob->pose, icu->driver->name);
- if(target) {
- node2 = dag_get_node(dag, target);
- dag_add_relation(dag, node2, node, 0, "Ipo Driver");
-
- /* uncommented this line, results in dependencies
- * not being added properly for this constraint,
- * what is the purpose of this? - brecht */
- /*cti= NULL;*/ /* trick to get next loop skipped */
- }
- }
- }
- }
-#endif // XXX old animation system... driver stuff to watch out for
-
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
@@ -2407,7 +2397,7 @@ void DAG_pose_sort(Object *ob)
if (target) {
node2= dag_get_node(dag, target);
dag_add_relation(dag, node2, node, 0, "IK Constraint");
-
+
if (con->type==CONSTRAINT_TYPE_KINEMATIC) {
bKinematicConstraint *data = (bKinematicConstraint *)con->data;
bPoseChannel *parchan;
diff --git a/source/blender/blenkernel/intern/editderivedbmesh.c b/source/blender/blenkernel/intern/editderivedbmesh.c
index 72580b66def..6e8bfb9040f 100644
--- a/source/blender/blenkernel/intern/editderivedbmesh.c
+++ b/source/blender/blenkernel/intern/editderivedbmesh.c
@@ -807,31 +807,31 @@ static void bmDM_drawFacesTex_common(DerivedMesh *dm,
bmdm_get_tri_tex(bm, ls, luv, lcol, has_uv, has_vcol);
glTexCoord2fv(luv[0]->uv);
- glColor3ub(lcol[0]->r, lcol[0]->g, lcol[0]->b);
+ glColor3ub(lcol[0]->b, lcol[0]->g, lcol[0]->r);
glVertex3fv(vertexCos[BMINDEX_GET(ls[0]->v)]);
glTexCoord2fv(luv[1]->uv);
- glColor3ub(lcol[1]->r, lcol[1]->g, lcol[1]->b);
+ glColor3ub(lcol[1]->b, lcol[1]->g, lcol[1]->r);
glVertex3fv(vertexCos[BMINDEX_GET(ls[1]->v)]);
glTexCoord2fv(luv[2]->uv);
- glColor3ub(lcol[2]->r, lcol[2]->g, lcol[2]->b);
+ glColor3ub(lcol[2]->b, lcol[2]->g, lcol[2]->r);
glVertex3fv(vertexCos[BMINDEX_GET(ls[2]->v)]);
} else {
bmdm_get_tri_tex(bm, ls, luv, lcol, has_uv, has_vcol);
glTexCoord2fv(luv[0]->uv);
- glColor3ub(lcol[0]->r, lcol[0]->g, lcol[0]->b);
+ glColor3ub(lcol[0]->b, lcol[0]->g, lcol[0]->r);
glNormal3fv(vertexNos[BMINDEX_GET(ls[0]->v)]);
glVertex3fv(vertexCos[BMINDEX_GET(ls[0]->v)]);
glTexCoord2fv(luv[1]->uv);
- glColor3ub(lcol[1]->r, lcol[1]->g, lcol[1]->b);
+ glColor3ub(lcol[1]->b, lcol[1]->g, lcol[1]->r);
glNormal3fv(vertexNos[BMINDEX_GET(ls[1]->v)]);
glVertex3fv(vertexCos[BMINDEX_GET(ls[1]->v)]);
glTexCoord2fv(luv[2]->uv);
- glColor3ub(lcol[2]->r, lcol[2]->g, lcol[2]->b);
+ glColor3ub(lcol[2]->b, lcol[2]->g, lcol[2]->r);
glNormal3fv(vertexNos[BMINDEX_GET(ls[2]->v)]);
glVertex3fv(vertexCos[BMINDEX_GET(ls[2]->v)]);
}
@@ -885,21 +885,21 @@ static void bmDM_drawFacesTex_common(DerivedMesh *dm,
if (luv[0])
glTexCoord2fv(luv[0]->uv);
if (lcol[0])
- glColor3ub(lcol[0]->r, lcol[0]->g, lcol[0]->b);
+ glColor3ub(lcol[0]->b, lcol[0]->g, lcol[0]->r);
else glColor3ub(0, 0, 0);
glVertex3fv(ls[0]->v->co);
if (luv[1])
glTexCoord2fv(luv[1]->uv);
if (lcol[1])
- glColor3ub(lcol[1]->r, lcol[1]->g, lcol[1]->b);
+ glColor3ub(lcol[1]->b, lcol[1]->g, lcol[1]->r);
else glColor3ub(0, 0, 0);
glVertex3fv(ls[1]->v->co);
if (luv[2])
glTexCoord2fv(luv[2]->uv);
if (lcol[2])
- glColor3ub(lcol[2]->r, lcol[2]->g, lcol[2]->b);
+ glColor3ub(lcol[2]->b, lcol[2]->g, lcol[2]->r);
else glColor3ub(0, 0, 0);
glVertex3fv(ls[2]->v->co);
} else {
@@ -908,7 +908,7 @@ static void bmDM_drawFacesTex_common(DerivedMesh *dm,
if (luv[0])
glTexCoord2fv(luv[0]->uv);
if (lcol[0])
- glColor3ub(lcol[0]->r, lcol[0]->g, lcol[0]->b);
+ glColor3ub(lcol[0]->b, lcol[0]->g, lcol[0]->r);
else glColor3ub(0, 0, 0);
glNormal3fv(ls[0]->v->no);
glVertex3fv(ls[0]->v->co);
@@ -916,7 +916,7 @@ static void bmDM_drawFacesTex_common(DerivedMesh *dm,
if (luv[1])
glTexCoord2fv(luv[1]->uv);
if (lcol[1])
- glColor3ub(lcol[1]->r, lcol[1]->g, lcol[1]->b);
+ glColor3ub(lcol[1]->b, lcol[1]->g, lcol[1]->r);
else glColor3ub(0, 0, 0);
glNormal3fv(ls[1]->v->no);
glVertex3fv(ls[1]->v->co);
@@ -924,7 +924,7 @@ static void bmDM_drawFacesTex_common(DerivedMesh *dm,
if (luv[2])
glTexCoord2fv(luv[2]->uv);
if (lcol[2])
- glColor3ub(lcol[2]->r, lcol[2]->g, lcol[2]->b);
+ glColor3ub(lcol[2]->b, lcol[2]->g, lcol[2]->r);
else glColor3ub(0, 0, 0);
glNormal3fv(ls[2]->v->no);
glVertex3fv(ls[2]->v->co);
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index e3c4f12184e..a6a99de462d 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -48,12 +48,15 @@
#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_object_force.h"
+#include "DNA_particle_types.h"
#include "DNA_texture_types.h"
#include "DNA_scene_types.h"
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
#include "BLI_jitter.h"
+#include "BLI_listbase.h"
+#include "BLI_noise.h"
#include "BLI_rand.h"
#include "PIL_time.h"
@@ -68,6 +71,7 @@
#include "BKE_depsgraph.h"
#include "BKE_displist.h"
#include "BKE_DerivedMesh.h"
+#include "BKE_cdderivedmesh.h"
#include "BKE_effect.h"
#include "BKE_global.h"
#include "BKE_group.h"
@@ -79,11 +83,13 @@
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
+#include "BKE_particle.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_utildefines.h"
#include "RE_render_ext.h"
+#include "RE_shader_ext.h"
/* fluid sim particle import */
#ifndef DISABLE_ELBEEM
@@ -95,17 +101,46 @@
//XXX #include "BIF_screen.h"
-PartDeflect *object_add_collision_fields(void)
+EffectorWeights *BKE_add_effector_weights(Group *group)
+{
+ EffectorWeights *weights = MEM_callocN(sizeof(EffectorWeights), "EffectorWeights");
+ int i;
+
+ for(i=0; i<NUM_PFIELD_TYPES; i++)
+ weights->weight[i] = 1.0f;
+
+ weights->global_gravity = 1.0f;
+
+ weights->group = group;
+
+ return weights;
+}
+PartDeflect *object_add_collision_fields(int type)
{
PartDeflect *pd;
pd= MEM_callocN(sizeof(PartDeflect), "PartDeflect");
+ pd->forcefield = type;
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;
pd->f_strength = 1.0f;
+ pd->f_damp = 1.0f;
+ pd->f_size = 1.0f;
+
+ /* set sensible defaults based on type */
+ switch(type) {
+ case PFIELD_VORTEX:
+ pd->shape = PFIELD_SHAPE_PLANE;
+ break;
+ case PFIELD_WIND:
+ pd->shape = PFIELD_SHAPE_PLANE;
+ pd->f_flow = 1.0f; /* realistic wind behavior */
+ break;
+ }
+ pd->flag = PFIELD_DO_LOCATION|PFIELD_DO_ROTATION;
return pd;
}
@@ -156,93 +191,218 @@ void free_effects(ListBase *lb)
}
/* -------------------------- Effectors ------------------ */
+void free_partdeflect(PartDeflect *pd)
+{
+ if(!pd)
+ return;
+
+ if(pd->tex)
+ pd->tex->id.us--;
-static void add_to_effectorcache(ListBase *lb, Scene *scene, Object *ob, Object *obsrc)
+ if(pd->rng)
+ rng_free(pd->rng);
+
+ MEM_freeN(pd);
+}
+
+static void precalculate_effector(EffectorCache *eff)
{
- pEffectorCache *ec;
- PartDeflect *pd= ob->pd;
-
- if(pd->forcefield == PFIELD_GUIDE) {
- if(ob->type==OB_CURVE && obsrc->type==OB_MESH) { /* guides only do mesh particles */
- Curve *cu= ob->data;
- if(cu->flag & CU_PATH) {
- if(cu->path==NULL || cu->path->data==NULL)
- makeDispListCurveTypes(scene, ob, 0);
- if(cu->path && cu->path->data) {
- ec= MEM_callocN(sizeof(pEffectorCache), "effector cache");
- ec->ob= ob;
- BLI_addtail(lb, ec);
- }
+ unsigned int cfra = (unsigned int)(eff->scene->r.cfra >= 0 ? eff->scene->r.cfra : -eff->scene->r.cfra);
+ if(!eff->pd->rng)
+ eff->pd->rng = rng_new(eff->pd->seed + cfra);
+ else
+ rng_srandom(eff->pd->rng, eff->pd->seed + cfra);
+
+ if(eff->pd->forcefield == PFIELD_GUIDE && eff->ob->type==OB_CURVE) {
+ Curve *cu= eff->ob->data;
+ if(cu->flag & CU_PATH) {
+ if(cu->path==NULL || cu->path->data==NULL)
+ makeDispListCurveTypes(eff->scene, eff->ob, 0);
+
+ if(cu->path && cu->path->data) {
+ where_on_path(eff->ob, 0.0, eff->guide_loc, eff->guide_dir, NULL, &eff->guide_radius);
+ Mat4MulVecfl(eff->ob->obmat, eff->guide_loc);
+ Mat4Mul3Vecfl(eff->ob->obmat, eff->guide_dir);
}
}
}
- else if(pd->forcefield) {
-
- if(pd->forcefield == PFIELD_WIND)
- {
- pd->rng = rng_new(pd->seed);
- }
-
- ec= MEM_callocN(sizeof(pEffectorCache), "effector cache");
- ec->ob= ob;
- BLI_addtail(lb, ec);
+ else if(eff->pd->shape == PFIELD_SHAPE_SURFACE) {
+ eff->surmd = (SurfaceModifierData *)modifiers_findByType ( eff->ob, eModifierType_Surface );
+ if(eff->ob->type == OB_CURVE)
+ eff->flag |= PE_USE_NORMAL_DATA;
+ }
+ else if(eff->psys)
+ psys_update_particle_tree(eff->psys, eff->scene->r.cfra);
+}
+static EffectorCache *new_effector_cache(Scene *scene, Object *ob, ParticleSystem *psys, PartDeflect *pd)
+{
+ EffectorCache *eff = MEM_callocN(sizeof(EffectorCache), "EffectorCache");
+ eff->scene = scene;
+ eff->ob = ob;
+ eff->psys = psys;
+ eff->pd = pd;
+ eff->frame = -1;
+
+ precalculate_effector(eff);
+
+ return eff;
+}
+static void add_object_to_effectors(ListBase **effectors, Scene *scene, EffectorWeights *weights, Object *ob, Object *ob_src)
+{
+ EffectorCache *eff = NULL;
+
+ if( ob == ob_src || weights->weight[ob->pd->forcefield] == 0.0f )
+ return;
+
+ if (ob->pd->shape == PFIELD_SHAPE_POINTS && !ob->derivedFinal )
+ return;
+
+ if(*effectors == NULL)
+ *effectors = MEM_callocN(sizeof(ListBase), "effectors list");
+
+ eff = new_effector_cache(scene, ob, NULL, ob->pd);
+
+ BLI_addtail(*effectors, eff);
+}
+static void add_particles_to_effectors(ListBase **effectors, Scene *scene, EffectorWeights *weights, Object *ob, ParticleSystem *psys, ParticleSystem *psys_src)
+{
+ ParticleSettings *part= psys->part;
+
+ if( !psys_check_enabled(ob, psys) )
+ return;
+
+ if( psys == psys_src && (part->flag & PART_SELF_EFFECT) == 0)
+ return;
+
+ if( part->pd && part->pd->forcefield && weights->weight[part->pd->forcefield] != 0.0f) {
+ if(*effectors == NULL)
+ *effectors = MEM_callocN(sizeof(ListBase), "effectors list");
+
+ BLI_addtail(*effectors, new_effector_cache(scene, ob, psys, part->pd));
+ }
+
+ if (part->pd2 && part->pd2->forcefield && weights->weight[part->pd2->forcefield] != 0.0f) {
+ if(*effectors == NULL)
+ *effectors = MEM_callocN(sizeof(ListBase), "effectors list");
+
+ BLI_addtail(*effectors, new_effector_cache(scene, ob, psys, part->pd2));
}
}
/* returns ListBase handle with objects taking part in the effecting */
-ListBase *pdInitEffectors(Scene *scene, Object *obsrc, Group *group)
+ListBase *pdInitEffectors(Scene *scene, Object *ob_src, ParticleSystem *psys_src, EffectorWeights *weights)
{
- static ListBase listb={NULL, NULL};
- pEffectorCache *ec;
Base *base;
- unsigned int layer= obsrc->lay;
+ unsigned int layer= ob_src->lay;
+ ListBase *effectors = NULL;
- if(group) {
+ if(weights->group) {
GroupObject *go;
- for(go= group->gobject.first; go; go= go->next) {
- if( (go->ob->lay & layer) && go->ob->pd && go->ob!=obsrc) {
- add_to_effectorcache(&listb, scene, go->ob, obsrc);
+ for(go= weights->group->gobject.first; go; go= go->next) {
+ if( (go->ob->lay & layer) ) {
+ if( go->ob->pd && go->ob->pd->forcefield )
+ add_object_to_effectors(&effectors, scene, weights, go->ob, ob_src);
+
+ if( go->ob->particlesystem.first ) {
+ ParticleSystem *psys= go->ob->particlesystem.first;
+
+ for( ; psys; psys=psys->next )
+ add_particles_to_effectors(&effectors, scene, weights, go->ob, psys, psys_src);
+ }
}
}
}
else {
for(base = scene->base.first; base; base= base->next) {
- if( (base->lay & layer) && base->object->pd && base->object!=obsrc) {
- add_to_effectorcache(&listb, scene, base->object, obsrc);
+ if( (base->lay & layer) ) {
+ if( base->object->pd && base->object->pd->forcefield )
+ add_object_to_effectors(&effectors, scene, weights, base->object, ob_src);
+
+ if( base->object->particlesystem.first ) {
+ ParticleSystem *psys= base->object->particlesystem.first;
+
+ for( ; psys; psys=psys->next )
+ add_particles_to_effectors(&effectors, scene, weights, base->object, psys, psys_src);
+ }
}
}
}
-
- /* make a full copy */
- for(ec= listb.first; ec; ec= ec->next) {
- ec->obcopy= *(ec->ob);
- }
-
- if(listb.first)
- return &listb;
-
- return NULL;
+ return effectors;
}
-void pdEndEffectors(ListBase *lb)
+void pdEndEffectors(ListBase **effectors)
{
- if(lb) {
- pEffectorCache *ec;
- /* restore full copy */
- for(ec= lb->first; ec; ec= ec->next)
- {
- if(ec->ob->pd && (ec->ob->pd->forcefield == PFIELD_WIND))
- rng_free(ec->ob->pd->rng);
-
- *(ec->ob)= ec->obcopy;
+ if(*effectors) {
+ EffectorCache *eff = (*effectors)->first;
+
+ for(; eff; eff=eff->next) {
+ if(eff->guide_data)
+ MEM_freeN(eff->guide_data);
}
- BLI_freelistN(lb);
+ BLI_freelistN(*effectors);
+ MEM_freeN(*effectors);
+ *effectors = NULL;
}
}
+void pd_point_from_particle(ParticleSimulationData *sim, ParticleData *pa, ParticleKey *state, EffectedPoint *point)
+{
+ point->loc = state->co;
+ point->vel = state->vel;
+ point->index = pa - sim->psys->particles;
+ point->size = pa->size;
+ /* TODO: point->charge */
+ point->charge = 1.0f;
+
+ point->vel_to_sec = 1.0f;
+ point->vel_to_frame = psys_get_timestep(sim);
+
+ point->flag = 0;
+
+ if(sim->psys->part->flag & PART_ROT_DYN) {
+ point->ave = state->ave;
+ point->rot = state->rot;
+ }
+ else
+ point->ave = point->rot = NULL;
+
+ point->psys = sim->psys;
+}
+
+void pd_point_from_loc(Scene *scene, float *loc, float *vel, int index, EffectedPoint *point)
+{
+ point->loc = loc;
+ point->vel = vel;
+ point->index = index;
+ point->size = 0.0f;
+
+ point->vel_to_sec = (float)scene->r.frs_sec;
+ point->vel_to_frame = 1.0f;
+
+ point->flag = 0;
+
+ point->ave = point->rot = NULL;
+ point->psys = NULL;
+}
+void pd_point_from_soft(Scene *scene, float *loc, float *vel, int index, EffectedPoint *point)
+{
+ point->loc = loc;
+ point->vel = vel;
+ point->index = index;
+ point->size = 0.0f;
+
+ point->vel_to_sec = (float)scene->r.frs_sec;
+ point->vel_to_frame = 1.0f;
+
+ point->flag = PE_WIND_AS_SPEED;
+
+ point->ave = point->rot = NULL;
+
+ point->psys = NULL;
+}
/************************************************/
/* Effectors */
/************************************************/
@@ -256,26 +416,33 @@ static void eff_tri_ray_hit(void *userdata, int index, const BVHTreeRay *ray, BV
}
// get visibility of a wind ray
-static float eff_calc_visibility(Scene *scene, Object *ob, float *co, float *dir)
+static float eff_calc_visibility(ListBase *colliders, EffectorCache *eff, EffectorData *efd, EffectedPoint *point)
{
- CollisionModifierData **collobjs = NULL;
- int numcollobj = 0, i;
+ ListBase *colls = colliders;
+ ColliderCache *col;
float norm[3], len = 0.0;
- float visibility = 1.0;
+ float visibility = 1.0, absorption = 0.0;
- collobjs = get_collisionobjects(scene, ob, &numcollobj);
-
- if(!collobjs)
- return 0;
+ if(!(eff->pd->flag & PFIELD_VISIBILITY))
+ return visibility;
+
+ if(!colls)
+ colls = get_collider_cache(eff->scene, NULL);
+
+ if(!colls)
+ return visibility;
- VECCOPY(norm, dir);
+ VECCOPY(norm, efd->vec_to_point);
VecNegf(norm);
len = Normalize(norm);
// check all collision objects
- for(i = 0; i < numcollobj; i++)
+ for(col = colls->first; col; col = col->next)
{
- CollisionModifierData *collmd = collobjs[i];
+ CollisionModifierData *collmd = col->collmd;
+
+ if(col->ob == eff->ob)
+ continue;
if(collmd->bvhtree)
{
@@ -285,18 +452,21 @@ static float eff_calc_visibility(Scene *scene, Object *ob, float *co, float *dir
hit.dist = len + FLT_EPSILON;
// check if the way is blocked
- if(BLI_bvhtree_ray_cast(collmd->bvhtree, co, norm, 0.0f, &hit, eff_tri_ray_hit, NULL)>=0)
+ if(BLI_bvhtree_ray_cast(collmd->bvhtree, point->loc, norm, 0.0f, &hit, eff_tri_ray_hit, NULL)>=0)
{
+ absorption= col->ob->pd->absorption;
+
// visibility is only between 0 and 1, calculated from 1-absorption
- visibility *= MAX2(0.0, MIN2(1.0, (1.0-((float)collmd->absorption)*0.01)));
+ visibility *= CLAMPIS(1.0f-absorption, 0.0f, 1.0f);
if(visibility <= 0.0f)
break;
}
}
}
-
- MEM_freeN(collobjs);
+
+ if(!colliders)
+ free_collider_cache(&colls);
return visibility;
}
@@ -344,43 +514,39 @@ static float falloff_func_rad(PartDeflect *pd, float fac)
return falloff_func(fac, pd->flag&PFIELD_USEMINR, pd->minrad, pd->flag&PFIELD_USEMAXR, pd->maxrad, pd->f_power_r);
}
-float effector_falloff(PartDeflect *pd, float *eff_velocity, float *vec_to_part)
+float effector_falloff(EffectorCache *eff, EffectorData *efd, EffectedPoint *point, EffectorWeights *weights)
{
- float eff_dir[3], temp[3];
- float falloff=1.0, fac, r_fac;
-
- if(pd->forcefield==PFIELD_LENNARDJ)
- return falloff; /* Lennard-Jones field has it's own falloff built in */
+ float temp[3];
+ float falloff = weights ? weights->weight[0] * weights->weight[eff->pd->forcefield] : 1.0f;
+ float fac, r_fac;
- VecCopyf(eff_dir,eff_velocity);
- Normalize(eff_dir);
+ fac = Inpf(efd->nor, efd->vec_to_point2);
- if(pd->flag & PFIELD_POSZ && Inpf(eff_dir,vec_to_part)<0.0f)
+ if(eff->pd->zdir == PFIELD_Z_POS && fac < 0.0f)
+ falloff=0.0f;
+ else if(eff->pd->zdir == PFIELD_Z_NEG && fac > 0.0f)
falloff=0.0f;
- else switch(pd->falloff){
+ else switch(eff->pd->falloff){
case PFIELD_FALL_SPHERE:
- fac=VecLength(vec_to_part);
- falloff= falloff_func_dist(pd, fac);
+ falloff*= falloff_func_dist(eff->pd, efd->distance);
break;
case PFIELD_FALL_TUBE:
- fac=Inpf(vec_to_part,eff_dir);
- falloff= falloff_func_dist(pd, ABS(fac));
+ falloff*= falloff_func_dist(eff->pd, ABS(fac));
if(falloff == 0.0f)
break;
- VECADDFAC(temp,vec_to_part,eff_dir,-fac);
- r_fac=VecLength(temp);
- falloff*= falloff_func_rad(pd, r_fac);
+ VECADDFAC(temp, efd->vec_to_point, efd->nor, -fac);
+ r_fac= VecLength(temp);
+ falloff*= falloff_func_rad(eff->pd, r_fac);
break;
case PFIELD_FALL_CONE:
- fac=Inpf(vec_to_part,eff_dir);
- falloff= falloff_func_dist(pd, ABS(fac));
+ falloff*= falloff_func_dist(eff->pd, ABS(fac));
if(falloff == 0.0f)
break;
- r_fac=saacos(fac/VecLength(vec_to_part))*180.0f/(float)M_PI;
- falloff*= falloff_func_rad(pd, r_fac);
+ r_fac=saacos(fac/VecLength(efd->vec_to_point))*180.0f/(float)M_PI;
+ falloff*= falloff_func_rad(eff->pd, r_fac);
break;
}
@@ -388,127 +554,396 @@ float effector_falloff(PartDeflect *pd, float *eff_velocity, float *vec_to_part)
return falloff;
}
-void do_physical_effector(Scene *scene, Object *ob, float *opco, short type, float force_val, float distance, float falloff, float size, float damp, float *eff_velocity, float *vec_to_part, float *velocity, float *field, int planar, struct RNG *rng, float noise_factor, float charge, float pa_size)
+int closest_point_on_surface(SurfaceModifierData *surmd, float *co, float *surface_co, float *surface_nor, float *surface_vel)
{
- float mag_vec[3]={0,0,0};
- float temp[3], temp2[3];
- float eff_vel[3];
- float noise = 0, visibility;
-
- // calculate visibility
- visibility = eff_calc_visibility(scene, ob, opco, vec_to_part);
- if(visibility <= 0.0)
- return;
- falloff *= visibility;
+ BVHTreeNearest nearest;
- VecCopyf(eff_vel,eff_velocity);
- Normalize(eff_vel);
+ nearest.index = -1;
+ nearest.dist = FLT_MAX;
- switch(type){
- case PFIELD_WIND:
- VECCOPY(mag_vec,eff_vel);
-
- // add wind noise here, only if we have wind
- if((noise_factor > 0.0f) && (force_val > FLT_EPSILON))
- noise = wind_func(rng, noise_factor);
+ BLI_bvhtree_find_nearest(surmd->bvhtree->tree, co, &nearest, surmd->bvhtree->nearest_callback, surmd->bvhtree);
+
+ if(nearest.index != -1) {
+ VECCOPY(surface_co, nearest.co);
+
+ if(surface_nor) {
+ VECCOPY(surface_nor, nearest.no);
+ }
+
+ if(surface_vel) {
+ MFace *mface = CDDM_get_tessface(surmd->dm, nearest.index);
- VecMulf(mag_vec,(force_val+noise)*falloff);
- VecAddf(field,field,mag_vec);
- break;
+ VECCOPY(surface_vel, surmd->v[mface->v1].co);
+ VecAddf(surface_vel, surface_vel, surmd->v[mface->v2].co);
+ VecAddf(surface_vel, surface_vel, surmd->v[mface->v3].co);
+ if(mface->v4)
+ VecAddf(surface_vel, surface_vel, surmd->v[mface->v4].co);
- case PFIELD_FORCE:
- if(planar)
- Projf(mag_vec,vec_to_part,eff_vel);
- else
- VecCopyf(mag_vec,vec_to_part);
+ VecMulf(surface_vel, mface->v4 ? 0.25f : 0.333f);
+ }
+ return 1;
+ }
- Normalize(mag_vec);
+ return 0;
+}
+int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *point, int real_velocity)
+{
+ float cfra = eff->scene->r.cfra;
+ int ret = 0;
- VecMulf(mag_vec,force_val*falloff);
- VecAddf(field,field,mag_vec);
- break;
+ if(eff->pd->shape==PFIELD_SHAPE_SURFACE && eff->surmd) {
+ /* closest point in the object surface is an effector */
+ float vec[3];
- case PFIELD_VORTEX:
- Crossf(mag_vec,eff_vel,vec_to_part);
+ /* using velocity corrected location allows for easier sliding over effector surface */
+ VecCopyf(vec, point->vel);
+ VecMulf(vec, point->vel_to_frame);
+ VecAddf(vec, vec, point->loc);
- Normalize(mag_vec);
+ ret = closest_point_on_surface(eff->surmd, vec, efd->loc, efd->nor, real_velocity ? efd->vel : NULL);
- VecMulf(mag_vec,force_val*distance*falloff);
- VecAddf(field,field,mag_vec);
+ efd->size = 0.0f;
+ }
+ else if(eff->pd->shape==PFIELD_SHAPE_POINTS) {
- break;
- case PFIELD_MAGNET:
- if(planar)
- VecCopyf(temp,eff_vel);
- else
- /* magnetic field of a moving charge */
- Crossf(temp,eff_vel,vec_to_part);
+ if(eff->ob->derivedFinal) {
+ DerivedMesh *dm = eff->ob->derivedFinal;
- Normalize(temp);
+ dm->getVertCo(dm, *efd->index, efd->loc);
+ dm->getVertNo(dm, *efd->index, efd->nor);
- Crossf(temp2,velocity,temp);
- VecAddf(mag_vec,mag_vec,temp2);
+ Mat4MulVecfl(eff->ob->obmat, efd->loc);
+ Mat4Mul3Vecfl(eff->ob->obmat, efd->nor);
- VecMulf(mag_vec,force_val*falloff);
- VecAddf(field,field,mag_vec);
- break;
- case PFIELD_HARMONIC:
- if(planar)
- Projf(mag_vec,vec_to_part,eff_vel);
- else
- VecCopyf(mag_vec,vec_to_part);
+ Normalize(efd->nor);
- VecMulf(mag_vec,force_val*falloff);
- VecSubf(field,field,mag_vec);
+ efd->size = 0.0f;
- VecCopyf(mag_vec,velocity);
- VecMulf(mag_vec,damp*2.0f*(float)sqrt(force_val));
- VecSubf(field,field,mag_vec);
- break;
- case PFIELD_CHARGE:
- if(planar)
- Projf(mag_vec,vec_to_part,eff_vel);
- else
- VecCopyf(mag_vec,vec_to_part);
+ /**/
+ ret = 1;
+ }
+ }
+ else if(eff->psys) {
+ ParticleSimulationData sim = {eff->scene, eff->ob, eff->psys, NULL, NULL};
+ ParticleData *pa = eff->psys->particles + *efd->index;
+ ParticleKey state;
+
+ /* exclude the particle itself for self effecting particles */
+ if(eff->psys == point->psys && *efd->index == point->index)
+ ;
+ else {
+ /* TODO: time from actual previous calculated frame (step might not be 1) */
+ state.time = cfra - 1.0;
+ ret = psys_get_particle_state(&sim, *efd->index, &state, 0);
+
+ /* TODO */
+ //if(eff->pd->forcefiled == PFIELD_HARMONIC && ret==0) {
+ // if(pa->dietime < eff->psys->cfra)
+ // eff->flag |= PE_VELOCITY_TO_IMPULSE;
+ //}
+
+ VECCOPY(efd->loc, state.co);
+ VECCOPY(efd->nor, state.vel);
+ if(real_velocity) {
+ VECCOPY(efd->vel, state.vel);
+ }
- Normalize(mag_vec);
+ efd->size = pa->size;
+ }
+ }
+ else {
+ /* use center of object for distance calculus */
+ Object *ob = eff->ob;
+ Object obcopy = *ob;
+
+ where_is_object_time(eff->scene, ob, cfra);
+
+ /* use z-axis as normal*/
+ VECCOPY(efd->nor, ob->obmat[2]);
+ Normalize(efd->nor);
+
+ /* for vortex the shape chooses between old / new force */
+ if(eff->pd->shape == PFIELD_SHAPE_PLANE) {
+ /* efd->loc is closes point on effector xy-plane */
+ float temp[3];
+ VecSubf(temp, point->loc, ob->obmat[3]);
+ Projf(efd->loc, temp, efd->nor);
+ VecSubf(efd->loc, point->loc, efd->loc);
+ }
+ else {
+ VECCOPY(efd->loc, ob->obmat[3]);
+ }
- VecMulf(mag_vec,charge*force_val*falloff);
- VecAddf(field,field,mag_vec);
- break;
- case PFIELD_LENNARDJ:
- {
- float fac;
+ if(real_velocity) {
+ VECCOPY(efd->vel, ob->obmat[3]);
+
+ where_is_object_time(eff->scene, ob, cfra - 1.0);
+
+ VecSubf(efd->vel, efd->vel, ob->obmat[3]);
+ }
+
+ *eff->ob = obcopy;
+
+ efd->size = 0.0f;
+
+ ret = 1;
+ }
+
+ if(ret) {
+ VecSubf(efd->vec_to_point, point->loc, efd->loc);
+ efd->distance = VecLength(efd->vec_to_point);
+
+ if(eff->flag & PE_USE_NORMAL_DATA) {
+ VECCOPY(efd->vec_to_point2, efd->vec_to_point);
+ VECCOPY(efd->nor2, efd->nor);
+ }
+ else {
+ /* for some effectors we need the object center every time */
+ VecSubf(efd->vec_to_point2, point->loc, eff->ob->obmat[3]);
+ VECCOPY(efd->nor2, eff->ob->obmat[2]);
+ Normalize(efd->nor2);
+ }
+ }
+
+ return ret;
+}
+static void get_effector_tot(EffectorCache *eff, EffectorData *efd, EffectedPoint *point, int *tot, int *p)
+{
+ if(eff->pd->shape == PFIELD_SHAPE_POINTS) {
+ efd->index = p;
+
+ *p = 0;
+ *tot = eff->ob->derivedFinal ? eff->ob->derivedFinal->numVertData : 1;
+
+ if(*tot && eff->pd->forcefield == PFIELD_HARMONIC && point->index >= 0) {
+ *p = point->index % *tot;
+ *tot = *p+1;
+ }
+ }
+ else if(eff->psys) {
+ efd->index = p;
+
+ *p = 0;
+ *tot = eff->psys->totpart;
+
+ if(eff->pd->forcefield == PFIELD_CHARGE) {
+ /* Only the charge of the effected particle is used for
+ interaction, not fall-offs. If the fall-offs aren't the
+ same this will be unphysical, but for animation this
+ could be the wanted behavior. If you want physical
+ correctness the fall-off should be spherical 2.0 anyways.
+ */
+ efd->charge = eff->pd->f_strength;
+ }
+ else if(eff->pd->forcefield == PFIELD_HARMONIC) {
+ /* every particle is mapped to only one harmonic effector particle */
+ *p= point->index % eff->psys->totpart;
+ *tot= *p + 1;
+ }
+ }
+ else {
+ *p = 0;
+ *tot = 1;
+ }
+}
+static void do_texture_effector(EffectorCache *eff, EffectorData *efd, EffectedPoint *point, float *total_force)
+{
+ TexResult result[4];
+ float tex_co[3], strength, force[3];
+ float nabla = eff->pd->tex_nabla;
+ int hasrgb;
+ short mode = eff->pd->tex_mode;
+
+ if(!eff->pd->tex)
+ return;
+
+ result[0].nor = result[1].nor = result[2].nor = result[3].nor = 0;
+
+ strength= eff->pd->f_strength * efd->falloff;
+
+ VECCOPY(tex_co,point->loc);
+
+ if(eff->pd->flag & PFIELD_TEX_2D) {
+ float fac=-Inpf(tex_co, efd->nor);
+ VECADDFAC(tex_co, tex_co, efd->nor, fac);
+ }
+
+ if(eff->pd->flag & PFIELD_TEX_OBJECT) {
+ Mat4Mul3Vecfl(eff->ob->obmat, tex_co);
+ }
+
+ hasrgb = multitex_ext(eff->pd->tex, tex_co, NULL,NULL, 1, result);
+
+ if(hasrgb && mode==PFIELD_TEX_RGB) {
+ force[0] = (0.5f - result->tr) * strength;
+ force[1] = (0.5f - result->tg) * strength;
+ force[2] = (0.5f - result->tb) * strength;
+ }
+ else {
+ strength/=nabla;
+
+ tex_co[0] += nabla;
+ multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 1, result+1);
- if(planar) {
- Projf(mag_vec,vec_to_part,eff_vel);
- distance = VecLength(mag_vec);
+ tex_co[0] -= nabla;
+ tex_co[1] += nabla;
+ multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 1, result+2);
+
+ tex_co[1] -= nabla;
+ tex_co[2] += nabla;
+ multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 1, result+3);
+
+ if(mode == PFIELD_TEX_GRAD || !hasrgb) { /* if we dont have rgb fall back to grad */
+ force[0] = (result[0].tin - result[1].tin) * strength;
+ force[1] = (result[0].tin - result[2].tin) * strength;
+ force[2] = (result[0].tin - result[3].tin) * strength;
+ }
+ else { /*PFIELD_TEX_CURL*/
+ float dbdy, dgdz, drdz, dbdx, dgdx, drdy;
+
+ dbdy = result[2].tb - result[0].tb;
+ dgdz = result[3].tg - result[0].tg;
+ drdz = result[3].tr - result[0].tr;
+ dbdx = result[1].tb - result[0].tb;
+ dgdx = result[1].tg - result[0].tg;
+ drdy = result[2].tr - result[0].tr;
+
+ force[0] = (dbdy - dgdz) * strength;
+ force[1] = (drdz - dbdx) * strength;
+ force[2] = (dgdx - drdy) * strength;
+ }
+ }
+
+ if(eff->pd->flag & PFIELD_TEX_2D){
+ float fac = -Inpf(force, efd->nor);
+ VECADDFAC(force, force, efd->nor, fac);
+ }
+
+ VecAddf(total_force, total_force, force);
+}
+void do_physical_effector(EffectorCache *eff, EffectorData *efd, EffectedPoint *point, float *total_force)
+{
+ PartDeflect *pd = eff->pd;
+ RNG *rng = pd->rng;
+ float force[3]={0,0,0};
+ float temp[3];
+ float fac;
+ float strength = pd->f_strength;
+ float damp = pd->f_damp;
+ float noise_factor = pd->f_noise;
+
+ if(noise_factor > 0.0f) {
+ strength += wind_func(rng, noise_factor);
+
+ if(ELEM(pd->forcefield, PFIELD_HARMONIC, PFIELD_DRAG))
+ damp += wind_func(rng, noise_factor);
+ }
+
+ VECCOPY(force, efd->vec_to_point);
+
+ switch(pd->forcefield){
+ case PFIELD_WIND:
+ VECCOPY(force, efd->nor);
+ VecMulf(force, strength * efd->falloff);
+ break;
+ case PFIELD_FORCE:
+ Normalize(force);
+ VecMulf(force, strength * efd->falloff);
+ break;
+ case PFIELD_VORTEX:
+ /* old vortex force */
+ if(pd->shape == PFIELD_SHAPE_POINT) {
+ Crossf(force, efd->nor, efd->vec_to_point);
+ Normalize(force);
+ VecMulf(force, strength * efd->distance * efd->falloff);
+ }
+ else {
+ /* new vortex force */
+ Crossf(temp, efd->nor2, efd->vec_to_point2);
+ VecMulf(temp, strength * efd->falloff);
+
+ Crossf(force, efd->nor2, temp);
+ VecMulf(force, strength * efd->falloff);
+
+ VECADDFAC(temp, temp, point->vel, -point->vel_to_sec);
+ VecAddf(force, force, temp);
}
+ break;
+ case PFIELD_MAGNET:
+ if(eff->pd->shape == PFIELD_SHAPE_POINT)
+ /* magnetic field of a moving charge */
+ Crossf(temp, efd->nor, efd->vec_to_point);
else
- VecCopyf(mag_vec,vec_to_part);
-
- /* at this distance the field is 60 times weaker than maximum */
- if(distance > 2.22 * (size+pa_size))
- break;
+ VecCopyf(temp, efd->nor);
- fac = pow((size+pa_size)/distance,6.0);
+ Normalize(temp);
+ VecMulf(temp, strength * efd->falloff);
+ Crossf(force, point->vel, temp);
+ VecMulf(force, point->vel_to_sec);
+ break;
+ case PFIELD_HARMONIC:
+ VecMulf(force, -strength * efd->falloff);
+ VecCopyf(temp, point->vel);
+ VecMulf(temp, -damp * 2.0f * (float)sqrt(fabs(strength)) * point->vel_to_sec);
+ VecAddf(force, force, temp);
+ break;
+ case PFIELD_CHARGE:
+ VecMulf(force, point->charge * strength * efd->falloff);
+ break;
+ case PFIELD_LENNARDJ:
+ fac = pow((efd->size + point->size) / efd->distance, 6.0);
- fac = - fac * (1.0 - fac) / distance;
+ fac = - fac * (1.0 - fac) / efd->distance;
/* limit the repulsive term drastically to avoid huge forces */
fac = ((fac>2.0) ? 2.0 : fac);
- /* 0.003715 is the fac value at 2.22 times (size+pa_size),
- substracted to avoid discontinuity at the border
- */
- VecMulf(mag_vec, force_val * (fac-0.0037315));
- VecAddf(field,field,mag_vec);
+ VecMulf(force, strength * fac);
break;
- }
case PFIELD_BOID:
/* Boid field is handled completely in boids code. */
+ return;
+ case PFIELD_TURBULENCE:
+ if(pd->flag & PFIELD_GLOBAL_CO) {
+ VECCOPY(temp, point->loc);
+ }
+ else {
+ VECADD(temp, efd->vec_to_point2, efd->nor2);
+ }
+ force[0] = -1.0f + 2.0f * BLI_gTurbulence(pd->f_size, temp[0], temp[1], temp[2], 2,0,2);
+ force[1] = -1.0f + 2.0f * BLI_gTurbulence(pd->f_size, temp[1], temp[2], temp[0], 2,0,2);
+ force[2] = -1.0f + 2.0f * BLI_gTurbulence(pd->f_size, temp[2], temp[0], temp[1], 2,0,2);
+ VecMulf(force, strength * efd->falloff);
+ break;
+ case PFIELD_DRAG:
+ VECCOPY(force, point->vel);
+ fac = Normalize(force) * point->vel_to_sec;
+
+ strength = MIN2(strength, 2.0f);
+ damp = MIN2(damp, 2.0f);
+
+ VecMulf(force, -efd->falloff * fac * (strength * fac + damp));
break;
}
+
+ if(pd->flag & PFIELD_DO_LOCATION) {
+ VECADDFAC(total_force, total_force, force, 1.0f/point->vel_to_sec);
+
+ if(ELEM(pd->forcefield, PFIELD_HARMONIC, PFIELD_DRAG)==0 && pd->f_flow != 0.0f) {
+ VECADDFAC(total_force, total_force, point->vel, -pd->f_flow * efd->falloff);
+ }
+ }
+
+ if(pd->flag & PFIELD_DO_ROTATION && point->ave && point->rot) {
+ float xvec[3] = {1.0f, 0.0f, 0.0f};
+ float dave[3];
+ QuatMulVecf(point->rot, xvec);
+ Crossf(dave, xvec, force);
+ if(pd->f_flow != 0.0f) {
+ VECADDFAC(dave, dave, point->ave, -pd->f_flow * efd->falloff);
+ }
+ VecAddf(point->ave, point->ave, dave);
+ }
}
/* -------- pdDoEffectors() --------
@@ -525,7 +960,7 @@ void do_physical_effector(Scene *scene, Object *ob, float *opco, short type, flo
guide = old speed of particle
*/
-void pdDoEffectors(Scene *scene, ListBase *lb, float *opco, float *force, float *speed, float cur_time, float loc_time, unsigned int flags)
+void pdDoEffectors(ListBase *effectors, ListBase *colliders, EffectorWeights *weights, EffectedPoint *point, float *force, float *impulse)
{
/*
Modifies the force on a particle according to its
@@ -540,43 +975,45 @@ void pdDoEffectors(Scene *scene, ListBase *lb, float *opco, float *force, float
(particles are guided along a curve bezier or old nurbs)
(is independent of other effectors)
*/
- Object *ob;
- pEffectorCache *ec;
- PartDeflect *pd;
-
- float distance, vec_to_part[3];
- float falloff;
+ EffectorCache *eff;
+ EffectorData efd;
+ int p=0, tot = 1;
/* Cycle through collected objects, get total of (1/(gravity_strength * dist^gravity_power)) */
/* Check for min distance here? (yes would be cool to add that, ton) */
- for(ec = lb->first; ec; ec= ec->next) {
+ if(effectors) for(eff = effectors->first; eff; eff=eff->next) {
/* object effectors were fully checked to be OK to evaluate! */
- ob= ec->ob;
- pd= ob->pd;
-
- /* Get IPO force strength and fall off values here */
- where_is_object_time(scene, ob, cur_time);
-
- /* use center of object for distance calculus */
- VecSubf(vec_to_part, opco, ob->obmat[3]);
- distance = VecLength(vec_to_part);
- falloff=effector_falloff(pd,ob->obmat[2],vec_to_part);
-
- if(falloff<=0.0f)
- ; /* don't do anything */
- else {
- float field[3]={0,0,0}, tmp[3];
- VECCOPY(field, force);
- do_physical_effector(scene, ob, opco, pd->forcefield,pd->f_strength,distance,
- falloff, pd->f_dist, pd->f_damp, ob->obmat[2], vec_to_part,
- speed,force, pd->flag&PFIELD_PLANAR, pd->rng, pd->f_noise, 0.0f, 0.0f);
-
- // for softbody backward compatibility
- if(flags & PE_WIND_AS_SPEED){
- VECSUB(tmp, force, field);
- VECSUB(speed, speed, tmp);
+ get_effector_tot(eff, &efd, point, &tot, &p);
+
+ for(; p<tot; p++) {
+ if(get_effector_data(eff, &efd, point, 0)) {
+ efd.falloff= effector_falloff(eff, &efd, point, weights);
+
+ if(efd.falloff > 0.0f)
+ efd.falloff *= eff_calc_visibility(colliders, eff, &efd, point);
+
+ if(efd.falloff <= 0.0f)
+ ; /* don't do anything */
+ else if(eff->pd->forcefield == PFIELD_TEXTURE)
+ do_texture_effector(eff, &efd, point, force);
+ else {
+ float temp1[3]={0,0,0}, temp2[3];
+ VECCOPY(temp1, force);
+
+ do_physical_effector(eff, &efd, point, force);
+
+ // for softbody backward compatibility
+ if(point->flag & PE_WIND_AS_SPEED && impulse){
+ VECSUB(temp2, force, temp1);
+ VECSUB(impulse, impulse, temp2);
+ }
+ }
+ }
+ else if(eff->flag & PE_VELOCITY_TO_IMPULSE && impulse) {
+ /* special case for harmonic effector */
+ VECADD(impulse, impulse, efd.vel);
}
}
}
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 54d2f85457f..0ecd1fe912b 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -200,6 +200,85 @@ FCurve *list_find_fcurve (ListBase *list, const char rna_path[], const int array
return NULL;
}
+/* threshold for binary-searching keyframes - threshold here should be good enough for now, but should become userpref */
+#define BEZT_BINARYSEARCH_THRESH 0.00001f
+
+/* Binary search algorithm for finding where to insert BezTriple. (for use by insert_bezt_fcurve)
+ * Returns the index to insert at (data already at that index will be offset if replace is 0)
+ */
+int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short *replace)
+{
+ int start=0, end=arraylen;
+ int loopbreaker= 0, maxloop= arraylen * 2;
+
+ /* initialise replace-flag first */
+ *replace= 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_bezt_index() encountered invalid array \n");
+ return 0;
+ }
+ else {
+ /* check whether to add before/after/on */
+ float framenum;
+
+ /* 'First' Keyframe (when only one keyframe, this case is used) */
+ framenum= array[0].vec[1][0];
+ if (IS_EQT(frame, framenum, BEZT_BINARYSEARCH_THRESH)) {
+ *replace = 1;
+ return 0;
+ }
+ else if (frame < framenum)
+ return 0;
+
+ /* 'Last' Keyframe */
+ framenum= array[(arraylen-1)].vec[1][0];
+ if (IS_EQT(frame, framenum, BEZT_BINARYSEARCH_THRESH)) {
+ *replace= 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].vec[1][0];
+
+ /* check if exactly equal to midpoint */
+ if (IS_EQT(frame, midfra, BEZT_BINARYSEARCH_THRESH)) {
+ *replace = 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_bezt_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;
+}
+
/* Calculate the extents of F-Curve's data */
void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax)
{
@@ -1026,6 +1105,7 @@ static void berekeny (float f1, float f2, float f3, float f4, float *o, int b)
}
}
+#if 0
static void berekenx (float *f, float *o, int b)
{
float t, c0, c1, c2, c3;
@@ -1041,6 +1121,7 @@ static void berekenx (float *f, float *o, int b)
o[a]= c0 + t*c1 + t*t*c2 + t*t*t*c3;
}
}
+#endif
/* -------------------------- */
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index cdb175ed661..efe53f6f8ef 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -277,7 +277,7 @@ static Image *image_alloc(const char *name, short source, short type)
ima->xrep= ima->yrep= 1;
ima->aspx= ima->aspy= 1.0;
- ima->gen_x= 256; ima->gen_y= 256;
+ ima->gen_x= 1024; ima->gen_y= 1024;
ima->gen_type= 1; /* no defines yet? */
ima->source= source;
@@ -964,6 +964,7 @@ typedef struct StampData {
char camera[64];
char scene[64];
char strip[64];
+ char rendertime[64];
} StampData;
static void stampdata(Scene *scene, StampData *stamp_data, int do_prefix)
@@ -1087,6 +1088,20 @@ static void stampdata(Scene *scene, StampData *stamp_data, int do_prefix)
} else {
stamp_data->strip[0] = '\0';
}
+
+ {
+ Render *re= RE_GetRender(scene->id.name);
+ RenderStats *stats= re ? RE_GetStats(re):NULL;
+
+ if (stats && (scene->r.stamp & R_STAMP_RENDERTIME)) {
+ BLI_timestr(stats->lastframetime, text);
+
+ if (do_prefix) sprintf(stamp_data->rendertime, "RenderTime %s", text);
+ else sprintf(stamp_data->rendertime, "%s", text);
+ } else {
+ stamp_data->rendertime[0] = '\0';
+ }
+ }
}
// XXX - Bad level call.
@@ -1116,7 +1131,12 @@ void BKE_stamp_buf(Scene *scene, unsigned char *rect, float *rectf, int width, i
return;
stampdata(scene, &stamp_data, 1);
- stamp_font_begin(12);
+
+ /* TODO, do_versions */
+ if(scene->r.stamp_font_id < 8)
+ scene->r.stamp_font_id= 12;
+
+ stamp_font_begin(scene->r.stamp_font_id);
BLF_buffer(rectf, rect, width, height, channels);
BLF_buffer_col(scene->r.fg_stamp[0], scene->r.fg_stamp[1], scene->r.fg_stamp[2], 1.0);
@@ -1166,6 +1186,21 @@ void BKE_stamp_buf(Scene *scene, unsigned char *rect, float *rectf, int width, i
BLF_position(x, y, 0.0);
BLF_draw_buffer(stamp_data.date);
+
+ /* the extra pixel for background. */
+ y -= 4;
+ }
+
+ /* Top left corner, below File, Date or Note */
+ if (stamp_data.rendertime[0]) {
+ BLF_width_and_height(stamp_data.rendertime, &w, &h);
+ y -= h;
+
+ /* and space for background. */
+ buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, 0, y-3, w+3, y+h+3);
+
+ BLF_position(x, y, 0.0);
+ BLF_draw_buffer(stamp_data.rendertime);
}
x= 0;
@@ -1472,9 +1507,11 @@ void BKE_image_signal(Image *ima, ImageUser *iuser, int signal)
iuser->ok= 1;
break;
case IMA_SIGNAL_SRC_CHANGE:
- if(ima->type==IMA_TYPE_MULTILAYER)
- image_free_buffers(ima);
- else if(ima->source==IMA_SRC_GENERATED) {
+ if(ima->type == IMA_TYPE_UV_TEST)
+ if(ima->source != IMA_SRC_GENERATED)
+ ima->type= IMA_TYPE_IMAGE;
+
+ if(ima->source==IMA_SRC_GENERATED) {
if(ima->gen_x==0 || ima->gen_y==0) {
ImBuf *ibuf= image_get_ibuf(ima, IMA_NO_INDEX, 0);
if(ibuf) {
@@ -1483,6 +1520,9 @@ void BKE_image_signal(Image *ima, ImageUser *iuser, int signal)
}
}
}
+
+ image_free_buffers(ima);
+
ima->ok= 1;
if(iuser)
iuser->ok= 1;
@@ -1559,15 +1599,22 @@ RenderPass *BKE_image_multilayer_index(RenderResult *rr, ImageUser *iuser)
return rpass;
}
-RenderResult *BKE_image_get_renderresult(struct Scene *scene, Image *ima)
+RenderResult *BKE_image_acquire_renderresult(struct Scene *scene, Image *ima)
{
if(ima->rr)
return ima->rr;
- if(ima->type==IMA_TYPE_R_RESULT)
- return RE_GetResult(RE_GetRender(scene->id.name));
+ else if(ima->type==IMA_TYPE_R_RESULT)
+ return RE_AcquireResultRead(RE_GetRender(scene->id.name));
return NULL;
}
+void BKE_image_release_renderresult(struct Scene *scene, Image *ima)
+{
+ if(ima->rr);
+ else if(ima->type==IMA_TYPE_R_RESULT)
+ RE_ReleaseResult(RE_GetRender(scene->id.name));
+}
+
/* after imbuf load, openexr type can return with a exrhandle open */
/* in that case we have to build a render-result */
static void image_create_multilayer(Image *ima, ImBuf *ibuf, int framenr)
@@ -1868,16 +1915,25 @@ static ImBuf *image_get_ibuf_multilayer(Image *ima, ImageUser *iuser)
/* showing RGBA result itself (from compo/sequence) or
like exr, using layers etc */
/* always returns a single ibuf, also during render progress */
-static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser)
+static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_r)
{
Render *re= NULL;
RenderResult *rr= NULL;
+ /* if we the caller is not going to release the lock, don't give the image */
+ if(!lock_r)
+ return NULL;
+
if(iuser && iuser->scene) {
re= RE_GetRender(iuser->scene->id.name);
- rr= RE_GetResult(re);
+ rr= RE_AcquireResultRead(re);
+
+ /* release is done in BKE_image_release_ibuf using lock_r */
+ *lock_r= re;
}
- if(rr==NULL) return NULL;
+
+ if(rr==NULL)
+ return NULL;
if(RE_RenderInProgress(re)) {
ImBuf *ibuf= image_get_ibuf(ima, IMA_NO_INDEX, 0);
@@ -1888,6 +1944,7 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser)
ibuf= IMB_allocImBuf(rr->rectx, rr->recty, 32, IB_rect, 0);
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
}
+
return ibuf;
}
else {
@@ -1902,7 +1959,7 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser)
pass= (iuser)? iuser->pass: 0;
/* this gives active layer, composite or seqence result */
- RE_GetResultImage(RE_GetRender(iuser->scene->id.name), &rres);
+ RE_AcquireResultImage(RE_GetRender(iuser->scene->id.name), &rres);
rect= (unsigned int *)rres.rect32;
rectf= rres.rectf;
dither= iuser->scene->r.dither_intensity;
@@ -1949,10 +2006,14 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser)
ibuf->zbuf_float= rres.rectz;
ibuf->flags |= IB_zbuffloat;
ibuf->dither= dither;
-
+
+ RE_ReleaseResultImage(re);
+
ima->ok= IMA_OK_LOADED;
return ibuf;
}
+
+ RE_ReleaseResultImage(re);
}
return NULL;
@@ -2006,8 +2067,9 @@ static ImBuf *image_get_ibuf_threadsafe(Image *ima, ImageUser *iuser, int *frame
}
/* Checks optional ImageUser and verifies/creates ImBuf. */
-/* returns ibuf */
-ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
+/* use this one if you want to get a render result in progress,
+ * if not, use BKE_image_get_ibuf which doesn't require a release */
+ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r)
{
ImBuf *ibuf= NULL;
float color[] = {0, 0, 0, 1};
@@ -2023,6 +2085,9 @@ ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
* things in a threadsafe way for image_get_ibuf_threadsafe to work correct.
* That means, the last two steps must be, 1) add the ibuf to the list and
* 2) set ima/iuser->ok to 0 to IMA_OK_LOADED */
+
+ if(lock_r)
+ *lock_r= NULL;
/* quick reject tests */
if(ima==NULL)
@@ -2090,16 +2155,17 @@ ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
else if(ima->source == IMA_SRC_GENERATED) {
/* generated is: ibuf is allocated dynamically */
/* UV testgrid or black or solid etc */
- if(ima->gen_x==0) ima->gen_x= 256;
- if(ima->gen_y==0) ima->gen_y= 256;
+ if(ima->gen_x==0) ima->gen_x= 1024;
+ if(ima->gen_y==0) ima->gen_y= 1024;
ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 0, ima->gen_type, color);
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
ima->ok= IMA_OK_LOADED;
}
else if(ima->source == IMA_SRC_VIEWER) {
if(ima->type==IMA_TYPE_R_RESULT) {
- /* always verify entirely */
- ibuf= image_get_render_result(ima, iuser);
+ /* always verify entirely, and potentially
+ returns pointer to release later */
+ ibuf= image_get_render_result(ima, iuser, lock_r);
}
else if(ima->type==IMA_TYPE_COMPOSITE) {
/* Composite Viewer, all handled in compositor */
@@ -2121,6 +2187,17 @@ ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
return ibuf;
}
+void BKE_image_release_ibuf(Image *ima, void *lock)
+{
+ /* for getting image during threaded render, need to release */
+ if(lock)
+ RE_ReleaseResult(lock);
+}
+
+ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
+{
+ return BKE_image_acquire_ibuf(ima, iuser, NULL);
+}
void BKE_image_user_calc_imanr(ImageUser *iuser, int cfra, int fieldnr)
{
@@ -2170,3 +2247,103 @@ void BKE_image_user_calc_imanr(ImageUser *iuser, int cfra, int fieldnr)
}
}
+/*
+ Produce image export path.
+
+ Fails returning 0 if image filename is empty or if destination path
+ matches image path (i.e. both are the same file).
+
+ Trailing slash in dest_dir is optional.
+
+ Logic:
+
+ - if an image is "below" current .blend file directory, rebuild the
+ same dir structure in dest_dir
+
+ For example //textures/foo/bar.png becomes
+ [dest_dir]/textures/foo/bar.png.
+
+ - if an image is not "below" current .blend file directory,
+ disregard it's path and copy it in the same directory where 3D file
+ goes.
+
+ For example //../foo/bar.png becomes [dest_dir]/bar.png.
+
+ This logic will help ensure that all image paths are relative and
+ that a user gets his images in one place. It'll also provide
+ consistent behaviour across exporters.
+ */
+int BKE_get_image_export_path(struct Image *im, const char *dest_dir, char *abs, int abs_size, char *rel, int rel_size)
+{
+ char path[FILE_MAX];
+ char dir[FILE_MAX];
+ char base[FILE_MAX];
+ char blend_dir[FILE_MAX]; /* directory, where current .blend file resides */
+ char dest_path[FILE_MAX];
+ char rel_dir[FILE_MAX];
+ int len;
+
+ if (abs)
+ abs[0]= 0;
+
+ if (rel)
+ rel[0]= 0;
+
+ BLI_split_dirfile_basic(G.sce, blend_dir, NULL);
+
+ if (!strlen(im->name)) {
+ if (G.f & G_DEBUG) printf("Invalid image type.\n");
+ return 0;
+ }
+
+ BLI_strncpy(path, im->name, sizeof(path));
+
+ /* expand "//" in filename and get absolute path */
+ BLI_convertstringcode(path, G.sce);
+
+ /* get the directory part */
+ BLI_split_dirfile_basic(path, dir, base);
+
+ len= strlen(blend_dir);
+
+ rel_dir[0] = 0;
+
+ /* if image is "below" current .blend file directory */
+ if (!strncmp(path, blend_dir, len)) {
+
+ /* if image is _in_ current .blend file directory */
+ if (!strcmp(dir, blend_dir)) {
+ BLI_join_dirfile(dest_path, dest_dir, base);
+ }
+ /* "below" */
+ else {
+ /* rel = image_path_dir - blend_dir */
+ BLI_strncpy(rel_dir, dir + len, sizeof(rel_dir));
+
+ BLI_join_dirfile(dest_path, dest_dir, rel_dir);
+ BLI_join_dirfile(dest_path, dest_path, base);
+ }
+
+ }
+ /* image is out of current directory */
+ else {
+ BLI_join_dirfile(dest_path, dest_dir, base);
+ }
+
+ if (abs)
+ BLI_strncpy(abs, dest_path, abs_size);
+
+ if (rel) {
+ strncat(rel, rel_dir, rel_size);
+ strncat(rel, base, rel_size);
+ }
+
+ /* return 2 if src=dest */
+ if (!strcmp(path, dest_path)) {
+ if (G.f & G_DEBUG) printf("%s and %s are the same file\n", path, dest_path);
+ return 2;
+ }
+
+ return 1;
+}
+
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index 956a5851827..de215ae4af9 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -33,6 +33,7 @@
#include "DNA_cloth_types.h"
#include "DNA_scene_types.h"
+#include "DNA_object_force.h"
#include "BKE_effect.h"
#include "BKE_global.h"
@@ -496,6 +497,7 @@ DO_INLINE void mulsub_fmatrix_fvector(float to[3], float matrix[3][3], float fro
// SPARSE SYMMETRIC big matrix with 3x3 matrix entries
///////////////////////////
/* printf a big matrix on console: for debug output */
+#if 0
static void print_bfmatrix(fmatrix3x3 *m3)
{
unsigned int i = 0;
@@ -505,6 +507,8 @@ static void print_bfmatrix(fmatrix3x3 *m3)
print_fmatrix(m3[i].m);
}
}
+#endif
+
/* create big matrix */
DO_INLINE fmatrix3x3 *create_bfmatrix(unsigned int verts, unsigned int springs)
{
@@ -1417,7 +1421,6 @@ static void hair_velocity_smoothing(float smoothfac, lfVector *lF, lfVector *lX,
int i = 0;
int j = 0;
int k = 0;
- lfVector temp;
INIT_MINMAX(gmin, gmax);
@@ -1480,15 +1483,19 @@ static void cloth_calc_force(ClothModifierData *clmd, float frame, lfVector *lF,
Cloth *cloth = clmd->clothObject;
int i = 0;
float spring_air = clmd->sim_parms->Cvi * 0.01f; /* viscosity of air scaled in percent */
- float gravity[3];
+ float gravity[3] = {0.0f, 0.0f, 0.0f};
float tm2[3][3] = {{-spring_air,0,0}, {0,-spring_air,0},{0,0,-spring_air}};
MFace *mfaces = cloth->mfaces;
unsigned int numverts = cloth->numverts;
LinkNode *search = cloth->springs;
lfVector *winvec;
+ EffectedPoint epoint;
- VECCOPY(gravity, clmd->sim_parms->gravity);
- mul_fvector_S(gravity, gravity, 0.001f); /* scale gravity force */
+ /* global acceleration (gravitation) */
+ if(clmd->scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY) {
+ VECCOPY(gravity, clmd->scene->physics_settings.gravity);
+ mul_fvector_S(gravity, gravity, 0.001f * clmd->sim_parms->effector_weights->global_gravity); /* scale gravity force */
+ }
/* set dFdX jacobi matrix to zero */
init_bfmatrix(dFdX, ZERO);
@@ -1523,10 +1530,9 @@ static void cloth_calc_force(ClothModifierData *clmd, float frame, lfVector *lF,
// precalculate wind forces
for(i = 0; i < cloth->numverts; i++)
- {
- float speed[3] = {0.0f, 0.0f,0.0f};
-
- pdDoEffectors(clmd->scene, effectors, lX[i], winvec[i], speed, frame, 0.0f, 0);
+ {
+ pd_point_from_loc(clmd->scene, (float*)lX[i], (float*)lV[i], i, &epoint);
+ pdDoEffectors(effectors, NULL, clmd->sim_parms->effector_weights, &epoint, winvec[i], NULL);
}
for(i = 0; i < cloth->numfaces; i++)
@@ -1654,9 +1660,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
while(step < tf)
{
// calculate forces
- effectors= pdInitEffectors(clmd->scene, ob, NULL);
cloth_calc_force(clmd, frame, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step, id->M);
- if(effectors) pdEndEffectors(effectors);
// calculate new velocity
simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv, id->M, id->bigI);
@@ -1739,9 +1743,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
cp_lfvector(id->V, id->Vnew, numverts);
// calculate
- effectors= pdInitEffectors(clmd->scene, ob, NULL);
cloth_calc_force(clmd, frame, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step+dt, id->M);
- if(effectors) pdEndEffectors(effectors);
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);
}
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 62f44d92d25..6717f5560be 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -213,17 +213,17 @@ static char *ob_adrcodes_to_paths (int adrcode, int *array_index)
*array_index= 2; return "delta_location";
case OB_ROT_X:
- *array_index= 0; return "rotation";
+ *array_index= 0; return "rotation_euler";
case OB_ROT_Y:
- *array_index= 1; return "rotation";
+ *array_index= 1; return "rotation_euler";
case OB_ROT_Z:
- *array_index= 2; return "rotation";
+ *array_index= 2; return "rotation_euler";
case OB_DROT_X:
- *array_index= 0; return "delta_rotation";
+ *array_index= 0; return "delta_rotation_euler";
case OB_DROT_Y:
- *array_index= 1; return "delta_rotation";
+ *array_index= 1; return "delta_rotation_euler";
case OB_DROT_Z:
- *array_index= 2; return "delta_rotation";
+ *array_index= 2; return "delta_rotation_euler";
case OB_SIZE_X:
*array_index= 0; return "scale";
@@ -281,23 +281,23 @@ static char *pchan_adrcodes_to_paths (int adrcode, int *array_index)
/* result depends on adrcode */
switch (adrcode) {
case AC_QUAT_W:
- *array_index= 0; return "rotation";
+ *array_index= 0; return "rotation_quaternion";
case AC_QUAT_X:
- *array_index= 1; return "rotation";
+ *array_index= 1; return "rotation_quaternion";
case AC_QUAT_Y:
- *array_index= 2; return "rotation";
+ *array_index= 2; return "rotation_quaternion";
case AC_QUAT_Z:
- *array_index= 3; return "rotation";
+ *array_index= 3; return "rotation_quaternion";
case AC_EUL_X:
- *array_index= 0; return "euler_rotation";
+ *array_index= 0; return "rotation_euler";
case AC_EUL_Y:
- *array_index= 1; return "euler_rotation";
+ *array_index= 1; return "rotation_euler";
case AC_EUL_Z:
- *array_index= 2; return "euler_rotation";
+ *array_index= 2; return "rotation_euler";
case -1: /* special case for euler-rotations used by old drivers */
- *array_index= 0; return "euler_rotation";
+ *array_index= 0; return "rotation_euler";
case AC_LOC_X:
*array_index= 0; return "location";
@@ -1047,10 +1047,6 @@ static ChannelDriver *idriver_to_cdriver (IpoDriver *idriver)
}
}
-
- /* free old driver */
- MEM_freeN(idriver);
-
/* return the new one */
return cdriver;
}
@@ -1122,11 +1118,9 @@ static void icu_to_fcurves (ListBase *groups, ListBase *list, IpoCurve *icu, cha
/* allocate memory for a new F-Curve */
fcu= MEM_callocN(sizeof(FCurve), "FCurve");
- /* convert driver - will free the old one... */
- if (icu->driver) {
+ /* convert driver */
+ if (icu->driver)
fcu->driver= idriver_to_cdriver(icu->driver);
- icu->driver= NULL;
- }
/* copy flags */
if (icu->flag & IPO_VISIBLE) fcu->flag |= FCURVE_VISIBLE;
@@ -1214,6 +1208,9 @@ static void icu_to_fcurves (ListBase *groups, ListBase *list, IpoCurve *icu, cha
/* interpolation can only be constant... */
dst->ipo= BEZT_IPO_CONST;
+ /* 'hide' flag is now used for keytype - only 'keyframes' existed before */
+ dst->hide= BEZT_KEYTYPE_KEYFRAME;
+
/* correct values, by checking if the flag of interest is set */
if ( ((int)(dst->vec[1][1])) & (abp->bit) )
dst->vec[0][1]= dst->vec[1][1]= dst->vec[2][1] = 1.0f;
@@ -1230,10 +1227,6 @@ static void icu_to_fcurves (ListBase *groups, ListBase *list, IpoCurve *icu, cha
/* add new F-Curve to list */
fcurve_add_to_list(groups, list, fcurve, actname);
}
-
- /* free old data of curve now that it's no longer needed for converting any more curves */
- if (icu->bezt) MEM_freeN(icu->bezt);
- if (icu->bp) MEM_freeN(icu->bezt);
}
else {
/* get rna-path
@@ -1264,6 +1257,9 @@ static void icu_to_fcurves (ListBase *groups, ListBase *list, IpoCurve *icu, cha
if (icu->ipo != IPO_MIXED)
dst->ipo= icu->ipo;
+ /* 'hide' flag is now used for keytype - only 'keyframes' existed before */
+ dst->hide= BEZT_KEYTYPE_KEYFRAME;
+
/* correct values for euler rotation curves - they were degrees/10 */
// XXX for now, just make them into radians as RNA sets/reads directly in that form
if ( ((icu->blocktype == ID_OB) && ELEM3(icu->adrcode, OB_ROT_X, OB_ROT_Y, OB_ROT_Z)) ||
@@ -1296,9 +1292,6 @@ static void icu_to_fcurves (ListBase *groups, ListBase *list, IpoCurve *icu, cha
}
}
}
-
- /* free this data now */
- MEM_freeN(icu->bezt);
}
else if (icu->bp) {
/* TODO: need to convert from BPoint type to the more compact FPoint type... but not priority, since no data used this */
@@ -1319,7 +1312,7 @@ static void icu_to_fcurves (ListBase *groups, ListBase *list, IpoCurve *icu, cha
*/
static void ipo_to_animato (Ipo *ipo, char actname[], char constname[], ListBase *animgroups, ListBase *anim, ListBase *drivers)
{
- IpoCurve *icu, *icn;
+ IpoCurve *icu;
/* sanity check */
if (ELEM3(NULL, ipo, anim, drivers))
@@ -1341,25 +1334,44 @@ static void ipo_to_animato (Ipo *ipo, char actname[], char constname[], ListBase
}
/* loop over IPO-Curves, freeing as we progress */
- for (icu= ipo->curve.first; icu; icu= icn) {
- /* get link to next (for later) */
- icn= icu->next;
-
+ for (icu= ipo->curve.first; icu; icu= icu->next) {
/* Since an IPO-Curve may end up being made into many F-Curves (i.e. bitflag curves),
* we figure out the best place to put the channel, then tell the curve-converter to just dump there
*/
if (icu->driver) {
/* Blender 2.4x allowed empty drivers, but we don't now, since they cause more trouble than they're worth */
- if ((icu->driver->ob) || (icu->driver->type == IPO_DRIVER_TYPE_PYTHON))
+ if ((icu->driver->ob) || (icu->driver->type == IPO_DRIVER_TYPE_PYTHON)) {
icu_to_fcurves(NULL, drivers, icu, actname, constname);
- else
+ }
+ else {
MEM_freeN(icu->driver);
+ icu->driver= NULL;
+ }
}
else
icu_to_fcurves(animgroups, anim, icu, actname, constname);
+ }
+
+ /* if this IPO block doesn't have any users after this one, free... */
+ ipo->id.us--;
+ if ( (ipo->id.us == 0) || ((ipo->id.us == 1) && (ipo->id.flag & LIB_FAKEUSER)) )
+ {
+ IpoCurve *icn;
- /* free this IpoCurve now that it's been converted */
- BLI_freelinkN(&ipo->curve, icu);
+ for (icu= ipo->curve.first; icu; icu= icn) {
+ icn= icu->next;
+
+ /* free driver */
+ if (icu->driver)
+ MEM_freeN(icu->driver);
+
+ /* free old data of curve now that it's no longer needed for converting any more curves */
+ if (icu->bezt) MEM_freeN(icu->bezt);
+ if (icu->bp) MEM_freeN(icu->bezt);
+
+ /* free this IPO-Curve */
+ BLI_freelinkN(&ipo->curve, icu);
+ }
}
}
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index 6d22b170e08..2d3b84bbdb3 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -1369,7 +1369,7 @@ int do_ob_key(Scene *scene, Object *ob)
if(key==NULL)
return 0;
- if(ob->shapeflag & (OB_SHAPE_LOCK|OB_SHAPE_TEMPLOCK)) {
+ if(ob->shapeflag & OB_SHAPE_LOCK) {
KeyBlock *kb= BLI_findlink(&key->block, ob->shapenr-1);
if (G.f & G_DEBUG) printf("ob %s, key %s locked \n", ob->id.name+2, key->id.name+2);
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index d58f8447d28..0faff6d3354 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -525,30 +525,13 @@ static int where_on_path_deform(Object *ob, float ctime, float *vec, float *dir,
static int calc_curve_deform(Scene *scene, Object *par, float *co, short axis, CurveDeform *cd, float *quatp)
{
Curve *cu= par->data;
- float fac, loc[4], dir[3], cent[3], radius;
- short upflag, index;
-
- if(axis==MOD_CURVE_POSX || axis==MOD_CURVE_NEGX) {
- upflag= OB_POSZ;
- cent[0]= 0.0;
- cent[1]= co[1];
- cent[2]= co[2];
- index= 0;
- }
- else if(axis==MOD_CURVE_POSY || axis==MOD_CURVE_NEGY) {
- upflag= OB_POSZ;
- cent[0]= co[0];
- cent[1]= 0.0;
- cent[2]= co[2];
- index= 1;
- }
- else {
- upflag= OB_POSY;
- cent[0]= co[0];
- cent[1]= co[1];
- cent[2]= 0.0;
- index= 2;
- }
+ float fac, loc[4], dir[3], new_quat[4], radius;
+ short /*upflag, */ index;
+
+ index= axis-1;
+ if(index>2)
+ index -= 3; /* negative */
+
/* to be sure, mostly after file load */
if(cu->path==NULL) {
makeDispListCurveTypes(scene, par, 0);
@@ -556,7 +539,7 @@ static int calc_curve_deform(Scene *scene, Object *par, float *co, short axis, C
}
/* options */
- if(ELEM3(axis, OB_NEGX, OB_NEGY, OB_NEGZ)) {
+ if(ELEM3(axis, OB_NEGX+1, OB_NEGY+1, OB_NEGZ+1)) { /* OB_NEG# 0-5, MOD_CURVE_POS# 1-6 */
if(cu->flag & CU_STRETCH)
fac= (-co[index]-cd->dmax[index])/(cd->dmax[index] - cd->dmin[index]);
else
@@ -580,9 +563,10 @@ static int calc_curve_deform(Scene *scene, Object *par, float *co, short axis, C
}
#endif // XXX old animation system
- if( where_on_path_deform(par, fac, loc, dir, NULL, &radius)) { /* returns OK */
- float q[4], mat[3][3], quat[4];
-
+ if( where_on_path_deform(par, fac, loc, dir, new_quat, &radius)) { /* returns OK */
+ float quat[4], cent[3];
+
+#if 0 // XXX - 2.4x Z-Up, Now use bevel tilt.
if(cd->no_rot_axis) /* set by caller */
dir[cd->no_rot_axis-1]= 0.0f;
@@ -598,22 +582,104 @@ static int calc_curve_deform(Scene *scene, Object *par, float *co, short axis, C
q[2]= -fac*dir[1];
q[3]= -fac*dir[2];
QuatMul(quat, q, quat);
- }
- QuatToMat3(quat, mat);
-
- if(cu->flag & CU_PATH_RADIUS) {
- float tmat[3][3], rmat[3][3];
- Mat3Scale(tmat, radius);
- Mat3MulMat3(rmat, mat, tmat);
- Mat3CpyMat3(mat, rmat);
}
+#endif
- /* local rotation */
- Mat3MulVecfl(mat, cent);
+
+ static float q_x90d[4] = {0.70710676908493, 0.70710676908493, 0.0, 0.0}; // float rot_axis[3]= {1,0,0}; AxisAngleToQuat(q, rot_axis, 90 * (M_PI / 180));
+ static float q_y90d[4] = {0.70710676908493, 0.0, 0.70710676908493, 0.0}; // float rot_axis[3]= {0,1,0}; AxisAngleToQuat(q, rot_axis, 90 * (M_PI / 180));
+ static float q_z90d[4] = {0.70710676908493, 0.0, 0.0, 0.70710676908493}; // float rot_axis[3]= {0,0,2}; AxisAngleToQuat(q, rot_axis, 90 * (M_PI / 180));
+
+ static float q_nx90d[4] = {0.70710676908493, -0.70710676908493, 0.0, 0.0}; // float rot_axis[3]= {1,0,0}; AxisAngleToQuat(q, rot_axis, -90 * (M_PI / 180));
+ static float q_ny90d[4] = {0.70710676908493, 0.0, -0.70710676908493, 0.0}; // float rot_axis[3]= {0,1,0}; AxisAngleToQuat(q, rot_axis, -90 * (M_PI / 180));
+ static float q_nz90d[4] = {0.70710676908493, 0.0, 0.0, -0.70710676908493}; // float rot_axis[3]= {0,0,2}; AxisAngleToQuat(q, rot_axis, -90 * (M_PI / 180));
+
+
+ if(cd->no_rot_axis) { /* set by caller */
+
+ /* this is not exactly the same as 2.4x, since the axis is having rotation removed rather then
+ * changing the axis before calculating the tilt but serves much the same purpose */
+ float dir_flat[3]={0,0,0}, q[4];
+ VECCOPY(dir_flat, dir);
+ dir_flat[cd->no_rot_axis-1]= 0.0f;
+
+ Normalize(dir);
+ Normalize(dir_flat);
+
+ RotationBetweenVectorsToQuat(q, dir, dir_flat); /* Could this be done faster? */
+
+ QuatMul(new_quat, q, new_quat);
+ }
+
+
+ /* Logic for 'cent' orientation *
+ *
+ * The way 'co' is copied to 'cent' may seem to have no meaning, but it does.
+ *
+ * Use a curve modifier to stretch a cube out, color each side RGB, positive side light, negative dark.
+ * view with X up (default), from the angle that you can see 3 faces RGB colors (light), anti-clockwise
+ * Notice X,Y,Z Up all have light colors and each ordered CCW.
+ *
+ * Now for Neg Up XYZ, the colors are all dark, and ordered clockwise - Campbell
+ * */
+
+ switch(axis) {
+ case MOD_CURVE_POSX:
+ QuatMul(quat, new_quat, q_y90d);
+
+ cent[0]= 0.0;
+ cent[1]= co[2];
+ cent[2]= co[1];
+ break;
+ case MOD_CURVE_NEGX:
+ QuatMul(quat, new_quat, q_ny90d);
+
+ cent[0]= 0.0;
+ cent[1]= -co[1];
+ cent[2]= co[2];
+
+ break;
+ case MOD_CURVE_POSY:
+ QuatMul(quat, new_quat, q_x90d);
+
+ cent[0]= co[2];
+ cent[1]= 0.0;
+ cent[2]= -co[0];
+ break;
+ case MOD_CURVE_NEGY:
+ QuatMul(quat, new_quat, q_nx90d);
+
+ cent[0]= -co[0];
+ cent[1]= 0.0;
+ cent[2]= -co[2];
+ break;
+ case MOD_CURVE_POSZ:
+ QuatMul(quat, new_quat, q_z90d);
+
+ cent[0]= co[1];
+ cent[1]= -co[0];
+ cent[2]= 0.0;
+ break;
+ case MOD_CURVE_NEGZ:
+ QuatMul(quat, new_quat, q_nz90d);
+
+ cent[0]= co[0];
+ cent[1]= -co[1];
+ cent[2]= 0.0;
+ break;
+ }
+
+ /* scale if enabled */
+ if(cu->flag & CU_PATH_RADIUS)
+ VecMulf(cent, radius);
+ /* local rotation */
+ NormalQuat(quat);
+ QuatMulVecf(quat, cent);
+
/* translation */
VECADD(co, cent, loc);
-
+
if(quatp)
QUATCOPY(quatp, quat);
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index eb9d578402d..abd551f06c2 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -640,42 +640,15 @@ void *alloc_libblock(ListBase *lb, short type, const char *name)
}
/* by spec, animdata is first item after ID */
-/* we still read ->adt itself, to ensure compiler warns when it doesnt exist */
+/* and, trust that BKE_animdata_from_id() will only find AnimData for valid ID-types */
static void id_copy_animdata(ID *id)
{
- switch(GS(id->name)) {
- case ID_OB:
- ((Object *)id)->adt= BKE_copy_animdata(((Object *)id)->adt);
- break;
- case ID_CU:
- ((Curve *)id)->adt= BKE_copy_animdata(((Curve *)id)->adt);
- break;
- case ID_CA:
- ((Camera *)id)->adt= BKE_copy_animdata(((Camera *)id)->adt);
- break;
- case ID_KE:
- ((Key *)id)->adt= BKE_copy_animdata(((Key *)id)->adt);
- break;
- case ID_LA:
- ((Lamp *)id)->adt= BKE_copy_animdata(((Lamp *)id)->adt);
- break;
- case ID_MA:
- ((Material *)id)->adt= BKE_copy_animdata(((Material *)id)->adt);
- break;
- case ID_NT:
- ((bNodeTree *)id)->adt= BKE_copy_animdata(((bNodeTree *)id)->adt);
- break;
- case ID_SCE:
- ((Scene *)id)->adt= BKE_copy_animdata(((Scene *)id)->adt);
- break;
- case ID_TE:
- ((Tex *)id)->adt= BKE_copy_animdata(((Tex *)id)->adt);
- break;
- case ID_WO:
- ((World *)id)->adt= BKE_copy_animdata(((World *)id)->adt);
- break;
- }
+ AnimData *adt= BKE_animdata_from_id(id);
+ if (adt) {
+ IdAdtTemplate *iat = (IdAdtTemplate *)id;
+ iat->adt= BKE_copy_animdata(iat->adt);
+ }
}
/* used everywhere in blenkernel and text.c */
@@ -705,8 +678,9 @@ void *copy_libblock(void *rt)
id->newid= idn;
idn->flag |= LIB_NEW;
if (id->properties) idn->properties = IDP_CopyProperty(id->properties);
-
- id_copy_animdata(id);
+
+ /* the duplicate should get a copy of the animdata */
+ id_copy_animdata(idn);
return idn;
}
@@ -1234,12 +1208,13 @@ static void lib_indirect_test_id(ID *id)
int a;
- // XXX old animation system!
+ // XXX old animation system! --------------------------------------
for (strip=ob->nlastrips.first; strip; strip=strip->next){
LIBTAG(strip->object);
LIBTAG(strip->act);
LIBTAG(strip->ipo);
}
+ // XXX: new animation system needs something like this?
for(a=0; a<ob->totcol; a++) {
LIBTAG(ob->mat[a]);
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 1667bd97102..c1093c119dc 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -172,16 +172,16 @@ void init_material(Material *ma)
ma->vol.density = 1.0f;
ma->vol.emission = 0.0f;
- ma->vol.absorption = 1.0f;
ma->vol.scattering = 1.0f;
+ ma->vol.reflection = 1.0f;
+ ma->vol.transmission_col[0] = ma->vol.transmission_col[1] = ma->vol.transmission_col[2] = 1.0f;
+ ma->vol.reflection_col[0] = ma->vol.reflection_col[1] = ma->vol.reflection_col[2] = 1.0f;
ma->vol.emission_col[0] = ma->vol.emission_col[1] = ma->vol.emission_col[2] = 1.0f;
- ma->vol.absorption_col[0] = ma->vol.absorption_col[1] = ma->vol.absorption_col[2] = 0.0f;
ma->vol.density_scale = 1.0f;
ma->vol.depth_cutoff = 0.01f;
ma->vol.stepsize_type = MA_VOL_STEP_RANDOMIZED;
ma->vol.stepsize = 0.2f;
- ma->vol.shade_stepsize = 0.2f;
- ma->vol.shade_type = MA_VOL_SHADE_SINGLE;
+ ma->vol.shade_type = MA_VOL_SHADE_SHADED;
ma->vol.shadeflag |= MA_VOL_PRECACHESHADING;
ma->vol.precache_resolution = 50;
@@ -625,6 +625,24 @@ void assign_material(Object *ob, Material *ma, int act)
test_object_materials(ob->data);
}
+/* XXX - this calls many more update calls per object then are needed, could be optimized */
+void assign_matarar(struct Object *ob, struct Material ***matar, int totcol)
+{
+ int i, actcol_orig= ob->actcol;
+
+ while(object_remove_material_slot(ob)) {};
+
+ /* now we have the right number of slots */
+ for(i=0; i<totcol; i++)
+ assign_material(ob, (*matar)[i], i+1);
+
+ if(actcol_orig > ob->totcol)
+ actcol_orig= ob->totcol;
+
+ ob->actcol= actcol_orig;
+}
+
+
int find_material_index(Object *ob, Material *ma)
{
Material ***matarar;
@@ -645,17 +663,18 @@ int find_material_index(Object *ob, Material *ma)
return 0;
}
-void object_add_material_slot(Object *ob)
+int object_add_material_slot(Object *ob)
{
Material *ma;
- if(ob==0) return;
- if(ob->totcol>=MAXMAT) return;
+ if(ob==0) return FALSE;
+ if(ob->totcol>=MAXMAT) return FALSE;
ma= give_current_material(ob, ob->actcol);
assign_material(ob, ma, ob->totcol+1);
ob->actcol= ob->totcol;
+ return TRUE;
}
static void do_init_render_material(Material *ma, int r_mode, float *amb)
@@ -870,7 +889,7 @@ void automatname(Material *ma)
}
-void object_remove_material_slot(Object *ob)
+int object_remove_material_slot(Object *ob)
{
Material *mao, ***matarar;
Object *obt;
@@ -879,7 +898,7 @@ void object_remove_material_slot(Object *ob)
short *totcolp;
int a, actcol;
- if(ob==NULL || ob->totcol==0) return;
+ if(ob==NULL || ob->totcol==0) return FALSE;
/* take a mesh/curve/mball as starting point, remove 1 index,
* AND with all objects that share the ob->data
@@ -890,6 +909,8 @@ void object_remove_material_slot(Object *ob)
totcolp= give_totcolp(ob);
matarar= give_matarar(ob);
+ if(*matarar==NULL) return FALSE;
+
/* we delete the actcol */
if(ob->totcol) {
mao= (*matarar)[ob->actcol-1];
@@ -952,6 +973,8 @@ void object_remove_material_slot(Object *ob)
}
freedisplist(&ob->disp);
}
+
+ return TRUE;
}
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 5f7fb2f71f0..2725d1dc894 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -42,6 +42,7 @@
#include "DNA_ID.h"
#include "DNA_curve_types.h"
+#include "DNA_scene_types.h"
#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_image_types.h"
@@ -73,6 +74,7 @@
#include "BLI_arithb.h"
#include "BLI_cellalloc.h"
#include "BLI_array.h"
+#include "BLI_edgehash.h"
#include "bmesh.h"
@@ -676,7 +678,8 @@ void set_mesh(Object *ob, Mesh *me)
if(ob->type==OB_MESH) {
old= ob->data;
- old->id.us--;
+ if (old)
+ old->id.us--;
ob->data= me;
id_us_plus((ID *)me);
}
@@ -1085,6 +1088,187 @@ void nurbs_to_mesh(Object *ob)
}
+typedef struct EdgeLink {
+ Link *next, *prev;
+ void *edge;
+} EdgeLink;
+
+typedef struct VertLink {
+ Link *next, *prev;
+ int index;
+} VertLink;
+
+static void prependPolyLineVert(ListBase *lb, int index)
+{
+ VertLink *vl= MEM_callocN(sizeof(VertLink), "VertLink");
+ vl->index = index;
+ BLI_addhead(lb, vl);
+}
+
+static void appendPolyLineVert(ListBase *lb, int index)
+{
+ VertLink *vl= MEM_callocN(sizeof(VertLink), "VertLink");
+ vl->index = index;
+ BLI_addtail(lb, vl);
+}
+
+void mesh_to_curve(Scene *scene, Object *ob)
+{
+ /* make new mesh data from the original copy */
+ DerivedMesh *dm= mesh_get_derived_final(scene, ob, CD_MASK_MESH);
+
+ MVert *mverts= dm->getVertArray(dm);
+ MEdge *med, *medge= dm->getEdgeArray(dm);
+ MFace *mf, *mface= dm->getTessFaceArray(dm);
+
+ int totedge = dm->getNumEdges(dm);
+ int totface = dm->getNumTessFaces(dm);
+ int totedges = 0;
+ int i;
+
+ /* only to detect edge polylines */
+ EdgeHash *eh = BLI_edgehash_new();
+ EdgeHash *eh_edge = BLI_edgehash_new();
+
+
+ ListBase edges = {NULL, NULL};
+
+ /* create edges from all faces (so as to find edges not in any faces) */
+ mf= mface;
+ for (i = 0; i < totface; i++, mf++) {
+ if (!BLI_edgehash_haskey(eh, mf->v1, mf->v2))
+ BLI_edgehash_insert(eh, mf->v1, mf->v2, NULL);
+ if (!BLI_edgehash_haskey(eh, mf->v2, mf->v3))
+ BLI_edgehash_insert(eh, mf->v2, mf->v3, NULL);
+
+ if (mf->v4) {
+ if (!BLI_edgehash_haskey(eh, mf->v3, mf->v4))
+ BLI_edgehash_insert(eh, mf->v3, mf->v4, NULL);
+ if (!BLI_edgehash_haskey(eh, mf->v4, mf->v1))
+ BLI_edgehash_insert(eh, mf->v4, mf->v1, NULL);
+ } else {
+ if (!BLI_edgehash_haskey(eh, mf->v3, mf->v1))
+ BLI_edgehash_insert(eh, mf->v3, mf->v1, NULL);
+ }
+ }
+
+ med= medge;
+ for(i=0; i<totedge; i++, med++) {
+ if (!BLI_edgehash_haskey(eh, med->v1, med->v2)) {
+ EdgeLink *edl= MEM_callocN(sizeof(EdgeLink), "EdgeLink");
+
+ BLI_edgehash_insert(eh_edge, med->v1, med->v2, NULL);
+ edl->edge= med;
+
+ BLI_addtail(&edges, edl); totedges++;
+ }
+ }
+ BLI_edgehash_free(eh_edge, NULL);
+ BLI_edgehash_free(eh, NULL);
+
+ if(edges.first) {
+ Curve *cu = add_curve(ob->id.name+2, OB_CURVE);
+ cu->flag |= CU_3D;
+
+ while(edges.first) {
+ /* each iteration find a polyline and add this as a nurbs poly spline */
+
+ ListBase polyline = {NULL, NULL}; /* store a list of VertLink's */
+ int closed = FALSE;
+ int totpoly= 0;
+ MEdge *med_current= ((EdgeLink *)edges.last)->edge;
+ int startVert= med_current->v1;
+ int endVert= med_current->v2;
+ int ok= TRUE;
+
+ appendPolyLineVert(&polyline, startVert); totpoly++;
+ appendPolyLineVert(&polyline, endVert); totpoly++;
+ BLI_freelinkN(&edges, edges.last); totedges--;
+
+ while(ok) { /* while connected edges are found... */
+ ok = FALSE;
+ i= totedges;
+ while(i) {
+ EdgeLink *edl;
+
+ i-=1;
+ edl= BLI_findlink(&edges, i);
+ med= edl->edge;
+
+ if(med->v1==endVert) {
+ endVert = med->v2;
+ appendPolyLineVert(&polyline, med->v2); totpoly++;
+ BLI_freelinkN(&edges, edl); totedges--;
+ ok= TRUE;
+ }
+ else if(med->v2==endVert) {
+ endVert = med->v1;
+ appendPolyLineVert(&polyline, endVert); totpoly++;
+ BLI_freelinkN(&edges, edl); totedges--;
+ ok= TRUE;
+ }
+ else if(med->v1==startVert) {
+ startVert = med->v2;
+ prependPolyLineVert(&polyline, startVert); totpoly++;
+ BLI_freelinkN(&edges, edl); totedges--;
+ ok= TRUE;
+ }
+ else if(med->v2==startVert) {
+ startVert = med->v1;
+ prependPolyLineVert(&polyline, startVert); totpoly++;
+ BLI_freelinkN(&edges, edl); totedges--;
+ ok= TRUE;
+ }
+ }
+ }
+
+ /* Now we have a polyline, make into a curve */
+ if(startVert==endVert) {
+ BLI_freelinkN(&polyline, polyline.last);
+ totpoly--;
+ closed = TRUE;
+ }
+
+ /* --- nurbs --- */
+ {
+ Nurb *nu;
+ BPoint *bp;
+ VertLink *vl;
+
+ /* create new 'nurb' within the curve */
+ nu = (Nurb *)MEM_callocN(sizeof(Nurb), "MeshNurb");
+
+ nu->pntsu= totpoly;
+ nu->pntsv= 1;
+ nu->orderu= 4;
+ nu->flagu= 2 | (closed ? CU_CYCLIC:0); /* endpoint */
+ nu->resolu= 12;
+
+ nu->bp= (BPoint *)MEM_callocN(sizeof(BPoint)*totpoly, "bpoints");
+
+ /* add points */
+ vl= polyline.first;
+ for (i=0, bp=nu->bp; i < totpoly; i++, bp++, vl=(VertLink *)vl->next) {
+ VecCopyf(bp->vec, mverts[vl->index].co);
+ bp->f1= SELECT;
+ bp->radius = bp->weight = 1.0;
+ }
+ BLI_freelistN(&polyline);
+
+ /* add nurb to curve */
+ BLI_addtail(&cu->nurb, nu);
+ }
+ /* --- done with nurbs --- */
+ }
+
+ ((Mesh *)ob->data)->id.us--;
+ ob->data= cu;
+ ob->type= OB_CURVE;
+ }
+
+ dm->release(dm);
+}
+
void mesh_delete_material_index(Mesh *me, int index)
{
int i;
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 66f345b7e44..a70d1a02bb4 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -35,6 +35,7 @@
*
*/
+#include "stddef.h"
#include "string.h"
#include "stdarg.h"
#include "math.h"
@@ -5164,6 +5165,8 @@ static void clothModifier_copyData(ModifierData *md, ModifierData *target)
tclmd->point_cache = NULL;
tclmd->sim_parms = MEM_dupallocN(clmd->sim_parms);
+ if(clmd->sim_parms->effector_weights)
+ tclmd->sim_parms->effector_weights = MEM_dupallocN(clmd->sim_parms->effector_weights);
tclmd->coll_parms = MEM_dupallocN(clmd->coll_parms);
tclmd->point_cache = BKE_ptcache_copy_list(&tclmd->ptcaches, &clmd->ptcaches);
tclmd->clothObject = NULL;
@@ -5185,8 +5188,11 @@ static void clothModifier_freeData(ModifierData *md)
cloth_free_modifier_extern (clmd);
- if(clmd->sim_parms)
+ if(clmd->sim_parms) {
+ if(clmd->sim_parms->effector_weights)
+ MEM_freeN(clmd->sim_parms->effector_weights);
MEM_freeN(clmd->sim_parms);
+ }
if(clmd->coll_parms)
MEM_freeN(clmd->coll_parms);
@@ -5399,7 +5405,8 @@ static void surfaceModifier_freeData(ModifierData *md)
MEM_freeN(surmd->bvhtree);
}
- surmd->dm->release(surmd->dm);
+ if(surmd->dm)
+ surmd->dm->release(surmd->dm);
if(surmd->x)
MEM_freeN(surmd->x);
@@ -5486,7 +5493,10 @@ static void surfaceModifier_deformVerts(
else
surmd->bvhtree = MEM_callocN(sizeof(BVHTreeFromMesh), "BVHTreeFromMesh");
- bvhtree_from_mesh_faces(surmd->bvhtree, surmd->dm, 0.0, 2, 6);
+ if(surmd->dm->getNumFaces(surmd->dm))
+ bvhtree_from_mesh_faces(surmd->bvhtree, surmd->dm, 0.0, 2, 6);
+ else
+ bvhtree_from_mesh_edges(surmd->bvhtree, surmd->dm, 0.0, 2, 6);
}
}
@@ -5794,6 +5804,7 @@ static DerivedMesh * particleInstanceModifier_applyModifier(
{
DerivedMesh *dm = derivedData, *result;
ParticleInstanceModifierData *pimd= (ParticleInstanceModifierData*) md;
+ ParticleSimulationData sim;
ParticleSystem * psys=0;
ParticleData *pa=0, *pars=0;
MFace *mface, *orig_mface;
@@ -5828,6 +5839,11 @@ static DerivedMesh * particleInstanceModifier_applyModifier(
if(totpart==0)
return derivedData;
+ sim.scene = md->scene;
+ sim.ob = pimd->ob;
+ sim.psys = psys;
+ sim.psmd = psys_get_modifier(pimd->ob, psys);
+
if(pimd->flag & eParticleInstanceFlag_UseSize) {
int p;
float *si;
@@ -5855,7 +5871,7 @@ static DerivedMesh * particleInstanceModifier_applyModifier(
maxvert=totvert*totpart;
maxface=totface*totpart;
- psys->lattice=psys_get_lattice(md->scene, ob, psys);
+ psys->lattice=psys_get_lattice(&sim);
if(psys->flag & (PSYS_HAIR_DONE|PSYS_KEYED) || psys->pointcache->flag & PTCACHE_BAKED){
@@ -5905,7 +5921,7 @@ static DerivedMesh * particleInstanceModifier_applyModifier(
mv->co[axis] = 0.0;
}
- psys_get_particle_on_path(md->scene, pimd->ob, psys,first_particle + i/totvert, &state,1);
+ psys_get_particle_on_path(&sim, first_particle + i/totvert, &state,1);
Normalize(state.vel);
@@ -5927,7 +5943,7 @@ static DerivedMesh * particleInstanceModifier_applyModifier(
}
else{
state.time=-1.0;
- psys_get_particle_state(md->scene, pimd->ob, psys, first_particle + i/totvert, &state,1);
+ psys_get_particle_state(&sim, first_particle + i/totvert, &state,1);
}
QuatMulVecf(state.rot,mv->co);
@@ -6611,6 +6627,7 @@ static DerivedMesh * explodeModifier_explodeMesh(ExplodeModifierData *emd,
DerivedMesh *explode, *dm=to_explode;
MFace *mf=0;
ParticleSettings *part=psmd->psys->part;
+ ParticleSimulationData sim = {scene, ob, psmd->psys, psmd};
ParticleData *pa=NULL, *pars=psmd->psys->particles;
ParticleKey state;
EdgeHash *vertpahash;
@@ -6626,7 +6643,7 @@ static DerivedMesh * explodeModifier_explodeMesh(ExplodeModifierData *emd,
totvert= dm->getNumVerts(dm);
totpart= psmd->psys->totpart;
- timestep= psys_get_timestep(part);
+ timestep= psys_get_timestep(&sim);
//if(part->flag & PART_GLOB_TIME)
cfra=bsystem_time(scene, 0,(float)scene->r.cfra,0.0);
@@ -6669,7 +6686,7 @@ static DerivedMesh * explodeModifier_explodeMesh(ExplodeModifierData *emd,
/* getting back to object space */
Mat4Invert(imat,ob->obmat);
- psmd->psys->lattice = psys_get_lattice(scene, ob, psmd->psys);
+ psmd->psys->lattice = psys_get_lattice(&sim);
/* duplicate & displace vertices */
ehi= BLI_edgehashIterator_new(vertpahash);
@@ -6697,7 +6714,7 @@ static DerivedMesh * explodeModifier_explodeMesh(ExplodeModifierData *emd,
Mat4MulVecfl(ob->obmat,loc0);
state.time=cfra;
- psys_get_particle_state(scene, ob, psmd->psys, i, &state,1);
+ psys_get_particle_state(&sim, i, &state, 1);
vertco=CDDM_get_vert(explode,v)->co;
@@ -6787,7 +6804,7 @@ static DerivedMesh * explodeModifier_applyModifier(
{
DerivedMesh *dm = derivedData;
ExplodeModifierData *emd= (ExplodeModifierData*) md;
- ParticleSystemModifierData *psmd=explodeModifier_findPrecedingParticlesystem(ob,md);;
+ ParticleSystemModifierData *psmd=explodeModifier_findPrecedingParticlesystem(ob,md);
if(psmd){
ParticleSystem * psys=psmd->psys;
@@ -7698,6 +7715,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type)
mti->initData = smoothModifier_initData;
mti->copyData = smoothModifier_copyData;
mti->requiredDataMask = smoothModifier_requiredDataMask;
+ mti->isDisabled = smoothModifier_isDisabled;
mti->deformVerts = smoothModifier_deformVerts;
mti->deformVertsEM = smoothModifier_deformVertsEM;
@@ -7708,6 +7726,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type)
mti->initData = castModifier_initData;
mti->copyData = castModifier_copyData;
mti->requiredDataMask = castModifier_requiredDataMask;
+ mti->isDisabled = castModifier_isDisabled;
mti->foreachObjectLink = castModifier_foreachObjectLink;
mti->updateDepgraph = castModifier_updateDepgraph;
mti->deformVerts = castModifier_deformVerts;
@@ -7938,7 +7957,8 @@ ModifierData *modifier_new(int type)
{
ModifierTypeInfo *mti = modifierType_getInfo(type);
ModifierData *md = MEM_callocN(mti->structSize, mti->structName);
-
+
+ // FIXME: we need to make the name always be unique somehow...
strcpy(md->name, mti->name);
md->type = type;
@@ -7963,6 +7983,15 @@ void modifier_free(ModifierData *md)
MEM_freeN(md);
}
+void modifier_unique_name(ListBase *modifiers, ModifierData *md)
+{
+ if (modifiers && md) {
+ ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+ BLI_uniquename(modifiers, md, mti->name, '.', offsetof(ModifierData, name), sizeof(md->name));
+ }
+}
+
int modifier_dependsOnTime(ModifierData *md)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
@@ -8314,7 +8343,7 @@ int modifiers_isDeformed(Scene *scene, Object *ob)
ModifierData *md = modifiers_getVirtualModifierList(ob);
for (; md; md=md->next) {
- if(ob==scene->obedit && (md->mode & eModifierMode_Editmode)==0);
+ if(ob->mode==OB_MODE_EDIT && (md->mode & eModifierMode_Editmode)==0);
else
if(modifier_isDeformer(md))
return 1;
@@ -8332,19 +8361,6 @@ int modifiers_indexInObject(Object *ob, ModifierData *md_seek)
return i;
}
-static int modifiers_usesPointCache(Object *ob)
-{
- ModifierData *md = ob->modifiers.first;
-
- for (; md; md=md->next) {
- ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- if (mti->flags & eModifierTypeFlag_UsesPointCache) {
- return 1;
- }
- }
- return 0;
-}
-
void modifier_freeTemporaryData(ModifierData *md)
{
if(md->type == eModifierType_Armature) {
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index f38b36d47b3..07b86b8251c 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -142,6 +142,7 @@ void multiresModifier_join(Object *ob)
mmd = (MultiresModifierData*)modifier_new(eModifierType_Multires);
BLI_insertlinkbefore(&base->object->modifiers, md, mmd);
+ modifier_unique_name(&base->object->modifiers, mmd);
}
if(mmd)
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 83ee71bfe40..3979586fb19 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -219,6 +219,9 @@ void copy_nladata (ListBase *dst, ListBase *src)
if ELEM(NULL, dst, src)
return;
+ /* clear out the destination list first for precautions... */
+ dst->first= dst->last= NULL;
+
/* 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 */
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 90ea53d4364..1a89de7e8d6 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -1246,9 +1246,12 @@ void nodeAddToPreview(bNode *node, float *col, int x, int y)
if(preview) {
if(x>=0 && y>=0) {
if(x<preview->xsize && y<preview->ysize) {
- float *tar= preview->rect+ 4*((preview->xsize*y) + x);
+ unsigned char *tar= preview->rect+ 4*((preview->xsize*y) + x);
//if(tar[0]==0.0f) {
- QUATCOPY(tar, col);
+ tar[0]= FTOCHAR(col[0]);
+ tar[1]= FTOCHAR(col[1]);
+ tar[2]= FTOCHAR(col[2]);
+ tar[3]= FTOCHAR(col[3]);
//}
}
//else printf("prv out bound x y %d %d\n", x, y);
@@ -1575,6 +1578,37 @@ bNode *nodeGetActiveID(bNodeTree *ntree, short idtype)
return node;
}
+int nodeSetActiveID(bNodeTree *ntree, short idtype, ID *id)
+{
+ bNode *node;
+ int ok= FALSE;
+
+ if(ntree==NULL) return ok;
+
+ /* check for group edit */
+ for(node= ntree->nodes.first; node; node= node->next)
+ if(node->flag & NODE_GROUP_EDIT)
+ break;
+
+ if(node)
+ ntree= (bNodeTree*)node->id;
+
+ /* now find active node with this id */
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->id && GS(node->id->name)==idtype) {
+ if(id && ok==FALSE && node->id==id) {
+ node->flag |= NODE_ACTIVE_ID;
+ ok= TRUE;
+ } else {
+ node->flag &= ~NODE_ACTIVE_ID;
+ }
+ }
+ }
+
+ return ok;
+}
+
+
/* two active flags, ID nodes have special flag for buttons display */
void nodeClearActiveID(bNodeTree *ntree, short idtype)
{
@@ -1953,6 +1987,7 @@ static void composit_end_exec(bNodeTree *ntree, int is_group)
if(ns->data) {
printf("freed leftover buffer from stack\n");
free_compbuf(ns->data);
+ ns->data= NULL;
}
}
}
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 54c9293fd57..cb9748ddb85 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -91,6 +91,7 @@
#include "BKE_constraint.h"
#include "BKE_curve.h"
#include "BKE_displist.h"
+#include "BKE_effect.h"
#include "BKE_fcurve.h"
#include "BKE_group.h"
#include "BKE_icons.h"
@@ -128,8 +129,8 @@ void clear_workob(Object *workob)
{
memset(workob, 0, sizeof(Object));
- workob->size[0]= workob->size[1]= workob->size[2]= 1.0;
-
+ workob->size[0]= workob->size[1]= workob->size[2]= 1.0f;
+ workob->rotmode= ROT_MODE_EUL;
}
void copy_baseflags(struct Scene *scene)
@@ -299,11 +300,8 @@ void free_object(Object *ob)
free_constraints(&ob->constraints);
- if(ob->pd){
- if(ob->pd->tex)
- ob->pd->tex->id.us--;
- MEM_freeN(ob->pd);
- }
+ free_partdeflect(ob->pd);
+
if(ob->soft) sbFree(ob->soft);
if(ob->bsoft) bsbFree(ob->bsoft);
if(ob->gpulamp.first) GPU_lamp_free(ob);
@@ -775,6 +773,7 @@ void *add_lamp(char *name)
la->samp= 3;
la->bias= 1.0f;
la->soft= 3.0f;
+ la->compressthresh= 0.05f;
la->ray_samp= la->ray_sampy= la->ray_sampz= 1;
la->area_size=la->area_sizey=la->area_sizez= 1.0f;
la->buffers= 1;
@@ -1039,6 +1038,13 @@ Object *add_object(struct Scene *scene, int type)
ob->data= add_obdata_from_type(type);
ob->lay= scene->lay;
+
+ /* objects should default to having Euler XYZ rotations,
+ * but rotations default to quaternions
+ */
+ ob->rotmode= ROT_MODE_EUL;
+ /* axis-angle must not have a 0,0,0 axis, so set y-axis as default... */
+ ob->rotAxis[1]= ob->drotAxis[1]= 1.0f;
base= scene_add_base(scene, ob);
scene_select_base(scene, base);
@@ -1065,6 +1071,9 @@ SoftBody *copy_softbody(SoftBody *sb)
sbn->pointcache= BKE_ptcache_copy_list(&sbn->ptcaches, &sb->ptcaches);
+ if(sb->effector_weights)
+ sbn->effector_weights = MEM_dupallocN(sb->effector_weights);
+
return sbn;
}
@@ -1094,7 +1103,7 @@ ParticleSystem *copy_particlesystem(ParticleSystem *psys)
pa->hair = MEM_dupallocN(pa->hair);
}
- if(psysn->particles->keys || psysn->particles->boid) {
+ if(psysn->particles && (psysn->particles->keys || psysn->particles->boid)) {
ParticleKey *key = psysn->particles->keys;
BoidParticle *boid = psysn->particles->boid;
@@ -1125,11 +1134,9 @@ ParticleSystem *copy_particlesystem(ParticleSystem *psys)
psysn->pathcache= NULL;
psysn->childcache= NULL;
psysn->edit= NULL;
- psysn->effectors.first= psysn->effectors.last= 0;
psysn->pathcachebufs.first = psysn->pathcachebufs.last = NULL;
psysn->childcachebufs.first = psysn->childcachebufs.last = NULL;
- psysn->reactevents.first = psysn->reactevents.last = NULL;
psysn->renderdata = NULL;
psysn->pointcache= BKE_ptcache_copy_list(&psysn->ptcaches, &psys->ptcaches);
@@ -1228,6 +1235,7 @@ Object *copy_object(Object *ob)
if(ob->totcol) {
obn->mat= MEM_dupallocN(ob->mat);
obn->matbits= MEM_dupallocN(ob->matbits);
+ obn->totcol= ob->totcol;
}
if(ob->bb) obn->bb= MEM_dupallocN(ob->bb);
@@ -1264,7 +1272,7 @@ Object *copy_object(Object *ob)
/* increase user numbers */
id_us_plus((ID *)obn->data);
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]);
@@ -1274,6 +1282,8 @@ Object *copy_object(Object *ob)
obn->pd= MEM_dupallocN(ob->pd);
if(obn->pd->tex)
id_us_plus(&(obn->pd->tex->id));
+ if(obn->pd->rng)
+ obn->pd->rng = MEM_dupallocN(ob->pd->rng);
}
obn->soft= copy_softbody(ob->soft);
obn->bsoft = copy_bulletsoftbody(ob->bsoft);
@@ -1554,13 +1564,11 @@ float bsystem_time(struct Scene *scene, Object *ob, float cfra, float ofs)
cfra+= bluroffs+fieldoffs;
/* global time */
- cfra*= scene->r.framelen;
+ if (scene)
+ cfra*= scene->r.framelen;
#if 0 // XXX old animation system
if (ob) {
- if (no_speed_curve==0 && ob->ipo)
- cfra= calc_ipo_time(ob->ipo, cfra);
-
/* ofset frames */
if ((ob->ipoflag & OB_OFFS_PARENT) && (ob->partype & PARSLOW)==0)
cfra-= give_timeoffset(ob);
@@ -1575,29 +1583,44 @@ float bsystem_time(struct Scene *scene, Object *ob, float cfra, float ofs)
void object_scale_to_mat3(Object *ob, float mat[][3])
{
float vec[3];
- if(ob->ipo) {
- vec[0]= ob->size[0]+ob->dsize[0];
- vec[1]= ob->size[1]+ob->dsize[1];
- vec[2]= ob->size[2]+ob->dsize[2];
- SizeToMat3(vec, mat);
- }
- else {
- SizeToMat3(ob->size, mat);
- }
+
+ vec[0]= ob->size[0]+ob->dsize[0];
+ vec[1]= ob->size[1]+ob->dsize[1];
+ vec[2]= ob->size[2]+ob->dsize[2];
+ SizeToMat3(vec, mat);
}
+// TODO: this should take rotation orders into account later...
void object_rot_to_mat3(Object *ob, float mat[][3])
{
- float vec[3];
- if(ob->ipo) {
- vec[0]= ob->rot[0]+ob->drot[0];
- vec[1]= ob->rot[1]+ob->drot[1];
- vec[2]= ob->rot[2]+ob->drot[2];
- EulToMat3(vec, mat);
+ float rmat[3][3], dmat[3][3];
+
+ /* initialise the delta-rotation matrix, which will get (pre)multiplied
+ * with the rotation matrix to yield the appropriate rotation
+ */
+ Mat3One(dmat);
+
+ /* rotations may either be quats, eulers (with various rotation orders), or axis-angle */
+ if (ob->rotmode > 0) {
+ /* euler rotations (will cause gimble lock, but this can be alleviated a bit with rotation orders) */
+ EulOToMat3(ob->rot, ob->rotmode, rmat);
+ EulOToMat3(ob->drot, ob->rotmode, dmat);
+ }
+ else if (ob->rotmode == ROT_MODE_AXISANGLE) {
+ /* axis-angle - not really that great for 3D-changing orientations */
+ AxisAngleToMat3(ob->rotAxis, ob->rotAngle, rmat);
+ AxisAngleToMat3(ob->drotAxis, ob->drotAngle, dmat);
}
else {
- EulToMat3(ob->rot, mat);
+ /* quats are normalised before use to eliminate scaling issues */
+ NormalQuat(ob->quat);
+ QuatToMat3(ob->quat, rmat);
+ QuatToMat3(ob->dquat, dmat);
}
+
+ /* combine these rotations */
+ // XXX is this correct? if errors, change the order of multiplication...
+ Mat3MulMat3(mat, dmat, rmat);
}
void object_to_mat3(Object *ob, float mat[][3]) /* no parent */
@@ -1610,19 +1633,7 @@ void object_to_mat3(Object *ob, float mat[][3]) /* no parent */
object_scale_to_mat3(ob, smat);
/* rot */
- /* Quats arnt used yet */
- /*if(ob->transflag & OB_QUAT) {
- if(ob->ipo) {
- QuatMul(q1, ob->quat, ob->dquat);
- QuatToMat3(q1, rmat);
- }
- else {
- QuatToMat3(ob->quat, rmat);
- }
- }
- else {*/
- object_rot_to_mat3(ob, rmat);
- /*}*/
+ object_rot_to_mat3(ob, rmat);
Mat3MulMat3(mat, rmat, smat);
}
@@ -1634,12 +1645,9 @@ void object_to_mat4(Object *ob, float mat[][4])
Mat4CpyMat3(mat, tmat);
- VECCOPY(mat[3], ob->loc);
- if(ob->ipo) {
- mat[3][0]+= ob->dloc[0];
- mat[3][1]+= ob->dloc[1];
- mat[3][2]+= ob->dloc[2];
- }
+ mat[3][0]= ob->loc[0] + ob->dloc[0];
+ mat[3][1]= ob->loc[1] + ob->dloc[1];
+ mat[3][2]= ob->loc[2] + ob->dloc[2];
}
int enable_cu_speed= 1;
@@ -1920,31 +1928,6 @@ void where_is_object_time(Scene *scene, Object *ob, float ctime)
if(ob==NULL) return;
-#if 0 // XXX old animation system
- /* this is needed to be able to grab objects with ipos, otherwise it always freezes them */
- stime= bsystem_time(scene, ob, ctime, 0.0);
- if(stime != ob->ctime) {
-
- ob->ctime= stime;
-
- if(ob->ipo) {
- calc_ipo(ob->ipo, stime);
- execute_ipo((ID *)ob, ob->ipo);
- }
- else
- do_all_object_actions(scene, ob);
-
- /* do constraint ipos ..., note it needs stime (0 = all ipos) */
- do_constraint_channels(&ob->constraints, &ob->constraintChannels, stime, 0);
- }
- else {
- /* but, the drivers have to be done */
- if(ob->ipo) do_ob_ipodrivers(ob, ob->ipo, stime);
- /* do constraint ipos ..., note it needs stime (1 = only drivers ipos) */
- do_constraint_channels(&ob->constraints, &ob->constraintChannels, stime, 1);
- }
-#endif // XXX old animation system
-
/* execute drivers only, as animation has already been done */
BKE_animsys_evaluate_animdata(&ob->id, ob->adt, ctime, ADT_RECALC_DRIVERS);
@@ -2389,7 +2372,7 @@ void object_handle_update(Scene *scene, Object *ob)
BMEditMesh *em = ((Mesh*)ob->data)->edit_btmesh;
// here was vieweditdatamask? XXX
- if(ob==scene->obedit) {
+ if(ob->mode & OB_MODE_EDIT) {
makeDerivedMesh(scene, ob, em, CD_MASK_BAREMESH);
} else
makeDerivedMesh(scene, ob, NULL, CD_MASK_BAREMESH);
@@ -2492,7 +2475,7 @@ float give_timeoffset(Object *ob) {
}
}
-int give_obdata_texspace(Object *ob, int **texflag, float **loc, float **size, float **rot) {
+int give_obdata_texspace(Object *ob, short **texflag, float **loc, float **size, float **rot) {
if (ob->data==NULL)
return 0;
@@ -2562,7 +2545,7 @@ int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float ray_normal[3
static int pc_cmp(void *a, void *b)
{
LinkData *ad = a, *bd = b;
- if((int)ad->data > (int)bd->data)
+ if(GET_INT_FROM_POINTER(ad->data) > GET_INT_FROM_POINTER(bd->data))
return 1;
else return 0;
}
@@ -2576,14 +2559,14 @@ int object_insert_ptcache(Object *ob)
for(link=ob->pc_ids.first, i = 0; link; link=link->next, i++)
{
- int index =(int)link->data;
+ int index = GET_INT_FROM_POINTER(link->data);
if(i < index)
break;
}
link = MEM_callocN(sizeof(LinkData), "PCLink");
- link->data = (void *)i;
+ link->data = SET_INT_IN_POINTER(i);
BLI_addtail(&ob->pc_ids, link);
return i;
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 0de97b9c703..036cadebbe8 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -176,6 +176,11 @@ PackedFile *newPackedFile(ReportList *reports, char *filename)
char name[FILE_MAXDIR+FILE_MAXFILE];
void *data;
+ /* render result has no filename and can be ignored
+ * any other files with no name can be ignored too */
+ if(filename[0]=='\0')
+ return NULL;
+
//XXX waitcursor(1);
// convert relative filenames to absolute filenames
@@ -188,7 +193,7 @@ PackedFile *newPackedFile(ReportList *reports, char *filename)
file= open(name, O_BINARY|O_RDONLY);
if (file <= 0) {
- BKE_reportf(reports, RPT_ERROR, "Can't open file: %s", name);
+ BKE_reportf(reports, RPT_ERROR, "Can't open file: \"%s\"", name);
} else {
filelen = BLI_filesize(file);
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 7c5b2b82b4b..f17d2fbdcac 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -46,19 +46,24 @@ const char PAINT_CURSOR_TEXTURE_PAINT[3] = {255, 255, 255};
Paint *paint_get_active(Scene *sce)
{
- if(sce && sce->basact && sce->basact->object) {
+ if(sce) {
ToolSettings *ts = sce->toolsettings;
-
- switch(sce->basact->object->mode) {
- case OB_MODE_SCULPT:
- return &ts->sculpt->paint;
- case OB_MODE_VERTEX_PAINT:
- return &ts->vpaint->paint;
- case OB_MODE_WEIGHT_PAINT:
- return &ts->wpaint->paint;
- case OB_MODE_TEXTURE_PAINT:
- return &ts->imapaint.paint;
+
+ if(sce->basact && sce->basact->object) {
+ switch(sce->basact->object->mode) {
+ case OB_MODE_SCULPT:
+ return &ts->sculpt->paint;
+ case OB_MODE_VERTEX_PAINT:
+ return &ts->vpaint->paint;
+ case OB_MODE_WEIGHT_PAINT:
+ return &ts->wpaint->paint;
+ case OB_MODE_TEXTURE_PAINT:
+ return &ts->imapaint.paint;
+ }
}
+
+ /* default to image paint */
+ return &ts->imapaint.paint;
}
return NULL;
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 954097d3a25..555f66c86c8 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -37,6 +37,7 @@
#include "DNA_scene_types.h"
#include "DNA_boid_types.h"
+#include "DNA_group_types.h"
#include "DNA_particle_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
@@ -53,7 +54,7 @@
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
#include "BLI_kdtree.h"
-#include "BLI_linklist.h"
+#include "BLI_listbase.h"
#include "BLI_rand.h"
#include "BLI_threads.h"
#include "BLI_cellalloc.h"
@@ -62,7 +63,9 @@
#include "BKE_boids.h"
#include "BKE_cloth.h"
+#include "BKE_effect.h"
#include "BKE_global.h"
+#include "BKE_group.h"
#include "BKE_main.h"
#include "BKE_lattice.h"
#include "BKE_utildefines.h"
@@ -70,7 +73,7 @@
#include "BKE_particle.h"
#include "BKE_DerivedMesh.h"
#include "BKE_object.h"
-#include "BKE_softbody.h"
+#include "BKE_cloth.h"
#include "BKE_material.h"
#include "BKE_key.h"
#include "BKE_library.h"
@@ -82,12 +85,11 @@
#include "RE_render_ext.h"
-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,
+static void do_child_modifiers(ParticleSimulationData *sim,
ParticleTexture *ptex, ParticleKey *par, float *par_rot, ChildParticle *cpa,
float *orco, float mat[4][4], ParticleKey *state, float t);
@@ -97,11 +99,9 @@ int count_particles(ParticleSystem *psys){
PARTICLE_P;
int tot=0;
- LOOP_PARTICLES {
- if(pa->alive == PARS_KILLED);
- else if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0);
+ LOOP_SHOWN_PARTICLES {
+ if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0);
else if(pa->alive == PARS_DEAD && (part->flag & PART_DIED)==0);
- else if(pa->flag & (PARS_UNEXIST+PARS_NO_DISP));
else tot++;
}
return tot;
@@ -111,55 +111,13 @@ int count_particles_mod(ParticleSystem *psys, int totgr, int cur){
PARTICLE_P;
int tot=0;
- LOOP_PARTICLES {
- if(pa->alive == PARS_KILLED);
- else if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0);
+ LOOP_SHOWN_PARTICLES {
+ if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0);
else if(pa->alive == PARS_DEAD && (part->flag & PART_DIED)==0);
- else if(pa->flag & (PARS_UNEXIST+PARS_NO_DISP));
else if(p%totgr==cur) tot++;
}
return tot;
}
-int psys_count_keys(ParticleSystem *psys)
-{
- PARTICLE_P;
- int totkey=0;
-
- LOOP_PARTICLES
- totkey += pa->totkey;
-
- return totkey;
-}
-/* remember to free the pointer returned from this! */
-char *psys_menu_string(Object *ob, int for_sb)
-{
- ParticleSystem *psys;
- DynStr *ds;
- char *str, num[6];
- int i;
-
- ds = BLI_dynstr_new();
-
- if(for_sb)
- BLI_dynstr_append(ds, "|Object%x-1");
-
- for(i=0,psys=ob->particlesystem.first; psys; i++,psys=psys->next){
-
- BLI_dynstr_append(ds, "|");
- sprintf(num,"%i. ",i+1);
- BLI_dynstr_append(ds, num);
- BLI_dynstr_append(ds, psys->part->id.name+2);
- sprintf(num,"%%x%i",i+1);
- BLI_dynstr_append(ds, num);
- }
-
- str = BLI_dynstr_get_cstring(ds);
-
- BLI_dynstr_free(ds);
-
- return str;
-}
-
/* we allocate path cache memory in chunks instead of a big continguous
* chunk, windows' memory allocater fails to find big blocks of memory often */
@@ -259,30 +217,13 @@ Object *psys_find_object(Scene *scene, ParticleSystem *psys)
return NULL;
}
-/* change object's active particle system */
-void psys_change_act(void *ob_v, void *act_v)
-{
- Object *ob = ob_v;
- ParticleSystem *npsys, *psys;
- short act = *((short*)act_v)-1;
-
- if(act>=0){
- npsys=BLI_findlink(&ob->particlesystem,act);
- psys=psys_get_current(ob);
-
- if(psys)
- psys->flag &= ~PSYS_CURRENT;
- if(npsys)
- npsys->flag |= PSYS_CURRENT;
- }
-}
-Object *psys_get_lattice(Scene *scene, Object *ob, ParticleSystem *psys)
+Object *psys_get_lattice(ParticleSimulationData *sim)
{
Object *lattice=0;
- if(psys_in_edit_mode(scene, psys)==0){
+ if(psys_in_edit_mode(sim->scene, sim->psys)==0){
- ModifierData *md = (ModifierData*)psys_get_modifier(ob,psys);
+ ModifierData *md = (ModifierData*)psys_get_modifier(sim->ob, sim->psys);
for(; md; md=md->next){
if(md->type==eModifierType_Lattice){
@@ -311,20 +252,20 @@ void psys_enable_all(Object *ob)
for(; psys; psys=psys->next)
psys->flag &= ~PSYS_DISABLED;
}
-int psys_ob_has_hair(Object *ob)
-{
- ParticleSystem *psys = ob->particlesystem.first;
-
- for(; psys; psys=psys->next)
- if(psys->part->type == PART_HAIR)
- return 1;
-
- return 0;
-}
int psys_in_edit_mode(Scene *scene, ParticleSystem *psys)
{
return (scene->basact && (scene->basact->object->mode & OB_MODE_PARTICLE_EDIT) && psys==psys_get_current((scene->basact)->object) && (psys->edit || psys->pointcache->edit));
}
+static void psys_create_frand(ParticleSystem *psys)
+{
+ int i;
+ float *rand = psys->frand = MEM_callocN(PSYS_FRAND_COUNT * sizeof(float), "particle randoms");
+
+ BLI_srandom(psys->seed);
+
+ for(i=0; i<1024; i++, rand++)
+ *rand = BLI_frand();
+}
int psys_check_enabled(Object *ob, ParticleSystem *psys)
{
ParticleSystemModifierData *psmd;
@@ -346,24 +287,92 @@ int psys_check_enabled(Object *ob, ParticleSystem *psys)
}
else if(!(psmd->modifier.mode & eModifierMode_Realtime))
return 0;
+
+ /* perhaps not the perfect place, but we have to be sure the rands are there before usage */
+ if(!psys->frand)
+ psys_create_frand(psys);
+ else if(psys->recalc & PSYS_RECALC_RESET) {
+ MEM_freeN(psys->frand);
+ psys_create_frand(psys);
+ }
return 1;
}
+int psys_check_edited(ParticleSystem *psys)
+{
+ if(psys->part && psys->part->type==PART_HAIR)
+ return (psys->flag & PSYS_EDITED || (psys->edit && psys->edit->edited));
+ else
+ return (psys->pointcache->edit && psys->pointcache->edit->edited);
+}
+
+void psys_check_group_weights(ParticleSettings *part)
+{
+ ParticleDupliWeight *dw, *tdw;
+ GroupObject *go;
+ int current = 0;
+
+ if(part->ren_as == PART_DRAW_GR && part->dup_group && part->dup_group->gobject.first) {
+ /* first remove all weights that don't have an object in the group */
+ dw = part->dupliweights.first;
+ while(dw) {
+ if(!object_in_group(dw->ob, part->dup_group)) {
+ tdw = dw->next;
+ BLI_freelinkN(&part->dupliweights, dw);
+ dw = tdw;
+ }
+ else
+ dw = dw->next;
+ }
+
+ /* then add objects in the group to new list */
+ go = part->dup_group->gobject.first;
+ while(go) {
+ dw = part->dupliweights.first;
+ while(dw && dw->ob != go->ob)
+ dw = dw->next;
+
+ if(!dw) {
+ dw = MEM_callocN(sizeof(ParticleDupliWeight), "ParticleDupliWeight");
+ dw->ob = go->ob;
+ dw->count = 1;
+ BLI_addtail(&part->dupliweights, dw);
+ }
+
+ go = go->next;
+ }
+
+ dw = part->dupliweights.first;
+ for(; dw; dw=dw->next) {
+ if(dw->flag & PART_DUPLIW_CURRENT) {
+ current = 1;
+ break;
+ }
+ }
+
+ if(!current) {
+ dw = part->dupliweights.first;
+ if(dw)
+ dw->flag |= PART_DUPLIW_CURRENT;
+ }
+ }
+ else {
+ BLI_freelistN(&part->dupliweights);
+ }
+}
/************************************************/
/* Freeing stuff */
/************************************************/
void psys_free_settings(ParticleSettings *part)
{
- if(part->pd) {
- MEM_freeN(part->pd);
- part->pd = NULL;
- }
-
- if(part->pd2) {
- MEM_freeN(part->pd2);
- part->pd2 = NULL;
- }
+ free_partdeflect(part->pd);
+ free_partdeflect(part->pd2);
+
+ if(part->effector_weights)
+ MEM_freeN(part->effector_weights);
+
+ BLI_freelistN(&part->dupliweights);
boid_free_settings(part->boids);
}
@@ -425,7 +434,7 @@ void free_keyed_keys(ParticleSystem *psys)
}
}
}
-void free_child_path_cache(ParticleSystem *psys)
+static void free_child_path_cache(ParticleSystem *psys)
{
psys_free_path_cache_buffers(psys->childcache, &psys->childcachebufs);
psys->childcache = NULL;
@@ -479,6 +488,29 @@ void psys_free_particles(ParticleSystem *psys)
psys->totpart= 0;
}
}
+void psys_free_pdd(ParticleSystem *psys)
+{
+ if(psys->pdd) {
+ if(psys->pdd->cdata)
+ MEM_freeN(psys->pdd->cdata);
+ psys->pdd->cdata = NULL;
+
+ if(psys->pdd->vdata)
+ MEM_freeN(psys->pdd->vdata);
+ psys->pdd->vdata = NULL;
+
+ if(psys->pdd->ndata)
+ MEM_freeN(psys->pdd->ndata);
+ psys->pdd->ndata = NULL;
+
+ if(psys->pdd->vedata)
+ MEM_freeN(psys->pdd->vedata);
+ psys->pdd->vedata = NULL;
+
+ psys->pdd->totpoint = 0;
+ psys->pdd->tot_vec_size = 0;
+ }
+}
/* free everything */
void psys_free(Object *ob, ParticleSystem * psys)
{
@@ -500,9 +532,6 @@ void psys_free(Object *ob, ParticleSystem * psys)
psys->child = 0;
psys->totchild = 0;
}
-
- if(psys->effectors.first)
- psys_end_effectors(psys);
// check if we are last non-visible particle system
for(tpsys=ob->particlesystem.first; tpsys; tpsys=tpsys->next){
@@ -528,10 +557,19 @@ void psys_free(Object *ob, ParticleSystem * psys)
psys->pointcache = NULL;
BLI_freelistN(&psys->targets);
- BLI_freelistN(&psys->reactevents);
BLI_kdtree_free(psys->tree);
+ pdEndEffectors(&psys->effectors);
+
+ if(psys->frand)
+ MEM_freeN(psys->frand);
+
+ if(psys->pdd) {
+ psys_free_pdd(psys);
+ MEM_freeN(psys->pdd);
+ }
+
MEM_freeN(psys);
}
}
@@ -723,12 +761,12 @@ void psys_render_restore(Object *ob, ParticleSystem *psys)
int psys_render_simplify_distribution(ParticleThreadContext *ctx, int tot)
{
DerivedMesh *dm= ctx->dm;
- Mesh *me= (Mesh*)(ctx->ob->data);
+ Mesh *me= (Mesh*)(ctx->sim.ob->data);
MFace *mf, *mface;
MVert *mvert;
ParticleRenderData *data;
ParticleRenderElem *elems, *elem;
- ParticleSettings *part= ctx->psys->part;
+ ParticleSettings *part= ctx->sim.psys->part;
float *facearea, (*facecenter)[3], size[3], fac, powrate, scaleclamp;
float co1[3], co2[3], co3[3], co4[3], lambda, arearatio, t, area, viewport;
double vprate;
@@ -737,10 +775,10 @@ int psys_render_simplify_distribution(ParticleThreadContext *ctx, int tot)
if(part->ren_as!=PART_DRAW_PATH || !(part->draw & PART_DRAW_REN_STRAND))
return tot;
- if(!ctx->psys->renderdata)
+ if(!ctx->sim.psys->renderdata)
return tot;
- data= ctx->psys->renderdata;
+ data= ctx->sim.psys->renderdata;
if(data->timeoffset)
return 0;
if(!(part->simplify_flag & PART_SIMPLIFY_ENABLE))
@@ -817,7 +855,7 @@ int psys_render_simplify_distribution(ParticleThreadContext *ctx, int tot)
/* set simplification parameters per original face */
for(a=0, elem=elems; a<totorigface; a++, elem++) {
- area = psys_render_projected_area(ctx->psys, facecenter[a], facearea[a], vprate, &viewport);
+ area = psys_render_projected_area(ctx->sim.psys, facecenter[a], facearea[a], vprate, &viewport);
arearatio= fac*area/facearea[a];
if((arearatio < 1.0f || viewport < 1.0f) && elem->totchild) {
@@ -1439,7 +1477,7 @@ void psys_interpolate_mcol(MCol *mcol, int quad, float *w, MCol *mc)
}
}
-float psys_interpolate_value_from_verts(DerivedMesh *dm, short from, int index, float *fw, float *values)
+static float psys_interpolate_value_from_verts(DerivedMesh *dm, short from, int index, float *fw, float *values)
{
if(values==0 || index==-1)
return 0.0;
@@ -1923,124 +1961,135 @@ static void do_clump(ParticleKey *state, ParticleKey *par, float time, float clu
VecLerpf(state->co,state->co,par->co,clump);
}
}
+void precalc_guides(ParticleSimulationData *sim, ListBase *effectors)
+{
+ EffectedPoint point;
+ ParticleKey state;
+ EffectorData efd;
+ EffectorCache *eff;
+ ParticleSystem *psys = sim->psys;
+ EffectorWeights *weights = sim->psys->part->effector_weights;
+ GuideEffectorData *data;
+ PARTICLE_P;
-int do_guide(Scene *scene, ParticleKey *state, int pa_num, float time, ListBase *lb)
+ if(!effectors)
+ return;
+
+ LOOP_PARTICLES {
+ psys_particle_on_emitter(sim->psmd,sim->psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,state.co,0,0,0,0,0);
+ pd_point_from_particle(sim, pa, &state, &point);
+
+ for(eff = effectors->first; eff; eff=eff->next) {
+ if(eff->pd->forcefield != PFIELD_GUIDE)
+ continue;
+
+ if(!eff->guide_data)
+ eff->guide_data = MEM_callocN(sizeof(GuideEffectorData)*psys->totpart, "GuideEffectorData");
+
+ data = eff->guide_data + p;
+
+ VECSUB(efd.vec_to_point, state.co, eff->guide_loc);
+ VECCOPY(efd.nor, eff->guide_dir);
+ efd.distance = VecLength(efd.vec_to_point);
+
+ VECCOPY(data->vec_to_point, efd.vec_to_point);
+ data->strength = effector_falloff(eff, &efd, &point, weights);
+ }
+ }
+}
+int do_guides(ListBase *effectors, ParticleKey *state, int index, float time)
{
+ EffectorCache *eff;
PartDeflect *pd;
- ParticleEffectorCache *ec;
- Object *eob;
Curve *cu;
ParticleKey key, par;
+ GuideEffectorData *data;
- float effect[3]={0.0,0.0,0.0}, distance, f_force, mindist, totforce=0.0;
- float guidevec[4], guidedir[3], rot2[4], radius, temp[3], angle, pa_loc[3], pa_zero[3]={0.0f,0.0f,0.0f};
- float veffect[3]={0.0,0.0,0.0}, guidetime;
+ float effect[3] = {0.0f, 0.0f, 0.0f}, veffect[3] = {0.0f, 0.0f, 0.0f};
+ float guidevec[4], guidedir[3], rot2[4], temp[3];
+ float guidetime, radius, angle, totstrength = 0.0f;
+ float vec_to_point[3];
- effect[0]=effect[1]=effect[2]=0.0;
+ if(effectors) for(eff = effectors->first; eff; eff=eff->next) {
+ pd = eff->pd;
- if(lb->first){
- for(ec = lb->first; ec; ec= ec->next){
- eob= ec->ob;
- if(ec->type & PSYS_EC_EFFECTOR){
- pd=eob->pd;
- if(pd->forcefield==PFIELD_GUIDE){
- cu = (Curve*)eob->data;
-
- distance=ec->distances[pa_num];
- mindist=pd->f_strength;
+ if(pd->forcefield != PFIELD_GUIDE)
+ continue;
- VECCOPY(pa_loc, ec->locations+3*pa_num);
- VECCOPY(pa_zero,pa_loc);
- VECADD(pa_zero,pa_zero,ec->firstloc);
+ data = eff->guide_data + index;
- guidetime=time/(1.0-pd->free_end);
+ if(data->strength <= 0.0f)
+ continue;
- /* WARNING: bails out with continue here */
- if(((pd->flag & PFIELD_USEMAX) && distance>pd->maxdist) || guidetime>1.0f) continue;
+ guidetime = time / (1.0 - pd->free_end);
- if(guidetime>1.0f) continue;
+ if(guidetime>1.0f)
+ continue;
- /* calculate contribution factor for this guide */
- f_force=1.0f;
- if(distance<=mindist);
- else if(pd->flag & PFIELD_USEMAX) {
- if(mindist>=pd->maxdist) f_force= 0.0f;
- else if(pd->f_power!=0.0f){
- f_force= 1.0f - (distance-mindist)/(pd->maxdist - mindist);
- f_force = (float)pow(f_force, pd->f_power);
- }
- }
- else if(pd->f_power!=0.0f){
- f_force= 1.0f/(1.0f + distance-mindist);
- f_force = (float)pow(f_force, pd->f_power);
- }
+ cu = (Curve*)eff->ob->data;
- if(pd->flag & PFIELD_GUIDE_PATH_ADD)
- where_on_path(eob, f_force*guidetime, guidevec, guidedir, NULL, &radius);
- else
- where_on_path(eob, guidetime, guidevec, guidedir, NULL, &radius);
+ if(pd->flag & PFIELD_GUIDE_PATH_ADD) {
+ if(where_on_path(eff->ob, data->strength * guidetime, guidevec, guidedir, NULL, &radius)==0)
+ return 0;
+ }
+ else {
+ if(where_on_path(eff->ob, guidetime, guidevec, guidedir, NULL, &radius)==0)
+ return 0;
+ }
- Mat4MulVecfl(ec->ob->obmat,guidevec);
- Mat4Mul3Vecfl(ec->ob->obmat,guidedir);
+ Mat4MulVecfl(eff->ob->obmat, guidevec);
+ Mat4Mul3Vecfl(eff->ob->obmat, guidedir);
- Normalize(guidedir);
+ Normalize(guidedir);
- if(guidetime!=0.0){
- /* curve direction */
- Crossf(temp, ec->firstdir, guidedir);
- angle=Inpf(ec->firstdir,guidedir)/(VecLength(ec->firstdir));
- angle=saacos(angle);
- VecRotToQuat(temp,angle,rot2);
- QuatMulVecf(rot2,pa_loc);
+ VECCOPY(vec_to_point, data->vec_to_point);
- /* curve tilt */
- VecRotToQuat(guidedir,guidevec[3]-ec->firstloc[3],rot2);
- QuatMulVecf(rot2,pa_loc);
+ if(guidetime != 0.0){
+ /* curve direction */
+ Crossf(temp, eff->guide_dir, guidedir);
+ angle = Inpf(eff->guide_dir, guidedir)/(VecLength(eff->guide_dir));
+ angle = saacos(angle);
+ VecRotToQuat(temp, angle, rot2);
+ QuatMulVecf(rot2, vec_to_point);
- //vectoquat(guidedir, pd->kink_axis, (pd->kink_axis+1)%3, q);
- //QuatMul(par.rot,rot2,q);
- }
- //else{
- // par.rot[0]=1.0f;
- // par.rot[1]=par.rot[2]=par.rot[3]=0.0f;
- //}
-
- /* curve taper */
- if(cu->taperobj)
- VecMulf(pa_loc, calc_taper(scene, cu->taperobj, (int)(f_force*guidetime*100.0), 100));
-
- else{ /* curve size*/
- if(cu->flag & CU_PATH_RADIUS) {
- VecMulf(pa_loc, radius);
- }
- }
- par.co[0]=par.co[1]=par.co[2]=0.0f;
- VECCOPY(key.co,pa_loc);
- do_prekink(&key, &par, 0, guidetime, pd->kink_freq, pd->kink_shape, pd->kink_amp, pd->kink, pd->kink_axis, 0);
- do_clump(&key, &par, guidetime, pd->clump_fac, pd->clump_pow, 1.0f);
- VECCOPY(pa_loc,key.co);
-
- VECADD(pa_loc,pa_loc,guidevec);
- VECSUB(pa_loc,pa_loc,pa_zero);
- VECADDFAC(effect,effect,pa_loc,f_force);
- VECADDFAC(veffect,veffect,guidedir,f_force);
- totforce+=f_force;
- }
- }
+ /* curve tilt */
+ VecRotToQuat(guidedir, guidevec[3] - eff->guide_loc[3], rot2);
+ QuatMulVecf(rot2, vec_to_point);
}
- if(totforce!=0.0){
- if(totforce>1.0)
- VecMulf(effect,1.0f/totforce);
- CLAMP(totforce,0.0,1.0);
- VECADD(effect,effect,pa_zero);
- VecLerpf(state->co,state->co,effect,totforce);
+ /* curve taper */
+ if(cu->taperobj)
+ VecMulf(vec_to_point, calc_taper(eff->scene, cu->taperobj, (int)(data->strength*guidetime*100.0), 100));
- Normalize(veffect);
- VecMulf(veffect,VecLength(state->vel));
- VECCOPY(state->vel,veffect);
- return 1;
+ else{ /* curve size*/
+ if(cu->flag & CU_PATH_RADIUS) {
+ VecMulf(vec_to_point, radius);
+ }
}
+ par.co[0] = par.co[1] = par.co[2] = 0.0f;
+ VECCOPY(key.co, vec_to_point);
+ do_prekink(&key, &par, 0, guidetime, pd->kink_freq, pd->kink_shape, pd->kink_amp, pd->kink, pd->kink_axis, 0);
+ do_clump(&key, &par, guidetime, pd->clump_fac, pd->clump_pow, 1.0f);
+ VECCOPY(vec_to_point, key.co);
+
+ VECADD(vec_to_point, vec_to_point, guidevec);
+ //VECSUB(pa_loc,pa_loc,pa_zero);
+ VECADDFAC(effect, effect, vec_to_point, data->strength);
+ VECADDFAC(veffect, veffect, guidedir, data->strength);
+ totstrength += data->strength;
+ }
+
+ if(totstrength != 0.0){
+ if(totstrength > 1.0)
+ VecMulf(effect, 1.0f / totstrength);
+ CLAMP(totstrength, 0.0, 1.0);
+ //VECADD(effect,effect,pa_zero);
+ VecLerpf(state->co, state->co, effect, totstrength);
+
+ Normalize(veffect);
+ VecMulf(veffect, VecLength(state->vel));
+ VECCOPY(state->vel, veffect);
+ return 1;
}
return 0;
}
@@ -2068,28 +2117,32 @@ static void do_rough_end(float *loc, float mat[4][4], float t, float fac, float
float roughfac;
roughfac=fac*(float)pow((double)t,shape);
- VECCOPY(rough,loc);
+ Vec2Copyf(rough,loc);
rough[0]=-1.0f+2.0f*rough[0];
rough[1]=-1.0f+2.0f*rough[1];
- VecMulf(rough,roughfac);
+ Vec2Mulf(rough,roughfac);
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)
+static void do_path_effectors(ParticleSimulationData *sim, int i, ParticleCacheKey *ca, int k, int steps, float *rootco, float effector, float dfra, float cfra, float *length, float *vec)
{
- float force[3] = {0.0f,0.0f,0.0f}, vel[3] = {0.0f,0.0f,0.0f};
+ float force[3] = {0.0f,0.0f,0.0f};
ParticleKey eff_key;
- ParticleData *pa;
+ EffectedPoint epoint;
+
+ /* Don't apply effectors for dynamic hair, otherwise the effectors don't get applied twice. */
+ if(sim->psys->flag & PSYS_HAIR_DYNAMICS)
+ return;
VECCOPY(eff_key.co,(ca-1)->co);
VECCOPY(eff_key.vel,(ca-1)->vel);
QUATCOPY(eff_key.rot,(ca-1)->rot);
- pa= psys->particles+i;
- do_effectors(i, pa, &eff_key, scene, ob, psys, rootco, force, vel, dfra, cfra);
+ pd_point_from_particle(sim, sim->psys->particles+i, &eff_key, &epoint);
+ pdDoEffectors(sim->psys->effectors, sim->colliders, sim->psys->part->effector_weights, &epoint, force, NULL);
- VecMulf(force, effector*pow((float)k / (float)steps, 100.0f * psys->part->eff_hair) / (float)steps);
+ VecMulf(force, effector*pow((float)k / (float)steps, 100.0f * sim->psys->part->eff_hair) / (float)steps);
VecAddf(force, force, vec);
@@ -2156,12 +2209,12 @@ float *psys_cache_vgroup(DerivedMesh *dm, ParticleSystem *psys, int vgroup)
}
return vg;
}
-void psys_find_parents(Object *ob, ParticleSystemModifierData *psmd, ParticleSystem *psys)
+void psys_find_parents(ParticleSimulationData *sim)
{
- ParticleSettings *part=psys->part;
+ ParticleSettings *part=sim->psys->part;
KDTree *tree;
ChildParticle *cpa;
- int p, totparent,totchild=psys->totchild;
+ int p, totparent,totchild=sim->psys->totchild;
float co[3], orco[3];
int from=PART_FROM_FACE;
totparent=(int)(totchild*part->parents*0.3);
@@ -2171,15 +2224,15 @@ void psys_find_parents(Object *ob, ParticleSystemModifierData *psmd, ParticleSys
tree=BLI_kdtree_new(totparent);
- for(p=0,cpa=psys->child; p<totparent; p++,cpa++){
- psys_particle_on_emitter(psmd,from,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,co,0,0,0,orco,0);
+ for(p=0,cpa=sim->psys->child; p<totparent; p++,cpa++){
+ psys_particle_on_emitter(sim->psmd,from,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,co,0,0,0,orco,0);
BLI_kdtree_insert(tree, p, orco, NULL);
}
BLI_kdtree_balance(tree);
for(; p<totchild; p++,cpa++){
- psys_particle_on_emitter(psmd,from,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,co,0,0,0,orco,0);
+ psys_particle_on_emitter(sim->psmd,from,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,co,0,0,0,orco,0);
cpa->parent=BLI_kdtree_find_nearest(tree, orco, NULL, NULL);
}
@@ -2217,11 +2270,11 @@ static void get_strand_normal(Material *ma, float *surfnor, float surfdist, floa
VECCOPY(nor, vnor);
}
-int psys_threads_init_path(ParticleThread *threads, Scene *scene, float cfra, int editupdate)
+static int psys_threads_init_path(ParticleThread *threads, Scene *scene, float cfra, int editupdate)
{
ParticleThreadContext *ctx= threads[0].ctx;
- Object *ob= ctx->ob;
- ParticleSystem *psys= ctx->psys;
+/* Object *ob= ctx->sim.ob; */
+ ParticleSystem *psys= ctx->sim.psys;
ParticleSettings *part = psys->part;
ParticleEditSettings *pset = &scene->toolsettings->particle;
int totparent=0, between=0;
@@ -2254,10 +2307,10 @@ int psys_threads_init_path(ParticleThread *threads, Scene *scene, float cfra, in
if(totchild==0) return 0;
/* init random number generator */
- if(ctx->psys->part->flag & PART_ANIM_BRANCHING)
- seed= 31415926 + ctx->psys->seed + (int)cfra;
+ if(ctx->sim.psys->part->flag & PART_ANIM_BRANCHING)
+ seed= 31415926 + ctx->sim.psys->seed + (int)cfra;
else
- seed= 31415926 + ctx->psys->seed;
+ seed= 31415926 + ctx->sim.psys->seed;
if(part->flag & PART_BRANCHING || ctx->editupdate || totchild < 10000)
totthread= 1;
@@ -2275,7 +2328,7 @@ int psys_threads_init_path(ParticleThread *threads, Scene *scene, float cfra, in
ctx->parent_pass= 0;
ctx->cfra= cfra;
- psys->lattice = psys_get_lattice(scene, ob, psys);
+ psys->lattice = psys_get_lattice(&ctx->sim);
/* cache all relevant vertex groups if they exist */
if(part->from!=PART_FROM_PARTICLE){
@@ -2301,11 +2354,11 @@ int psys_threads_init_path(ParticleThread *threads, Scene *scene, float cfra, in
}
/* note: this function must be thread safe, except for branching! */
-void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa, ParticleCacheKey *keys, int i)
+static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa, ParticleCacheKey *keys, int i)
{
ParticleThreadContext *ctx= thread->ctx;
- Object *ob= ctx->ob;
- ParticleSystem *psys = ctx->psys;
+ Object *ob= ctx->sim.ob;
+ ParticleSystem *psys = ctx->sim.psys;
ParticleSettings *part = psys->part;
ParticleCacheKey **cache= psys->childcache;
ParticleCacheKey **pcache= psys->pathcache;
@@ -2374,7 +2427,7 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
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);
+ psys_particle_on_emitter(ctx->sim.psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa->fuv,foffset,co,ornor,0,0,orco,0);
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 */
@@ -2384,7 +2437,7 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
pa = psys->particles + cpa->parent;
- psys_mat_hair_to_global(ob, ctx->psmd->dm, psys->part->from, pa, hairmat);
+ psys_mat_hair_to_global(ob, ctx->sim.psmd->dm, psys->part->from, pa, hairmat);
pa=0;
}
@@ -2406,9 +2459,9 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
cpa_num=pa->num;
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_particle_on_emitter(ctx->sim.psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa_fuv,pa->foffset,co,ornor,0,0,orco,0);
- psys_mat_hair_to_global(ob, ctx->psmd->dm, psys->part->from, pa, hairmat);
+ psys_mat_hair_to_global(ob, ctx->sim.psmd->dm, psys->part->from, pa, hairmat);
}
keys->steps = ctx->steps;
@@ -2425,7 +2478,7 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
/* get different child parameters from textures & vgroups */
get_child_modifier_parameters(part, ctx, cpa, cpa_from, cpa_num, cpa_fuv, orco, &ptex);
- if(ptex.exist < cpa->rand[1]) {
+ if(ptex.exist < PSYS_FRAND(i + 24)) {
keys->steps = -1;
return;
}
@@ -2474,7 +2527,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, ptex.effector, 0.0f, ctx->cfra, &eff_length, eff_vec);
+ do_path_effectors(&ctx->sim, 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);
@@ -2500,7 +2553,7 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
}
/* apply different deformations to the child path */
- do_child_modifiers(ctx->scene, ob, psys, part, &ptex, (ParticleKey *)par, par_rot, cpa, orco, hairmat, (ParticleKey *)state, t);
+ do_child_modifiers(&ctx->sim, &ptex, (ParticleKey *)par, par_rot, cpa, orco, hairmat, (ParticleKey *)state, t);
/* TODO: better branching */
//if(part->flag & PART_BRANCHING && ctx->between == 0 && part->flag & PART_ANIM_BRANCHING)
@@ -2577,7 +2630,7 @@ static void *exec_child_path_cache(void *data)
{
ParticleThread *thread= (ParticleThread*)data;
ParticleThreadContext *ctx= thread->ctx;
- ParticleSystem *psys= ctx->psys;
+ ParticleSystem *psys= ctx->sim.psys;
ParticleCacheKey **cache= psys->childcache;
ChildParticle *cpa;
int i, totchild= ctx->totchild, first= 0;
@@ -2594,21 +2647,21 @@ static void *exec_child_path_cache(void *data)
return 0;
}
-void psys_cache_child_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra, int editupdate)
+void psys_cache_child_paths(ParticleSimulationData *sim, float cfra, int editupdate)
{
- ParticleSettings *part = psys->part;
+ ParticleSettings *part = sim->psys->part;
ParticleThread *pthreads;
ParticleThreadContext *ctx;
ParticleCacheKey **cache;
ListBase threads;
int i, totchild, totparent, totthread;
- if(psys->flag & PSYS_GLOBAL_HAIR)
+ if(sim->psys->flag & PSYS_GLOBAL_HAIR)
return;
- pthreads= psys_threads_create(scene, ob, psys);
+ pthreads= psys_threads_create(sim);
- if(!psys_threads_init_path(pthreads, scene, cfra, editupdate)) {
+ if(!psys_threads_init_path(pthreads, sim->scene, cfra, editupdate)) {
psys_threads_free(pthreads);
return;
}
@@ -2617,14 +2670,14 @@ void psys_cache_child_paths(Scene *scene, Object *ob, ParticleSystem *psys, floa
totchild= ctx->totchild;
totparent= ctx->totparent;
- if(editupdate && psys->childcache && !(part->flag & PART_BRANCHING) && totchild == psys->totchildcache) {
- cache = psys->childcache;
+ if(editupdate && sim->psys->childcache && !(part->flag & PART_BRANCHING) && totchild == sim->psys->totchildcache) {
+ cache = sim->psys->childcache;
}
else {
/* clear out old and create new empty path cache */
- free_child_path_cache(psys);
- psys->childcache= psys_alloc_path_cache_buffers(&psys->childcachebufs, totchild, ctx->steps+1);
- psys->totchildcache = totchild;
+ free_child_path_cache(sim->psys);
+ sim->psys->childcache= psys_alloc_path_cache_buffers(&sim->psys->childcachebufs, totchild, ctx->steps+1);
+ sim->psys->totchildcache = totchild;
}
totthread= pthreads[0].tot;
@@ -2662,27 +2715,29 @@ void psys_cache_child_paths(Scene *scene, Object *ob, ParticleSystem *psys, floa
/* -Usefull for making use of opengl vertex arrays for super fast strand drawing. */
/* -Makes child strands possible and creates them too into the cache. */
/* -Cached path data is also used to determine cut position for the editmode tool. */
-void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra)
+void psys_cache_paths(ParticleSimulationData *sim, float cfra)
{
- ParticleCacheKey *ca, **cache= psys->pathcache;
- ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
+ PARTICLE_PSMD;
+ ParticleEditSettings *pset = &sim->scene->toolsettings->particle;
+ ParticleSystem *psys = sim->psys;
ParticleSettings *part = psys->part;
- ParticleEditSettings *pset = &scene->toolsettings->particle;
+ ParticleCacheKey *ca, **cache= psys->pathcache;
DerivedMesh *hair_dm = psys->hair_out_dm;
- ParticleData *pa = psys->particles;
ParticleKey result;
Material *ma;
ParticleInterpolationData pind;
+
+ PARTICLE_P;
float birthtime = 0.0, dietime = 0.0;
- float t, time = 0.0, dfra = 1.0, frs_sec = scene->r.frs_sec;
+ float t, time = 0.0, dfra = 1.0, frs_sec = sim->scene->r.frs_sec;
float col[4] = {0.5f, 0.5f, 0.5f, 1.0f};
float prev_tangent[3], hairmat[4][4];
float rotmat[3][3];
- int k,i;
+ int k;
int steps = (int)pow(2.0, (double)(psys->renderdata ? part->ren_step : part->draw_step));
int totpart = psys->totpart;
float length, vec[3];
@@ -2694,7 +2749,7 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
if((psys->flag & PSYS_HAIR_DONE || psys->flag & PSYS_KEYED || psys->pointcache->flag & PTCACHE_BAKED)==0)
return;
- if(psys_in_edit_mode(scene, psys))
+ if(psys_in_edit_mode(sim->scene, psys))
if(psys->renderdata==0 && (psys->edit==NULL || pset->flag & PE_DRAW_PART)==0)
return;
@@ -2707,8 +2762,8 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
psys_free_path_cache(psys, psys->edit);
cache= psys->pathcache= psys_alloc_path_cache_buffers(&psys->pathcachebufs, totpart, steps+1);
- psys->lattice = psys_get_lattice(scene, ob, psys);
- ma= give_current_material(ob, psys->part->omat);
+ psys->lattice = psys_get_lattice(sim);
+ ma= give_current_material(sim->ob, psys->part->omat);
if(ma && (psys->part->draw & PART_DRAW_MAT_COL))
VECCOPY(col, &ma->r)
@@ -2721,12 +2776,9 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
}
/*---first main loop: create all actual particles' paths---*/
- for(i=0; i<totpart; i++, pa++){
- if(pa->flag & PARS_NO_DISP || pa->flag & PARS_UNEXIST)
- continue;
-
+ LOOP_SHOWN_PARTICLES {
if(!psys->totchild) {
- BLI_srandom(psys->seed + i);
+ BLI_srandom(psys->seed + p);
pa_length = 1.0f - part->randlength * BLI_frand();
if(vg_length)
pa_length *= psys_particle_value_from_verts(psmd->dm,part->from,pa,vg_length);
@@ -2738,15 +2790,15 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
pind.bspline = (psys->part->flag & PART_HAIR_BSPLINE);
pind.dm = hair_dm;
- memset(cache[i], 0, sizeof(*cache[i])*(steps+1));
+ memset(cache[p], 0, sizeof(*cache[p])*(steps+1));
- cache[i]->steps = steps;
+ cache[p]->steps = steps;
/*--get the first data points--*/
- init_particle_interpolation(ob, psys, pa, &pind);
+ init_particle_interpolation(sim->ob, sim->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);
+ psys_mat_hair_to_global(sim->ob, psmd->dm, psys->part->from, pa, hairmat);
VECCOPY(rotmat[0], hairmat[2]);
VECCOPY(rotmat[1], hairmat[1]);
VECCOPY(rotmat[2], hairmat[0]);
@@ -2762,26 +2814,26 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
}
if(birthtime >= dietime) {
- cache[i]->steps = -1;
+ cache[p]->steps = -1;
continue;
}
dietime = birthtime + pa_length * (dietime - birthtime);
/*--interpolate actual path from data points--*/
- for(k=0, ca=cache[i]; k<=steps; k++, ca++){
+ for(k=0, ca=cache[p]; k<=steps; k++, ca++){
time = (float)k / (float)steps;
t = birthtime + time * (dietime - birthtime);
result.time = -t;
- do_particle_interpolation(psys, i, pa, t, frs_sec, &pind, &result);
+ do_particle_interpolation(psys, p, pa, t, frs_sec, &pind, &result);
/* dynamic hair is in object space */
/* keyed and baked are allready in global space */
if(hair_dm)
- Mat4MulVecfl(ob->obmat, result.co);
+ Mat4MulVecfl(sim->ob->obmat, result.co);
else if(!keyed && !baked && !(psys->flag & PSYS_GLOBAL_HAIR))
Mat4MulVecfl(hairmat, result.co);
@@ -2791,23 +2843,23 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
/*--modify paths and calculate rotation & velocity--*/
- VecSubf(vec,(cache[i]+1)->co,cache[i]->co);
+ VecSubf(vec,(cache[p]+1)->co,cache[p]->co);
length = VecLength(vec);
effector= 1.0f;
if(vg_effector)
effector*= psys_particle_value_from_verts(psmd->dm,psys->part->from,pa,vg_effector);
- for(k=0, ca=cache[i]; k<=steps; k++, ca++) {
+ for(k=0, ca=cache[p]; k<=steps; k++, ca++) {
if(!(psys->flag & PSYS_GLOBAL_HAIR)) {
/* apply effectors */
if(!(psys->part->flag & PART_CHILD_EFFECT) && k)
- do_path_effectors(scene, ob, psys, i, ca, k, steps, cache[i]->co, effector, dfra, cfra, &length, vec);
+ do_path_effectors(sim, p, ca, k, steps, cache[p]->co, effector, dfra, cfra, &length, vec);
/* apply guide curves to path data */
- if(psys->effectors.first && (psys->part->flag & PART_CHILD_EFFECT)==0)
+ if(sim->psys->effectors && (psys->part->flag & PART_CHILD_EFFECT)==0)
/* ca is safe to cast, since only co and vel are used */
- do_guide(scene, (ParticleKey*)ca, i, (float)k/(float)steps, &psys->effectors);
+ do_guides(sim->psys->effectors, (ParticleKey*)ca, p, (float)k/(float)steps);
/* apply lattice */
if(psys->lattice)
@@ -3023,23 +3075,7 @@ void psys_get_from_key(ParticleKey *key, float *loc, float *vel, float *rot, flo
if(time) *time=key->time;
}
/*-------changing particle keys from space to another-------*/
-void psys_key_to_object(Object *ob, ParticleKey *key, float imat[][4]){
- float q[4], imat2[4][4];
-
- if(imat==0){
- Mat4Invert(imat2,ob->obmat);
- imat=imat2;
- }
-
- VECADD(key->vel,key->vel,key->co);
-
- Mat4MulVecfl(imat,key->co);
- Mat4MulVecfl(imat,key->vel);
- Mat4ToQuat(imat,q);
-
- VECSUB(key->vel,key->vel,key->co);
- QuatMul(key->rot,q,key->rot);
-}
+#if 0
static void key_from_object(Object *ob, ParticleKey *key){
float q[4];
@@ -3052,6 +3088,7 @@ static void key_from_object(Object *ob, ParticleKey *key){
VECSUB(key->vel,key->vel,key->co);
QuatMul(key->rot,q,key->rot);
}
+#endif
static void triatomat(float *v1, float *v2, float *v3, float (*uv)[2], float mat[][4])
{
@@ -3230,8 +3267,6 @@ void object_remove_particle_system(Scene *scene, Object *ob)
}
static void default_particle_settings(ParticleSettings *part)
{
- int i;
-
part->type= PART_EMITTER;
part->distr= PART_DISTR_JIT;
part->draw_as = PART_DRAW_REND;
@@ -3242,7 +3277,7 @@ static void default_particle_settings(ParticleSettings *part)
part->flag=PART_REACT_MULTIPLE|PART_HAIR_GEOMETRY|PART_EDISTR|PART_TRAND;
part->sta= 1.0;
- part->end= 100.0;
+ part->end= 200.0;
part->lifetime= 50.0;
part->jitfac= 1.0;
part->totpart= 1000;
@@ -3270,6 +3305,9 @@ static void default_particle_settings(ParticleSettings *part)
part->size=0.05;
part->childsize=1.0;
+ part->rotmode = PART_ROT_VEL;
+ part->avemode = PART_AVE_SPIN;
+
part->child_nbr=10;
part->ren_child_nbr=100;
part->childrad=0.2f;
@@ -3292,10 +3330,6 @@ static void default_particle_settings(ParticleSettings *part)
part->keyed_loops = 1;
- for(i=0; i<10; i++)
- part->effector_weight[i]=1.0f;
-
-
#if 0 // XXX old animation system
part->ipo = NULL;
#endif // XXX old animation system
@@ -3304,6 +3338,9 @@ static void default_particle_settings(ParticleSettings *part)
part->simplify_rate= 1.0f;
part->simplify_transition= 0.1f;
part->simplify_viewport= 0.8;
+
+ if(!part->effector_weights)
+ part->effector_weights = BKE_add_effector_weights(NULL);
}
@@ -3391,59 +3428,6 @@ void make_local_particlesettings(ParticleSettings *part)
}
}
}
-void psys_flush_particle_settings(Scene *scene, ParticleSettings *part, int recalc)
-{
- Base *base = scene->base.first;
- ParticleSystem *psys;
- int flush;
-
- for(base = scene->base.first; base; base = base->next) {
- flush = 0;
- for(psys = base->object->particlesystem.first; psys; psys=psys->next) {
- if(psys->part == part) {
- psys->recalc |= recalc;
- flush++;
- }
- }
- if(flush)
- DAG_id_flush_update(&base->object->id, OB_RECALC_DATA);
- }
-}
-
-LinkNode *psys_using_settings(struct Scene *scene, ParticleSettings *part, int flush_update)
-{
- Object *ob, *tob;
- ParticleSystem *psys, *tpsys;
- LinkNode *node= NULL;
- int found;
-
- /* update all that have same particle settings */
- for(ob=G.main->object.first; ob; ob=ob->id.next) {
- found= 0;
-
- for(psys=ob->particlesystem.first; psys; psys=psys->next) {
- if(psys->part == part) {
- BLI_linklist_append(&node, psys);
- found++;
- }
- else if(psys->part->type == PART_REACTOR){
- tob= (psys->target_ob)? psys->target_ob: ob;
- tpsys= BLI_findlink(&tob->particlesystem, psys->target_psys-1);
-
- if(tpsys && tpsys->part==part) {
- BLI_linklist_append(&node, tpsys);
- found++;
- }
- }
- }
-
- if(flush_update && found)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- }
-
- return node;
-}
-
/************************************************/
/* Textures */
@@ -3499,9 +3483,7 @@ static void get_cpa_texture(DerivedMesh *dm, Material *ma, int face_index, float
mtex=ma->mtex[m];
if(mtex && (ma->septex & (1<<m))==0 && mtex->pmapto){
float def=mtex->def_var;
- float var=mtex->varfac;
short blend=mtex->blendtype;
- short neg=mtex->pmaptoneg;
if((mtex->texco & TEXCO_UV) && fw) {
if(!get_particle_uv(dm, NULL, face_index, fw, mtex->uvname, texco))
@@ -3516,18 +3498,18 @@ static void get_cpa_texture(DerivedMesh *dm, Material *ma, int face_index, float
ptex->time=0.0;
setvars|=MAP_PA_TIME;
}
- ptex->time= texture_value_blend(mtex->def_var,ptex->time,value,var,blend,neg & MAP_PA_TIME);
+ ptex->time= texture_value_blend(mtex->def_var,ptex->time,value,mtex->timefac,blend);
}
if((event & mtex->pmapto) & MAP_PA_LENGTH)
- ptex->length= texture_value_blend(def,ptex->length,value,var,blend,neg & MAP_PA_LENGTH);
+ ptex->length= texture_value_blend(def,ptex->length,value,mtex->lengthfac,blend);
if((event & mtex->pmapto) & MAP_PA_CLUMP)
- ptex->clump= texture_value_blend(def,ptex->clump,value,var,blend,neg & MAP_PA_CLUMP);
+ ptex->clump= texture_value_blend(def,ptex->clump,value,mtex->clumpfac,blend);
if((event & mtex->pmapto) & MAP_PA_KINK)
- ptex->kink= texture_value_blend(def,ptex->kink,value,var,blend,neg & MAP_PA_KINK);
+ ptex->kink= texture_value_blend(def,ptex->kink,value,mtex->kinkfac,blend);
if((event & mtex->pmapto) & MAP_PA_ROUGH)
- ptex->rough1= ptex->rough2= ptex->roughe= texture_value_blend(def,ptex->rough1,value,var,blend,neg & MAP_PA_ROUGH);
+ ptex->rough1= ptex->rough2= ptex->roughe= texture_value_blend(def,ptex->rough1,value,mtex->roughfac,blend);
if((event & mtex->pmapto) & MAP_PA_DENS)
- ptex->exist= texture_value_blend(def,ptex->exist,value,var,blend,neg & MAP_PA_DENS);
+ ptex->exist= texture_value_blend(def,ptex->exist,value,mtex->padensfac,blend);
}
}
if(event & MAP_PA_TIME) { CLAMP(ptex->time,0.0,1.0); }
@@ -3541,7 +3523,7 @@ static void get_cpa_texture(DerivedMesh *dm, Material *ma, int face_index, float
}
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)
+void psys_get_texture(ParticleSimulationData *sim, Material *ma, ParticleData *pa, ParticleTexture *ptex, int event)
{
MTex *mtex;
int m;
@@ -3551,19 +3533,17 @@ 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 && mtex->pmapto){
- float var=mtex->varfac;
float def=mtex->def_var;
short blend=mtex->blendtype;
- short neg=mtex->pmaptoneg;
- if((mtex->texco & TEXCO_UV) && ELEM(psys->part->from, PART_FROM_FACE, PART_FROM_VOLUME)) {
- if(!get_particle_uv(psmd->dm, pa, 0, pa->fuv, mtex->uvname, texco)) {
+ if((mtex->texco & TEXCO_UV) && ELEM(sim->psys->part->from, PART_FROM_FACE, PART_FROM_VOLUME)) {
+ if(!get_particle_uv(sim->psmd->dm, pa, 0, pa->fuv, mtex->uvname, texco)) {
/* failed to get uv's, let's try orco's */
- psys_particle_on_emitter(psmd,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,0,0,0,texco, 0);
+ psys_particle_on_emitter(sim->psmd,sim->psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,0,0,0,texco, 0);
}
}
else {
- psys_particle_on_emitter(psmd,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,0,0,0,texco, 0);
+ psys_particle_on_emitter(sim->psmd,sim->psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,0,0,0,texco, 0);
}
externtex(mtex, texco, &value, rgba, rgba+1, rgba+2, rgba+3);
@@ -3571,29 +3551,31 @@ void psys_get_texture(Object *ob, Material *ma, ParticleSystemModifierData *psmd
if((event & mtex->pmapto) & MAP_PA_TIME){
/* the first time has to set the base value for time regardless of blend mode */
if((setvars&MAP_PA_TIME)==0){
- ptex->time *= 1.0f - var;
- ptex->time += var * ((neg & MAP_PA_TIME)? 1.0f - value : value);
+ int flip= (mtex->timefac < 0.0f);
+ float timefac= fabsf(mtex->timefac);
+ ptex->time *= 1.0f - timefac;
+ ptex->time += timefac * ((flip)? 1.0f - value : value);
setvars |= MAP_PA_TIME;
}
else
- ptex->time= texture_value_blend(def,ptex->time,value,var,blend,neg & MAP_PA_TIME);
+ ptex->time= texture_value_blend(def,ptex->time,value,mtex->timefac,blend);
}
if((event & mtex->pmapto) & MAP_PA_LIFE)
- ptex->life= texture_value_blend(def,ptex->life,value,var,blend,neg & MAP_PA_LIFE);
+ ptex->life= texture_value_blend(def,ptex->life,value,mtex->lifefac,blend);
if((event & mtex->pmapto) & MAP_PA_DENS)
- ptex->exist= texture_value_blend(def,ptex->exist,value,var,blend,neg & MAP_PA_DENS);
+ ptex->exist= texture_value_blend(def,ptex->exist,value,mtex->padensfac,blend);
if((event & mtex->pmapto) & MAP_PA_SIZE)
- ptex->size= texture_value_blend(def,ptex->size,value,var,blend,neg & MAP_PA_SIZE);
+ ptex->size= texture_value_blend(def,ptex->size,value,mtex->sizefac,blend);
if((event & mtex->pmapto) & MAP_PA_IVEL)
- ptex->ivel= texture_value_blend(def,ptex->ivel,value,var,blend,neg & MAP_PA_IVEL);
+ ptex->ivel= texture_value_blend(def,ptex->ivel,value,mtex->ivelfac,blend);
if((event & mtex->pmapto) & MAP_PA_PVEL)
- texture_rgb_blend(ptex->pvel,rgba,ptex->pvel,value,var,blend);
+ texture_rgb_blend(ptex->pvel,rgba,ptex->pvel,value,mtex->pvelfac,blend);
if((event & mtex->pmapto) & MAP_PA_LENGTH)
- ptex->length= texture_value_blend(def,ptex->length,value,var,blend,neg & MAP_PA_LENGTH);
+ ptex->length= texture_value_blend(def,ptex->length,value,mtex->lengthfac,blend);
if((event & mtex->pmapto) & MAP_PA_CLUMP)
- ptex->clump= texture_value_blend(def,ptex->clump,value,var,blend,neg & MAP_PA_CLUMP);
+ ptex->clump= texture_value_blend(def,ptex->clump,value,mtex->clumpfac,blend);
if((event & mtex->pmapto) & MAP_PA_KINK)
- ptex->kink= texture_value_blend(def,ptex->kink,value,var,blend,neg & MAP_PA_CLUMP);
+ ptex->kink= texture_value_blend(def,ptex->kink,value,mtex->kinkfac,blend);
}
}
if(event & MAP_PA_TIME) { CLAMP(ptex->time,0.0,1.0); }
@@ -3608,38 +3590,9 @@ void psys_get_texture(Object *ob, Material *ma, ParticleSystemModifierData *psmd
/************************************************/
/* Particle State */
/************************************************/
-float psys_get_timestep(ParticleSettings *part)
-{
- return 0.04f*part->timetweak;
-}
-/* part->size should be updated with possible ipo effection before this is called */
-float psys_get_size(Object *ob, Material *ma, ParticleSystemModifierData *psmd, IpoCurve *icu_size, ParticleSystem *psys, ParticleSettings *part, ParticleData *pa, float *vg_size)
+float psys_get_timestep(ParticleSimulationData *sim)
{
- ParticleTexture ptex;
- float size=1.0f;
-
- BLI_srandom(psys->seed + (pa - psys->particles) + 100);
-
- if(ma && part->from!=PART_FROM_PARTICLE){
- ptex.size=size;
- psys_get_texture(ob,ma,psmd,psys,pa,&ptex,MAP_PA_SIZE);
- size=ptex.size;
- }
-
-#if 0 // XXX old animation system
- if(icu_size){
- calc_icu(icu_size,pa->time);
- size*=icu_size->curval;
- }
-#endif // XXX old animation system
-
- if(vg_size)
- size*=psys_particle_value_from_verts(psmd->dm,part->from,pa,vg_size);
-
- if(part->randsize!=0.0)
- size*= 1.0f - part->randsize * BLI_frand();
-
- return size*part->size;
+ return 0.04f * sim->psys->part->timetweak;
}
float psys_get_child_time(ParticleSystem *psys, ChildParticle *cpa, float cfra, float *birthtime, float *dietime)
{
@@ -3654,7 +3607,7 @@ float psys_get_child_time(ParticleSystem *psys, ChildParticle *cpa, float cfra,
w++;
}
- life = part->lifetime*(1.0f-part->randlife*cpa->rand[1]);
+ life = part->lifetime * (1.0f - part->randlife * PSYS_FRAND(cpa - psys->child + 25));
}
else{
ParticleData *pa = psys->particles + cpa->parent;
@@ -3703,13 +3656,16 @@ float psys_get_child_size(ParticleSystem *psys, ChildParticle *cpa, float cfra,
size*=part->childsize;
if(part->childrandsize!=0.0)
- size *= 1.0f - part->childrandsize*cpa->rand[2];
+ size *= 1.0f - part->childrandsize * PSYS_FRAND(cpa - psys->child + 26);
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];
+ ParticleSystem *psys = ctx->sim.psys;
+ int i = cpa - psys->child;
+
+ ptex->length= 1.0f - part->randlength * PSYS_FRAND(i + 26);
ptex->clump=1.0;
ptex->kink=1.0;
ptex->rough1= 1.0;
@@ -3718,13 +3674,13 @@ static void get_child_modifier_parameters(ParticleSettings *part, ParticleThread
ptex->exist= 1.0;
ptex->effector= 1.0;
- ptex->length*= part->clength_thres < cpa->rand[1] ? part->clength : 1.0f;
+ ptex->length*= part->clength_thres < PSYS_FRAND(i + 27) ? 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])
+ if(ptex->exist < PSYS_FRAND(i + 24))
return;
if(ctx->vg_length)
@@ -3742,18 +3698,20 @@ static void get_child_modifier_parameters(ParticleSettings *part, ParticleThread
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)
+static void do_child_modifiers(ParticleSimulationData *sim, ParticleTexture *ptex, ParticleKey *par, float *par_rot, ChildParticle *cpa, float *orco, float mat[4][4], ParticleKey *state, float t)
{
+ ParticleSettings *part = sim->psys->part;
+ int i = cpa - sim->psys->child;
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));
+ guided = do_guides(sim->psys->effectors, (ParticleKey*)state, cpa->parent, t);
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);
+ part->kink_amp, part->kink, part->kink_axis, sim->ob->obmat);
do_clump(state, par, t, part->clumpfac, part->clumppow, ptex->clump);
}
@@ -3762,17 +3720,18 @@ static void do_child_modifiers(Scene *scene, Object *ob, ParticleSystem *psys, P
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);
+ do_rough(sim->psys->frand + ((i + 27) % (PSYS_FRAND_COUNT - 3)), 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);
+ do_rough_end(sim->psys->frand + ((i + 27) % (PSYS_FRAND_COUNT - 3)), 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)
+void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *state, int vel)
{
- ParticleSettings *part = psys->part;
- ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
- Material *ma = give_current_material(ob, part->omat);
+ PARTICLE_PSMD;
+ ParticleSystem *psys = sim->psys;
+ ParticleSettings *part = sim->psys->part;
+ Material *ma = give_current_material(sim->ob, part->omat);
ParticleData *pa;
ChildParticle *cpa;
ParticleTexture ptex;
@@ -3780,7 +3739,7 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
ParticleThreadContext ctx; /* fake thread context for child modifiers */
ParticleInterpolationData pind;
- float t, frs_sec = scene->r.frs_sec;
+ float t, frs_sec = sim->scene->r.frs_sec;
float co[3], orco[3];
float hairmat[4][4];
int totparent = 0;
@@ -3808,17 +3767,17 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
pind.cache = cached ? psys->pointcache : NULL;
pind.epoint = NULL;
pind.dm = psys->hair_out_dm;
- init_particle_interpolation(ob, psys, pa, &pind);
+ init_particle_interpolation(sim->ob, psys, pa, &pind);
do_particle_interpolation(psys, p, pa, t, frs_sec, &pind, state);
if(!keyed && !cached) {
if((pa->flag & PARS_REKEY)==0) {
- psys_mat_hair_to_global(ob, psmd->dm, part->from, pa, hairmat);
+ psys_mat_hair_to_global(sim->ob, sim->psmd->dm, part->from, pa, hairmat);
Mat4MulVecfl(hairmat, state->co);
Mat4Mul3Vecfl(hairmat, state->vel);
- if(psys->effectors.first && (part->flag & PART_CHILD_GUIDE)==0) {
- do_guide(scene, state, p, state->time, &psys->effectors);
+ if(sim->psys->effectors && (part->flag & PART_CHILD_GUIDE)==0) {
+ do_guides(sim->psys->effectors, state, p, state->time);
/* TODO: proper velocity handling */
}
@@ -3851,7 +3810,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 = state->time;
- psys_get_particle_on_path(scene, ob, psys, cpa->pa[w], keys+w, 1);
+ psys_get_particle_on_path(sim, cpa->pa[w], keys+w, 1);
w++;
}
@@ -3871,14 +3830,14 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
pa = psys->particles + cpa->parent;
- psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
+ psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat);
pa=0;
}
else{
/* get the parent state */
keys->time = state->time;
- psys_get_particle_on_path(scene, ob, psys, cpa->parent, keys,1);
+ psys_get_particle_on_path(sim, cpa->parent, keys,1);
/* get the original coordinates (orco) for texture usage */
pa=psys->particles+cpa->parent;
@@ -3889,7 +3848,7 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
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);
+ psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat);
}
/* correct child ipo timing */
@@ -3902,6 +3861,7 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
/* get different child parameters from textures & vgroups */
memset(&ctx, 0, sizeof(ParticleThreadContext));
+ ctx.sim = *sim;
ctx.dm = psmd->dm;
ctx.ma = ma;
/* TODO: assign vertex groups */
@@ -3938,7 +3898,7 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
copy_particle_key(&tstate, state, 1);
/* apply different deformations to the child path */
- do_child_modifiers(scene, ob, psys, part, &ptex, par, par->rot, cpa, orco, hairmat, state, t);
+ do_child_modifiers(sim, &ptex, par, par->rot, cpa, orco, hairmat, state, t);
/* try to estimate correct velocity */
if(vel){
@@ -3947,13 +3907,13 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
if(t>=0.001f){
tstate.time=t-0.001f;
- psys_get_particle_on_path(scene,ob,psys,p,&tstate,0);
+ psys_get_particle_on_path(sim,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);
+ psys_get_particle_on_path(sim,p,&tstate,0);
VECSUB(state->vel,tstate.co,state->co);
Normalize(state->vel);
}
@@ -3963,39 +3923,51 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
}
}
/* gets particle's state at a time, returns 1 if particle exists and can be seen and 0 if not */
-int psys_get_particle_state(struct Scene *scene, Object *ob, ParticleSystem *psys, int p, ParticleKey *state, int always){
- ParticleSettings *part=psys->part;
- ParticleData *pa=0;
+int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *state, int always){
+ ParticleSystem *psys = sim->psys;
+ ParticleSettings *part = psys->part;
+ ParticleData *pa = NULL;
+ ChildParticle *cpa = NULL;
float cfra;
- int totpart=psys->totpart, between=0;
+ int totpart = psys->totpart;
+ float timestep = psys_get_timestep(sim);
/* negative time means "use current time" */
- if(state->time>0)
- cfra=state->time;
- else
- cfra= bsystem_time(scene, 0, (float)scene->r.cfra,0.0);
+ cfra = state->time > 0 ? state->time : bsystem_time(sim->scene, 0, (float)sim->scene->r.cfra, 0.0);
- if(psys->totchild && p>=totpart){
- if(part->from!=PART_FROM_PARTICLE && part->childtype==PART_CHILD_FACES){
- between=1;
- }
- else
- pa=psys->particles+(psys->child+p-totpart)->parent;
- }
- else
- pa=psys->particles+p;
-
- if(between){
- state->time = psys_get_child_time(psys,&psys->child[p-totpart],cfra,NULL,NULL);
+ if(p>=totpart){
+ if(!psys->totchild)
+ return 0;
- if(always==0)
- if((state->time<0.0 && (part->flag & PART_UNBORN)==0)
- || (state->time>1.0 && (part->flag & PART_DIED)==0))
+ if(part->from != PART_FROM_PARTICLE && part->childtype == PART_CHILD_FACES){
+ if(!(psys->flag & PSYS_KEYED))
return 0;
+
+ cpa = psys->child + p - totpart;
+
+ state->time = psys_get_child_time(psys, cpa, cfra, NULL, NULL);
+
+ if(!always)
+ if((state->time < 0.0 && !(part->flag & PART_UNBORN))
+ || (state->time > 1.0 && !(part->flag & PART_DIED)))
+ return 0;
+
+ state->time= (cfra - (part->sta + (part->end - part->sta) * PSYS_FRAND(p + 23))) / (part->lifetime * PSYS_FRAND(p + 24));
+
+ psys_get_particle_on_path(sim, p, state,1);
+ return 1;
+ }
+ else {
+ cpa = sim->psys->child + p - totpart;
+ pa = sim->psys->particles + cpa->parent;
+ }
}
- else{
- if(pa->alive==PARS_KILLED) return 0;
- if(always==0)
+ else {
+ pa = sim->psys->particles + p;
+ }
+
+ if(pa) {
+ if(!always)
if((pa->alive==PARS_UNBORN && (part->flag & PART_UNBORN)==0)
|| (pa->alive==PARS_DEAD && (part->flag & PART_DIED)==0))
return 0;
@@ -4003,49 +3975,40 @@ int psys_get_particle_state(struct Scene *scene, Object *ob, ParticleSystem *psy
state->time = MIN2(state->time, pa->dietime);
}
- if(psys->flag & PSYS_KEYED){
- if(between){
- ChildParticle *cpa=psys->child+p-totpart;
- state->time= (cfra-(part->sta+(part->end-part->sta)*cpa->rand[0]))/(part->lifetime*cpa->rand[1]);
- }
- else
- state->time= -cfra;
-
- psys_get_particle_on_path(scene, ob, psys, p, state,1);
+ if(sim->psys->flag & PSYS_KEYED){
+ state->time= -cfra;
+ psys_get_particle_on_path(sim, p, state,1);
return 1;
}
else{
- if(between)
- return 0; /* currently not supported */
- else if(psys->totchild && p>=psys->totpart){
- ChildParticle *cpa=psys->child+p-psys->totpart;
+ if(cpa){
ParticleKey *key1;
float t = (cfra - pa->time + pa->loop * pa->lifetime) / pa->lifetime;
- pa = psys->particles + cpa->parent;
key1=&pa->state;
offset_child(cpa, key1, state, part->childflat, part->childrad);
CLAMP(t,0.0,1.0);
if(part->kink) /* TODO: part->kink_freq*pa_kink */
- do_prekink(state,key1,key1->rot,t,part->kink_freq,part->kink_shape,part->kink_amp,part->kink,part->kink_axis,ob->obmat);
+ do_prekink(state,key1,key1->rot,t,part->kink_freq,part->kink_shape,part->kink_amp,part->kink,part->kink_axis,sim->ob->obmat);
/* TODO: pa_clump vgroup */
do_clump(state,key1,t,part->clumpfac,part->clumppow,1.0);
if(psys->lattice)
- calc_latt_deform(psys->lattice, state->co,1.0f);
+ calc_latt_deform(sim->psys->lattice, state->co,1.0f);
}
else{
- if(pa->state.time==state->time || ELEM(part->phystype,PART_PHYS_NO,PART_PHYS_KEYED))
+ if(pa->state.time==state->time || ELEM(part->phystype,PART_PHYS_NO,PART_PHYS_KEYED)
+ || pa->prev_state.time <= 0.0f)
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) {
+ if(pa->state.time + 2.0f > state->time && pa->prev_state.time - 2.0f < state->time) {
ParticleKey keys[4];
- float dfra, keytime, frs_sec = scene->r.frs_sec;
+ float dfra, keytime, frs_sec = sim->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 */
@@ -4062,13 +4025,13 @@ int psys_get_particle_state(struct Scene *scene, Object *ob, ParticleSystem *psy
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);
+ VecMulf(keys[1].vel, dfra * timestep);
+ VecMulf(keys[2].vel, dfra * timestep);
psys_interpolate_particle(-1, keys, keytime, state, 1);
/* convert back to real velocity */
- VecMulf(state->vel, frs_sec / dfra);
+ VecMulf(state->vel, 1.0f / (dfra * timestep));
VecLerpf(state->ave, keys[1].ave, keys[2].ave, keytime);
QuatInterpol(state->rot, keys[1].rot, keys[2].rot, keytime);
@@ -4080,8 +4043,8 @@ int psys_get_particle_state(struct Scene *scene, Object *ob, ParticleSystem *psy
}
}
- if(psys->lattice)
- calc_latt_deform(psys->lattice, state->co,1.0f);
+ if(sim->psys->lattice)
+ calc_latt_deform(sim->psys->lattice, state->co,1.0f);
}
return 1;
@@ -4137,8 +4100,11 @@ void psys_get_dupli_texture(Object *ob, ParticleSettings *part, ParticleSystemMo
}
}
-void psys_get_dupli_path_transform(Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd, ParticleData *pa, ChildParticle *cpa, ParticleCacheKey *cache, float mat[][4], float *scale)
+void psys_get_dupli_path_transform(ParticleSimulationData *sim, ParticleData *pa, ChildParticle *cpa, ParticleCacheKey *cache, float mat[][4], float *scale)
{
+ Object *ob = sim->ob;
+ ParticleSystem *psys = sim->psys;
+ ParticleSystemModifierData *psmd = sim->psmd;
float loc[3], nor[3], vec[3], side[3], len, obrotmat[4][4], qmat[4][4];
float xvec[3] = {-1.0, 0.0, 0.0}, q[4];
@@ -4146,7 +4112,7 @@ void psys_get_dupli_path_transform(Object *ob, ParticleSystem *psys, ParticleSys
len= Normalize(vec);
if(pa)
- psys_particle_on_emitter(psmd,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,loc,nor,0,0,0,0);
+ psys_particle_on_emitter(psmd,sim->psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,loc,nor,0,0,0,0);
else
psys_particle_on_emitter(psmd,
(psys->part->childtype == PART_CHILD_FACES)? PART_FROM_FACE: PART_FROM_PARTICLE,
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 663d5c6ee03..00b1672dea6 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -58,7 +58,7 @@
#include "BLI_blenlib.h"
#include "BLI_kdtree.h"
#include "BLI_kdopbvh.h"
-#include "BLI_linklist.h"
+#include "BLI_listbase.h"
#include "BLI_threads.h"
#include "BKE_anim.h"
@@ -122,7 +122,6 @@ static int get_current_display_percentage(ParticleSystem *psys)
void psys_reset(ParticleSystem *psys, int mode)
{
- ParticleSettings *part= psys->part;
PARTICLE_P;
if(ELEM(mode, PSYS_RESET_ALL, PSYS_RESET_DEPSGRAPH)) {
@@ -133,9 +132,6 @@ void psys_reset(ParticleSystem *psys, int mode)
psys->totkeyed= 0;
psys->flag &= ~(PSYS_HAIR_DONE|PSYS_KEYED);
- if(psys->reactevents.first)
- BLI_freelistN(&psys->reactevents);
-
if(psys->edit && psys->free_edit) {
psys->free_edit(psys->edit);
psys->edit = NULL;
@@ -165,26 +161,30 @@ void psys_reset(ParticleSystem *psys, int mode)
psys->pointcache->simframe= 0;
}
-static void realloc_particles(Object *ob, ParticleSystem *psys, int new_totpart)
+static void realloc_particles(ParticleSimulationData *sim, int new_totpart)
{
+ ParticleSystem *psys = sim->psys;
+ ParticleSettings *part = psys->part;
ParticleData *newpars = NULL;
BoidParticle *newboids = NULL;
PARTICLE_P;
int totpart, totsaved = 0;
if(new_totpart<0) {
- if(psys->part->distr==PART_DISTR_GRID && psys->part->from != PART_FROM_VERT) {
- totpart= psys->part->grid_res;
+ if(part->distr==PART_DISTR_GRID && part->from != PART_FROM_VERT) {
+ totpart= part->grid_res;
totpart*=totpart*totpart;
}
else
- totpart=psys->part->totpart;
+ totpart=part->totpart;
}
else
totpart=new_totpart;
if(totpart && totpart != psys->totpart) {
newpars= MEM_callocN(totpart*sizeof(ParticleData), "particles");
+ if(psys->part->phystype == PART_PHYS_BOIDS)
+ newboids= MEM_callocN(totpart*sizeof(BoidParticle), "boid particles");
if(psys->particles) {
totsaved=MIN2(psys->totpart,totpart);
@@ -213,16 +213,16 @@ static void realloc_particles(Object *ob, ParticleSystem *psys, int new_totpart)
if(pa->hair) MEM_freeN(pa->hair);
MEM_freeN(psys->particles);
+ psys_free_pdd(psys);
}
psys->particles=newpars;
+ psys->totpart=totpart;
if(newboids) {
LOOP_PARTICLES
pa->boid = newboids++;
}
-
- psys->totpart=totpart;
}
if(psys->child) {
@@ -292,7 +292,7 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm, ParticleSystem *psys)
else { /* FROM_FACE/FROM_VOLUME */
totdmelem= dm->getNumTessFaces(dm);
totelem= me->totface;
- origindex= DM_get_tessface_data_layer(dm, CD_ORIGINDEX);
+ origindex= DM_get_face_data_layer(dm, CD_ORIGINDEX);
}
nodedmelem= MEM_callocN(sizeof(LinkNode)*totdmelem, "psys node elems");
@@ -606,13 +606,13 @@ static int binary_search_distribution(float *sum, int n, float value)
/* note: this function must be thread safe, for from == PART_FROM_CHILD */
#define ONLY_WORKING_WITH_PA_VERTS 0
-void psys_thread_distribute_particle(ParticleThread *thread, ParticleData *pa, ChildParticle *cpa, int p)
+static void psys_thread_distribute_particle(ParticleThread *thread, ParticleData *pa, ChildParticle *cpa, int p)
{
ParticleThreadContext *ctx= thread->ctx;
- Object *ob= ctx->ob;
+ Object *ob= ctx->sim.ob;
DerivedMesh *dm= ctx->dm;
ParticleData *tpa;
- ParticleSettings *part= ctx->psys->part;
+/* ParticleSettings *part= ctx->sim.psys->part; */
float *v1, *v2, *v3, *v4, nor[3], orco1[3], co1[3], co2[3], nor1[3], ornor1[3];
float cur_d, min_d, randu, randv;
int from= ctx->from;
@@ -625,7 +625,6 @@ void psys_thread_distribute_particle(ParticleThread *thread, ParticleData *pa, C
pa->num= ctx->index[p];
pa->fuv[0] = 1.0f;
pa->fuv[1] = pa->fuv[2] = pa->fuv[3] = 0.0;
- //pa->verts[0] = pa->verts[1] = pa->verts[2] = 0;
#if ONLY_WORKING_WITH_PA_VERTS
if(ctx->tree){
@@ -653,7 +652,6 @@ void psys_thread_distribute_particle(ParticleThread *thread, ParticleData *pa, C
ctx->jitoff[i] = fmod(ctx->jitoff[i],(float)ctx->jitlevel);
psys_uv_to_w(ctx->jit[2*(int)ctx->jitoff[i]], ctx->jit[2*(int)ctx->jitoff[i]+1], mface->v4, pa->fuv);
ctx->jitoff[i]++;
- //ctx->jitoff[i]=(float)fmod(ctx->jitoff[i]+ctx->maxweight/ctx->weight[i],(float)ctx->jitlevel);
break;
case PART_DISTR_RAND:
randu= rng_getFloat(thread->rng);
@@ -663,12 +661,6 @@ void psys_thread_distribute_particle(ParticleThread *thread, ParticleData *pa, C
}
pa->foffset= 0.0f;
- /*
- pa->verts[0] = mface->v1;
- pa->verts[1] = mface->v2;
- pa->verts[2] = mface->v3;
- */
-
/* experimental */
if(from==PART_FROM_VOLUME){
MVert *mvert=dm->getVertDataArray(dm,CD_MVERT);
@@ -724,10 +716,6 @@ void psys_thread_distribute_particle(ParticleThread *thread, ParticleData *pa, C
}
}
else if(from == PART_FROM_PARTICLE) {
- //pa->verts[0]=0; /* not applicable */
- //pa->verts[1]=0;
- //pa->verts[2]=0;
-
tpa=ctx->tpars+ctx->index[p];
pa->num=ctx->index[p];
pa->fuv[0]=tpa->fuv[0];
@@ -743,42 +731,30 @@ void psys_thread_distribute_particle(ParticleThread *thread, ParticleData *pa, C
cpa->num=0;
cpa->fuv[0]=cpa->fuv[1]=cpa->fuv[2]=cpa->fuv[3]=0.0f;
cpa->pa[0]=cpa->pa[1]=cpa->pa[2]=cpa->pa[3]=0;
- cpa->rand[0]=cpa->rand[1]=cpa->rand[2]=0.0f;
return;
}
mf= dm->getTessFaceData(dm, ctx->index[p], CD_MFACE);
- //switch(distr){
- // case PART_DISTR_JIT:
- // i=index[p];
- // psys_uv_to_w(ctx->jit[2*(int)ctx->jitoff[i]], ctx->jit[2*(int)ctx->jitoff[i]+1], mf->v4, cpa->fuv);
- // ctx->jitoff[i]=(float)fmod(ctx->jitoff[i]+ctx->maxweight/ctx->weight[i],(float)ctx->jitlevel);
- // break;
- // case PART_DISTR_RAND:
- randu= rng_getFloat(thread->rng);
- randv= rng_getFloat(thread->rng);
- psys_uv_to_w(randu, randv, mf->v4, cpa->fuv);
- // break;
- //}
+ randu= rng_getFloat(thread->rng);
+ randv= rng_getFloat(thread->rng);
+ psys_uv_to_w(randu, randv, mf->v4, cpa->fuv);
- cpa->rand[0] = rng_getFloat(thread->rng);
- cpa->rand[1] = rng_getFloat(thread->rng);
- cpa->rand[2] = rng_getFloat(thread->rng);
cpa->num = ctx->index[p];
if(ctx->tree){
KDTreeNearest ptn[10];
- int w,maxw, do_seams;
+ int w,maxw;//, do_seams;
float maxd,mind,dd,totw=0.0;
int parent[10];
float pweight[10];
- do_seams= (part->flag&PART_CHILD_SEAMS && ctx->seams);
+ /*do_seams= (part->flag&PART_CHILD_SEAMS && ctx->seams);*/
psys_particle_on_dm(dm,cfrom,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,co1,nor1,0,0,orco1,ornor1);
transform_mesh_orco_verts((Mesh*)ob->data, &orco1, 1, 1);
- maxw = BLI_kdtree_find_n_nearest(ctx->tree,(do_seams)?10:4,orco1,ornor1,ptn);
+ //maxw = BLI_kdtree_find_n_nearest(ctx->tree,(do_seams)?10:4,orco1,ornor1,ptn);
+ maxw = BLI_kdtree_find_n_nearest(ctx->tree,4,orco1,ornor1,ptn);
maxd=ptn[maxw-1].dist;
mind=ptn[0].dist;
@@ -788,70 +764,68 @@ void psys_thread_distribute_particle(ParticleThread *thread, ParticleData *pa, C
for(w=0; w<maxw; w++){
parent[w]=ptn[w].index;
pweight[w]=(float)pow(2.0,(double)(-6.0f*ptn[w].dist/maxd));
- //pweight[w]= (1.0f - ptn[w].dist*ptn[w].dist/(maxd*maxd));
- //pweight[w] *= pweight[w];
}
for(;w<10; w++){
parent[w]=-1;
pweight[w]=0.0f;
}
- if(do_seams){
- ParticleSeam *seam=ctx->seams;
- float temp[3],temp2[3],tan[3];
- float inp,cur_len,min_len=10000.0f;
- int min_seam=0, near_vert=0;
- /* find closest seam */
- for(i=0; i<ctx->totseam; i++, seam++){
- VecSubf(temp,co1,seam->v0);
- inp=Inpf(temp,seam->dir)/seam->length2;
- if(inp<0.0f){
- cur_len=VecLenf(co1,seam->v0);
- }
- else if(inp>1.0f){
- cur_len=VecLenf(co1,seam->v1);
- }
- else{
- VecCopyf(temp2,seam->dir);
- VecMulf(temp2,inp);
- cur_len=VecLenf(temp,temp2);
- }
- if(cur_len<min_len){
- min_len=cur_len;
- min_seam=i;
- if(inp<0.0f) near_vert=-1;
- else if(inp>1.0f) near_vert=1;
- else near_vert=0;
- }
- }
- seam=ctx->seams+min_seam;
-
- VecCopyf(temp,seam->v0);
-
- if(near_vert){
- if(near_vert==-1)
- VecSubf(tan,co1,seam->v0);
- else{
- VecSubf(tan,co1,seam->v1);
- VecCopyf(temp,seam->v1);
- }
+ //if(do_seams){
+ // ParticleSeam *seam=ctx->seams;
+ // float temp[3],temp2[3],tan[3];
+ // float inp,cur_len,min_len=10000.0f;
+ // int min_seam=0, near_vert=0;
+ // /* find closest seam */
+ // for(i=0; i<ctx->totseam; i++, seam++){
+ // VecSubf(temp,co1,seam->v0);
+ // inp=Inpf(temp,seam->dir)/seam->length2;
+ // if(inp<0.0f){
+ // cur_len=VecLenf(co1,seam->v0);
+ // }
+ // else if(inp>1.0f){
+ // cur_len=VecLenf(co1,seam->v1);
+ // }
+ // else{
+ // VecCopyf(temp2,seam->dir);
+ // VecMulf(temp2,inp);
+ // cur_len=VecLenf(temp,temp2);
+ // }
+ // if(cur_len<min_len){
+ // min_len=cur_len;
+ // min_seam=i;
+ // if(inp<0.0f) near_vert=-1;
+ // else if(inp>1.0f) near_vert=1;
+ // else near_vert=0;
+ // }
+ // }
+ // seam=ctx->seams+min_seam;
+ //
+ // VecCopyf(temp,seam->v0);
+ //
+ // if(near_vert){
+ // if(near_vert==-1)
+ // VecSubf(tan,co1,seam->v0);
+ // else{
+ // VecSubf(tan,co1,seam->v1);
+ // VecCopyf(temp,seam->v1);
+ // }
+
+ // Normalize(tan);
+ // }
+ // else{
+ // VecCopyf(tan,seam->tan);
+ // VecSubf(temp2,co1,temp);
+ // if(Inpf(tan,temp2)<0.0f)
+ // VecNegf(tan);
+ // }
+ // for(w=0; w<maxw; w++){
+ // VecSubf(temp2,ptn[w].co,temp);
+ // if(Inpf(tan,temp2)<0.0f){
+ // parent[w]=-1;
+ // pweight[w]=0.0f;
+ // }
+ // }
- Normalize(tan);
- }
- else{
- VecCopyf(tan,seam->tan);
- VecSubf(temp2,co1,temp);
- if(Inpf(tan,temp2)<0.0f)
- VecNegf(tan);
- }
- for(w=0; w<maxw; w++){
- VecSubf(temp2,ptn[w].co,temp);
- if(Inpf(tan,temp2)<0.0f){
- parent[w]=-1;
- pweight[w]=0.0f;
- }
- }
-
- }
+ //}
for(w=0,i=0; w<maxw && i<4; w++){
if(parent[w]>=0){
@@ -877,7 +851,7 @@ void psys_thread_distribute_particle(ParticleThread *thread, ParticleData *pa, C
static void *exec_distribution(void *data)
{
ParticleThread *thread= (ParticleThread*)data;
- ParticleSystem *psys= thread->ctx->psys;
+ ParticleSystem *psys= thread->ctx->sim.psys;
ParticleData *pa;
ChildParticle *cpa;
int p, totpart;
@@ -944,11 +918,11 @@ static int compare_orig_index(const void *p1, const void *p2)
/* 6. and we're done! */
/* This is to denote functionality that does not yet work with mesh - only derived mesh */
-int psys_threads_init_distribution(ParticleThread *threads, Scene *scene, DerivedMesh *finaldm, int from)
+static int psys_threads_init_distribution(ParticleThread *threads, Scene *scene, DerivedMesh *finaldm, int from)
{
ParticleThreadContext *ctx= threads[0].ctx;
- Object *ob= ctx->ob;
- ParticleSystem *psys= ctx->psys;
+ Object *ob= ctx->sim.ob;
+ ParticleSystem *psys= ctx->sim.psys;
Object *tob;
ParticleData *pa=0, *tpars= 0;
ParticleSettings *part;
@@ -1000,49 +974,49 @@ int psys_threads_init_distribution(ParticleThread *threads, Scene *scene, Derive
totpart=get_psys_tot_child(scene, psys);
cfrom=from=PART_FROM_FACE;
- if(part->flag&PART_CHILD_SEAMS){
- MEdge *ed, *medge=dm->getEdgeDataArray(dm,CD_MEDGE);
- MVert *mvert=dm->getVertDataArray(dm,CD_MVERT);
- int totedge=dm->getNumEdges(dm);
+ //if(part->flag&PART_CHILD_SEAMS){
+ // MEdge *ed, *medge=dm->getEdgeDataArray(dm,CD_MEDGE);
+ // MVert *mvert=dm->getVertDataArray(dm,CD_MVERT);
+ // int totedge=dm->getNumEdges(dm);
- for(p=0, ed=medge; p<totedge; p++,ed++)
- if(ed->flag&ME_SEAM)
- totseam++;
+ // for(p=0, ed=medge; p<totedge; p++,ed++)
+ // if(ed->flag&ME_SEAM)
+ // totseam++;
- if(totseam){
- ParticleSeam *cur_seam=seams=MEM_callocN(totseam*sizeof(ParticleSeam),"Child Distribution Seams");
- float temp[3],temp2[3];
+ // if(totseam){
+ // ParticleSeam *cur_seam=seams=MEM_callocN(totseam*sizeof(ParticleSeam),"Child Distribution Seams");
+ // float temp[3],temp2[3];
- for(p=0, ed=medge; p<totedge; p++,ed++){
- if(ed->flag&ME_SEAM){
- VecCopyf(cur_seam->v0,(mvert+ed->v1)->co);
- VecCopyf(cur_seam->v1,(mvert+ed->v2)->co);
+ // for(p=0, ed=medge; p<totedge; p++,ed++){
+ // if(ed->flag&ME_SEAM){
+ // VecCopyf(cur_seam->v0,(mvert+ed->v1)->co);
+ // VecCopyf(cur_seam->v1,(mvert+ed->v2)->co);
- VecSubf(cur_seam->dir,cur_seam->v1,cur_seam->v0);
+ // VecSubf(cur_seam->dir,cur_seam->v1,cur_seam->v0);
- cur_seam->length2=VecLength(cur_seam->dir);
- cur_seam->length2*=cur_seam->length2;
+ // cur_seam->length2=VecLength(cur_seam->dir);
+ // cur_seam->length2*=cur_seam->length2;
- temp[0]=(float)((mvert+ed->v1)->no[0]);
- temp[1]=(float)((mvert+ed->v1)->no[1]);
- temp[2]=(float)((mvert+ed->v1)->no[2]);
- temp2[0]=(float)((mvert+ed->v2)->no[0]);
- temp2[1]=(float)((mvert+ed->v2)->no[1]);
- temp2[2]=(float)((mvert+ed->v2)->no[2]);
+ // temp[0]=(float)((mvert+ed->v1)->no[0]);
+ // temp[1]=(float)((mvert+ed->v1)->no[1]);
+ // temp[2]=(float)((mvert+ed->v1)->no[2]);
+ // temp2[0]=(float)((mvert+ed->v2)->no[0]);
+ // temp2[1]=(float)((mvert+ed->v2)->no[1]);
+ // temp2[2]=(float)((mvert+ed->v2)->no[2]);
- VecAddf(cur_seam->nor,temp,temp2);
- Normalize(cur_seam->nor);
+ // VecAddf(cur_seam->nor,temp,temp2);
+ // Normalize(cur_seam->nor);
- Crossf(cur_seam->tan,cur_seam->dir,cur_seam->nor);
+ // Crossf(cur_seam->tan,cur_seam->dir,cur_seam->nor);
- Normalize(cur_seam->tan);
+ // Normalize(cur_seam->tan);
- cur_seam++;
- }
- }
- }
-
- }
+ // cur_seam++;
+ // }
+ // }
+ // }
+ //
+ //}
}
else{
/* no need to figure out distribution */
@@ -1064,10 +1038,6 @@ int psys_threads_init_distribution(ParticleThread *threads, Scene *scene, Derive
length=VecLength(cpa->fuv);
}
- cpa->rand[0]=BLI_frand();
- cpa->rand[1]=BLI_frand();
- cpa->rand[2]=BLI_frand();
-
cpa->num=-1;
}
}
@@ -1346,7 +1316,6 @@ int psys_threads_init_distribution(ParticleThread *threads, Scene *scene, Derive
jitlevel= totpart/tot;
if(part->flag & PART_EDISTR) jitlevel*= 2; /* looks better in general, not very scietific */
if(jitlevel<3) jitlevel= 3;
- //if(jitlevel>100) jitlevel= 100;
}
jit= MEM_callocN((2+ jitlevel*2)*sizeof(float), "jit");
@@ -1365,7 +1334,7 @@ int psys_threads_init_distribution(ParticleThread *threads, Scene *scene, Derive
ctx->tree= tree;
ctx->seams= seams;
ctx->totseam= totseam;
- ctx->psys= psys;
+ ctx->sim.psys= psys;
ctx->index= index;
ctx->jit= jit;
ctx->jitlevel= jitlevel;
@@ -1386,7 +1355,7 @@ int psys_threads_init_distribution(ParticleThread *threads, Scene *scene, Derive
if(!children || psys->totchild < 10000)
totthread= 1;
- seed= 31415926 + ctx->psys->seed;
+ seed= 31415926 + ctx->sim.psys->seed;
for(i=0; i<totthread; i++) {
threads[i].rng= rng_new(seed);
threads[i].tot= totthread;
@@ -1395,16 +1364,17 @@ int psys_threads_init_distribution(ParticleThread *threads, Scene *scene, Derive
return 1;
}
-static void distribute_particles_on_dm(DerivedMesh *finaldm, Scene *scene, Object *ob, ParticleSystem *psys, int from)
+static void distribute_particles_on_dm(ParticleSimulationData *sim, int from)
{
+ DerivedMesh *finaldm = sim->psmd->dm;
ListBase threads;
ParticleThread *pthreads;
ParticleThreadContext *ctx;
int i, totthread;
- pthreads= psys_threads_create(scene, ob, psys);
+ pthreads= psys_threads_create(sim);
- if(!psys_threads_init_distribution(pthreads, scene, finaldm, from)) {
+ if(!psys_threads_init_distribution(pthreads, sim->scene, finaldm, from)) {
psys_threads_free(pthreads);
return;
}
@@ -1421,7 +1391,7 @@ static void distribute_particles_on_dm(DerivedMesh *finaldm, Scene *scene, Objec
else
exec_distribution(&pthreads[0]);
- psys_calc_dmcache(ob, finaldm, psys);
+ psys_calc_dmcache(sim->ob, finaldm, sim->psys);
ctx= pthreads[0].ctx;
if(ctx->dm != finaldm)
@@ -1431,8 +1401,9 @@ static void distribute_particles_on_dm(DerivedMesh *finaldm, Scene *scene, Objec
}
/* ready for future use, to emit particles without geometry */
-static void distribute_particles_on_shape(Object *ob, ParticleSystem *psys, int from)
+static void distribute_particles_on_shape(ParticleSimulationData *sim, int from)
{
+ ParticleSystem *psys = sim->psys;
PARTICLE_P;
fprintf(stderr,"Shape emission not yet possible!\n");
@@ -1443,22 +1414,22 @@ static void distribute_particles_on_shape(Object *ob, ParticleSystem *psys, int
pa->num= -1;
}
}
-static void distribute_particles(Scene *scene, Object *ob, ParticleSystem *psys, int from)
+static void distribute_particles(ParticleSimulationData *sim, int from)
{
- ParticleSystemModifierData *psmd=0;
+ PARTICLE_PSMD;
int distr_error=0;
- psmd=psys_get_modifier(ob,psys);
if(psmd){
if(psmd->dm)
- distribute_particles_on_dm(psmd->dm, scene, ob, psys, from);
+ distribute_particles_on_dm(sim, from);
else
distr_error=1;
}
else
- distribute_particles_on_shape(ob,psys,from);
+ distribute_particles_on_shape(sim, from);
if(distr_error){
+ ParticleSystem *psys = sim->psys;
PARTICLE_P;
fprintf(stderr,"Particle distribution error!\n");
@@ -1472,26 +1443,23 @@ static void distribute_particles(Scene *scene, Object *ob, ParticleSystem *psys,
}
/* threaded child particle distribution and path caching */
-ParticleThread *psys_threads_create(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys)
+ParticleThread *psys_threads_create(ParticleSimulationData *sim)
{
ParticleThread *threads;
ParticleThreadContext *ctx;
int i, totthread;
- if(scene->r.mode & R_FIXED_THREADS)
- totthread= scene->r.threads;
+ if(sim->scene->r.mode & R_FIXED_THREADS)
+ totthread= sim->scene->r.threads;
else
totthread= BLI_system_thread_count();
threads= MEM_callocN(sizeof(ParticleThread)*totthread, "ParticleThread");
ctx= MEM_callocN(sizeof(ParticleThreadContext), "ParticleThreadContext");
- ctx->scene= scene;
- ctx->ob= ob;
- ctx->psys= psys;
- ctx->psmd= psys_get_modifier(ob, psys);
- ctx->dm= ctx->psmd->dm;
- ctx->ma= give_current_material(ob, psys->part->omat);
+ ctx->sim = *sim;
+ ctx->dm= ctx->sim.psmd->dm;
+ ctx->ma= give_current_material(sim->ob, sim->psys->part->omat);
memset(threads, 0, sizeof(ParticleThread)*totthread);
@@ -1523,9 +1491,9 @@ void psys_threads_free(ParticleThread *threads)
if(ctx->vg_roughe)
MEM_freeN(ctx->vg_roughe);
- if(ctx->psys->lattice){
- end_latt_deform(ctx->psys->lattice);
- ctx->psys->lattice= NULL;
+ if(ctx->sim.psys->lattice){
+ end_latt_deform(ctx->sim.psys->lattice);
+ ctx->sim.psys->lattice= NULL;
}
/* distribution */
@@ -1551,37 +1519,34 @@ void psys_threads_free(ParticleThread *threads)
}
/* set particle parameters that don't change during particle's life */
-void initialize_particle(ParticleData *pa, int p, Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd)
+void initialize_particle(ParticleSimulationData *sim, ParticleData *pa, int p)
{
- ParticleSettings *part;
+ ParticleSettings *part = sim->psys->part;
ParticleTexture ptex;
Material *ma=0;
//IpoCurve *icu=0; // XXX old animation system
int totpart;
- float rand;
-
- part=psys->part;
- totpart=psys->totpart;
+ totpart=sim->psys->totpart;
ptex.life=ptex.size=ptex.exist=ptex.length=1.0;
ptex.time=(float)p/(float)totpart;
- BLI_srandom(psys->seed+p);
+ BLI_srandom(sim->psys->seed + p + 125);
if(part->from!=PART_FROM_PARTICLE && part->type!=PART_FLUID){
- ma=give_current_material(ob,part->omat);
+ ma=give_current_material(sim->ob,part->omat);
/* TODO: needs some work to make most blendtypes generally usefull */
- psys_get_texture(ob,ma,psmd,psys,pa,&ptex,MAP_PA_INIT);
+ psys_get_texture(sim,ma,pa,&ptex,MAP_PA_INIT);
}
pa->lifetime= part->lifetime*ptex.life;
if(part->type==PART_HAIR)
pa->time= 0.0f;
- else if(part->type==PART_REACTOR && (part->flag&PART_REACT_STA_END)==0)
- pa->time= 300000.0f; /* max frame */
+ //else if(part->type==PART_REACTOR && (part->flag&PART_REACT_STA_END)==0)
+ // pa->time= 300000.0f; /* max frame */
else{
//icu=find_ipocurve(psys->part->ipo,PART_EMIT_TIME);
//if(icu){
@@ -1605,10 +1570,8 @@ void initialize_particle(ParticleData *pa, int p, Object *ob, ParticleSystem *ps
}
#endif // XXX old animation system
- /* need to get every rand even if we don't use them so that randoms don't affect each other */
- rand= BLI_frand();
if(part->randlife!=0.0)
- pa->lifetime*= 1.0f - part->randlife*rand;
+ pa->lifetime*= 1.0f - part->randlife * BLI_frand();
}
pa->dietime= pa->time+pa->lifetime;
@@ -1625,13 +1588,14 @@ void initialize_particle(ParticleData *pa, int p, Object *ob, ParticleSystem *ps
/* usage other than straight after distribute has to handle this index by itself - jahka*/
//pa->num_dmcache = DMCACHE_NOTFOUND; /* assume we dont have a derived mesh face */
}
-static void initialize_all_particles(Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd)
+static void initialize_all_particles(ParticleSimulationData *sim)
{
//IpoCurve *icu=0; // XXX old animation system
+ ParticleSystem *psys = sim->psys;
PARTICLE_P;
LOOP_PARTICLES
- initialize_particle(pa,p,ob,psys,psmd);
+ initialize_particle(sim, pa, p);
if(psys->part->type != PART_FLUID) {
#if 0 // XXX old animation system
@@ -1688,66 +1652,51 @@ static void initialize_all_particles(Object *ob, ParticleSystem *psys, ParticleS
}
}
/* sets particle to the emitter surface with initial velocity & rotation */
-void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, ParticleSystemModifierData *psmd, Object *ob,
- float dtime, float cfra, float *vg_vel, float *vg_tan, float *vg_rot)
+void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime, float cfra)
{
+ Object *ob = sim->ob;
+ ParticleSystem *psys = sim->psys;
ParticleSettings *part;
ParticleTexture ptex;
ParticleKey state;
//IpoCurve *icu=0; // XXX old animation system
- float fac, phasefac, nor[3]={0,0,0},loc[3],tloc[3],vel[3]={0.0,0.0,0.0},rot[4],q2[4];
- float r_vel[3],r_ave[3],r_rot[4],p_vel[3]={0.0,0.0,0.0};
+ float fac, phasefac, nor[3]={0,0,0},loc[3],vel[3]={0.0,0.0,0.0},rot[4],q2[4];
+ float r_vel[3],r_ave[3],r_rot[4],vec[3],p_vel[3]={0.0,0.0,0.0};
float x_vec[3]={1.0,0.0,0.0}, utan[3]={0.0,1.0,0.0}, vtan[3]={0.0,0.0,1.0}, rot_vec[3]={0.0,0.0,0.0};
- float q_phase[4], length, r_phase;
+ float q_phase[4], r_phase;
+ int p = pa - psys->particles;
part=psys->part;
ptex.ivel=1.0;
- BLI_srandom(psys->seed + (pa - psys->particles));
-
/* we need to get every random even if they're not used so that they don't effect eachother */
- /* while loops are to have a spherical distribution (avoid cubic distribution) */
- length=2.0f;
- while(length>1.0){
- r_vel[0]=2.0f*(BLI_frand()-0.5f);
- r_vel[1]=2.0f*(BLI_frand()-0.5f);
- r_vel[2]=2.0f*(BLI_frand()-0.5f);
- length=VecLength(r_vel);
- }
-
- length=2.0f;
- while(length>1.0){
- r_ave[0]=2.0f*(BLI_frand()-0.5f);
- r_ave[1]=2.0f*(BLI_frand()-0.5f);
- r_ave[2]=2.0f*(BLI_frand()-0.5f);
- length=VecLength(r_ave);
- }
-
- r_rot[0]=2.0f*(BLI_frand()-0.5f);
- r_rot[1]=2.0f*(BLI_frand()-0.5f);
- r_rot[2]=2.0f*(BLI_frand()-0.5f);
- r_rot[3]=2.0f*(BLI_frand()-0.5f);
-
+ r_vel[0] = 2.0f * (PSYS_FRAND(p + 10) - 0.5f);
+ r_vel[1] = 2.0f * (PSYS_FRAND(p + 11) - 0.5f);
+ r_vel[2] = 2.0f * (PSYS_FRAND(p + 12) - 0.5f);
+
+ r_ave[0] = 2.0f * (PSYS_FRAND(p + 13) - 0.5f);
+ r_ave[1] = 2.0f * (PSYS_FRAND(p + 14) - 0.5f);
+ r_ave[2] = 2.0f * (PSYS_FRAND(p + 15) - 0.5f);
+
+ r_rot[0] = 2.0f * (PSYS_FRAND(p + 16) - 0.5f);
+ r_rot[1] = 2.0f * (PSYS_FRAND(p + 17) - 0.5f);
+ r_rot[2] = 2.0f * (PSYS_FRAND(p + 18) - 0.5f);
+ r_rot[3] = 2.0f * (PSYS_FRAND(p + 19) - 0.5f);
NormalQuat(r_rot);
- r_phase = BLI_frand();
+ r_phase = PSYS_FRAND(p + 20);
if(part->from==PART_FROM_PARTICLE){
- Object *tob;
- ParticleSystem *tpsys=0;
+ ParticleSimulationData tsim = {sim->scene, psys->target_ob ? psys->target_ob : ob, NULL, NULL};
float speed;
- tob=psys->target_ob;
- if(tob==0)
- tob=ob;
-
- tpsys=BLI_findlink(&tob->particlesystem, psys->target_psys-1);
+ tsim.psys = BLI_findlink(&tsim.ob->particlesystem, sim->psys->target_psys-1);
state.time = pa->time;
if(pa->num == -1)
memset(&state, 0, sizeof(state));
else
- psys_get_particle_state(scene, tob,tpsys,pa->num,&state,1);
+ psys_get_particle_state(&tsim, pa->num, &state, 1);
psys_get_from_key(&state, loc, nor, rot, 0);
QuatMulVecf(rot, vtan);
@@ -1764,23 +1713,20 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
}
else{
/* get precise emitter matrix if particle is born */
- if(part->type!=PART_HAIR && pa->time < cfra && pa->time >= psys->cfra)
- where_is_object_time(scene, ob,pa->time);
+ if(part->type!=PART_HAIR && pa->time < cfra && pa->time >= sim->psys->cfra)
+ where_is_object_time(sim->scene, sim->ob, pa->time);
/* get birth location from object */
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);
+ psys_particle_on_emitter(sim->psmd, part->from,pa->num, pa->num_dmcache, pa->fuv,pa->foffset,loc,nor,utan,vtan,0,0);
else
- psys_particle_on_emitter(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);
+ psys_particle_on_emitter(sim->psmd, part->from,pa->num, pa->num_dmcache, pa->fuv,pa->foffset,loc,nor,0,0,0,0);
/* get possible textural influence */
- psys_get_texture(ob,give_current_material(ob,part->omat),psmd,psys,pa,&ptex,MAP_PA_IVEL);
+ psys_get_texture(sim, give_current_material(sim->ob,part->omat), pa, &ptex, MAP_PA_IVEL);
- if(vg_vel && pa->num != -1)
- ptex.ivel*=psys_particle_value_from_verts(psmd->dm,part->from,pa,vg_vel);
+ //if(vg_vel && pa->num != -1)
+ // ptex.ivel*=psys_particle_value_from_verts(sim->psmd->dm,part->from,pa,vg_vel);
/* particles live in global space so */
/* let's convert: */
@@ -1788,21 +1734,18 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
Mat4MulVecfl(ob->obmat,loc);
/* -normal */
- VECADD(nor,tloc,nor);
- Mat4MulVecfl(ob->obmat,nor);
- VECSUB(nor,nor,loc);
+ Mat4Mul3Vecfl(ob->obmat,nor);
Normalize(nor);
/* -tangent */
if(part->tanfac!=0.0){
- float phase=vg_rot?2.0f*(psys_particle_value_from_verts(psmd->dm,part->from,pa,vg_rot)-0.5f):0.0f;
+ //float phase=vg_rot?2.0f*(psys_particle_value_from_verts(sim->psmd->dm,part->from,pa,vg_rot)-0.5f):0.0f;
+ float phase=0.0f;
VecMulf(vtan,-(float)cos(M_PI*(part->tanphase+phase)));
fac=-(float)sin(M_PI*(part->tanphase+phase));
VECADDFAC(vtan,vtan,utan,fac);
- VECADD(vtan,tloc,vtan);
- Mat4MulVecfl(ob->obmat,vtan);
- VECSUB(vtan,vtan,loc);
+ Mat4Mul3Vecfl(ob->obmat,vtan);
VECCOPY(utan,nor);
VecMulf(utan,Inpf(vtan,nor));
@@ -1831,7 +1774,7 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
}
}
- if(part->phystype==PART_PHYS_BOIDS) {
+ if(part->phystype==PART_PHYS_BOIDS && pa->boid) {
BoidParticle *bpa = pa->boid;
float dvec[3], q[4], mat[3][3];
@@ -1851,13 +1794,9 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
/* and gravity in r_ve */
bpa->gravity[0] = bpa->gravity[1] = 0.0f;
bpa->gravity[2] = -1.0f;
- if(part->acc[2]!=0.0f)
- bpa->gravity[2] = part->acc[2];
-
- //pa->r_ve[0] = pa->r_ve[1] = 0.0f;
- //pa->r_ve[2] = -1.0f;
- //if(part->acc[2]!=0.0f)
- // pa->r_ve[2] = part->acc[2];
+ if((sim->scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY)
+ && sim->scene->physics_settings.gravity[2]!=0.0f)
+ bpa->gravity[2] = sim->scene->physics_settings.gravity[2];
/* calculate rotation matrix */
Projf(dvec, r_vel, pa->state.ave);
@@ -1897,8 +1836,26 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
VECADDFAC(vel,vel,nor,part->normfac);
/* *emitter tangent */
- if(psmd && part->tanfac!=0.0)
- VECADDFAC(vel,vel,vtan,part->tanfac*(vg_tan?psys_particle_value_from_verts(psmd->dm,part->from,pa,vg_tan):1.0f));
+ if(sim->psmd && part->tanfac!=0.0)
+ VECADDFAC(vel,vel,vtan,part->tanfac);
+ //VECADDFAC(vel,vel,vtan,part->tanfac*(vg_tan?psys_particle_value_from_verts(sim->psmd->dm,part->from,pa,vg_tan):1.0f));
+
+ /* *emitter object orientation */
+ if(part->ob_vel[0]!=0.0) {
+ VECCOPY(vec, ob->obmat[0]);
+ Normalize(vec);
+ VECADDFAC(vel, vel, vec, part->ob_vel[0]);
+ }
+ if(part->ob_vel[1]!=0.0) {
+ VECCOPY(vec, ob->obmat[1]);
+ Normalize(vec);
+ VECADDFAC(vel, vel, vec, part->ob_vel[1]);
+ }
+ if(part->ob_vel[2]!=0.0) {
+ VECCOPY(vec, ob->obmat[2]);
+ Normalize(vec);
+ VECADDFAC(vel, vel, vec, part->ob_vel[2]);
+ }
/* *texture */
/* TODO */
@@ -1918,9 +1875,6 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
//}
VecMulf(vel,ptex.ivel);
-
- //if(ELEM(part->phystype, PART_PHYS_GRADU_EX, PART_PHYS_GRADU_SIM))
- // VecAddf(vel,vel,part->acc);
VECCOPY(pa->state.vel,vel);
@@ -1998,26 +1952,28 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
pa->dietime = pa->time + pa->lifetime;
- if(pa->time >= cfra)
+ if(pa->time > cfra)
pa->alive = PARS_UNBORN;
+ else if(pa->dietime <= cfra)
+ pa->alive = PARS_DEAD;
+ else
+ pa->alive = PARS_ALIVE;
pa->state.time = cfra;
-
-// pa->flag &= ~PARS_STICKY;
}
-static void reset_all_particles(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd, float dtime, float cfra, int from)
+static void reset_all_particles(ParticleSimulationData *sim, float dtime, float cfra, int from)
{
ParticleData *pa;
- int p, totpart=psys->totpart;
- float *vg_vel=psys_cache_vgroup(psmd->dm,psys,PSYS_VG_VEL);
- float *vg_tan=psys_cache_vgroup(psmd->dm,psys,PSYS_VG_TAN);
- float *vg_rot=psys_cache_vgroup(psmd->dm,psys,PSYS_VG_ROT);
+ int p, totpart=sim->psys->totpart;
+ //float *vg_vel=psys_cache_vgroup(sim->psmd->dm,sim->psys,PSYS_VG_VEL);
+ //float *vg_tan=psys_cache_vgroup(sim->psmd->dm,sim->psys,PSYS_VG_TAN);
+ //float *vg_rot=psys_cache_vgroup(sim->psmd->dm,sim->psys,PSYS_VG_ROT);
- for(p=from, pa=psys->particles+from; p<totpart; p++, pa++)
- reset_particle(scene, pa, psys, psmd, ob, dtime, cfra, vg_vel, vg_tan, vg_rot);
+ for(p=from, pa=sim->psys->particles+from; p<totpart; p++, pa++)
+ reset_particle(sim, pa, dtime, cfra);
- if(vg_vel)
- MEM_freeN(vg_vel);
+ //if(vg_vel)
+ // MEM_freeN(vg_vel);
}
/************************************************/
/* Particle targets */
@@ -2042,15 +1998,15 @@ ParticleSystem *psys_get_target_system(Object *ob, ParticleTarget *pt)
/* Keyed particles */
/************************************************/
/* Counts valid keyed targets */
-void psys_count_keyed_targets(Object *ob, ParticleSystem *psys)
+void psys_count_keyed_targets(ParticleSimulationData *sim)
{
- ParticleSystem *kpsys;
+ ParticleSystem *psys = sim->psys, *kpsys;
ParticleTarget *pt = psys->targets.first;
int keys_valid = 1;
psys->totkeyed = 0;
for(; pt; pt=pt->next) {
- kpsys = psys_get_target_system(ob, pt);
+ kpsys = psys_get_target_system(sim->ob, pt);
if(kpsys && kpsys->totpart) {
psys->totkeyed += keys_valid;
@@ -2065,9 +2021,10 @@ void psys_count_keyed_targets(Object *ob, ParticleSystem *psys)
psys->totkeyed *= psys->flag & PSYS_KEYED_TIMING ? 1 : psys->part->keyed_loops;
}
-static void set_keyed_keys(Scene *scene, Object *ob, ParticleSystem *psys)
+static void set_keyed_keys(ParticleSimulationData *sim)
{
- ParticleSystem *kpsys = psys;
+ ParticleSystem *psys = sim->psys;
+ ParticleSimulationData ksim = {sim->scene, NULL, NULL, NULL};
ParticleTarget *pt;
PARTICLE_P;
ParticleKey *key;
@@ -2097,16 +2054,14 @@ static void set_keyed_keys(Scene *scene, Object *ob, ParticleSystem *psys)
pt = psys->targets.first;
for(k=0; k<totkeys; k++) {
- if(pt->ob)
- kpsys = BLI_findlink(&pt->ob->particlesystem, pt->psys - 1);
- else
- kpsys = BLI_findlink(&ob->particlesystem, pt->psys - 1);
+ ksim.ob = pt->ob ? pt->ob : sim->ob;
+ ksim.psys = BLI_findlink(&ksim.ob->particlesystem, pt->psys - 1);
LOOP_PARTICLES {
key = pa->keys + k;
key->time = -1.0; /* use current time */
- psys_get_particle_state(scene, pt->ob, kpsys, p%kpsys->totpart, key, 1);
+ psys_get_particle_state(&ksim, p%ksim.psys->totpart, key, 1);
if(psys->flag & PSYS_KEYED_TIMING){
key->time = pa->time + pt->time;
@@ -2132,111 +2087,109 @@ static void set_keyed_keys(Scene *scene, Object *ob, ParticleSystem *psys)
/************************************************/
/* Reactors */
/************************************************/
-static void push_reaction(Object* ob, ParticleSystem *psys, int pa_num, int event, ParticleKey *state)
-{
- Object *rob;
- ParticleSystem *rpsys;
- ParticleSettings *rpart;
- ParticleData *pa;
- ListBase *lb=&psys->effectors;
- ParticleEffectorCache *ec;
- ParticleReactEvent *re;
-
- if(lb->first) for(ec = lb->first; ec; ec= ec->next){
- if(ec->type & PSYS_EC_REACTOR){
- /* all validity checks already done in add_to_effectors */
- rob=ec->ob;
- rpsys=BLI_findlink(&rob->particlesystem,ec->psys_nbr);
- rpart=rpsys->part;
- if(rpsys->part->reactevent==event){
- pa=psys->particles+pa_num;
- re= MEM_callocN(sizeof(ParticleReactEvent), "react event");
- re->event=event;
- re->pa_num = pa_num;
- re->ob = ob;
- re->psys = psys;
- re->size = pa->size;
- copy_particle_key(&re->state,state,1);
-
- switch(event){
- case PART_EVENT_DEATH:
- re->time=pa->dietime;
- break;
- case PART_EVENT_COLLIDE:
- re->time=state->time;
- break;
- case PART_EVENT_NEAR:
- re->time=state->time;
- break;
- }
-
- BLI_addtail(&rpsys->reactevents, re);
- }
- }
- }
-}
-static void react_to_events(ParticleSystem *psys, int pa_num)
-{
- ParticleSettings *part=psys->part;
- ParticleData *pa=psys->particles+pa_num;
- ParticleReactEvent *re=psys->reactevents.first;
- int birth=0;
- float dist=0.0f;
-
- for(re=psys->reactevents.first; re; re=re->next){
- birth=0;
- if(part->from==PART_FROM_PARTICLE){
- if(pa->num==re->pa_num && pa->alive==PARS_UNBORN){
- if(re->event==PART_EVENT_NEAR){
- ParticleData *tpa = re->psys->particles+re->pa_num;
- float pa_time=tpa->time + pa->foffset*tpa->lifetime;
- if(re->time >= pa_time){
- pa->time=pa_time;
- pa->dietime=pa->time+pa->lifetime;
- }
- }
- else{
- pa->time=re->time;
- pa->dietime=pa->time+pa->lifetime;
- }
- }
- }
- else{
- dist=VecLenf(pa->state.co, re->state.co);
- if(dist <= re->size){
- if(pa->alive==PARS_UNBORN){
- pa->time=re->time;
- pa->dietime=pa->time+pa->lifetime;
- birth=1;
- }
- if(birth || part->flag&PART_REACT_MULTIPLE){
- float vec[3];
- VECSUB(vec,pa->state.co, re->state.co);
- if(birth==0)
- VecMulf(vec,(float)pow(1.0f-dist/re->size,part->reactshape));
- VECADDFAC(pa->state.vel,pa->state.vel,vec,part->reactfac);
- VECADDFAC(pa->state.vel,pa->state.vel,re->state.vel,part->partfac);
- }
- if(birth)
- VecMulf(pa->state.vel,(float)pow(1.0f-dist/re->size,part->reactshape));
- }
- }
- }
-}
-void psys_get_reactor_target(Object *ob, ParticleSystem *psys, Object **target_ob, ParticleSystem **target_psys)
-{
- Object *tob;
-
- tob=psys->target_ob;
- if(tob==0)
- tob=ob;
-
- *target_psys=BLI_findlink(&tob->particlesystem,psys->target_psys-1);
- if(*target_psys)
- *target_ob=tob;
- else
- *target_ob=0;
-}
+//static void push_reaction(ParticleSimulationData *sim, int pa_num, int event, ParticleKey *state)
+//{
+// Object *rob;
+// ParticleSystem *rpsys;
+// ParticleSettings *rpart;
+// ParticleData *pa;
+// ListBase *lb=&sim->psys->effectors;
+// ParticleEffectorCache *ec;
+// ParticleReactEvent *re;
+//
+// if(lb->first) for(ec = lb->first; ec; ec= ec->next){
+// if(ec->type & PSYS_EC_REACTOR){
+// /* all validity checks already done in add_to_effectors */
+// rob=ec->ob;
+// rpsys=BLI_findlink(&rob->particlesystem,ec->psys_nbr);
+// rpart=rpsys->part;
+// if(rpsys->part->reactevent==event){
+// pa=sim->psys->particles+pa_num;
+// re= MEM_callocN(sizeof(ParticleReactEvent), "react event");
+// re->event=event;
+// re->pa_num = pa_num;
+// re->ob = sim->ob;
+// re->psys = sim->psys;
+// re->size = pa->size;
+// copy_particle_key(&re->state,state,1);
+//
+// switch(event){
+// case PART_EVENT_DEATH:
+// re->time=pa->dietime;
+// break;
+// case PART_EVENT_COLLIDE:
+// re->time=state->time;
+// break;
+// case PART_EVENT_NEAR:
+// re->time=state->time;
+// break;
+// }
+//
+// BLI_addtail(&rpsys->reactevents, re);
+// }
+// }
+// }
+//}
+//static void react_to_events(ParticleSystem *psys, int pa_num)
+//{
+// ParticleSettings *part=psys->part;
+// ParticleData *pa=psys->particles+pa_num;
+// ParticleReactEvent *re=psys->reactevents.first;
+// int birth=0;
+// float dist=0.0f;
+//
+// for(re=psys->reactevents.first; re; re=re->next){
+// birth=0;
+// if(part->from==PART_FROM_PARTICLE){
+// if(pa->num==re->pa_num && pa->alive==PARS_UNBORN){
+// if(re->event==PART_EVENT_NEAR){
+// ParticleData *tpa = re->psys->particles+re->pa_num;
+// float pa_time=tpa->time + pa->foffset*tpa->lifetime;
+// if(re->time >= pa_time){
+// pa->time=pa_time;
+// pa->dietime=pa->time+pa->lifetime;
+// }
+// }
+// else{
+// pa->time=re->time;
+// pa->dietime=pa->time+pa->lifetime;
+// }
+// }
+// }
+// else{
+// dist=VecLenf(pa->state.co, re->state.co);
+// if(dist <= re->size){
+// if(pa->alive==PARS_UNBORN){
+// pa->time=re->time;
+// pa->dietime=pa->time+pa->lifetime;
+// birth=1;
+// }
+// if(birth || part->flag&PART_REACT_MULTIPLE){
+// float vec[3];
+// VECSUB(vec,pa->state.co, re->state.co);
+// if(birth==0)
+// VecMulf(vec,(float)pow(1.0f-dist/re->size,part->reactshape));
+// VECADDFAC(pa->state.vel,pa->state.vel,vec,part->reactfac);
+// VECADDFAC(pa->state.vel,pa->state.vel,re->state.vel,part->partfac);
+// }
+// if(birth)
+// VecMulf(pa->state.vel,(float)pow(1.0f-dist/re->size,part->reactshape));
+// }
+// }
+// }
+//}
+//void psys_get_reactor_target(ParticleSimulationData *sim, Object **target_ob, ParticleSystem **target_psys)
+//{
+// Object *tob;
+//
+// tob = sim->psys->target_ob ? sim->psys->target_ob : sim->ob;
+//
+// *target_psys = BLI_findlink(&tob->particlesystem, sim->psys->target_psys-1);
+// if(*target_psys)
+// *target_ob=tob;
+// else
+// *target_ob=0;
+//}
/************************************************/
/* Point Cache */
/************************************************/
@@ -2270,555 +2223,52 @@ void psys_get_pointcache_start_end(Scene *scene, ParticleSystem *psys, int *sfra
/************************************************/
/* Effectors */
/************************************************/
-static void update_particle_tree(ParticleSystem *psys)
+void psys_update_particle_tree(ParticleSystem *psys, float cfra)
{
if(psys) {
PARTICLE_P;
- if(!psys->tree || psys->tree_frame != psys->cfra) {
+ if(!psys->tree || psys->tree_frame != cfra) {
BLI_kdtree_free(psys->tree);
psys->tree = BLI_kdtree_new(psys->totpart);
- LOOP_PARTICLES {
- if(pa->flag & (PARS_NO_DISP+PARS_UNEXIST) || pa->alive != PARS_ALIVE)
- continue;
-
- BLI_kdtree_insert(psys->tree, p, pa->state.co, NULL);
- }
- BLI_kdtree_balance(psys->tree);
-
- psys->tree_frame = psys->cfra;
- }
- }
-}
-static void do_texture_effector(Tex *tex, short mode, short is_2d, float nabla, short object, float *pa_co, float obmat[4][4], float force_val, float falloff, float *field)
-{
- TexResult result[4];
- float tex_co[3], strength, mag_vec[3];
- int hasrgb;
- if(tex==NULL) return;
-
- result[0].nor = result[1].nor = result[2].nor = result[3].nor = 0;
-
- strength= force_val*falloff;///(float)pow((double)distance,(double)power);
-
- VECCOPY(tex_co,pa_co);
-
- if(is_2d){
- float fac=-Inpf(tex_co,obmat[2]);
- VECADDFAC(tex_co,tex_co,obmat[2],fac);
- }
-
- if(object){
- VecSubf(tex_co,tex_co,obmat[3]);
- Mat4Mul3Vecfl(obmat,tex_co);
- }
-
- hasrgb = multitex_ext(tex, tex_co, NULL,NULL, 1, result);
-
- if(hasrgb && mode==PFIELD_TEX_RGB){
- mag_vec[0]= (0.5f-result->tr)*strength;
- mag_vec[1]= (0.5f-result->tg)*strength;
- mag_vec[2]= (0.5f-result->tb)*strength;
- }
- else{
- strength/=nabla;
-
- tex_co[0]+= nabla;
- multitex_ext(tex, tex_co, NULL,NULL, 1, result+1);
-
- tex_co[0]-= nabla;
- tex_co[1]+= nabla;
- multitex_ext(tex, tex_co, NULL,NULL, 1, result+2);
-
- tex_co[1]-= nabla;
- tex_co[2]+= nabla;
- multitex_ext(tex, tex_co, NULL,NULL, 1, result+3);
-
- if(mode==PFIELD_TEX_GRAD || !hasrgb){ /* if we dont have rgb fall back to grad */
- mag_vec[0]= (result[0].tin-result[1].tin)*strength;
- mag_vec[1]= (result[0].tin-result[2].tin)*strength;
- mag_vec[2]= (result[0].tin-result[3].tin)*strength;
- }
- else{ /*PFIELD_TEX_CURL*/
- float dbdy,dgdz,drdz,dbdx,dgdx,drdy;
-
- dbdy= result[2].tb-result[0].tb;
- dgdz= result[3].tg-result[0].tg;
- drdz= result[3].tr-result[0].tr;
- dbdx= result[1].tb-result[0].tb;
- dgdx= result[1].tg-result[0].tg;
- drdy= result[2].tr-result[0].tr;
-
- mag_vec[0]=(dbdy-dgdz)*strength;
- mag_vec[1]=(drdz-dbdx)*strength;
- mag_vec[2]=(dgdx-drdy)*strength;
- }
- }
-
- if(is_2d){
- float fac=-Inpf(mag_vec,obmat[2]);
- VECADDFAC(mag_vec,mag_vec,obmat[2],fac);
- }
-
- VecAddf(field,field,mag_vec);
-}
-static void add_to_effectors(ListBase *lb, Scene *scene, Object *ob, Object *obsrc, ParticleSystem *psys)
-{
- ParticleEffectorCache *ec;
- PartDeflect *pd= ob->pd;
- short type=0,i;
-
- if(pd && ob != obsrc){
- if(pd->forcefield == PFIELD_GUIDE) {
- if(ob->type==OB_CURVE) {
- Curve *cu= ob->data;
- if(cu->flag & CU_PATH) {
- if(cu->path==NULL || cu->path->data==NULL)
- makeDispListCurveTypes(scene, ob, 0);
- if(cu->path && cu->path->data) {
- type |= PSYS_EC_EFFECTOR;
- }
- }
- }
- }
- else if(pd->forcefield)
- {
- type |= PSYS_EC_EFFECTOR;
- }
- }
-
- if(pd && pd->deflect)
- type |= PSYS_EC_DEFLECT;
-
- if(type){
- ec= MEM_callocN(sizeof(ParticleEffectorCache), "effector cache");
- ec->ob= ob;
- ec->type=type;
- ec->distances=0;
- ec->locations=0;
- ec->rng = rng_new(1);
- rng_srandom(ec->rng, (unsigned int)(ceil(PIL_check_seconds_timer()))); // use better seed
-
- BLI_addtail(lb, ec);
- }
-
- type=0;
-
- /* add particles as different effectors */
- if(ob->particlesystem.first){
- ParticleSystem *epsys=ob->particlesystem.first;
- ParticleSettings *epart=0;
- 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;
-
- if((epsys->part->pd && epsys->part->pd->forcefield)
- || (epsys->part->pd2 && epsys->part->pd2->forcefield))
- {
- type=PSYS_EC_PARTICLE;
- }
-
- if(epart->type==PART_REACTOR) {
- tob=epsys->target_ob;
- if(tob==0)
- tob=ob;
- if(BLI_findlink(&tob->particlesystem,epsys->target_psys-1)==psys)
- type|=PSYS_EC_REACTOR;
- }
-
- if(type){
- ec= MEM_callocN(sizeof(ParticleEffectorCache), "effector cache");
- ec->ob= ob;
- ec->type=type;
- ec->psys_nbr=i;
- ec->rng = rng_new(1);
- rng_srandom(ec->rng, (unsigned int)(ceil(PIL_check_seconds_timer())));
-
- BLI_addtail(lb, ec);
- }
- }
- }
-
- }
-}
-
-static void psys_init_effectors_recurs(Scene *scene, Object *ob, Object *obsrc, ParticleSystem *psys, ListBase *listb, int level)
-{
- Group *group;
- GroupObject *go;
- unsigned int layer= obsrc->lay;
-
- if(level>MAX_DUPLI_RECUR) return;
-
- if(ob->lay & layer) {
- if(ob->pd || ob->particlesystem.first)
- add_to_effectors(listb, scene, ob, obsrc, psys);
-
- if(ob->dup_group) {
- group= ob->dup_group;
- for(go= group->gobject.first; go; go= go->next)
- psys_init_effectors_recurs(scene, go->ob, obsrc, psys, listb, level+1);
- }
- }
-}
-
-void psys_init_effectors(Scene *scene, Object *obsrc, Group *group, ParticleSystem *psys)
-{
- ListBase *listb= &psys->effectors;
- Base *base;
-
- listb->first=listb->last=0;
-
- if(group) {
- GroupObject *go;
-
- for(go= group->gobject.first; go; go= go->next)
- psys_init_effectors_recurs(scene, go->ob, obsrc, psys, listb, 0);
- }
- else {
- for(base = scene->base.first; base; base= base->next)
- psys_init_effectors_recurs(scene, base->object, obsrc, psys, listb, 0);
- }
-}
-
-void psys_end_effectors(ParticleSystem *psys)
-{
- /* NOTE:
- ec->ob is not valid in here anymore! - dg
- */
- ParticleEffectorCache *ec = psys->effectors.first;
-
- for(; ec; ec= ec->next){
- if(ec->distances)
- MEM_freeN(ec->distances);
-
- if(ec->locations)
- MEM_freeN(ec->locations);
-
- if(ec->face_minmax)
- MEM_freeN(ec->face_minmax);
-
- if(ec->vert_cos)
- MEM_freeN(ec->vert_cos);
-
- if(ec->tree)
- BLI_kdtree_free(ec->tree);
-
- if(ec->rng)
- rng_free(ec->rng);
- }
-
- BLI_freelistN(&psys->effectors);
-}
-
-static void precalc_effectors(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd, float cfra)
-{
- ListBase *lb=&psys->effectors;
- ParticleEffectorCache *ec;
- ParticleSettings *part=psys->part;
- PARTICLE_P;
- int totpart;
- float vec2[3],loc[3],radius,*co=0;
-
- for(ec= lb->first; ec; ec= ec->next) {
- PartDeflect *pd= ec->ob->pd;
- co = NULL;
-
- if(ec->type==PSYS_EC_EFFECTOR && pd->forcefield==PFIELD_GUIDE && ec->ob->type==OB_CURVE
- && part->phystype!=PART_PHYS_BOIDS) {
- float vec[4];
-
- where_on_path(ec->ob, 0.0, vec, vec2, NULL, &radius);
-
- Mat4MulVecfl(ec->ob->obmat,vec);
- Mat4Mul3Vecfl(ec->ob->obmat,vec2);
-
- QUATCOPY(ec->firstloc,vec);
- VECCOPY(ec->firstdir,vec2);
-
- /* TODO - use 'radius' to adjust the effector */
-
- totpart=psys->totpart;
-
- if(totpart){
- ec->distances=MEM_callocN(totpart*sizeof(float),"particle distances");
- ec->locations=MEM_callocN(totpart*3*sizeof(float),"particle locations");
-
- LOOP_PARTICLES {
- if(part->from == PART_FROM_PARTICLE) {
- VECCOPY(loc, pa->fuv);
- }
+ LOOP_SHOWN_PARTICLES {
+ if(pa->alive == PARS_ALIVE) {
+ if(pa->state.time == cfra)
+ BLI_kdtree_insert(psys->tree, p, pa->prev_state.co, NULL);
else
- psys_particle_on_emitter(psmd,part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,loc,0,0,0,0,0);
-
- Mat4MulVecfl(ob->obmat,loc);
- ec->distances[p]=VecLenf(loc,vec);
- VECSUB(loc,loc,vec);
- VECCOPY(ec->locations+3*p,loc);
- }
- }
- }
- else if(ec->type==PSYS_EC_PARTICLE){
- Object *eob = ec->ob;
- ParticleSystem *epsys = BLI_findlink(&eob->particlesystem,ec->psys_nbr);
- ParticleSettings *epart = epsys->part;
- ParticleData *epa;
- int p, totepart = epsys->totpart;
-
- if(psys->part->phystype==PART_PHYS_BOIDS){
- ParticleKey state;
- PartDeflect *pd;
-
- pd= epart->pd;
- if(pd->forcefield==PFIELD_FORCE && totepart){
- KDTree *tree;
-
- tree=BLI_kdtree_new(totepart);
- ec->tree=tree;
-
- for(p=0, epa=epsys->particles; p<totepart; p++,epa++)
- if(epa->alive==PARS_ALIVE && psys_get_particle_state(scene, eob,epsys,p,&state,0))
- BLI_kdtree_insert(tree, p, state.co, NULL);
-
- BLI_kdtree_balance(tree);
+ BLI_kdtree_insert(psys->tree, p, pa->state.co, NULL);
}
}
+ BLI_kdtree_balance(psys->tree);
- }
- else if(ec->type==PSYS_EC_DEFLECT) {
- CollisionModifierData *collmd = ( CollisionModifierData * ) ( modifiers_findByType ( ec->ob, eModifierType_Collision ) );
- if(collmd)
- collision_move_object(collmd, 1.0, 0.0);
+ psys->tree_frame = psys->cfra;
}
}
}
-int effector_find_co(Scene *scene, float *pco, SurfaceModifierData *sur, Object *ob, PartDeflect *pd, float *co, float *nor, float *vel, int *index)
+static void psys_update_effectors(ParticleSimulationData *sim)
{
- SurfaceModifierData *surmd = NULL;
- int ret = 0;
-
- if(sur)
- surmd = sur;
- else if(pd && pd->flag&PFIELD_SURFACE)
- {
- surmd = (SurfaceModifierData *)modifiers_findByType ( ob, eModifierType_Surface );
- }
-
- if(surmd) {
- /* closest point in the object surface is an effector */
- BVHTreeNearest nearest;
-
- nearest.index = -1;
- nearest.dist = FLT_MAX;
-
- BLI_bvhtree_find_nearest(surmd->bvhtree->tree, pco, &nearest, surmd->bvhtree->nearest_callback, surmd->bvhtree);
-
- if(nearest.index != -1) {
- VECCOPY(co, nearest.co);
-
- if(nor) {
- VECCOPY(nor, nearest.no);
- }
-
- if(vel) {
- MFace *mface = CDDM_get_tessface(surmd->dm, nearest.index);
-
- VECCOPY(vel, surmd->v[mface->v1].co);
- VecAddf(vel, vel, surmd->v[mface->v2].co);
- VecAddf(vel, vel, surmd->v[mface->v3].co);
- if(mface->v4)
- VecAddf(vel, vel, surmd->v[mface->v4].co);
-
- VecMulf(vel, mface->v4 ? 0.25f : 0.333f);
- }
-
- if(index)
- *index = nearest.index;
-
- ret = 1;
- }
- else {
- co[0] = co[1] = co[2] = 0.0f;
-
- if(nor)
- nor[0] = nor[1] = nor[2] = 0.0f;
-
- if(vel)
- vel[0] = vel[1] = vel[2] = 0.0f;
- }
- }
- else {
- /* use center of object for distance calculus */
- VECCOPY(co, ob->obmat[3]);
-
- if(nor) {
- VECCOPY(nor, ob->obmat[2]);
- }
-
- if(vel) {
- Object obcopy = *ob;
-
- VECCOPY(vel, ob->obmat[3]);
-
- where_is_object_time(scene, ob, scene->r.cfra - 1.0);
-
- VecSubf(vel, vel, ob->obmat[3]);
-
- *ob = obcopy;
- }
- }
-
- return ret;
-}
-/* calculate forces that all effectors apply to a particle*/
-void do_effectors(int pa_no, ParticleData *pa, ParticleKey *state, Scene *scene, Object *ob, ParticleSystem *psys, float *rootco, float *force_field, float *vel,float framestep, float cfra)
-{
- Object *eob;
- ParticleSystem *epsys;
- ParticleSettings *epart;
- ParticleData *epa;
- ParticleKey estate;
- PartDeflect *pd;
- ListBase *lb=&psys->effectors;
- ParticleEffectorCache *ec;
- float distance, vec_to_part[3], pco[3], co[3];
- float falloff, charge = 0.0f, strength;
- int p, face_index=-1;
-
- /* check all effector objects for interaction */
- if(lb->first){
- if(psys->part->pd && psys->part->pd->forcefield==PFIELD_CHARGE){
- /* Only the charge of the effected particle is used for
- interaction, not fall-offs. If the fall-offs aren't the
- same this will be unphysical, but for animation this
- could be the wanted behavior. If you want physical
- correctness the fall-off should be spherical 2.0 anyways.
- */
- charge = psys->part->pd->f_strength;
- }
- if(psys->part->pd2 && psys->part->pd2->forcefield==PFIELD_CHARGE){
- charge += psys->part->pd2->f_strength;
- }
- for(ec = lb->first; ec; ec= ec->next){
- eob= ec->ob;
- if(ec->type & PSYS_EC_EFFECTOR){
- pd=eob->pd;
- if(psys->part->type!=PART_HAIR && psys->part->integrator)
- where_is_object_time(scene, eob,cfra);
-
- if(pd && pd->flag&PFIELD_SURFACE) {
- float velocity[3];
- /* using velocity corrected location allows for easier sliding over effector surface */
- VecCopyf(velocity, state->vel);
- VecMulf(velocity, psys_get_timestep(psys->part));
- VecAddf(pco, state->co, velocity);
- }
- else
- VECCOPY(pco, state->co);
-
- effector_find_co(scene, pco, NULL, eob, pd, co, NULL, NULL, &face_index);
-
- VecSubf(vec_to_part, state->co, co);
-
- distance = VecLength(vec_to_part);
-
- falloff=effector_falloff(pd,eob->obmat[2],vec_to_part);
-
- strength = pd->f_strength * psys->part->effector_weight[0] * psys->part->effector_weight[pd->forcefield];
-
- if(falloff<=0.0f)
- ; /* don't do anything */
- else if(pd->forcefield==PFIELD_TEXTURE) {
- do_texture_effector(pd->tex, pd->tex_mode, pd->flag&PFIELD_TEX_2D, pd->tex_nabla,
- pd->flag & PFIELD_TEX_OBJECT, (pd->flag & PFIELD_TEX_ROOTCO) ? rootco : state->co, eob->obmat,
- strength, falloff, force_field);
- } else {
- do_physical_effector(scene, eob, state->co, pd->forcefield,strength,distance,
- falloff,0.0,pd->f_damp,eob->obmat[2],vec_to_part,
- state->vel,force_field,pd->flag&PFIELD_PLANAR,ec->rng,pd->f_noise,charge,pa->size);
- }
- }
- if(ec->type & PSYS_EC_PARTICLE){
- int totepart, i;
- epsys= BLI_findlink(&eob->particlesystem,ec->psys_nbr);
- epart= epsys->part;
- pd=epart->pd;
- totepart= epsys->totpart;
-
- if(totepart <= 0)
- continue;
-
- if(pd && pd->forcefield==PFIELD_HARMONIC){
- /* every particle is mapped to only one harmonic effector particle */
- p= pa_no%epsys->totpart;
- totepart= p+1;
- }
- else{
- p=0;
- }
-
- epsys->lattice= psys_get_lattice(scene, ob, psys);
-
- for(; p<totepart; p++){
- /* particle skips itself as effector */
- if(epsys==psys && p == pa_no) continue;
-
- epa = epsys->particles + p;
- estate.time=cfra;
- if(psys_get_particle_state(scene, eob,epsys,p,&estate,0)){
- VECSUB(vec_to_part, state->co, estate.co);
- distance = VecLength(vec_to_part);
-
- for(i=0, pd = epart->pd; i<2; i++,pd = epart->pd2) {
- if(pd==NULL || pd->forcefield==0) continue;
-
- falloff=effector_falloff(pd,estate.vel,vec_to_part);
-
- strength = pd->f_strength * psys->part->effector_weight[0] * psys->part->effector_weight[pd->forcefield];
-
- if(falloff<=0.0f)
- ; /* don't do anything */
- else
- do_physical_effector(scene, eob, state->co, pd->forcefield,strength,distance,
- falloff,epart->size,pd->f_damp,estate.vel,vec_to_part,
- state->vel,force_field,0, ec->rng, pd->f_noise,charge,pa->size);
- }
- }
- else if(pd && pd->forcefield==PFIELD_HARMONIC && cfra-framestep <= epa->dietime && cfra>epa->dietime){
- /* first step after key release */
- psys_get_particle_state(scene, eob,epsys,p,&estate,1);
- VECADD(vel,vel,estate.vel);
- /* TODO: add rotation handling here too */
- }
- }
-
- if(epsys->lattice){
- end_latt_deform(epsys->lattice);
- epsys->lattice= NULL;
- }
- }
- }
- }
+ pdEndEffectors(&sim->psys->effectors);
+ sim->psys->effectors = pdInitEffectors(sim->scene, sim->ob, sim->psys, sim->psys->part->effector_weights);
+ precalc_guides(sim, sim->psys->effectors);
}
/************************************************/
/* Newtonian physics */
/************************************************/
/* gathers all forces that effect particles and calculates a new state for the particle */
-static void apply_particle_forces(Scene *scene, int pa_no, ParticleData *pa, Object *ob, ParticleSystem *psys, ParticleSettings *part, float timestep, float dfra, float cfra)
+static void apply_particle_forces(ParticleSimulationData *sim, int p, float dfra, float cfra)
{
+ ParticleSettings *part = sim->psys->part;
+ ParticleData *pa = sim->psys->particles + p;
+ EffectedPoint epoint;
ParticleKey states[5], tkey;
- float force[3],tvel[3],dx[4][3],dv[4][3];
- float dtime=dfra*timestep, time, pa_mass=part->mass, fac, fra=psys->cfra;
+ float timestep = psys_get_timestep(sim);
+ float force[3],impulse[3],dx[4][3],dv[4][3];
+ float dtime=dfra*timestep, time, pa_mass=part->mass, fac, fra=sim->psys->cfra;
int i, steps=1;
/* maintain angular velocity */
@@ -2843,10 +2293,11 @@ static void apply_particle_forces(Scene *scene, int pa_no, ParticleData *pa, Obj
for(i=0; i<steps; i++){
force[0]=force[1]=force[2]=0.0;
- tvel[0]=tvel[1]=tvel[2]=0.0;
+ impulse[0]=impulse[1]=impulse[2]=0.0;
/* add effectors */
- if(part->type != PART_HAIR)
- do_effectors(pa_no,pa,states+i,scene, ob, psys,states->co,force,tvel,dfra,fra);
+ pd_point_from_particle(sim, pa, states+i, &epoint);
+ if(part->type != PART_HAIR || part->effector_weights->flag & EFF_WEIGHT_DO_HAIR)
+ pdDoEffectors(sim->psys->effectors, sim->colliders, part->effector_weights, &epoint, force, impulse);
/* calculate air-particle interaction */
if(part->dragfac!=0.0f){
@@ -2865,10 +2316,17 @@ static void apply_particle_forces(Scene *scene, int pa_no, ParticleData *pa, Obj
VecMulf(force,1.0f/pa_mass);
/* add global acceleration (gravitation) */
- VECADD(force,force,part->acc);
+ if(sim->scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY
+ /* normal gravity is too strong for hair so it's disabled by default */
+ && (part->type != PART_HAIR || part->effector_weights->flag & EFF_WEIGHT_DO_HAIR)) {
+ float gravity[3];
+ VECCOPY(gravity, sim->scene->physics_settings.gravity);
+ VecMulf(gravity, part->effector_weights->global_gravity);
+ VECADD(force,force,gravity);
+ }
/* calculate next state */
- VECADD(states[i].vel,states[i].vel,tvel);
+ VECADD(states[i].vel,states[i].vel,impulse);
switch(part->integrator){
case PART_INT_EULER:
@@ -2879,7 +2337,7 @@ static void apply_particle_forces(Scene *scene, int pa_no, ParticleData *pa, Obj
if(i==0){
VECADDFAC(states[1].co,states->co,states->vel,dtime*0.5f);
VECADDFAC(states[1].vel,states->vel,force,dtime*0.5f);
- fra=psys->cfra+0.5f*dfra;
+ fra=sim->psys->cfra+0.5f*dfra;
}
else{
VECADDFAC(pa->state.co,states->co,states[1].vel,dtime);
@@ -2896,7 +2354,7 @@ static void apply_particle_forces(Scene *scene, int pa_no, ParticleData *pa, Obj
VECADDFAC(states[1].co,states->co,dx[0],0.5f);
VECADDFAC(states[1].vel,states->vel,dv[0],0.5f);
- fra=psys->cfra+0.5f*dfra;
+ fra=sim->psys->cfra+0.5f*dfra;
break;
case 1:
VECADDFAC(dx[1],states->vel,dv[0],0.5f);
@@ -2941,6 +2399,8 @@ static void apply_particle_forces(Scene *scene, int pa_no, ParticleData *pa, Obj
if(part->dampfac!=0.0)
VecMulf(pa->state.vel,1.0f-part->dampfac);
+ VECCOPY(pa->state.ave, states->ave);
+
/* finally we do guides */
time=(cfra-pa->time)/pa->lifetime;
CLAMP(time,0.0,1.0);
@@ -2950,7 +2410,7 @@ static void apply_particle_forces(Scene *scene, int pa_no, ParticleData *pa, Obj
tkey.time=pa->state.time;
if(part->type != PART_HAIR) {
- if(do_guide(scene, &tkey, pa_no, time, &psys->effectors)) {
+ if(do_guides(sim->psys->effectors, &tkey, p, time)) {
VECCOPY(pa->state.co,tkey.co);
/* guides don't produce valid velocity */
VECSUB(pa->state.vel,tkey.co,pa->prev_state.co);
@@ -3181,7 +2641,8 @@ void particle_intersect_face(void *userdata, int index, const BVHTreeRay *ray, B
VECCOPY(col->vel,vel);
- col->ob = col->ob_t;
+ col->hit_ob = col->ob;
+ col->hit_md = col->md;
}
}
}
@@ -3198,7 +2659,8 @@ void particle_intersect_face(void *userdata, int index, const BVHTreeRay *ray, B
VECCOPY(col->vel,vel);
- col->ob = col->ob_t;
+ col->hit_ob = col->ob;
+ col->hit_md = col->md;
}
}
}
@@ -3214,15 +2676,16 @@ void particle_intersect_face(void *userdata, int index, const BVHTreeRay *ray, B
/* angular momentum <-> linear momentum and swept sphere - mesh collisions */
/* 1. check for all possible deflectors for closest intersection on particle path */
/* 2. if deflection was found kill the particle or calculate new coordinates */
-static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierData *psmd, ParticleSystem *psys, ParticleSettings *part, ParticleData *pa, int p, float timestep, float dfra, float cfra){
- Object *ob = NULL, *skip_ob = NULL;
- ListBase *lb=&psys->effectors;
- ParticleEffectorCache *ec;
- ParticleKey reaction_state;
+static void deflect_particle(ParticleSimulationData *sim, int p, float dfra, float cfra){
+ Object *ground_ob = NULL;
+ ParticleSettings *part = sim->psys->part;
+ ParticleData *pa = sim->psys->particles + p;
ParticleCollision col;
+ ColliderCache *coll;
BVHTreeRayHit hit;
float ray_dir[3], zerovec[3]={0.0,0.0,0.0};
float radius = ((part->flag & PART_SIZE_DEFL)?pa->size:0.0f), boid_z = 0.0f;
+ float timestep = psys_get_timestep(sim);
int deflections=0, max_deflections=10;
VECCOPY(col.co1, pa->prev_state.co);
@@ -3234,11 +2697,11 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa
BoidParticle *bpa = pa->boid;
radius = pa->size;
boid_z = pa->state.co[2];
- skip_ob = bpa->ground;
+ ground_ob = bpa->ground;
}
/* 10 iterations to catch multiple deflections */
- if(lb->first) while(deflections < max_deflections){
+ if(sim->colliders) while(deflections < max_deflections){
/* 1. */
VECSUB(ray_dir, col.co2, col.co1);
@@ -3250,32 +2713,25 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa
if(hit.dist == 0.0f)
hit.dist = col.ray_len = 0.000001f;
- for(ec=lb->first; ec; ec=ec->next){
- if(ec->type & PSYS_EC_DEFLECT){
- ob= ec->ob;
-
- /* for boids: don't check with current ground object */
- if(ob==skip_ob)
- continue;
-
- /* particles should not collide with emitter at birth */
- if(ob==pob && pa->time < cfra && pa->time >= psys->cfra)
- continue;
+ for(coll = sim->colliders->first; coll; coll=coll->next){
+ /* for boids: don't check with current ground object */
+ if(coll->ob == ground_ob)
+ continue;
- if(part->type!=PART_HAIR)
- where_is_object_time(scene,ob,cfra);
+ /* particles should not collide with emitter at birth */
+ if(coll->ob == sim->ob && pa->time < cfra && pa->time >= sim->psys->cfra)
+ continue;
- col.md = ( CollisionModifierData * ) ( modifiers_findByType ( ec->ob, eModifierType_Collision ) );
- col.ob_t = ob;
+ col.ob = coll->ob;
+ col.md = coll->collmd;
- if(col.md && col.md->bvhtree)
- BLI_bvhtree_ray_cast(col.md->bvhtree, col.co1, ray_dir, radius, &hit, particle_intersect_face, &col);
- }
+ if(col.md && col.md->bvhtree)
+ BLI_bvhtree_ray_cast(col.md->bvhtree, col.co1, ray_dir, radius, &hit, particle_intersect_face, &col);
}
/* 2. */
if(hit.index>=0) {
- PartDeflect *pd = col.ob->pd;
+ PartDeflect *pd = col.hit_ob->pd;
int through = (BLI_frand() < pd->pdef_perm) ? 1 : 0;
float co[3]; /* point of collision */
float vec[3]; /* movement through collision */
@@ -3302,9 +2758,6 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa
/* particle is dead so we don't need to calculate further */
deflections=max_deflections;
-
- /* store for reactors */
- copy_particle_key(&reaction_state, &pa->state, 0);
}
else {
float nor_vec[3], tan_vec[3], tan_vel[3], vel[3];
@@ -3400,9 +2853,9 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa
}
/* store state for reactors */
- VECCOPY(reaction_state.co, co);
- VecLerpf(reaction_state.vel, pa->prev_state.vel, pa->state.vel, dt);
- QuatInterpol(reaction_state.rot, pa->prev_state.rot, pa->state.rot, dt);
+ //VECCOPY(reaction_state.co, co);
+ //VecLerpf(reaction_state.vel, pa->prev_state.vel, pa->state.vel, dt);
+ //QuatInterpol(reaction_state.rot, pa->prev_state.rot, pa->state.rot, dt);
/* set coordinates for next iteration */
VECCOPY(col.co1, co);
@@ -3424,8 +2877,8 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa
}
deflections++;
- reaction_state.time = cfra - (1.0f - dt) * dfra;
- push_reaction(col.ob, psys, p, PART_EVENT_COLLIDE, &reaction_state);
+ //reaction_state.time = cfra - (1.0f - dt) * dfra;
+ //push_reaction(col.ob, psys, p, PART_EVENT_COLLIDE, &reaction_state);
}
else
return;
@@ -3435,43 +2888,44 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa
/* Hair */
/************************************************/
/* check if path cache or children need updating and do it if needed */
-static void psys_update_path_cache(Scene *scene, Object *ob, ParticleSystemModifierData *psmd, ParticleSystem *psys, float cfra)
+static void psys_update_path_cache(ParticleSimulationData *sim, float cfra)
{
- ParticleSettings *part=psys->part;
- ParticleEditSettings *pset=&scene->toolsettings->particle;
- int distr=0,alloc=0,skip=0;
+ ParticleSystem *psys = sim->psys;
+ ParticleSettings *part = psys->part;
+ ParticleEditSettings *pset = &sim->scene->toolsettings->particle;
+ int distr=0, alloc=0, skip=0;
- if((psys->part->childtype && psys->totchild != get_psys_tot_child(scene, psys)) || psys->recalc&PSYS_RECALC_RESET)
+ if((psys->part->childtype && psys->totchild != get_psys_tot_child(sim->scene, psys)) || psys->recalc&PSYS_RECALC_RESET)
alloc=1;
- if(alloc || psys->recalc&PSYS_RECALC_CHILD || (psys->vgroup[PSYS_VG_DENSITY] && (ob && ob->mode & OB_MODE_WEIGHT_PAINT)))
+ if(alloc || psys->recalc&PSYS_RECALC_CHILD || (psys->vgroup[PSYS_VG_DENSITY] && (sim->ob && sim->ob->mode & OB_MODE_WEIGHT_PAINT)))
distr=1;
if(distr){
if(alloc)
- realloc_particles(ob,psys,psys->totpart);
+ realloc_particles(sim, sim->psys->totpart);
- if(get_psys_tot_child(scene, psys)) {
+ if(get_psys_tot_child(sim->scene, psys)) {
/* don't generate children while computing the hair keys */
if(!(psys->part->type == PART_HAIR) || (psys->flag & PSYS_HAIR_DONE)) {
- distribute_particles(scene, ob, psys, PART_FROM_CHILD);
+ distribute_particles(sim, PART_FROM_CHILD);
if(part->from!=PART_FROM_PARTICLE && part->childtype==PART_CHILD_FACES && part->parents!=0.0)
- psys_find_parents(ob,psmd,psys);
+ psys_find_parents(sim);
}
}
}
if((part->type==PART_HAIR || psys->flag&PSYS_KEYED || psys->pointcache->flag & PTCACHE_BAKED)==0)
skip = 1; /* only hair, keyed and baked stuff can have paths */
- else if(part->ren_as != PART_DRAW_PATH)
+ else if(part->ren_as != PART_DRAW_PATH && !(part->type==PART_HAIR && ELEM(part->ren_as, PART_DRAW_OB, PART_DRAW_GR)))
skip = 1; /* particle visualization must be set as path */
else if(!psys->renderdata) {
if(part->draw_as != PART_DRAW_REND)
skip = 1; /* draw visualization */
else if(psys->pointcache->flag & PTCACHE_BAKING)
skip = 1; /* no need to cache paths while baking dynamics */
- else if(psys_in_edit_mode(scene, psys)) {
+ else if(psys_in_edit_mode(sim->scene, psys)) {
if((pset->flag & PE_DRAW_PART)==0)
skip = 1;
else if(part->childtype==0 && (psys->flag & PSYS_HAIR_DYNAMICS && psys->pointcache->flag & PTCACHE_BAKED)==0)
@@ -3480,7 +2934,7 @@ static void psys_update_path_cache(Scene *scene, Object *ob, ParticleSystemModif
}
if(!skip) {
- psys_cache_paths(scene, ob, psys, cfra);
+ psys_cache_paths(sim, cfra);
/* for render, child particle paths are computed on the fly */
if(part->childtype) {
@@ -3490,15 +2944,16 @@ static void psys_update_path_cache(Scene *scene, Object *ob, ParticleSystemModif
skip = 1;
if(!skip)
- psys_cache_child_paths(scene, ob, psys, cfra, 0);
+ psys_cache_child_paths(sim, cfra, 0);
}
}
else if(psys->pathcache)
psys_free_path_cache(psys, NULL);
}
-static void do_hair_dynamics(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd)
+static void do_hair_dynamics(ParticleSimulationData *sim)
{
+ ParticleSystem *psys = sim->psys;
DerivedMesh *dm = psys->hair_in_dm;
MVert *mvert = NULL;
MEdge *medge = NULL;
@@ -3521,7 +2976,8 @@ static void do_hair_dynamics(Scene *scene, Object *ob, ParticleSystem *psys, Par
LOOP_PARTICLES
totpoint += pa->totkey;
- totedge = totpoint - psys->totpart;
+ totedge = totpoint;
+ totpoint += psys->totpart;
if(dm && (totpoint != dm->getNumVerts(dm) || totedge != dm->getNumEdges(dm))) {
dm->release(dm);
@@ -3540,14 +2996,39 @@ static void do_hair_dynamics(Scene *scene, Object *ob, ParticleSystem *psys, Par
psys->clmd->sim_parms->vgroup_mass = 1;
/* make vgroup for pin roots etc.. */
- psys->particles->hair_index = 0;
+ psys->particles->hair_index = 1;
LOOP_PARTICLES {
if(p)
- pa->hair_index = (pa-1)->hair_index + (pa-1)->totkey;
+ pa->hair_index = (pa-1)->hair_index + (pa-1)->totkey + 1;
- psys_mat_hair_to_object(ob, psmd->dm, psys->part->from, pa, hairmat);
+ psys_mat_hair_to_object(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat);
for(k=0, key=pa->hair; k<pa->totkey; k++,key++) {
+
+ /* create fake root before actual root to resist bending */
+ if(k==0) {
+ float temp[3];
+ VECSUB(temp, key->co, (key+1)->co);
+ VECCOPY(mvert->co, key->co);
+ VECADD(mvert->co, mvert->co, temp);
+ Mat4MulVecfl(hairmat, mvert->co);
+ mvert++;
+
+ medge->v1 = pa->hair_index - 1;
+ medge->v2 = pa->hair_index;
+ medge++;
+
+ if(dvert) {
+ if(!dvert->totweight) {
+ dvert->dw = MEM_callocN (sizeof(MDeformWeight), "deformWeight");
+ dvert->totweight = 1;
+ }
+
+ dvert->dw->weight = 1.0f;
+ dvert++;
+ }
+ }
+
VECCOPY(mvert->co, key->co);
Mat4MulVecfl(hairmat, mvert->co);
mvert++;
@@ -3576,19 +3057,23 @@ static void do_hair_dynamics(Scene *scene, Object *ob, ParticleSystem *psys, Par
psys->hair_out_dm->release(psys->hair_out_dm);
psys->clmd->point_cache = psys->pointcache;
+ psys->clmd->sim_parms->effector_weights = psys->part->effector_weights;
+
+ psys->hair_out_dm = clothModifier_do(psys->clmd, sim->scene, sim->ob, dm, 0, 0);
- psys->hair_out_dm = clothModifier_do(psys->clmd, scene, ob, dm, 0, 0);
+ psys->clmd->sim_parms->effector_weights = NULL;
}
-static void hair_step(Scene *scene, Object *ob, ParticleSystemModifierData *psmd, ParticleSystem *psys, float cfra)
+static void hair_step(ParticleSimulationData *sim, float cfra)
{
- ParticleSettings *part = psys->part;
+ ParticleSystem *psys = sim->psys;
+/* ParticleSettings *part = psys->part; */
PARTICLE_P;
float disp = (float)get_current_display_percentage(psys)/100.0f;
BLI_srandom(psys->seed);
LOOP_PARTICLES {
- if(BLI_frand() > disp)
+ if(PSYS_FRAND(p) > disp)
pa->flag |= PARS_NO_DISP;
else
pa->flag &= ~PARS_NO_DISP;
@@ -3596,36 +3081,33 @@ static void hair_step(Scene *scene, Object *ob, ParticleSystemModifierData *psmd
if(psys->recalc & PSYS_RECALC_RESET) {
/* need this for changing subsurf levels */
- psys_calc_dmcache(ob, psmd->dm, psys);
+ psys_calc_dmcache(sim->ob, sim->psmd->dm, psys);
if(psys->clmd)
- cloth_free_modifier(ob, psys->clmd);
+ cloth_free_modifier(sim->ob, psys->clmd);
}
- if(psys->effectors.first)
- psys_end_effectors(psys);
-
/* dynamics with cloth simulation */
if(psys->part->type==PART_HAIR && psys->flag & PSYS_HAIR_DYNAMICS)
- do_hair_dynamics(scene, ob, psys, psmd);
+ do_hair_dynamics(sim);
- psys_init_effectors(scene, ob, part->eff_group, psys);
- if(psys->effectors.first)
- precalc_effectors(scene, ob,psys,psmd,cfra);
+ psys_update_effectors(sim);
- psys_update_path_cache(scene, ob,psmd,psys,cfra);
+ psys_update_path_cache(sim, cfra);
psys->flag |= PSYS_HAIR_UPDATED;
}
-static void save_hair(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd, float cfra){
+static void save_hair(ParticleSimulationData *sim, float cfra){
+ Object *ob = sim->ob;
+ ParticleSystem *psys = sim->psys;
HairKey *key, *root;
PARTICLE_P;
int totpart;
- Mat4Invert(ob->imat,ob->obmat);
+ Mat4Invert(ob->imat, ob->obmat);
- psys->lattice= psys_get_lattice(scene, ob, psys);
+ psys->lattice= psys_get_lattice(sim);
if(psys->totpart==0) return;
@@ -3648,7 +3130,7 @@ static void save_hair(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSy
if(pa->totkey) {
VECSUB(key->co, key->co, root->co);
- psys_vec_rot_to_face(psmd->dm, pa, key->co);
+ psys_vec_rot_to_face(sim->psmd->dm, pa, key->co);
}
key->time = pa->state.time;
@@ -3666,13 +3148,13 @@ static void save_hair(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSy
/* System Core */
/************************************************/
/* unbaked particles are calculated dynamically */
-static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd, float cfra,
- float *vg_vel, float *vg_tan, float *vg_rot, float *vg_size)
+static void dynamics_step(ParticleSimulationData *sim, float cfra)
{
+ ParticleSystem *psys = sim->psys;
ParticleSettings *part=psys->part;
KDTree *tree=0;
- IpoCurve *icu_esize= NULL; //=find_ipocurve(part->ipo,PART_EMIT_SIZE); // XXX old animation system
- Material *ma=give_current_material(ob,part->omat);
+ //IpoCurve *icu_esize=find_ipocurve(part->ipo,PART_EMIT_SIZE); // XXX old animation system
+/* Material *ma=give_current_material(sim->ob, part->omat); */
BoidBrainData bbd;
PARTICLE_P;
float timestep;
@@ -3688,7 +3170,7 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
totpart=psys->totpart;
- timestep=psys_get_timestep(part);
+ timestep = psys_get_timestep(sim);
dtime= dfra*timestep;
ctime= cfra*timestep;
ipotime= cfra; // XXX old animation system
@@ -3702,12 +3184,10 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
if(dfra<0.0){
float *vg_size=0;
- if(part->type==PART_REACTOR)
- vg_size=psys_cache_vgroup(psmd->dm,psys,PSYS_VG_SIZE);
-
- LOOP_PARTICLES {
- if(pa->flag & PARS_UNEXIST) continue;
+ //if(part->type==PART_REACTOR)
+ // vg_size=psys_cache_vgroup(sim->psmd->dm,psys,PSYS_VG_SIZE);
+ LOOP_EXISTING_PARTICLES {
/* set correct ipo timing */
#if 0 // XXX old animation system
if((part->flag&PART_ABS_TIME)==0 && part->ipo){
@@ -3716,25 +3196,18 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
execute_ipo((ID *)part, part->ipo);
}
#endif // XXX old animation system
- pa->size=psys_get_size(ob,ma,psmd,icu_esize,psys,part,pa,vg_size);
+ pa->size = part->size;
+ if(part->randsize > 0.0)
+ pa->size *= 1.0f - part->randsize * PSYS_FRAND(p + 1);
- reset_particle(scene, pa,psys,psmd,ob,dtime,cfra,vg_vel,vg_tan,vg_rot);
+ reset_particle(sim, pa, dtime, cfra);
- if(cfra>pa->time && part->flag & PART_LOOP && part->type!=PART_HAIR){
- pa->loop=(short)((cfra-pa->time)/pa->lifetime);
- pa->alive=PARS_UNBORN;
+ if(cfra > pa->time && part->flag & PART_LOOP && part->type!=PART_HAIR){
+ pa->loop = (short)((cfra-pa->time)/pa->lifetime);
+ pa->alive = PARS_UNBORN;
}
else{
pa->loop = 0;
- if(cfra <= pa->time)
- pa->alive = PARS_UNBORN;
- /* without dynamics the state is allways known so no need to kill */
- else if(ELEM(part->phystype, PART_PHYS_NO, PART_PHYS_KEYED)){
- if(cfra < pa->dietime)
- pa->alive = PARS_ALIVE;
- }
- else
- pa->alive = PARS_KILLED;
}
}
@@ -3743,40 +3216,32 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
}
else{
BLI_srandom(31415926 + (int)cfra + psys->seed);
-
- /* update effectors */
- if(psys->effectors.first)
- psys_end_effectors(psys);
- psys_init_effectors(scene, ob, part->eff_group, psys);
-
- if(psys->effectors.first)
- precalc_effectors(scene, ob,psys,psmd,cfra);
+ psys_update_effectors(sim);
+
+ if(part->type != PART_HAIR)
+ sim->colliders = get_collider_cache(sim->scene, NULL);
if(part->phystype==PART_PHYS_BOIDS){
ParticleTarget *pt = psys->targets.first;
- bbd.scene = scene;
- bbd.ob = ob;
- bbd.psys = psys;
+ bbd.sim = sim;
bbd.part = part;
bbd.cfra = cfra;
bbd.dfra = dfra;
bbd.timestep = timestep;
- update_particle_tree(psys);
+ psys_update_particle_tree(psys, cfra);
boids_precalc_rules(part, cfra);
for(; pt; pt=pt->next) {
if(pt->ob)
- update_particle_tree(BLI_findlink(&pt->ob->particlesystem, pt->psys-1));
+ psys_update_particle_tree(BLI_findlink(&pt->ob->particlesystem, pt->psys-1), cfra);
}
}
/* main loop: calculate physics for all particles */
- LOOP_PARTICLES {
- if(pa->flag & (PARS_UNEXIST+PARS_NO_DISP)) continue;
-
+ LOOP_SHOWN_PARTICLES {
copy_particle_key(&pa->prev_state,&pa->state,1);
/* set correct ipo timing */
@@ -3787,23 +3252,19 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
execute_ipo((ID *)part, part->ipo);
}
#endif // XXX old animation system
- pa->size=psys_get_size(ob,ma,psmd,icu_esize,psys,part,pa,vg_size);
+ //update_particle_settings(psys, part, &tpart, pa);
- /* reactions can change birth time so they need to be checked first */
- if(psys->reactevents.first && ELEM(pa->alive,PARS_DEAD,PARS_KILLED)==0)
- react_to_events(psys,p);
+ pa->size = part->size;
+ if(part->randsize > 0.0)
+ pa->size *= 1.0f - part->randsize * PSYS_FRAND(p + 1);
+
+ ///* reactions can change birth time so they need to be checked first */
+ //if(psys->reactevents.first && ELEM(pa->alive,PARS_DEAD,PARS_KILLED)==0)
+ // react_to_events(psys,p);
birthtime = pa->time + pa->loop * pa->lifetime;
dietime = birthtime + pa->lifetime;
- /* allways reset particles to emitter before birth */
- if(pa->alive==PARS_UNBORN
- || pa->alive==PARS_KILLED
- || ELEM(part->phystype,PART_PHYS_NO,PART_PHYS_KEYED)
- || birthtime >= psys->cfra){
- reset_particle(scene, pa,psys,psmd,ob,dtime,cfra,vg_vel,vg_tan,vg_rot);
- }
-
pa_dfra = dfra;
pa_dtime = dtime;
@@ -3816,6 +3277,7 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
}
else if(birthtime <= cfra && birthtime >= psys->cfra){
/* particle is born some time between this and last step*/
+ reset_particle(sim, pa, dtime, cfra);
pa->alive = PARS_ALIVE;
pa_dfra = cfra - birthtime;
pa_dtime = pa_dfra*timestep;
@@ -3824,18 +3286,22 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
/* nothing to be done when particle is dead */
}
+ /* only reset unborn particles if they're shown */
+ if(pa->alive==PARS_UNBORN && part->flag & PART_UNBORN)
+ reset_particle(sim, pa, dtime, cfra);
if(dfra>0.0 && ELEM(pa->alive,PARS_ALIVE,PARS_DYING)){
switch(part->phystype){
case PART_PHYS_NEWTON:
/* do global forces & effectors */
- apply_particle_forces(scene, p, pa, ob, psys, part, timestep,pa_dfra,cfra);
+ apply_particle_forces(sim, p, pa_dfra, cfra);
/* deflection */
- deflect_particle(scene, ob,psmd,psys,part,pa,p,timestep,pa_dfra,cfra);
+ if(sim->colliders)
+ deflect_particle(sim, p, pa_dfra, cfra);
/* rotations */
- rotate_particle(part,pa,pa_dfra,timestep);
+ rotate_particle(part, pa, pa_dfra, timestep);
break;
case PART_PHYS_BOIDS:
{
@@ -3845,18 +3311,19 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
boid_body(&bbd, pa);
/* deflection */
- deflect_particle(scene,ob,psmd,psys,part,pa,p,timestep,pa_dfra,cfra);
+ if(sim->colliders)
+ deflect_particle(sim, p, pa_dfra, cfra);
}
break;
}
}
if(pa->alive == PARS_DYING){
- push_reaction(ob,psys,p,PART_EVENT_DEATH,&pa->state);
+ //push_reaction(ob,psys,p,PART_EVENT_DEATH,&pa->state);
if(part->flag & PART_LOOP && part->type!=PART_HAIR){
pa->loop++;
- reset_particle(scene, pa,psys,psmd,ob,0.0,cfra,vg_vel,vg_tan,vg_rot);
+ reset_particle(sim, pa, 0.0, cfra);
pa->alive=PARS_ALIVE;
}
else{
@@ -3867,40 +3334,33 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
else
pa->state.time=cfra;
- push_reaction(ob,psys,p,PART_EVENT_NEAR,&pa->state);
+ //push_reaction(ob,psys,p,PART_EVENT_NEAR,&pa->state);
}
}
+
+ free_collider_cache(&sim->colliders);
}
- if(psys->reactevents.first)
- BLI_freelistN(&psys->reactevents);
if(tree)
BLI_kdtree_free(tree);
}
/* updates cached particles' alive & other flags etc..*/
-static void cached_step(Scene *scene, Object *ob, ParticleSystemModifierData *psmd, ParticleSystem *psys, float cfra)
+static void cached_step(ParticleSimulationData *sim, float cfra)
{
- ParticleSettings *part=psys->part;
- ParticleKey state;
- IpoCurve *icu_esize= NULL; //=find_ipocurve(part->ipo,PART_EMIT_SIZE); // XXX old animation system
- Material *ma=give_current_material(ob,part->omat);
+ ParticleSystem *psys = sim->psys;
+ ParticleSettings *part = psys->part;
+ //IpoCurve *icu_esize = NULL; //=find_ipocurve(part->ipo,PART_EMIT_SIZE); // XXX old animation system
+/* Material *ma = give_current_material(sim->ob,part->omat); */
PARTICLE_P;
float disp, birthtime, dietime, *vg_size= NULL; // XXX ipotime=cfra
BLI_srandom(psys->seed);
if(part->from!=PART_FROM_PARTICLE)
- vg_size= psys_cache_vgroup(psmd->dm,psys,PSYS_VG_SIZE);
+ vg_size= psys_cache_vgroup(sim->psmd->dm,psys,PSYS_VG_SIZE);
- if(psys->effectors.first)
- psys_end_effectors(psys);
-
- //if(part->flag & (PART_BAKED_GUIDES+PART_BAKED_DEATHS)){
- psys_init_effectors(scene, ob, part->eff_group, psys);
- if(psys->effectors.first)
- precalc_effectors(scene, ob,psys,psmd,cfra);
- //}
+ psys_update_effectors(sim);
disp= (float)get_current_display_percentage(psys)/100.0f;
@@ -3912,9 +3372,13 @@ static void cached_step(Scene *scene, Object *ob, ParticleSystemModifierData *ps
execute_ipo((ID *)part, part->ipo);
}
#endif // XXX old animation system
- pa->size= psys_get_size(ob,ma,psmd,icu_esize,psys,part,pa,vg_size);
+ //update_settings_with_particle(psys, part, pa);
+
+ pa->size = part->size;
+ if(part->randsize > 0.0)
+ pa->size *= 1.0f - part->randsize * PSYS_FRAND(p + 1);
- psys->lattice= psys_get_lattice(scene, ob, psys);
+ psys->lattice= psys_get_lattice(sim);
if(part->flag & PART_LOOP && part->type!=PART_HAIR)
pa->loop = (short)((cfra - pa->time) / pa->lifetime);
@@ -3925,25 +3389,16 @@ 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) {
- pa->alive = pa->time==cfra ? PARS_ALIVE : PARS_UNBORN;
- if((psys->pointcache->flag & PTCACHE_EXTERNAL) == 0)
- reset_particle(scene, pa, psys, psmd, ob, 0.0f, cfra, NULL, NULL, NULL);
+ if(pa->time > cfra) {
+ pa->alive = PARS_UNBORN;
+ if(part->flag & PART_UNBORN && (psys->pointcache->flag & PTCACHE_EXTERNAL) == 0)
+ reset_particle(sim, pa, 0.0f, cfra);
}
else if(dietime <= cfra){
- if(dietime > psys->cfra){
- state.time = dietime;
- psys_get_particle_state(scene, ob,psys,p,&state,1);
- push_reaction(ob,psys,p,PART_EVENT_DEATH,&state);
- }
pa->alive = PARS_DEAD;
}
else{
pa->alive = PARS_ALIVE;
- state.time = cfra;
- psys_get_particle_state(scene, ob,psys,p,&state,1);
- state.time = cfra;
- push_reaction(ob,psys,p,PART_EVENT_NEAR,&state);
}
if(psys->lattice){
@@ -3951,43 +3406,41 @@ static void cached_step(Scene *scene, Object *ob, ParticleSystemModifierData *ps
psys->lattice= NULL;
}
- if(BLI_frand() > disp)
+ if(PSYS_FRAND(p) > disp)
pa->flag |= PARS_NO_DISP;
else
pa->flag &= ~PARS_NO_DISP;
}
/* make sure that children are up to date */
- if(psys->part->childtype && psys->totchild != get_psys_tot_child(scene, psys)) {
- realloc_particles(ob, psys, psys->totpart);
- distribute_particles(scene, ob, psys, PART_FROM_CHILD);
+ if(psys->part->childtype && psys->totchild != get_psys_tot_child(sim->scene, psys)) {
+ realloc_particles(sim, psys->totpart);
+ distribute_particles(sim, PART_FROM_CHILD);
}
- psys_update_path_cache(scene, ob,psmd,psys,cfra);
+ psys_update_path_cache(sim, cfra);
if(vg_size)
MEM_freeN(vg_size);
}
-static void psys_changed_type(Object *ob, ParticleSystem *psys)
+static void psys_changed_type(ParticleSimulationData *sim)
{
- ParticleSettings *part;
+ ParticleSettings *part = sim->psys->part;
PTCacheID pid;
- part= psys->part;
-
- BKE_ptcache_id_from_particles(&pid, ob, psys);
+ BKE_ptcache_id_from_particles(&pid, sim->ob, sim->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)
- part->from = PART_FROM_FACE;
+ //if(part->type != PART_REACTOR)
+ part->from = PART_FROM_FACE;
if(part->distr == PART_DISTR_GRID && part->from != PART_FROM_VERT)
part->distr = PART_DISTR_JIT;
}
if(part->phystype != PART_PHYS_KEYED)
- psys->flag &= ~PSYS_KEYED;
+ sim->psys->flag &= ~PSYS_KEYED;
if(part->type == PART_HAIR) {
if(ELEM4(part->ren_as, PART_DRAW_NOT, PART_DRAW_PATH, PART_DRAW_OB, PART_DRAW_GR)==0)
@@ -4002,13 +3455,13 @@ static void psys_changed_type(Object *ob, ParticleSystem *psys)
BKE_ptcache_id_clear(&pid, PTCACHE_CLEAR_ALL, 0);
}
else {
- free_hair(ob, psys, 1);
+ free_hair(sim->ob, sim->psys, 1);
CLAMP(part->path_start, 0.0f, MAX2(100.0f, part->end + part->lifetime));
CLAMP(part->path_end, 0.0f, MAX2(100.0f, part->end + part->lifetime));
}
- psys_reset(psys, PSYS_RESET_ALL);
+ psys_reset(sim->psys, PSYS_RESET_ALL);
}
void psys_check_boid_data(ParticleSystem *psys)
{
@@ -4034,24 +3487,24 @@ void psys_check_boid_data(ParticleSystem *psys)
pa->boid = NULL;
}
}
-static void psys_changed_physics(Object *ob, ParticleSystem *psys)
+static void psys_changed_physics(ParticleSimulationData *sim)
{
- ParticleSettings *part = psys->part;
+ ParticleSettings *part = sim->psys->part;
if(ELEM(part->phystype, PART_PHYS_NO, PART_PHYS_KEYED)) {
PTCacheID pid;
- BKE_ptcache_id_from_particles(&pid, ob, psys);
+ BKE_ptcache_id_from_particles(&pid, sim->ob, sim->psys);
BKE_ptcache_id_clear(&pid, PTCACHE_CLEAR_ALL, 0);
}
else {
- free_keyed_keys(psys);
- psys->flag &= ~PSYS_KEYED;
+ free_keyed_keys(sim->psys);
+ sim->psys->flag &= ~PSYS_KEYED;
}
if(part->phystype == PART_PHYS_BOIDS && part->boids == NULL) {
BoidState *state;
- psys_check_boid_data(psys);
+ psys_check_boid_data(sim->psys);
part->boids = MEM_callocN(sizeof(BoidSettings), "Boid Settings");
boid_default_settings(part->boids);
@@ -4066,8 +3519,9 @@ static void psys_changed_physics(Object *ob, ParticleSystem *psys)
BLI_addtail(&part->boids->states, state);
}
}
-static void particles_fluid_step(Scene *scene, Object *ob, ParticleSystem *psys, int cfra)
+static void particles_fluid_step(ParticleSimulationData *sim, int cfra)
{
+ ParticleSystem *psys = sim->psys;
if(psys->particles){
MEM_freeN(psys->particles);
psys->particles = 0;
@@ -4077,7 +3531,7 @@ static void particles_fluid_step(Scene *scene, Object *ob, ParticleSystem *psys,
/* fluid sim particle import handling, actual loading of particles from file */
#ifndef DISABLE_ELBEEM
{
- FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim);
+ FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(sim->ob, eModifierType_Fluidsim);
if( fluidmd && fluidmd->fss) {
FluidsimSettings *fss= fluidmd->fss;
@@ -4087,7 +3541,7 @@ static void particles_fluid_step(Scene *scene, Object *ob, ParticleSystem *psys,
char *suffix2 = ".gz";
char filename[256];
char debugStrBuffer[256];
- int curFrame = scene->r.cfra -1; // warning - sync with derived mesh fsmesh loading
+ int curFrame = sim->scene->r.cfra -1; // warning - sync with derived mesh fsmesh loading
int p, j, numFileParts, totpart;
int readMask, activeParts = 0, fileParts = 0;
gzFile gzf;
@@ -4115,11 +3569,11 @@ static void particles_fluid_step(Scene *scene, Object *ob, ParticleSystem *psys,
part->totpart= totpart;
part->sta=part->end = 1.0f;
- part->lifetime = scene->r.efra + 1;
+ part->lifetime = sim->scene->r.efra + 1;
/* initialize particles */
- realloc_particles(ob, psys, part->totpart);
- initialize_all_particles(ob, psys, 0);
+ realloc_particles(sim, part->totpart);
+ initialize_all_particles(sim);
// set up reading mask
readMask = fss->typeFlags;
@@ -4175,10 +3629,11 @@ static void particles_fluid_step(Scene *scene, Object *ob, ParticleSystem *psys,
/* Calculates the next state for all particles of the system */
/* In particles code most fra-ending are frames, time-ending are fra*timestep (seconds)*/
-static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd, float cfra)
+static void system_step(ParticleSimulationData *sim, float cfra)
{
- ParticleSettings *part;
- PointCache *cache;
+ ParticleSystem *psys = sim->psys;
+ ParticleSettings *part = psys->part;
+ PointCache *cache = psys->pointcache;
PTCacheID pid;
PARTICLE_P;
int totpart, oldtotpart, totchild, oldtotchild;
@@ -4186,20 +3641,17 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
int init= 0, distr= 0, alloc= 0, usecache= 0, only_children_changed= 0;
int framenr, framedelta, startframe, endframe;
- part= psys->part;
- cache= psys->pointcache;
-
- framenr= (int)scene->r.cfra;
+ framenr= (int)sim->scene->r.cfra;
framedelta= framenr - cache->simframe;
/* set suitable cache range automatically */
if((cache->flag & (PTCACHE_BAKING|PTCACHE_BAKED))==0 && !(psys->flag & PSYS_HAIR_DYNAMICS))
- psys_get_pointcache_start_end(scene, psys, &cache->startframe, &cache->endframe);
+ psys_get_pointcache_start_end(sim->scene, sim->psys, &cache->startframe, &cache->endframe);
- BKE_ptcache_id_from_particles(&pid, ob, psys);
- BKE_ptcache_id_time(&pid, scene, 0.0f, &startframe, &endframe, NULL);
+ BKE_ptcache_id_from_particles(&pid, sim->ob, psys);
+ BKE_ptcache_id_time(&pid, sim->scene, 0.0f, &startframe, &endframe, NULL);
- psys_clear_temp_pointcache(psys);
+ psys_clear_temp_pointcache(sim->psys);
/* update ipo's */
#if 0 // XXX old animation system
@@ -4211,14 +3663,14 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
/* hair if it's already done is handled separate */
if(part->type == PART_HAIR && (psys->flag & PSYS_HAIR_DONE)) {
- hair_step(scene, ob, psmd, psys, cfra);
+ hair_step(sim, cfra);
psys->cfra = cfra;
psys->recalc = 0;
return;
}
/* fluid is also handled separate */
else if(part->type == PART_FLUID) {
- particles_fluid_step(scene, ob, psys, framenr);
+ particles_fluid_step(sim, framenr);
psys->cfra = cfra;
psys->recalc = 0;
return;
@@ -4243,6 +3695,13 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
else if(framenr > endframe) {
framenr= endframe;
}
+
+ if(framenr == startframe) {
+ BKE_ptcache_id_reset(sim->scene, &pid, PTCACHE_RESET_OUTDATED);
+ cache->simframe= framenr;
+ cache->flag |= PTCACHE_SIMULATION_VALID;
+ cache->flag &= ~PTCACHE_REDO_NEEDED;
+ }
}
/* verify if we need to reallocate */
@@ -4255,7 +3714,7 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
totpart = part->grid_res*part->grid_res*part->grid_res;
else
totpart = psys->part->totpart;
- totchild = get_psys_tot_child(scene, psys);
+ totchild = get_psys_tot_child(sim->scene, psys);
if(oldtotpart != totpart || oldtotchild != totchild) {
only_children_changed = (oldtotpart == totpart);
@@ -4272,45 +3731,45 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
if(init) {
if(distr) {
if(alloc) {
- realloc_particles(ob, psys, totpart);
+ realloc_particles(sim, totpart);
- if(usecache && !only_children_changed) {
+ if(oldtotpart && usecache && !only_children_changed) {
BKE_ptcache_id_clear(&pid, PTCACHE_CLEAR_ALL, 0);
- BKE_ptcache_id_from_particles(&pid, ob, psys);
+ BKE_ptcache_id_from_particles(&pid, sim->ob, psys);
}
}
if(!only_children_changed)
- distribute_particles(scene, ob, psys, part->from);
+ distribute_particles(sim, part->from);
if((psys->part->type == PART_HAIR) && !(psys->flag & PSYS_HAIR_DONE))
/* don't generate children while growing hair - waste of time */
psys_free_children(psys);
- else if(get_psys_tot_child(scene, psys))
- distribute_particles(scene, ob, psys, PART_FROM_CHILD);
+ else if(get_psys_tot_child(sim->scene, psys))
+ distribute_particles(sim, PART_FROM_CHILD);
}
if(!only_children_changed) {
free_keyed_keys(psys);
- initialize_all_particles(ob, psys, psmd);
+ initialize_all_particles(sim);
if(alloc) {
- reset_all_particles(scene, ob, psys, psmd, 0.0, cfra, oldtotpart);
+ reset_all_particles(sim, 0.0, cfra, oldtotpart);
}
}
/* flag for possible explode modifiers after this system */
- psmd->flag |= eParticleSystemFlag_Pars;
+ sim->psmd->flag |= eParticleSystemFlag_Pars;
}
/* try to read from the cache */
if(usecache) {
- int result = BKE_ptcache_read_cache(&pid, cfra, scene->r.frs_sec);
+ int result = BKE_ptcache_read_cache(&pid, cfra, sim->scene->r.frs_sec);
if(result == PTCACHE_READ_EXACT || result == PTCACHE_READ_INTERPOLATED) {
- cached_step(scene, ob, psmd, psys, cfra);
+ cached_step(sim, cfra);
psys->cfra=cfra;
psys->recalc = 0;
@@ -4334,7 +3793,7 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
pa->alive = PARS_ALIVE;
}
}
- else if(ob->id.lib || (cache->flag & PTCACHE_BAKED)) {
+ else if(cfra != startframe && (sim->ob->id.lib || (cache->flag & PTCACHE_BAKED))) {
psys_reset(psys, PSYS_RESET_CACHE_MISS);
psys->cfra=cfra;
psys->recalc = 0;
@@ -4352,14 +3811,14 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
BKE_ptcache_write_cache(&pid, startframe);
if(part->phystype==PART_PHYS_KEYED)
- psys_count_keyed_targets(ob,psys);
+ psys_count_keyed_targets(sim);
/* initialize vertex groups */
if(part->from!=PART_FROM_PARTICLE) {
- vg_vel= psys_cache_vgroup(psmd->dm,psys,PSYS_VG_VEL);
- vg_tan= psys_cache_vgroup(psmd->dm,psys,PSYS_VG_TAN);
- vg_rot= psys_cache_vgroup(psmd->dm,psys,PSYS_VG_ROT);
- vg_size= psys_cache_vgroup(psmd->dm,psys,PSYS_VG_SIZE);
+ vg_vel= psys_cache_vgroup(sim->psmd->dm,psys,PSYS_VG_VEL);
+ vg_tan= psys_cache_vgroup(sim->psmd->dm,psys,PSYS_VG_TAN);
+ vg_rot= psys_cache_vgroup(sim->psmd->dm,psys,PSYS_VG_ROT);
+ vg_size= psys_cache_vgroup(sim->psmd->dm,psys,PSYS_VG_SIZE);
}
/* set particles to be not calculated TODO: can't work with pointcache */
@@ -4367,7 +3826,7 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
BLI_srandom(psys->seed);
LOOP_PARTICLES {
- if(BLI_frand() > disp)
+ if(PSYS_FRAND(p) > disp)
pa->flag |= PARS_NO_DISP;
else
pa->flag &= ~PARS_NO_DISP;
@@ -4383,7 +3842,7 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
for(dframe=-totframesback; dframe<=0; dframe++) {
/* ok now we're all set so let's go */
- dynamics_step(scene, ob, psys, psmd, cfra+dframe, vg_vel, vg_tan, vg_rot, vg_size);
+ dynamics_step(sim, cfra+dframe);
psys->cfra = cfra+dframe;
}
}
@@ -4400,8 +3859,8 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
/* for keyed particles the path is allways known so it can be drawn */
if(part->phystype==PART_PHYS_KEYED) {
- set_keyed_keys(scene, ob, psys);
- psys_update_path_cache(scene, ob, psmd, psys,(int)cfra);
+ set_keyed_keys(sim);
+ psys_update_path_cache(sim,(int)cfra);
}
else if(psys->pathcache)
psys_free_path_cache(psys, NULL);
@@ -4431,30 +3890,33 @@ static int hair_needs_recalc(ParticleSystem *psys)
/* main particle update call, checks that things are ok on the large scale before actual particle calculations */
void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
{
- ParticleSystemModifierData *psmd;
+ ParticleSimulationData sim = {scene, ob, psys, NULL, NULL};
float cfra;
+ /* drawdata is outdated after ANY change */
+ if(psys->pdd) psys->pdd->flag &= ~PARTICLE_DRAW_DATA_UPDATED;
+
if(!psys_check_enabled(ob, psys))
return;
cfra= bsystem_time(scene, ob, (float)scene->r.cfra, 0.0f);
- psmd= psys_get_modifier(ob, psys);
+ sim.psmd= psys_get_modifier(ob, psys);
/* system was already updated from modifier stack */
- if(psmd->flag & eParticleSystemFlag_psys_updated) {
- psmd->flag &= ~eParticleSystemFlag_psys_updated;
+ if(sim.psmd->flag & eParticleSystemFlag_psys_updated) {
+ sim.psmd->flag &= ~eParticleSystemFlag_psys_updated;
/* make sure it really was updated to cfra */
if(psys->cfra == cfra)
return;
}
- if(!psmd->dm)
+ if(!sim.psmd->dm)
return;
if(psys->recalc & PSYS_RECALC_TYPE)
- psys_changed_type(ob, psys);
+ psys_changed_type(&sim);
else if(psys->recalc & PSYS_RECALC_PHYS)
- psys_changed_physics(ob, psys);
+ psys_changed_physics(&sim);
/* (re-)create hair */
if(psys->part->type==PART_HAIR && hair_needs_recalc(psys)) {
@@ -4468,15 +3930,15 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
for(i=0; i<=psys->part->hair_step; i++){
hcfra=100.0f*(float)i/(float)psys->part->hair_step;
- system_step(scene, ob, psys, psmd, hcfra);
- save_hair(scene, ob, psys, psmd, hcfra);
+ system_step(&sim, hcfra);
+ save_hair(&sim, hcfra);
}
psys->flag |= PSYS_HAIR_DONE;
}
/* the main particle system step */
- system_step(scene, ob, psys, psmd, cfra);
+ system_step(&sim, cfra);
/* save matrix for duplicators */
Mat4Invert(psys->imat, ob->obmat);
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index d685bc29568..68f0e33a98f 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -56,15 +56,23 @@
#include "BKE_smoke.h"
#include "BKE_softbody.h"
#include "BKE_utildefines.h"
+#include "BIK_api.h"
#include "BLI_blenlib.h"
/* both in intern */
#include "smoke_API.h"
+
+#ifdef WITH_LZO
#include "minilzo.h"
+#else
+/* used for non-lzo cases */
+#define LZO_OUT_LEN(size) ((size) + (size) / 16 + 64 + 3)
+#endif
+#ifdef WITH_LZMA
#include "LzmaLib.h"
-
+#endif
/* needed for directory lookup */
/* untitled blend's need getpid for a unique name */
@@ -76,8 +84,19 @@
#include "BLI_winstuff.h"
#endif
-static void ptcache_data_to(void **data, int type, int index, void *to);
-static void ptcache_data_from(void **data, int type, void *from);
+#define PTCACHE_DATA_FROM(data, type, from) if(data[type]) { memcpy(data[type], from, ptcache_data_size[type]); }
+#define PTCACHE_DATA_TO(data, type, index, to) if(data[type]) { memcpy(to, (char*)data[type] + (index ? index * ptcache_data_size[type] : 0), ptcache_data_size[type]); }
+
+int ptcache_data_size[] = {
+ sizeof(int), // BPHYS_DATA_INDEX
+ 3 * sizeof(float), // BPHYS_DATA_LOCATION:
+ 3 * sizeof(float), // BPHYS_DATA_VELOCITY:
+ 4 * sizeof(float), // BPHYS_DATA_ROTATION:
+ 3 * sizeof(float), // BPHYS_DATA_AVELOCITY: /* also BPHYS_DATA_XCONST */
+ sizeof(float), // BPHYS_DATA_SIZE:
+ 3 * sizeof(float), // BPHYS_DATA_TIMES:
+ sizeof(BoidData) // case BPHYS_DATA_BOIDS:
+};
/* Common functions */
static int ptcache_read_basic_header(PTCacheFile *pf)
@@ -110,8 +129,8 @@ static int ptcache_write_softbody(int index, void *soft_v, void **data)
SoftBody *soft= soft_v;
BodyPoint *bp = soft->bpoint + index;
- ptcache_data_from(data, BPHYS_DATA_LOCATION, bp->pos);
- ptcache_data_from(data, BPHYS_DATA_VELOCITY, bp->vec);
+ PTCACHE_DATA_FROM(data, BPHYS_DATA_LOCATION, bp->pos);
+ PTCACHE_DATA_FROM(data, BPHYS_DATA_VELOCITY, bp->vec);
return 1;
}
@@ -125,8 +144,8 @@ static void ptcache_read_softbody(int index, void *soft_v, void **data, float fr
memcpy(bp->vec, data + 3, 3 * sizeof(float));
}
else {
- ptcache_data_to(data, BPHYS_DATA_LOCATION, 0, bp->pos);
- ptcache_data_to(data, BPHYS_DATA_VELOCITY, 0, bp->vec);
+ PTCACHE_DATA_TO(data, BPHYS_DATA_LOCATION, 0, bp->pos);
+ PTCACHE_DATA_TO(data, BPHYS_DATA_VELOCITY, 0, bp->vec);
}
}
static void ptcache_interpolate_softbody(int index, void *soft_v, void **data, float frs_sec, float cfra, float cfra1, float cfra2, float *old_data)
@@ -181,25 +200,25 @@ static int ptcache_write_particle(int index, void *psys_v, void **data)
return 0;
}
- ptcache_data_from(data, BPHYS_DATA_INDEX, &index);
- ptcache_data_from(data, BPHYS_DATA_LOCATION, pa->state.co);
- ptcache_data_from(data, BPHYS_DATA_VELOCITY, pa->state.vel);
- ptcache_data_from(data, BPHYS_DATA_ROTATION, pa->state.rot);
- ptcache_data_from(data, BPHYS_DATA_AVELOCITY, pa->state.ave);
- ptcache_data_from(data, BPHYS_DATA_SIZE, &pa->size);
- ptcache_data_from(data, BPHYS_DATA_TIMES, times);
+ PTCACHE_DATA_FROM(data, BPHYS_DATA_INDEX, &index);
+ PTCACHE_DATA_FROM(data, BPHYS_DATA_LOCATION, pa->state.co);
+ PTCACHE_DATA_FROM(data, BPHYS_DATA_VELOCITY, pa->state.vel);
+ PTCACHE_DATA_FROM(data, BPHYS_DATA_ROTATION, pa->state.rot);
+ PTCACHE_DATA_FROM(data, BPHYS_DATA_AVELOCITY, pa->state.ave);
+ PTCACHE_DATA_FROM(data, BPHYS_DATA_SIZE, &pa->size);
+ PTCACHE_DATA_FROM(data, BPHYS_DATA_TIMES, times);
if(boid)
- ptcache_data_from(data, BPHYS_DATA_BOIDS, &boid->data);
+ PTCACHE_DATA_FROM(data, BPHYS_DATA_BOIDS, &boid->data);
return 1;
}
void BKE_ptcache_make_particle_key(ParticleKey *key, int index, void **data, float time)
{
- ptcache_data_to(data, BPHYS_DATA_LOCATION, index, key->co);
- ptcache_data_to(data, BPHYS_DATA_VELOCITY, index, key->vel);
- ptcache_data_to(data, BPHYS_DATA_ROTATION, index, key->rot);
- ptcache_data_to(data, BPHYS_DATA_AVELOCITY, index, key->ave);
+ PTCACHE_DATA_TO(data, BPHYS_DATA_LOCATION, index, key->co);
+ PTCACHE_DATA_TO(data, BPHYS_DATA_VELOCITY, index, key->vel);
+ PTCACHE_DATA_TO(data, BPHYS_DATA_ROTATION, index, key->rot);
+ PTCACHE_DATA_TO(data, BPHYS_DATA_AVELOCITY, index, key->ave);
key->time = time;
}
static void ptcache_read_particle(int index, void *psys_v, void **data, float frs_sec, float cfra, float *old_data)
@@ -220,18 +239,18 @@ static void ptcache_read_particle(int index, void *psys_v, void **data, float fr
BKE_ptcache_make_particle_key(&pa->state, 0, data, cfra);
if(data[BPHYS_DATA_SIZE])
- ptcache_data_to(data, BPHYS_DATA_SIZE, 0, &pa->size);
+ PTCACHE_DATA_TO(data, BPHYS_DATA_SIZE, 0, &pa->size);
if(data[BPHYS_DATA_TIMES]) {
float times[3];
- ptcache_data_to(data, BPHYS_DATA_TIMES, 0, &times);
+ PTCACHE_DATA_TO(data, BPHYS_DATA_TIMES, 0, &times);
pa->time = times[0];
pa->dietime = times[1];
pa->lifetime = times[2];
}
if(boid)
- ptcache_data_to(data, BPHYS_DATA_BOIDS, 0, &boid->data);
+ PTCACHE_DATA_TO(data, BPHYS_DATA_BOIDS, 0, &boid->data);
/* determine velocity from previous location */
if(data[BPHYS_DATA_LOCATION] && !data[BPHYS_DATA_VELOCITY]) {
@@ -247,7 +266,7 @@ static void ptcache_read_particle(int index, void *psys_v, void **data, float fr
/* determine rotation from velocity */
if(data[BPHYS_DATA_LOCATION] && !data[BPHYS_DATA_ROTATION]) {
- vectoquat(pa->state.vel, OB_POSX, OB_POSZ, pa->state.rot);
+ vectoquat(pa->state.vel, OB_NEGX, OB_POSZ, pa->state.rot);
}
}
static void ptcache_interpolate_particle(int index, void *psys_v, void **data, float frs_sec, float cfra, float cfra1, float cfra2, float *old_data)
@@ -270,13 +289,33 @@ static void ptcache_interpolate_particle(int index, void *psys_v, void **data, f
else
BKE_ptcache_make_particle_key(keys+2, 0, data, cfra2);
+ /* determine velocity from previous location */
+ if(data[BPHYS_DATA_LOCATION] && !data[BPHYS_DATA_VELOCITY]) {
+ if(keys[1].time > keys[2].time) {
+ VecSubf(keys[2].vel, keys[1].co, keys[2].co);
+ VecMulf(keys[2].vel, (keys[1].time - keys[2].time) / frs_sec);
+ }
+ else {
+ VecSubf(keys[2].vel, keys[2].co, keys[1].co);
+ VecMulf(keys[2].vel, (keys[2].time - keys[1].time) / frs_sec);
+ }
+ }
+
+ /* determine rotation from velocity */
+ if(data[BPHYS_DATA_LOCATION] && !data[BPHYS_DATA_ROTATION]) {
+ vectoquat(keys[2].vel, OB_NEGX, OB_POSZ, keys[2].rot);
+ }
+
+ if(cfra > pa->time)
+ cfra1 = MAX2(cfra1, pa->time);
+
dfra = cfra2 - cfra1;
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);
- QuatInterpol(pa->state.rot, keys[1].rot,keys[2].rot, (cfra - cfra1) / dfra);
+ QuatInterpol(pa->state.rot, keys[1].rot, keys[2].rot, (cfra - cfra1) / dfra);
VecMulf(pa->state.vel, frs_sec / dfra);
@@ -307,6 +346,132 @@ static int ptcache_totwrite_particle(void *psys_v)
return totwrite;
}
+//static int ptcache_write_particle_stream(PTCacheFile *pf, PTCacheMem *pm, void *psys_v)
+//{
+// ParticleSystem *psys= psys_v;
+// ParticleData *pa = psys->particles;
+// BoidParticle *boid = NULL;
+// float times[3];
+// int i = 0;
+//
+// if(!pf && !pm)
+// return 0;
+//
+// for(i=0; i<psys->totpart; i++, pa++) {
+//
+// if(data[BPHYS_DATA_INDEX]) {
+// int step = psys->pointcache->step;
+// /* No need to store unborn or died particles */
+// if(pa->time - step > pa->state.time || pa->dietime + step < pa->state.time)
+// continue;
+// }
+//
+// times[0] = pa->time;
+// times[1] = pa->dietime;
+// times[2] = pa->lifetime;
+//
+// PTCACHE_DATA_FROM(data, BPHYS_DATA_INDEX, &index);
+// PTCACHE_DATA_FROM(data, BPHYS_DATA_LOCATION, pa->state.co);
+// PTCACHE_DATA_FROM(data, BPHYS_DATA_VELOCITY, pa->state.vel);
+// PTCACHE_DATA_FROM(data, BPHYS_DATA_ROTATION, pa->state.rot);
+// PTCACHE_DATA_FROM(data, BPHYS_DATA_AVELOCITY, pa->state.ave);
+// PTCACHE_DATA_FROM(data, BPHYS_DATA_SIZE, &pa->size);
+// PTCACHE_DATA_FROM(data, BPHYS_DATA_TIMES, times);
+//
+// boid = (psys->part->phystype == PART_PHYS_BOIDS) ? pa->boid : NULL;
+// if(boid)
+// PTCACHE_DATA_FROM(data, BPHYS_DATA_BOIDS, &boid->data);
+//
+// if(pf && !ptcache_file_write_data(pf))
+// return 0;
+//
+// if(pm)
+// BKE_ptcache_mem_incr_pointers(pm);
+// }
+//
+// return 1;
+//}
+//static void ptcache_read_particle_stream(PTCacheFile *pf, PTCacheMem *pm, void *psys_v, void **data, float frs_sec, float cfra, float *old_data)
+//{
+// ParticleSystem *psys= psys_v;
+// ParticleData *pa = psys->particles + index;
+// BoidParticle *boid = (psys->part->phystype == PART_PHYS_BOIDS) ? pa->boid : NULL;
+//
+// if(cfra > pa->state.time)
+// memcpy(&pa->prev_state, &pa->state, sizeof(ParticleKey));
+//
+// if(old_data){
+// /* old format cache */
+// memcpy(&pa->state, old_data, sizeof(ParticleKey));
+// return;
+// }
+//
+// BKE_ptcache_make_particle_key(&pa->state, 0, data, cfra);
+//
+// if(data[BPHYS_DATA_SIZE])
+// PTCACHE_DATA_TO(data, BPHYS_DATA_SIZE, 0, &pa->size);
+//
+// if(data[BPHYS_DATA_TIMES]) {
+// float times[3];
+// PTCACHE_DATA_TO(data, BPHYS_DATA_TIMES, 0, &times);
+// pa->time = times[0];
+// pa->dietime = times[1];
+// pa->lifetime = times[2];
+// }
+//
+// if(boid)
+// PTCACHE_DATA_TO(data, BPHYS_DATA_BOIDS, 0, &boid->data);
+//
+// /* determine velocity from previous location */
+// if(data[BPHYS_DATA_LOCATION] && !data[BPHYS_DATA_VELOCITY]) {
+// if(cfra > pa->prev_state.time) {
+// VecSubf(pa->state.vel, pa->state.co, pa->prev_state.co);
+// VecMulf(pa->state.vel, (cfra - pa->prev_state.time) / frs_sec);
+// }
+// else {
+// VecSubf(pa->state.vel, pa->prev_state.co, pa->state.co);
+// VecMulf(pa->state.vel, (pa->prev_state.time - cfra) / frs_sec);
+// }
+// }
+//
+// /* determine rotation from velocity */
+// if(data[BPHYS_DATA_LOCATION] && !data[BPHYS_DATA_ROTATION]) {
+// vectoquat(pa->state.vel, OB_POSX, OB_POSZ, pa->state.rot);
+// }
+//}
+//static void ptcache_interpolate_particle_stream(int index, void *psys_v, void **data, float frs_sec, float cfra, float cfra1, float cfra2, float *old_data)
+//{
+// ParticleSystem *psys= psys_v;
+// ParticleData *pa = psys->particles + index;
+// ParticleKey keys[4];
+// float dfra;
+//
+// cfra = MIN2(cfra, pa->dietime);
+// cfra1 = MIN2(cfra1, pa->dietime);
+// cfra2 = MIN2(cfra2, pa->dietime);
+//
+// if(cfra1 == cfra2)
+// return;
+//
+// memcpy(keys+1, &pa->state, sizeof(ParticleKey));
+// if(old_data)
+// memcpy(keys+2, old_data, sizeof(ParticleKey));
+// else
+// BKE_ptcache_make_particle_key(keys+2, 0, data, cfra2);
+//
+// dfra = cfra2 - cfra1;
+//
+// 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);
+// QuatInterpol(pa->state.rot, keys[1].rot,keys[2].rot, (cfra - cfra1) / dfra);
+//
+// VecMulf(pa->state.vel, frs_sec / dfra);
+//
+// pa->state.time = cfra;
+//}
+//
/* Cloth functions */
static int ptcache_write_cloth(int index, void *cloth_v, void **data)
{
@@ -314,9 +479,9 @@ static int ptcache_write_cloth(int index, void *cloth_v, void **data)
Cloth *cloth= clmd->clothObject;
ClothVertex *vert = cloth->verts + index;
- ptcache_data_from(data, BPHYS_DATA_LOCATION, vert->x);
- ptcache_data_from(data, BPHYS_DATA_VELOCITY, vert->v);
- ptcache_data_from(data, BPHYS_DATA_XCONST, vert->xconst);
+ PTCACHE_DATA_FROM(data, BPHYS_DATA_LOCATION, vert->x);
+ PTCACHE_DATA_FROM(data, BPHYS_DATA_VELOCITY, vert->v);
+ PTCACHE_DATA_FROM(data, BPHYS_DATA_XCONST, vert->xconst);
return 1;
}
@@ -332,9 +497,9 @@ static void ptcache_read_cloth(int index, void *cloth_v, void **data, float frs_
memcpy(vert->v, data + 6, 3 * sizeof(float));
}
else {
- ptcache_data_to(data, BPHYS_DATA_LOCATION, 0, vert->x);
- ptcache_data_to(data, BPHYS_DATA_VELOCITY, 0, vert->v);
- ptcache_data_to(data, BPHYS_DATA_XCONST, 0, vert->xconst);
+ PTCACHE_DATA_TO(data, BPHYS_DATA_LOCATION, 0, vert->x);
+ PTCACHE_DATA_TO(data, BPHYS_DATA_VELOCITY, 0, vert->v);
+ PTCACHE_DATA_TO(data, BPHYS_DATA_XCONST, 0, vert->xconst);
}
}
static void ptcache_interpolate_cloth(int index, void *cloth_v, void **data, float frs_sec, float cfra, float cfra1, float cfra2, float *old_data)
@@ -443,7 +608,8 @@ void BKE_ptcache_id_from_particles(PTCacheID *pid, Object *ob, ParticleSystem *p
if(psys->part->phystype == PART_PHYS_BOIDS)
pid->data_types|= (1<<BPHYS_DATA_AVELOCITY) | (1<<BPHYS_DATA_ROTATION) | (1<<BPHYS_DATA_BOIDS);
- if(psys->part->rotmode || psys->part->avemode)
+ if(psys->part->rotmode!=PART_ROT_VEL
+ || psys->part->avemode!=PART_AVE_SPIN || psys->part->avefac!=0.0f)
pid->data_types|= (1<<BPHYS_DATA_AVELOCITY) | (1<<BPHYS_DATA_ROTATION);
if(psys->part->flag & PART_ROT_DYN)
@@ -484,20 +650,25 @@ static int ptcache_file_write(PTCacheFile *pf, void *f, size_t tot, int size);
static int ptcache_compress_write(PTCacheFile *pf, unsigned char *in, unsigned int in_len, unsigned char *out, int mode)
{
int r = 0;
- unsigned char compressed;
- LZO_HEAP_ALLOC(wrkmem, LZO1X_MEM_COMPRESS);
- unsigned int out_len = LZO_OUT_LEN(in_len);
+ unsigned char compressed = 0;
+ unsigned int out_len= 0;
unsigned char *props = MEM_callocN(16*sizeof(char), "tmp");
size_t sizeOfIt = 5;
+#ifdef WITH_LZO
+ out_len= LZO_OUT_LEN(in_len);
if(mode == 1) {
+ LZO_HEAP_ALLOC(wrkmem, LZO1X_MEM_COMPRESS);
+
r = lzo1x_1_compress(in, (lzo_uint)in_len, out, (lzo_uint *)&out_len, wrkmem);
if (!(r == LZO_E_OK) || (out_len >= in_len))
compressed = 0;
else
compressed = 1;
}
- else if(mode == 2) {
+#endif
+#ifdef WITH_LZMA
+ if(mode == 2) {
r = LzmaCompress(out, (size_t *)&out_len, in, in_len,//assume sizeof(char)==1....
props, &sizeOfIt, 5, 1 << 24, 3, 0, 2, 32, 2);
@@ -507,7 +678,8 @@ static int ptcache_compress_write(PTCacheFile *pf, unsigned char *in, unsigned i
else
compressed = 2;
}
-
+#endif
+
ptcache_file_write(pf, &compressed, 1, sizeof(unsigned char));
if(compressed) {
ptcache_file_write(pf, &out_len, 1, sizeof(unsigned int));
@@ -621,16 +793,19 @@ static int ptcache_compress_read(PTCacheFile *pf, unsigned char *result, unsigne
in = (unsigned char *)MEM_callocN(sizeof(unsigned char)*in_len, "pointcache_compressed_buffer");
ptcache_file_read(pf, in, in_len, sizeof(unsigned char));
+#ifdef WITH_LZO
if(compressed == 1)
r = lzo1x_decompress(in, (lzo_uint)in_len, result, (lzo_uint *)&out_len, NULL);
- else if(compressed == 2)
+#endif
+#ifdef WITH_LZMA
+ if(compressed == 2)
{
size_t leni = in_len, leno = out_len;
ptcache_file_read(pf, &sizeOfIt, 1, sizeof(unsigned int));
ptcache_file_read(pf, props, sizeOfIt, sizeof(unsigned char));
r = LzmaUncompress(result, &leno, in, &leni, props, sizeOfIt);
}
-
+#endif
MEM_freeN(in);
}
else {
@@ -987,7 +1162,7 @@ static int ptcache_file_read_data(PTCacheFile *pf)
int i;
for(i=0; i<BPHYS_TOT_DATA; i++) {
- if(pf->data_types & (1<<i) && !ptcache_file_read(pf, pf->cur[i], 1, BKE_ptcache_data_size(i)))
+ if(pf->data_types & (1<<i) && !ptcache_file_read(pf, pf->cur[i], 1, ptcache_data_size[i]))
return 0;
}
@@ -998,7 +1173,7 @@ static int ptcache_file_write_data(PTCacheFile *pf)
int i;
for(i=0; i<BPHYS_TOT_DATA; i++) {
- if(pf->data_types & (1<<i) && !ptcache_file_write(pf, pf->cur[i], 1, BKE_ptcache_data_size(i)))
+ if(pf->data_types & (1<<i) && !ptcache_file_write(pf, pf->cur[i], 1, ptcache_data_size[i]))
return 0;
}
@@ -1045,38 +1220,7 @@ static int ptcache_file_write_header_begin(PTCacheFile *pf)
/* Data pointer handling */
int BKE_ptcache_data_size(int data_type)
{
- switch(data_type) {
- case BPHYS_DATA_INDEX:
- return sizeof(int);
- case BPHYS_DATA_LOCATION:
- case BPHYS_DATA_VELOCITY:
- case BPHYS_DATA_AVELOCITY: /* also BPHYS_DATA_XCONST */
- case BPHYS_DATA_TIMES:
- return 3 * sizeof(float);
- case BPHYS_DATA_ROTATION:
- return 4 * sizeof(float);
- case BPHYS_DATA_SIZE:
- return sizeof(float);
- case BPHYS_DATA_BOIDS:
- return sizeof(BoidData);
- default:
- return 0;
- }
-}
-static void ptcache_data_to(void **data, int type, int index, void *to)
-{
- if(data[type]) {
- if(index)
- memcpy(to, (char*)data[type] + index * BKE_ptcache_data_size(type), BKE_ptcache_data_size(type));
- else
- memcpy(to, data[type], BKE_ptcache_data_size(type));
- }
-}
-
-static void ptcache_data_from(void **data, int type, void *from)
-{
- if(data[type])
- memcpy(data[type], from, BKE_ptcache_data_size(type));
+ return ptcache_data_size[data_type];
}
static void ptcache_file_init_pointers(PTCacheFile *pf)
@@ -1108,7 +1252,7 @@ void BKE_ptcache_mem_incr_pointers(PTCacheMem *pm)
for(i=0; i<BPHYS_TOT_DATA; i++) {
if(pm->cur[i])
- pm->cur[i] = (char*)pm->cur[i] + BKE_ptcache_data_size(i);
+ pm->cur[i] = (char*)pm->cur[i] + ptcache_data_size[i];
}
}
static void ptcache_alloc_data(PTCacheMem *pm)
@@ -1119,7 +1263,7 @@ static void ptcache_alloc_data(PTCacheMem *pm)
for(i=0; i<BPHYS_TOT_DATA; i++) {
if(data_types & (1<<i))
- pm->data[i] = MEM_callocN(totpoint * BKE_ptcache_data_size(i), "PTCache Data");
+ pm->data[i] = MEM_callocN(totpoint * ptcache_data_size[i], "PTCache Data");
}
}
static void ptcache_free_data(void *data[])
@@ -1136,7 +1280,7 @@ static void ptcache_copy_data(void *from[], void *to[])
int i;
for(i=0; i<BPHYS_TOT_DATA; i++) {
if(from[i])
- memcpy(to[i], from[i], BKE_ptcache_data_size(i));
+ memcpy(to[i], from[i], ptcache_data_size[i]);
}
}
@@ -1898,6 +2042,9 @@ int BKE_ptcache_object_reset(Scene *scene, Object *ob, int mode)
}
}
+ if (ob->type == OB_ARMATURE)
+ BIK_clear_cache(ob->pose);
+
return reset;
}
@@ -2137,6 +2284,7 @@ void BKE_ptcache_make_cache(PTCacheBaker* baker)
}
}
}
+ BLI_freelistN(&pidlist2);
}
if(bake || cache->flag & PTCACHE_REDO_NEEDED)
diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c
index 391adfb762a..e524359d2bc 100644
--- a/source/blender/blenkernel/intern/report.c
+++ b/source/blender/blenkernel/intern/report.c
@@ -230,7 +230,7 @@ char *BKE_reports_string(ReportList *reports, ReportType level)
DynStr *ds;
char *cstring;
- if(!reports)
+ if(!reports || !reports->list.first)
return NULL;
ds= BLI_dynstr_new();
diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c
index de2118af202..5cd554725ff 100644
--- a/source/blender/blenkernel/intern/sca.c
+++ b/source/blender/blenkernel/intern/sca.c
@@ -128,6 +128,9 @@ void init_sensor(bSensor *sens)
case SENS_PROPERTY:
sens->data= MEM_callocN(sizeof(bPropertySensor), "propsens");
break;
+ case SENS_ARMATURE:
+ sens->data= MEM_callocN(sizeof(bArmatureSensor), "armsens");
+ break;
case SENS_ACTUATOR:
sens->data= MEM_callocN(sizeof(bActuatorSensor), "actsens");
break;
@@ -455,6 +458,9 @@ void init_actuator(bActuator *act)
case ACT_STATE:
act->data = MEM_callocN(sizeof( bStateActuator ), "state act");
break;
+ case ACT_ARMATURE:
+ act->data = MEM_callocN(sizeof( bArmatureActuator ), "armature act");
+ break;
default:
; /* this is very severe... I cannot make any memory for this */
/* logic brick... */
@@ -596,6 +602,8 @@ void sca_remove_ob_poin(Object *obt, Object *ob)
bEditObjectActuator *eoa;
bPropertyActuator *pa;
bMessageActuator *ma;
+ bParentActuator *para;
+ bArmatureActuator *aa;
sens= obt->sensors.first;
while(sens) {
@@ -634,7 +642,15 @@ void sca_remove_ob_poin(Object *obt, Object *ob)
ma= act->data;
if(ma->toObject==ob) ma->toObject= NULL;
break;
-
+ case ACT_PARENT:
+ para = act->data;
+ if (para->ob==ob) para->ob = NULL;
+ break;
+ case ACT_ARMATURE:
+ aa = act->data;
+ if (aa->target == ob) aa->target = NULL;
+ if (aa->subtarget == ob) aa->subtarget = NULL;
+ break;
}
act= act->next;
}
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 6f9ed3e0978..4f72ca96f5f 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -400,6 +400,10 @@ Scene *add_scene(char *name)
sce->toolsettings->proportional_size = 1.0f;
+ sce->physics_settings.gravity[0] = 0.0f;
+ sce->physics_settings.gravity[1] = 0.0f;
+ sce->physics_settings.gravity[2] = -9.81f;
+ sce->physics_settings.flag = PHYS_GLOBAL_GRAVITY;
sce->unit.scale_length = 1.0f;
@@ -419,7 +423,11 @@ Scene *add_scene(char *name)
pset->brush[PE_BRUSH_CUT].strength= 100;
sce->jumpframe = 10;
- sce->r.audio.mixrate = 44100;
+ sce->r.ffcodecdata.audio_mixrate = 44100;
+
+ sce->audio.distance_model = 2.0;
+ sce->audio.doppler_factor = 1.0;
+ sce->audio.speed_of_sound = 343.3;
strcpy(sce->r.backbuf, "//backbuf");
strcpy(sce->r.pic, U.renderdir);
@@ -774,11 +782,11 @@ static void scene_update(Scene *sce, unsigned int lay)
DAG_scene_update_flags(sce, lay); // only stuff that moves or needs display still
/* All 'standard' (i.e. without any dependencies) animation is handled here,
- * with an 'local' to 'macro' order of evaluation. This should ensure that
- * settings stored nestled within a hierarchy (i.e. settings in a Texture block
- * can be overridden by settings from Scene, which owns the Texture through a hierarchy
- * such as Scene->World->MTex/Texture) can still get correctly overridden.
- */
+ * with an 'local' to 'macro' order of evaluation. This should ensure that
+ * settings stored nestled within a hierarchy (i.e. settings in a Texture block
+ * can be overridden by settings from Scene, which owns the Texture through a hierarchy
+ * such as Scene->World->MTex/Texture) can still get correctly overridden.
+ */
BKE_animsys_evaluate_all_animation(G.main, ctime);
for(base= sce->base.first; base; base= base->next) {
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index 661d0da1550..459db96dbfb 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -57,7 +57,6 @@ static void spacetype_free(SpaceType *st)
ARegionType *art;
PanelType *pt;
HeaderType *ht;
- MenuType *mt;
for(art= st->regiontypes.first; art; art= art->next) {
BLI_freelistN(&art->drawcalls);
@@ -70,13 +69,8 @@ static void spacetype_free(SpaceType *st)
if(ht->ext.free)
ht->ext.free(ht->ext.data);
- for(mt= art->menutypes.first; mt; mt= mt->next)
- if(mt->ext.free)
- mt->ext.free(mt->ext.data);
-
BLI_freelistN(&art->paneltypes);
BLI_freelistN(&art->headertypes);
- BLI_freelistN(&art->menutypes);
}
BLI_freelistN(&st->regiontypes);
diff --git a/source/blender/blenkernel/intern/sequence.c b/source/blender/blenkernel/intern/sequence.c
index 7f3e2789232..b80df60e726 100644
--- a/source/blender/blenkernel/intern/sequence.c
+++ b/source/blender/blenkernel/intern/sequence.c
@@ -2067,7 +2067,7 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
if(rendering)
BLI_strncpy(sce->id.name+2, scenename, 64);
- RE_GetResultImage(re, &rres);
+ RE_AcquireResultImage(re, &rres);
if(rres.rectf) {
se->ibuf= IMB_allocImBuf(rres.rectx, rres.recty, 32, IB_rectfloat, 0);
@@ -2080,6 +2080,8 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
se->ibuf= IMB_allocImBuf(rres.rectx, rres.recty, 32, IB_rect, 0);
memcpy(se->ibuf->rect, rres.rect32, 4*rres.rectx*rres.recty);
}
+
+ RE_ReleaseResultImage(re);
BIF_end_render_callbacks();
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index fea62ea1f21..a52a98a1969 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -53,6 +53,7 @@
#include "BKE_cdderivedmesh.h"
#include "BKE_customdata.h"
#include "BKE_DerivedMesh.h"
+#include "BKE_effect.h"
#include "BKE_modifier.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
@@ -126,6 +127,7 @@ struct SmokeModifierData;
// forward declerations
static void get_cell(float *p0, int res[3], float dx, float *pos, int *cell, int correct);
void calcTriangleDivs(Object *ob, MVert *verts, int numverts, MFace *tris, int numfaces, int numtris, int **tridivs, float cell_len);
+static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs);
#define TRI_UVOFFSET (1./4.)
@@ -279,151 +281,157 @@ int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, Derive
{
// init collision points
SmokeCollSettings *scs = smd->coll;
- MVert *mvert = dm->getVertArray(dm);
- MFace *mface = dm->getTessFaceArray(dm);
- int i = 0, divs = 0;
- int *tridivs = NULL;
- float cell_len = 1.0 / 50.0; // for res = 50
- int newdivs = 0;
- int quads = 0, facecounter = 0;
// copy obmat
Mat4CpyMat4(scs->mat, ob->obmat);
Mat4CpyMat4(scs->mat_old, ob->obmat);
- // count quads
- for(i = 0; i < dm->getNumFaces(dm); i++)
- {
- if(mface[i].v4)
- quads++;
- }
+ fill_scs_points(ob, dm, scs);
+ }
- calcTriangleDivs(ob, mvert, dm->getNumVerts(dm), mface, dm->getNumFaces(dm), dm->getNumFaces(dm) + quads, &tridivs, cell_len);
+ if(!smd->coll->bvhtree)
+ {
+ smd->coll->bvhtree = NULL; // bvhtree_build_from_smoke ( ob->obmat, dm->getTessFaceArray(dm), dm->getNumTessFaces(dm), dm->getVertArray(dm), dm->getNumVerts(dm), 0.0 );
+ }
+ return 1;
+ }
- // count triangle divisions
- for(i = 0; i < dm->getNumFaces(dm) + quads; i++)
- {
- divs += (tridivs[3 * i] + 1) * (tridivs[3 * i + 1] + 1) * (tridivs[3 * i + 2] + 1);
- }
+ return 1;
+}
+
+static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs)
+{
+ MVert *mvert = dm->getVertArray(dm);
+ MFace *mface = dm->getTessFaceArray(dm);
+ int i = 0, divs = 0;
+ int *tridivs = NULL;
+ float cell_len = 1.0 / 50.0; // for res = 50
+ int newdivs = 0;
+ int quads = 0, facecounter = 0;
+
+ // count quads
+ for(i = 0; i < dm->getNumTessFaces(dm); i++)
+ {
+ if(mface[i].v4)
+ quads++;
+ }
+
+ calcTriangleDivs(ob, mvert, dm->getNumVerts(dm), mface, dm->getNumTessFaces(dm), dm->getNumTessFaces(dm) + quads, &tridivs, cell_len);
+
+ // count triangle divisions
+ for(i = 0; i < dm->getNumTessFaces(dm) + quads; i++)
+ {
+ divs += (tridivs[3 * i] + 1) * (tridivs[3 * i + 1] + 1) * (tridivs[3 * i + 2] + 1);
+ }
- // printf("divs: %d\n", divs);
+ // printf("divs: %d\n", divs);
- scs->points = MEM_callocN(sizeof(float) * (dm->getNumVerts(dm) + divs) * 3, "SmokeCollPoints");
+ scs->points = MEM_callocN(sizeof(float) * (dm->getNumVerts(dm) + divs) * 3, "SmokeCollPoints");
- for(i = 0; i < dm->getNumVerts(dm); i++)
+ for(i = 0; i < dm->getNumVerts(dm); i++)
+ {
+ float tmpvec[3];
+ VECCOPY(tmpvec, mvert[i].co);
+ Mat4MulVecfl (ob->obmat, tmpvec);
+ VECCOPY(&scs->points[i * 3], tmpvec);
+ }
+
+ for(i = 0, facecounter = 0; i < dm->getNumTessFaces(dm); i++)
+ {
+ int again = 0;
+ do
+ {
+ int j, k;
+ int divs1 = tridivs[3 * facecounter + 0];
+ int divs2 = tridivs[3 * facecounter + 1];
+ //int divs3 = tridivs[3 * facecounter + 2];
+ float side1[3], side2[3], trinormorg[3], trinorm[3];
+
+ if(again == 1 && mface[i].v4)
{
- float tmpvec[3];
- VECCOPY(tmpvec, mvert[i].co);
- Mat4MulVecfl (ob->obmat, tmpvec);
- VECCOPY(&scs->points[i * 3], tmpvec);
+ VECSUB(side1, mvert[ mface[i].v3 ].co, mvert[ mface[i].v1 ].co);
+ VECSUB(side2, mvert[ mface[i].v4 ].co, mvert[ mface[i].v1 ].co);
}
-
- for(i = 0, facecounter = 0; i < dm->getNumFaces(dm); i++)
+ else
+ {
+ VECSUB(side1, mvert[ mface[i].v2 ].co, mvert[ mface[i].v1 ].co);
+ VECSUB(side2, mvert[ mface[i].v3 ].co, mvert[ mface[i].v1 ].co);
+ }
+
+ Crossf(trinormorg, side1, side2);
+ Normalize(trinormorg);
+ VECCOPY(trinorm, trinormorg);
+ VecMulf(trinorm, 0.25 * cell_len);
+
+ for(j = 0; j <= divs1; j++)
{
- int again = 0;
- do
+ for(k = 0; k <= divs2; k++)
{
- int j, k;
- int divs1 = tridivs[3 * facecounter + 0];
- int divs2 = tridivs[3 * facecounter + 1];
- //int divs3 = tridivs[3 * facecounter + 2];
- float side1[3], side2[3], trinormorg[3], trinorm[3];
+ float p1[3], p2[3], p3[3], p[3]={0,0,0};
+ const float uf = (float)(j + TRI_UVOFFSET) / (float)(divs1 + 0.0);
+ const float vf = (float)(k + TRI_UVOFFSET) / (float)(divs2 + 0.0);
+ float tmpvec[3];
- if(again == 1 && mface[i].v4)
- {
- VECSUB(side1, mvert[ mface[i].v3 ].co, mvert[ mface[i].v1 ].co);
- VECSUB(side2, mvert[ mface[i].v4 ].co, mvert[ mface[i].v1 ].co);
- }
- else
+ if(uf+vf > 1.0)
{
- VECSUB(side1, mvert[ mface[i].v2 ].co, mvert[ mface[i].v1 ].co);
- VECSUB(side2, mvert[ mface[i].v3 ].co, mvert[ mface[i].v1 ].co);
+ // printf("bigger - divs1: %d, divs2: %d\n", divs1, divs2);
+ continue;
}
- Crossf(trinormorg, side1, side2);
- Normalize(trinormorg);
- VECCOPY(trinorm, trinormorg);
- VecMulf(trinorm, 0.25 * cell_len);
-
- for(j = 0; j <= divs1; j++)
+ VECCOPY(p1, mvert[ mface[i].v1 ].co);
+ if(again == 1 && mface[i].v4)
{
- for(k = 0; k <= divs2; k++)
- {
- float p1[3], p2[3], p3[3], p[3]={0,0,0};
- const float uf = (float)(j + TRI_UVOFFSET) / (float)(divs1 + 0.0);
- const float vf = (float)(k + TRI_UVOFFSET) / (float)(divs2 + 0.0);
- float tmpvec[3];
-
- if(uf+vf > 1.0)
- {
- // printf("bigger - divs1: %d, divs2: %d\n", divs1, divs2);
- continue;
- }
-
- VECCOPY(p1, mvert[ mface[i].v1 ].co);
- if(again == 1 && mface[i].v4)
- {
- VECCOPY(p2, mvert[ mface[i].v3 ].co);
- VECCOPY(p3, mvert[ mface[i].v4 ].co);
- }
- else
- {
- VECCOPY(p2, mvert[ mface[i].v2 ].co);
- VECCOPY(p3, mvert[ mface[i].v3 ].co);
- }
-
- VecMulf(p1, (1.0-uf-vf));
- VecMulf(p2, uf);
- VecMulf(p3, vf);
-
- VECADD(p, p1, p2);
- VECADD(p, p, p3);
-
- if(newdivs > divs)
- printf("mem problem\n");
-
- // mMovPoints.push_back(p + trinorm);
- VECCOPY(tmpvec, p);
- VECADD(tmpvec, tmpvec, trinorm);
- Mat4MulVecfl (ob->obmat, tmpvec);
- VECCOPY(&scs->points[3 * (dm->getNumVerts(dm) + newdivs)], tmpvec);
- newdivs++;
-
- if(newdivs > divs)
- printf("mem problem\n");
-
- // mMovPoints.push_back(p - trinorm);
- VECCOPY(tmpvec, p);
- VECSUB(tmpvec, tmpvec, trinorm);
- Mat4MulVecfl (ob->obmat, tmpvec);
- VECCOPY(&scs->points[3 * (dm->getNumVerts(dm) + newdivs)], tmpvec);
- newdivs++;
- }
+ VECCOPY(p2, mvert[ mface[i].v3 ].co);
+ VECCOPY(p3, mvert[ mface[i].v4 ].co);
}
-
- if(again == 0 && mface[i].v4)
- again++;
else
- again = 0;
-
- facecounter++;
+ {
+ VECCOPY(p2, mvert[ mface[i].v2 ].co);
+ VECCOPY(p3, mvert[ mface[i].v3 ].co);
+ }
- } while(again!=0);
+ VecMulf(p1, (1.0-uf-vf));
+ VecMulf(p2, uf);
+ VecMulf(p3, vf);
+
+ VECADD(p, p1, p2);
+ VECADD(p, p, p3);
+
+ if(newdivs > divs)
+ printf("mem problem\n");
+
+ // mMovPoints.push_back(p + trinorm);
+ VECCOPY(tmpvec, p);
+ VECADD(tmpvec, tmpvec, trinorm);
+ Mat4MulVecfl (ob->obmat, tmpvec);
+ VECCOPY(&scs->points[3 * (dm->getNumVerts(dm) + newdivs)], tmpvec);
+ newdivs++;
+
+ if(newdivs > divs)
+ printf("mem problem\n");
+
+ // mMovPoints.push_back(p - trinorm);
+ VECCOPY(tmpvec, p);
+ VECSUB(tmpvec, tmpvec, trinorm);
+ Mat4MulVecfl (ob->obmat, tmpvec);
+ VECCOPY(&scs->points[3 * (dm->getNumVerts(dm) + newdivs)], tmpvec);
+ newdivs++;
+ }
}
- scs->numpoints = dm->getNumVerts(dm) + newdivs;
+ if(again == 0 && mface[i].v4)
+ again++;
+ else
+ again = 0;
- MEM_freeN(tridivs);
- }
+ facecounter++;
- if(!smd->coll->bvhtree)
- {
- smd->coll->bvhtree = NULL; // bvhtree_build_from_smoke ( ob->obmat, dm->getTessFaceArray(dm), dm->getNumFaces(dm), dm->getVertArray(dm), dm->getNumVerts(dm), 0.0 );
- }
- return 1;
+ } while(again!=0);
}
- return 1;
+ scs->numpoints = dm->getNumVerts(dm) + newdivs;
+
+ MEM_freeN(tridivs);
}
/*! init triangle divisions */
@@ -540,6 +548,10 @@ static void smokeModifier_freeDomain(SmokeModifierData *smd)
if(smd->domain->wt)
smoke_turbulence_free(smd->domain->wt);
+ if(smd->domain->effector_weights)
+ MEM_freeN(smd->domain->effector_weights);
+ smd->domain->effector_weights = NULL;
+
BKE_ptcache_free_list(&(smd->domain->ptcaches[0]));
smd->domain->point_cache[0] = NULL;
BKE_ptcache_free_list(&(smd->domain->ptcaches[1]));
@@ -707,6 +719,7 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
smd->domain->diss_speed = 5;
// init 3dview buffer
smd->domain->viewsettings = 0;
+ smd->domain->effector_weights = BKE_add_effector_weights(NULL);
}
else if(smd->type & MOD_SMOKE_TYPE_FLOW)
{
@@ -832,8 +845,7 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd)
size_t i = 0;
size_t index = 0;
int badcell = 0;
- if(pa->alive == PARS_KILLED) continue;
- else if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0) continue;
+ if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0) continue;
else if(pa->alive == PARS_DEAD && (part->flag & PART_DIED)==0) continue;
else if(pa->flag & (PARS_UNEXIST+PARS_NO_DISP)) continue;
// VECCOPY(pos, pa->state.co);
@@ -932,21 +944,52 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd)
}
// do effectors
- /*
- if(sds->eff_group)
{
- for(go = sds->eff_group->gobject.first; go; go = go->next)
+ ListBase *effectors = pdInitEffectors(scene, ob, NULL, sds->effector_weights);
+
+ if(effectors)
{
- if(go->ob)
- {
- if(ob->pd)
- {
-
- }
+ float *density = smoke_get_density(sds->fluid);
+ float *force_x = smoke_get_force_x(sds->fluid);
+ float *force_y = smoke_get_force_y(sds->fluid);
+ float *force_z = smoke_get_force_z(sds->fluid);
+ float *velocity_x = smoke_get_velocity_x(sds->fluid);
+ float *velocity_y = smoke_get_velocity_y(sds->fluid);
+ float *velocity_z = smoke_get_velocity_z(sds->fluid);
+ int x, y, z;
+
+ // precalculate wind forces
+ for(x = 0; x < sds->res[0]; x++)
+ for(y = 0; y < sds->res[1]; y++)
+ for(z = 0; z < sds->res[2]; z++)
+ {
+ EffectedPoint epoint;
+ float voxelCenter[3] = {0,0,0} , vel[3] = {0,0,0} , retvel[3] = {0,0,0};
+ unsigned int index = smoke_get_index(x, sds->res[0], y, sds->res[1], z);
+
+ if(density[index] < FLT_EPSILON)
+ continue;
+
+ vel[0] = velocity_x[index];
+ vel[1] = velocity_y[index];
+ vel[2] = velocity_z[index];
+
+ voxelCenter[0] = sds->p0[0] + sds->dx * x + sds->dx * 0.5;
+ voxelCenter[1] = sds->p0[1] + sds->dx * y + sds->dx * 0.5;
+ voxelCenter[2] = sds->p0[2] + sds->dx * z + sds->dx * 0.5;
+
+ pd_point_from_loc(scene, voxelCenter, vel, index, &epoint);
+ pdDoEffectors(effectors, NULL, sds->effector_weights, &epoint, retvel, NULL);
+
+ // TODO dg - do in force!
+ force_x[index] = MIN2(MAX2(-1.0, retvel[0] * 0.2), 1.0);
+ force_y[index] = MIN2(MAX2(-1.0, retvel[1] * 0.2), 1.0);
+ force_z[index] = MIN2(MAX2(-1.0, retvel[2] * 0.2), 1.0);
}
}
+
+ pdEndEffectors(&effectors);
}
- */
// do collisions
if(1)
@@ -1184,7 +1227,11 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
// simulate the actual smoke (c++ code in intern/smoke)
// DG: interesting commenting this line + deactivating loading of noise files
if(framenr!=startframe)
+ {
+ if(sds->flags & MOD_SMOKE_DISSOLVE)
+ smoke_dissolve(sds->fluid, sds->diss_speed, sds->flags & MOD_SMOKE_DISSOLVE_LOG);
smoke_step(sds->fluid, smd->time);
+ }
// create shadows before writing cache so we get nice shadows for sstartframe, too
if(get_lamp(scene, light))
@@ -1195,7 +1242,11 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
if(sds->wt)
{
if(framenr!=startframe)
+ {
+ if(sds->flags & MOD_SMOKE_DISSOLVE)
+ smoke_dissolve_wavelet(sds->wt, sds->diss_speed, sds->flags & MOD_SMOKE_DISSOLVE_LOG);
smoke_turbulence_step(sds->wt, sds->fluid);
+ }
cache_wt->flag |= PTCACHE_SIMULATION_VALID;
cache_wt->simframe= framenr;
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 2e62ecb8af3..dfefc79af9d 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -1551,11 +1551,14 @@ static void _scan_for_ext_spring_forces(Scene *scene, Object *ob, float timenow,
float f,windfactor = 0.25f;
/*see if we have wind*/
if(do_effector) {
+ EffectedPoint epoint;
float speed[3]={0.0f,0.0f,0.0f};
float pos[3];
VecMidf(pos, sb->bpoint[bs->v1].pos , sb->bpoint[bs->v2].pos);
VecMidf(vel, sb->bpoint[bs->v1].vec , sb->bpoint[bs->v2].vec);
- pdDoEffectors(scene, do_effector, pos, force, speed, (float)scene->r.cfra, 0.0f, PE_WIND_AS_SPEED);
+ pd_point_from_soft(scene, pos, vel, -1, &epoint);
+ pdDoEffectors(do_effector, NULL, sb->effector_weights, &epoint, force, speed);
+
VecMulf(speed,windfactor);
VecAddf(vel,vel,speed);
}
@@ -1590,14 +1593,13 @@ static void _scan_for_ext_spring_forces(Scene *scene, Object *ob, float timenow,
static void scan_for_ext_spring_forces(Scene *scene, Object *ob, float timenow)
{
SoftBody *sb = ob->soft;
- ListBase *do_effector= NULL;
+ ListBase *do_effector = NULL;
- do_effector= pdInitEffectors(scene, ob,NULL);
+ do_effector = pdInitEffectors(scene, ob, NULL, sb->effector_weights);
if (sb){
_scan_for_ext_spring_forces(scene, ob, timenow, 0, sb->totspring, do_effector);
}
- if(do_effector)
- pdEndEffectors(do_effector);
+ pdEndEffectors(&do_effector);
}
static void *exec_scan_for_ext_spring_forces(void *data)
@@ -1615,7 +1617,7 @@ static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow,
int i, totthread,left,dec;
int lowsprings =100; /* wild guess .. may increase with better thread management 'above' or even be UI option sb->spawn_cf_threads_nopts */
- do_effector= pdInitEffectors(scene, ob,NULL);
+ do_effector= pdInitEffectors(scene, ob, NULL, ob->soft->effector_weights);
/* figure the number of threads while preventing pretty pointless threading overhead */
if(scene->r.mode & R_FIXED_THREADS)
@@ -1662,9 +1664,8 @@ static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow,
exec_scan_for_ext_spring_forces(&sb_threads[0]);
/* clean up */
MEM_freeN(sb_threads);
-
- if(do_effector)
- pdEndEffectors(do_effector);
+
+ pdEndEffectors(&do_effector);
}
@@ -2227,19 +2228,22 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
/* done goal stuff */
/* gravitation */
- if (sb){
- float gravity = sb->grav * sb_grav_force_scale(ob);
- bp->force[2]-= gravity*bp->mass; /* individual mass of node here */
+ if (sb && scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY){
+ float gravity[3];
+ VECCOPY(gravity, scene->physics_settings.gravity);
+ VecMulf(gravity, sb_grav_force_scale(ob)*bp->mass*sb->effector_weights->global_gravity); /* individual mass of node here */
+ VecAddf(bp->force, bp->force, gravity);
}
/* particle field & vortex */
if(do_effector) {
+ EffectedPoint epoint;
float kd;
float force[3]= {0.0f, 0.0f, 0.0f};
float speed[3]= {0.0f, 0.0f, 0.0f};
float eval_sb_fric_force_scale = sb_fric_force_scale(ob); /* just for calling function once */
-
- pdDoEffectors(scene, do_effector, bp->pos, force, speed, (float)scene->r.cfra, 0.0f, PE_WIND_AS_SPEED);
+ pd_point_from_soft(scene, bp->pos, bp->vec, sb->bpoint-bp, &epoint);
+ pdDoEffectors(do_effector, NULL, sb->effector_weights, &epoint, force, speed);
/* apply forcefield*/
VecMulf(force,fieldfactor* eval_sb_fric_force_scale);
@@ -2342,6 +2346,7 @@ static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float t
left = totpoint;
dec = totpoint/totthread +1;
for(i=0; i<totthread; i++) {
+ sb_threads[i].scene = scene;
sb_threads[i].ob = ob;
sb_threads[i].forcetime = forcetime;
sb_threads[i].timenow = timenow;
@@ -2382,7 +2387,7 @@ static void softbody_calc_forcesEx(Scene *scene, Object *ob, float forcetime, fl
*/
SoftBody *sb= ob->soft; /* is supposed to be there */
BodyPoint *bproot;
- ListBase *do_effector;
+ ListBase *do_effector = NULL;
float iks, gravity;
float fieldfactor = -1.0f, windfactor = 0.25;
int do_deflector,do_selfcollision,do_springcollision,do_aero;
@@ -2402,7 +2407,7 @@ static void softbody_calc_forcesEx(Scene *scene, Object *ob, float forcetime, fl
sb_sfesf_threads_run(scene, ob, timenow,sb->totspring,NULL);
/* after spring scan because it uses Effoctors too */
- do_effector= pdInitEffectors(scene, ob,NULL);
+ do_effector= pdInitEffectors(scene, ob, NULL, sb->effector_weights);
if (do_deflector) {
float defforce[3];
@@ -2415,7 +2420,7 @@ static void softbody_calc_forcesEx(Scene *scene, Object *ob, float forcetime, fl
if (ob->softflag & OB_SB_FACECOLL) scan_for_ext_face_forces(ob,timenow);
/* finish matrix and solve */
- if(do_effector) pdEndEffectors(do_effector);
+ pdEndEffectors(&do_effector);
}
@@ -2444,8 +2449,8 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
BodyPoint *bp;
BodyPoint *bproot;
BodySpring *bs;
- ListBase *do_effector;
- float iks, ks, kd, gravity;
+ ListBase *do_effector = NULL;
+ float iks, ks, kd, gravity[3] = {0.0f,0.0f,0.0f};
float fieldfactor = -1.0f, windfactor = 0.25f;
float tune = sb->ballstiff;
int a, b, do_deflector,do_selfcollision,do_springcollision,do_aero;
@@ -2461,7 +2466,10 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
*/
- gravity = sb->grav * sb_grav_force_scale(ob);
+ if (scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY){
+ VECCOPY(gravity, scene->physics_settings.gravity);
+ VecMulf(gravity, sb_grav_force_scale(ob)*sb->effector_weights->global_gravity);
+ }
/* check conditions for various options */
do_deflector= query_external_colliders(scene, ob);
@@ -2474,7 +2482,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
if (do_springcollision || do_aero) scan_for_ext_spring_forces(scene, ob, timenow);
/* after spring scan because it uses Effoctors too */
- do_effector= pdInitEffectors(scene, ob,NULL);
+ do_effector= pdInitEffectors(scene, ob, NULL, ob->soft->effector_weights);
if (do_deflector) {
float defforce[3];
@@ -2632,16 +2640,17 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
/* gravitation */
- bp->force[2]-= gravity*bp->mass; /* individual mass of node here */
+ VECADDFAC(bp->force, bp->force, gravity, bp->mass); /* individual mass of node here */
/* particle field & vortex */
if(do_effector) {
+ EffectedPoint epoint;
float force[3]= {0.0f, 0.0f, 0.0f};
float speed[3]= {0.0f, 0.0f, 0.0f};
float eval_sb_fric_force_scale = sb_fric_force_scale(ob); /* just for calling function once */
-
- pdDoEffectors(scene, do_effector, bp->pos, force, speed, (float)scene->r.cfra, 0.0f, PE_WIND_AS_SPEED);
+ pd_point_from_soft(scene, bp->pos, bp->vec, sb->bpoint-bp, &epoint);
+ pdDoEffectors(do_effector, NULL, sb->effector_weights, &epoint, force, speed);
/* apply forcefield*/
VecMulf(force,fieldfactor* eval_sb_fric_force_scale);
@@ -2820,7 +2829,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
}
/* cleanup */
#endif
- if(do_effector) pdEndEffectors(do_effector);
+ pdEndEffectors(&do_effector);
}
}
@@ -3636,6 +3645,9 @@ SoftBody *sbNew(Scene *scene)
sb->pointcache = BKE_ptcache_add(&sb->ptcaches);
+ if(!sb->effector_weights)
+ sb->effector_weights = BKE_add_effector_weights(NULL);
+
return sb;
}
@@ -3645,6 +3657,8 @@ void sbFree(SoftBody *sb)
free_softbody_intern(sb);
BKE_ptcache_free_list(&sb->ptcaches);
sb->pointcache = NULL;
+ if(sb->effector_weights)
+ MEM_freeN(sb->effector_weights);
MEM_freeN(sb);
}
@@ -3685,6 +3699,9 @@ static void softbody_update_positions(Object *ob, SoftBody *sb, float (*vertexCo
BodyPoint *bp;
int a;
+ if(!sb || !sb->bpoint)
+ return;
+
for(a=0,bp=sb->bpoint; a<numVerts; a++, bp++) {
/* store where goals are now */
VECCOPY(bp->origS, bp->origE);
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 2d5d8dad7a8..6ac9b020f21 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -340,7 +340,7 @@ void sound_update_playing(struct bContext *C)
for(handle = scene->sound_handles.first; handle; handle = handle->next)
{
- if(cfra < handle->startframe || cfra >= handle->endframe || handle->mute)
+ if(cfra < handle->startframe || cfra >= handle->endframe || handle->mute || (scene->audio.flag & AUDIO_MUTE))
{
if(handle->state == AUD_STATUS_PLAYING)
{
@@ -421,7 +421,7 @@ void sound_scrub(struct bContext *C)
int cfra = CFRA;
float fps = FPS;
- if(scene->r.audio.flag & AUDIO_SCRUB && !CTX_wm_screen(C)->animtimer)
+ if(scene->audio.flag & AUDIO_SCRUB && !CTX_wm_screen(C)->animtimer)
{
AUD_lock();
@@ -443,7 +443,7 @@ void sound_scrub(struct bContext *C)
}
}
-AUD_Device* sound_mixdown(struct Scene *scene, AUD_Specs specs, int start, int end)
+AUD_Device* sound_mixdown(struct Scene *scene, AUD_Specs specs, int start, int end, float volume)
{
AUD_Device* mixdown = AUD_openReadDevice(specs);
SoundHandle *handle;
@@ -453,6 +453,8 @@ AUD_Device* sound_mixdown(struct Scene *scene, AUD_Specs specs, int start, int e
end++;
+ AUD_setDeviceVolume(mixdown, volume);
+
for(handle = scene->sound_handles.first; handle; handle = handle->next)
{
if(start < handle->endframe && end > handle->startframe && !handle->mute && handle->source && handle->source->handle)
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 350b0acba9d..8bf0f6b8bdf 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -596,17 +596,15 @@ static TextLine *txt_new_line(char *str)
return tmp;
}
-static TextLine *txt_new_linen(char *str, int n)
+static TextLine *txt_new_linen(const char *str, int n)
{
TextLine *tmp;
- if(!str) str= "";
-
tmp= (TextLine *) MEM_mallocN(sizeof(TextLine), "textline");
tmp->line= MEM_mallocN(n+1, "textline_string");
tmp->format= NULL;
- BLI_strncpy(tmp->line, str, n+1);
+ BLI_strncpy(tmp->line, (str)? str: "", n+1);
tmp->len= strlen(tmp->line);
tmp->next= tmp->prev= NULL;
@@ -2834,3 +2832,60 @@ TextMarker *txt_next_marker(Text *text, TextMarker *marker) {
}
return NULL; /* Only if marker==NULL */
}
+
+
+/*******************************/
+/* Character utility functions */
+/*******************************/
+
+int text_check_bracket(char ch)
+{
+ int a;
+ char opens[] = "([{";
+ char close[] = ")]}";
+
+ for(a=0; a<(sizeof(opens)-1); a++) {
+ if(ch==opens[a])
+ return a+1;
+ else if(ch==close[a])
+ return -(a+1);
+ }
+ return 0;
+}
+
+int text_check_delim(char ch)
+{
+ int a;
+ char delims[] = "():\"\' ~!%^&*-+=[]{};/<>|.#\t,";
+
+ for(a=0; a<(sizeof(delims)-1); a++) {
+ if(ch==delims[a])
+ return 1;
+ }
+ return 0;
+}
+
+int text_check_digit(char ch)
+{
+ if(ch < '0') return 0;
+ if(ch <= '9') return 1;
+ return 0;
+}
+
+int text_check_identifier(char ch)
+{
+ if(ch < '0') return 0;
+ if(ch <= '9') return 1;
+ if(ch < 'A') return 0;
+ if(ch <= 'Z' || ch == '_') return 1;
+ if(ch < 'a') return 0;
+ if(ch <= 'z') return 1;
+ return 0;
+}
+
+int text_check_whitespace(char ch)
+{
+ if(ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n')
+ return 1;
+ return 0;
+}
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index d7616ec8a9a..33dfcfca76e 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -559,6 +559,36 @@ void default_mtex(MTex *mtex)
mtex->norfac= 1.0;
mtex->varfac= 1.0;
mtex->dispfac=0.2;
+ mtex->colspecfac= 1.0f;
+ mtex->mirrfac= 1.0f;
+ mtex->alphafac= 1.0f;
+ mtex->difffac= 1.0f;
+ mtex->specfac= 1.0f;
+ mtex->emitfac= 1.0f;
+ mtex->hardfac= 1.0f;
+ mtex->raymirrfac= 1.0f;
+ mtex->translfac= 1.0f;
+ mtex->ambfac= 1.0f;
+ mtex->colemitfac= 1.0f;
+ mtex->colreflfac= 1.0f;
+ mtex->coltransfac= 1.0f;
+ mtex->densfac= 1.0f;
+ mtex->scatterfac= 1.0f;
+ mtex->reflfac= 1.0f;
+ mtex->shadowfac= 1.0f;
+ mtex->zenupfac= 1.0f;
+ mtex->zendownfac= 1.0f;
+ mtex->blendfac= 1.0f;
+ mtex->timefac= 1.0f;
+ mtex->lengthfac= 1.0f;
+ mtex->clumpfac= 1.0f;
+ mtex->kinkfac= 1.0f;
+ mtex->roughfac= 1.0f;
+ mtex->padensfac= 1.0f;
+ mtex->lifefac= 1.0f;
+ mtex->sizefac= 1.0f;
+ mtex->ivelfac= 1.0f;
+ mtex->pvelfac= 1.0f;
mtex->normapspace= MTEX_NSPACE_TANGENT;
}
@@ -779,72 +809,244 @@ void autotexname(Tex *tex)
/* ------------------------------------------------------------------------- */
-Tex *give_current_texture(Object *ob, int act)
+Tex *give_current_object_texture(Object *ob)
{
- Material ***matarar, *ma;
- Lamp *la = 0;
- MTex *mtex = 0;
- Tex *tex = 0;
- bNode *node;
+ Material *ma;
+ Tex *tex= NULL;
if(ob==0) return 0;
if(ob->totcol==0 && !(ob->type==OB_LAMP)) return 0;
if(ob->type==OB_LAMP) {
- la=(Lamp *)ob->data;
- if(la) {
- mtex= la->mtex[(int)(la->texact)];
- if(mtex) tex= mtex->tex;
- }
+ tex= give_current_lamp_texture(ob->data);
} else {
- if(act>ob->totcol) act= ob->totcol;
- else if(act==0) act= 1;
-
- if(ob->matbits[act-1]) { /* in object */
- ma= ob->mat[act-1];
- }
- else { /* in data */
- matarar= give_matarar(ob);
-
- if(matarar && *matarar) ma= (*matarar)[act-1];
- else ma= 0;
+ ma= give_current_material(ob, ob->actcol);
+ tex= give_current_material_texture(ma);
+ }
+
+ return tex;
+}
+
+Tex *give_current_lamp_texture(Lamp *la)
+{
+ MTex *mtex= NULL;
+ Tex *tex= NULL;
+
+ if(la) {
+ mtex= la->mtex[(int)(la->texact)];
+ if(mtex) tex= mtex->tex;
+ }
+
+ return tex;
+}
+
+void set_current_lamp_texture(Lamp *la, Tex *newtex)
+{
+ int act= la->texact;
+
+ if(la->mtex[act] && la->mtex[act]->tex)
+ id_us_min(&la->mtex[act]->tex->id);
+
+ if(newtex) {
+ if(!la->mtex[act]) {
+ la->mtex[act]= add_mtex();
+ la->mtex[act]->texco= TEXCO_GLOB;
}
+
+ la->mtex[act]->tex= newtex;
+ id_us_plus(&newtex->id);
+ }
+ else if(la->mtex[act]) {
+ MEM_freeN(la->mtex[act]);
+ la->mtex[act]= NULL;
+ }
+}
- if(ma && ma->use_nodes && ma->nodetree) {
- node= nodeGetActiveID(ma->nodetree, ID_TE);
+Tex *give_current_material_texture(Material *ma)
+{
+ MTex *mtex= NULL;
+ Tex *tex= NULL;
+ bNode *node;
+
+ if(ma && ma->use_nodes && ma->nodetree) {
+ node= nodeGetActiveID(ma->nodetree, ID_TE);
- if(node) {
- tex= (Tex *)node->id;
- ma= NULL;
- }
- else {
- node= nodeGetActiveID(ma->nodetree, ID_MA);
- if(node)
- ma= (Material*)node->id;
- }
+ if(node) {
+ tex= (Tex *)node->id;
+ ma= NULL;
}
- if(ma) {
- mtex= ma->mtex[(int)(ma->texact)];
- if(mtex) tex= mtex->tex;
+ else {
+ node= nodeGetActiveID(ma->nodetree, ID_MA);
+ if(node)
+ ma= (Material*)node->id;
}
}
+ if(ma) {
+ mtex= ma->mtex[(int)(ma->texact)];
+ if(mtex) tex= mtex->tex;
+ }
return tex;
}
-Tex *give_current_world_texture(Scene *scene)
+int give_active_mtex(ID *id, MTex ***mtex_ar, short *act)
+{
+ switch(GS(id->name)) {
+ case ID_MA:
+ *mtex_ar= ((Material *)id)->mtex;
+ if(act) *act= (((Material *)id)->texact);
+ break;
+ case ID_WO:
+ *mtex_ar= ((World *)id)->mtex;
+ if(act) *act= (((World *)id)->texact);
+ break;
+ case ID_LA:
+ *mtex_ar= ((Lamp *)id)->mtex;
+ if(act) *act= (((Lamp *)id)->texact);
+ break;
+ case ID_BR:
+ *mtex_ar= ((Brush *)id)->mtex;
+ if(act) *act= (((Brush *)id)->texact);
+ break;
+ default:
+ *mtex_ar = NULL;
+ if(act) *act= 0;
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+void set_active_mtex(ID *id, short act)
{
- MTex *mtex = 0;
- Tex *tex = 0;
+ if(act<0) act= 0;
+ else if(act>=MAX_MTEX) act= MAX_MTEX-1;
+
+ switch(GS(id->name)) {
+ case ID_MA:
+ ((Material *)id)->texact= act;
+ break;
+ case ID_WO:
+ ((World *)id)->texact= act;
+ break;
+ case ID_LA:
+ ((Lamp *)id)->texact= act;
+ break;
+ case ID_BR:
+ ((Brush *)id)->texact= act;
+ break;
+ }
+}
+
+void set_current_material_texture(Material *ma, Tex *newtex)
+{
+ Tex *tex= NULL;
+ bNode *node;
+
+ if(ma && ma->use_nodes && ma->nodetree) {
+ node= nodeGetActiveID(ma->nodetree, ID_TE);
+
+ if(node) {
+ tex= (Tex *)node->id;
+ id_us_min(&tex->id);
+ node->id= &newtex->id;
+ id_us_plus(&newtex->id);
+ ma= NULL;
+ }
+ else {
+ node= nodeGetActiveID(ma->nodetree, ID_MA);
+ if(node)
+ ma= (Material*)node->id;
+ }
+ }
+ if(ma) {
+ int act= (int)ma->texact;
+
+ tex= (ma->mtex[act])? ma->mtex[act]->tex: NULL;
+ id_us_min(&tex->id);
+
+ if(newtex) {
+ if(!ma->mtex[act])
+ ma->mtex[act]= add_mtex();
+
+ ma->mtex[act]->tex= newtex;
+ id_us_plus(&newtex->id);
+ }
+ else if(ma->mtex[act]) {
+ MEM_freeN(ma->mtex[act]);
+ ma->mtex[act]= NULL;
+ }
+ }
+}
+
+Tex *give_current_world_texture(World *world)
+{
+ MTex *mtex= NULL;
+ Tex *tex= NULL;
- if(!(scene->world)) return 0;
+ if(!world) return 0;
- mtex= scene->world->mtex[(int)(scene->world->texact)];
+ mtex= world->mtex[(int)(world->texact)];
if(mtex) tex= mtex->tex;
return tex;
}
+void set_current_world_texture(World *wo, Tex *newtex)
+{
+ int act= wo->texact;
+
+ if(wo->mtex[act] && wo->mtex[act]->tex)
+ id_us_min(&wo->mtex[act]->tex->id);
+
+ if(newtex) {
+ if(!wo->mtex[act]) {
+ wo->mtex[act]= add_mtex();
+ wo->mtex[act]->texco= TEXCO_VIEW;
+ }
+
+ wo->mtex[act]->tex= newtex;
+ id_us_plus(&newtex->id);
+ }
+ else if(wo->mtex[act]) {
+ MEM_freeN(wo->mtex[act]);
+ wo->mtex[act]= NULL;
+ }
+}
+
+Tex *give_current_brush_texture(Brush *br)
+{
+ MTex *mtex= NULL;
+ Tex *tex= NULL;
+
+ if(br) {
+ mtex= br->mtex[(int)(br->texact)];
+ if(mtex) tex= mtex->tex;
+ }
+
+ return tex;
+}
+
+void set_current_brush_texture(Brush *br, Tex *newtex)
+{
+ int act= br->texact;
+
+ if(br->mtex[act] && br->mtex[act]->tex)
+ id_us_min(&br->mtex[act]->tex->id);
+
+ if(newtex) {
+ if(!br->mtex[act])
+ br->mtex[act]= add_mtex();
+
+ br->mtex[act]->tex= newtex;
+ id_us_plus(&newtex->id);
+ }
+ else if(br->mtex[act]) {
+ MEM_freeN(br->mtex[act]);
+ br->mtex[act]= NULL;
+ }
+}
+
/* ------------------------------------------------------------------------- */
EnvMap *BKE_add_envmap(void)
@@ -984,6 +1186,7 @@ struct VoxelData *BKE_add_voxeldata(void)
vd->interp_type= TEX_VD_LINEAR;
vd->file_format= TEX_VD_SMOKE;
vd->int_multiplier = 1.0;
+ vd->extend = TEX_CLIP;
vd->object = NULL;
return vd;
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index f8e3b3c5ad2..1f72c894cc8 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -75,7 +75,7 @@ static struct bUnitCollection buDummyCollecton = {buDummyDef, 0, 0, sizeof(buDum
/* Lengths */
static struct bUnitDef buMetricLenDef[] = {
{"kilometer", "kilometers", "km", NULL, "Kilometers", 1000.0, 0.0, B_UNIT_DEF_NONE},
- {"hectometer", "hectometers", "hm", NULL, "10 Meters", 100.0, 0.0, B_UNIT_DEF_SUPPRESS},
+ {"hectometer", "hectometers", "hm", NULL, "100 Meters", 100.0, 0.0, B_UNIT_DEF_SUPPRESS},
{"dekameter", "dekameters", "dkm",NULL, "10 Meters", 10.0, 0.0, B_UNIT_DEF_SUPPRESS},
{"meter", "meters", "m", NULL, "Meters", 1.0, 0.0, B_UNIT_DEF_NONE}, /* base unit */
{"decimetre", "decimetres", "dm", NULL, "10 Centimeters", 0.1, 0.0, B_UNIT_DEF_SUPPRESS},
@@ -485,7 +485,7 @@ int bUnit_ReplaceString(char *str, int len_max, char *str_prev, double scale_pre
if(unit==NULL)
unit= unit_default(usys);
- /* add the unit prefic and re-run, use brackets incase there was an expression given */
+ /* add the unit prefix and re-run, use brackets incase there was an expression given */
if(snprintf(str_tmp, sizeof(str_tmp), "(%s)%s", str, unit->name) < sizeof(str_tmp)) {
strncpy(str, str_tmp, len_max);
return bUnit_ReplaceString(str, len_max, NULL, scale_pref, system, type);
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index f795c147f54..c75c9272e5c 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -86,15 +86,20 @@ World *add_world(char *name)
wrld= alloc_libblock(&G.main->world, ID_WO, name);
- wrld->horb= 0.6f;
- wrld->skytype= WO_SKYBLEND;
+ wrld->horr= 0.25f;
+ wrld->horg= 0.25f;
+ wrld->horb= 0.25f;
+ wrld->zenr= 0.1f;
+ wrld->zeng= 0.1f;
+ wrld->zenb= 0.1f;
+ wrld->skytype= 0;
wrld->stardist= 15.0f;
wrld->starsize= 2.0f;
wrld->exp= 0.0f;
wrld->exposure=wrld->range= 1.0f;
- wrld->aodist= 5.0f;
+ wrld->aodist= 10.0f;
wrld->aosamp= 5;
wrld->aoenergy= 1.0f;
wrld->aobias= 0.05f;
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 9e86dcbe491..1953058fddf 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -148,7 +148,7 @@ static int write_audio_frame(void)
#else
pkt.pts = c->coded_frame->pts;
#endif
- fprintf(stderr, "Audio Frame PTS: %lld\n", pkt.pts);
+ fprintf(stderr, "Audio Frame PTS: %d\n", (int)pkt.pts);
pkt.stream_index = audio_stream->index;
pkt.flags |= PKT_FLAG_KEY;
@@ -265,7 +265,7 @@ static void write_video_frame(RenderData *rd, AVFrame* frame)
#else
packet.pts = c->coded_frame->pts;
#endif
- fprintf(stderr, "Video Frame PTS: %lld\n", packet.pts);
+ fprintf(stderr, "Video Frame PTS: %d\n", (int)packet.pts);
} else {
fprintf(stderr, "Video Frame PTS: not set\n");
}
@@ -559,7 +559,7 @@ static AVStream* alloc_audio_stream(RenderData *rd, int codec_id, AVFormatContex
c->codec_id = codec_id;
c->codec_type = CODEC_TYPE_AUDIO;
- c->sample_rate = rd->audio.mixrate;
+ c->sample_rate = rd->ffcodecdata.audio_mixrate;
c->bit_rate = ffmpeg_audio_bitrate*1000;
c->channels = 2;
codec = avcodec_find_encoder(c->codec_id);
@@ -734,7 +734,7 @@ static void start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty)
if (ffmpeg_type == FFMPEG_DV) {
fmt->audio_codec = CODEC_ID_PCM_S16LE;
- if (ffmpeg_multiplex_audio && rd->audio.mixrate != 48000) {
+ if (ffmpeg_multiplex_audio && rd->ffcodecdata.audio_mixrate != 48000) {
G.afbreek = 1;
//XXX error("FFMPEG only supports 48khz / stereo "
// "audio for DV!");
@@ -831,7 +831,6 @@ static void makeffmpegstring(RenderData* rd, char* string) {
}
}
-
void start_ffmpeg(struct Scene *scene, RenderData *rd, int rectx, int recty)
{
ffmpeg_autosplit_count = 0;
@@ -844,8 +843,8 @@ void start_ffmpeg(struct Scene *scene, RenderData *rd, int rectx, int recty)
AUD_Specs specs;
specs.channels = c->channels;
specs.format = AUD_FORMAT_S16;
- specs.rate = rd->audio.mixrate;
- audio_mixdown_device = sound_mixdown(scene, specs, rd->sfra, rd->efra);
+ specs.rate = rd->ffcodecdata.audio_mixrate;
+ audio_mixdown_device = sound_mixdown(scene, specs, rd->sfra, rd->efra, rd->ffcodecdata.audio_volume);
}
}
diff --git a/source/blender/blenlib/BLI_arithb.h b/source/blender/blenlib/BLI_arithb.h
index 40076755fa0..f4d91891dd1 100644
--- a/source/blender/blenlib/BLI_arithb.h
+++ b/source/blender/blenlib/BLI_arithb.h
@@ -178,7 +178,7 @@ float power_of_2(float val);
*/
/* Defines for rotation orders
- * WARNING: must match the ePchan_RotMode in DNA_action_types.h
+ * WARNING: must match the eRotationModes in DNA_action_types.h
* order matters - types are saved to file!
*/
typedef enum eEulerRotationOrders {
@@ -345,7 +345,7 @@ void VecUpMat3(float *vec, float mat[][3], short axis);
void VecCopyf(float *v1, float *v2);
int VecLen(int *v1, int *v2);
-float VecLenf(float *v1, float *v2);
+float VecLenf(float v1[3], float v2[3]);
float VecLength(float *v);
void VecMulf(float *v1, float f);
void VecNegf(float *v1);
@@ -361,7 +361,8 @@ void printvec4f(char *str, float v[4]);
void VecAddf(float *v, float *v1, float *v2);
void VecSubf(float *v, float *v1, float *v2);
void VecMulVecf(float *v, float *v1, float *v2);
-void VecLerpf(float *target, float *a, float *b, float t);
+void VecLerpf(float *target, const float *a, const float *b, const float t);
+void VecLerp3f(float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3]);
void VecMidf(float *v, float *v1, float *v2);
void VecOrthoBasisf(float *v, float *v1, float *v2);
@@ -372,7 +373,8 @@ void Vec2Mulf(float *v1, float f);
void Vec2Addf(float *v, float *v1, float *v2);
void Vec2Subf(float *v, float *v1, float *v2);
void Vec2Copyf(float *v1, float *v2);
-void Vec2Lerpf(float *target, float *a, float *b, float t);
+void Vec2Lerpf(float *target, const float *a, const float *b, const float t);
+void Vec2Lerp3f(float p[2], const float v1[2], const float v2[2], const float v3[2], const float w[3]);
void AxisAngleToQuat(float q[4], float axis[3], float angle);
void QuatToAxisAngle(float q[4], float axis[3], float *angle);
@@ -398,7 +400,7 @@ float VecAngle2(float *v1, float *v2);
float VecAngle3(float *v1, float *v2, float *v3);
float NormalizedVecAngle2(float *v1, float *v2);
-float VecAngle3_2D(float *v1, float *v2, float *v3);
+float Vec2Angle3(float *v1, float *v2, float *v3);
float NormalizedVecAngle2_2D(float *v1, float *v2);
void NormalShortToFloat(float *out, short *in);
@@ -407,7 +409,7 @@ void NormalFloatToShort(short *out, float *in);
float DistVL2Dfl(float *v1, float *v2, float *v3);
float PdistVL2Dfl(float *v1, float *v2, float *v3);
float PdistVL3Dfl(float *v1, float *v2, float *v3);
-void PclosestVL3Dfl(float *closest, float *v1, float *v2, float *v3);
+void PclosestVL3Dfl(float *closest, float v1[3], float v2[3], float v3[3]);
float AreaF2Dfl(float *v1, float *v2, float *v3);
float AreaQ3Dfl(float *v1, float *v2, float *v3, float *v4);
float AreaT3Dfl(float *v1, float *v2, float *v3);
@@ -451,6 +453,8 @@ void i_window(
#define BLI_CS_REC709 1
#define BLI_CS_CIE 2
+#define RAD2DEG(_rad) ((_rad)*(180.0/M_PI))
+
void hsv_to_rgb(float h, float s, float v, float *r, float *g, float *b);
void hex_to_rgb(char *hexcol, float *r, float *g, float *b);
void rgb_to_yuv(float r, float g, float b, float *ly, float *lu, float *lv);
@@ -522,6 +526,8 @@ int point_in_tri_prism(float p[3], float v1[3], float v2[3], float v3[3]);
float lambda_cp_line_ex(float p[3], float l1[3], float l2[3], float cp[3]);
+float AngleToLength(const float angle);
+
typedef struct DualQuat {
float quat[4];
float trans[4];
diff --git a/source/blender/blenlib/BLI_bfile.h b/source/blender/blenlib/BLI_bfile.h
new file mode 100644
index 00000000000..92543558a19
--- /dev/null
+++ b/source/blender/blenlib/BLI_bfile.h
@@ -0,0 +1,138 @@
+/*
+ * $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 Stichting Blender Foundation.
+ * All rights reserved.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ * BFILE* based abstraction of file access.
+ */
+
+#ifndef BLI_BFILE_H
+#define BLI_BFILE_H
+
+/* For fopen's FILE */
+#include <stdio.h>
+
+/**
+ Defines for the bflags param.
+ */
+/* Special handling: */
+/* For "symmetry" of flags */
+#define BFILE_NORMAL (0)
+/* No supervision, just translate // if needed, RISKY */
+#define BFILE_RAW (1<<0)
+/* Path is relative to config dirs */
+#define BFILE_CONFIG (1<<1)
+/* Path is for current session temp file */
+#define BFILE_TEMP (1<<2)
+
+/* Config handling, special cases: */
+#define BFILE_USERONLY (1<<3)
+#define BFILE_SYSONLY (1<<4)
+
+/* Compression to apply on close: */
+#define BFILE_GZIP (1<<5)
+
+/**
+ File descriptor for Blender abstracted file access.
+ */
+typedef struct {
+ FILE *stream;
+ int fd;
+
+ /* Anything below should not be touched directly */
+ int uflags; /* Special options requested by upper level, copy of bflags */
+ char *fpath; /* Final/requested path name */
+ char *tpath; /* Temp path name if applicable */
+ int type; /* Own flags, common classification of open and fopen */
+ int error; /* An op caused an error, unsafe to replace older files */
+} BFILE;
+
+/**
+ Open a BFILE* with fopen()-like syntax.
+ */
+BFILE *BLI_bfile_fopen(const char *path, const char *mode, int bflags);
+
+/**
+ Open a BFILE* with open()-like syntax.
+ */
+BFILE *BLI_bfile_open(const char *pathname, int flags, int bflags);
+
+/**
+ Get the FILE* associated with the BFILE*.
+ */
+FILE *BLI_bfile_file_from_bfile(BFILE *bfile);
+
+/**
+ Get the fd associated with the BFILE*.
+ */
+int BLI_bfile_fd_from_bfile(BFILE *bfile);
+
+/**
+ write()-like using BFILE*.
+ */
+ssize_t BLI_bfile_write(BFILE *f, const void *buf, size_t count);
+
+/**
+ read()-like using BFILE*.
+ */
+ssize_t BLI_bfile_read(BFILE *f, void *buf, size_t count);
+
+/**
+ fwrite()-like using BFILE*.
+ */
+size_t BLI_bfile_fwrite(const void *ptr, size_t size, size_t nmemb, BFILE *f);
+
+/**
+ fread()-like using BFILE*.
+ */
+size_t BLI_bfile_fread(void *ptr, size_t size, size_t nmemb, BFILE *f);
+
+/**
+ Close a BFILE, to match close() and fclose().
+ */
+void BLI_bfile_close(BFILE *bfile);
+
+/**
+ Clear error status.
+ Call it only if the error has been really handled.
+ */
+void BLI_bfile_clear_error(BFILE *bfile);
+
+/**
+ Set the error status.
+ Call it to mark writing by a 3rd party failed (libjpeg reported error, ie).
+ */
+void BLI_bfile_set_error(BFILE *bfile, int error);
+
+/*
+TODO
+Maybe also provide more OS/libc things like:
+fflush
+fprintf and related
+fscanf
+fgetc/fputc and related
+fseek and related
+
+Probably good to do:
+readdir (compacted list showing all files for a "directory" (user versions on top of system's))
+*/
+
+#endif /* ifndef BLI_BFILE_H */
diff --git a/source/blender/blenlib/BLI_listbase.h b/source/blender/blenlib/BLI_listbase.h
index d0b106b59c3..21b4c83bd88 100644
--- a/source/blender/blenlib/BLI_listbase.h
+++ b/source/blender/blenlib/BLI_listbase.h
@@ -34,6 +34,7 @@
//#include "DNA_listbase.h"
struct ListBase;
+struct LinkData;
#ifdef __cplusplus
extern "C" {
@@ -56,6 +57,9 @@ int BLI_countlist(struct ListBase *listbase);
void BLI_freelinkN(struct ListBase *listbase, void *vlink);
void BLI_duplicatelist(struct ListBase *list1, struct ListBase *list2); /* copy from 2 to 1 */
+/* create a generic list node containing link to provided data */
+struct LinkData *BLI_genericNodeN(void *data);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenlib/BLI_memarena.h b/source/blender/blenlib/BLI_memarena.h
index a2954f8fa0d..fcf6ae02900 100644
--- a/source/blender/blenlib/BLI_memarena.h
+++ b/source/blender/blenlib/BLI_memarena.h
@@ -37,6 +37,10 @@
#ifndef BLI_MEMARENA_H
#define BLI_MEMARENA_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* A reasonable standard buffer size, big
* enough to not cause much internal fragmentation,
* small enough not to waste resources
@@ -53,7 +57,14 @@ void BLI_memarena_free (struct MemArena *ma);
void BLI_memarena_use_malloc (struct MemArena *ma);
void BLI_memarena_use_calloc (struct MemArena *ma);
+void BLI_memarena_use_align(struct MemArena *ma, int align);
+
void* BLI_memarena_alloc (struct MemArena *ma, int size);
+#ifdef __cplusplus
+}
+#endif
+
+
#endif
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h
index bf93dc19cc5..fb345de72e9 100644
--- a/source/blender/blenlib/BLI_string.h
+++ b/source/blender/blenlib/BLI_string.h
@@ -68,6 +68,29 @@ char *BLI_strdupn(const char *str, int len);
*/
char *BLI_strncpy(char *dst, const char *src, int maxncpy);
+ /* Makes a copy of the text within the "" that appear after some text 'blahblah'
+ * i.e. for string 'pose["apples"]' with prefix 'pose[', it should grab "apples"
+ *
+ * - str: is the entire string to chop
+ * - prefix: is the part of the string to leave out
+ *
+ * Assume that the strings returned must be freed afterwards, and that the inputs will contain
+ * data we want...
+ */
+char *BLI_getQuotedStr(const char *str, const char *prefix);
+
+ /**
+ * Returns a copy of the cstring @a str into a newly mallocN'd
+ * string with all instances of oldText replaced with newText,
+ * and returns it.
+ *
+ * @param str The string to replace occurances of oldText in
+ * @param oldText The text in the string to find and replace
+ * @param newText The text in the string to find and replace
+ * @retval Returns the duplicated string
+ */
+char *BLI_replacestr(char *str, const char *oldText, const char *newText);
+
/*
* Replacement for snprintf
*/
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h
index 8babb5fe780..ace9ddd729f 100644
--- a/source/blender/blenlib/BLI_threads.h
+++ b/source/blender/blenlib/BLI_threads.h
@@ -31,14 +31,15 @@
#ifndef BLI_THREADS_H
#define BLI_THREADS_H
-/* one custom lock available now. can be extended */
-#define LOCK_IMAGE 0
-#define LOCK_CUSTOM1 1
+#include <pthread.h>
/* for tables, button in UI, etc */
#define BLENDER_MAX_THREADS 8
struct ListBase;
+
+/* Threading API */
+
void BLI_init_threads (struct ListBase *threadbase, void *(*do_thread)(void *), int tot);
int BLI_available_threads(struct ListBase *threadbase);
int BLI_available_thread_index(struct ListBase *threadbase);
@@ -48,18 +49,46 @@ void BLI_remove_thread_index(struct ListBase *threadbase, int index);
void BLI_remove_threads(struct ListBase *threadbase);
void BLI_end_threads (struct ListBase *threadbase);
-void BLI_lock_thread (int type);
-void BLI_unlock_thread (int type);
+/* System Information */
+
+int BLI_system_thread_count(void); /* gets the number of threads the system can make use of */
+
+/* Global Mutex Locks
+ *
+ * One custom lock available now. can be extended. */
+
+#define LOCK_IMAGE 0
+#define LOCK_PREVIEW 1
+#define LOCK_CUSTOM1 2
+
+void BLI_lock_thread(int type);
+void BLI_unlock_thread(int type);
+
+/* Mutex Lock */
+
+typedef pthread_mutex_t ThreadMutex;
+
+void BLI_mutex_init(ThreadMutex *mutex);
+void BLI_mutex_lock(ThreadMutex *mutex);
+void BLI_mutex_unlock(ThreadMutex *mutex);
+void BLI_mutex_end(ThreadMutex *mutex);
-int BLI_system_thread_count( void ); /* gets the number of threads the system can make use of */
+/* Read/Write Mutex Lock */
- /* exported by preview render, it has to ensure render buffers are not freed while draw */
-void BLI_lock_malloc_thread(void);
-void BLI_unlock_malloc_thread(void);
+#define THREAD_LOCK_READ 1
+#define THREAD_LOCK_WRITE 2
-/* ThreadedWorker is a simple tool for dispatching work to a limited number of threads in a transparent
- * fashion from the caller's perspective
- * */
+typedef pthread_rwlock_t ThreadRWMutex;
+
+void BLI_rw_mutex_init(ThreadRWMutex *mutex);
+void BLI_rw_mutex_lock(ThreadRWMutex *mutex, int mode);
+void BLI_rw_mutex_unlock(ThreadRWMutex *mutex);
+void BLI_rw_mutex_end(ThreadRWMutex *mutex);
+
+/* ThreadedWorker
+ *
+ * A simple tool for dispatching work to a limited number of threads
+ * in a transparent fashion from the caller's perspective. */
struct ThreadedWorker;
diff --git a/source/blender/blenlib/BLI_util.h b/source/blender/blenlib/BLI_util.h
index f9a84e071e7..1ce7a8cdb77 100644
--- a/source/blender/blenlib/BLI_util.h
+++ b/source/blender/blenlib/BLI_util.h
@@ -42,7 +42,14 @@ struct ListBase;
struct direntry;
char *BLI_gethome(void);
-char *BLI_gethome_folder(char *folder_name);
+char *BLI_gethome_folder(char *folder_name, int flag);
+
+/* BLI_gethome_folder flag */
+#define BLI_GETHOME_LOCAL 1<<1 /* relative location for portable binaries */
+#define BLI_GETHOME_SYSTEM 1<<2 /* system location, or set from the BLENDERPATH env variable (UNIX only) */
+#define BLI_GETHOME_USER 1<<3 /* home folder ~/.blender */
+#define BLI_GETHOME_ALL (BLI_GETHOME_SYSTEM|BLI_GETHOME_LOCAL|BLI_GETHOME_USER)
+
void BLI_setenv(const char *env, const char *val);
void BLI_make_file_string(const char *relabase, char *string, const char *dir, const char *file);
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index b46ebebacd5..757b3605203 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -28,7 +28,13 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
+
+#ifndef __WINSTUFF_H__
+#define __WINSTUFF_H__
+
+#ifndef FREE_WINDOWS
#pragma warning(once: 4761 4305 4244 4018)
+#endif
#define WIN32_LEAN_AND_MEAN
@@ -56,10 +62,7 @@
#undef small
-#ifndef __WINSTUFF_H__
-#define __WINSTUFF_H__
-
- // These definitions are also in arithb for simplicity
+// These definitions are also in arithb for simplicity
#ifdef __cplusplus
extern "C" {
@@ -91,6 +94,16 @@ extern "C" {
typedef unsigned int mode_t;
#endif
+/* mingw using _SSIZE_T_ to declare ssize_t type */
+#ifndef _SSIZE_T_
+#define _SSIZE_T_
+/* python uses HAVE_SSIZE_T */
+#ifndef HAVE_SSIZE_T
+#define HAVE_SSIZE_T 1
+typedef long ssize_t;
+#endif
+#endif
+
struct dirent {
int d_ino;
int d_off;
diff --git a/source/blender/blenlib/intern/BLI_bfile.c b/source/blender/blenlib/intern/BLI_bfile.c
new file mode 100644
index 00000000000..a7ce1df5712
--- /dev/null
+++ b/source/blender/blenlib/intern/BLI_bfile.c
@@ -0,0 +1,236 @@
+/*
+ * $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 Stichting Blender Foundation.
+ * All rights reserved.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ * BFILE* based abstraction for file access.
+ */
+
+#include <string.h>
+
+#ifndef WIN32
+ #include <unistd.h>
+#else
+ #include <io.h>
+ #include "BLI_winstuff.h"
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_bfile.h"
+
+// This would provide config paths and their oldest viable version
+// so if there is an uncompatible change, user's old versions are not loaded
+//#include "bfile_tables.h"
+
+/* Internal bfile type flags */
+#define BTF_OPEN (0)
+#define BTF_FOPEN (1<<0)
+#define BTF_READ (1<<1)
+#define BTF_WRITE (1<<2)
+#define BTF_AT_END (1<<3)
+#define BTF_DISCARD (1<<4)
+
+
+void fill_paths(BFILE *bfile, const char *path) {
+ char* source_path = NULL;
+ int bflags = bfile->uflags;
+
+ if(bflags & BFILE_NORMAL || bflags & BFILE_RAW) {
+// bfile->fpath is path with // replaced
+ }
+ if(bflags & BFILE_TEMP) {
+// bfile->fpath is tempdir+path
+ }
+ if(bflags & BFILE_CONFIG) {
+// bfile->fpath is userdir+version+path
+// source_path is first hit in (if using fallback to older versions)
+// userdir+curversion+path (... userdir+limitversion+path) sysdir+path
+// (limitversion is based in path, using some kind of regex or "tables")
+ }
+
+ if(bfile->type & BTF_WRITE && !(bflags & BFILE_RAW)) {
+ /* Generate temp path */
+ // bfile->tpath is fpath+randstring
+ if(!(bfile->type & BTF_DISCARD)) {
+ /* Copy data to tpath */
+ if(source_path) {
+ // copy it from older version or sys version
+ }
+ }
+ } else {
+ bfile->tpath = bfile->fpath;
+ }
+}
+
+BFILE *BLI_bfile_fopen(const char *path, const char *mode, int bflags) {
+ BFILE *bfile;
+
+ bfile = MEM_mallocN(sizeof(BFILE), "bfile-fopen");
+ bfile->type = BTF_FOPEN;
+ bfile->uflags = bflags;
+
+ /* From fopen() doc, we can guess some logic:
+ r BTF_READ
+ r+ BTF_READ | BTF_WRITE
+ w BTF_DISCARD | BTF_WRITE
+ w+ BTF_DISCARD | BTF_WRITE | BTF_READ
+ a BTF_AT_END | BTF_WRITE
+ a+ BTF_AT_END | BTF_WRITE | BTF_READ
+ */
+ if(strchr(mode, 'r'))
+ bfile->type |= BTF_READ;
+ if(strchr(mode, 'w'))
+ bfile->type |= (BTF_DISCARD | BTF_WRITE);
+ if(strchr(mode, 'a'))
+ bfile->type |= (BTF_AT_END | BTF_WRITE);
+ if(strchr(mode, '+'))
+ bfile->type |= (BTF_READ | BTF_WRITE);
+
+ fill_paths(bfile, path);
+
+ bfile->stream = fopen(bfile->tpath, mode);
+ // detect failed fopen
+ bfile->fd = fileno(bfile->stream);
+ return bfile;
+}
+
+
+BFILE *BLI_bfile_open(const char *pathname, int flags, int bflags) {
+ BFILE *bfile;
+
+ bfile = MEM_mallocN(sizeof(BFILE), "bfile-open");
+ bfile->type = BTF_OPEN;
+ bfile->uflags = bflags;
+
+ /* Easy mapping for open() */
+ if(flags & O_RDONLY)
+ bfile->type |= BTF_READ;
+ if(flags & O_WRONLY)
+ bfile->type |= BTF_WRITE;
+ if(flags & O_RDWR)
+ bfile->type |= (BTF_READ | BTF_WRITE);
+ if(flags & O_APPEND)
+ bfile->type |= BTF_AT_END;
+ if(flags & O_TRUNC)
+ bfile->type |= BTF_DISCARD;
+
+ fill_paths(bfile, pathname);
+
+ bfile->fd = open(bfile->tpath, flags);
+ // detect failed open
+// bfile->stream = fdopen(bfile->fd, XXX); /* MSWindows _fdopen? */
+ return bfile;
+}
+
+
+FILE *BLI_bfile_file_from_bfile(BFILE *bfile) {
+ return bfile->stream;
+}
+
+
+int BLI_bfile_fd_from_bfile(BFILE *bfile) {
+ return bfile->fd;
+}
+
+
+ssize_t BLI_bfile_write(BFILE *f, const void *buf, size_t count) {
+ ssize_t ret;
+
+ ret = write((f->fd), buf, count);
+ if (ret == -1) {
+ f->error = 1;
+ }
+
+ return ret;
+}
+
+
+ssize_t BLI_bfile_read(BFILE *f, void *buf, size_t count) {
+ ssize_t ret;
+
+ ret = read((f->fd), buf, count);
+ if (ret == -1) {
+ f->error = 1;
+ }
+
+ return ret;
+}
+
+
+size_t BLI_bfile_fwrite(const void *ptr, size_t size, size_t nmemb, BFILE *f) {
+ size_t ret;
+
+ ret = fwrite(ptr, size, nmemb, f->stream);
+ if (ret < 0) {
+ f->error = 1;
+ }
+
+ return ret;
+}
+
+
+size_t BLI_bfile_fread(void *ptr, size_t size, size_t nmemb, BFILE *f) {
+ size_t ret;
+
+ ret = fread(ptr, size, nmemb, f->stream);
+ if ((ret < 0) && ferror(f->stream)) {
+ f->error = 1;
+ }
+
+ return ret;
+}
+
+
+void BLI_bfile_close(BFILE *bfile) {
+ if((bfile->type | BTF_WRITE) &&
+ !(bfile->uflags | BFILE_RAW)) {
+ /* Make sure data is on disk */
+ /* Move to final name if no errors */
+ }
+
+ /* Normal close */
+
+ /* Cleanup */
+ if(bfile->fpath) {
+ MEM_freeN(bfile->fpath);
+ }
+ if(bfile->tpath) {
+ MEM_freeN(bfile->tpath);
+ }
+}
+
+
+void BLI_bfile_clear_error(BFILE *bfile) {
+ bfile->error = 0;
+}
+
+
+void BLI_bfile_set_error(BFILE *bfile, int error) {
+ /* No cheating, use clear_error() for 0 */
+ if (error) {
+ bfile->error = error;
+ }
+}
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 48bbfc12370..eea49254a0e 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -52,6 +52,7 @@ typedef struct BVHNode
{
struct BVHNode **children;
struct BVHNode *parent; // some user defined traversed need that
+ struct BVHNode *skip[2];
float *bv; // Bounding volume of all nodes, max 13 axis
int index; // face, edge, vertex index
char totnode; // how many nodes are used, used for speedup
@@ -101,6 +102,8 @@ typedef struct BVHRayCastData
BVHTreeRay ray;
float ray_dot_axis[13];
+ float idot_axis[13];
+ int index[6];
BVHTreeRayHit hit;
} BVHRayCastData;
@@ -353,6 +356,23 @@ static int partition_nth_element(BVHNode **a, int _begin, int _end, int n, int a
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
+static void build_skip_links(BVHTree *tree, BVHNode *node, BVHNode *left, BVHNode *right)
+{
+ int i;
+
+ node->skip[0] = left;
+ node->skip[1] = right;
+
+ for (i = 0; i < node->totnode; i++)
+ {
+ if(i+1 < node->totnode)
+ build_skip_links(tree, node->children[i], left, node->children[i+1] );
+ else
+ build_skip_links(tree, node->children[i], left, right );
+
+ left = node->children[i];
+ }
+}
/*
* BVHTree bounding volumes functions
@@ -939,6 +959,7 @@ void BLI_bvhtree_balance(BVHTree *tree)
for(i = 0; i < tree->totbranch; i++)
tree->nodes[tree->totleaf + i] = branches_array + i;
+ build_skip_links(tree, tree->nodes[tree->totleaf], NULL, NULL);
//bvhtree_info(tree);
}
@@ -1405,6 +1426,7 @@ int BLI_bvhtree_find_nearest(BVHTree *tree, const float *co, BVHTreeNearest *nea
* raycast is done by performing a DFS on the BVHTree and saving the closest hit
*/
+
//Determines the distance that the ray must travel to hit the bounding volume of the given node
static float ray_nearest_hit(BVHRayCastData *data, float *bv)
{
@@ -1443,13 +1465,40 @@ static float ray_nearest_hit(BVHRayCastData *data, float *bv)
return low;
}
+//Determines the distance that the ray must travel to hit the bounding volume of the given node
+//Based on Tactical Optimization of Ray/Box Intersection, by Graham Fyffe
+//[http://tog.acm.org/resources/RTNews/html/rtnv21n1.html#art9]
+//
+//TODO this doens't has data->ray.radius in consideration
+static float fast_ray_nearest_hit(const BVHRayCastData *data, const BVHNode *node)
+{
+ const float *bv = node->bv;
+ float dist;
+
+ float t1x = (bv[data->index[0]] - data->ray.origin[0]) * data->idot_axis[0];
+ float t2x = (bv[data->index[1]] - data->ray.origin[0]) * data->idot_axis[0];
+ float t1y = (bv[data->index[2]] - data->ray.origin[1]) * data->idot_axis[1];
+ float t2y = (bv[data->index[3]] - data->ray.origin[1]) * data->idot_axis[1];
+ float t1z = (bv[data->index[4]] - data->ray.origin[2]) * data->idot_axis[2];
+ float t2z = (bv[data->index[5]] - data->ray.origin[2]) * data->idot_axis[2];
+
+ if(t1x > t2y || t2x < t1y || t1x > t2z || t2x < t1z || t1y > t2z || t2y < t1z) return FLT_MAX;
+ if(t2x < 0.0 || t2y < 0.0 || t2z < 0.0) return FLT_MAX;
+ if(t1x > data->hit.dist || t1y > data->hit.dist || t1z > data->hit.dist) return FLT_MAX;
+
+ dist = t1x;
+ if (t1y > dist) dist = t1y;
+ if (t1z > dist) dist = t1z;
+ return dist;
+}
+
static void dfs_raycast(BVHRayCastData *data, BVHNode *node)
{
int i;
//ray-bv is really fast.. and simple tests revealed its worth to test it
//before calling the ray-primitive functions
- float dist = ray_nearest_hit(data, node->bv);
+ float dist = fast_ray_nearest_hit(data, node);
if(dist >= data->hit.dist) return;
if(node->totnode == 0)
@@ -1483,6 +1532,37 @@ static void dfs_raycast(BVHRayCastData *data, BVHNode *node)
}
}
+static void iterative_raycast(BVHRayCastData *data, BVHNode *node)
+{
+ while(node)
+ {
+ float dist = fast_ray_nearest_hit(data, node);
+ if(dist >= data->hit.dist)
+ {
+ node = node->skip[1];
+ continue;
+ }
+
+ if(node->totnode == 0)
+ {
+ if(data->callback)
+ data->callback(data->userdata, node->index, &data->ray, &data->hit);
+ else
+ {
+ data->hit.index = node->index;
+ data->hit.dist = dist;
+ VECADDFAC(data->hit.co, data->ray.origin, data->ray.direction, dist);
+ }
+
+ node = node->skip[1];
+ }
+ else
+ {
+ node = node->children[0];
+ }
+ }
+}
+
int BLI_bvhtree_ray_cast(BVHTree *tree, const float *co, const float *dir, float radius, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata)
{
int i;
@@ -1503,9 +1583,16 @@ int BLI_bvhtree_ray_cast(BVHTree *tree, const float *co, const float *dir, float
for(i=0; i<3; i++)
{
data.ray_dot_axis[i] = INPR( data.ray.direction, KDOP_AXES[i]);
+ data.idot_axis[i] = 1.0f / data.ray_dot_axis[i];
if(fabs(data.ray_dot_axis[i]) < FLT_EPSILON)
+ {
data.ray_dot_axis[i] = 0.0;
+ }
+ data.index[2*i] = data.idot_axis[i] < 0.0 ? 1 : 0;
+ data.index[2*i+1] = 1 - data.index[2*i];
+ data.index[2*i] += 2*i;
+ data.index[2*i+1] += 2*i;
}
@@ -1518,7 +1605,10 @@ int BLI_bvhtree_ray_cast(BVHTree *tree, const float *co, const float *dir, float
}
if(root)
+ {
dfs_raycast(&data, root);
+// iterative_raycast(&data, root);
+ }
if(hit)
diff --git a/source/blender/blenlib/intern/BLI_memarena.c b/source/blender/blenlib/intern/BLI_memarena.c
index 87d2f0426b2..275ab12540b 100644
--- a/source/blender/blenlib/intern/BLI_memarena.c
+++ b/source/blender/blenlib/intern/BLI_memarena.c
@@ -45,6 +45,7 @@ struct MemArena {
int bufsize, cursize;
int use_calloc;
+ int align;
LinkNode *bufs;
};
@@ -52,6 +53,7 @@ struct MemArena {
MemArena *BLI_memarena_new(int bufsize) {
MemArena *ma= MEM_callocN(sizeof(*ma), "memarena");
ma->bufsize= bufsize;
+ ma->align = 8;
return ma;
}
@@ -64,6 +66,11 @@ void BLI_memarena_use_malloc(MemArena *ma) {
ma->use_calloc= 0;
}
+void BLI_memarena_use_align(struct MemArena *ma, int align) {
+ /* align should be a power of two */
+ ma->align = align;
+}
+
void BLI_memarena_free(MemArena *ma) {
BLI_linklist_free(ma->bufs, (void(*)(void*)) MEM_freeN);
MEM_freeN(ma);
@@ -77,16 +84,28 @@ void *BLI_memarena_alloc(MemArena *ma, int size) {
/* ensure proper alignment by rounding
* size up to multiple of 8 */
- size= PADUP(size, 8);
+ size= PADUP(size, ma->align);
if (size>ma->cursize) {
- ma->cursize= (size>ma->bufsize)?size:ma->bufsize;
+ unsigned char *tmp;
+
+ if(size > ma->bufsize - (ma->align - 1))
+ {
+ ma->cursize = PADUP(size+1, ma->align);
+ }
+ else ma->cursize = ma->bufsize;
+
if(ma->use_calloc)
ma->curbuf= MEM_callocN(ma->cursize, "memarena calloc");
else
ma->curbuf= MEM_mallocN(ma->cursize, "memarena malloc");
BLI_linklist_prepend(&ma->bufs, ma->curbuf);
+
+ /* align alloc'ed memory (needed if align > 8) */
+ tmp = (unsigned char*)PADUP( (intptr_t) ma->curbuf, ma->align);
+ ma->cursize -= (tmp - ma->curbuf);
+ ma->curbuf = tmp;
}
ptr= ma->curbuf;
@@ -95,3 +114,4 @@ void *BLI_memarena_alloc(MemArena *ma, int size) {
return ptr;
}
+
diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c
index d673df51f6c..a5c4a03cdd6 100644
--- a/source/blender/blenlib/intern/arithb.c
+++ b/source/blender/blenlib/intern/arithb.c
@@ -2200,7 +2200,7 @@ int VecLen( int *v1, int *v2)
return (int)floor(sqrt(x*x+y*y+z*z));
}
-float VecLenf( float *v1, float *v2)
+float VecLenf(float v1[3], float v2[3])
{
float x,y,z;
@@ -2236,23 +2236,40 @@ void VecMulVecf(float *v, float *v1, float *v2)
v[2] = v1[2] * v2[2];
}
-void VecLerpf(float *target, float *a, float *b, float t)
+void VecLerpf(float *target, const float *a, const float *b, const float t)
{
- float s = 1.0f-t;
+ const float s = 1.0f-t;
target[0]= s*a[0] + t*b[0];
target[1]= s*a[1] + t*b[1];
target[2]= s*a[2] + t*b[2];
}
-void Vec2Lerpf(float *target, float *a, float *b, float t)
+void Vec2Lerpf(float *target, const float *a, const float *b, const float t)
{
- float s = 1.0f-t;
+ const float s = 1.0f-t;
target[0]= s*a[0] + t*b[0];
target[1]= s*a[1] + t*b[1];
}
+/* weight 3 vectors, (VecWeightf in 2.4x)
+ * 'w' must be unit length but is not a vector, just 3 weights */
+void VecLerp3f(float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3])
+{
+ p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2];
+ p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2];
+ p[2] = v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2];
+}
+
+/* weight 3 2D vectors, (Vec2Weightf in 2.4x)
+ * 'w' must be unit length but is not a vector, just 3 weights */
+void Vec2Lerp3f(float p[2], const float v1[2], const float v2[2], const float v3[2], const float w[3])
+{
+ p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2];
+ p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2];
+}
+
void VecMidf(float *v, float *v1, float *v2)
{
v[0]= 0.5f*(v1[0]+ v2[0]);
@@ -3597,10 +3614,10 @@ float VecAngle3(float *v1, float *v2, float *v3)
Normalize(vec1);
Normalize(vec2);
- return NormalizedVecAngle2(vec1, vec2) * (float)(180.0/M_PI);
+ return NormalizedVecAngle2(vec1, vec2);
}
-float VecAngle3_2D(float *v1, float *v2, float *v3)
+float Vec2Angle3(float *v1, float *v2, float *v3)
{
float vec1[2], vec2[2];
@@ -3613,7 +3630,7 @@ float VecAngle3_2D(float *v1, float *v2, float *v3)
Normalize2(vec1);
Normalize2(vec2);
- return NormalizedVecAngle2_2D(vec1, vec2) * (float)(180.0/M_PI);
+ return NormalizedVecAngle2_2D(vec1, vec2);
}
/* Return the shortest angle in degrees between the 2 vectors */
@@ -3626,7 +3643,7 @@ float VecAngle2(float *v1, float *v2)
Normalize(vec1);
Normalize(vec2);
- return NormalizedVecAngle2(vec1, vec2)* (float)(180.0/M_PI);
+ return NormalizedVecAngle2(vec1, vec2);
}
float NormalizedVecAngle2(float *v1, float *v2)
@@ -4764,7 +4781,7 @@ int LineIntersectLine(float v1[3], float v2[3], float v3[3], float v4[3], float
VecSubf(c, v3t, v1);
VecSubf(a, v2, v1);
- VecSubf(b, v4t, v3);
+ VecSubf(b, v4t, v3t);
Crossf(ab, a, b);
Crossf(cb, c, b);
@@ -4872,6 +4889,15 @@ static float lambda_cp_line(float p[3], float l1[3], float l2[3])
}
#endif
+/* useful to calculate an even width shell, by taking the angle between 2 planes.
+ * The return value is a scale on the offset.
+ * no angle between planes is 1.0, as the angle between the 2 planes approches 180d
+ * the distance gets very high, 180d would be inf, but this case isn't valid */
+float AngleToLength(const float angle)
+{
+ return (angle < SMALL_NUMBER) ? 1.0f : fabsf(1.0f / cosf(angle * (M_PI/180.0f)));
+}
+
/* Similar to LineIntersectsTriangleUV, except it operates on a quad and in 2d, assumes point is in quad */
void PointInQuad2DUV(float v0[2], float v1[2], float v2[2], float v3[2], float pt[2], float *uv)
{
@@ -5154,7 +5180,7 @@ int point_in_tri_prism(float p[3], float v1[3], float v2[3], float v3[3])
}
/* point closest to v1 on line v2-v3 in 3D */
-void PclosestVL3Dfl(float *closest, float *v1, float *v2, float *v3)
+void PclosestVL3Dfl(float *closest, float v1[3], float v2[3], float v3[3])
{
float lambda, cp[3];
diff --git a/source/blender/blenlib/intern/dynlib.c b/source/blender/blenlib/intern/dynlib.c
index 858aa6e60bf..4820f5529c1 100644
--- a/source/blender/blenlib/intern/dynlib.c
+++ b/source/blender/blenlib/intern/dynlib.c
@@ -23,8 +23,6 @@
* The Original Code is: all of this file, with exception of below:
*
* Contributor(s): Peter O'Gorman
- * The functions osxdlopen() and osxerror()
- * are Copyright (c) 2002 Peter O'Gorman <ogorman@users.sourceforge.net>
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -102,202 +100,6 @@ void PIL_dynlib_close(PILdynlib *lib) {
free(lib);
}
-#else
-#ifdef __APPLE__ /* MacOS X */
-
-#include <mach-o/dyld.h>
-#include <dlfcn.h>
-#include <stdarg.h>
-
-#define ERR_STR_LEN 256
-
-struct PILdynlib {
- void *handle;
-};
-
-static char *osxerror(int setget, const char *str, ...)
-{
- static char errstr[ERR_STR_LEN];
- static int err_filled = 0;
- char *retval;
- NSLinkEditErrors ler;
- int lerno;
- const char *dylderrstr;
- const char *file;
- va_list arg;
- if (setget <= 0)
- {
- va_start(arg, str);
- strncpy(errstr, "dlsimple: ", ERR_STR_LEN);
- vsnprintf(errstr + 10, ERR_STR_LEN - 10, str, arg);
- va_end(arg);
- /* We prefer to use the dyld error string if setget is 0 */
- if (setget == 0) {
- NSLinkEditError(&ler, &lerno, &file, &dylderrstr);
-// printf("dyld: %s\n",dylderrstr);
- if (dylderrstr && strlen(dylderrstr))
- strncpy(errstr,dylderrstr,ERR_STR_LEN);
- }
- err_filled = 1;
- retval = NULL;
- }
- else
- {
- if (!err_filled)
- retval = NULL;
- else
- retval = errstr;
- err_filled = 0;
- }
- return retval;
-}
-
-static void *osxdlopen(const char *path, int mode)
-{
- void *module = 0;
- NSObjectFileImage ofi = 0;
- NSObjectFileImageReturnCode ofirc;
- static int (*make_private_module_public) (NSModule module) = 0;
- unsigned int flags = NSLINKMODULE_OPTION_RETURN_ON_ERROR | NSLINKMODULE_OPTION_PRIVATE;
-
- /* If we got no path, the app wants the global namespace, use -1 as the marker
- in this case */
- if (!path)
- return (void *)-1;
-
- /* Create the object file image, works for things linked with the -bundle arg to ld */
- ofirc = NSCreateObjectFileImageFromFile(path, &ofi);
- switch (ofirc)
- {
- case NSObjectFileImageSuccess:
- /* It was okay, so use NSLinkModule to link in the image */
- if (!(mode & RTLD_LAZY)) flags += NSLINKMODULE_OPTION_BINDNOW;
- module = NSLinkModule(ofi, path,flags);
- /* Don't forget to destroy the object file image, unless you like leaks */
- NSDestroyObjectFileImage(ofi);
- /* If the mode was global, then change the module, this avoids
- multiply defined symbol errors to first load private then make
- global. Silly, isn't it. */
- if ((mode & RTLD_GLOBAL))
- {
- if (!make_private_module_public)
- {
- _dyld_func_lookup("__dyld_NSMakePrivateModulePublic",
- (unsigned long *)&make_private_module_public);
- }
- make_private_module_public(module);
- }
- break;
- case NSObjectFileImageInappropriateFile:
- /* It may have been a dynamic library rather than a bundle, try to load it */
- module = (void *)NSAddImage(path, NSADDIMAGE_OPTION_RETURN_ON_ERROR);
- break;
- case NSObjectFileImageFailure:
- osxerror(0,"Object file setup failure : \"%s\"", path);
- return 0;
- case NSObjectFileImageArch:
- osxerror(0,"No object for this architecture : \"%s\"", path);
- return 0;
- case NSObjectFileImageFormat:
- osxerror(0,"Bad object file format : \"%s\"", path);
- return 0;
- case NSObjectFileImageAccess:
- osxerror(0,"Can't read object file : \"%s\"", path);
- return 0;
- }
- if (!module)
- osxerror(0, "Can not open \"%s\"", path);
- return module;
-}
-
-PILdynlib *PIL_dynlib_open(char *name) {
- void *handle= osxdlopen(name, RTLD_LAZY);
-
- if (handle) {
- PILdynlib *lib= malloc(sizeof(*lib));
- lib->handle= handle;
-
- return lib;
- } else {
- return NULL;
- }
-}
-
-void *PIL_dynlib_find_symbol(PILdynlib* lib, char *symname)
-{
- int sym_len = strlen(symname);
- void *value = NULL;
- char *malloc_sym = NULL;
- NSSymbol *nssym = 0;
- malloc_sym = malloc(sym_len + 2);
- if (malloc_sym)
- {
- sprintf(malloc_sym, "_%s", symname);
- /* If the lib->handle is -1, if is the app global context */
- if (lib->handle == (void *)-1)
- {
- /* Global context, use NSLookupAndBindSymbol */
- if (NSIsSymbolNameDefined(malloc_sym))
- {
- nssym = NSLookupAndBindSymbol(malloc_sym);
- }
- }
- /* Now see if the lib->handle is a struch mach_header* or not, use NSLookupSymbol in image
- for libraries, and NSLookupSymbolInModule for bundles */
- else
- {
- /* Check for both possible magic numbers depending on x86/ppc byte order */
- if ((((struct mach_header *)lib->handle)->magic == MH_MAGIC) ||
- (((struct mach_header *)lib->handle)->magic == MH_CIGAM))
- {
- if (NSIsSymbolNameDefinedInImage((struct mach_header *)lib->handle, malloc_sym))
- {
- nssym = NSLookupSymbolInImage((struct mach_header *)lib->handle,
- malloc_sym,
- NSLOOKUPSYMBOLINIMAGE_OPTION_BIND
- | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR);
- }
-
- }
- else
- {
- nssym = NSLookupSymbolInModule(lib->handle, malloc_sym);
- }
- }
- if (!nssym)
- {
- osxerror(0, "symname \"%s\" Not found", symname);
- }
- value = NSAddressOfSymbol(nssym);
- free(malloc_sym);
- }
- else
- {
- osxerror(-1, "Unable to allocate memory");
- }
- return value;
-}
-
-char *PIL_dynlib_get_error_as_string(PILdynlib* lib)
-{
- return osxerror(1, (char *)NULL);
-}
-
-void PIL_dynlib_close(PILdynlib *lib)
-{
- if ((((struct mach_header *)lib->handle)->magic == MH_MAGIC) ||
- (((struct mach_header *)lib->handle)->magic == MH_CIGAM))
- {
- osxerror(-1, "Can't remove dynamic libraries on darwin");
- }
- if (!NSUnLinkModule(lib->handle, 0))
- {
- osxerror(0, "unable to unlink module %s", NSNameOfModule(lib->handle));
- }
-
- free(lib);
-}
-
#else /* Unix */
#include <dlfcn.h>
@@ -334,4 +136,4 @@ void PIL_dynlib_close(PILdynlib *lib) {
}
#endif
-#endif
+
diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c
index 3194593374f..b3a4722d6d9 100644
--- a/source/blender/blenlib/intern/listbase.c
+++ b/source/blender/blenlib/intern/listbase.c
@@ -359,3 +359,17 @@ void BLI_duplicatelist(ListBase *list1, ListBase *list2) /* copy from 2 to 1 */
}
}
+/* create a generic list node containing link to provided data */
+LinkData *BLI_genericNodeN (void *data)
+{
+ LinkData *ld;
+
+ if (data == NULL)
+ return NULL;
+
+ /* create new link, and make it hold the given data */
+ ld= MEM_callocN(sizeof(LinkData), "BLI_genericNodeN()");
+ ld->data= data;
+
+ return ld;
+}
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index 4cd04aa232c..405f8c6db97 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -100,6 +100,101 @@ char *BLI_sprintfN(const char *format, ...)
return n;
}
+/* Makes a copy of the text within the "" that appear after some text 'blahblah'
+ * i.e. for string 'pose["apples"]' with prefix 'pose[', it should grab "apples"
+ *
+ * - str: is the entire string to chop
+ * - prefix: is the part of the string to leave out
+ *
+ * Assume that the strings returned must be freed afterwards, and that the inputs will contain
+ * data we want...
+ */
+char *BLI_getQuotedStr (const char *str, const char *prefix)
+{
+ int prefixLen = strlen(prefix);
+ char *startMatch, *endMatch;
+
+ /* get the starting point (i.e. where prefix starts, and add prefixLen+1 to it to get be after the first " */
+ startMatch= strstr(str, prefix) + prefixLen + 1;
+
+ /* get the end point (i.e. where the next occurance of " is after the starting point) */
+ endMatch= strchr(startMatch, '"'); // " NOTE: this comment here is just so that my text editor still shows the functions ok...
+
+ /* return the slice indicated */
+ return BLI_strdupn(startMatch, (int)(endMatch-startMatch));
+}
+
+/* Replaces all occurances of oldText with newText in str, returning a new string that doesn't
+ * contain the 'replaced' occurances.
+ */
+// A rather wasteful string-replacement utility, though this shall do for now...
+// Feel free to replace this with an even safe + nicer alternative
+char *BLI_replacestr(char *str, const char *oldText, const char *newText)
+{
+ DynStr *ds= NULL;
+ int lenOld= strlen(oldText);
+ char *match;
+
+ /* sanity checks */
+ if ((str == NULL) || (str[0]==0))
+ return NULL;
+ else if ((oldText == NULL) || (newText == NULL) || (oldText[0]==0))
+ return BLI_strdup(str);
+
+ /* while we can still find a match for the old substring that we're searching for,
+ * keep dicing and replacing
+ */
+ while ( (match = strstr(str, oldText)) ) {
+ /* the assembly buffer only gets created when we actually need to rebuild the string */
+ if (ds == NULL)
+ ds= BLI_dynstr_new();
+
+ /* if the match position does not match the current position in the string,
+ * copy the text up to this position and advance the current position in the string
+ */
+ if (str != match) {
+ /* replace the token at the 'match' position with \0 so that the copied string will be ok,
+ * add the segment of the string from str to match to the buffer, then restore the value at match
+ */
+ match[0]= 0;
+ BLI_dynstr_append(ds, str);
+ match[0]= oldText[0];
+
+ /* now our current position should be set on the start of the match */
+ str= match;
+ }
+
+ /* add the replacement text to the accumulation buffer */
+ BLI_dynstr_append(ds, newText);
+
+ /* advance the current position of the string up to the end of the replaced segment */
+ str += lenOld;
+ }
+
+ /* finish off and return a new string that has had all occurances of */
+ if (ds) {
+ char *newStr;
+
+ /* add what's left of the string to the assembly buffer
+ * - we've been adjusting str to point at the end of the replaced segments
+ */
+ if (str != NULL)
+ BLI_dynstr_append(ds, str);
+
+ /* convert to new c-string (MEM_malloc'd), and free the buffer */
+ newStr= BLI_dynstr_get_cstring(ds);
+ BLI_dynstr_free(ds);
+
+ return newStr;
+ }
+ else {
+ /* just create a new copy of the entire string - we avoid going through the assembly buffer
+ * for what should be a bit more efficiency...
+ */
+ return BLI_strdup(str);
+ }
+}
+
int BLI_streq(const char *a, const char *b)
{
return (strcmp(a, b)==0);
diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c
index ce9f9adeb90..b5c6a5a3b4e 100644
--- a/source/blender/blenlib/intern/threads.c
+++ b/source/blender/blenlib/intern/threads.c
@@ -98,6 +98,7 @@ A sample loop can look like this (pseudo c);
************************************************ */
static pthread_mutex_t _malloc_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _image_lock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t _preview_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _custom1_lock = PTHREAD_MUTEX_INITIALIZER;
static int thread_levels= 0; /* threads can be invoked inside threads */
@@ -112,12 +113,12 @@ typedef struct ThreadSlot {
int avail;
} ThreadSlot;
-void BLI_lock_malloc_thread(void)
+static void BLI_lock_malloc_thread(void)
{
pthread_mutex_lock(&_malloc_lock);
}
-void BLI_unlock_malloc_thread(void)
+static void BLI_unlock_malloc_thread(void)
{
pthread_mutex_unlock(&_malloc_lock);
}
@@ -143,7 +144,9 @@ void BLI_init_threads(ListBase *threadbase, void *(*do_thread)(void *), int tot)
tslot->avail= 1;
}
- MEM_set_lock_callback(BLI_lock_malloc_thread, BLI_unlock_malloc_thread);
+ if(thread_levels == 0)
+ MEM_set_lock_callback(BLI_lock_malloc_thread, BLI_unlock_malloc_thread);
+
thread_levels++;
}
}
@@ -252,21 +255,7 @@ void BLI_end_threads(ListBase *threadbase)
}
}
-void BLI_lock_thread(int type)
-{
- if (type==LOCK_IMAGE)
- pthread_mutex_lock(&_image_lock);
- else if (type==LOCK_CUSTOM1)
- pthread_mutex_lock(&_custom1_lock);
-}
-
-void BLI_unlock_thread(int type)
-{
- if (type==LOCK_IMAGE)
- pthread_mutex_unlock(&_image_lock);
- else if(type==LOCK_CUSTOM1)
- pthread_mutex_unlock(&_custom1_lock);
-}
+/* System Information */
/* how many threads are native on this system? */
int BLI_system_thread_count( void )
@@ -300,6 +289,75 @@ int BLI_system_thread_count( void )
return t;
}
+/* Global Mutex Locks */
+
+void BLI_lock_thread(int type)
+{
+ if (type==LOCK_IMAGE)
+ pthread_mutex_lock(&_image_lock);
+ else if (type==LOCK_PREVIEW)
+ pthread_mutex_lock(&_preview_lock);
+ else if (type==LOCK_CUSTOM1)
+ pthread_mutex_lock(&_custom1_lock);
+}
+
+void BLI_unlock_thread(int type)
+{
+ if (type==LOCK_IMAGE)
+ pthread_mutex_unlock(&_image_lock);
+ else if (type==LOCK_PREVIEW)
+ pthread_mutex_unlock(&_preview_lock);
+ else if(type==LOCK_CUSTOM1)
+ pthread_mutex_unlock(&_custom1_lock);
+}
+
+/* Mutex Locks */
+
+void BLI_mutex_init(ThreadMutex *mutex)
+{
+ pthread_mutex_init(mutex, NULL);
+}
+
+void BLI_mutex_lock(ThreadMutex *mutex)
+{
+ pthread_mutex_lock(mutex);
+}
+
+void BLI_mutex_unlock(ThreadMutex *mutex)
+{
+ pthread_mutex_unlock(mutex);
+}
+
+void BLI_mutex_end(ThreadMutex *mutex)
+{
+ pthread_mutex_destroy(mutex);
+}
+
+/* Read/Write Mutex Lock */
+
+void BLI_rw_mutex_init(ThreadRWMutex *mutex)
+{
+ pthread_rwlock_init(mutex, NULL);
+}
+
+void BLI_rw_mutex_lock(ThreadRWMutex *mutex, int mode)
+{
+ if(mode == THREAD_LOCK_READ)
+ pthread_rwlock_rdlock(mutex);
+ else
+ pthread_rwlock_wrlock(mutex);
+}
+
+void BLI_rw_mutex_unlock(ThreadRWMutex *mutex)
+{
+ pthread_rwlock_unlock(mutex);
+}
+
+void BLI_rw_mutex_end(ThreadRWMutex *mutex)
+{
+ pthread_rwlock_destroy(mutex);
+}
+
/* ************************************************ */
typedef struct ThreadedWorker {
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c
index c7bb7a54457..387d1881d3c 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -856,98 +856,123 @@ char *BLI_gethome(void) {
#endif
}
-/* this function returns the path to a blender folder, if it exists,
- * trying in this order:
- *
- * path_to_executable/release/folder_name (in svn)
- * ./release/folder_name (in svn)
- * $HOME/.blender/folder_name
- * path_to_executable/.blender/folder_name
- *
- * returns NULL if none is found. */
+/* this function returns the path to a blender folder, if it exists
+ * utility functions for BLI_gethome_folder */
-char *BLI_gethome_folder(char *folder_name)
+/* #define PATH_DEBUG */ /* for testing paths that are checked */
+
+static int test_data_path(char *targetpath, char *path_base, char *path_sep, char *folder_name)
+{
+ char tmppath[FILE_MAXDIR];
+
+ if(path_sep) BLI_join_dirfile(tmppath, path_base, path_sep);
+ else BLI_strncpy(tmppath, path_base, sizeof(tmppath));
+
+ BLI_make_file_string("/", targetpath, tmppath, folder_name);
+
+ if (BLI_exists(targetpath)) {
+#ifdef PATH_DEBUG
+ printf("\tpath found: %s\n", targetpath);
+#endif
+ return 1;
+ }
+ else {
+#ifdef PATH_DEBUG
+ printf("\tpath missing: %s\n", targetpath);
+#endif
+ targetpath[0] = '\0';
+ return 0;
+ }
+}
+
+static int gethome_path_local(char *targetpath, char *folder_name)
{
extern char bprogname[]; /* argv[0] from creator.c */
- static char homedir[FILE_MAXDIR] = "";
- static char fulldir[FILE_MAXDIR] = "";
- char tmpdir[FILE_MAXDIR];
char bprogdir[FILE_MAXDIR];
+ char cwd[FILE_MAXDIR];
char *s;
int i;
-
+
+#ifdef PATH_DEBUG
+ printf("gethome_path_local...\n");
+#endif
+
+ /* try release/folder_name (binary relative) */
/* use argv[0] (bprogname) to get the path to the executable */
s = BLI_last_slash(bprogname);
-
i = s - bprogname + 1;
BLI_strncpy(bprogdir, bprogname, i);
- /* try path_to_executable/release/folder_name (in svn) */
- if (folder_name) {
- BLI_snprintf(tmpdir, sizeof(tmpdir), "release/%s", folder_name);
- BLI_make_file_string("/", fulldir, bprogdir, tmpdir);
- if (BLI_exists(fulldir)) return fulldir;
- else fulldir[0] = '\0';
- }
+ /* try release/folder_name (CWD relative) */
+ if(test_data_path(targetpath, BLI_getwdN(cwd), "release", folder_name))
+ return 1;
- /* try ./release/folder_name (in svn) */
- if(folder_name) {
- BLI_snprintf(fulldir, sizeof(fulldir), "./release/%s", folder_name);
- if (BLI_exists(fulldir)) return fulldir;
- else fulldir[0] = '\0';
- }
+ if(test_data_path(targetpath, bprogdir, "release", folder_name))
+ return 1;
- /* BLI_gethome() can return NULL if env vars are not set */
- s = BLI_gethome();
+ /* try ./.blender/folder_name */
+ if(test_data_path(targetpath, bprogdir, ".blender", folder_name))
+ return 1;
+
+ return 0;
+}
- if(!s) { /* bail if no $HOME */
- printf("$HOME is NOT set\n");
- return NULL;
- }
+static int gethome_path_user(char *targetpath, char *folder_name)
+{
+ char *home_path= BLI_gethome();
- if(strstr(s, ".blender"))
- BLI_strncpy(homedir, s, FILE_MAXDIR);
- else
- BLI_make_file_string("/", homedir, s, ".blender");
+#ifdef PATH_DEBUG
+ printf("gethome_path_user...\n");
+#endif
+
+ /* try $HOME/folder_name */
+ return test_data_path(targetpath, home_path, ".blender", folder_name);
+}
- /* if $HOME/.blender/folder_name exists, return it */
- if(BLI_exists(homedir)) {
- if (folder_name) {
- BLI_make_file_string("/", fulldir, homedir, folder_name);
- if(BLI_exists(fulldir))
- return fulldir;
- }
- else
- return homedir;
- }
- else
- homedir[0] = '\0';
-
- /* using tmpdir to preserve homedir (if) found above:
- * the ideal is to have a home dir with folder_name dir inside
- * it, but if that isn't available, it's possible to
- * have a 'broken' home dir somewhere and a folder_name dir in the
- * svn sources */
- BLI_make_file_string("/", tmpdir, bprogdir, ".blender");
-
- if(BLI_exists(tmpdir)) {
- if(folder_name) {
- BLI_make_file_string("/", fulldir, tmpdir, folder_name);
- if(BLI_exists(fulldir)) {
- BLI_strncpy(homedir, tmpdir, FILE_MAXDIR);
- return fulldir;
- }
- else {
- homedir[0] = '\0';
- fulldir[0] = '\0';
- }
- }
- else return homedir;
+static int gethome_path_system(char *targetpath, char *folder_name)
+{
+ extern char blender_path[]; /* unix prefix eg. /usr/share/blender/2.5 creator.c */
+
+ if(!blender_path[0])
+ return 0;
+
+#ifdef PATH_DEBUG
+ printf("gethome_path_system...\n");
+#endif
+
+ /* try $BLENDERPATH/folder_name */
+ return test_data_path(targetpath, blender_path, NULL, folder_name);
+}
+
+char *BLI_gethome_folder(char *folder_name, int flag)
+{
+ static char fulldir[FILE_MAXDIR] = "";
+
+ /* first check if this is a redistributable bundle */
+ if(flag & BLI_GETHOME_LOCAL) {
+ if (gethome_path_local(fulldir, folder_name))
+ return fulldir;
}
+ /* then check if the OS has blender data files installed in a global location */
+ if(flag & BLI_GETHOME_SYSTEM) {
+ if (gethome_path_system(fulldir, folder_name))
+ return fulldir;
+ }
+
+ /* now check the users home dir for data files */
+ if(flag & BLI_GETHOME_USER) {
+ if (gethome_path_user(fulldir, folder_name))
+ return fulldir;
+ }
+
return NULL;
}
+#ifdef PATH_DEBUG
+#undef PATH_DEBUG
+#endif
+
void BLI_setenv(const char *env, const char*val)
{
/* SGI or free windows */
@@ -1502,6 +1527,8 @@ char* BLI_getbundle(void) {
bundleURL = CFBundleCopyBundleURL(mainBundle);
pathStr = CFURLCopyFileSystemPath(bundleURL, kCFURLPOSIXPathStyle);
CFStringGetCString(pathStr, path, MAXPATHLEN, kCFStringEncodingASCII);
+ CFRelease(pathStr);
+ CFRelease(bundleURL);
return path;
}
#endif
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index 6e2772efea4..52295dc3092 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -211,7 +211,7 @@ void BLO_library_append_named_part(const struct bContext *C, struct Main *mainl,
void BLO_library_append_end(const struct bContext *C, struct Main *mainl, BlendHandle** bh, int idcode, short flag);
/* deprecated */
-#if 0
+#if 1
void BLO_script_library_append(BlendHandle **bh, char *dir, char *name, int idcode, short flag, struct Main *mainvar, struct Scene *scene, struct ReportList *reports);
#endif
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index cac072b76b2..8efdbdd1905 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2185,6 +2185,8 @@ static void lib_link_constraints(FileData *fd, ID *id, ListBase *conlist)
data = ((bKinematicConstraint*)con->data);
data->tar = newlibadr(fd, id->lib, data->tar);
data->poletar = newlibadr(fd, id->lib, data->poletar);
+ con->lin_error = 0.f;
+ con->rot_error = 0.f;
}
break;
case CONSTRAINT_TYPE_TRACKTO:
@@ -2332,6 +2334,7 @@ static void lib_link_armature(FileData *fd, Main *main)
while(arm) {
if(arm->id.flag & LIB_NEEDLINK) {
+ if (arm->adt) lib_link_animdata(fd, &arm->id, arm->adt);
arm->id.flag -= LIB_NEEDLINK;
}
arm= arm->id.next;
@@ -2358,6 +2361,7 @@ static void direct_link_armature(FileData *fd, bArmature *arm)
link_list(fd, &arm->bonebase);
arm->edbo= NULL;
arm->sketch = NULL;
+ arm->adt= newdataadr(fd, arm->adt);
bone=arm->bonebase.first;
while (bone) {
@@ -3030,6 +3034,7 @@ static void direct_link_pointcache_list(FileData *fd, ListBase *ptcaches, PointC
static void lib_link_particlesettings(FileData *fd, Main *main)
{
ParticleSettings *part;
+ ParticleDupliWeight *dw;
part= main->particle.first;
while(part) {
@@ -3041,6 +3046,14 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
part->dup_group = newlibadr(fd, part->id.lib, part->dup_group);
part->eff_group = newlibadr(fd, part->id.lib, part->eff_group);
part->bb_ob = newlibadr(fd, part->id.lib, part->bb_ob);
+
+ if(part->effector_weights)
+ part->effector_weights->group = newlibadr(fd, part->id.lib, part->effector_weights->group);
+
+ dw = part->dupliweights.first;
+ for(; dw; dw=dw->next)
+ dw->ob = newlibadr(fd, part->id.lib, dw->ob);
+
if(part->boids) {
BoidState *state = part->boids->states.first;
BoidRule *rule;
@@ -3076,6 +3089,13 @@ static void direct_link_particlesettings(FileData *fd, ParticleSettings *part)
part->pd= newdataadr(fd, part->pd);
part->pd2= newdataadr(fd, part->pd2);
+ if(part->effector_weights)
+ part->effector_weights = newdataadr(fd, part->effector_weights);
+ else
+ part->effector_weights = BKE_add_effector_weights(part->eff_group);
+
+ link_list(fd, &part->dupliweights);
+
part->boids= newdataadr(fd, part->boids);
if(part->boids) {
@@ -3152,18 +3172,19 @@ static void direct_link_particlesystems(FileData *fd, ListBase *particles)
}
- psys->child=newdataadr(fd,psys->child);
- psys->effectors.first=psys->effectors.last=0;
+ psys->child = newdataadr(fd,psys->child);
+ psys->effectors = NULL;
link_list(fd, &psys->targets);
psys->edit = NULL;
psys->free_edit = NULL;
- psys->pathcache = 0;
- psys->childcache = 0;
- psys->pathcachebufs.first = psys->pathcachebufs.last = 0;
- psys->childcachebufs.first = psys->childcachebufs.last = 0;
- psys->reactevents.first = psys->reactevents.last = 0;
+ psys->pathcache = NULL;
+ psys->childcache = NULL;
+ psys->pathcachebufs.first = psys->pathcachebufs.last = NULL;
+ psys->childcachebufs.first = psys->childcachebufs.last = NULL;
+ psys->frand = NULL;
+ psys->pdd = NULL;
direct_link_pointcache_list(fd, &psys->ptcaches, &psys->pointcache);
@@ -3779,6 +3800,11 @@ static void lib_link_object(FileData *fd, Main *main)
else if(act->type==ACT_STATE) {
/* bStateActuator *statea = act->data; */
}
+ else if(act->type==ACT_ARMATURE) {
+ bArmatureActuator *arma= act->data;
+ arma->target= newlibadr(fd, ob->id.lib, arma->target);
+ arma->subtarget= newlibadr(fd, ob->id.lib, arma->subtarget);
+ }
act= act->next;
}
@@ -3797,6 +3823,17 @@ static void lib_link_object(FileData *fd, Main *main)
smd->domain->coll_group = newlibadr_us(fd, ob->id.lib, smd->domain->coll_group);
smd->domain->eff_group = newlibadr_us(fd, ob->id.lib, smd->domain->eff_group);
smd->domain->fluid_group = newlibadr_us(fd, ob->id.lib, smd->domain->fluid_group);
+
+ smd->domain->effector_weights->group = newlibadr(fd, ob->id.lib, smd->domain->effector_weights->group);
+ }
+ }
+
+ {
+ ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth);
+
+ if(clmd)
+ {
+ clmd->sim_parms->effector_weights->group = newlibadr(fd, ob->id.lib, clmd->sim_parms->effector_weights->group);
}
}
@@ -3805,6 +3842,9 @@ static void lib_link_object(FileData *fd, Main *main)
if(ob->pd->tex)
ob->pd->tex=newlibadr_us(fd, ob->id.lib, ob->pd->tex);
+ if(ob->soft)
+ ob->soft->effector_weights->group = newlibadr(fd, ob->id.lib, ob->soft->effector_weights->group);
+
lib_link_particlesystems(fd, ob, &ob->id, &ob->particlesystem);
lib_link_modifiers(fd, ob);
}
@@ -3840,6 +3880,10 @@ static void direct_link_pose(FileData *fd, bPose *pose)
pchan->iktree.first= pchan->iktree.last= NULL;
pchan->path= NULL;
}
+ pose->ikdata = NULL;
+ if (pose->ikparam != NULL) {
+ pose->ikparam= newdataadr(fd, pose->ikparam);
+ }
}
static void direct_link_modifiers(FileData *fd, ListBase *lb)
@@ -3880,6 +3924,11 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
if(clmd->sim_parms->presets > 10)
clmd->sim_parms->presets = 0;
}
+
+ if(clmd->sim_parms->effector_weights)
+ clmd->sim_parms->effector_weights = newdataadr(fd, clmd->sim_parms->effector_weights);
+ else
+ clmd->sim_parms->effector_weights = BKE_add_effector_weights(NULL);
}
else if (md->type==eModifierType_Fluidsim) {
@@ -3905,6 +3954,11 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
smd->domain->tex_shadow = NULL;
smd->domain->tex_wt = NULL;
+ if(smd->domain->effector_weights)
+ smd->domain->effector_weights = newdataadr(fd, smd->domain->effector_weights);
+ else
+ smd->domain->effector_weights = BKE_add_effector_weights(NULL);
+
direct_link_pointcache_list(fd, &(smd->domain->ptcaches[0]), &(smd->domain->point_cache[0]));
direct_link_pointcache_list(fd, &(smd->domain->ptcaches[1]), &(smd->domain->point_cache[1]));
}
@@ -3920,12 +3974,15 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
{
smd->flow = NULL;
smd->domain = NULL;
- smd->coll = NULL;
- /*
smd->coll = newdataadr(fd, smd->coll);
- smd->coll->points = NULL;
- smd->coll->numpoints = 0;
- */
+ if(smd->coll)
+ {
+ smd->coll->points = NULL;
+ smd->coll->numpoints = 0;
+ }
+ else
+ smd->type = 0;
+
}
}
else if (md->type==eModifierType_Collision) {
@@ -4027,7 +4084,10 @@ static void direct_link_object(FileData *fd, Object *ob)
/* weak weak... this was only meant as draw flag, now is used in give_base too */
ob->flag &= ~OB_FROMGROUP;
-
+
+ /* editmode doesn't get saved in files, so should get cleared when reloading... */
+ ob->mode &= ~(OB_MODE_EDIT|OB_MODE_PARTICLE_EDIT);
+
ob->disp.first=ob->disp.last= NULL;
ob->adt= newdataadr(fd, ob->adt);
@@ -4101,6 +4161,8 @@ static void direct_link_object(FileData *fd, Object *ob)
}
ob->pd= newdataadr(fd, ob->pd);
+ if(ob->pd)
+ ob->pd->rng=NULL;
ob->soft= newdataadr(fd, ob->soft);
if(ob->soft) {
SoftBody *sb= ob->soft;
@@ -4118,6 +4180,11 @@ static void direct_link_object(FileData *fd, Object *ob)
}
}
+ if(sb->effector_weights)
+ sb->effector_weights = newdataadr(fd, sb->effector_weights);
+ else
+ sb->effector_weights = BKE_add_effector_weights(NULL);
+
direct_link_pointcache_list(fd, &sb->ptcaches, &sb->pointcache);
}
ob->bsoft= newdataadr(fd, ob->bsoft);
@@ -4196,6 +4263,8 @@ static void direct_link_object(FileData *fd, Object *ob)
BLI_addhead(&ob->modifiers, hmd);
BLI_remlink(&ob->hooks, hook);
+
+ modifier_unique_name(&ob->modifiers, (ModifierData*)hmd);
MEM_freeN(hook);
}
@@ -4267,9 +4336,6 @@ static void lib_link_scene(FileData *fd, Main *main)
/* base->object= newlibadr_us(fd, sce->id.lib, base->object); */
base->object= newlibadr_us(fd, sce->id.lib, base->object);
- /* when save during radiotool, needs cleared */
- base->flag &= ~OB_RADIO;
-
if(base->object==NULL) {
printf("LIB ERROR: base removed\n");
BLI_remlink(&sce->base, base);
@@ -4537,6 +4603,7 @@ static void direct_link_windowmanager(FileData *fd, wmWindowManager *wm)
win->timers.first= win->timers.last= NULL;
win->queue.first= win->queue.last= NULL;
win->handlers.first= win->handlers.last= NULL;
+ win->modalhandlers.first= win->modalhandlers.last= NULL;
win->subwindows.first= win->subwindows.last= NULL;
win->gesture.first= win->gesture.last= NULL;
@@ -4546,11 +4613,13 @@ static void direct_link_windowmanager(FileData *fd, wmWindowManager *wm)
}
wm->operators.first= wm->operators.last= NULL;
- wm->keymaps.first= wm->keymaps.last= NULL;
wm->paintcursors.first= wm->paintcursors.last= NULL;
wm->queue.first= wm->queue.last= NULL;
BKE_reports_init(&wm->reports, RPT_STORE);
+ wm->keyconfigs.first= wm->keyconfigs.last= NULL;
+ wm->defaultconf= NULL;
+
wm->jobs.first= wm->jobs.last= NULL;
wm->windrawable= NULL;
@@ -4851,7 +4920,6 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
v3d->layact= v3d->localvd->layact;
MEM_freeN(v3d->localvd);
v3d->localvd= NULL;
- v3d->localview= 0;
}
*/
}
@@ -4994,7 +5062,6 @@ static void direct_link_region(FileData *fd, ARegion *ar, int spacetype)
rv3d->ri= NULL;
rv3d->sms= NULL;
rv3d->smooth_timer= NULL;
- rv3d->lastmode= 0;
}
}
@@ -5378,6 +5445,33 @@ static char *dataname(short id_code)
}
+static BHead *read_data_into_oldnewmap(FileData *fd, BHead *bhead, char *allocname)
+{
+ bhead = blo_nextbhead(fd, bhead);
+
+ while(bhead && bhead->code==DATA) {
+ void *data;
+#if 0
+ /* XXX DUMB DEBUGGING OPTION TO GIVE NAMES for guarded malloc errors */
+ short *sp= fd->filesdna->structs[bhead->SDNAnr];
+ char *allocname = fd->filesdna->types[ sp[0] ];
+ char *tmp= malloc(100);
+
+ strcpy(tmp, allocname);
+ data= read_struct(fd, bhead, tmp);
+#endif
+ data= read_struct(fd, bhead, allocname);
+
+ if (data) {
+ oldnewmap_insert(fd->datamap, bhead->old, data, 0);
+ }
+
+ bhead = blo_nextbhead(fd, bhead);
+ }
+
+ return bhead;
+}
+
static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, int flag, ID **id_r)
{
/* this routine reads a libblock and its direct data. Use link functions
@@ -5419,32 +5513,11 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, int flag, ID
return blo_nextbhead(fd, bhead);
}
- bhead = blo_nextbhead(fd, bhead);
-
/* need a name for the mallocN, just for debugging and sane prints on leaks */
allocname= dataname(GS(id->name));
- /* read all data */
-
- while(bhead && bhead->code==DATA) {
- void *data;
-#if 0
- /* XXX DUMB DEBUGGING OPTION TO GIVE NAMES for guarded malloc errors */
- short *sp= fd->filesdna->structs[bhead->SDNAnr];
- char *allocname = fd->filesdna->types[ sp[0] ];
- char *tmp= malloc(100);
-
- strcpy(tmp, allocname);
- data= read_struct(fd, bhead, tmp);
-#endif
- data= read_struct(fd, bhead, allocname);
-
- if (data) {
- oldnewmap_insert(fd->datamap, bhead->old, data, 0);
- }
-
- bhead = blo_nextbhead(fd, bhead);
- }
+ /* read all data into fd->datamap */
+ bhead= read_data_into_oldnewmap(fd, bhead, allocname);
/* init pointers direct data */
switch( GS(id->name) ) {
@@ -6308,7 +6381,70 @@ static void do_versions_gpencil_2_50(Main *main, bScreen *screen)
}
}
+static void do_version_mtex_factor_2_50(MTex **mtex_array, short idtype)
+{
+ MTex *mtex;
+ float varfac, colfac;
+ int a, neg;
+
+ if(!mtex_array)
+ return;
+ for(a=0; a<MAX_MTEX; a++) {
+ if(mtex_array[a]) {
+ mtex= mtex_array[a];
+
+ neg= mtex->maptoneg;
+ varfac= mtex->varfac;
+ colfac= mtex->colfac;
+
+ if(neg & MAP_DISP) mtex->dispfac= -mtex->dispfac;
+ if(neg & MAP_NORM) mtex->norfac= -mtex->norfac;
+ if(neg & MAP_WARP) mtex->warpfac= -mtex->warpfac;
+
+ mtex->colspecfac= (neg & MAP_COLSPEC)? -colfac: colfac;
+ mtex->mirrfac= (neg & MAP_COLMIR)? -colfac: colfac;
+ mtex->alphafac= (neg & MAP_ALPHA)? -varfac: varfac;
+ mtex->difffac= (neg & MAP_REF)? -varfac: varfac;
+ mtex->specfac= (neg & MAP_SPEC)? -varfac: varfac;
+ mtex->emitfac= (neg & MAP_EMIT)? -varfac: varfac;
+ mtex->hardfac= (neg & MAP_HAR)? -varfac: varfac;
+ mtex->raymirrfac= (neg & MAP_RAYMIRR)? -varfac: varfac;
+ mtex->translfac= (neg & MAP_TRANSLU)? -varfac: varfac;
+ mtex->ambfac= (neg & MAP_AMB)? -varfac: varfac;
+ mtex->colemitfac= (neg & MAP_EMISSION_COL)? -colfac: colfac;
+ mtex->colreflfac= (neg & MAP_REFLECTION_COL)? -colfac: colfac;
+ mtex->coltransfac= (neg & MAP_TRANSMISSION_COL)? -colfac: colfac;
+ mtex->densfac= (neg & MAP_DENSITY)? -varfac: varfac;
+ mtex->scatterfac= (neg & MAP_SCATTERING)? -varfac: varfac;
+ mtex->reflfac= (neg & MAP_REFLECTION)? -varfac: varfac;
+
+ mtex->timefac= (neg & MAP_PA_TIME)? -varfac: varfac;
+ mtex->lengthfac= (neg & MAP_PA_LENGTH)? -varfac: varfac;
+ mtex->clumpfac= (neg & MAP_PA_CLUMP)? -varfac: varfac;
+ mtex->kinkfac= (neg & MAP_PA_KINK)? -varfac: varfac;
+ mtex->roughfac= (neg & MAP_PA_ROUGH)? -varfac: varfac;
+ mtex->padensfac= (neg & MAP_PA_DENS)? -varfac: varfac;
+ mtex->lifefac= (neg & MAP_PA_LIFE)? -varfac: varfac;
+ mtex->sizefac= (neg & MAP_PA_SIZE)? -varfac: varfac;
+ mtex->ivelfac= (neg & MAP_PA_IVEL)? -varfac: varfac;
+ mtex->pvelfac= (neg & MAP_PA_PVEL)? -varfac: varfac;
+
+ mtex->shadowfac= (neg & LAMAP_SHAD)? -colfac: colfac;
+
+ mtex->zenupfac= (neg & WOMAP_ZENUP)? -colfac: colfac;
+ mtex->zendownfac= (neg & WOMAP_ZENDOWN)? -colfac: colfac;
+ mtex->blendfac= (neg & WOMAP_BLEND)? -varfac: varfac;
+
+ if(idtype == ID_MA)
+ mtex->colfac= (neg & MAP_COL)? -colfac: colfac;
+ else if(idtype == ID_LA)
+ mtex->colfac= (neg & LAMAP_COL)? -colfac: colfac;
+ else if(idtype == ID_WO)
+ mtex->colfac= (neg & WOMAP_HORIZ)? -colfac: colfac;
+ }
+ }
+}
static void do_versions(FileData *fd, Library *lib, Main *main)
{
@@ -7690,6 +7826,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
smd->flags |= eSubsurfModifierFlag_ControlEdges;
BLI_addtail(&ob->modifiers, smd);
+
+ modifier_unique_name(&ob->modifiers, (ModifierData*)smd);
}
}
@@ -9518,10 +9656,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
*/
//do_versions_ipos_to_animato(main);
- /* toolsettings */
- for(scene= main->scene.first; scene; scene= scene->id.next)
- scene->r.audio = scene->audio;
-
/* shader, composit and texture node trees have id.name empty, put something in
* to have them show in RNA viewer and accessible otherwise.
*/
@@ -9535,7 +9669,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
strcpy(sce->nodetree->id.name, "NTComposit Nodetree");
/* move to cameras */
- if(sce->r.scemode & R_PANORAMA) {
+ if(sce->r.mode & R_PANORAMA) {
for(base=sce->base.first; base; base=base->next) {
ob= newlibadr(fd, lib, base->object);
@@ -9545,7 +9679,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- sce->r.scemode &= ~R_PANORAMA;
+ sce->r.mode &= ~R_PANORAMA;
}
}
/* and texture trees */
@@ -9731,16 +9865,13 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
if (ma->vol.stepsize < 0.0001f) {
ma->vol.density = 1.0f;
ma->vol.emission = 0.0f;
- ma->vol.absorption = 1.0f;
ma->vol.scattering = 1.0f;
ma->vol.emission_col[0] = ma->vol.emission_col[1] = ma->vol.emission_col[2] = 1.0f;
- ma->vol.absorption_col[0] = ma->vol.absorption_col[1] = ma->vol.absorption_col[2] = 0.0f;
ma->vol.density_scale = 1.0f;
ma->vol.depth_cutoff = 0.01f;
ma->vol.stepsize_type = MA_VOL_STEP_RANDOMIZED;
ma->vol.stepsize = 0.2f;
- ma->vol.shade_stepsize = 0.2f;
- ma->vol.shade_type = MA_VOL_SHADE_SINGLE;
+ ma->vol.shade_type = MA_VOL_SHADE_SHADED;
ma->vol.shadeflag |= MA_VOL_PRECACHESHADING;
ma->vol.precache_resolution = 50;
}
@@ -9857,28 +9988,131 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- /* put 2.50 compatibility code here until next subversion bump */
- {
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 4)) {
Scene *sce;
Object *ob;
+ Material *ma;
+ Lamp *la;
+ World *wo;
+ Tex *tex;
+ ParticleSettings *part;
+ int do_gravity = 0;
for(sce = main->scene.first; sce; sce = sce->id.next)
if(sce->unit.scale_length == 0.0f)
sce->unit.scale_length= 1.0f;
for(ob = main->object.first; ob; ob = ob->id.next) {
+ /* fluid-sim stuff */
+ FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim);
+ if (fluidmd) fluidmd->fss->fmd = fluidmd;
+
+ /* rotation modes were added, but old objects would now default to being 'quaternion based' */
+ ob->rotmode= ROT_MODE_EUL;
+ }
+
+ for(ma = main->mat.first; ma; ma=ma->id.next) {
+ if(ma->vol.reflection == 0.f) {
+ ma->vol.reflection = 1.f;
+ ma->vol.transmission_col[0] = ma->vol.transmission_col[1] = ma->vol.transmission_col[2] = 1.0f;
+ ma->vol.reflection_col[0] = ma->vol.reflection_col[1] = ma->vol.reflection_col[2] = 1.0f;
+ }
+
+ do_version_mtex_factor_2_50(ma->mtex, ID_MA);
+ }
+
+ for(la = main->lamp.first; la; la=la->id.next)
+ do_version_mtex_factor_2_50(la->mtex, ID_LA);
+
+ for(wo = main->world.first; wo; wo=wo->id.next)
+ do_version_mtex_factor_2_50(wo->mtex, ID_WO);
+
+ for(tex = main->tex.first; tex; tex=tex->id.next)
+ if(tex->vd)
+ if(tex->vd->extend == 0)
+ tex->vd->extend = TEX_CLIP;
+
+ for(sce= main->scene.first; sce; sce= sce->id.next)
+ {
+ if(sce->audio.main == 0.0)
+ sce->audio.main = 1.0;
+
+ sce->r.ffcodecdata.audio_mixrate = sce->audio.mixrate;
+ sce->r.ffcodecdata.audio_volume = sce->audio.main;
+ sce->audio.distance_model = 2.0;
+ sce->audio.doppler_factor = 1.0;
+ sce->audio.speed_of_sound = 343.3;
+ }
+
+ /* Add default gravity to scenes */
+ for(sce= main->scene.first; sce; sce= sce->id.next) {
+ if((sce->physics_settings.flag & PHYS_GLOBAL_GRAVITY) == 0
+ && VecLength(sce->physics_settings.gravity) == 0.0f) {
+
+ sce->physics_settings.gravity[0] = sce->physics_settings.gravity[1] = 0.0f;
+ sce->physics_settings.gravity[2] = -9.81f;
+ sce->physics_settings.flag = PHYS_GLOBAL_GRAVITY;
+ do_gravity = 1;
+ }
+ }
+
+ /* Assign proper global gravity weights for dynamics (only z-coordinate is taken into account) */
+ if(do_gravity) for(part= main->particle.first; part; part= part->id.next)
+ part->effector_weights->global_gravity = part->acc[2]/-9.81f;
+
+ for(ob = main->object.first; ob; ob = ob->id.next) {
ModifierData *md;
- /* add backwards pointer for fluidsim modifier RNA access */
- for (md=ob->modifiers.first; md; md = md->next) {
- if (md->type == eModifierType_Fluidsim) {
- FluidsimModifierData *fluidmd= (FluidsimModifierData*) md;
- fluidmd->fss->fmd = fluidmd;
+ if(do_gravity) {
+ for(md= ob->modifiers.first; md; md= md->next) {
+ ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth);
+ if(clmd)
+ clmd->sim_parms->effector_weights->global_gravity = clmd->sim_parms->gravity[2]/-9.81;
}
+
+ if(ob->soft)
+ ob->soft->effector_weights->global_gravity = ob->soft->grav/9.81;
+ }
+
+ /* Normal wind shape is plane */
+ if(ob->pd) {
+ if(ob->pd->forcefield == PFIELD_WIND)
+ ob->pd->shape = PFIELD_SHAPE_PLANE;
+
+ if(ob->pd->flag & PFIELD_PLANAR)
+ ob->pd->shape = PFIELD_SHAPE_PLANE;
+ else if(ob->pd->flag & PFIELD_SURFACE)
+ ob->pd->shape = PFIELD_SHAPE_SURFACE;
}
}
}
+ /* put 2.50 compatibility code here until next subversion bump */
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 6)) {
+ Object *ob;
+ Lamp *la;
+
+ /* New variables for axis-angle rotations and/or quaternion rotations were added, and need proper initialisation */
+ for (ob= main->object.first; ob; ob= ob->id.next) {
+ /* new variables for all objects */
+ ob->quat[0]= 1.0f;
+ ob->rotAxis[1]= 1.0f;
+
+ /* bones */
+ if (ob->pose) {
+ bPoseChannel *pchan;
+
+ for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ /* just need to initalise rotation axis properly... */
+ pchan->rotAxis[1]= 1.0f;
+ }
+ }
+ }
+
+ for(la = main->lamp.first; la; la=la->id.next)
+ la->compressthresh= 0.05f;
+ }
+
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */
@@ -9922,23 +10156,39 @@ static void lib_link_all(FileData *fd, Main *main)
static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead)
{
- Link *link;
+ UserDef *user;
+ wmKeyMap *keymap;
+ wmKeyMapItem *kmi;
- bfd->user= read_struct(fd, bhead, "user def");
- bfd->user->themes.first= bfd->user->themes.last= NULL;
- // XXX
- bfd->user->uifonts.first= bfd->user->uifonts.last= NULL;
- bfd->user->uistyles.first= bfd->user->uistyles.last= NULL;
+ bfd->user= user= read_struct(fd, bhead, "user def");
- bhead = blo_nextbhead(fd, bhead);
+ /* read all data into fd->datamap */
+ bhead= read_data_into_oldnewmap(fd, bhead, "user def");
- /* read all attached data */
- while(bhead && bhead->code==DATA) {
- link= read_struct(fd, bhead, "user def data");
- BLI_addtail(&bfd->user->themes, link);
- bhead = blo_nextbhead(fd, bhead);
+ link_list(fd, &user->themes);
+ link_list(fd, &user->keymaps);
+
+ for(keymap=user->keymaps.first; keymap; keymap=keymap->next) {
+ keymap->modal_items= NULL;
+ keymap->poll= NULL;
+
+ link_list(fd, &keymap->items);
+ for(kmi=keymap->items.first; kmi; kmi=kmi->next) {
+ kmi->properties= newdataadr(fd, kmi->properties);
+ if(kmi->properties)
+ IDP_DirectLinkProperty(kmi->properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ kmi->ptr= NULL;
+ }
}
+ // XXX
+ user->uifonts.first= user->uifonts.last= NULL;
+ user->uistyles.first= user->uistyles.last= NULL;
+
+ /* free fd->datamap again */
+ oldnewmap_free_unused(fd->datamap);
+ oldnewmap_clear(fd->datamap);
+
return bhead;
}
@@ -10592,6 +10842,9 @@ static void expand_armature(FileData *fd, Main *mainvar, bArmature *arm)
{
Bone *curBone;
+ if(arm->adt)
+ expand_animdata(fd, mainvar, arm->adt);
+
for (curBone = arm->bonebase.first; curBone; curBone=curBone->next) {
expand_bones(fd, mainvar, curBone);
}
@@ -10740,11 +10993,19 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
bObjectActuator *oa= act->data;
expand_doit(fd, mainvar, oa->reference);
}
+ else if(act->type==ACT_ADD_OBJECT) {
+ bAddObjectActuator *aoa= act->data;
+ expand_doit(fd, mainvar, aoa->ob);
+ }
else if(act->type==ACT_SCENE) {
bSceneActuator *sa= act->data;
expand_doit(fd, mainvar, sa->camera);
expand_doit(fd, mainvar, sa->scene);
}
+ else if(act->type==ACT_2DFILTER) {
+ bTwoDFilterActuator *tdfa= act->data;
+ expand_doit(fd, mainvar, tdfa->text);
+ }
else if(act->type==ACT_ACTION) {
bActionActuator *aa= act->data;
expand_doit(fd, mainvar, aa->act);
@@ -10761,6 +11022,14 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
bMessageActuator *ma= act->data;
expand_doit(fd, mainvar, ma->toObject);
}
+ else if(act->type==ACT_PARENT) {
+ bParentActuator *pa= act->data;
+ expand_doit(fd, mainvar, pa->ob);
+ }
+ else if(act->type==ACT_ARMATURE) {
+ bArmatureActuator *arma= act->data;
+ expand_doit(fd, mainvar, arma->target);
+ }
act= act->next;
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 586483d2e13..72e1b5b1b78 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -537,13 +537,23 @@ static void write_renderinfo(WriteData *wd, Main *mainvar) /* for renderdeamon
static void write_userdef(WriteData *wd)
{
bTheme *btheme;
+ wmKeyMap *keymap;
+ wmKeyMapItem *kmi;
writestruct(wd, USER, "UserDef", 1, &U);
- btheme= U.themes.first;
- while(btheme) {
+ for(btheme= U.themes.first; btheme; btheme=btheme->next)
writestruct(wd, DATA, "bTheme", 1, btheme);
- btheme= btheme->next;
+
+ for(keymap= U.keymaps.first; keymap; keymap=keymap->next) {
+ writestruct(wd, DATA, "wmKeyMap", 1, keymap);
+
+ for(kmi=keymap->items.first; kmi; kmi=kmi->next) {
+ writestruct(wd, DATA, "wmKeyMapItem", 1, kmi);
+
+ if(kmi->properties)
+ IDP_WriteProperty(kmi->properties, wd);
+ }
}
}
@@ -610,6 +620,7 @@ static void write_pointcaches(WriteData *wd, ListBase *ptcaches)
static void write_particlesettings(WriteData *wd, ListBase *idbase)
{
ParticleSettings *part;
+ ParticleDupliWeight *dw;
part= idbase->first;
while(part) {
@@ -620,6 +631,11 @@ static void write_particlesettings(WriteData *wd, ListBase *idbase)
if (part->adt) write_animdata(wd, part->adt);
writestruct(wd, DATA, "PartDeflect", 1, part->pd);
writestruct(wd, DATA, "PartDeflect", 1, part->pd2);
+ writestruct(wd, DATA, "EffectorWeights", 1, part->effector_weights);
+
+ dw = part->dupliweights.first;
+ for(; dw; dw=dw->next)
+ writestruct(wd, DATA, "ParticleDupliWeight", 1, dw);
if(part->boids && part->phystype == PART_PHYS_BOIDS) {
BoidState *state = part->boids->states.first;
@@ -712,6 +728,9 @@ static void write_sensors(WriteData *wd, ListBase *lb)
case SENS_PROPERTY:
writestruct(wd, DATA, "bPropertySensor", 1, sens->data);
break;
+ case SENS_ARMATURE:
+ writestruct(wd, DATA, "bArmatureSensor", 1, sens->data);
+ break;
case SENS_ACTUATOR:
writestruct(wd, DATA, "bActuatorSensor", 1, sens->data);
break;
@@ -830,6 +849,9 @@ static void write_actuators(WriteData *wd, ListBase *lb)
case ACT_STATE:
writestruct(wd, DATA, "bStateActuator", 1, act->data);
break;
+ case ACT_ARMATURE:
+ writestruct(wd, DATA, "bArmatureActuator", 1, act->data);
+ break;
default:
; /* error: don't know how to write this file */
}
@@ -1093,8 +1115,16 @@ static void write_pose(WriteData *wd, bPose *pose)
for (grp=pose->agroups.first; grp; grp=grp->next)
writestruct(wd, DATA, "bActionGroup", 1, grp);
+ /* write IK param */
+ if (pose->ikparam) {
+ char *structname = (char *)get_ikparam_name(pose);
+ if (structname)
+ writestruct(wd, DATA, structname, 1, pose->ikparam);
+ }
+
/* Write this pose */
writestruct(wd, DATA, "bPose", 1, pose);
+
}
static void write_defgroups(WriteData *wd, ListBase *defbase)
@@ -1126,19 +1156,21 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
writestruct(wd, DATA, "ClothSimSettings", 1, clmd->sim_parms);
writestruct(wd, DATA, "ClothCollSettings", 1, clmd->coll_parms);
+ writestruct(wd, DATA, "EffectorWeights", 1, clmd->sim_parms->effector_weights);
write_pointcaches(wd, &clmd->ptcaches);
}
else if(md->type==eModifierType_Smoke) {
SmokeModifierData *smd = (SmokeModifierData*) md;
if(smd->type & MOD_SMOKE_TYPE_DOMAIN)
+ {
writestruct(wd, DATA, "SmokeDomainSettings", 1, smd->domain);
+ writestruct(wd, DATA, "EffectorWeights", 1, smd->domain->effector_weights);
+ }
else if(smd->type & MOD_SMOKE_TYPE_FLOW)
writestruct(wd, DATA, "SmokeFlowSettings", 1, smd->flow);
- /*
else if(smd->type & MOD_SMOKE_TYPE_COLL)
writestruct(wd, DATA, "SmokeCollSettings", 1, smd->coll);
- */
if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain)
{
@@ -1213,7 +1245,10 @@ static void write_objects(WriteData *wd, ListBase *idbase)
writestruct(wd, DATA, "PartDeflect", 1, ob->pd);
writestruct(wd, DATA, "SoftBody", 1, ob->soft);
- if(ob->soft) write_pointcaches(wd, &ob->soft->ptcaches);
+ if(ob->soft) {
+ write_pointcaches(wd, &ob->soft->ptcaches);
+ writestruct(wd, DATA, "EffectorWeights", 1, ob->soft->effector_weights);
+ }
writestruct(wd, DATA, "BulletSoftBody", 1, ob->bsoft);
write_particlesystems(wd, &ob->particlesystem);
@@ -2118,6 +2153,8 @@ static void write_armatures(WriteData *wd, ListBase *idbase)
writestruct(wd, ID_AR, "bArmature", 1, arm);
if (arm->id.properties) IDP_WriteProperty(arm->id.properties, wd);
+ if (arm->adt) write_animdata(wd, arm->adt);
+
/* Direct data */
bone= arm->bonebase.first;
while(bone) {
diff --git a/source/blender/blenpluginapi/CMakeLists.txt b/source/blender/blenpluginapi/CMakeLists.txt
index 1c5e2697c01..e6087a001f8 100644
--- a/source/blender/blenpluginapi/CMakeLists.txt
+++ b/source/blender/blenpluginapi/CMakeLists.txt
@@ -30,6 +30,10 @@ SET(INC
. .. ../../../intern/guardedalloc ../blenlib ../imbuf ../makesdna
)
+IF(WIN32)
+ SET(INC ${INC} ${PTHREADS_INC})
+ENDIF(WIN32)
+
IF(WITH_QUICKTIME)
SET(INC ${INC} ${QUICKTIME_INC})
ADD_DEFINITIONS(-DWITH_QUICKTIME)
diff --git a/source/blender/blenpluginapi/SConscript b/source/blender/blenpluginapi/SConscript
index af69b4519b4..77faaa7b7f4 100644
--- a/source/blender/blenpluginapi/SConscript
+++ b/source/blender/blenpluginapi/SConscript
@@ -7,8 +7,17 @@ incs = '. .. #/intern/guardedalloc ../blenlib ../imbuf ../makesdna'
defs = []
+incs += ' ' + env["BF_PTHREADS_INC"]
+
if env['WITH_BF_QUICKTIME']:
defs.append('WITH_QUICKTIME')
incs += ' ' + env['BF_QUICKTIME_INC']
+if env['OURPLATFORM'] == 'linux2':
+ cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( libname = 'bf_blenpluginapi', sources = sources, includes = Split(incs), defines = defs, libtype=['core'], priority = [170] )
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index caa09811ad9..f61cf451944 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -225,6 +225,22 @@ BMOpDefine def_removedoubles = {
};
/*
+ Auto Merge
+
+ Finds groups of vertices closer then dist and merges them together,
+ using the weld verts bmop. The merges must go from a vert not in
+ verts to one in verts.
+*/
+BMOpDefine def_automerge = {
+ "automerge",
+ {{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, //input verts
+ {BMOP_OPSLOT_FLT, "dist"}, //minimum distance
+ {0, /*null-terminating sentinel*/}},
+ bmesh_automerge_exec,
+ 0,
+};
+
+/*
Collapse Connected
Collapses connected vertices
@@ -872,6 +888,7 @@ BMOpDefine *opdefines[] = {
&def_vertexshortestpath,
&def_scale,
&def_edgesplit,
+ &def_automerge,
};
int bmesh_total_ops = (sizeof(opdefines) / sizeof(void*));
diff --git a/source/blender/bmesh/intern/bmesh_operators_private.h b/source/blender/bmesh/intern/bmesh_operators_private.h
index e86920194c0..e5e05921195 100644
--- a/source/blender/bmesh/intern/bmesh_operators_private.h
+++ b/source/blender/bmesh/intern/bmesh_operators_private.h
@@ -60,4 +60,6 @@ void bmesh_reversecolors_exec(BMesh *bm, BMOperator *op);
void bmesh_vertexshortestpath_exec(BMesh *bm, BMOperator *op);
void bmesh_scale_exec(BMesh *bm, BMOperator *op);
void bmesh_edgesplitop_exec(BMesh *bm, BMOperator *op);
+void bmesh_automerge_exec(BMesh *bm, BMOperator *op);
+
#endif
diff --git a/source/blender/bmesh/operators/removedoubles.c b/source/blender/bmesh/operators/removedoubles.c
index e4444b0f065..e91c71a498c 100644
--- a/source/blender/bmesh/operators/removedoubles.c
+++ b/source/blender/bmesh/operators/removedoubles.c
@@ -214,6 +214,7 @@ static int vergaverco(const void *e1, const void *e2)
#define VERT_TARGET 4
#define VERT_KEEP 8
#define VERT_MARK 16
+#define VERT_IN 32
#define EDGE_MARK 1
@@ -549,3 +550,58 @@ void bmesh_finddoubles_exec(BMesh *bm, BMOperator *op)
BLI_array_free(verts);
}
+
+void bmesh_automerge_exec(BMesh *bm, BMOperator *op)
+{
+ BMOIter oiter;
+ BMOperator weldop;
+ BMVert *v, *v2;
+ BMVert **verts=NULL;
+ BLI_array_declare(verts);
+ float dist, distsqr;
+ int i, j, len, keepvert;
+
+ dist = BMO_Get_Float(op, "dist");
+ distsqr = dist*dist;
+
+ i = 0;
+ BMO_ITER(v, &oiter, bm, op, "verts", BM_VERT) {
+ BLI_array_growone(verts);
+ verts[i++] = v;
+ }
+
+ BMO_Init_Op(&weldop, "weldverts");
+
+ /*sort by vertex coordinates added together*/
+ qsort(verts, BLI_array_count(verts), sizeof(void*), vergaverco);
+
+ BMO_Flag_Buffer(bm, op, "verts", VERT_KEEP, BM_VERT);
+
+ len = BLI_array_count(verts);
+ for (i=0; i<len; i++) {
+ v = verts[i];
+ if (BMO_TestFlag(bm, v, VERT_DOUBLE)) continue;
+
+ for (j=i+1; j<len; j++) {
+ v2 = verts[j];
+ if ((v2->co[0]+v2->co[1]+v2->co[2]) - (v->co[0]+v->co[1]+v->co[2])
+ > distsqr) break;
+
+ /* only allow unselected -> selected */
+ if (BMO_TestFlag(bm, v2, VERT_IN))
+ continue;
+
+ if (VecLenCompare(v->co, v2->co, dist)) {
+ BMO_SetFlag(bm, v2, VERT_DOUBLE);
+ BMO_SetFlag(bm, v, VERT_TARGET);
+
+ BMO_Insert_MapPointer(bm, &weldop, "targetmap", v2, v);
+ }
+ }
+ }
+
+ BMO_Exec_Op(bm, &weldop);
+ BMO_Finish_Op(bm, &weldop);
+
+ BLI_array_free(verts);
+}
diff --git a/source/blender/bmesh/operators/utils.c b/source/blender/bmesh/operators/utils.c
index 46a19ae6bfe..81ddb9a7e8e 100644
--- a/source/blender/bmesh/operators/utils.c
+++ b/source/blender/bmesh/operators/utils.c
@@ -614,7 +614,7 @@ void bmesh_similarfaces_exec(BMesh *bm, BMOperator *op)
break;
case SIMFACE_NORMAL:
- angle = VecAngle2(fs->no, fm->no); /* if the angle between the normals -> 0 */
+ angle = RAD2DEG(VecAngle2(fs->no, fm->no)); /* if the angle between the normals -> 0 */
if( angle / 180.0 <= thresh ) {
BMO_SetFlag(bm, fm, FACE_MARK);
cont = 0;
@@ -622,7 +622,7 @@ void bmesh_similarfaces_exec(BMesh *bm, BMOperator *op)
break;
case SIMFACE_COPLANAR:
- angle = VecAngle2(fs->no, fm->no); /* angle -> 0 */
+ angle = RAD2DEG(VecAngle2(fs->no, fm->no)); /* angle -> 0 */
if( angle / 180.0 <= thresh ) { /* and dot product difference -> 0 */
if( fabs(f_ext[i].d - f_ext[indices[idx]].d) <= thresh ) {
BMO_SetFlag(bm, fm, FACE_MARK);
@@ -686,7 +686,7 @@ static float edge_angle(BMesh *bm, BMEdge *e)
}
}
- angle = VecAngle2(n1, n2) / 180.0;
+ angle = VecAngle2(n1, n2);
return angle;
}
@@ -791,7 +791,7 @@ void bmesh_similaredges_exec(BMesh *bm, BMOperator *op)
case SIMEDGE_DIR:
/* compute the angle between the two edges */
- angle = VecAngle2(e_ext[i].dir, e_ext[indices[idx]].dir);
+ angle = RAD2DEG(VecAngle2(e_ext[i].dir, e_ext[indices[idx]].dir));
if( angle > 90.0 ) /* use the smallest angle between the edges */
angle = fabs(angle - 180.0f);
@@ -927,7 +927,7 @@ void bmesh_similarverts_exec(BMesh *bm, BMOperator *op)
switch( type ) {
case SIMVERT_NORMAL:
/* compare the angle between the normals */
- if( VecAngle2(v->no, vs->no) / 180.0 <= thresh ) {
+ if( RAD2DEG(VecAngle2(v->no, vs->no) / 180.0 <= thresh )) {
BMO_SetFlag(bm, v, VERT_MARK);
cont = 0;
diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt
index 47371116676..5433e317bd1 100644
--- a/source/blender/editors/CMakeLists.txt
+++ b/source/blender/editors/CMakeLists.txt
@@ -40,6 +40,7 @@ SET(INC ../windowmanager
../gpu
../blenfont
${SDL_INC}
+ ../ikplugin
)
IF(WITH_INTERNATIONAL)
diff --git a/source/blender/editors/Makefile b/source/blender/editors/Makefile
index 6a9d695ab0e..e259168a4ef 100644
--- a/source/blender/editors/Makefile
+++ b/source/blender/editors/Makefile
@@ -43,7 +43,7 @@ DIRS = armature \
metaball \
gpencil \
physics \
- preview \
+ render \
uvedit \
space_outliner \
space_time \
diff --git a/source/blender/editors/SConscript b/source/blender/editors/SConscript
index ccffbdb15d5..226e9247f91 100644
--- a/source/blender/editors/SConscript
+++ b/source/blender/editors/SConscript
@@ -14,7 +14,7 @@ SConscript(['datafiles/SConscript',
'curve/SConscript',
'gpencil/SConscript',
'physics/SConscript',
- 'preview/SConscript',
+ 'render/SConscript',
'sound/SConscript',
'space_buttons/SConscript',
'space_file/SConscript',
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index e3418fa194f..7c9814eda7b 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -280,6 +280,14 @@ static void acf_generic_idblock_name(bAnimListElem *ale, char *name)
/* Settings ------------------------------------------- */
+#if 0
+/* channel type has no settings */
+static short acf_generic_none_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting)
+{
+ return 0;
+}
+#endif
+
/* check if some setting exists for this object-based data-expander (category only) */
static short acf_generic_dsexpand_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting)
{
@@ -335,6 +343,96 @@ static short acf_generic_dataexpand_setting_valid(bAnimContext *ac, bAnimListEle
/* *********************************************** */
/* Type Specific Functions + Defines */
+/* Animation Summary ----------------------------------- */
+
+/* backdrop for summary widget */
+static void acf_summary_backdrop(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
+{
+ View2D *v2d= &ac->ar->v2d;
+
+ // FIXME: hardcoded color - same as the 'action' line in NLA
+ glColor3f(0.8f, 0.2f, 0.0f); // reddish color
+
+ /* rounded corners on LHS only
+ * - top and bottom
+ * - special hack: make the top a bit higher, since we are first...
+ */
+ uiSetRoundBox((1|8));
+ gl_round_box(GL_POLYGON, 0, yminc-2, v2d->cur.xmax+EXTRA_SCROLL_PAD, ymaxc, 8);
+}
+
+/* name for summary entries */
+static void acf_summary_name(bAnimListElem *ale, char *name)
+{
+ if (name)
+ strcpy(name, "DopeSheet Summary");
+}
+
+// TODO: this is really a temp icon I think
+static int acf_summary_icon(bAnimListElem *ale)
+{
+ return ICON_BORDERMOVE;
+}
+
+/* check if some setting exists for this channel */
+static short acf_summary_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting)
+{
+ /* only expanded is supported, as it is used for hiding all stuff which the summary covers */
+ return (setting == ACHANNEL_SETTING_EXPAND);
+}
+
+/* get the appropriate flag(s) for the setting when it is valid */
+static int acf_summary_setting_flag(int setting, short *neg)
+{
+ if (setting == ACHANNEL_SETTING_EXPAND) {
+ /* expanded */
+ *neg= 1;
+ return ADS_FLAG_SUMMARY_COLLAPSED;
+ }
+ else {
+ /* unsupported */
+ *neg= 0;
+ return 0;
+ }
+}
+
+/* get pointer to the setting */
+static void *acf_summary_setting_ptr(bAnimListElem *ale, int setting, short *type)
+{
+ bAnimContext *ac= (bAnimContext *)ale->data;
+
+ /* if data is valid, return pointer to active dopesheet's relevant flag
+ * - this is restricted to DopeSheet/Action Editor only
+ */
+ if ((ac->sa) && (ac->spacetype == SPACE_ACTION) && (setting == ACHANNEL_SETTING_EXPAND)) {
+ SpaceAction *saction= (SpaceAction *)ac->sa->spacedata.first;
+ bDopeSheet *ads= &saction->ads;
+
+ /* return pointer to DopeSheet's flag */
+ GET_ACF_FLAG_PTR(ads->flag);
+ }
+ else {
+ /* can't return anything useful - unsupported */
+ *type= 0;
+ return 0;
+ }
+}
+
+/* all animation summary (DopeSheet only) type define */
+static bAnimChannelType ACF_SUMMARY =
+{
+ acf_summary_backdrop, /* backdrop */
+ acf_generic_indention_0, /* indent level */
+ NULL, /* offset */
+
+ acf_summary_name, /* name */
+ acf_summary_icon, /* icon */
+
+ acf_summary_setting_valid, /* has setting */
+ acf_summary_setting_flag, /* flag for setting */
+ acf_summary_setting_ptr /* pointer for setting */
+};
+
/* Scene ------------------------------------------- */
// TODO: just get this from RNA?
@@ -461,6 +559,9 @@ static void acf_object_name(bAnimListElem *ale, char *name)
/* check if some setting exists for this channel */
static short acf_object_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting)
{
+ Base *base= (Base *)ale->data;
+ Object *ob= base->object;
+
switch (setting) {
/* muted only in NLA */
case ACHANNEL_SETTING_MUTE:
@@ -468,7 +569,7 @@ static short acf_object_setting_valid(bAnimContext *ac, bAnimListElem *ale, int
/* visible only in Graph Editor */
case ACHANNEL_SETTING_VISIBLE:
- return ((ac) && (ac->spacetype == SPACE_IPO));
+ return ((ac) && (ac->spacetype == SPACE_IPO) && (ob->adt));
/* only select and expand supported otherwise */
case ACHANNEL_SETTING_SELECT:
@@ -759,7 +860,7 @@ static int acf_fillactd_setting_flag(int setting, short *neg)
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
- return ACT_SELECTED;
+ return ADT_UI_SELECTED;
case ACHANNEL_SETTING_EXPAND: /* expanded */
*neg= 1;
@@ -774,13 +875,18 @@ static int acf_fillactd_setting_flag(int setting, short *neg)
static void *acf_fillactd_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
bAction *act= (bAction *)ale->data;
+ AnimData *adt= ale->adt;
/* clear extra return data first */
*type= 0;
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
- GET_ACF_FLAG_PTR(act->flag);
+ if (adt) {
+ GET_ACF_FLAG_PTR(adt->flag);
+ }
+ else
+ return 0;
case ACHANNEL_SETTING_EXPAND: /* expanded */
GET_ACF_FLAG_PTR(act->flag);
@@ -901,7 +1007,6 @@ static int acf_fillmatd_setting_flag(int setting, short *neg)
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- *neg= 1;
return OB_ADS_SHOWMATS;
default: /* unsupported */
@@ -945,7 +1050,6 @@ static int acf_fillpartd_setting_flag(int setting, short *neg)
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- *neg= 1;
return OB_ADS_SHOWPARTS;
default: /* unsupported */
@@ -998,6 +1102,9 @@ static int acf_dsmat_setting_flag(int setting, short *neg)
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
*neg= 1;
return ADT_CURVES_NOT_VISIBLE;
+
+ case ACHANNEL_SETTING_SELECT: /* selected */
+ return ADT_UI_SELECTED;
default: /* unsupported */
return 0;
@@ -1016,6 +1123,7 @@ static void *acf_dsmat_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_EXPAND: /* expanded */
GET_ACF_FLAG_PTR(ma->flag);
+ case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ma->adt)
@@ -1067,6 +1175,9 @@ static int acf_dslam_setting_flag(int setting, short *neg)
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
*neg= 1;
return ADT_CURVES_NOT_VISIBLE;
+
+ case ACHANNEL_SETTING_SELECT: /* selected */
+ return ADT_UI_SELECTED;
default: /* unsupported */
return 0;
@@ -1085,6 +1196,7 @@ static void *acf_dslam_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_EXPAND: /* expanded */
GET_ACF_FLAG_PTR(la->flag);
+ case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (la->adt)
@@ -1136,6 +1248,9 @@ static int acf_dscam_setting_flag(int setting, short *neg)
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
*neg= 1;
return ADT_CURVES_NOT_VISIBLE;
+
+ case ACHANNEL_SETTING_SELECT: /* selected */
+ return ADT_UI_SELECTED;
default: /* unsupported */
return 0;
@@ -1154,6 +1269,7 @@ static void *acf_dscam_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_EXPAND: /* expanded */
GET_ACF_FLAG_PTR(ca->flag);
+ case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ca->adt)
@@ -1205,6 +1321,9 @@ static int acf_dscur_setting_flag(int setting, short *neg)
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
*neg= 1;
return ADT_CURVES_NOT_VISIBLE;
+
+ case ACHANNEL_SETTING_SELECT: /* selected */
+ return ADT_UI_SELECTED;
default: /* unsupported */
return 0;
@@ -1223,6 +1342,7 @@ static void *acf_dscur_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_EXPAND: /* expanded */
GET_ACF_FLAG_PTR(cu->flag);
+ case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (cu->adt)
@@ -1274,6 +1394,9 @@ static int acf_dsskey_setting_flag(int setting, short *neg)
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
*neg= 1;
return ADT_CURVES_NOT_VISIBLE;
+
+ case ACHANNEL_SETTING_SELECT: /* selected */
+ return ADT_UI_SELECTED;
default: /* unsupported */
return 0;
@@ -1292,6 +1415,7 @@ static void *acf_dsskey_setting_ptr(bAnimListElem *ale, int setting, short *type
case ACHANNEL_SETTING_EXPAND: /* expanded */
GET_ACF_FLAG_PTR(key->flag);
+ case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (key->adt)
@@ -1343,6 +1467,9 @@ static int acf_dswor_setting_flag(int setting, short *neg)
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
*neg= 1;
return ADT_CURVES_NOT_VISIBLE;
+
+ case ACHANNEL_SETTING_SELECT: /* selected */
+ return ADT_UI_SELECTED;
default: /* unsupported */
return 0;
@@ -1361,6 +1488,7 @@ static void *acf_dswor_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_EXPAND: /* expanded */
GET_ACF_FLAG_PTR(wo->flag);
+ case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (wo->adt)
@@ -1412,6 +1540,9 @@ static int acf_dspart_setting_flag(int setting, short *neg)
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
*neg= 1;
return ADT_CURVES_NOT_VISIBLE;
+
+ case ACHANNEL_SETTING_SELECT: /* selected */
+ return ADT_UI_SELECTED;
default: /* unsupported */
return 0;
@@ -1430,6 +1561,7 @@ static void *acf_dspart_setting_ptr(bAnimListElem *ale, int setting, short *type
case ACHANNEL_SETTING_EXPAND: /* expanded */
GET_ACF_FLAG_PTR(part->flag);
+ case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (part->adt)
@@ -1482,6 +1614,9 @@ static int acf_dsmball_setting_flag(int setting, short *neg)
*neg= 1;
return ADT_CURVES_NOT_VISIBLE;
+ case ACHANNEL_SETTING_SELECT: /* selected */
+ return ADT_UI_SELECTED;
+
default: /* unsupported */
return 0;
}
@@ -1499,6 +1634,7 @@ static void *acf_dsmball_setting_ptr(bAnimListElem *ale, int setting, short *typ
case ACHANNEL_SETTING_EXPAND: /* expanded */
GET_ACF_FLAG_PTR(mb->flag);
+ case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (mb->adt)
@@ -1526,6 +1662,80 @@ static bAnimChannelType ACF_DSMBALL=
acf_dsmball_setting_ptr /* pointer for setting */
};
+/* Armature Expander ------------------------------------------- */
+
+// TODO: just get this from RNA?
+static int acf_dsarm_icon(bAnimListElem *ale)
+{
+ return ICON_ARMATURE_DATA;
+}
+
+/* get the appropriate flag(s) for the setting when it is valid */
+static int acf_dsarm_setting_flag(int setting, short *neg)
+{
+ /* clear extra return data first */
+ *neg= 0;
+
+ switch (setting) {
+ case ACHANNEL_SETTING_EXPAND: /* expanded */
+ return ARM_DS_EXPAND;
+
+ case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
+ return ADT_NLA_EVAL_OFF;
+
+ case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
+ *neg= 1;
+ return ADT_CURVES_NOT_VISIBLE;
+
+ case ACHANNEL_SETTING_SELECT: /* selected */
+ return ADT_UI_SELECTED;
+
+ default: /* unsupported */
+ return 0;
+ }
+}
+
+/* get pointer to the setting */
+static void *acf_dsarm_setting_ptr(bAnimListElem *ale, int setting, short *type)
+{
+ bArmature *arm= (bArmature *)ale->data;
+
+ /* clear extra return data first */
+ *type= 0;
+
+ switch (setting) {
+ case ACHANNEL_SETTING_EXPAND: /* expanded */
+ GET_ACF_FLAG_PTR(arm->flag);
+
+ case ACHANNEL_SETTING_SELECT: /* selected */
+ case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
+ case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
+ if (arm->adt)
+ GET_ACF_FLAG_PTR(arm->adt->flag)
+ else
+ return NULL;
+
+ default: /* unsupported */
+ return NULL;
+ }
+}
+
+/* metaball expander type define */
+static bAnimChannelType ACF_DSARM=
+{
+ acf_generic_dataexpand_backdrop,/* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_dsarm_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dsarm_setting_flag, /* flag for setting */
+ acf_dsarm_setting_ptr /* pointer for setting */
+};
+
+
/* ShapeKey Entry ------------------------------------------- */
// XXX ... this is currently obsolete...
@@ -1691,6 +1901,8 @@ void ANIM_init_channel_typeinfo_data (void)
animchannelTypeInfo[type++]= NULL; /* AnimData */
animchannelTypeInfo[type++]= NULL; /* Special */
+ animchannelTypeInfo[type++]= &ACF_SUMMARY; /* Motion Summary */
+
animchannelTypeInfo[type++]= &ACF_SCENE; /* Scene */
animchannelTypeInfo[type++]= &ACF_OBJECT; /* Object */
animchannelTypeInfo[type++]= &ACF_GROUP; /* Group */
@@ -1709,6 +1921,7 @@ void ANIM_init_channel_typeinfo_data (void)
animchannelTypeInfo[type++]= &ACF_DSWOR; /* World Channel */
animchannelTypeInfo[type++]= &ACF_DSPART; /* Particle Channel */
animchannelTypeInfo[type++]= &ACF_DSMBALL; /* MetaBall Channel */
+ animchannelTypeInfo[type++]= &ACF_DSARM; /* Armature Channel */
animchannelTypeInfo[type++]= NULL; /* ShapeKey */ // XXX this is no longer used for now...
@@ -1976,7 +2189,7 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
/* ------------------ */
-/* callback for widget settings - send notifiers */
+/* callback for (normal) widget settings - send notifiers */
static void achannel_setting_widget_cb(bContext *C, void *poin, void *poin2)
{
WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 72d8f71bc26..7ee591f8cab 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -91,6 +91,7 @@
/* -------------------------- Exposed API ----------------------------------- */
/* Set the given animation-channel as the active one for the active context */
+// TODO: extend for animdata types...
void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int filter, void *channel_data, short channel_type)
{
ListBase anim_data = {NULL, NULL};
@@ -130,11 +131,29 @@ void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int
ACHANNEL_SET_FLAG(nlt, ACHANNEL_SETFLAG_CLEAR, NLATRACK_ACTIVE);
}
break;
+
+ case ANIMTYPE_FILLACTD: /* Action Expander */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSLAM:
+ case ANIMTYPE_DSCAM:
+ case ANIMTYPE_DSCUR:
+ case ANIMTYPE_DSSKEY:
+ case ANIMTYPE_DSWOR:
+ case ANIMTYPE_DSPART:
+ case ANIMTYPE_DSMBALL:
+ case ANIMTYPE_DSARM:
+ {
+ /* need to verify that this data is valid for now */
+ if (ale->adt) {
+ ACHANNEL_SET_FLAG(ale->adt, ACHANNEL_SETFLAG_CLEAR, ADT_UI_ACTIVE);
+ }
+ }
+ break;
}
}
/* set active flag */
- if (channel_data != NULL) {
+ if (channel_data) {
switch (channel_type) {
case ANIMTYPE_GROUP:
{
@@ -154,6 +173,23 @@ void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int
nlt->flag |= NLATRACK_ACTIVE;
}
break;
+
+ case ANIMTYPE_FILLACTD: /* Action Expander */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSLAM:
+ case ANIMTYPE_DSCAM:
+ case ANIMTYPE_DSCUR:
+ case ANIMTYPE_DSSKEY:
+ case ANIMTYPE_DSWOR:
+ case ANIMTYPE_DSPART:
+ case ANIMTYPE_DSMBALL:
+ case ANIMTYPE_DSARM:
+ {
+ /* need to verify that this data is valid for now */
+ if (ale->adt)
+ ale->adt->flag |= ADT_UI_ACTIVE;
+ }
+ break;
}
}
@@ -174,7 +210,7 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short
int filter;
/* filter data */
- filter= ANIMFILTER_VISIBLE;
+ filter= ANIMFILTER_VISIBLE|ANIMFILTER_CHANNELS;
ANIM_animdata_filter(NULL, &anim_data, filter, data, datatype);
/* See if we should be selecting or deselecting */
@@ -189,12 +225,10 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short
sel= ACHANNEL_SETFLAG_CLEAR;
break;
case ANIMTYPE_OBJECT:
+ #if 0 /* for now, do not take object selection into account, since it gets too annoying */
if (ale->flag & SELECT)
sel= ACHANNEL_SETFLAG_CLEAR;
- break;
- case ANIMTYPE_FILLACTD:
- if (ale->flag & ACT_SELECTED)
- sel= ACHANNEL_SETFLAG_CLEAR;
+ #endif
break;
case ANIMTYPE_GROUP:
if (ale->flag & AGRP_SELECTED)
@@ -208,6 +242,22 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short
if (ale->flag & NLATRACK_SELECTED)
sel= ACHANNEL_SETFLAG_CLEAR;
break;
+
+ case ANIMTYPE_FILLACTD: /* Action Expander */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSLAM:
+ case ANIMTYPE_DSCAM:
+ case ANIMTYPE_DSCUR:
+ case ANIMTYPE_DSSKEY:
+ case ANIMTYPE_DSWOR:
+ case ANIMTYPE_DSPART:
+ case ANIMTYPE_DSMBALL:
+ case ANIMTYPE_DSARM:
+ {
+ if ((ale->adt) && (ale->adt->flag & ADT_UI_SELECTED))
+ sel= ACHANNEL_SETFLAG_CLEAR;
+ }
+ break;
}
}
}
@@ -220,23 +270,26 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short
Scene *scene= (Scene *)ale->data;
ACHANNEL_SET_FLAG(scene, sel, SCE_DS_SELECTED);
+
+ if (scene->adt) {
+ ACHANNEL_SET_FLAG(scene, sel, ADT_UI_SELECTED);
+ }
}
break;
case ANIMTYPE_OBJECT:
+ #if 0 /* for now, do not take object selection into account, since it gets too annoying */
{
Base *base= (Base *)ale->data;
Object *ob= base->object;
ACHANNEL_SET_FLAG(base, sel, SELECT);
ACHANNEL_SET_FLAG(ob, sel, SELECT);
- }
- break;
- case ANIMTYPE_FILLACTD:
- {
- bAction *act= (bAction *)ale->data;
- ACHANNEL_SET_FLAG(act, sel, ACT_SELECTED);
+ if (ob->adt) {
+ ACHANNEL_SET_FLAG(ob, sel, ADT_UI_SELECTED);
+ }
}
+ #endif
break;
case ANIMTYPE_GROUP:
{
@@ -262,6 +315,25 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short
nlt->flag &= ~NLATRACK_ACTIVE;
}
break;
+
+ case ANIMTYPE_FILLACTD: /* Action Expander */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSLAM:
+ case ANIMTYPE_DSCAM:
+ case ANIMTYPE_DSCUR:
+ case ANIMTYPE_DSSKEY:
+ case ANIMTYPE_DSWOR:
+ case ANIMTYPE_DSPART:
+ case ANIMTYPE_DSMBALL:
+ case ANIMTYPE_DSARM:
+ {
+ /* need to verify that this data is valid for now */
+ if (ale->adt) {
+ ACHANNEL_SET_FLAG(ale->adt, sel, ADT_UI_SELECTED);
+ ale->adt->flag &= ~ADT_UI_ACTIVE;
+ }
+ }
+ break;
}
}
@@ -1310,18 +1382,22 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh
}
/* action to take depends on what channel we've got */
+ // WARNING: must keep this in sync with the equivalent function in nla_channels.c
switch (ale->type) {
case ANIMTYPE_SCENE:
{
Scene *sce= (Scene *)ale->data;
+ AnimData *adt= sce->adt;
/* set selection status */
if (selectmode == SELECT_INVERT) {
/* swap select */
sce->flag ^= SCE_DS_SELECTED;
+ if (adt) adt->flag ^= ADT_UI_SELECTED;
}
else {
sce->flag |= SCE_DS_SELECTED;
+ if (adt) adt->flag |= ADT_UI_SELECTED;
}
notifierFlags |= ND_ANIMCHAN_SELECT;
@@ -1333,34 +1409,75 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh
Scene *sce= (Scene *)ads->source;
Base *base= (Base *)ale->data;
Object *ob= base->object;
+ AnimData *adt= ob->adt;
/* set selection status */
if (selectmode == SELECT_INVERT) {
/* swap select */
base->flag ^= SELECT;
ob->flag= base->flag;
+
+ if (adt) adt->flag ^= ADT_UI_SELECTED;
}
else {
Base *b;
- /* deleselect all */
+ /* deselect all */
+ // TODO: should this deselect all other types of channels too?
for (b= sce->base.first; b; b= b->next) {
b->flag &= ~SELECT;
b->object->flag= b->flag;
+ if (b->object->adt) b->object->adt->flag &= ~(ADT_UI_SELECTED|ADT_UI_ACTIVE);
}
/* select object now */
base->flag |= SELECT;
ob->flag |= SELECT;
+ if (adt) adt->flag |= ADT_UI_SELECTED;
}
/* xxx should be ED_base_object_activate(), but we need context pointer for that... */
//set_active_base(base);
+ if ((adt) && (adt->flag & ADT_UI_SELECTED))
+ adt->flag |= ADT_UI_ACTIVE;
notifierFlags |= ND_ANIMCHAN_SELECT;
}
break;
+
+ case ANIMTYPE_FILLACTD: /* Action Expander */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSLAM:
+ case ANIMTYPE_DSCAM:
+ case ANIMTYPE_DSCUR:
+ case ANIMTYPE_DSSKEY:
+ case ANIMTYPE_DSWOR:
+ case ANIMTYPE_DSPART:
+ case ANIMTYPE_DSMBALL:
+ case ANIMTYPE_DSARM:
+ {
+ /* sanity checking... */
+ if (ale->adt) {
+ /* select/deselect */
+ if (selectmode == SELECT_INVERT) {
+ /* inverse selection status of this AnimData block only */
+ ale->adt->flag ^= ADT_UI_SELECTED;
+ }
+ else {
+ /* select AnimData block by itself */
+ ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
+ ale->adt->flag |= ADT_UI_SELECTED;
+ }
+
+ /* set active? */
+ if ((ale->adt) && (ale->adt->flag & ADT_UI_SELECTED))
+ ale->adt->flag |= ADT_UI_ACTIVE;
+ }
+ notifierFlags |= ND_ANIMCHAN_SELECT;
+ }
+ break;
+
case ANIMTYPE_GROUP:
{
bActionGroup *agrp= (bActionGroup *)ale->data;
@@ -1570,9 +1687,9 @@ void ED_operatortypes_animchannels(void)
WM_operatortype_append(ANIM_OT_channels_visibility_toggle);
}
-void ED_keymap_animchannels(wmWindowManager *wm)
+void ED_keymap_animchannels(wmKeyConfig *keyconf)
{
- ListBase *keymap = WM_keymap_listbase(wm, "Animation_Channels", 0, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "Animation_Channels", 0, 0);
/* selection */
/* click-select */
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c
index 62341a5d6ae..9d39911548b 100644
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@ -78,10 +78,7 @@ void ED_anim_object_flush_update(const bContext *C, Object *ob)
* 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.
*
@@ -90,12 +87,14 @@ void ED_anim_object_flush_update(const bContext *C, Object *ob)
*/
void ANIM_action_to_pose_sync (Object *ob)
{
- bAction *act= (bAction *)ob->action;
- bActionChannel *achan;
+#if 0
+ AnimData *adt= ob->adt;
+ bAction *act= adt->act;
+ FCurve *fcu;
bPoseChannel *pchan;
/* error checking */
- if ((ob == NULL) || (ob->type != OB_ARMATURE) || ELEM(NULL, act, ob->pose))
+ if (ELEM3(NULL, ob, ob->adt, ob->pose) || (ob->type != OB_ARMATURE))
return;
/* 1b) loop through all Action-Channels (there should be fewer channels to search through here in general) */
@@ -120,6 +119,7 @@ void ANIM_action_to_pose_sync (Object *ob)
}
// TODO: add grouping changes too? For now, these tools aren't exposed to users in animation editors yet...
+#endif
}
/* Notifier from 3D-View/Outliner (this is likely to include other sources too...)
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 6388106fdb5..2dc4aa09407 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -48,6 +48,7 @@
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_fcurve.h"
+#include "BKE_main.h"
#include "BKE_nla.h"
#include "BKE_object.h"
#include "BKE_screen.h"
@@ -55,6 +56,7 @@
#include "ED_anim_api.h"
#include "ED_keyframes_edit.h"
+#include "ED_types.h"
#include "ED_util.h"
#include "WM_api.h"
@@ -316,3 +318,60 @@ void ANIM_nla_mapping_apply_fcurve (AnimData *adt, FCurve *fcu, short restore, s
}
/* *************************************************** */
+/* ANIMATION EDITOR UI-WIDGETS */
+
+/* ui button event */
+#define B_REDR 1
+
+/* standard header buttons for Animation Editors */
+short ANIM_headerUI_standard_buttons (const bContext *C, bDopeSheet *ads, uiBlock *block, short xco, short yco)
+{
+ Main *mainptr= CTX_data_main(C);
+ ScrArea *sa= CTX_wm_area(C);
+ short nlaActive= ((sa) && (sa->spacetype==SPACE_NLA));
+
+ /* check if the DopeSheet data exists, just in case... */
+ if (ads) {
+ /* more 'generic' filtering options */
+ if (nlaActive) uiBlockBeginAlign(block);
+ uiDefIconButBitI(block, TOG, ADS_FILTER_ONLYSEL, B_REDR, ICON_RESTRICT_SELECT_OFF, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Only display selected Objects");
+ if (nlaActive) uiDefIconButBitI(block, TOGN, ADS_FILTER_NLA_NOACT, B_REDR, ICON_ACTION, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Include AnimData blocks with no NLA Data");
+ if (nlaActive) uiBlockEndAlign(block);
+ xco += 5;
+
+ /* datatype based - only available datatypes are shown */
+ uiBlockBeginAlign(block);
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSCE, B_REDR, ICON_SCENE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(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, &(ads->filterflag), 0, 0, 0, 0, "Display World Animation");
+ if (mainptr && mainptr->key.first)
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSHAPEKEYS, B_REDR, ICON_SHAPEKEY_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display ShapeKeys");
+ if (mainptr && mainptr->mat.first)
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMAT, B_REDR, ICON_MATERIAL_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Material Data");
+ if (mainptr && mainptr->lamp.first)
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Lamp Data");
+ if (mainptr && mainptr->camera.first)
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Camera Data");
+ if (mainptr && mainptr->curve.first)
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Curve Data");
+ if (mainptr && mainptr->mball.first)
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display MetaBall Data");
+ if (mainptr && mainptr->armature.first)
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOARM, B_REDR, ICON_ARMATURE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Armature Data");
+ if (mainptr && mainptr->particle.first)
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Particle Data");
+ uiBlockEndAlign(block);
+ xco += 30;
+ }
+ else {
+ // XXX this case shouldn't happen at all... for now, just pad out same amount of space
+ printf("ERROR: dopesheet data not available when drawing Animation Editor header \n");
+ xco += 11*XIC + 30;
+ }
+
+ // TODO: include auto-snapping menu here too...
+
+ /* return the width of the buttons */
+ return xco;
+}
+
+/* *************************************************** */
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 55fb1ccace0..ea097420d1a 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -52,6 +52,7 @@
#include "DNA_ID.h"
#include "DNA_anim_types.h"
#include "DNA_action_types.h"
+#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
#include "DNA_camera_types.h"
#include "DNA_curve_types.h"
@@ -76,6 +77,7 @@
#include "BLI_blenlib.h"
#include "BKE_animsys.h"
+#include "BKE_action.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_key.h"
@@ -412,7 +414,9 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
}\
}
-
+/* quick macro to test if an anim-channel representing an AnimData block is suitably active */
+#define ANIMCHANNEL_ACTIVEOK(ale) \
+ ( !(filter_mode & ANIMFILTER_ACTIVE) || !(ale->adt) || (ale->adt->flag & ADT_UI_ACTIVE) )
/* quick macro to test if an anim-channel (F-Curve, Group, etc.) is selected in an acceptable way */
#define ANIMCHANNEL_SELOK(test_func) \
@@ -454,6 +458,16 @@ bAnimListElem *make_new_animlistelem (void *data, short datatype, void *owner, s
/* do specifics */
switch (datatype) {
+ case ANIMTYPE_SUMMARY:
+ {
+ /* nothing to include for now... this is just a dummy wrappy around all the other channels
+ * in the DopeSheet, and gets included at the start of the list
+ */
+ ale->key_data= NULL;
+ ale->datatype= ALE_ALL;
+ }
+ break;
+
case ANIMTYPE_SCENE:
{
Scene *sce= (Scene *)data;
@@ -673,7 +687,7 @@ bAnimListElem *make_new_animlistelem (void *data, short datatype, void *owner, s
/* ----------------------------------------- */
-static int animdata_filter_fcurves (ListBase *anim_data, FCurve *first, bActionGroup *grp, void *owner, short ownertype, int filter_mode, ID *owner_id)
+static int animdata_filter_fcurves (ListBase *anim_data, bDopeSheet *ads, FCurve *first, bActionGroup *grp, void *owner, short ownertype, int filter_mode, ID *owner_id)
{
bAnimListElem *ale = NULL;
FCurve *fcu;
@@ -683,6 +697,35 @@ static int animdata_filter_fcurves (ListBase *anim_data, FCurve *first, bActionG
* NOTE: we need to check if the F-Curves belong to the same group, as this gets called for groups too...
*/
for (fcu= first; ((fcu) && (fcu->grp==grp)); fcu= fcu->next) {
+ /* special exception for Pose-Channel Based F-Curves:
+ * - the 'Only Selected' data filter should be applied to Pose-Channel data too, but those are
+ * represented as F-Curves. The way the filter for objects worked was to be the first check
+ * after 'normal' visibility, so this is done first here too...
+ * - we currently use an 'approximate' method for getting these F-Curves that doesn't require
+ * carefully checking the entire path
+ * - this will also affect things like Drivers, and also works for Bone Constraints
+ */
+ if ( ((ads) && (ads->filterflag & ADS_FILTER_ONLYSEL)) &&
+ ((owner_id) && (GS(owner_id->name) == ID_OB)) )
+ {
+ Object *ob= (Object *)owner_id;
+
+ /* only consider if F-Curve involves pose_channels */
+ if ((fcu->rna_path) && strstr(fcu->rna_path, "pose_channels")) {
+ bPoseChannel *pchan;
+ char *bone_name;
+
+ /* get bone-name, and check if this bone is selected */
+ bone_name= BLI_getQuotedStr(fcu->rna_path, "pose_channels[");
+ pchan= get_pose_channel(ob->pose, bone_name);
+ if (bone_name) MEM_freeN(bone_name);
+
+ /* can only add this F-Curve if it is selected */
+ if ((pchan) && (pchan->bone) && (pchan->bone->flag & BONE_SELECTED)==0)
+ continue;
+ }
+ }
+
/* only include if visible (Graph Editor check, not channels check) */
if (!(filter_mode & ANIMFILTER_CURVEVISIBLE) || (fcu->flag & FCURVE_VISIBLE)) {
/* only work with this channel and its subchannels if it is editable */
@@ -707,7 +750,7 @@ static int animdata_filter_fcurves (ListBase *anim_data, FCurve *first, bActionG
return items;
}
-static int animdata_filter_action (ListBase *anim_data, bAction *act, int filter_mode, void *owner, short ownertype, ID *owner_id)
+static int animdata_filter_action (ListBase *anim_data, bDopeSheet *ads, bAction *act, int filter_mode, void *owner, short ownertype, ID *owner_id)
{
bAnimListElem *ale=NULL;
bActionGroup *agrp;
@@ -715,7 +758,7 @@ static int animdata_filter_action (ListBase *anim_data, bAction *act, int filter
int items = 0;
/* loop over groups */
- // XXX in future, we need to be prepared for nestled groups...
+ // TODO: in future, should we expect to need nested groups?
for (agrp= act->groups.first; agrp; agrp= agrp->next) {
/* add this group as a channel first */
if ((filter_mode & ANIMFILTER_CHANNELS) || !(filter_mode & ANIMFILTER_CURVESONLY)) {
@@ -754,29 +797,19 @@ static int animdata_filter_action (ListBase *anim_data, bAction *act, int filter
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--;
- }
+ items += animdata_filter_fcurves(anim_data, ads, agrp->channels.first, agrp, owner, ownertype, filter_mode, owner_id);
}
}
}
}
+
+ // TODO: but we still need to deal with the case when the group may be closed, but it has no visible curves too
}
/* loop over un-grouped F-Curves (only if we're not only considering those channels in the animive group) */
if (!(filter_mode & ANIMFILTER_ACTGROUPED)) {
// XXX the 'owner' info here needs review...
- items += animdata_filter_fcurves(anim_data, (lastchan)?(lastchan->next):(act->curves.first), NULL, owner, ownertype, filter_mode, owner_id);
+ items += animdata_filter_fcurves(anim_data, ads, (lastchan)?(lastchan->next):(act->curves.first), NULL, owner, ownertype, filter_mode, owner_id);
}
/* return the number of items added to the list */
@@ -791,7 +824,7 @@ static int animdata_filter_action (ListBase *anim_data, bAction *act, int filter
* - 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)
+static int animdata_filter_nla (ListBase *anim_data, bDopeSheet *ads, AnimData *adt, int filter_mode, void *owner, short ownertype, ID *owner_id)
{
bAnimListElem *ale;
NlaTrack *nlt;
@@ -979,10 +1012,13 @@ static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads,
/* include material-expand widget? */
// hmm... do we need to store the index of this material in the array anywhere?
if (filter_mode & ANIMFILTER_CHANNELS) {
- ale= make_new_animlistelem(ma, ANIMTYPE_DSMAT, base, ANIMTYPE_OBJECT, (ID *)ma);
- if (ale) {
- BLI_addtail(anim_data, ale);
- items++;
+ /* check if filtering by active status */
+ if ANIMCHANNEL_ACTIVEOK(ma) {
+ ale= make_new_animlistelem(ma, ANIMTYPE_DSMAT, base, ANIMTYPE_OBJECT, (ID *)ma);
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ items++;
+ }
}
}
@@ -990,9 +1026,9 @@ static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads,
if (FILTER_MAT_OBJD(ma) || (filter_mode & ANIMFILTER_CURVESONLY)) {
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);)
+ items += animdata_filter_nla(anim_data, ads, ma->adt, filter_mode, ma, ANIMTYPE_DSMAT, (ID *)ma);,
+ items += animdata_filter_fcurves(anim_data, ads, ma->adt->drivers.first, NULL, ma, ANIMTYPE_DSMAT, filter_mode, (ID *)ma);,
+ items += animdata_filter_action(anim_data, ads, ma->adt->action, filter_mode, ma, ANIMTYPE_DSMAT, (ID *)ma);)
}
}
}
@@ -1036,20 +1072,23 @@ static int animdata_filter_dopesheet_particles (ListBase *anim_data, bDopeSheet
/* add particle settings? */
if (FILTER_PART_OBJC(ob) || (filter_mode & ANIMFILTER_CURVESONLY)) {
- if ((filter_mode & ANIMFILTER_CHANNELS)){
- ale = make_new_animlistelem(psys->part, ANIMTYPE_DSPART, base, ANIMTYPE_OBJECT, (ID *)psys->part);
- if (ale) {
- BLI_addtail(anim_data, ale);
- items++;
+ if ((filter_mode & ANIMFILTER_CHANNELS)) {
+ /* check if filtering by active status */
+ if ANIMCHANNEL_ACTIVEOK(psys->part) {
+ ale = make_new_animlistelem(psys->part, ANIMTYPE_DSPART, base, ANIMTYPE_OBJECT, (ID *)psys->part);
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ items++;
+ }
}
}
if (FILTER_PART_OBJD(psys->part) || (filter_mode & ANIMFILTER_CURVESONLY)) {
ANIMDATA_FILTER_CASES(psys->part,
{ /* AnimData blocks - do nothing... */ },
- items += animdata_filter_nla(anim_data, psys->part->adt, filter_mode, psys->part, ANIMTYPE_DSPART, (ID *)psys->part);,
- items += animdata_filter_fcurves(anim_data, psys->part->adt->drivers.first, NULL, psys->part, ANIMTYPE_DSPART, filter_mode, (ID *)psys->part);,
- items += animdata_filter_action(anim_data, psys->part->adt->action, filter_mode, psys->part, ANIMTYPE_DSPART, (ID *)psys->part);)
+ items += animdata_filter_nla(anim_data, ads, psys->part->adt, filter_mode, psys->part, ANIMTYPE_DSPART, (ID *)psys->part);,
+ items += animdata_filter_fcurves(anim_data, ads, psys->part->adt->drivers.first, NULL, psys->part, ANIMTYPE_DSPART, filter_mode, (ID *)psys->part);,
+ items += animdata_filter_action(anim_data, ads, psys->part->adt->action, filter_mode, psys->part, ANIMTYPE_DSPART, (ID *)psys->part);)
}
}
}
@@ -1101,6 +1140,14 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad
expanded= FILTER_MBALL_OBJD(mb);
}
break;
+ case OB_ARMATURE: /* ------- Armature ---------- */
+ {
+ bArmature *arm= (bArmature *)ob->data;
+
+ type= ANIMTYPE_DSARM;
+ expanded= FILTER_ARM_OBJD(arm);
+ }
+ break;
}
/* special exception for drivers instead of action */
@@ -1108,9 +1155,12 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad
expanded= EXPANDED_DRVD(adt);
/* include data-expand widget? */
- if ((filter_mode & ANIMFILTER_CURVESONLY) == 0) {
- ale= make_new_animlistelem(iat, type, base, ANIMTYPE_OBJECT, (ID *)iat);
- if (ale) BLI_addtail(anim_data, ale);
+ if ((filter_mode & ANIMFILTER_CURVESONLY) == 0) {
+ /* check if filtering by active status */
+ if ANIMCHANNEL_ACTIVEOK(iat) {
+ ale= make_new_animlistelem(iat, type, base, ANIMTYPE_OBJECT, (ID *)iat);
+ if (ale) BLI_addtail(anim_data, ale);
+ }
}
/* add object-data animation channels? */
@@ -1118,9 +1168,9 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad
/* 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);)
+ items+= animdata_filter_nla(anim_data, ads, iat->adt, filter_mode, iat, type, (ID *)iat);,
+ items+= animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, iat, type, filter_mode, (ID *)iat);,
+ items += animdata_filter_action(anim_data, ads, iat->adt->action, filter_mode, iat, type, (ID *)iat);)
}
/* return the number of items added to the list */
@@ -1140,10 +1190,13 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
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);
- if (ale) {
- BLI_addtail(anim_data, ale);
- items++;
+ /* check if filtering by active status */
+ if ANIMCHANNEL_ACTIVEOK(ob) {
+ ale= make_new_animlistelem(base, ANIMTYPE_OBJECT, NULL, ANIMTYPE_NONE, (ID *)ob);
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ items++;
+ }
}
}
}
@@ -1159,7 +1212,7 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
{ /* AnimData blocks - do nothing... */ },
{ /* nla */
/* add NLA tracks */
- items += animdata_filter_nla(anim_data, adt, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
+ items += animdata_filter_nla(anim_data, ads, adt, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
},
{ /* drivers */
/* include drivers-expand widget? */
@@ -1174,7 +1227,7 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
/* 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);
+ items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, ob, ANIMTYPE_OBJECT, filter_mode, (ID *)ob);
}
},
{ /* action (keyframes) */
@@ -1190,7 +1243,7 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
/* 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);
+ items += animdata_filter_action(anim_data, ads, adt->action, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
}
}
);
@@ -1203,8 +1256,21 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
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);
+ /* include shapekey-expand widget? */
+ if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
+ /* check if filtering by active status */
+ if ANIMCHANNEL_ACTIVEOK(key) {
+ ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, base, ANIMTYPE_OBJECT, (ID *)ob);
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ items++;
+ }
+ }
+ }
+
+ /* add NLA tracks - only if expanded or so */
+ if (FILTER_SKE_OBJD(key) || (filter_mode & ANIMFILTER_CURVESONLY))
+ items += animdata_filter_nla(anim_data, ads, adt, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
},
{ /* drivers */
/* include shapekey-expand widget? */
@@ -1218,22 +1284,25 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
/* add channels */
if (FILTER_SKE_OBJD(key) || (filter_mode & ANIMFILTER_CURVESONLY)) {
- items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, key, ANIMTYPE_DSSKEY, filter_mode, (ID *)key);
+ items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, key, ANIMTYPE_DSSKEY, filter_mode, (ID *)key);
}
},
{ /* 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);
- if (ale) {
- BLI_addtail(anim_data, ale);
- items++;
+ /* check if filtering by active status */
+ if ANIMCHANNEL_ACTIVEOK(key) {
+ 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_action(anim_data, adt->action, filter_mode, key, ANIMTYPE_DSSKEY, (ID *)key);
+ items += animdata_filter_action(anim_data, ads, adt->action, filter_mode, key, ANIMTYPE_DSSKEY, (ID *)key);
}
}
);
@@ -1297,6 +1366,19 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
}
}
break;
+ case OB_ARMATURE: /* ------- Armature ---------- */
+ {
+ bArmature *arm= (bArmature *)ob->data;
+
+ if ((ads->filterflag & ADS_FILTER_NOARM) == 0) {
+ ANIMDATA_FILTER_CASES(arm,
+ { /* 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);
@@ -1332,14 +1414,14 @@ static int animdata_filter_dopesheet_scene (ListBase *anim_data, bDopeSheet *ads
if ( (EXPANDED_SCEC(sce) == 0) && !(filter_mode & (ANIMFILTER_CURVESONLY|ANIMFILTER_NLATRACKS)) )
return items;
- /* Action, Drivers, or NLA for Scene */
+ /* 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);
+ items += animdata_filter_nla(anim_data, ads, adt, filter_mode, sce, ANIMTYPE_SCENE, (ID *)sce);
},
{ /* drivers */
/* include drivers-expand widget? */
@@ -1353,7 +1435,7 @@ static int animdata_filter_dopesheet_scene (ListBase *anim_data, bDopeSheet *ads
/* 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);
+ items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, sce, ANIMTYPE_SCENE, filter_mode, (ID *)sce);
}
},
{ /* action */
@@ -1368,7 +1450,7 @@ static int animdata_filter_dopesheet_scene (ListBase *anim_data, bDopeSheet *ads
/* 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);
+ items += animdata_filter_action(anim_data, ads, adt->action, filter_mode, sce, ANIMTYPE_SCENE, (ID *)sce);
}
}
)
@@ -1382,7 +1464,7 @@ static int animdata_filter_dopesheet_scene (ListBase *anim_data, bDopeSheet *ads
{ /* AnimData blocks - do nothing... */ },
{ /* nla */
/* add NLA tracks */
- items += animdata_filter_nla(anim_data, adt, filter_mode, wo, ANIMTYPE_DSWOR, (ID *)wo);
+ items += animdata_filter_nla(anim_data, ads, adt, filter_mode, wo, ANIMTYPE_DSWOR, (ID *)wo);
},
{ /* drivers */
/* include world-expand widget? */
@@ -1397,7 +1479,7 @@ static int animdata_filter_dopesheet_scene (ListBase *anim_data, bDopeSheet *ads
/* add F-Curve channels (drivers are F-Curves) */
if (FILTER_WOR_SCED(wo)/*EXPANDED_DRVD(adt)*/ || !(filter_mode & ANIMFILTER_CHANNELS)) {
// XXX owner info is messed up now...
- items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, wo, ANIMTYPE_DSWOR, filter_mode, (ID *)wo);
+ items += animdata_filter_fcurves(anim_data, ads, adt->drivers.first, NULL, wo, ANIMTYPE_DSWOR, filter_mode, (ID *)wo);
}
},
{ /* action */
@@ -1412,18 +1494,20 @@ static int animdata_filter_dopesheet_scene (ListBase *anim_data, bDopeSheet *ads
/* 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);
+ items += animdata_filter_action(anim_data, ads, adt->action, filter_mode, wo, ANIMTYPE_DSWOR, (ID *)wo);
}
}
)
}
+ // TODO: scene compositing nodes (these aren't standard node-trees)
+
/* return the number of items added to the list */
return items;
}
// TODO: implement pinning... (if and when pinning is done, what we need to do is to provide freeing mechanisms - to protect against data that was deleted)
-static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int filter_mode)
+static int animdata_filter_dopesheet (ListBase *anim_data, bAnimContext *ac, bDopeSheet *ads, int filter_mode)
{
Scene *sce= (Scene *)ads->source;
Base *base;
@@ -1652,6 +1736,23 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
dataOk= !(ads->filterflag & ADS_FILTER_NOMBA);)
}
break;
+ case OB_ARMATURE: /* ------- Armature ---------- */
+ {
+ bArmature *arm= (bArmature *)ob->data;
+ dataOk= 0;
+ ANIMDATA_FILTER_CASES(arm,
+ if ((ads->filterflag & ADS_FILTER_NOARM)==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(arm);
+ dataOk=0;
+ },
+ dataOk= !(ads->filterflag & ADS_FILTER_NOARM);,
+ dataOk= !(ads->filterflag & ADS_FILTER_NOARM);,
+ dataOk= !(ads->filterflag & ADS_FILTER_NOARM);)
+ }
+ break;
default: /* --- other --- */
dataOk= 0;
break;
@@ -1734,6 +1835,12 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
dataOk= ANIMDATA_HAS_KEYS(mb);
}
break;
+ case OB_ARMATURE: /* -------- Armature ---------- */
+ {
+ bArmature *arm= (bArmature *)ob->data;
+ dataOk= ANIMDATA_HAS_KEYS(arm);
+ }
+ break;
default: /* --- other --- */
dataOk= 0;
break;
@@ -1765,6 +1872,50 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
return items;
}
+/* Summary track for DopeSheet/Action Editor
+ * - return code is whether the summary lets the other channels get drawn
+ */
+static short animdata_filter_dopesheet_summary (bAnimContext *ac, ListBase *anim_data, int filter_mode, int *items)
+{
+ bDopeSheet *ads = NULL;
+
+ /* get the DopeSheet information to use
+ * - we should only need to deal with the DopeSheet/Action Editor,
+ * since all the other Animation Editors won't have this concept
+ * being applicable.
+ */
+ if ((ac && ac->sa) && (ac->sa->spacetype == SPACE_ACTION)) {
+ SpaceAction *saction= (SpaceAction *)ac->sa->spacedata.first;
+ ads= &saction->ads;
+ }
+ else {
+ /* invalid space type - skip this summary channels */
+ return 1;
+ }
+
+ /* dopesheet summary
+ * - only for drawing and/or selecting keyframes in channels, but not for real editing
+ * - only useful for DopeSheet Editor, where the summary is useful
+ */
+ // TODO: we should really check if some other prohibited filters are also active, but that can be for later
+ if ((filter_mode & ANIMFILTER_CHANNELS) && (ads->filterflag & ADS_FILTER_SUMMARY)) {
+ bAnimListElem *ale= make_new_animlistelem(ac, ANIMTYPE_SUMMARY, NULL, ANIMTYPE_NONE, NULL);
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ (*items)++;
+ }
+
+ /* if summary is collapsed, don't show other channels beneath this
+ * - this check is put inside the summary check so that it doesn't interfere with normal operation
+ */
+ if (ads->flag & ADS_FLAG_SUMMARY_COLLAPSED)
+ return 0;
+ }
+
+ /* the other channels beneath this can be shown */
+ return 1;
+}
+
/* ----------- Public API --------------- */
/* This function filters the active data source to leave only animation channels suitable for
@@ -1785,23 +1936,41 @@ int ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_mode
/* firstly filter the data */
switch (datatype) {
- case ANIMCONT_ACTION:
- items= animdata_filter_action(anim_data, data, filter_mode, NULL, ANIMTYPE_NONE, (ID *)obact);
+ case ANIMCONT_ACTION: /* 'Action Editor' */
+ {
+ /* the check for the DopeSheet summary is included here since the summary works here too */
+ if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items))
+ items += animdata_filter_action(anim_data, NULL, data, filter_mode, NULL, ANIMTYPE_NONE, (ID *)obact);
+ }
break;
case ANIMCONT_SHAPEKEY:
+ {
//items= animdata_filter_shapekey(anim_data, data, filter_mode, NULL, ANIMTYPE_NONE, (ID *)obact);
+ }
break;
case ANIMCONT_GPENCIL:
+ {
//items= animdata_filter_gpencil(anim_data, data, filter_mode);
+ }
break;
- case ANIMCONT_DOPESHEET:
- case ANIMCONT_FCURVES:
- case ANIMCONT_DRIVERS:
- case ANIMCONT_NLA:
- items= animdata_filter_dopesheet(anim_data, data, filter_mode);
+ case ANIMCONT_DOPESHEET: /* 'DopeSheet Editor' */
+ {
+ /* the DopeSheet editor is the primary place where the DopeSheet summaries are useful */
+ if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items))
+ items += animdata_filter_dopesheet(anim_data, ac, data, filter_mode);
+ }
+ break;
+
+ case ANIMCONT_FCURVES: /* Graph Editor -> FCurves/Animation Editing */
+ case ANIMCONT_DRIVERS: /* Graph Editor -> Drivers Editing */
+ case ANIMCONT_NLA: /* NLA Editor */
+ {
+ /* all of these editors use the basic DopeSheet data for filtering options, but don't have all the same features */
+ items = animdata_filter_dopesheet(anim_data, ac, data, filter_mode);
+ }
break;
}
diff --git a/source/blender/editors/animation/anim_intern.h b/source/blender/editors/animation/anim_intern.h
index 462ef76ea8d..0101e3d0ef7 100644
--- a/source/blender/editors/animation/anim_intern.h
+++ b/source/blender/editors/animation/anim_intern.h
@@ -39,4 +39,46 @@ short keyingset_context_ok_poll(bContext *C, KeyingSet *ks);
/* Main KeyingSet operations API call */
short modifykey_get_context_data (bContext *C, ListBase *dsources, KeyingSet *ks);
+/* Operator Define Prototypes ------------------- */
+
+/* Main Keyframe Management operators:
+ * These handle keyframes management from various spaces. They only make use of
+ * Keying Sets.
+ */
+void ANIM_OT_insert_keyframe(struct wmOperatorType *ot);
+void ANIM_OT_delete_keyframe(struct wmOperatorType *ot);
+
+/* Main Keyframe Management operators:
+ * These handle keyframes management from various spaces. They will handle the menus
+ * required for each space.
+ */
+void ANIM_OT_insert_keyframe_menu(struct wmOperatorType *ot);
+void ANIM_OT_delete_keyframe_v3d(struct wmOperatorType *ot);
+
+/* Keyframe managment operators for UI buttons (RMB menu). */
+void ANIM_OT_insert_keyframe_button(struct wmOperatorType *ot);
+void ANIM_OT_delete_keyframe_button(struct wmOperatorType *ot);
+
+/* .......... */
+
+/* KeyingSet managment operators for UI buttons (RMB menu) */
+void ANIM_OT_add_keyingset_button(struct wmOperatorType *ot);
+void ANIM_OT_remove_keyingset_button(struct wmOperatorType *ot);
+
+/* KeyingSet management operators for RNA collections/UI buttons */
+void ANIM_OT_keying_set_add(struct wmOperatorType *ot);
+void ANIM_OT_keying_set_remove(struct wmOperatorType *ot);
+void ANIM_OT_keying_set_path_add(struct wmOperatorType *ot);
+void ANIM_OT_keying_set_path_remove(struct wmOperatorType *ot);
+
+/* .......... */
+
+/* Driver management operators for UI buttons (RMB menu) */
+void ANIM_OT_add_driver_button(struct wmOperatorType *ot);
+void ANIM_OT_remove_driver_button(struct wmOperatorType *ot);
+void ANIM_OT_copy_driver_button(struct wmOperatorType *ot);
+void ANIM_OT_paste_driver_button(struct wmOperatorType *ot);
+
+void ANIM_OT_copy_clipboard_button(struct wmOperatorType *ot);
+
#endif // ANIM_INTERN_H
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 26edf930f0b..088fddd2e7e 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -35,6 +35,7 @@
#include <math.h>
#include <stdio.h>
+#include <string.h>
#include "MEM_guardedalloc.h"
@@ -118,7 +119,7 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* try to resolve the path */
if (RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop)) {
char *structname=NULL, *propname=NULL, *arrayname=NULL, arrayindbuf[16];
- PropertyRNA *nameprop;
+ short free_structname = 0;
/* For now, name will consist of 3 parts: struct-name, property name, array index
* There are several options possible:
@@ -132,16 +133,34 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
* hierarchy though, which isn't so clear with option 2.
*/
- /* for structname, we use a custom name if one is available */
- // xxx we might want an icon from types?
- // xxx it is hard to differentiate between object and bone channels then, if ob + bone motion occur together...
- nameprop= RNA_struct_name_property(ptr.type);
- if (nameprop) {
- /* this gets a string which will need to be freed */
- structname= RNA_property_string_get_alloc(&ptr, nameprop, NULL, 0);
+ /* for structname
+ * - as base, we use a custom name from the structs if one is available
+ * - however, if we're showing subdata of bones (probably there will be other exceptions later)
+ * need to include that info too since it gets confusing otherwise
+ */
+ if (strstr(fcu->rna_path, "pose_channels") && strstr(fcu->rna_path, "constraints")) {
+ /* perform string 'chopping' to get "Bone Name : Constraint Name" */
+ char *pchanName= BLI_getQuotedStr(fcu->rna_path, "pose_channels[");
+ char *constName= BLI_getQuotedStr(fcu->rna_path, "constraints[");
+
+ /* assemble the string to display in the UI... */
+ structname= BLI_sprintfN("%s : %s", pchanName, constName);
+ free_structname= 1;
+
+ /* free the temp names */
+ if (pchanName) MEM_freeN(pchanName);
+ if (constName) MEM_freeN(constName);
+ }
+ else {
+ PropertyRNA *nameprop= RNA_struct_name_property(ptr.type);
+ if (nameprop) {
+ /* this gets a string which will need to be freed */
+ structname= RNA_property_string_get_alloc(&ptr, nameprop, NULL, 0);
+ free_structname= 1;
+ }
+ else
+ structname= (char *)RNA_struct_ui_name(ptr.type);
}
- else
- structname= (char *)RNA_struct_ui_name(ptr.type);
/* Property Name is straightforward */
propname= (char *)RNA_property_ui_name(prop);
@@ -151,9 +170,9 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
char c= RNA_property_array_item_char(prop, fcu->array_index);
/* we need to write the index to a temp buffer (in py syntax) */
- if(c) sprintf(arrayindbuf, "%c ", c);
+ if (c) sprintf(arrayindbuf, "%c ", c);
else sprintf(arrayindbuf, "[%d]", fcu->array_index);
-
+
arrayname= &arrayindbuf[0];
}
else {
@@ -166,7 +185,7 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
BLI_snprintf(name, 128, "%s%s (%s)", arrayname, propname, structname);
/* free temp name if nameprop is set */
- if (nameprop)
+ if (free_structname)
MEM_freeN(structname);
}
else {
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index d33eece52c9..f4ecb9d5def 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -458,7 +458,7 @@ static int ed_marker_move_invoke(bContext *C, wmOperator *op, wmEvent *evt)
mm->event_type= evt->type;
/* add temp handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
/* reset frs delta */
RNA_int_set(op->ptr, "frames", 0);
@@ -990,9 +990,9 @@ void ED_operatortypes_marker(void)
}
/* called in screen_ops.c:ED_keymap_screen() */
-void ED_marker_keymap(wmWindowManager *wm)
+void ED_marker_keymap(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Markers", 0, 0);
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "Markers", 0, 0);
WM_keymap_verify_item(keymap, "MARKER_OT_add", MKEY, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "MARKER_OT_move", EVT_TWEAK_S, KM_ANY, 0, 0);
@@ -1002,6 +1002,7 @@ void ED_marker_keymap(wmWindowManager *wm)
WM_keymap_verify_item(keymap, "MARKER_OT_select_border", BKEY, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "MARKER_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "MARKER_OT_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_verify_item(keymap, "MARKER_OT_delete", DELKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "MARKER_OT_move", GKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index fedbe12c0e6..35eac6d23f1 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -31,6 +31,7 @@
#include "MEM_guardedalloc.h"
+#include "DNA_anim_types.h"
#include "DNA_action_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
@@ -41,6 +42,7 @@
#include "BKE_context.h"
#include "BKE_utildefines.h"
+#include "BKE_sound.h"
#include "UI_interface.h"
#include "UI_view2d.h"
@@ -52,11 +54,11 @@
#include "WM_types.h"
#include "ED_anim_api.h"
-#include "ED_keyframing.h" // XXX remove?
+#include "ED_keyframing.h"
#include "ED_markers.h"
#include "ED_screen.h"
-#include "BKE_sound.h"
+#include "anim_intern.h"
/* ********************** frame change operator ***************************/
@@ -162,7 +164,7 @@ static int change_frame_invoke(bContext *C, wmOperator *op, wmEvent *event)
change_frame_apply(C, op);
/* add temp handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -193,7 +195,7 @@ static int change_frame_modal(bContext *C, wmOperator *op, wmEvent *event)
/* we check for either mouse-button to end, as checking for ACTIONMOUSE (which is used to init
* the modal op) doesn't work for some reason
*/
- if (event->val==0) {
+ if (event->val==KM_RELEASE) {
change_frame_exit(C, op);
return OPERATOR_FINISHED;
}
@@ -395,18 +397,28 @@ void ED_operatortypes_anim(void)
WM_operatortype_append(ANIM_OT_delete_keyframe_v3d);
WM_operatortype_append(ANIM_OT_insert_keyframe_button);
WM_operatortype_append(ANIM_OT_delete_keyframe_button);
-
+
WM_operatortype_append(ANIM_OT_add_driver_button);
WM_operatortype_append(ANIM_OT_remove_driver_button);
+ WM_operatortype_append(ANIM_OT_copy_driver_button);
+ WM_operatortype_append(ANIM_OT_paste_driver_button);
+
+ WM_operatortype_append(ANIM_OT_copy_clipboard_button);
+
WM_operatortype_append(ANIM_OT_add_keyingset_button);
WM_operatortype_append(ANIM_OT_remove_keyingset_button);
+
+ WM_operatortype_append(ANIM_OT_keying_set_add);
+ WM_operatortype_append(ANIM_OT_keying_set_remove);
+ WM_operatortype_append(ANIM_OT_keying_set_path_add);
+ WM_operatortype_append(ANIM_OT_keying_set_path_remove);
}
-void ED_keymap_anim(wmWindowManager *wm)
+void ED_keymap_anim(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Animation", 0, 0);
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "Animation", 0, 0);
/* frame management */
/* NOTE: 'ACTIONMOUSE' not 'LEFTMOUSE', as user may have swapped mouse-buttons */
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 8b9224511ba..bf3fd0f4cf1 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -80,6 +80,10 @@
/* Get (or add relevant data to be able to do so) F-Curve from the driver stack,
* for the given Animation Data block. This assumes that all the destinations are valid.
+ *
+ * - add: 0 - don't add anything if not found,
+ * 1 - add new Driver FCurve,
+ * -1 - add new Driver FCurve without driver stuff (for pasting)
*/
FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_index, short add)
{
@@ -115,11 +119,14 @@ FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_ind
fcu->rna_path= BLI_strdupn(rna_path, strlen(rna_path));
fcu->array_index= array_index;
- /* add some new driver data */
- fcu->driver= MEM_callocN(sizeof(ChannelDriver), "ChannelDriver");
-
- /* add simple generator modifier for driver so that there is some visible representation */
- add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_GENERATOR);
+ /* if add is negative, don't init this data yet, since it will be filled in by the pasted driver */
+ if (add > 0) {
+ /* add some new driver data */
+ fcu->driver= MEM_callocN(sizeof(ChannelDriver), "ChannelDriver");
+
+ /* add simple generator modifier for driver so that there is some visible representation */
+ add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_GENERATOR);
+ }
/* just add F-Curve to end of driver list */
BLI_addtail(&adt->drivers, fcu);
@@ -144,7 +151,7 @@ short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short fla
/* validate pointer first - exit if failure */
RNA_id_pointer_create(id, &id_ptr);
if ((RNA_path_resolve(&id_ptr, rna_path, &ptr, &prop) == 0) || (prop == NULL)) {
- printf("Insert Key: Could not add Driver, as RNA Path is invalid for the given ID (ID = %s, Path = %s)\n", id->name, rna_path);
+ printf("Add Driver: Could not add Driver, as RNA Path is invalid for the given ID (ID = %s, Path = %s)\n", id->name, rna_path);
return 0;
}
@@ -163,7 +170,7 @@ short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short fla
float fval;
if (proptype == PROP_BOOLEAN) {
- if(!array) val= RNA_property_boolean_get(&ptr, prop);
+ 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);
@@ -180,7 +187,6 @@ short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short fla
BLI_snprintf(expression, maxlen, "%.3f", fval);
}
-
}
}
@@ -218,6 +224,127 @@ short ANIM_remove_driver (struct ID *id, const char rna_path[], int array_index,
return 0;
}
+/* ************************************************** */
+/* Driver Management API - Copy/Paste Drivers */
+
+/* Copy/Paste Buffer for Driver Data... */
+static FCurve *channeldriver_copypaste_buf = NULL;
+
+/* This function frees any MEM_calloc'ed copy/paste buffer data */
+// XXX find some header to put this in!
+void free_anim_drivers_copybuf (void)
+{
+ /* free the buffer F-Curve if it exists, as if it were just another F-Curve */
+ if (channeldriver_copypaste_buf)
+ free_fcurve(channeldriver_copypaste_buf);
+ channeldriver_copypaste_buf= NULL;
+}
+
+/* Checks if there is a driver in the copy/paste buffer */
+short ANIM_driver_can_paste (void)
+{
+ return (channeldriver_copypaste_buf != NULL);
+}
+
+/* ------------------- */
+
+/* Main Driver Management API calls:
+ * Make a copy of the driver for the specified property on the given ID block
+ */
+short ANIM_copy_driver (ID *id, const char rna_path[], int array_index, short flag)
+{
+ PointerRNA id_ptr, ptr;
+ PropertyRNA *prop;
+ FCurve *fcu;
+
+ /* validate pointer first - exit if failure */
+ RNA_id_pointer_create(id, &id_ptr);
+ if ((RNA_path_resolve(&id_ptr, rna_path, &ptr, &prop) == 0) || (prop == NULL)) {
+ printf("Copy Driver: Could not find Driver, as RNA Path is invalid for the given ID (ID = %s, Path = %s)\n", id->name, rna_path);
+ return 0;
+ }
+
+ /* try to get F-Curve with Driver */
+ fcu= verify_driver_fcurve(id, rna_path, array_index, 0);
+
+ /* clear copy/paste buffer first (for consistency with other copy/paste buffers) */
+ free_anim_drivers_copybuf();
+
+ /* copy this to the copy/paste buf if it exists */
+ if (fcu && fcu->driver) {
+ /* make copies of some info such as the rna_path, then clear this info from the F-Curve temporarily
+ * so that we don't end up wasting memory storing the path which won't get used ever...
+ */
+ char *tmp_path = fcu->rna_path;
+ fcu->rna_path= NULL;
+
+ /* make a copy of the F-Curve with */
+ channeldriver_copypaste_buf= copy_fcurve(fcu);
+
+ /* restore the path */
+ fcu->rna_path= tmp_path;
+
+ /* copied... */
+ return 1;
+ }
+
+ /* done */
+ return 0;
+}
+
+/* Main Driver Management API calls:
+ * Add a new driver for the specified property on the given ID block or replace an existing one
+ * with the driver + driver-curve data from the buffer
+ */
+short ANIM_paste_driver (ID *id, const char rna_path[], int array_index, short flag)
+{
+ PointerRNA id_ptr, ptr;
+ PropertyRNA *prop;
+ FCurve *fcu;
+
+ /* validate pointer first - exit if failure */
+ RNA_id_pointer_create(id, &id_ptr);
+ if ((RNA_path_resolve(&id_ptr, rna_path, &ptr, &prop) == 0) || (prop == NULL)) {
+ printf("Paste Driver: Could not add Driver, as RNA Path is invalid for the given ID (ID = %s, Path = %s)\n", id->name, rna_path);
+ return 0;
+ }
+
+ /* if the buffer is empty, cannot paste... */
+ if (channeldriver_copypaste_buf == NULL) {
+ printf("Paste Driver: No Driver to paste. \n");
+ return 0;
+ }
+
+ /* create Driver F-Curve, but without data which will be copied across... */
+ fcu= verify_driver_fcurve(id, rna_path, array_index, -1);
+
+ if (fcu) {
+ /* copy across the curve data from the buffer curve
+ * NOTE: this step needs care to not miss new settings
+ */
+ /* keyframes/samples */
+ fcu->bezt= MEM_dupallocN(channeldriver_copypaste_buf->bezt);
+ fcu->fpt= MEM_dupallocN(channeldriver_copypaste_buf->fpt);
+ fcu->totvert= channeldriver_copypaste_buf->totvert;
+
+ /* modifiers */
+ copy_fmodifiers(&fcu->modifiers, &channeldriver_copypaste_buf->modifiers);
+
+ /* flags - on a per-relevant-flag basis */
+ if (channeldriver_copypaste_buf->flag & FCURVE_AUTO_HANDLES)
+ fcu->flag |= FCURVE_AUTO_HANDLES;
+ else
+ fcu->flag &= ~FCURVE_AUTO_HANDLES;
+ /* extrapolation mode */
+ fcu->extend= channeldriver_copypaste_buf->extend;
+
+ /* the 'juicy' stuff - the driver */
+ fcu->driver= fcurve_copy_driver(channeldriver_copypaste_buf->driver);
+ }
+
+ /* done */
+ return (fcu != NULL);
+}
/* ************************************************** */
/* UI-Button Interface */
@@ -272,10 +399,11 @@ void ANIM_OT_add_driver_button (wmOperatorType *ot)
/* identifiers */
ot->name= "Add Driver";
ot->idname= "ANIM_OT_add_driver_button";
+ ot->description= "Add driver(s) for the property(s) connected represented by the highlighted button.";
/* callbacks */
ot->exec= add_driver_button_exec;
- //op->poll= ???
+ //op->poll= ??? // TODO: need to have some animateable property to do this
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -335,10 +463,11 @@ void ANIM_OT_remove_driver_button (wmOperatorType *ot)
/* identifiers */
ot->name= "Remove Driver";
ot->idname= "ANIM_OT_remove_driver_button";
+ ot->description= "Remove the driver(s) for the property(s) connected represented by the highlighted button.";
/* callbacks */
ot->exec= remove_driver_button_exec;
- //op->poll= ???
+ //op->poll= ??? // TODO: need to have some driver to be able to do this...
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -347,4 +476,135 @@ void ANIM_OT_remove_driver_button (wmOperatorType *ot)
RNA_def_boolean(ot->srna, "all", 1, "All", "Delete drivers for all elements of the array.");
}
+/* Copy Driver Button Operator ------------------------ */
+
+static int copy_driver_button_exec (bContext *C, wmOperator *op)
+{
+ PointerRNA ptr;
+ PropertyRNA *prop= NULL;
+ char *path;
+ short success= 0;
+ int index;
+
+ /* try to create driver using property retrieved from UI */
+ memset(&ptr, 0, sizeof(PointerRNA));
+ uiAnimContextProperty(C, &ptr, &prop, &index);
+
+ if (ptr.data && prop && RNA_property_animateable(ptr.data, prop)) {
+ path= RNA_path_from_ID_to_property(&ptr, prop);
+
+ if (path) {
+ /* only copy the driver for the button that this was involved for */
+ success= ANIM_copy_driver(ptr.id.data, path, index, 0);
+
+ MEM_freeN(path);
+ }
+ }
+
+ /* since we're just copying, we don't really need to do anything else...*/
+ return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+}
+
+void ANIM_OT_copy_driver_button (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Copy Driver";
+ ot->idname= "ANIM_OT_copy_driver_button";
+ ot->description= "Copy the driver for the highlighted button.";
+
+ /* callbacks */
+ ot->exec= copy_driver_button_exec;
+ //op->poll= ??? // TODO: need to have some driver to be able to do this...
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* Paste Driver Button Operator ------------------------ */
+
+static int paste_driver_button_exec (bContext *C, wmOperator *op)
+{
+ PointerRNA ptr;
+ PropertyRNA *prop= NULL;
+ char *path;
+ short success= 0;
+ int index;
+
+ /* try to create driver using property retrieved from UI */
+ memset(&ptr, 0, sizeof(PointerRNA));
+ uiAnimContextProperty(C, &ptr, &prop, &index);
+
+ if (ptr.data && prop && RNA_property_animateable(ptr.data, prop)) {
+ path= RNA_path_from_ID_to_property(&ptr, prop);
+
+ if (path) {
+ /* only copy the driver for the button that this was involved for */
+ success= ANIM_paste_driver(ptr.id.data, path, index, 0);
+
+ MEM_freeN(path);
+ }
+ }
+
+ /* since we're just copying, we don't really need to do anything else...*/
+ return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+}
+
+void ANIM_OT_paste_driver_button (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Paste Driver";
+ ot->idname= "ANIM_OT_paste_driver_button";
+ ot->description= "Paste the driver in the copy/paste buffer for the highlighted button.";
+
+ /* callbacks */
+ ot->exec= paste_driver_button_exec;
+ //op->poll= ??? // TODO: need to have some driver to be able to do this...
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+
+/* Copy to Clipboard Button Operator ------------------------ */
+
+static int copy_clipboard_button_exec(bContext *C, wmOperator *op)
+{
+ PointerRNA ptr;
+ PropertyRNA *prop= NULL;
+ char *path;
+ short success= 0;
+ int index;
+
+ /* try to create driver using property retrieved from UI */
+ memset(&ptr, 0, sizeof(PointerRNA));
+ uiAnimContextProperty(C, &ptr, &prop, &index);
+
+ if (ptr.data && prop) {
+ path= RNA_path_from_ID_to_property(&ptr, prop);
+
+ if (path) {
+ WM_clipboard_text_set(path, FALSE);
+ MEM_freeN(path);
+ }
+ }
+
+ /* since we're just copying, we don't really need to do anything else...*/
+ return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+}
+
+void ANIM_OT_copy_clipboard_button(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Copy Data Path";
+ ot->idname= "ANIM_OT_copy_clipboard_button";
+ ot->description= "Copy the RNA data path for this property to the clipboard.";
+
+ /* callbacks */
+ ot->exec= copy_clipboard_button_exec;
+ //op->poll= ??? // TODO: need to have some valid property before this can be done
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER;
+}
+
/* ************************************************** */
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index 4aff26105f3..65c73355ad7 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -258,7 +258,7 @@ static void draw_modifier__fn_generator(uiLayout *layout, ID *id, FModifier *fcm
/* add the settings */
col= uiLayoutColumn(layout, 1);
- uiItemR(col, "", 0, &ptr, "type", 0);
+ uiItemR(col, "", 0, &ptr, "function_type", 0);
uiItemR(col, NULL, 0, &ptr, "additive", UI_ITEM_R_TOGGLE);
col= uiLayoutColumn(layout, 0); // no grouping for now
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index abea38e129e..019ece64132 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -54,10 +54,11 @@
#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_meta_types.h"
+#include "DNA_particle_types.h"
#include "DNA_userdef_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_windowmanager_types.h"
@@ -316,7 +317,7 @@ static void set_touched_actkeyblock (ActKeyBlock *ab)
/* *************************** Keyframe Drawing *************************** */
/* helper function - find actkeycolumn that occurs on cframe */
-static ActKeyColumn *cfra_find_actkeycolumn (ActKeyColumn *ak, float cframe)
+ActKeyColumn *cfra_find_actkeycolumn (ActKeyColumn *ak, float cframe)
{
/* sanity checks */
if (ak == NULL)
@@ -331,6 +332,29 @@ static ActKeyColumn *cfra_find_actkeycolumn (ActKeyColumn *ak, float cframe)
return ak; /* match */
}
+/* helper function - find actkeycolumn that occurs on cframe, or the nearest one if not found */
+// FIXME: this is buggy... next() is ignored completely...
+ActKeyColumn *cfra_find_nearest_next_ak (ActKeyColumn *ak, float cframe, short next)
+{
+ ActKeyColumn *akn= NULL;
+
+ /* sanity checks */
+ if (ak == NULL)
+ return NULL;
+
+ /* check if this is a match, or whether it is in some subtree */
+ if (cframe < ak->cfra)
+ akn= cfra_find_nearest_next_ak(ak->left, cframe, next);
+ else if (cframe > ak->cfra)
+ akn= cfra_find_nearest_next_ak(ak->right, cframe, next);
+
+ /* if no match found (or found match), just use the current one */
+ if (akn == NULL)
+ return ak;
+ else
+ return akn;
+}
+
/* -------- */
/* coordinates for diamond shape */
@@ -396,6 +420,13 @@ void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel
}
break;
+ case BEZT_KEYTYPE_EXTREME: /* redish frames for now */
+ {
+ if (sel) glColor3f(95.0f, 0.5f, 0.5f);
+ else glColor3f(0.91f, 0.70f, 0.80f);
+ }
+ break;
+
case BEZT_KEYTYPE_KEYFRAME: /* traditional yellowish frames for now */
default:
{
@@ -484,6 +515,24 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa
/* *************************** Channel Drawing Funcs *************************** */
+void draw_summary_channel(View2D *v2d, bAnimContext *ac, float ypos)
+{
+ DLRBT_Tree keys, blocks;
+
+ BLI_dlrbTree_init(&keys);
+ BLI_dlrbTree_init(&blocks);
+
+ summary_to_keylist(ac, &keys, &blocks);
+
+ BLI_dlrbTree_linkedlist_sync(&keys);
+ BLI_dlrbTree_linkedlist_sync(&blocks);
+
+ draw_keylist(v2d, &keys, &blocks, ypos);
+
+ BLI_dlrbTree_free(&keys);
+ BLI_dlrbTree_free(&blocks);
+}
+
void draw_scene_channel(View2D *v2d, bDopeSheet *ads, Scene *sce, float ypos)
{
DLRBT_Tree keys, blocks;
@@ -591,6 +640,25 @@ void draw_gpl_channel(View2D *v2d, bDopeSheet *ads, bGPDlayer *gpl, float ypos)
/* *************************** Keyframe List Conversions *************************** */
+void summary_to_keylist(bAnimContext *ac, DLRBT_Tree *keys, DLRBT_Tree *blocks)
+{
+ if (ac) {
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ /* get F-Curves to take keyframes from */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY);
+ ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
+ /* loop through each F-Curve, grabbing the keyframes */
+ for (ale= anim_data.first; ale; ale= ale->next)
+ fcurve_to_keylist(ale->adt, ale->data, keys, blocks);
+
+ BLI_freelistN(&anim_data);
+ }
+}
+
void scene_to_keylist(bDopeSheet *ads, Scene *sce, DLRBT_Tree *keys, DLRBT_Tree *blocks)
{
if (sce) {
@@ -626,25 +694,90 @@ void scene_to_keylist(bDopeSheet *ads, Scene *sce, DLRBT_Tree *keys, DLRBT_Tree
void ob_to_keylist(bDopeSheet *ads, Object *ob, DLRBT_Tree *keys, DLRBT_Tree *blocks)
{
Key *key= ob_get_key(ob);
-
- if (ob) {
- int filterflag;
-
- /* get filterflag */
- if (ads)
- filterflag= ads->filterflag;
- else
- filterflag= 0;
+ int filterflag= (ads)? ads->filterflag : 0;
+
+ /* sanity check */
+ if (ob == NULL)
+ return;
- /* Add action keyframes */
- if (ob->adt && ob->adt->action)
- action_to_keylist(ob->adt, ob->adt->action, keys, blocks);
+ /* Add action keyframes */
+ if (ob->adt && ob->adt->action)
+ action_to_keylist(ob->adt, ob->adt->action, keys, blocks);
+
+ /* Add shapekey keyframes (only if dopesheet allows, if it is available) */
+ if ((key && key->adt && key->adt->action) && !(filterflag & ADS_FILTER_NOSHAPEKEYS))
+ action_to_keylist(key->adt, key->adt->action, keys, blocks);
+
+ /* Add material keyframes */
+ if ((ob->totcol) && !(filterflag & ADS_FILTER_NOMAT)) {
+ int a;
- /* Add shapekey keyframes (only if dopesheet allows, if it is available) */
- if ((key && key->adt && key->adt->action) && !(filterflag & ADS_FILTER_NOSHAPEKEYS))
- action_to_keylist(key->adt, key->adt->action, keys, blocks);
+ for (a=0; a < ob->totcol; a++) {
+ Material *ma= give_current_material(ob, a);
+
+ /* there might not be a material */
+ if (ELEM(NULL, ma, ma->adt))
+ continue;
- // TODO: restore materials, and object data, etc.
+ /* add material's data */
+ action_to_keylist(ma->adt, ma->adt->action, keys, blocks);
+ }
+ }
+
+ /* Add object data keyframes */
+ switch (ob->type) {
+ case OB_CAMERA: /* ------- Camera ------------ */
+ {
+ Camera *ca= (Camera *)ob->data;
+
+ if ((ca->adt) && !(filterflag & ADS_FILTER_NOCAM))
+ action_to_keylist(ca->adt, ca->adt->action, keys, blocks);
+ }
+ break;
+ case OB_LAMP: /* ---------- Lamp ----------- */
+ {
+ Lamp *la= (Lamp *)ob->data;
+
+ if ((la->adt) && !(filterflag & ADS_FILTER_NOLAM))
+ action_to_keylist(la->adt, la->adt->action, keys, blocks);
+ }
+ break;
+ case OB_CURVE: /* ------- Curve ---------- */
+ {
+ Curve *cu= (Curve *)ob->data;
+
+ if ((cu->adt) && !(filterflag & ADS_FILTER_NOCUR))
+ action_to_keylist(cu->adt, cu->adt->action, keys, blocks);
+ }
+ break;
+ case OB_MBALL: /* ------- MetaBall ---------- */
+ {
+ MetaBall *mb= (MetaBall *)ob->data;
+
+ if ((mb->adt) && !(filterflag & ADS_FILTER_NOMBA))
+ action_to_keylist(mb->adt, mb->adt->action, keys, blocks);
+ }
+ break;
+ case OB_ARMATURE: /* ------- Armature ---------- */
+ {
+ bArmature *arm= (bArmature *)ob->data;
+
+ if ((arm->adt) && !(filterflag & ADS_FILTER_NOARM))
+ action_to_keylist(arm->adt, arm->adt->action, keys, blocks);
+ }
+ break;
+ }
+
+ /* Add Particle System Keyframes */
+ if ((ob->particlesystem.first) && !(filterflag & ADS_FILTER_NOPART)) {
+ ParticleSystem *psys = ob->particlesystem.first;
+
+ for(; psys; psys=psys->next) {
+ if (ELEM(NULL, psys->part, psys->part->adt))
+ continue;
+ else
+ action_to_keylist(psys->part->adt, psys->part->adt->action, keys, blocks);
+ }
}
}
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index ac04dc7d1a8..3b2830e9045 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -36,9 +36,15 @@
#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_key_types.h"
+#include "DNA_lamp_types.h"
+#include "DNA_material_types.h"
#include "DNA_object_types.h"
+#include "DNA_meta_types.h"
+#include "DNA_particle_types.h"
#include "DNA_space_types.h"
#include "DNA_scene_types.h"
#include "DNA_world_types.h"
@@ -46,6 +52,7 @@
#include "BKE_action.h"
#include "BKE_fcurve.h"
#include "BKE_key.h"
+#include "BKE_material.h"
#include "BKE_utildefines.h"
#include "ED_anim_api.h"
@@ -195,14 +202,100 @@ static short ob_keys_bezier_loop(BeztEditData *bed, Object *ob, BeztEditFunc bez
return 0;
/* firstly, Object's own AnimData */
- if (ob->adt)
- adt_keys_bezier_loop(bed, ob->adt, bezt_ok, bezt_cb, fcu_cb, filterflag);
+ if (ob->adt) {
+ if (adt_keys_bezier_loop(bed, ob->adt, bezt_ok, bezt_cb, fcu_cb, filterflag))
+ return 1;
+ }
/* shapekeys */
- if ((key && key->adt) && !(filterflag & ADS_FILTER_NOSHAPEKEYS))
- adt_keys_bezier_loop(bed, key->adt, bezt_ok, bezt_cb, fcu_cb, filterflag);
+ if ((key && key->adt) && !(filterflag & ADS_FILTER_NOSHAPEKEYS)) {
+ if (adt_keys_bezier_loop(bed, key->adt, bezt_ok, bezt_cb, fcu_cb, filterflag))
+ return 1;
+ }
+
+ /* Add material keyframes */
+ if ((ob->totcol) && !(filterflag & ADS_FILTER_NOMAT)) {
+ int a;
- // FIXME: add materials, etc. (but drawing code doesn't do it yet too! :)
+ for (a=0; a < ob->totcol; a++) {
+ Material *ma= give_current_material(ob, a);
+
+ /* there might not be a material */
+ if (ELEM(NULL, ma, ma->adt))
+ continue;
+
+ /* add material's data */
+ if (adt_keys_bezier_loop(bed, ma->adt, bezt_ok, bezt_cb, fcu_cb, filterflag))
+ return 1;
+ }
+ }
+
+ /* Add object data keyframes */
+ switch (ob->type) {
+ case OB_CAMERA: /* ------- Camera ------------ */
+ {
+ Camera *ca= (Camera *)ob->data;
+
+ if ((ca->adt) && !(filterflag & ADS_FILTER_NOCAM)) {
+ if (adt_keys_bezier_loop(bed, ca->adt, bezt_ok, bezt_cb, fcu_cb, filterflag))
+ return 1;
+ }
+ }
+ break;
+ case OB_LAMP: /* ---------- Lamp ----------- */
+ {
+ Lamp *la= (Lamp *)ob->data;
+
+ if ((la->adt) && !(filterflag & ADS_FILTER_NOLAM)) {
+ if (adt_keys_bezier_loop(bed, la->adt, bezt_ok, bezt_cb, fcu_cb, filterflag))
+ return 1;
+ }
+ }
+ break;
+ case OB_CURVE: /* ------- Curve ---------- */
+ {
+ Curve *cu= (Curve *)ob->data;
+
+ if ((cu->adt) && !(filterflag & ADS_FILTER_NOCUR)) {
+ if (adt_keys_bezier_loop(bed, cu->adt, bezt_ok, bezt_cb, fcu_cb, filterflag))
+ return 1;
+ }
+ }
+ break;
+ case OB_MBALL: /* ------- MetaBall ---------- */
+ {
+ MetaBall *mb= (MetaBall *)ob->data;
+
+ if ((mb->adt) && !(filterflag & ADS_FILTER_NOMBA)) {
+ if (adt_keys_bezier_loop(bed, mb->adt, bezt_ok, bezt_cb, fcu_cb, filterflag))
+ return 1;
+ }
+ }
+ break;
+ case OB_ARMATURE: /* ------- Armature ---------- */
+ {
+ bArmature *arm= (bArmature *)ob->data;
+
+ if ((arm->adt) && !(filterflag & ADS_FILTER_NOARM)) {
+ if (adt_keys_bezier_loop(bed, arm->adt, bezt_ok, bezt_cb, fcu_cb, filterflag))
+ return 1;
+ }
+ }
+ break;
+ }
+
+ /* Add Particle System Keyframes */
+ if ((ob->particlesystem.first) && !(filterflag & ADS_FILTER_NOPART)) {
+ ParticleSystem *psys = ob->particlesystem.first;
+
+ for(; psys; psys=psys->next) {
+ if (ELEM(NULL, psys->part, psys->part->adt))
+ continue;
+
+ if (adt_keys_bezier_loop(bed, psys->part->adt, bezt_ok, bezt_cb, fcu_cb, filterflag))
+ return 1;
+ }
+ }
return 0;
}
@@ -217,16 +310,48 @@ static short scene_keys_bezier_loop(BeztEditData *bed, Scene *sce, BeztEditFunc
return 0;
/* Scene's own animation */
- if (sce->adt)
- adt_keys_bezier_loop(bed, sce->adt, bezt_ok, bezt_cb, fcu_cb, filterflag);
+ if (sce->adt) {
+ if (adt_keys_bezier_loop(bed, sce->adt, bezt_ok, bezt_cb, fcu_cb, filterflag))
+ return 1;
+ }
/* World */
- if (wo && wo->adt)
- adt_keys_bezier_loop(bed, wo->adt, bezt_ok, bezt_cb, fcu_cb, filterflag);
+ if (wo && wo->adt) {
+ if (adt_keys_bezier_loop(bed, wo->adt, bezt_ok, bezt_cb, fcu_cb, filterflag))
+ return 1;
+ }
return 0;
}
+/* This function is used to loop over the keyframe data in a DopeSheet summary */
+static short summary_keys_bezier_loop(BeztEditData *bed, bAnimContext *ac, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb, int filterflag)
+{
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter, ret_code=0;
+
+ /* sanity check */
+ if (ac == NULL)
+ return 0;
+
+ /* get F-Curves to take keyframes from */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY);
+ ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
+ /* loop through each F-Curve, working on the keyframes until the first curve aborts */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ ret_code= ANIM_fcurve_keys_bezier_loop(bed, ale->data, bezt_ok, bezt_cb, fcu_cb);
+
+ if (ret_code)
+ break;
+ }
+
+ BLI_freelistN(&anim_data);
+
+ return ret_code;
+}
+
/* --- */
/* This function is used to apply operation to all keyframes, regardless of the type */
@@ -254,6 +379,8 @@ short ANIM_animchannel_keys_bezier_loop(BeztEditData *bed, bAnimListElem *ale, B
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);
+ case ALE_ALL: /* 'all' (DopeSheet summary) */
+ return summary_keys_bezier_loop(bed, (bAnimContext *)ale->data, bezt_ok, bezt_cb, fcu_cb, filterflag);
}
return 0;
@@ -284,6 +411,8 @@ short ANIM_animchanneldata_keys_bezier_loop(BeztEditData *bed, void *data, int k
return ob_keys_bezier_loop(bed, (Object *)data, bezt_ok, bezt_cb, fcu_cb, filterflag);
case ALE_SCE: /* scene */
return scene_keys_bezier_loop(bed, (Scene *)data, bezt_ok, bezt_cb, fcu_cb, filterflag);
+ case ALE_ALL: /* 'all' (DopeSheet summary) */
+ return summary_keys_bezier_loop(bed, (bAnimContext *)data, bezt_ok, bezt_cb, fcu_cb, filterflag);
}
return 0;
@@ -461,6 +590,13 @@ static short snap_bezier_horizontal(BeztEditData *bed, BezTriple *bezt)
return 0;
}
+static short snap_bezier_value(BeztEditData *bed, BezTriple *bezt)
+{
+ /* value to snap to is stored in the custom data -> first float value slot */
+ if (bezt->f2 & SELECT)
+ bezt->vec[1][1]= bed->f1;
+ return 0;
+}
BeztEditFunc ANIM_editkeyframes_snap(short type)
{
@@ -476,6 +612,8 @@ BeztEditFunc ANIM_editkeyframes_snap(short type)
return snap_bezier_nearestsec;
case SNAP_KEYS_HORIZONTAL: /* snap handles to same value */
return snap_bezier_horizontal;
+ case SNAP_KEYS_VALUE: /* snap to given value */
+ return snap_bezier_value;
default: /* just in case */
return snap_bezier_nearest;
}
@@ -685,6 +823,13 @@ static short set_keytype_breakdown(BeztEditData *bed, BezTriple *bezt)
return 0;
}
+static short set_keytype_extreme(BeztEditData *bed, BezTriple *bezt)
+{
+ if (bezt->f2 & SELECT)
+ BEZKEYTYPE(bezt)= BEZT_KEYTYPE_EXTREME;
+ return 0;
+}
+
/* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */
BeztEditFunc ANIM_editkeyframes_keytype(short code)
{
@@ -692,6 +837,9 @@ BeztEditFunc ANIM_editkeyframes_keytype(short code)
case BEZT_KEYTYPE_BREAKDOWN: /* breakdown */
return set_keytype_breakdown;
+ case BEZT_KEYTYPE_EXTREME: /* extreme keyframe */
+ return set_keytype_extreme;
+
case BEZT_KEYTYPE_KEYFRAME: /* proper keyframe */
default:
return set_keytype_keyframe;
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index f13d35c7d4a..3ad6ddf2c6f 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -581,6 +581,7 @@ short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data)
for (aci= animcopybuf.first; aci; aci= aci->next) {
/* check that paths exist */
if (aci->rna_path && fcu->rna_path) {
+ // FIXME: this breaks for bone names!
if (strcmp(aci->rna_path, fcu->rna_path) == 0) {
/* should be a match unless there's more than one of these */
if ((no_name) || (aci->array_index == fcu->array_index))
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 7135f8802bc..75218e6ea6e 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -176,85 +176,6 @@ FCurve *verify_fcurve (bAction *act, const char group[], const char rna_path[],
/* -------------- BezTriple Insertion -------------------- */
-/* threshold for inserting keyframes - threshold here should be good enough for now, but should become userpref */
-#define BEZT_INSERT_THRESH 0.00001f
-
-/* Binary search algorithm for finding where to insert BezTriple. (for use by insert_bezt_icu)
- * Returns the index to insert at (data already at that index will be offset if replace is 0)
- */
-static int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short *replace)
-{
- int start=0, end=arraylen;
- int loopbreaker= 0, maxloop= arraylen * 2;
-
- /* initialise replace-flag first */
- *replace= 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_bezt_index() encountered invalid array \n");
- return 0;
- }
- else {
- /* check whether to add before/after/on */
- float framenum;
-
- /* 'First' Keyframe (when only one keyframe, this case is used) */
- framenum= array[0].vec[1][0];
- if (IS_EQT(frame, framenum, BEZT_INSERT_THRESH)) {
- *replace = 1;
- return 0;
- }
- else if (frame < framenum)
- return 0;
-
- /* 'Last' Keyframe */
- framenum= array[(arraylen-1)].vec[1][0];
- if (IS_EQT(frame, framenum, BEZT_INSERT_THRESH)) {
- *replace= 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].vec[1][0];
-
- /* check if exactly equal to midpoint */
- if (IS_EQT(frame, midfra, BEZT_INSERT_THRESH)) {
- *replace = 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_bezt_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;
-}
-
/* This function adds a given BezTriple to an F-Curve. It will allocate
* memory for the array if needed, and will insert the BezTriple into a
* suitable place in chronological order.
@@ -286,8 +207,13 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
// TODO: perform some other operations?
}
else {
+ char oldKeyType= BEZKEYTYPE(fcu->bezt + i);
+
/* just brutally replace the values */
*(fcu->bezt + i) = *bezt;
+
+ /* special exception for keyframe type - copy value back so that this info isn't lost */
+ BEZKEYTYPE(fcu->bezt + i)= oldKeyType;
}
}
}
@@ -717,14 +643,14 @@ static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_
else if (pchan->bone->parent == NULL)
return tmat[3][array_index];
}
- else if (strstr(identifier, "euler_rotation")) {
+ else if (strstr(identifier, "rotation_euler")) {
float eul[3];
/* euler-rotation test before standard rotation, as standard rotation does quats */
Mat4ToEulO(tmat, eul, pchan->rotmode);
return eul[array_index];
}
- else if (strstr(identifier, "rotation")) {
+ else if (strstr(identifier, "rotation_quaternion")) {
float trimat[3][3], quat[4];
Mat3CpyMat4(trimat, tmat);
@@ -732,6 +658,7 @@ static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_
return quat[array_index];
}
+ // TODO: axis-angle...
}
/* as the function hasn't returned yet, read value from system in the default way */
@@ -1054,12 +981,15 @@ static int insert_key_exec (bContext *C, wmOperator *op)
}
/* try to insert keyframes for the channels specified by KeyingSet */
- success= modify_keyframes(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
- printf("KeyingSet '%s' - Successfully added %d Keyframes \n", ks->name, success);
+ success= modify_keyframes(scene, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
+ if (G.f & G_DEBUG)
+ printf("KeyingSet '%s' - Successfully added %d Keyframes \n", ks->name, success);
/* report failure? */
if (success == 0)
BKE_report(op->reports, RPT_WARNING, "Keying Set failed to insert any keyframes");
+ else
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
/* free temp context-data if available */
if (dsources.first) {
@@ -1068,10 +998,7 @@ static int insert_key_exec (bContext *C, wmOperator *op)
}
/* send updates */
- ED_anim_dag_flush_update(C);
-
- /* for now, only send ND_KEYS for KeyingSets */
- WM_event_add_notifier(C, ND_KEYS, NULL);
+ ED_anim_dag_flush_update(C);
return OPERATOR_FINISHED;
}
@@ -1205,12 +1132,15 @@ static int delete_key_exec (bContext *C, wmOperator *op)
}
/* try to insert keyframes for the channels specified by KeyingSet */
- success= modify_keyframes(C, &dsources, NULL, ks, MODIFYKEY_MODE_DELETE, cfra);
- printf("KeyingSet '%s' - Successfully removed %d Keyframes \n", ks->name, success);
+ success= modify_keyframes(scene, &dsources, NULL, ks, MODIFYKEY_MODE_DELETE, cfra);
+ if (G.f & G_DEBUG)
+ printf("KeyingSet '%s' - Successfully removed %d Keyframes \n", ks->name, success);
/* report failure? */
if (success == 0)
BKE_report(op->reports, RPT_WARNING, "Keying Set failed to remove any keyframes");
+ else
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
/* free temp context-data if available */
if (dsources.first) {
@@ -1221,9 +1151,6 @@ static int delete_key_exec (bContext *C, wmOperator *op)
/* send updates */
ED_anim_dag_flush_update(C);
- /* for now, only send ND_KEYS for KeyingSets */
- WM_event_add_notifier(C, ND_KEYS, NULL);
-
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 60efcce4e73..30eaea8b82e 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -78,6 +78,216 @@
#include "anim_intern.h"
/* ************************************************** */
+/* KEYING SETS - OPERATORS (for use in UI panels) */
+/* These operators are really duplication of existing functionality, but just for completeness,
+ * they're here too, and will give the basic data needed...
+ */
+
+/* poll callback for adding default KeyingSet */
+static int keyingset_poll_default_add (bContext *C)
+{
+ /* as long as there's an active Scene, it's fine */
+ return (CTX_data_scene(C) != NULL);
+}
+
+/* poll callback for editing active KeyingSet */
+static int keyingset_poll_active_edit (bContext *C)
+{
+ Scene *scene= CTX_data_scene(C);
+
+ if (scene == NULL)
+ return 0;
+
+ /* there must be an active KeyingSet (and KeyingSets) */
+ return ((scene->active_keyingset > 0) && (scene->keyingsets.first));
+}
+
+/* poll callback for editing active KeyingSet Path */
+static int keyingset_poll_activePath_edit (bContext *C)
+{
+ Scene *scene= CTX_data_scene(C);
+ KeyingSet *ks;
+
+ if (scene == NULL)
+ return 0;
+ if (scene->active_keyingset <= 0)
+ return 0;
+ else
+ ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+
+ /* there must be an active KeyingSet and an active path */
+ return ((ks) && (ks->paths.first) && (ks->active_path > 0));
+}
+
+
+/* Add a Default (Empty) Keying Set ------------------------- */
+
+static int add_default_keyingset_exec (bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ short flag=0, keyingflag=0;
+
+ /* validate flags
+ * - absolute KeyingSets should be created by default
+ */
+ flag |= KEYINGSET_ABSOLUTE;
+
+ if (IS_AUTOKEY_FLAG(AUTOMATKEY))
+ keyingflag |= INSERTKEY_MATRIX;
+ if (IS_AUTOKEY_FLAG(INSERTNEEDED))
+ keyingflag |= INSERTKEY_NEEDED;
+
+ /* call the API func, and set the active keyingset index */
+ BKE_keyingset_add(&scene->keyingsets, NULL, flag, keyingflag);
+
+ scene->active_keyingset= BLI_countlist(&scene->keyingsets);
+
+ return OPERATOR_FINISHED;
+}
+
+void ANIM_OT_keying_set_add (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Empty Keying Set";
+ ot->idname= "ANIM_OT_keying_set_add";
+ ot->description= "Add a new (empty) Keying Set to the active Scene.";
+
+ /* callbacks */
+ ot->exec= add_default_keyingset_exec;
+ ot->poll= keyingset_poll_default_add;
+}
+
+/* Remove 'Active' Keying Set ------------------------- */
+
+static int remove_active_keyingset_exec (bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ KeyingSet *ks;
+
+ /* verify the Keying Set to use:
+ * - use the active one
+ * - return error if it doesn't exist
+ */
+ if (scene->active_keyingset == 0) {
+ BKE_report(op->reports, RPT_ERROR, "No active Keying Set to remove");
+ return OPERATOR_CANCELLED;
+ }
+ else
+ ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+
+ /* free KeyingSet's data, then remove it from the scene */
+ BKE_keyingset_free(ks);
+ BLI_freelinkN(&scene->keyingsets, ks);
+
+ /* the active one should now be the previously second-to-last one */
+ scene->active_keyingset--;
+
+ return OPERATOR_FINISHED;
+}
+
+void ANIM_OT_keying_set_remove (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Removed Active Keying Set";
+ ot->idname= "ANIM_OT_keying_set_remove";
+ ot->description= "Remove the active Keying Set.";
+
+ /* callbacks */
+ ot->exec= remove_active_keyingset_exec;
+ ot->poll= keyingset_poll_active_edit;
+}
+
+/* Add Empty Keying Set Path ------------------------- */
+
+static int add_empty_ks_path_exec (bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ KeyingSet *ks;
+ KS_Path *ksp;
+
+ /* verify the Keying Set to use:
+ * - use the active one
+ * - return error if it doesn't exist
+ */
+ if (scene->active_keyingset == 0) {
+ BKE_report(op->reports, RPT_ERROR, "No active Keying Set to add empty path to");
+ return OPERATOR_CANCELLED;
+ }
+ else
+ ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+
+ /* don't use the API method for this, since that checks on values... */
+ ksp= MEM_callocN(sizeof(KS_Path), "KeyingSetPath Empty");
+ BLI_addtail(&ks->paths, ksp);
+ ks->active_path= BLI_countlist(&ks->paths);
+
+ ksp->groupmode= KSP_GROUP_KSNAME; // XXX?
+
+ return OPERATOR_FINISHED;
+}
+
+void ANIM_OT_keying_set_path_add (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Empty Keying Set Path";
+ ot->idname= "ANIM_OT_keying_set_path_add";
+ ot->description= "Add empty path to active Keying Set";
+
+ /* callbacks */
+ ot->exec= add_empty_ks_path_exec;
+ ot->poll= keyingset_poll_active_edit;
+}
+
+/* Remove Active Keying Set Path ------------------------- */
+
+static int remove_active_ks_path_exec (bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ KeyingSet *ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+
+ /* if there is a KeyingSet, find the nominated path to remove */
+ if (ks) {
+ KS_Path *ksp= BLI_findlink(&ks->paths, ks->active_path-1);
+
+ if (ksp) {
+ /* NOTE: sync this code with BKE_keyingset_free() */
+ {
+ /* free RNA-path info */
+ MEM_freeN(ksp->rna_path);
+
+ /* free path itself */
+ BLI_freelinkN(&ks->paths, ksp);
+ }
+
+ /* the active path should now be the previously second-to-last active one */
+ ks->active_path--;
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR, "No active Keying Set Path to remove");
+ return OPERATOR_CANCELLED;
+ }
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR, "No active Keying Set to remove a path from");
+ return OPERATOR_CANCELLED;
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void ANIM_OT_keying_set_path_remove (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove Active Keying Set Path";
+ ot->idname= "ANIM_OT_keying_set_path_remove";
+ ot->description= "Remove active Path from active Keying Set.";
+
+ /* callbacks */
+ ot->exec= remove_active_ks_path_exec;
+ ot->poll= keyingset_poll_activePath_edit;
+}
+
+/* ************************************************** */
/* KEYING SETS - OPERATORS (for use in UI menus) */
/* Add to KeyingSet Button Operator ------------------------ */
@@ -128,11 +338,19 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op)
if (path) {
/* set flags */
- if (all)
+ if (all) {
pflag |= KSP_FLAG_WHOLE_ARRAY;
+ /* we need to set the index for this to 0, even though it may break in some cases, this is
+ * necessary if we want the entire array for most cases to get included without the user
+ * having to worry about where they clicked
+ */
+ index= 0;
+ }
+
/* add path to this setting */
BKE_keyingset_add_destination(ks, ptr.id.data, NULL, path, index, pflag, KSP_GROUP_KSNAME);
+ ks->active_path= BLI_countlist(&ks->paths);
success= 1;
/* free the temp path created */
@@ -770,7 +988,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] =
/* Keying Set - "Rotation" ---------- */
BI_KS_DEFINE_BEGIN("Rotation", 0)
BI_KS_PATHS_BEGIN(1)
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
BI_KS_PATHS_END
BI_KS_DEFINE_END,
@@ -786,7 +1004,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] =
BI_KS_DEFINE_BEGIN("LocRot", 0)
BI_KS_PATHS_BEGIN(2)
BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM),
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
BI_KS_PATHS_END
BI_KS_DEFINE_END,
@@ -794,7 +1012,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] =
BI_KS_DEFINE_BEGIN("LocRotScale", 0)
BI_KS_PATHS_BEGIN(3)
BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM),
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM),
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM),
BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "scale", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
BI_KS_PATHS_END
BI_KS_DEFINE_END,
@@ -810,7 +1028,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] =
/* Keying Set - "Rotation" ---------- */
BI_KS_DEFINE_BEGIN("VisualRot", INSERTKEY_MATRIX)
BI_KS_PATHS_BEGIN(1)
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
BI_KS_PATHS_END
BI_KS_DEFINE_END,
@@ -818,7 +1036,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] =
BI_KS_DEFINE_BEGIN("VisualLocRot", INSERTKEY_MATRIX)
BI_KS_PATHS_BEGIN(2)
BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM),
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
BI_KS_PATHS_END
BI_KS_DEFINE_END
};
@@ -900,6 +1118,24 @@ KeyingSet *ANIM_builtin_keyingset_get_named (KeyingSet *prevKS, char name[])
return NULL;
}
+
+/* Get the active Keying Set for the Scene provided */
+KeyingSet *ANIM_scene_get_active_keyingset (Scene *scene)
+{
+ if (ELEM(NULL, scene, scene->keyingsets.first))
+ return NULL;
+
+ /* currently, there are several possibilities here:
+ * - 0: no active keying set
+ * - > 0: one of the user-defined Keying Sets, but indices start from 0 (hence the -1)
+ * - < 0: a builtin keying set (XXX this isn't enabled yet so that we don't get errors on reading back files)
+ */
+ if (scene->active_keyingset > 0)
+ return BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+ else // for now...
+ return NULL;
+}
+
/* ******************************************* */
/* KEYFRAME MODIFICATION */
@@ -1043,9 +1279,8 @@ short modifykey_get_context_data (bContext *C, ListBase *dsources, KeyingSet *ks
* by the KeyingSet. This takes into account many of the different combinations of using KeyingSets.
* Returns the number of channels that keyframes were added to
*/
-int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra)
+int modify_keyframes (Scene *scene, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra)
{
- Scene *scene= CTX_data_scene(C);
KS_Path *ksp;
int kflag=0, success= 0;
char *groupname= NULL;
@@ -1110,25 +1345,20 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
success+= delete_keyframe(ksp->id, act, groupname, ksp->rna_path, i, cfra, kflag);
}
- /* send notifiers and set recalc-flags */
- // TODO: hopefully this doesn't result in execessive flooding of the notifier stack
- if (C && ksp->id) {
+ /* set recalc-flags */
+ if (ksp->id) {
switch (GS(ksp->id->name)) {
case ID_OB: /* Object (or Object-Related) Keyframes */
{
Object *ob= (Object *)ksp->id;
ob->recalc |= OB_RECALC;
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, ksp->id);
}
break;
- 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;
}
+
+ /* send notifiers for updates (this doesn't require context to work!) */
+ WM_main_add_notifier(NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
}
}
@@ -1145,7 +1375,12 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
int arraylen, i;
/* set initial group name */
- groupname= (cks->id) ? cks->id->name+2 : NULL;
+ if (cks->id == NULL) {
+ printf("ERROR: Skipping 'Common-Key' Source. No valid ID present.\n");
+ continue;
+ }
+ else
+ groupname= cks->id->name+2;
/* construct the path */
// FIXME: this currently only works with a few hardcoded cases
@@ -1173,14 +1408,24 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
BLI_dynstr_append(pathds, ".");
/* apply some further templates? */
- if ((ksp->templates & KSP_TEMPLATE_PCHAN_ROT) && (cks->pchan)) {
- /* if this path is exactly "rotation", and the rotation mode is set to eulers,
- * use "euler_rotation" instead so that rotations will be keyed correctly
+ if (ksp->templates & KSP_TEMPLATE_ROT) {
+ /* for builtin Keying Sets, this template makes the best fitting path for the
+ * current rotation mode of the Object / PoseChannel to be used
*/
- if (strcmp(ksp->rna_path, "rotation")==0 && (cks->pchan->rotmode > 0))
- BLI_dynstr_append(pathds, "euler_rotation");
- else
- BLI_dynstr_append(pathds, ksp->rna_path);
+ if (strcmp(ksp->rna_path, "rotation")==0) {
+ /* get rotation mode */
+ short rotmode= (cks->pchan)? (cks->pchan->rotmode) :
+ (GS(cks->id->name)==ID_OB)? ( ((Object *)cks->id)->rotmode ) :
+ (0);
+
+ /* determine path to build */
+ if (rotmode == ROT_MODE_QUAT)
+ BLI_dynstr_append(pathds, "rotation_quaternion");
+ else if (rotmode == ROT_MODE_AXISANGLE)
+ BLI_dynstr_append(pathds, "rotation_axis_angle");
+ else
+ BLI_dynstr_append(pathds, "rotation_euler");
+ }
}
else {
/* just directly use the path */
@@ -1233,25 +1478,20 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
MEM_freeN(path);
}
- /* send notifiers and set recalc-flags */
- // TODO: hopefully this doesn't result in execessive flooding of the notifier stack
- if (C && cks->id) {
+ /* set recalc-flags */
+ if (cks->id) {
switch (GS(cks->id->name)) {
case ID_OB: /* Object (or Object-Related) Keyframes */
{
Object *ob= (Object *)cks->id;
ob->recalc |= OB_RECALC;
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, cks->id);
}
break;
- 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;
}
+
+ /* send notifiers for updates (this doesn't require context to work!) */
+ WM_main_add_notifier(NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
}
}
diff --git a/source/blender/editors/armature/SConscript b/source/blender/editors/armature/SConscript
index f96d25b0fe0..a7fa9d7071f 100644
--- a/source/blender/editors/armature/SConscript
+++ b/source/blender/editors/armature/SConscript
@@ -8,4 +8,11 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../render/extern/include #/intern/guardedalloc'
incs += ' ../../gpu ../../makesrna #/intern/opennl/extern'
+if env['OURPLATFORM'] == 'linux2':
+ cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( 'bf_editors_armature', sources, Split(incs), [], libtype=['core'], priority=[44] )
diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h
index 0c8c0e8e644..6f5a5f44d87 100644
--- a/source/blender/editors/armature/armature_intern.h
+++ b/source/blender/editors/armature/armature_intern.h
@@ -118,12 +118,20 @@ void SKETCH_OT_select(struct wmOperatorType *ot);
/* ******************************************************* */
/* PoseLib */
+
void POSELIB_OT_pose_add(struct wmOperatorType *ot);
void POSELIB_OT_pose_remove(struct wmOperatorType *ot);
void POSELIB_OT_pose_rename(struct wmOperatorType *ot);
void POSELIB_OT_browse_interactive(struct wmOperatorType *ot);
/* ******************************************************* */
+/* Pose Sliding Tools */
+
+void POSE_OT_push(struct wmOperatorType *ot);
+void POSE_OT_relax(struct wmOperatorType *ot);
+void POSE_OT_breakdown(struct wmOperatorType *ot);
+
+/* ******************************************************* */
/* editarmature.c */
struct bArmature;
struct EditBone;
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c
index 389a0a5174a..2bf414ef969 100644
--- a/source/blender/editors/armature/armature_ops.c
+++ b/source/blender/editors/armature/armature_ops.c
@@ -196,17 +196,23 @@ void ED_operatortypes_armature(void)
WM_operatortype_append(POSELIB_OT_pose_remove);
WM_operatortype_append(POSELIB_OT_pose_rename);
+ /* POSE SLIDING */
+ WM_operatortype_append(POSE_OT_push);
+ WM_operatortype_append(POSE_OT_relax);
+ WM_operatortype_append(POSE_OT_breakdown);
+
/* TESTS */
WM_operatortype_append(ARMATURE_OT_test); // XXX temp test for context iterators... to be removed
}
-void ED_keymap_armature(wmWindowManager *wm)
+void ED_keymap_armature(wmKeyConfig *keyconf)
{
- ListBase *keymap;
- wmKeymapItem *kmi;
+ wmKeyMap *keymap;
+ wmKeyMapItem *kmi;
/* Armature ------------------------ */
- keymap= WM_keymap_listbase(wm, "Armature", 0, 0);
+ keymap= WM_keymap_find(keyconf, "Armature", 0, 0);
+ keymap->poll= ED_operator_editarmature;
/* only set in editmode armature, by space_view3d listener */
// WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, 0, 0);
@@ -242,6 +248,7 @@ void ED_keymap_armature(wmWindowManager *wm)
WM_keymap_add_item(keymap, "ARMATURE_OT_select_linked", LKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "ARMATURE_OT_delete", DELKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_extrude", EKEY, KM_PRESS, 0, 0);
kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_extrude", EKEY, KM_PRESS, KM_SHIFT, 0);
@@ -274,13 +281,27 @@ void ED_keymap_armature(wmWindowManager *wm)
/* Armature -> Etch-A-Ton ------------------------ */
WM_keymap_add_item(keymap, "SKETCH_OT_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "SKETCH_OT_delete", DELKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SKETCH_OT_finish_stroke", SELECTMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SKETCH_OT_cancel_stroke", ESCKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SKETCH_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
+ /* sketch poll checks mode */
+ WM_keymap_add_item(keymap, "SKETCH_OT_gesture", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", ACTIONMOUSE, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", ACTIONMOUSE, KM_PRESS, KM_CTRL, 0);
+ RNA_boolean_set(kmi->ptr, "snap", 1);
+ WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, KM_CTRL, 0);
+ RNA_boolean_set(kmi->ptr, "snap", 1);
+
/* Pose ------------------------ */
/* only set in posemode, by space_view3d listener */
- keymap= WM_keymap_listbase(wm, "Pose", 0, 0);
+ keymap= WM_keymap_find(keyconf, "Pose", 0, 0);
+ keymap->poll= ED_operator_posemode;
+
+ // XXX: set parent is object-based operator, but it should also be available here...
+ WM_keymap_add_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, 0, 0);
kmi= WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
@@ -294,7 +315,6 @@ void ED_keymap_armature(wmWindowManager *wm)
WM_keymap_add_item(keymap, "POSE_OT_loc_clear", GKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "POSE_OT_scale_clear", SKEY, KM_PRESS, KM_ALT, 0);
- // for now, we include hotkeys for copy/paste
WM_keymap_add_item(keymap, "POSE_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
kmi= WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
@@ -354,5 +374,11 @@ void ED_keymap_armature(wmWindowManager *wm)
WM_keymap_add_item(keymap, "POSELIB_OT_pose_add", LKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "POSELIB_OT_pose_remove", LKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "POSELIB_OT_pose_rename", LKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+
+ /* Pose -> Pose Sliding ------------- */
+ /* only set in posemode, by space_view3d listener */
+ WM_keymap_add_item(keymap, "POSE_OT_push", EKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "POSE_OT_relax", EKEY, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "POSE_OT_breakdown", EKEY, KM_PRESS, KM_SHIFT, 0);
}
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 7d196d23c98..0343fea5bfb 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -110,17 +110,20 @@ void ED_armature_sync_selection(ListBase *edbo)
EditBone *ebo;
for (ebo=edbo->first; ebo; ebo= ebo->next) {
- if ((ebo->flag & BONE_CONNECTED) && (ebo->parent)) {
- if (ebo->parent->flag & BONE_TIPSEL)
- ebo->flag |= BONE_ROOTSEL;
+ /* if bone is not selectable, we shouldn't alter this setting... */
+ if ((ebo->flag & BONE_UNSELECTABLE) == 0) {
+ if ((ebo->flag & BONE_CONNECTED) && (ebo->parent)) {
+ if (ebo->parent->flag & BONE_TIPSEL)
+ ebo->flag |= BONE_ROOTSEL;
+ else
+ ebo->flag &= ~BONE_ROOTSEL;
+ }
+
+ if ((ebo->flag & BONE_TIPSEL) && (ebo->flag & BONE_ROOTSEL))
+ ebo->flag |= BONE_SELECTED;
else
- ebo->flag &= ~BONE_ROOTSEL;
+ ebo->flag &= ~BONE_SELECTED;
}
-
- if ((ebo->flag & BONE_TIPSEL) && (ebo->flag & BONE_ROOTSEL))
- ebo->flag |= BONE_SELECTED;
- else
- ebo->flag &= ~BONE_SELECTED;
}
}
@@ -1127,7 +1130,7 @@ static void *get_bone_from_selectbuffer(Scene *scene, Base *base, unsigned int *
/* no singular posemode, so check for correct object */
if(base->selcol == (hitresult & 0xFFFF)) {
bone = get_indexed_bone(base->object, hitresult);
-
+
if (findunsel)
sel = (bone->flag & BONE_SELECTED);
else
@@ -1347,45 +1350,42 @@ void POSE_OT_flags_set (wmOperatorType *ot)
/* **************** Posemode stuff ********************** */
-static void selectconnected_posebonechildren (Object *ob, Bone *bone)
+static void selectconnected_posebonechildren (Object *ob, Bone *bone, int extend)
{
Bone *curBone;
- int shift= 0; // XXX
- if (!(bone->flag & BONE_CONNECTED))
+ /* stop when unconnected child is encontered, or when unselectable bone is encountered */
+ if (!(bone->flag & BONE_CONNECTED) || (bone->flag & BONE_UNSELECTABLE))
return;
// XXX old cruft! use notifiers instead
//select_actionchannel_by_name (ob->action, bone->name, !(shift));
- if (shift)
+ if (extend)
bone->flag &= ~BONE_SELECTED;
else
bone->flag |= BONE_SELECTED;
- for (curBone=bone->childbase.first; curBone; curBone=curBone->next){
- selectconnected_posebonechildren (ob, curBone);
- }
+ for (curBone=bone->childbase.first; curBone; curBone=curBone->next)
+ selectconnected_posebonechildren(ob, curBone, extend);
}
/* within active object context */
/* previously known as "selectconnected_posearmature" */
static int pose_select_connected_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
+ ARegion *ar= CTX_wm_region(C);
+ Object *ob= CTX_data_edit_object(C);
Bone *bone, *curBone, *next= NULL;
- int shift= 0; // XXX in pose mode, Shift+L is bound to another command
- // named "PoseLib Add Current Pose"
+ int extend= RNA_boolean_get(op->ptr, "extend");
int x, y;
- ARegion *ar;
- Object *ob= CTX_data_edit_object(C);
- ar= CTX_wm_region(C);
-
+
x= event->x - ar->winrct.xmin;
y= event->y - ar->winrct.ymin;
view3d_operator_needs_opengl(C);
- if (shift)
+ if (extend)
bone= get_nearest_bone(C, 0, x, y);
else
bone= get_nearest_bone(C, 1, x, y);
@@ -1395,26 +1395,29 @@ static int pose_select_connected_invoke(bContext *C, wmOperator *op, wmEvent *ev
/* Select parents */
for (curBone=bone; curBone; curBone=next){
- // XXX old cruft! use notifiers instead
- //select_actionchannel_by_name (ob->action, curBone->name, !(shift));
- if (shift)
- curBone->flag &= ~BONE_SELECTED;
- else
- curBone->flag |= BONE_SELECTED;
-
- if (curBone->flag & BONE_CONNECTED)
- next=curBone->parent;
+ /* ignore bone if cannot be selected */
+ if ((curBone->flag & BONE_UNSELECTABLE) == 0) {
+ // XXX old cruft! use notifiers instead
+ //select_actionchannel_by_name (ob->action, curBone->name, !(shift));
+
+ if (extend)
+ curBone->flag &= ~BONE_SELECTED;
+ else
+ curBone->flag |= BONE_SELECTED;
+
+ if (curBone->flag & BONE_CONNECTED)
+ next=curBone->parent;
+ else
+ next=NULL;
+ }
else
- next=NULL;
+ next= NULL;
}
/* Select children */
- for (curBone=bone->childbase.first; curBone; curBone=next){
- selectconnected_posebonechildren (ob, curBone);
- }
+ for (curBone=bone->childbase.first; curBone; curBone=next)
+ selectconnected_posebonechildren(ob, curBone, extend);
- // XXX this only counted the number of pose channels selected
- //countall(); // flushes selection!
WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
return OPERATOR_FINISHED;
@@ -1435,6 +1438,7 @@ void POSE_OT_select_linked(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
+ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first.");
}
/* **************** END Posemode stuff ********************** */
@@ -1446,7 +1450,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, wmEvent *e
{
bArmature *arm;
EditBone *bone, *curBone, *next;
- int shift= 0; // XXX
+ int extend= RNA_boolean_get(op->ptr, "extend");
int x, y;
ARegion *ar;
Object *obedit= CTX_data_edit_object(C);
@@ -1458,7 +1462,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, wmEvent *e
view3d_operator_needs_opengl(C);
- if (shift)
+ if (extend)
bone= get_nearest_bone(C, 0, x, y);
else
bone= get_nearest_bone(C, 1, x, y);
@@ -1467,14 +1471,16 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, wmEvent *e
return OPERATOR_CANCELLED;
/* Select parents */
- for (curBone=bone; curBone; curBone=next){
- if (shift){
- curBone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
- }
- else{
- curBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
+ for (curBone=bone; curBone; curBone=next) {
+ if ((curBone->flag & BONE_UNSELECTABLE) == 0) {
+ if (extend) {
+ curBone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
+ }
+ else{
+ curBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
+ }
}
-
+
if (curBone->flag & BONE_CONNECTED)
next=curBone->parent;
else
@@ -1482,19 +1488,19 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, wmEvent *e
}
/* Select children */
- while (bone){
- for (curBone=arm->edbo->first; curBone; curBone=next){
+ while (bone) {
+ for (curBone=arm->edbo->first; curBone; curBone=next) {
next = curBone->next;
- if (curBone->parent == bone){
- if (curBone->flag & BONE_CONNECTED){
- if (shift)
+ if ((curBone->parent == bone) && (curBone->flag & BONE_UNSELECTABLE)==0) {
+ if (curBone->flag & BONE_CONNECTED) {
+ if (extend)
curBone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
else
curBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
bone=curBone;
break;
}
- else{
+ else {
bone=NULL;
break;
}
@@ -1502,15 +1508,12 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, wmEvent *e
}
if (!curBone)
bone=NULL;
-
}
-
+
ED_armature_sync_selection(arm->edbo);
-
- /* BIF_undo_push("Select connected"); */
-
+
WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, obedit);
-
+
return OPERATOR_FINISHED;
}
@@ -1527,6 +1530,9 @@ void ARMATURE_OT_select_linked(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* properties s*/
+ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first.");
}
/* does bones and points */
@@ -1736,7 +1742,7 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *op)
ED_armature_sync_selection(arm->edbo);
- WM_event_add_notifier(C, NC_OBJECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, obedit);
return OPERATOR_FINISHED;
}
@@ -2539,6 +2545,8 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, char *name, ListBase *edit
VECCOPY(channew->limitmax, chanold->limitmax);
VECCOPY(channew->stiffness, chanold->stiffness);
channew->ikstretch= chanold->ikstretch;
+ channew->ikrotweight= chanold->ikrotweight;
+ channew->iklinweight= chanold->iklinweight;
/* constraints */
listnew = &channew->constraints;
@@ -2630,6 +2638,9 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op)
/* copy transform locks */
channew->protectflag = chanold->protectflag;
+ /* copy rotation mode */
+ channew->rotmode = chanold->rotmode;
+
/* copy bone group */
channew->agrp_index= chanold->agrp_index;
@@ -2639,6 +2650,8 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op)
VECCOPY(channew->limitmax, chanold->limitmax);
VECCOPY(channew->stiffness, chanold->stiffness);
channew->ikstretch= chanold->ikstretch;
+ channew->ikrotweight= chanold->ikrotweight;
+ channew->iklinweight= chanold->iklinweight;
/* constraints */
listnew = &channew->constraints;
@@ -3441,7 +3454,8 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
else
VecAddf(bone->tail, bone->head, imat[2]); // bone with unit length 1, pointing up Z
- WM_event_add_notifier(C, NC_OBJECT, obedit);
+ /* note, notifier might evolve */
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, obedit);
return OPERATOR_FINISHED;
}
@@ -3930,7 +3944,7 @@ static int armature_parent_clear_exec(bContext *C, wmOperator *op)
ED_armature_sync_selection(arm->edbo);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
return OPERATOR_FINISHED;
}
@@ -3958,9 +3972,12 @@ static int armature_select_inverse_exec(bContext *C, wmOperator *op)
{
/* Set the flags */
CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones) {
- /* select bone */
- ebone->flag ^= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- ebone->flag &= ~BONE_ACTIVE;
+ /* ignore bone if selection can't change */
+ if ((ebone->flag & BONE_UNSELECTABLE) == 0) {
+ /* select bone */
+ ebone->flag ^= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ ebone->flag &= ~BONE_ACTIVE;
+ }
}
CTX_DATA_END;
@@ -3971,7 +3988,6 @@ static int armature_select_inverse_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_select_inverse(wmOperatorType *ot)
{
-
/* identifiers */
ot->name= "Select Inverse";
ot->idname= "ARMATURE_OT_select_inverse";
@@ -3994,15 +4010,18 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op)
/* Set the flags */
CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones) {
- if (sel==1) {
- /* select bone */
- ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- if(ebone->parent)
- ebone->parent->flag |= (BONE_TIPSEL);
- }
- else {
- /* deselect bone */
- ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL | BONE_ACTIVE);
+ /* ignore bone if selection can't change */
+ if ((ebone->flag & BONE_UNSELECTABLE) == 0) {
+ if (sel==1) {
+ /* select bone */
+ ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ if(ebone->parent)
+ ebone->parent->flag |= (BONE_TIPSEL);
+ }
+ else {
+ /* deselect bone */
+ ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL | BONE_ACTIVE);
+ }
}
}
CTX_DATA_END;
@@ -4043,7 +4062,8 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op)
arm= (bArmature *)ob->data;
for (curbone= arm->edbo->first; curbone; curbone= curbone->next) {
- if (EBONE_VISIBLE(arm, curbone)) {
+ /* only work on bone if it is visible and its selection can change */
+ if (EBONE_VISIBLE(arm, curbone) && (curbone->flag & BONE_UNSELECTABLE)==0) {
if (curbone->flag & (BONE_ACTIVE)) {
if (direction == BONE_SELECT_PARENT) {
if (curbone->parent == NULL) continue;
@@ -4063,7 +4083,7 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op)
chbone = editbone_get_child(arm, curbone, 1);
if (chbone == NULL) continue;
- if (EBONE_VISIBLE(arm, chbone)) {
+ if (EBONE_VISIBLE(arm, chbone) && (chbone->flag & BONE_UNSELECTABLE)==0) {
chbone->flag |= (BONE_ACTIVE|BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
if (!add_to_sel) {
@@ -4293,8 +4313,9 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
if (!ob || !ob->pose) return 0;
nearBone= get_bone_from_selectbuffer(scene, base, buffer, hits, 1);
-
- if (nearBone) {
+
+ /* if the bone cannot be affected, don't do anything */
+ if ((nearBone) && !(nearBone->flag & BONE_UNSELECTABLE)) {
bArmature *arm= ob->data;
/* since we do unified select, we don't shift+select a bone if the armature object was not active yet */
@@ -4330,7 +4351,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
}
/* in weightpaint we select the associated vertex group too */
- if (ob->mode & OB_MODE_WEIGHT_PAINT) {
+ if (OBACT && OBACT->mode & OB_MODE_WEIGHT_PAINT) {
if (nearBone->flag & BONE_ACTIVE) {
ED_vgroup_select_by_name(OBACT, nearBone->name);
DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA);
@@ -4373,7 +4394,8 @@ void ED_pose_deselectall (Object *ob, int test, int doundo)
/* Set the flags accordingly */
for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- if ((pchan->bone->layer & arm->layer) && !(pchan->bone->flag & BONE_HIDDEN_P)) {
+ /* ignore the pchan if it isn't visible or if its selection cannot be changed */
+ if ((pchan->bone->layer & arm->layer) && !(pchan->bone->flag & (BONE_HIDDEN_P|BONE_UNSELECTABLE))) {
if (test==3) {
pchan->bone->flag ^= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
pchan->bone->flag &= ~BONE_ACTIVE;
@@ -4853,25 +4875,50 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *op)
/* check if convert to eulers for locking... */
if (pchan->protectflag & OB_LOCK_ROT4D) {
/* perform clamping on a component by component basis */
- if ((pchan->protectflag & OB_LOCK_ROTW) == 0)
- pchan->quat[0]= (pchan->rotmode == PCHAN_ROT_AXISANGLE) ? 0.0f : 1.0f;
- if ((pchan->protectflag & OB_LOCK_ROTX) == 0)
- pchan->quat[1]= 0.0f;
- if ((pchan->protectflag & OB_LOCK_ROTY) == 0)
- pchan->quat[2]= 0.0f;
- if ((pchan->protectflag & OB_LOCK_ROTZ) == 0)
- pchan->quat[3]= 0.0f;
+ if (pchan->rotmode == ROT_MODE_AXISANGLE) {
+ if ((pchan->protectflag & OB_LOCK_ROTW) == 0)
+ pchan->rotAngle= 0.0f;
+ if ((pchan->protectflag & OB_LOCK_ROTX) == 0)
+ pchan->rotAxis[0]= 0.0f;
+ if ((pchan->protectflag & OB_LOCK_ROTY) == 0)
+ pchan->rotAxis[1]= 0.0f;
+ if ((pchan->protectflag & OB_LOCK_ROTZ) == 0)
+ pchan->rotAxis[2]= 0.0f;
+
+ /* check validity of axis - axis should never be 0,0,0 (if so, then we make it rotate about y) */
+ if (IS_EQ(pchan->rotAxis[0], pchan->rotAxis[1]) && IS_EQ(pchan->rotAxis[1], pchan->rotAxis[2]))
+ pchan->rotAxis[1] = 1.0f;
+ }
+ else if (pchan->rotmode == ROT_MODE_QUAT) {
+ if ((pchan->protectflag & OB_LOCK_ROTW) == 0)
+ pchan->quat[0]= 1.0f;
+ if ((pchan->protectflag & OB_LOCK_ROTX) == 0)
+ pchan->quat[1]= 0.0f;
+ if ((pchan->protectflag & OB_LOCK_ROTY) == 0)
+ pchan->quat[2]= 0.0f;
+ if ((pchan->protectflag & OB_LOCK_ROTZ) == 0)
+ pchan->quat[3]= 0.0f;
+ }
+ else {
+ /* the flag may have been set for the other modes, so just ignore the extra flag... */
+ if ((pchan->protectflag & OB_LOCK_ROTX) == 0)
+ pchan->eul[0]= 0.0f;
+ if ((pchan->protectflag & OB_LOCK_ROTY) == 0)
+ pchan->eul[1]= 0.0f;
+ if ((pchan->protectflag & OB_LOCK_ROTZ) == 0)
+ pchan->eul[2]= 0.0f;
+ }
}
else {
/* perform clamping using euler form (3-components) */
float eul[3], oldeul[3], quat1[4];
- if (pchan->rotmode == PCHAN_ROT_QUAT) {
+ if (pchan->rotmode == ROT_MODE_QUAT) {
QUATCOPY(quat1, pchan->quat);
QuatToEul(pchan->quat, oldeul);
}
- else if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
- AxisAngleToEulO(&pchan->quat[1], pchan->quat[0], oldeul, EULER_ORDER_DEFAULT);
+ else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
+ AxisAngleToEulO(pchan->rotAxis, pchan->rotAngle, oldeul, EULER_ORDER_DEFAULT);
}
else {
VECCOPY(oldeul, pchan->eul);
@@ -4886,15 +4933,15 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *op)
if (pchan->protectflag & OB_LOCK_ROTZ)
eul[2]= oldeul[2];
- if (pchan->rotmode == PCHAN_ROT_QUAT) {
+ if (pchan->rotmode == ROT_MODE_QUAT) {
EulToQuat(eul, pchan->quat);
/* quaternions flip w sign to accumulate rotations correctly */
if ((quat1[0]<0.0f && pchan->quat[0]>0.0f) || (quat1[0]>0.0f && pchan->quat[0]<0.0f)) {
QuatMulf(pchan->quat, -1.0f);
}
}
- else if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
- AxisAngleToEulO(&pchan->quat[1], pchan->quat[0], oldeul, EULER_ORDER_DEFAULT);
+ else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
+ EulOToAxisAngle(eul, EULER_ORDER_DEFAULT, pchan->rotAxis, &pchan->rotAngle);
}
else {
VECCOPY(pchan->eul, eul);
@@ -4902,14 +4949,14 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *op)
}
}
else {
- if (pchan->rotmode == PCHAN_ROT_QUAT) {
+ if (pchan->rotmode == ROT_MODE_QUAT) {
pchan->quat[1]=pchan->quat[2]=pchan->quat[3]= 0.0f;
pchan->quat[0]= 1.0f;
}
- else if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
+ else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
/* by default, make rotation of 0 radians around y-axis (roll) */
- pchan->quat[0]=pchan->quat[1]=pchan->quat[3]= 0.0f;
- pchan->quat[2]= 1.0f;
+ pchan->rotAxis[0]=pchan->rotAxis[2]=pchan->rotAngle= 0.0f;
+ pchan->rotAxis[1]= 1.0f;
}
else {
pchan->eul[0]= pchan->eul[1]= pchan->eul[2]= 0.0f;
@@ -4952,8 +4999,10 @@ static int pose_select_inverse_exec(bContext *C, wmOperator *op)
/* Set the flags */
CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pchans) {
- pchan->bone->flag ^= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
- pchan->bone->flag &= ~BONE_ACTIVE;
+ if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0) {
+ pchan->bone->flag ^= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
+ pchan->bone->flag &= ~BONE_ACTIVE;
+ }
}
CTX_DATA_END;
@@ -4987,9 +5036,11 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op)
/* Set the flags */
CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pchans) {
- /* select pchan */
- if (sel==0) pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE);
- else pchan->bone->flag |= BONE_SELECTED;
+ /* select pchan, only if selectable */
+ if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0) {
+ if (sel==0) pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE);
+ else pchan->bone->flag |= BONE_SELECTED;
+ }
}
CTX_DATA_END;
@@ -5023,7 +5074,7 @@ static int pose_select_parent_exec(bContext *C, wmOperator *op)
pchan=CTX_data_active_pchan(C);
if (pchan) {
parent=pchan->parent;
- if ((parent) && !(parent->bone->flag & BONE_HIDDEN_P)) {
+ if ((parent) && !(parent->bone->flag & (BONE_HIDDEN_P|BONE_UNSELECTABLE))) {
parent->bone->flag |= BONE_SELECTED;
parent->bone->flag |= BONE_ACTIVE;
pchan->bone->flag &= ~BONE_ACTIVE;
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 79d3d7b1366..b3dd8f35137 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -1006,9 +1006,9 @@ void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end, float
{
float ray_start[3], ray_normal[3];
float delta = VecLenf(stk->points[i].p, stk->points[i + 1].p);
- short pval[2];
+ float pval[2];
- project_short_noclip(ar, stk->points[i].p, pval);
+ project_float(ar, stk->points[i].p, pval);
viewray(ar, v3d, pval, ray_start, ray_normal);
VecMulf(ray_normal, distance * progress / length);
@@ -1076,11 +1076,14 @@ int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Strok
float dist = FLT_MAX;
float p[3];
float size = 0;
+ float mvalf[2];
BLI_freelistN(&sketch->depth_peels);
sketch->depth_peels.first = sketch->depth_peels.last = NULL;
- peelObjectsContext(C, &sketch->depth_peels, dd->mval);
+ mvalf[0]= dd->mval[0];
+ mvalf[1]= dd->mval[1];
+ peelObjectsContext(C, &sketch->depth_peels, mvalf);
if (stk->nb_points > 0 && stk->points[stk->nb_points - 1].type == PT_CONTINUOUS)
{
@@ -1174,6 +1177,7 @@ int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Strok
SK_Stroke *snap_stk;
float vec[3];
float no[3];
+ float mval[2];
int found = 0;
int dist = SNAP_MIN_DISTANCE; // Use a user defined value here
@@ -1197,9 +1201,12 @@ int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Strok
point_added = 1;
}
}
+
+ mval[0] = dd->mval[0];
+ mval[1] = dd->mval[1];
/* try to snap to closer object */
- found = snapObjectsContext(C, dd->mval, &dist, vec, no, SNAP_NOT_SELECTED);
+ found = snapObjectsContext(C, mval, &dist, vec, no, SNAP_NOT_SELECTED);
if (found == 1)
{
pt->type = dd->type;
@@ -1708,7 +1715,7 @@ int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Strok
{
SK_Intersection *isect = MEM_callocN(sizeof(SK_Intersection), "Intersection");
float ray_start[3], ray_end[3];
- short mval[2];
+ float mval[2];
isect->gesture_index = g_i;
isect->before = s_i;
@@ -1716,8 +1723,8 @@ int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Strok
isect->stroke = stk;
isect->lambda = lambda;
- mval[0] = (short)(vi[0]);
- mval[1] = (short)(vi[1]);
+ mval[0] = vi[0];
+ mval[1] = vi[1];
viewline(ar, v3d, mval, ray_start, ray_end);
LineIntersectLine( stk->points[s_i].p,
@@ -1814,7 +1821,7 @@ int sk_detectTrimGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
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);
+ angle = RAD2DEG(VecAngle2(s1, s2));
if (angle > 60 && angle < 120)
{
@@ -1932,7 +1939,7 @@ int sk_detectDeleteGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
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);
+ angle = RAD2DEG(VecAngle2(s1, s2));
if (angle > 120)
{
@@ -2064,7 +2071,7 @@ int sk_detectReverseGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
VecSubf(end_v, sk_lastStrokePoint(gest->stk)->p, isect->p);
}
- angle = VecAngle2(start_v, end_v);
+ angle = RAD2DEG(VecAngle2(start_v, end_v));
if (angle > 120)
{
@@ -2618,7 +2625,7 @@ static int sketch_draw_stroke(bContext *C, wmOperator *op, wmEvent *event)
sk_draw_stroke(C, sketch, sketch->active_stroke, dd, snap);
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -2644,7 +2651,7 @@ static int sketch_draw_gesture(bContext *C, wmOperator *op, wmEvent *event)
sk_start_draw_gesture(sketch);
sk_draw_stroke(C, sketch, sketch->gesture, dd, snap);
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -2675,7 +2682,7 @@ static int sketch_draw_modal(bContext *C, wmOperator *op, wmEvent *event, short
retval = OPERATOR_CANCELLED;
break;
case LEFTMOUSE:
- if (event->val == 0)
+ if (event->val == KM_RELEASE)
{
if (gesture == 0)
{
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 76f56f67670..160f505c3f5 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -105,8 +105,9 @@ struct LaplacianSystem {
float *p; /* values from all p vectors */
float *mindist; /* minimum distance to a bone for all vertices */
- RayTree *raytree; /* ray tracing acceleration structure */
- MFace **vface; /* a face that the vertex belongs to */
+ RayObject *raytree; /* ray tracing acceleration structure */
+ RayFace *faces; /* faces to add to the ray tracing struture */
+ MFace **vface; /* a face that the vertex belongs to */
} heat;
#ifdef RIGID_DEFORM
@@ -176,9 +177,9 @@ static void laplacian_triangle_area(LaplacianSystem *sys, int i1, int i2, int i3
t2= cotan_weight(v2, v3, v1);
t3= cotan_weight(v3, v1, v2);
- if(VecAngle3(v2, v1, v3) > 90) obtuse= 1;
- else if(VecAngle3(v1, v2, v3) > 90) obtuse= 2;
- else if(VecAngle3(v1, v3, v2) > 90) obtuse= 3;
+ if(RAD2DEG(VecAngle3(v2, v1, v3)) > 90) obtuse= 1;
+ else if(RAD2DEG(VecAngle3(v1, v2, v3)) > 90) obtuse= 2;
+ else if(RAD2DEG(VecAngle3(v1, v3, v2)) > 90) obtuse= 3;
if (obtuse > 0) {
area= AreaT3Dfl(v1, v2, v3);
@@ -394,75 +395,41 @@ float laplacian_system_get_solution(int v)
#define DISTANCE_EPSILON 1e-4f
/* Raytracing for vertex to bone visibility */
-
-static LaplacianSystem *HeatSys = NULL;
-
-static void heat_ray_coords_func(RayFace *face, float **v1, float **v2, float **v3, float **v4)
-{
- MFace *mface= (MFace*)face;
- float (*verts)[3]= HeatSys->heat.verts;
-
- *v1= verts[mface->v1];
- *v2= verts[mface->v2];
- *v3= verts[mface->v3];
- *v4= (mface->v4)? verts[mface->v4]: NULL;
-}
-
-static int heat_ray_check_func(Isect *is, int ob, RayFace *face)
-{
- float *v1, *v2, *v3, *v4, nor[3];
-
- /* don't intersect if the ray faces along the face normal */
- heat_ray_coords_func(face, &v1, &v2, &v3, &v4);
-
- if(v4) CalcNormFloat4(v1, v2, v3, v4, nor);
- else CalcNormFloat(v1, v2, v3, nor);
-
- return (INPR(nor, is->vec) < 0);
-}
-
static void heat_ray_tree_create(LaplacianSystem *sys)
{
Mesh *me = sys->heat.mesh;
- RayTree *tree;
- MFace *mface;
- float min[3], max[3];
int a;
- /* create a raytrace tree from the mesh */
- INIT_MINMAX(min, max);
-
- for(a=0; a<me->totvert; a++)
- DO_MINMAX(sys->heat.verts[a], min, max);
+ sys->heat.raytree = RE_rayobject_vbvh_create(me->totface);
+ sys->heat.faces = MEM_callocN(sizeof(RayFace)*me->totface, "Heat RayFaces");
+ sys->heat.vface = MEM_callocN(sizeof(MFace*)*me->totvert, "HeatVFaces");
- tree= RE_ray_tree_create(64, me->totface, min, max,
- heat_ray_coords_func, heat_ray_check_func, NULL, NULL);
+ for(a=0; a<me->totface; a++) {
- sys->heat.vface= MEM_callocN(sizeof(MFace*)*me->totvert, "HeatVFaces");
-
- HeatSys= sys;
-
- for(a=0, mface=me->mface; a<me->totface; a++, mface++) {
- RE_ray_tree_add_face(tree, 0, mface);
-
+ MFace *mface = me->mface+a;
+ RayFace *rayface = sys->heat.faces+a;
+
+ RayObject *obj = RE_rayface_from_coords(
+ rayface, me, mface,
+ sys->heat.verts[mface->v1], sys->heat.verts[mface->v2],
+ sys->heat.verts[mface->v3], mface->v4 ? sys->heat.verts[mface->v4] : 0
+ );
+ RE_rayobject_add(sys->heat.raytree, obj);
+
+ //Setup inverse pointers to use on isect.orig
sys->heat.vface[mface->v1]= mface;
sys->heat.vface[mface->v2]= mface;
sys->heat.vface[mface->v3]= mface;
if(mface->v4) sys->heat.vface[mface->v4]= mface;
}
-
- HeatSys= NULL;
-
- RE_ray_tree_done(tree);
-
- sys->heat.raytree= tree;
+ RE_rayobject_done(sys->heat.raytree);
}
static int heat_ray_bone_visible(LaplacianSystem *sys, int vertex, int bone)
{
Isect isec;
MFace *mface;
- float dir[3];
+ float end[3];
int visible;
mface= sys->heat.vface[vertex];
@@ -473,22 +440,19 @@ static int heat_ray_bone_visible(LaplacianSystem *sys, int vertex, int bone)
memset(&isec, 0, sizeof(isec));
isec.mode= RE_RAY_SHADOW;
isec.lay= -1;
- isec.face_last= NULL;
- isec.faceorig= mface;
+ isec.orig.ob = sys->heat.mesh;
+ isec.orig.face = mface;
+ isec.skip = RE_SKIP_CULLFACE;
+
VECCOPY(isec.start, sys->heat.verts[vertex]);
- PclosestVL3Dfl(isec.end, isec.start,
- sys->heat.root[bone], sys->heat.tip[bone]);
+ PclosestVL3Dfl(end, isec.start, sys->heat.root[bone], sys->heat.tip[bone]);
- /* add an extra offset to the start position to avoid self intersection */
- VECSUB(dir, isec.end, isec.start);
- Normalize(dir);
- VecMulf(dir, 1e-5);
- VecAddf(isec.start, isec.start, dir);
-
- HeatSys= sys;
- visible= !RE_ray_tree_intersect(sys->heat.raytree, &isec);
- HeatSys= NULL;
+ VECSUB(isec.vec, end, isec.start);
+ isec.labda = 1.0f - 1e-5;
+ VECADDFAC( isec.start, isec.start, isec.vec, 1e-5);
+
+ visible= !RE_rayobject_raycast(sys->heat.raytree, &isec);
return visible;
}
@@ -752,8 +716,9 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numbones,
/* free */
if(vertsflipped) MEM_freeN(vertsflipped);
- RE_ray_tree_free(sys->heat.raytree);
+ RE_rayobject_free(sys->heat.raytree);
MEM_freeN(sys->heat.vface);
+ MEM_freeN(sys->heat.faces);
MEM_freeN(sys->heat.mindist);
MEM_freeN(sys->heat.H);
@@ -1049,7 +1014,7 @@ typedef struct MeshDeformBind {
int *varidx;
/* raytrace */
- RayTree *raytree;
+ RayObject *raytree;
} MeshDeformBind;
/* ray intersection */
@@ -1173,7 +1138,7 @@ static void meshdeform_ray_tree_free(MeshDeformBind *mdb)
static int meshdeform_intersect(MeshDeformBind *mdb, Isect *isec)
{
MFace *mface;
- float face[4][3], co[3], uvw[3], len, nor[3];
+ float face[4][3], co[3], uvw[3], len, nor[3], end[3];
int f, hit, is= 0, totface;
isec->labda= 1e10;
@@ -1181,6 +1146,8 @@ static int meshdeform_intersect(MeshDeformBind *mdb, Isect *isec)
mface= mdb->cagedm->getTessFaceArray(mdb->cagedm);
totface= mdb->cagedm->getNumTessFaces(mdb->cagedm);
+ VECADDFAC( end, isec->start, isec->vec, isec->labda );
+
for(f=0; f<totface; f++, mface++) {
VECCOPY(face[0], mdb->cagecos[mface->v1]);
VECCOPY(face[1], mdb->cagecos[mface->v2]);
@@ -1188,26 +1155,26 @@ static int meshdeform_intersect(MeshDeformBind *mdb, Isect *isec)
if(mface->v4) {
VECCOPY(face[3], mdb->cagecos[mface->v4]);
- hit= meshdeform_tri_intersect(isec->start, isec->end, face[0], face[1], face[2], co, uvw);
+ hit = meshdeform_tri_intersect(isec->start, end, face[0], face[1], face[2], co, uvw);
if(hit) {
CalcNormFloat(face[0], face[1], face[2], nor);
}
else {
- hit= meshdeform_tri_intersect(isec->start, isec->end, face[0], face[2], face[3], co, uvw);
+ hit= meshdeform_tri_intersect(isec->start, end, face[0], face[2], face[3], co, uvw);
CalcNormFloat(face[0], face[2], face[3], nor);
}
}
else {
- hit= meshdeform_tri_intersect(isec->start, isec->end, face[0], face[1], face[2], co, uvw);
+ hit= meshdeform_tri_intersect(isec->start, end, face[0], face[1], face[2], co, uvw);
CalcNormFloat(face[0], face[1], face[2], nor);
}
if(hit) {
- len= VecLenf(isec->start, co)/VecLenf(isec->start, isec->end);
+ len= VecLenf(isec->start, co)/VecLenf(isec->start, end);
if(len < isec->labda) {
isec->labda= len;
- isec->face= mface;
+ isec->hit.face = mface;
isec->isect= (INPR(isec->vec, nor) <= 0.0f);
is= 1;
}
@@ -1223,20 +1190,18 @@ static MDefBoundIsect *meshdeform_ray_tree_intersect(MeshDeformBind *mdb, float
Isect isec;
float (*cagecos)[3];
MFace *mface;
- float vert[4][3], len;
+ float vert[4][3], len, end[3];
static float epsilon[3]= {0, 0, 0}; //1e-4, 1e-4, 1e-4};
/* setup isec */
memset(&isec, 0, sizeof(isec));
isec.mode= RE_RAY_MIRROR; /* we want the closest intersection */
isec.lay= -1;
- isec.face_last= NULL;
- isec.faceorig= NULL;
isec.labda= 1e10f;
VECADD(isec.start, co1, epsilon);
- VECADD(isec.end, co2, epsilon);
- VECSUB(isec.vec, isec.end, isec.start);
+ VECADD(end, co2, epsilon);
+ VECSUB(isec.vec, end, isec.start);
#if 0
/*if(RE_ray_tree_intersect(mdb->raytree, &isec)) {*/
@@ -1244,7 +1209,7 @@ static MDefBoundIsect *meshdeform_ray_tree_intersect(MeshDeformBind *mdb, float
if(meshdeform_intersect(mdb, &isec)) {
len= isec.labda;
- mface= isec.face;
+ mface=(MFace*)isec.hit.face;
/* create MDefBoundIsect */
isect= BLI_memarena_alloc(mdb->memarena, sizeof(*isect));
diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c
new file mode 100644
index 00000000000..1e0df79d0e6
--- /dev/null
+++ b/source/blender/editors/armature/poseSlide.c
@@ -0,0 +1,936 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2009, Blender Foundation, Joshua Leung
+ * This is a new part of Blender
+ *
+ * Contributor(s): Joshua Leung
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <string.h>
+#include <math.h>
+#include <float.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_arithb.h"
+#include "BLI_blenlib.h"
+#include "BLI_dynstr.h"
+#include "BLI_dlrbTree.h"
+
+#include "DNA_listBase.h"
+#include "DNA_anim_types.h"
+#include "DNA_action_types.h"
+#include "DNA_armature_types.h"
+#include "DNA_curve_types.h"
+#include "DNA_object_types.h"
+#include "DNA_object_force.h"
+#include "DNA_scene_types.h"
+#include "DNA_userdef_types.h"
+
+#include "BKE_animsys.h"
+#include "BKE_action.h"
+#include "BKE_armature.h"
+#include "BKE_depsgraph.h"
+#include "BKE_fcurve.h"
+#include "BKE_object.h"
+
+#include "BKE_global.h"
+#include "BKE_context.h"
+#include "BKE_report.h"
+#include "BKE_utildefines.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+#include "RNA_types.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+
+#include "BIF_gl.h"
+
+#include "ED_anim_api.h"
+#include "ED_armature.h"
+#include "ED_keyframes_draw.h"
+#include "ED_keyframing.h"
+#include "ED_keyframes_edit.h"
+#include "ED_screen.h"
+
+#include "armature_intern.h"
+
+/* **************************************************** */
+/* == POSE 'SLIDING' TOOLS ==
+ *
+ * A) Push & Relax, Breakdowner
+ * These tools provide the animator with various capabilities
+ * for interactively controlling the spacing of poses, but also
+ * for 'pushing' and/or 'relaxing' extremes as they see fit.
+ *
+ * B) Pose Sculpting
+ * This is yet to be implemented, but the idea here is to use
+ * sculpting techniques to make it easier to pose rigs by allowing
+ * rigs to be manipulated using a familiar paint-based interface.
+ */
+/* **************************************************** */
+/* A) Push & Relax, Breakdowner */
+
+/* Temporary data shared between these operators */
+typedef struct tPoseSlideOp {
+ Scene *scene; /* current scene */
+ ARegion *ar; /* region that we're operating in (needed for */
+ Object *ob; /* active object that Pose Info comes from */
+ bArmature *arm; /* armature for pose */
+
+ ListBase pfLinks; /* links between posechannels and f-curves */
+ DLRBT_Tree keys; /* binary tree for quicker searching for keyframes (when applicable) */
+
+ KeyingSet *ks_loc; /* builtin KeyingSet for keyframing locations */
+ KeyingSet *ks_rot; /* builtin KeyingSet for keyframing rotations */
+ KeyingSet *ks_scale;/* builtin KeyingSet for keyframing scale */
+
+ int cframe; /* current frame number */
+ int prevFrame; /* frame before current frame (blend-from) */
+ int nextFrame; /* frame after current frame (blend-to) */
+
+ int mode; /* sliding mode (ePoseSlide_Modes) */
+ int flag; // unused for now, but can later get used for storing runtime settings....
+
+ float percentage; /* 0-1 value for determining the influence of whatever is relevant */
+} tPoseSlideOp;
+
+/* Pose Sliding Modes */
+typedef enum ePoseSlide_Modes {
+ POSESLIDE_PUSH = 0, /* exaggerate the pose... */
+ POSESLIDE_RELAX, /* soften the pose... */
+ POSESLIDE_BREAKDOWN, /* slide between the endpoint poses, finding a 'soft' spot */
+} ePoseSlide_Modes;
+
+/* Temporary data linking PoseChannels with the F-Curves they affect */
+typedef struct tPChanFCurveLink {
+ struct tPChanFCurveLink *next, *prev;
+
+ ListBase fcurves; /* F-Curves for this PoseChannel */
+ bPoseChannel *pchan; /* Pose Channel which data is attached to */
+
+ char *pchan_path; /* RNA Path to this Pose Channel (needs to be freed when we're done) */
+
+ float oldloc[3]; /* transform values at start of operator (to be restored before each modal step) */
+ float oldrot[3];
+ float oldscale[3];
+ float oldquat[4];
+} tPChanFCurveLink;
+
+/* ------------------------------------ */
+
+/* operator init */
+static int pose_slide_init (bContext *C, wmOperator *op, short mode)
+{
+ tPoseSlideOp *pso;
+ bAction *act= NULL;
+
+ /* init slide-op data */
+ pso= op->customdata= MEM_callocN(sizeof(tPoseSlideOp), "tPoseSlideOp");
+
+ /* get info from context */
+ pso->scene= CTX_data_scene(C);
+ pso->ob= CTX_data_active_object(C);
+ pso->arm= (pso->ob)? pso->ob->data : NULL;
+ pso->ar= CTX_wm_region(C); /* only really needed when doing modal() */
+
+ pso->cframe= pso->scene->r.cfra;
+ pso->mode= mode;
+
+ /* set range info from property values - these may get overridden for the invoke() */
+ pso->percentage= RNA_float_get(op->ptr, "percentage");
+ pso->prevFrame= RNA_int_get(op->ptr, "prev_frame");
+ pso->nextFrame= RNA_int_get(op->ptr, "next_frame");
+
+ /* check the settings from the context */
+ if (ELEM4(NULL, pso->ob, pso->arm, pso->ob->adt, pso->ob->adt->action))
+ return 0;
+ else
+ act= pso->ob->adt->action;
+
+ /* for each Pose-Channel which gets affected, get the F-Curves for that channel
+ * and set the relevant transform flags...
+ */
+ CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans)
+ {
+ ListBase curves = {NULL, NULL};
+ int transFlags = action_get_item_transforms(act, pso->ob, pchan, &curves);
+
+ pchan->flag &= ~(POSE_LOC|POSE_ROT|POSE_SIZE);
+
+ /* check if any transforms found... */
+ if (transFlags) {
+ /* make new linkage data */
+ tPChanFCurveLink *pfl= MEM_callocN(sizeof(tPChanFCurveLink), "tPChanFCurveLink");
+ PointerRNA ptr;
+
+ pfl->fcurves= curves;
+ pfl->pchan= pchan;
+
+ /* get the RNA path to this pchan - this needs to be freed! */
+ RNA_pointer_create((ID *)pso->ob, &RNA_PoseChannel, pchan, &ptr);
+ pfl->pchan_path= RNA_path_from_ID_to_struct(&ptr);
+
+ /* add linkage data to operator data */
+ BLI_addtail(&pso->pfLinks, pfl);
+
+ /* set pchan's transform flags */
+ if (transFlags & ACT_TRANS_LOC)
+ pchan->flag |= POSE_LOC;
+ if (transFlags & ACT_TRANS_ROT)
+ pchan->flag |= POSE_ROT;
+ if (transFlags & ACT_TRANS_SCALE)
+ pchan->flag |= POSE_SIZE;
+
+ /* store current transforms */
+ VECCOPY(pfl->oldloc, pchan->loc);
+ VECCOPY(pfl->oldrot, pchan->eul);
+ VECCOPY(pfl->oldscale, pchan->size);
+ QUATCOPY(pfl->oldquat, pchan->quat);
+ }
+ }
+ CTX_DATA_END;
+
+ /* set depsgraph flags */
+ /* make sure the lock is set OK, unlock can be accidentally saved? */
+ pso->ob->pose->flag |= POSE_LOCKED;
+ pso->ob->pose->flag &= ~POSE_DO_UNLOCK;
+
+ /* do basic initialise of RB-BST used for finding keyframes, but leave the filling of it up
+ * to the caller of this (usually only invoke() will do it, to make things more efficient).
+ */
+ BLI_dlrbTree_init(&pso->keys);
+
+ /* get builtin KeyingSets */
+ pso->ks_loc= ANIM_builtin_keyingset_get_named(NULL, "Location");
+ pso->ks_rot= ANIM_builtin_keyingset_get_named(NULL, "Rotation");
+ pso->ks_scale= ANIM_builtin_keyingset_get_named(NULL, "Scaling");
+
+ /* return status is whether we've got all the data we were requested to get */
+ return 1;
+}
+
+/* exiting the operator - free data */
+static void pose_slide_exit (bContext *C, wmOperator *op)
+{
+ tPoseSlideOp *pso= op->customdata;
+
+ /* if data exists, clear its data and exit */
+ if (pso) {
+ tPChanFCurveLink *pfl, *pfln=NULL;
+
+ /* free the temp pchan links and their data */
+ for (pfl= pso->pfLinks.first; pfl; pfl= pfln) {
+ pfln= pfl->next;
+
+ /* free list of F-Curve reference links */
+ BLI_freelistN(&pfl->fcurves);
+
+ /* free pchan RNA Path */
+ MEM_freeN(pfl->pchan_path);
+
+ /* free link itself */
+ BLI_freelinkN(&pso->pfLinks, pfl);
+ }
+
+ /* free RB-BST for keyframes (if it contained data) */
+ BLI_dlrbTree_free(&pso->keys);
+
+ /* free data itself */
+ MEM_freeN(pso);
+ }
+
+ /* cleanup */
+ op->customdata= NULL;
+}
+
+/* ------------------------------------ */
+
+/* helper for apply() / reset() - refresh the data */
+static void pose_slide_refresh (bContext *C, tPoseSlideOp *pso)
+{
+ /* old optimize trick... this enforces to bypass the depgraph
+ * - note: code copied from transform_generics.c -> recalcData()
+ */
+ // FIXME: shouldn't this use the builtin stuff?
+ if ((pso->arm->flag & ARM_DELAYDEFORM)==0)
+ DAG_id_flush_update(&pso->ob->id, OB_RECALC_DATA); /* sets recalc flags */
+ else
+ where_is_pose(pso->scene, pso->ob);
+
+ /* note, notifier might evolve */
+ WM_event_add_notifier(C, NC_OBJECT|ND_POSE, pso->ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+}
+
+/* helper for apply() callabcks - find the next F-Curve with matching path... */
+static LinkData *find_next_fcurve_link (ListBase *fcuLinks, LinkData *prev, char *path)
+{
+ LinkData *first= (prev)? prev->next : (fcuLinks)? fcuLinks->first : NULL;
+ LinkData *ld;
+
+ /* check each link to see if the linked F-Curve has a matching path */
+ for (ld= first; ld; ld= ld->next) {
+ FCurve *fcu= (FCurve *)ld->data;
+
+ /* check if paths match */
+ if (strcmp(path, fcu->rna_path) == 0)
+ return ld;
+ }
+
+ /* none found */
+ return NULL;
+}
+
+/* helper for apply() - perform sliding for some 3-element vector */
+static void pose_slide_apply_vec3 (tPoseSlideOp *pso, tPChanFCurveLink *pfl, float vec[3], char *propName)
+{
+ LinkData *ld=NULL;
+ char *path=NULL;
+ float cframe;
+
+ /* get the path to use... */
+ path= BLI_sprintfN("%s.%s", pfl->pchan_path, propName);
+
+ /* get the current frame number */
+ cframe= (float)pso->cframe;
+
+ /* using this path, find each matching F-Curve for the variables we're interested in */
+ while ( (ld= find_next_fcurve_link(&pfl->fcurves, ld, path)) ) {
+ FCurve *fcu= (FCurve *)ld->data;
+ float sVal, eVal;
+ float w1, w2;
+ int ch;
+
+ /* get keyframe values for endpoint poses to blend with */
+ /* previous/start */
+ sVal= evaluate_fcurve(fcu, (float)pso->prevFrame);
+ /* next/end */
+ eVal= evaluate_fcurve(fcu, (float)pso->nextFrame);
+
+ /* get channel index */
+ ch= fcu->array_index;
+
+ /* calculate the relative weights of the endpoints */
+ if (pso->mode == POSESLIDE_BREAKDOWN) {
+ /* get weights from the percentage control */
+ w1= pso->percentage; /* this must come second */
+ w2= 1.0f - w1; /* this must come first */
+ }
+ else {
+ /* - these weights are derived from the relative distance of these
+ * poses from the current frame
+ * - they then get normalised so that they only sum up to 1
+ */
+ float wtot;
+
+ w1 = cframe - (float)pso->prevFrame;
+ w2 = (float)pso->nextFrame - cframe;
+
+ wtot = w1 + w2;
+ w1 = (w1/wtot);
+ w2 = (w2/wtot);
+ }
+
+ /* depending on the mode, calculate the new value
+ * - in all of these, the start+end values are multiplied by w2 and w1 (respectively),
+ * since multiplication in another order would decrease the value the current frame is closer to
+ */
+ switch (pso->mode) {
+ case POSESLIDE_PUSH: /* make the current pose more pronounced */
+ {
+ /* perform a weighted average here, favouring the middle pose
+ * - numerator should be larger than denominator to 'expand' the result
+ * - perform this weighting a number of times given by the percentage...
+ */
+ int iters= (int)ceil(10.0f*pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed
+
+ while (iters-- > 0) {
+ vec[ch]= ( -((sVal * w2) + (eVal * w1)) + (vec[ch] * 6.0f) ) / 5.0f;
+ }
+ }
+ break;
+
+ case POSESLIDE_RELAX: /* make the current pose more like its surrounding ones */
+ {
+ /* perform a weighted average here, favouring the middle pose
+ * - numerator should be smaller than denominator to 'relax' the result
+ * - perform this weighting a number of times given by the percentage...
+ */
+ int iters= (int)ceil(10.0f*pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed
+
+ while (iters-- > 0) {
+ vec[ch]= ( ((sVal * w2) + (eVal * w1)) + (vec[ch] * 5.0f) ) / 6.0f;
+ }
+ }
+ break;
+
+ case POSESLIDE_BREAKDOWN: /* make the current pose slide around between the endpoints */
+ {
+ /* perform simple linear interpolation - coefficient for start must come from pso->percentage... */
+ // TODO: make this use some kind of spline interpolation instead?
+ vec[ch]= ((sVal * w2) + (eVal * w1));
+ }
+ break;
+ }
+
+ }
+
+ /* free the temp path we got */
+ MEM_freeN(path);
+}
+
+/* helper for apply() - perform sliding for quaternion rotations (using quat blending) */
+static void pose_slide_apply_quat (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
+{
+ FCurve *fcu_w=NULL, *fcu_x=NULL, *fcu_y=NULL, *fcu_z=NULL;
+ bPoseChannel *pchan= pfl->pchan;
+ LinkData *ld=NULL;
+ char *path=NULL;
+ float cframe;
+
+ /* get the path to use - this should be quaternion rotations only (needs care) */
+ path= BLI_sprintfN("%s.%s", pfl->pchan_path, "rotation");
+
+ /* get the current frame number */
+ cframe= (float)pso->cframe;
+
+ /* using this path, find each matching F-Curve for the variables we're interested in */
+ while ( (ld= find_next_fcurve_link(&pfl->fcurves, ld, path)) ) {
+ FCurve *fcu= (FCurve *)ld->data;
+
+ /* assign this F-Curve to one of the relevant pointers... */
+ switch (fcu->array_index) {
+ case 3: /* z */
+ fcu_z= fcu;
+ break;
+ case 2: /* y */
+ fcu_y= fcu;
+ break;
+ case 1: /* x */
+ fcu_x= fcu;
+ break;
+ case 0: /* w */
+ fcu_w= fcu;
+ break;
+ }
+ }
+
+ /* only if all channels exist, proceed */
+ if (fcu_w && fcu_x && fcu_y && fcu_z) {
+ float quat_prev[4], quat_next[4];
+
+ /* get 2 quats */
+ quat_prev[0] = evaluate_fcurve(fcu_w, pso->prevFrame);
+ quat_prev[1] = evaluate_fcurve(fcu_x, pso->prevFrame);
+ quat_prev[2] = evaluate_fcurve(fcu_y, pso->prevFrame);
+ quat_prev[3] = evaluate_fcurve(fcu_z, pso->prevFrame);
+
+ quat_next[0] = evaluate_fcurve(fcu_w, pso->nextFrame);
+ quat_next[1] = evaluate_fcurve(fcu_x, pso->nextFrame);
+ quat_next[2] = evaluate_fcurve(fcu_y, pso->nextFrame);
+ quat_next[3] = evaluate_fcurve(fcu_z, pso->nextFrame);
+
+ /* perform blending */
+ if (pso->mode == POSESLIDE_BREAKDOWN) {
+ /* just perform the interpol between quat_prev and quat_next using pso->percentage as a guide */
+ QuatInterpol(pchan->quat, quat_prev, quat_next, pso->percentage);
+ }
+ else {
+ float quat_interp[4], quat_orig[4];
+ int iters= (int)ceil(10.0f*pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed
+
+ /* perform this blending several times until a satisfactory result is reached */
+ while (iters-- > 0) {
+ /* calculate the interpolation between the endpoints */
+ QuatInterpol(quat_interp, quat_prev, quat_next, (cframe-pso->prevFrame) / (pso->nextFrame-pso->prevFrame) );
+
+ /* make a copy of the original rotation */
+ QUATCOPY(quat_orig, pchan->quat);
+
+ /* tricky interpolations - mode-dependent blending between original and new */
+ if (pso->mode == POSESLIDE_RELAX) // xxx this was the original code, so should work fine
+ QuatInterpol(pchan->quat, quat_orig, quat_interp, 1.0f/6.0f);
+ else // I'm just guessing here...
+ QuatInterpol(pchan->quat, quat_orig, quat_interp, 6.0f/5.0f);
+ }
+ }
+ }
+
+ /* free the path now */
+ MEM_freeN(path);
+}
+
+/* apply() - perform the pose sliding based on weighting various poses */
+static void pose_slide_apply (bContext *C, wmOperator *op, tPoseSlideOp *pso)
+{
+ tPChanFCurveLink *pfl;
+
+ /* sanitise the frame ranges */
+ if (pso->prevFrame == pso->nextFrame) {
+ /* move out one step either side */
+ pso->prevFrame--;
+ pso->nextFrame++;
+ }
+
+ /* for each link, handle each set of transforms */
+ for (pfl= pso->pfLinks.first; pfl; pfl= pfl->next) {
+ /* valid transforms for each PoseChannel should have been noted already
+ * - sliding the pose should be a straightforward exercise for location+rotation,
+ * but rotations get more complicated since we may want to use quaternion blending
+ * for quaternions instead...
+ */
+ bPoseChannel *pchan= pfl->pchan;
+
+ if (pchan->flag & POSE_LOC) {
+ /* calculate these for the 'location' vector, and use location curves */
+ pose_slide_apply_vec3(pso, pfl, pchan->loc, "location");
+ }
+
+ if (pchan->flag & POSE_SIZE) {
+ /* calculate these for the 'scale' vector, and use scale curves */
+ pose_slide_apply_vec3(pso, pfl, pchan->size, "scale");
+ }
+
+ if (pchan->flag & POSE_ROT) {
+ /* everything depends on the rotation mode */
+ if (pchan->rotmode > 0) {
+ /* eulers - so calculate these for the 'eul' vector, and use euler_rotation curves */
+ pose_slide_apply_vec3(pso, pfl, pchan->eul, "rotation_euler");
+ }
+ else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
+ // TODO: need to figure out how to do this!
+ }
+ else {
+ /* quaternions - use quaternion blending */
+ pose_slide_apply_quat(pso, pfl);
+ }
+ }
+ }
+
+ /* depsgraph updates + redraws */
+ pose_slide_refresh(C, pso);
+}
+
+/* perform autokeyframing after changes were made + confirmed */
+static void pose_slide_autoKeyframe (bContext *C, tPoseSlideOp *pso)
+{
+ /* insert keyframes as necessary if autokeyframing */
+ if (autokeyframe_cfra_can_key(pso->scene, &pso->ob->id)) {
+ bCommonKeySrc cks;
+ ListBase dsources = {&cks, &cks};
+ tPChanFCurveLink *pfl;
+
+ /* init common-key-source for use by KeyingSets */
+ memset(&cks, 0, sizeof(bCommonKeySrc));
+ cks.id= &pso->ob->id;
+
+ /* iterate over each pose-channel affected, applying the changes */
+ for (pfl= pso->pfLinks.first; pfl; pfl= pfl->next) {
+ bPoseChannel *pchan= pfl->pchan;
+ /* init cks for this PoseChannel, then use the relative KeyingSets to keyframe it */
+ cks.pchan= pchan;
+
+ /* insert keyframes */
+ if (pchan->flag & POSE_LOC)
+ modify_keyframes(pso->scene, &dsources, NULL, pso->ks_loc, MODIFYKEY_MODE_INSERT, (float)pso->cframe);
+ if (pchan->flag & POSE_ROT)
+ modify_keyframes(pso->scene, &dsources, NULL, pso->ks_rot, MODIFYKEY_MODE_INSERT, (float)pso->cframe);
+ if (pchan->flag & POSE_SIZE)
+ modify_keyframes(pso->scene, &dsources, NULL, pso->ks_scale, MODIFYKEY_MODE_INSERT, (float)pso->cframe);
+ }
+ }
+}
+
+/* reset changes made to current pose */
+static void pose_slide_reset (bContext *C, tPoseSlideOp *pso)
+{
+ tPChanFCurveLink *pfl;
+
+ /* iterate over each pose-channel affected, restoring all channels to their original values */
+ for (pfl= pso->pfLinks.first; pfl; pfl= pfl->next) {
+ bPoseChannel *pchan= pfl->pchan;
+
+ /* just copy all the values over regardless of whether they changed or not */
+ VECCOPY(pchan->loc, pfl->oldloc);
+ VECCOPY(pchan->eul, pfl->oldrot);
+ VECCOPY(pchan->size, pfl->oldscale);
+ QUATCOPY(pchan->quat, pfl->oldquat);
+ }
+}
+
+/* ------------------------------------ */
+
+/* common code for invoke() methods */
+static int pose_slide_invoke_common (bContext *C, wmOperator *op, tPoseSlideOp *pso)
+{
+ tPChanFCurveLink *pfl;
+ AnimData *adt= pso->ob->adt;
+ wmWindow *win= CTX_wm_window(C);
+
+ /* for each link, add all its keyframes to the search tree */
+ for (pfl= pso->pfLinks.first; pfl; pfl= pfl->next) {
+ LinkData *ld;
+
+ /* do this for each F-Curve */
+ for (ld= pfl->fcurves.first; ld; ld= ld->next) {
+ FCurve *fcu= (FCurve *)ld->data;
+ fcurve_to_keylist(adt, fcu, &pso->keys, NULL);
+ }
+ }
+
+ /* consolidate these keyframes, and figure out the nearest ones */
+ BLI_dlrbTree_linkedlist_sync(&pso->keys);
+
+ /* cancel if no keyframes found... */
+ if (pso->keys.root) {
+ ActKeyColumn *ak;
+
+ /* firstly, check if the current frame is a keyframe... */
+ ak= cfra_find_actkeycolumn(pso->keys.root, pso->cframe);
+
+ if (ak == NULL) {
+ /* current frame is not a keyframe, so search */
+ ActKeyColumn *pk= cfra_find_nearest_next_ak(pso->keys.root, pso->cframe, 0);
+ ActKeyColumn *nk= cfra_find_nearest_next_ak(pso->keys.root, pso->cframe, 1);
+
+ /* check if we found good keyframes */
+ if ((pk == nk) && (pk != NULL)) {
+ if (pk->cfra < pso->cframe)
+ nk= nk->next;
+ else if (nk->cfra > pso->cframe)
+ pk= pk->prev;
+ }
+
+ /* new set the frames */
+ /* prev frame */
+ pso->prevFrame= (pk)? (pk->cfra) : (pso->cframe - 1);
+ RNA_int_set(op->ptr, "prev_frame", pso->prevFrame);
+ /* next frame */
+ pso->nextFrame= (nk)? (nk->cfra) : (pso->cframe + 1);
+ RNA_int_set(op->ptr, "next_frame", pso->nextFrame);
+ }
+ else {
+ /* current frame itself is a keyframe, so just take keyframes on either side */
+ /* prev frame */
+ pso->prevFrame= (ak->prev)? (ak->prev->cfra) : (pso->cframe - 1);
+ RNA_int_set(op->ptr, "prev_frame", pso->prevFrame);
+ /* next frame */
+ pso->nextFrame= (ak->next)? (ak->next->cfra) : (pso->cframe + 1);
+ RNA_int_set(op->ptr, "next_frame", pso->nextFrame);
+ }
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR, "No keyframes to slide between.");
+ return OPERATOR_CANCELLED;
+ }
+
+ /* initial apply for operator... */
+ // TODO: need to calculate percentage for initial round too...
+ pose_slide_apply(C, op, pso);
+
+ /* depsgraph updates + redraws */
+ pose_slide_refresh(C, pso);
+
+ /* set cursor to indicate modal */
+ WM_cursor_modal(win, BC_EW_SCROLLCURSOR);
+
+ /* add a modal handler for this operator */
+ WM_event_add_modal_handler(C, op);
+ return OPERATOR_RUNNING_MODAL;
+}
+
+/* common code for modal() */
+static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
+{
+ tPoseSlideOp *pso= op->customdata;
+ wmWindow *win= CTX_wm_window(C);
+
+ switch (evt->type) {
+ case LEFTMOUSE: /* confirm */
+ {
+ /* return to normal cursor */
+ WM_cursor_restore(win);
+
+ /* insert keyframes as required... */
+ pose_slide_autoKeyframe(C, pso);
+ pose_slide_exit(C, op);
+
+ /* done! */
+ return OPERATOR_FINISHED;
+ }
+
+ case ESCKEY: /* cancel */
+ case RIGHTMOUSE:
+ {
+ /* return to normal cursor */
+ WM_cursor_restore(win);
+
+ /* reset transforms back to original state */
+ pose_slide_reset(C, pso);
+
+ /* depsgraph updates + redraws */
+ pose_slide_refresh(C, pso);
+
+ /* clean up temp data */
+ pose_slide_exit(C, op);
+
+ /* cancelled! */
+ return OPERATOR_CANCELLED;
+ }
+
+ case MOUSEMOVE: /* calculate new position */
+ {
+ /* calculate percentage based on position of mouse (we only use x-axis for now.
+ * since this is more conveninent for users to do), and store new percentage value
+ */
+ pso->percentage= (evt->x - pso->ar->winrct.xmin) / ((float)pso->ar->winx);
+ RNA_float_set(op->ptr, "percentage", pso->percentage);
+
+ /* reset transforms (to avoid accumulation errors) */
+ pose_slide_reset(C, pso);
+
+ /* apply... */
+ pose_slide_apply(C, op, pso);
+ }
+ break;
+
+ default: /* unhandled event (maybe it was some view manip? */
+ /* allow to pass through */
+ return OPERATOR_RUNNING_MODAL|OPERATOR_PASS_THROUGH;
+ }
+
+ /* still running... */
+ return OPERATOR_RUNNING_MODAL;
+}
+
+/* common code for cancel() */
+static int pose_slide_cancel (bContext *C, wmOperator *op)
+{
+ /* cleanup and done */
+ pose_slide_exit(C, op);
+ return OPERATOR_CANCELLED;
+}
+
+/* common code for exec() methods */
+static int pose_slide_exec_common (bContext *C, wmOperator *op, tPoseSlideOp *pso)
+{
+ /* settings should have been set up ok for applying, so just apply! */
+ pose_slide_apply(C, op, pso);
+
+ /* insert keyframes if needed */
+ pose_slide_autoKeyframe(C, pso);
+
+ /* cleanup and done */
+ pose_slide_exit(C, op);
+
+ return OPERATOR_FINISHED;
+}
+
+/* common code for defining RNA properties */
+static void pose_slide_opdef_properties (wmOperatorType *ot)
+{
+ RNA_def_int(ot->srna, "prev_frame", 0, MINAFRAME, MAXFRAME, "Previous Keyframe", "Frame number of keyframe immediately before the current frame.", 0, 50);
+ RNA_def_int(ot->srna, "next_frame", 0, MINAFRAME, MAXFRAME, "Next Keyframe", "Frame number of keyframe immediately after the current frame.", 0, 50);
+ RNA_def_float_percentage(ot->srna, "percentage", 0.5f, 0.0f, 1.0f, "Percentage", "Weighting factor for the sliding operation", 0.3, 0.7);
+}
+
+/* ------------------------------------ */
+
+/* invoke() - for 'push' mode */
+static int pose_slide_push_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+{
+ tPoseSlideOp *pso;
+
+ /* initialise data */
+ if (pose_slide_init(C, op, POSESLIDE_PUSH) == 0) {
+ pose_slide_exit(C, op);
+ return OPERATOR_CANCELLED;
+ }
+ else
+ pso= op->customdata;
+
+ /* do common setup work */
+ return pose_slide_invoke_common(C, op, pso);
+}
+
+/* exec() - for push */
+static int pose_slide_push_exec (bContext *C, wmOperator *op)
+{
+ tPoseSlideOp *pso;
+
+ /* initialise data (from RNA-props) */
+ if (pose_slide_init(C, op, POSESLIDE_PUSH) == 0) {
+ pose_slide_exit(C, op);
+ return OPERATOR_CANCELLED;
+ }
+ else
+ pso= op->customdata;
+
+ /* do common exec work */
+ return pose_slide_exec_common(C, op, pso);
+}
+
+void POSE_OT_push (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Push Pose";
+ ot->idname= "POSE_OT_push";
+ ot->description= "Exaggerate the current pose";
+
+ /* callbacks */
+ ot->exec= pose_slide_push_exec;
+ ot->invoke= pose_slide_push_invoke;
+ ot->modal= pose_slide_modal;
+ ot->cancel= pose_slide_cancel;
+ ot->poll= ED_operator_posemode;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+
+ /* Properties */
+ pose_slide_opdef_properties(ot);
+}
+
+/* ........................ */
+
+/* invoke() - for 'relax' mode */
+static int pose_slide_relax_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+{
+ tPoseSlideOp *pso;
+
+ /* initialise data */
+ if (pose_slide_init(C, op, POSESLIDE_RELAX) == 0) {
+ pose_slide_exit(C, op);
+ return OPERATOR_CANCELLED;
+ }
+ else
+ pso= op->customdata;
+
+ /* do common setup work */
+ return pose_slide_invoke_common(C, op, pso);
+}
+
+/* exec() - for relax */
+static int pose_slide_relax_exec (bContext *C, wmOperator *op)
+{
+ tPoseSlideOp *pso;
+
+ /* initialise data (from RNA-props) */
+ if (pose_slide_init(C, op, POSESLIDE_RELAX) == 0) {
+ pose_slide_exit(C, op);
+ return OPERATOR_CANCELLED;
+ }
+ else
+ pso= op->customdata;
+
+ /* do common exec work */
+ return pose_slide_exec_common(C, op, pso);
+}
+
+void POSE_OT_relax (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Relax Pose";
+ ot->idname= "POSE_OT_relax";
+ ot->description= "Make the current pose more similar to its surrounding ones.";
+
+ /* callbacks */
+ ot->exec= pose_slide_relax_exec;
+ ot->invoke= pose_slide_relax_invoke;
+ ot->modal= pose_slide_modal;
+ ot->cancel= pose_slide_cancel;
+ ot->poll= ED_operator_posemode;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+
+ /* Properties */
+ pose_slide_opdef_properties(ot);
+}
+
+/* ........................ */
+
+/* invoke() - for 'breakdown' mode */
+static int pose_slide_breakdown_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+{
+ tPoseSlideOp *pso;
+
+ /* initialise data */
+ if (pose_slide_init(C, op, POSESLIDE_BREAKDOWN) == 0) {
+ pose_slide_exit(C, op);
+ return OPERATOR_CANCELLED;
+ }
+ else
+ pso= op->customdata;
+
+ /* do common setup work */
+ return pose_slide_invoke_common(C, op, pso);
+}
+
+/* exec() - for breakdown */
+static int pose_slide_breakdown_exec (bContext *C, wmOperator *op)
+{
+ tPoseSlideOp *pso;
+
+ /* initialise data (from RNA-props) */
+ if (pose_slide_init(C, op, POSESLIDE_BREAKDOWN) == 0) {
+ pose_slide_exit(C, op);
+ return OPERATOR_CANCELLED;
+ }
+ else
+ pso= op->customdata;
+
+ /* do common exec work */
+ return pose_slide_exec_common(C, op, pso);
+}
+
+void POSE_OT_breakdown (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Pose Breakdowner";
+ ot->idname= "POSE_OT_breakdown";
+ ot->description= "Create a suitable breakdown pose on the current frame.";
+
+ /* callbacks */
+ ot->exec= pose_slide_breakdown_exec;
+ ot->invoke= pose_slide_breakdown_invoke;
+ ot->modal= pose_slide_modal;
+ ot->cancel= pose_slide_cancel;
+ ot->poll= ED_operator_posemode;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+
+ /* Properties */
+ pose_slide_opdef_properties(ot);
+}
+
+/* **************************************************** */
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index c332a297e57..f67c94eebc3 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -44,7 +44,6 @@
#include "DNA_action_types.h"
#include "DNA_armature_types.h"
#include "DNA_curve_types.h"
-#include "DNA_ipo_types.h"
#include "DNA_object_types.h"
#include "DNA_object_force.h"
#include "DNA_scene_types.h"
@@ -62,8 +61,6 @@
#include "BKE_report.h"
#include "BKE_utildefines.h"
-#include "PIL_time.h" /* sleep */
-
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
@@ -288,6 +285,9 @@ static void poselib_add_menu_invoke__replacemenu (bContext *C, uiLayout *layout,
bAction *act= ob->poselib;
TimeMarker *marker;
+ /* set the operator execution context correctly */
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
+
/* add each marker to this menu */
for (marker= act->markers.first; marker; marker= marker->next)
uiItemIntO(layout, marker->name, ICON_ARMATURE_DATA, "POSELIB_OT_pose_add", "frame", marker->frame);
@@ -332,6 +332,7 @@ static int poselib_add_menu_invoke (bContext *C, wmOperator *op, wmEvent *evt)
static int poselib_add_exec (bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
bAction *act = poselib_validate(ob);
bArmature *arm= (ob) ? ob->data : NULL;
@@ -388,7 +389,7 @@ static int poselib_add_exec (bContext *C, wmOperator *op)
/* KeyingSet to use depends on rotation mode (but that's handled by the templates code) */
if (poselib_ks_locrotscale == NULL)
poselib_ks_locrotscale= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale");
- modify_keyframes(C, &dsources, act, poselib_ks_locrotscale, MODIFYKEY_MODE_INSERT, (float)frame);
+ modify_keyframes(scene, &dsources, act, poselib_ks_locrotscale, MODIFYKEY_MODE_INSERT, (float)frame);
}
}
}
@@ -400,7 +401,6 @@ static int poselib_add_exec (bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-
void POSELIB_OT_pose_add (wmOperatorType *ot)
{
/* identifiers */
@@ -423,35 +423,33 @@ void POSELIB_OT_pose_add (wmOperatorType *ot)
/* ----- */
-static int poselib_stored_pose_menu_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+static EnumPropertyItem *poselib_stored_pose_itemf(bContext *C, PointerRNA *ptr, int *free)
{
Object *ob= CTX_data_active_object(C);
bAction *act= (ob) ? ob->poselib : NULL;
TimeMarker *marker;
- uiPopupMenu *pup;
- uiLayout *layout;
- int i;
-
- /* sanity check */
- if (ELEM(NULL, ob, act))
- return OPERATOR_CANCELLED;
-
- /* start building */
- pup= uiPupMenuBegin(C, op->type->name, 0);
- layout= uiPupMenuLayout(pup);
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
-
- /* add each marker to this menu */
- for (marker=act->markers.first, i=0; marker; marker= marker->next, i++)
- uiItemIntO(layout, marker->name, ICON_ARMATURE_DATA, op->idname, "index", i);
-
- uiPupMenuEnd(C, pup);
-
- /* this operator is only for a menu, not used further */
- return OPERATOR_CANCELLED;
-}
+ EnumPropertyItem *item= NULL, item_tmp;
+ int totitem= 0;
+ int i= 0;
+
+ memset(&item_tmp, 0, sizeof(item_tmp));
+
+ /* check that the action exists */
+ if (act) {
+ /* add each marker to the list */
+ for (marker=act->markers.first, i=0; marker; marker= marker->next, i++) {
+ item_tmp.identifier= item_tmp.name= marker->name;
+ item_tmp.icon= ICON_ARMATURE_DATA;
+ item_tmp.value= i;
+ RNA_enum_item_add(&item, &totitem, &item_tmp);
+ }
+ }
+ RNA_enum_item_end(&item, &totitem);
+ *free= 1;
+ return item;
+}
static int poselib_remove_exec (bContext *C, wmOperator *op)
{
@@ -467,9 +465,10 @@ static int poselib_remove_exec (bContext *C, wmOperator *op)
}
/* get index (and pointer) of pose to remove */
- marker= BLI_findlink(&act->markers, RNA_int_get(op->ptr, "index"));
+ marker= BLI_findlink(&act->markers, RNA_int_get(op->ptr, "pose"));
if (marker == NULL) {
BKE_report(op->reports, RPT_ERROR, "Invalid index for Pose");
+ return OPERATOR_CANCELLED;
}
/* remove relevant keyframes */
@@ -500,13 +499,18 @@ static int poselib_remove_exec (bContext *C, wmOperator *op)
void POSELIB_OT_pose_remove (wmOperatorType *ot)
{
+ PropertyRNA *prop;
+ static EnumPropertyItem prop_poses_dummy_types[] = {
+ {0, NULL, 0, NULL, NULL}
+ };
+
/* identifiers */
ot->name= "PoseLib Remove Pose";
ot->idname= "POSELIB_OT_pose_remove";
ot->description= "Remove nth pose from the active Pose Library";
/* api callbacks */
- ot->invoke= poselib_stored_pose_menu_invoke;
+ ot->invoke= WM_menu_invoke;
ot->exec= poselib_remove_exec;
ot->poll= ED_operator_posemode;
@@ -514,10 +518,37 @@ void POSELIB_OT_pose_remove (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "The index of the pose to remove", 0, INT_MAX);
+ prop= RNA_def_enum(ot->srna, "pose", prop_poses_dummy_types, 0, "Pose", "The pose to remove");
+ RNA_def_enum_funcs(prop, poselib_stored_pose_itemf);
}
-
+static int poselib_rename_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+{
+ Object *ob= CTX_data_active_object(C);
+ bAction *act= (ob) ? ob->poselib : NULL;
+ TimeMarker *marker;
+
+ /* check if valid poselib */
+ if (act == NULL) {
+ BKE_report(op->reports, RPT_ERROR, "Object doesn't have PoseLib data");
+ return OPERATOR_CANCELLED;
+ }
+
+ /* get index (and pointer) of pose to remove */
+ marker= BLI_findlink(&act->markers, act->active_marker-1);
+ if (marker == NULL) {
+ BKE_report(op->reports, RPT_ERROR, "Invalid index for Pose");
+ return OPERATOR_CANCELLED;
+ }
+ else {
+ /* use the existing name of the marker as the name, and use the active marker as the one to rename */
+ RNA_enum_set(op->ptr, "pose", act->active_marker-1);
+ RNA_string_set(op->ptr, "name", marker->name);
+ }
+
+ /* part to sync with other similar operators... */
+ return WM_operator_props_popup(C, op, evt);
+}
static int poselib_rename_exec (bContext *C, wmOperator *op)
{
@@ -533,9 +564,10 @@ static int poselib_rename_exec (bContext *C, wmOperator *op)
}
/* get index (and pointer) of pose to remove */
- marker= BLI_findlink(&act->markers, RNA_int_get(op->ptr, "index"));
+ marker= BLI_findlink(&act->markers, RNA_int_get(op->ptr, "pose"));
if (marker == NULL) {
BKE_report(op->reports, RPT_ERROR, "Invalid index for Pose");
+ return OPERATOR_CANCELLED;
}
/* get new name */
@@ -551,13 +583,18 @@ static int poselib_rename_exec (bContext *C, wmOperator *op)
void POSELIB_OT_pose_rename (wmOperatorType *ot)
{
+ PropertyRNA *prop;
+ static EnumPropertyItem prop_poses_dummy_types[] = {
+ {0, NULL, 0, NULL, NULL}
+ };
+
/* identifiers */
ot->name= "PoseLib Rename Pose";
ot->idname= "POSELIB_OT_pose_rename";
ot->description= "Rename nth pose from the active Pose Library";
/* api callbacks */
- ot->invoke= poselib_stored_pose_menu_invoke;
+ ot->invoke= poselib_rename_invoke;
ot->exec= poselib_rename_exec;
ot->poll= ED_operator_posemode;
@@ -565,7 +602,8 @@ void POSELIB_OT_pose_rename (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "The index of the pose to remove", 0, INT_MAX);
+ prop= RNA_def_enum(ot->srna, "pose", prop_poses_dummy_types, 0, "Pose", "The pose to rename");
+ RNA_def_enum_funcs(prop, poselib_stored_pose_itemf);
RNA_def_string(ot->srna, "name", "RenamedPose", 64, "New Pose Name", "New name for pose");
}
@@ -769,7 +807,11 @@ static void poselib_keytag_pose (bContext *C, Scene *scene, tPoseLib_PreviewData
if (poselib_ks_locrotscale == NULL)
poselib_ks_locrotscale= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale");
- modify_keyframes(C, &dsources, NULL, poselib_ks_locrotscale, MODIFYKEY_MODE_INSERT, (float)CFRA);
+ /* init cks for this PoseChannel, then use the relative KeyingSets to keyframe it */
+ cks.pchan= pchan;
+
+ /* now insert the keyframe */
+ modify_keyframes(scene, &dsources, NULL, poselib_ks_locrotscale, MODIFYKEY_MODE_INSERT, (float)CFRA);
/* clear any unkeyed tags */
if (pchan->bone)
@@ -780,10 +822,12 @@ static void poselib_keytag_pose (bContext *C, Scene *scene, tPoseLib_PreviewData
if (pchan->bone)
pchan->bone->flag |= BONE_UNKEYED;
}
-
}
}
}
+
+ /* send notifiers for this */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
/* Apply the relevant changes to the pose */
@@ -1411,7 +1455,7 @@ static int poselib_preview_invoke(bContext *C, wmOperator *op, wmEvent *event)
poselib_preview_apply(C, op);
/* add temp handler if we're running as a modal operator */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index bab7111dbd7..57fe083b319 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -543,7 +543,7 @@ void pose_select_constraint_target(Scene *scene)
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)
+ if((pchanc) && !(pchanc->bone->flag & BONE_UNSELECTABLE))
pchanc->bone->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
}
}
@@ -582,7 +582,7 @@ static int pose_select_constraint_target_exec(bContext *C, wmOperator *op)
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) {
+ if((pchanc) && !(pchanc->bone->flag & BONE_UNSELECTABLE)) {
pchanc->bone->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
found= 1;
}
@@ -634,7 +634,7 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
curbone= pchan->bone;
- if (arm->layer & curbone->layer) {
+ if ((arm->layer & curbone->layer) && (curbone->flag & BONE_UNSELECTABLE)==0) {
if (curbone->flag & (BONE_ACTIVE)) {
if (direction == BONE_SELECT_PARENT) {
@@ -646,7 +646,7 @@ 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);
-
+
found= 1;
break;
}
@@ -660,7 +660,7 @@ 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);
-
+
found= 1;
break;
}
@@ -798,6 +798,8 @@ void pose_copy_menu(Scene *scene)
VECCOPY(pchan->limitmax, pchanact->limitmax);
VECCOPY(pchan->stiffness, pchanact->stiffness);
pchan->ikstretch= pchanact->ikstretch;
+ pchan->ikrotweight= pchanact->ikrotweight;
+ pchan->iklinweight= pchanact->iklinweight;
}
break;
case 8: /* Custom Bone Shape */
@@ -812,14 +814,14 @@ void pose_copy_menu(Scene *scene)
armature_mat_pose_to_bone(pchan, pchanact->pose_mat, delta_mat);
- if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
+ if (pchan->rotmode == ROT_MODE_AXISANGLE) {
float tmp_quat[4];
/* need to convert to quat first (in temp var)... */
Mat4ToQuat(delta_mat, tmp_quat);
- QuatToAxisAngle(tmp_quat, &pchan->quat[1], &pchan->quat[0]);
+ QuatToAxisAngle(tmp_quat, pchan->rotAxis, &pchan->rotAngle);
}
- else if (pchan->rotmode == PCHAN_ROT_QUAT)
+ else if (pchan->rotmode == ROT_MODE_QUAT)
Mat4ToQuat(delta_mat, pchan->quat);
else
Mat4ToEulO(delta_mat, pchan->eul, pchan->rotmode);
@@ -1021,24 +1023,24 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
}
else if (pchan->rotmode > 0) {
/* quat/axis-angle to euler */
- if (chan->rotmode == PCHAN_ROT_AXISANGLE)
- AxisAngleToEulO(&chan->quat[1], chan->quat[0], pchan->eul, pchan->rotmode);
+ if (chan->rotmode == ROT_MODE_AXISANGLE)
+ AxisAngleToEulO(chan->rotAxis, chan->rotAngle, pchan->eul, pchan->rotmode);
else
QuatToEulO(chan->quat, pchan->eul, pchan->rotmode);
}
- else if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
+ else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
/* quat/euler to axis angle */
if (chan->rotmode > 0)
- EulOToAxisAngle(chan->eul, chan->rotmode, &pchan->quat[1], &pchan->quat[0]);
+ EulOToAxisAngle(chan->eul, chan->rotmode, pchan->rotAxis, &pchan->rotAngle);
else
- QuatToAxisAngle(chan->quat, &pchan->quat[1], &pchan->quat[0]);
+ QuatToAxisAngle(chan->quat, pchan->rotAxis, &pchan->rotAngle);
}
else {
/* euler/axis-angle to quat */
if (chan->rotmode > 0)
EulOToQuat(chan->eul, chan->rotmode, pchan->quat);
else
- AxisAngleToQuat(pchan->quat, &chan->quat[1], chan->quat[0]);
+ AxisAngleToQuat(pchan->quat, chan->rotAxis, pchan->rotAngle);
}
/* paste flipped pose? */
@@ -1050,13 +1052,13 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
pchan->eul[1] *= -1;
pchan->eul[2] *= -1;
}
- else if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
+ else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
float eul[3];
- AxisAngleToEulO(&pchan->quat[1], pchan->quat[0], eul, EULER_ORDER_DEFAULT);
+ AxisAngleToEulO(pchan->rotAxis, pchan->rotAngle, eul, EULER_ORDER_DEFAULT);
eul[1]*= -1;
eul[2]*= -1;
- EulOToAxisAngle(eul, EULER_ORDER_DEFAULT, &pchan->quat[1], &pchan->quat[0]);
+ EulOToAxisAngle(eul, EULER_ORDER_DEFAULT, pchan->rotAxis, &pchan->rotAngle);
// experimental method (uncomment to test):
#if 0
@@ -1084,7 +1086,10 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
if (posePaste_ks_locrotscale == NULL)
posePaste_ks_locrotscale= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale");
- modify_keyframes(C, &dsources, NULL, posePaste_ks_locrotscale, MODIFYKEY_MODE_INSERT, (float)CFRA);
+ /* init cks for this PoseChannel, then use the relative KeyingSets to keyframe it */
+ cks.pchan= pchan;
+
+ modify_keyframes(scene, &dsources, NULL, posePaste_ks_locrotscale, MODIFYKEY_MODE_INSERT, (float)CFRA);
/* clear any unkeyed tags */
if (chan->bone)
@@ -1113,6 +1118,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
/* notifiers for updates */
WM_event_add_notifier(C, NC_OBJECT|ND_POSE|ND_TRANSFORM, ob);
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); // XXX not really needed, but here for completeness...
return OPERATOR_FINISHED;
}
@@ -1722,31 +1728,6 @@ void pose_activate_flipped_bone(Scene *scene)
/* ********************************************** */
/* Present a popup to get the layers that should be used */
-// TODO: move to wm?
-static uiBlock *wm_layers_select_create_menu(bContext *C, ARegion *ar, void *arg_op)
-{
- wmOperator *op= arg_op;
- uiBlock *block;
- uiLayout *layout;
- uiStyle *style= U.uistyles.first;
-
- block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS);
- uiBlockClearFlag(block, UI_BLOCK_LOOP);
- uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN);
-
- layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 150, 20, style);
- uiItemL(layout, op->type->name, 0);
- uiTemplateLayers(layout, op->ptr, "layers"); /* must have a property named layers setup */
-
- uiPopupBoundsBlock(block, 4.0f, 0, 0);
- uiEndBlock(C, block);
-
- return block;
-}
-
-/* ------------------- */
-
-/* Present a popup to get the layers that should be used */
static int pose_armature_layers_invoke (bContext *C, wmOperator *op, wmEvent *evt)
{
Object *ob= CTX_data_active_object(C);
@@ -1763,10 +1744,8 @@ static int pose_armature_layers_invoke (bContext *C, wmOperator *op, wmEvent *ev
RNA_boolean_get_array(&ptr, "layer", layers);
RNA_boolean_set_array(op->ptr, "layers", layers);
- /* part to sync with other similar operators... */
- /* pass on operator, so return modal */
- uiPupBlockOperator(C, wm_layers_select_create_menu, op, WM_OP_EXEC_DEFAULT);
- return OPERATOR_RUNNING_MODAL|OPERATOR_PASS_THROUGH;
+ /* part to sync with other similar operators... */
+ return WM_operator_props_popup(C, op, evt);
}
/* Set the visible layers for the active armature (edit and pose modes) */
@@ -1807,7 +1786,7 @@ void POSE_OT_armature_layers (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean_array(ot->srna, "layers", 16, NULL, "Layers", "Armature layers to make visible.");
+ RNA_def_boolean_layer_member(ot->srna, "layers", 16, NULL, "Layer", "Armature layers to make visible");
}
void ARMATURE_OT_armature_layers (wmOperatorType *ot)
@@ -1826,7 +1805,7 @@ void ARMATURE_OT_armature_layers (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean_array(ot->srna, "layers", 16, NULL, "Layers", "Armature layers to make visible.");
+ RNA_def_boolean_layer_member(ot->srna, "layers", 16, NULL, "Layer", "Armature layers to make visible");
}
/* ------------------- */
@@ -1855,9 +1834,7 @@ static int pose_bone_layers_invoke (bContext *C, wmOperator *op, wmEvent *evt)
RNA_boolean_set_array(op->ptr, "layers", layers);
/* part to sync with other similar operators... */
- /* pass on operator, so return modal */
- uiPupBlockOperator(C, wm_layers_select_create_menu, op, WM_OP_EXEC_DEFAULT);
- return OPERATOR_RUNNING_MODAL|OPERATOR_PASS_THROUGH;
+ return WM_operator_props_popup(C, op, evt);
}
/* Set the visible layers for the active armature (edit and pose modes) */
@@ -1902,7 +1879,7 @@ void POSE_OT_bone_layers (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean_array(ot->srna, "layers", 16, NULL, "Layers", "Armature layers that bone belongs to.");
+ RNA_def_boolean_layer_member(ot->srna, "layers", 16, NULL, "Layer", "Armature layers that bone belongs to");
}
/* ------------------- */
@@ -1931,15 +1908,13 @@ static int armature_bone_layers_invoke (bContext *C, wmOperator *op, wmEvent *ev
RNA_boolean_set_array(op->ptr, "layers", layers);
/* part to sync with other similar operators... */
- /* pass on operator, so return modal */
- uiPupBlockOperator(C, wm_layers_select_create_menu, op, WM_OP_EXEC_DEFAULT);
- return OPERATOR_RUNNING_MODAL|OPERATOR_PASS_THROUGH;
+ return WM_operator_props_popup(C, op, evt);
}
/* Set the visible layers for the active armature (edit and pose modes) */
static int armature_bone_layers_exec (bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob= CTX_data_edit_object(C);
bArmature *arm= (ob)? ob->data : NULL;
PointerRNA ptr;
int layers[16]; /* hardcoded for now - we can only have 16 armature layers, so this should be fine... */
@@ -1952,7 +1927,7 @@ static int armature_bone_layers_exec (bContext *C, wmOperator *op)
{
/* get pointer for pchan, and write flags this way */
RNA_pointer_create((ID *)arm, &RNA_EditBone, ebone, &ptr);
- RNA_boolean_set_array(&ptr, "layers", layers);
+ RNA_boolean_set_array(&ptr, "layer", layers);
}
CTX_DATA_END;
@@ -1978,180 +1953,11 @@ void ARMATURE_OT_bone_layers (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean_array(ot->srna, "layers", 16, NULL, "Layers", "Armature layers that bone belongs to.");
+ RNA_def_boolean_layer_member(ot->srna, "layers", 16, NULL, "Layer", "Armature layers that bone belongs to");
}
/* ********************************************** */
-#if 0
-// XXX old sys
-/* for use with pose_relax only */
-static int pose_relax_icu(struct IpoCurve *icu, float framef, float *val, float *frame_prev, float *frame_next)
-{
- if (!icu) {
- return 0;
- }
- else {
- BezTriple *bezt = icu->bezt;
-
- BezTriple *bezt_prev=NULL, *bezt_next=NULL;
- float w1, w2, wtot;
- int i;
-
- for (i=0; i < icu->totvert; i++, bezt++) {
- if (bezt->vec[1][0] < framef - 0.5) {
- bezt_prev = bezt;
- } else {
- break;
- }
- }
-
- if (bezt_prev==NULL) return 0;
-
- /* advance to the next, dont need to advance i */
- bezt = bezt_prev+1;
-
- for (; i < icu->totvert; i++, bezt++) {
- if (bezt->vec[1][0] > framef + 0.5) {
- bezt_next = bezt;
- break;
- }
- }
-
- if (bezt_next==NULL) return 0;
-
- if (val) {
- w1 = framef - bezt_prev->vec[1][0];
- w2 = bezt_next->vec[1][0] - framef;
- wtot = w1 + w2;
- w1=w1/wtot;
- w2=w2/wtot;
-#if 0
- val = (bezt_prev->vec[1][1] * w2) + (bezt_next->vec[1][1] * w1);
-#else
- /* apply the value with a hard coded 6th */
- *val = (((bezt_prev->vec[1][1] * w2) + (bezt_next->vec[1][1] * w1)) + (*val * 5.0f)) / 6.0f;
-#endif
- }
-
- if (frame_prev) *frame_prev = bezt_prev->vec[1][0];
- if (frame_next) *frame_next = bezt_next->vec[1][0];
-
- return 1;
- }
-}
-#endif
-
-void pose_relax(Scene *scene)
-{
- Object *ob = OBACT;
- bPose *pose;
- bAction *act;
- bArmature *arm;
-
-// IpoCurve *icu_w, *icu_x, *icu_y, *icu_z;
-
- bPoseChannel *pchan;
-// bActionChannel *achan;
-// float framef = F_CFRA;
-// float frame_prev, frame_next;
-// float quat_prev[4], quat_next[4], quat_interp[4], quat_orig[4];
-
- int do_scale = 0;
- int do_loc = 0;
- int do_quat = 0;
- int flag = 0;
-// int do_x, do_y, do_z;
-
- if (!ob) return;
-
- pose = ob->pose;
- act = ob->action;
- arm = (bArmature *)ob->data;
-
- if (!pose || !act || !arm) return;
-
- for (pchan=pose->chanbase.first; pchan; pchan= pchan->next) {
-
- pchan->bone->flag &= ~BONE_TRANSFORM;
-
- if (pchan->bone->layer & arm->layer) {
- if (pchan->bone->flag & BONE_SELECTED) {
- /* do we have an ipo curve? */
-#if 0 // XXX old animation system
- achan= get_action_channel(act, pchan->name);
-
- if (achan && achan->ipo) {
- /*calc_ipo(achan->ipo, ctime);*/
-
- do_x = pose_relax_icu(find_ipocurve(achan->ipo, AC_LOC_X), framef, &pchan->loc[0], NULL, NULL);
- do_y = pose_relax_icu(find_ipocurve(achan->ipo, AC_LOC_Y), framef, &pchan->loc[1], NULL, NULL);
- do_z = pose_relax_icu(find_ipocurve(achan->ipo, AC_LOC_Z), framef, &pchan->loc[2], NULL, NULL);
- do_loc += do_x + do_y + do_z;
-
- do_x = pose_relax_icu(find_ipocurve(achan->ipo, AC_SIZE_X), framef, &pchan->size[0], NULL, NULL);
- do_y = pose_relax_icu(find_ipocurve(achan->ipo, AC_SIZE_Y), framef, &pchan->size[1], NULL, NULL);
- do_z = pose_relax_icu(find_ipocurve(achan->ipo, AC_SIZE_Z), framef, &pchan->size[2], NULL, NULL);
- do_scale += do_x + do_y + do_z;
-
- if( ((icu_w = find_ipocurve(achan->ipo, AC_QUAT_W))) &&
- ((icu_x = find_ipocurve(achan->ipo, AC_QUAT_X))) &&
- ((icu_y = find_ipocurve(achan->ipo, AC_QUAT_Y))) &&
- ((icu_z = find_ipocurve(achan->ipo, AC_QUAT_Z))) )
- {
- /* use the quatw keyframe as a basis for others */
- if (pose_relax_icu(icu_w, framef, NULL, &frame_prev, &frame_next)) {
- /* get 2 quats */
- quat_prev[0] = eval_icu(icu_w, frame_prev);
- quat_prev[1] = eval_icu(icu_x, frame_prev);
- quat_prev[2] = eval_icu(icu_y, frame_prev);
- quat_prev[3] = eval_icu(icu_z, frame_prev);
-
- quat_next[0] = eval_icu(icu_w, frame_next);
- quat_next[1] = eval_icu(icu_x, frame_next);
- quat_next[2] = eval_icu(icu_y, frame_next);
- quat_next[3] = eval_icu(icu_z, frame_next);
-
-#if 0
- /* apply the setting, completely smooth */
- QuatInterpol(pchan->quat, quat_prev, quat_next, (framef-frame_prev) / (frame_next-frame_prev) );
-#else
- /* tricky interpolation */
- QuatInterpol(quat_interp, quat_prev, quat_next, (framef-frame_prev) / (frame_next-frame_prev) );
- QUATCOPY(quat_orig, pchan->quat);
- QuatInterpol(pchan->quat, quat_orig, quat_interp, 1.0f/6.0f);
- /* done */
-#endif
- do_quat++;
- }
- }
-
- /* apply BONE_TRANSFORM tag so that autokeying will pick it up */
- pchan->bone->flag |= BONE_TRANSFORM;
- }
-
-#endif // XXX old animation system
- }
- }
- }
-
- ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
-
- /* do auto-keying */
- if (do_loc) flag |= TFM_TRANSLATION;
- if (do_scale) flag |= TFM_RESIZE;
- if (do_quat) flag |= TFM_ROTATION;
- autokeyframe_pose_cb_func(ob, flag, 0);
-
- /* clear BONE_TRANSFORM flags */
- for (pchan=pose->chanbase.first; pchan; pchan= pchan->next)
- pchan->bone->flag &= ~ BONE_TRANSFORM;
-
- /* do depsgraph flush */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- BIF_undo_push("Relax Pose");
-}
-
/* for use in insertkey, ensure rotation goes other way around */
void pose_flipquats(Scene *scene)
{
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c
index 8a90dace40b..929e3514990 100644
--- a/source/blender/editors/curve/curve_ops.c
+++ b/source/blender/editors/curve/curve_ops.c
@@ -161,9 +161,12 @@ void ED_operatortypes_curve(void)
WM_operatortype_append(CURVE_OT_specials_menu);
}
-void ED_keymap_curve(wmWindowManager *wm)
+void ED_keymap_curve(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Font", 0, 0);
+ wmKeyMap *keymap;
+
+ keymap= WM_keymap_find(keyconf, "Font", 0, 0);
+ keymap->poll= ED_operator_editfont;
/* only set in editmode font, by space_view3d listener */
RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_style_toggle", BKEY, KM_PRESS, KM_CTRL, 0)->ptr, "style", CU_BOLD);
@@ -212,7 +215,8 @@ void ED_keymap_curve(wmWindowManager *wm)
WM_keymap_add_item(keymap, "FONT_OT_text_insert", KM_TEXTINPUT, KM_ANY, KM_ANY, 0); // last!
/* only set in editmode curve, by space_view3d listener */
- keymap= WM_keymap_listbase(wm, "Curve", 0, 0);
+ keymap= WM_keymap_find(keyconf, "Curve", 0, 0);
+ keymap->poll= ED_operator_editsurfcurve;
WM_keymap_add_item(keymap, "OBJECT_OT_curve_add", AKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "CURVE_OT_vertex_add", ACTIONMOUSE, KM_PRESS, KM_CTRL, 0);
@@ -244,5 +248,7 @@ void ED_keymap_curve(wmWindowManager *wm)
RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "unselected", 1);
WM_keymap_add_item(keymap, "CURVE_OT_specials_menu", WKEY, KM_PRESS, 0, 0);
+
+ ED_object_generic_keymap(keyconf, keymap, TRUE);
}
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 8dabe24de91..45820869b48 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1078,7 +1078,7 @@ void CURVE_OT_spline_weight_set(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_float_percentage(ot->srna, "weight", 1.0f, 0.0f, 1.0f, "Weight", "", 0.0f, 1.0f);
+ RNA_def_float_factor(ot->srna, "weight", 1.0f, 0.0f, 1.0f, "Weight", "", 0.0f, 1.0f);
}
/******************* set radius operator ******************/
@@ -2242,6 +2242,7 @@ static short findnearestNurbvert(ViewContext *vc, short sel, int mval[2], Nurb *
data.mval[0] = mval[0];
data.mval[1] = mval[1];
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d);
nurbs_foreachScreenVert(vc, findnearestNurbvert__doClosest, &data);
*nurb = data.nurb;
@@ -4681,7 +4682,7 @@ int join_curve_exec(bContext *C, wmOperator *op)
DAG_scene_sort(scene); // because we removed object(s), call before editmode!
ED_object_enter_editmode(C, EM_WAITCURSOR);
- ED_object_exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR|EM_DO_UNDO);
WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 868c5902670..2be567e1921 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -381,19 +381,19 @@ static int paste_file(bContext *C, ReportList *reports, char *filename)
static int paste_file_exec(bContext *C, wmOperator *op)
{
- char *filename;
+ char *path;
int retval;
- filename= RNA_string_get_alloc(op->ptr, "filename", NULL, 0);
- retval= paste_file(C, op->reports, filename);
- MEM_freeN(filename);
+ path= RNA_string_get_alloc(op->ptr, "path", NULL, 0);
+ retval= paste_file(C, op->reports, path);
+ MEM_freeN(path);
return retval;
}
static int paste_file_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(RNA_property_is_set(op->ptr, "filename"))
+ if(RNA_property_is_set(op->ptr, "path"))
return paste_file_exec(C, op);
WM_event_add_fileselect(C, op);
diff --git a/source/blender/editors/datafiles/B.blend.c b/source/blender/editors/datafiles/B.blend.c
index b469f0c24cb..b22ef5b3053 100644
--- a/source/blender/editors/datafiles/B.blend.c
+++ b/source/blender/editors/datafiles/B.blend.c
@@ -1,682 +1,703 @@
/* DataToC output of file <B_blend> */
-int datatoc_B_blend_size= 100360;
+int datatoc_B_blend_size= 102392;
char datatoc_B_blend[]= {
- 66, 76, 69, 78, 68, 69, 82, 95,
-118, 50, 53, 48, 82, 69, 78, 68, 32, 0, 0, 0,208,245, 18, 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, 32, 0, 0, 0,
-200,245, 18, 0,192, 0, 0, 0, 1, 0, 0, 0, 32, 32, 32, 51, 3, 0, 0, 0,250, 0, 0, 0, 1, 0, 0, 1, 72, 22, 11, 7,
-160, 33, 10, 7, 0, 16, 0, 0,128, 32, 4, 0, 87, 77, 0, 0,140, 0, 0, 0,192, 75, 10, 7, 86, 1, 0, 0, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160,254, 14, 7,160,147,103, 2,160,254, 14, 7,
-160,254, 14, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,224,183,102, 2,216, 85, 5, 7, 68, 65, 84, 65,148, 0, 0, 0,160,254, 14, 7, 87, 1, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 99, 2, 1, 0, 0, 0, 0, 0, 0, 0, 72, 22, 11, 7, 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, 62, 0, 34, 0,
-186, 4,254, 2, 0, 0, 0, 0, 1, 0,238, 3, 0, 0, 1, 0, 0, 0, 0, 0,232, 44, 99, 2, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,144, 76, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0,208,229, 25, 7,176,202, 25, 7,152, 43, 99, 2,
-184,231, 9, 7,200, 45, 5, 7, 56, 90, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0,140, 0, 0, 0, 72, 22, 11, 7,
-186, 0, 0, 0, 1, 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,208, 79, 10, 7,
-176,183, 3, 7,232,192, 3, 7, 96,201, 2, 7,120,255, 14, 7, 72,136, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0,160, 33, 10, 7,
- 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 16,111, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,208, 79, 10, 7,
-187, 0, 0, 0, 1, 0, 0, 0,120, 63, 11, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 20, 0, 0, 0,120, 63, 11, 7,187, 0, 0, 0, 1, 0, 0, 0, 8, 11, 11, 7,208, 79, 10, 7, 0, 0, 0, 0, 0, 0,254, 2,
- 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0, 8, 11, 11, 7,187, 0, 0, 0, 1, 0, 0, 0,200, 32, 4, 7,120, 63, 11, 7,
- 0, 0, 0, 0,186, 4,254, 2, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,200, 32, 4, 7,187, 0, 0, 0, 1, 0, 0, 0,
-232,251, 3, 7, 8, 11, 11, 7, 0, 0, 0, 0,186, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,232,251, 3, 7,
-187, 0, 0, 0, 1, 0, 0, 0, 48, 16, 4, 7,200, 32, 4, 7, 0, 0, 0, 0, 0, 0,227, 2, 1, 0, 0, 0, 68, 65, 84, 65,
- 20, 0, 0, 0, 48, 16, 4, 7,187, 0, 0, 0, 1, 0, 0, 0,216, 43, 4, 7,232,251, 3, 7, 0, 0, 0, 0,186, 4,227, 2,
- 1, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,216, 43, 4, 7,187, 0, 0, 0, 1, 0, 0, 0,160, 34, 4, 7, 48, 16, 4, 7,
- 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,160, 34, 4, 7,187, 0, 0, 0, 1, 0, 0, 0,
- 88,147, 4, 7,216, 43, 4, 7, 0, 0, 0, 0,186, 4, 60, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0, 88,147, 4, 7,
-187, 0, 0, 0, 1, 0, 0, 0,136,121, 4, 7,160, 34, 4, 7, 0, 0, 0, 0,216, 3, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 20, 0, 0, 0,136,121, 4, 7,187, 0, 0, 0, 1, 0, 0, 0,104, 25, 4, 7, 88,147, 4, 7, 0, 0, 0, 0,216, 3,227, 2,
- 1, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,104, 25, 4, 7,187, 0, 0, 0, 1, 0, 0, 0, 64,160, 4, 7,136,121, 4, 7,
- 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0, 64,160, 4, 7,187, 0, 0, 0, 1, 0, 0, 0,
- 32, 26, 15, 7,104, 25, 4, 7, 0, 0, 0, 0,216, 3, 72, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0, 32, 26, 15, 7,
-187, 0, 0, 0, 1, 0, 0, 0,176,183, 3, 7, 64,160, 4, 7, 0, 0, 0, 0,216, 3, 72, 2, 0, 0, 0, 0, 68, 65, 84, 65,
- 20, 0, 0, 0,176,183, 3, 7,187, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 32, 26, 15, 7, 0, 0, 0, 0,186, 4, 72, 2,
- 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,232,192, 3, 7,188, 0, 0, 0, 1, 0, 0, 0, 24,226, 3, 7, 0, 0, 0, 0,
- 8, 11, 11, 7,120, 63, 11, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 24,226, 3, 7,188, 0, 0, 0,
- 1, 0, 0, 0, 88, 14, 4, 7,232,192, 3, 7,232,251, 3, 7,120, 63, 11, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 24, 0, 0, 0, 88, 14, 4, 7,188, 0, 0, 0, 1, 0, 0, 0, 0,180, 3, 7, 24,226, 3, 7, 48, 16, 4, 7, 8, 11, 11, 7,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 0,180, 3, 7,188, 0, 0, 0, 1, 0, 0, 0,104,163, 3, 7,
- 88, 14, 4, 7,232,251, 3, 7, 48, 16, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,104,163, 3, 7,
-188, 0, 0, 0, 1, 0, 0, 0,248,203, 3, 7, 0,180, 3, 7, 88,147, 4, 7,208, 79, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 24, 0, 0, 0,248,203, 3, 7,188, 0, 0, 0, 1, 0, 0, 0, 16,191, 3, 7,104,163, 3, 7,200, 32, 4, 7,
- 88,147, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 16,191, 3, 7,188, 0, 0, 0, 1, 0, 0, 0,
-144, 23, 4, 7,248,203, 3, 7,232,251, 3, 7,136,121, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,
-144, 23, 4, 7,188, 0, 0, 0, 1, 0, 0, 0, 0,118, 4, 7, 16,191, 3, 7, 48, 16, 4, 7,136,121, 4, 7, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 0,118, 4, 7,188, 0, 0, 0, 1, 0, 0, 0,144,109, 4, 7,144, 23, 4, 7,
-104, 25, 4, 7,208, 79, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,144,109, 4, 7,188, 0, 0, 0,
- 1, 0, 0, 0, 40,178, 3, 7, 0,118, 4, 7,232,251, 3, 7,104, 25, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 24, 0, 0, 0, 40,178, 3, 7,188, 0, 0, 0, 1, 0, 0, 0,200,170, 3, 7,144,109, 4, 7,136,121, 4, 7, 64,160, 4, 7,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,200,170, 3, 7,188, 0, 0, 0, 1, 0, 0, 0,176,242, 3, 7,
- 40,178, 3, 7, 88,147, 4, 7, 64,160, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,176,242, 3, 7,
-188, 0, 0, 0, 1, 0, 0, 0, 56,248, 3, 7,200,170, 3, 7,104, 25, 4, 7, 64,160, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 24, 0, 0, 0, 56,248, 3, 7,188, 0, 0, 0, 1, 0, 0, 0, 80, 38, 4, 7,176,242, 3, 7, 88,147, 4, 7,
- 32, 26, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 80, 38, 4, 7,188, 0, 0, 0, 1, 0, 0, 0,
-232,133, 3, 7, 56,248, 3, 7,136,121, 4, 7, 32, 26, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,
-232,133, 3, 7,188, 0, 0, 0, 1, 0, 0, 0,160,210, 2, 7, 80, 38, 4, 7,176,183, 3, 7, 48, 16, 4, 7, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,160,210, 2, 7,188, 0, 0, 0, 1, 0, 0, 0, 96,201, 2, 7,232,133, 3, 7,
-176,183, 3, 7,200, 32, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 96,201, 2, 7,188, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0,160,210, 2, 7,176,183, 3, 7, 32, 26, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 96, 0, 0, 0,120,255, 14, 7,190, 0, 0, 0, 1, 0, 0, 0, 24, 23, 11, 7, 0, 0, 0, 0,232,251, 3, 7,120, 63, 11, 7,
- 8, 11, 11, 7, 48, 16, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0,186, 4, 0, 0,228, 2, 0, 0,254, 2, 0, 0, 7, 7,187, 4,
- 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 56,150, 92, 2,152,180,102, 2,152,180,102, 2, 32,173, 11, 7,112,158, 24, 7,
- 0, 0, 0, 0, 0, 0, 0, 0, 40, 47, 5, 7, 8, 48, 5, 7, 68, 65, 84, 65,248, 0, 0, 0, 32,173, 11, 7,191, 0, 0, 0,
- 1, 0, 0, 0,112,158, 24, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,157, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
- 0, 96,151, 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,186, 4, 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,187, 4, 26, 0,187, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,186, 4, 0, 0,228, 2, 0, 0,253, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-187, 4, 26, 0, 2, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,151, 92, 2,184,191, 25, 7,
-184,191, 25, 7, 0, 0, 0, 0, 0, 0, 0, 0,216, 49, 5, 7, 96, 50, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
-248, 0, 0, 0,112,158, 24, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 32,173, 11, 7, 0, 0, 0, 0, 0, 32,240, 68,
- 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,110, 69, 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0,129, 7, 0, 0,
- 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0,
- 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64,
- 10, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 4, 6, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, 2, 0, 0,254, 2, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0,224,150, 92, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 0, 0, 0, 24, 23, 11, 7,190, 0, 0, 0, 1, 0, 0, 0,200, 33, 11, 7,
-120,255, 14, 7, 88,147, 4, 7, 32, 26, 15, 7,176,183, 3, 7,200, 32, 4, 7, 0, 0, 0, 0,217, 3, 0, 0,186, 4, 0, 0,
- 0, 0, 0, 0, 71, 2, 0, 0, 4, 4,226, 0, 72, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,147, 92, 2,192,160, 9, 7,
-120,148, 10, 7,128,237, 11, 7,184,238, 11, 7, 0, 0, 0, 0, 0, 0, 0, 0,232, 50, 5, 7,200, 51, 5, 7, 68, 65, 84, 65,
-248, 0, 0, 0,128,237, 11, 7,191, 0, 0, 0, 1, 0, 0, 0,184,238, 11, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 67,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 98, 67, 0, 0, 0, 0, 0, 0,248, 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,225, 0, 0, 0,
- 0, 0, 0, 0, 30, 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,226, 0, 31, 0,226, 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,217, 3, 0, 0,186, 4, 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,226, 0, 31, 0, 3, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,152,149, 92, 2,160,145,246, 6,160,145,246, 6, 0, 0, 0, 0, 0, 0, 0, 0,152, 53, 5, 7,168, 54, 5, 7,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,184,238, 11, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
-128,237, 11, 7, 0, 0, 0, 0, 0, 0, 80, 67, 0, 0, 68,196, 0, 0, 0, 0, 0, 0, 0, 0,254,255, 80, 67,255,191, 5,196,
- 0, 0, 0, 0,209, 0, 0, 0,226, 0, 0, 0, 18, 0, 0, 0, 40, 2, 0, 0, 0, 0, 0, 0,208, 0, 0, 0, 0, 0, 0, 0,
- 17, 0, 0, 0, 0, 0, 0, 0,208, 0, 0, 0, 18, 0, 0, 0, 40, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,226, 0, 41, 2,209, 0,
- 23, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,176, 63,100, 2, 1, 0, 0, 0, 0, 0, 0, 0,217, 3, 0, 0,186, 4, 0, 0,
- 31, 0, 0, 0, 71, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,226, 0, 41, 2, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,148, 92, 2, 88, 22, 6, 7, 16,102, 5, 7,248, 24, 11, 7,
- 72,159, 9, 7,144, 56, 5, 7, 40, 58, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,248, 24, 11, 7,
-189, 0, 0, 0, 1, 0, 0, 0,112, 26, 11, 7, 0, 0, 0, 0,200,148, 92, 2, 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,208, 0, 36, 0,
- 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,112, 26, 11, 7,189, 0, 0, 0, 1, 0, 0, 0,232, 27, 11, 7,248, 24, 11, 7,232,164, 2, 7,
- 0, 0, 0, 0, 83, 67, 69, 78, 69, 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, 0, 83, 67, 69, 78, 69, 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, 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,208, 0, 61, 0, 0, 0, 0, 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, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,232, 27, 11, 7,189, 0, 0, 0, 1, 0, 0, 0,
- 96, 29, 11, 7,112, 26, 11, 7,192,166, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,108, 97,121,101,114,115, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,108, 97,121,101,114,115, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255,208, 0, 0, 0, 0, 0, 0, 0, 4, 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, 0, 0, 0, 0, 0, 0, 0, 0,
+ 66, 76, 69, 78, 68, 69, 82, 95,118, 50, 53, 48, 82, 69, 78, 68, 32, 0, 0, 0, 36,246, 24, 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, 32, 0, 0, 0, 20,246, 24, 0,195, 0, 0, 0, 1, 0, 0, 0, 32, 32, 32, 52,
+ 4, 0, 0, 0,250, 0, 0, 0, 1, 0, 0, 1, 56, 79,201, 2,216,194,213, 2, 0, 16, 0, 0,128, 32, 4, 0, 87, 77, 0, 0,
+140, 0, 0, 0,120, 78,201, 2, 93, 1, 0, 0, 1, 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, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,240, 49,213, 2,240, 49,213, 2,240, 49,213, 2,240, 49,213, 2, 3, 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, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,123,207, 2, 16,203,131, 3, 68, 65, 84, 65,
+156, 0, 0, 0,240, 49,213, 2, 94, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,255,213, 2, 1, 0, 0, 0,
+ 0, 0, 0, 0, 56, 79,201, 2, 0, 0, 0, 0,115, 99,114,101,101,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 0,110, 7,219, 3, 0, 0, 0, 0, 1, 0,238, 3, 0, 0, 1, 0,
+ 0, 0, 0, 0,208, 64,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,103,210, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0,160, 65,210, 2,160, 65,210, 2,136, 68,207, 2, 0, 69,207, 2,120, 69,207, 2,120, 69,207, 2, 96, 80,201, 2,
+ 40,174,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0,140, 0, 0, 0, 56, 79,201, 2,189, 0, 0, 0, 1, 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, 72,187,200, 2,240,190,200, 2, 56,191,200, 2,
+176, 51,213, 2,168,120,207, 2,232,122,207, 2, 0, 0, 0, 0, 0, 0, 0, 0,216,194,213, 2, 0, 0, 0, 0, 0, 0, 1, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,144,166, 83, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0, 72,187,200, 2,190, 0, 0, 0, 1, 0, 0, 0,
+144,187,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,144,187,200, 2,
+190, 0, 0, 0, 1, 0, 0, 0,216,187,200, 2, 72,187,200, 2, 0, 0, 0, 0, 0, 0,219, 3, 0, 0, 0, 0, 68, 65, 84, 65,
+ 20, 0, 0, 0,216,187,200, 2,190, 0, 0, 0, 1, 0, 0, 0, 32,188,200, 2,144,187,200, 2, 0, 0, 0, 0,110, 7,219, 3,
+ 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0, 32,188,200, 2,190, 0, 0, 0, 1, 0, 0, 0,104,188,200, 2,216,187,200, 2,
+ 0, 0, 0, 0,110, 7, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,104,188,200, 2,190, 0, 0, 0, 1, 0, 0, 0,
+176,188,200, 2, 32,188,200, 2, 0, 0, 0, 0, 0, 0,188, 3, 1, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,176,188,200, 2,
+190, 0, 0, 0, 1, 0, 0, 0,248,188,200, 2,104,188,200, 2, 0, 0, 0, 0,110, 7,188, 3, 1, 0, 0, 0, 68, 65, 84, 65,
+ 20, 0, 0, 0,248,188,200, 2,190, 0, 0, 0, 1, 0, 0, 0, 64,189,200, 2,176,188,200, 2, 0, 0, 0, 0, 0, 0, 80, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0, 64,189,200, 2,190, 0, 0, 0, 1, 0, 0, 0,136,189,200, 2,248,188,200, 2,
+ 0, 0, 0, 0,110, 7, 80, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,136,189,200, 2,190, 0, 0, 0, 1, 0, 0, 0,
+208,189,200, 2, 64,189,200, 2, 0, 0, 0, 0, 16, 6, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,208,189,200, 2,
+190, 0, 0, 0, 1, 0, 0, 0, 24,190,200, 2,136,189,200, 2, 0, 0, 0, 0, 16, 6,188, 3, 1, 0, 0, 0, 68, 65, 84, 65,
+ 20, 0, 0, 0, 24,190,200, 2,190, 0, 0, 0, 1, 0, 0, 0, 96,190,200, 2,208,189,200, 2, 0, 0, 0, 0, 0, 0, 96, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0, 96,190,200, 2,190, 0, 0, 0, 1, 0, 0, 0,168,190,200, 2, 24,190,200, 2,
+ 0, 0, 0, 0, 16, 6, 96, 0, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,168,190,200, 2,190, 0, 0, 0, 1, 0, 0, 0,
+240,190,200, 2, 96,190,200, 2, 0, 0, 0, 0, 16, 6,244, 2, 0, 0, 0, 0, 68, 65, 84, 65, 20, 0, 0, 0,240,190,200, 2,
+190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,168,190,200, 2, 0, 0, 0, 0,110, 7,244, 2, 0, 0, 0, 0, 68, 65, 84, 65,
+ 24, 0, 0, 0, 56,191,200, 2,191, 0, 0, 0, 1, 0, 0, 0,128,191,200, 2, 0, 0, 0, 0,144,187,200, 2,216,187,200, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,128,191,200, 2,191, 0, 0, 0, 1, 0, 0, 0,200,191,200, 2,
+ 56,191,200, 2,144,187,200, 2,104,188,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,200,191,200, 2,
+191, 0, 0, 0, 1, 0, 0, 0, 16,192,200, 2,128,191,200, 2,216,187,200, 2,176,188,200, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 24, 0, 0, 0, 16,192,200, 2,191, 0, 0, 0, 1, 0, 0, 0, 88,192,200, 2,200,191,200, 2,104,188,200, 2,
+176,188,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 88,192,200, 2,191, 0, 0, 0, 1, 0, 0, 0,
+160,192,200, 2, 16,192,200, 2, 72,187,200, 2,136,189,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,
+160,192,200, 2,191, 0, 0, 0, 1, 0, 0, 0,232,192,200, 2, 88,192,200, 2, 32,188,200, 2,136,189,200, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,232,192,200, 2,191, 0, 0, 0, 1, 0, 0, 0, 48,193,200, 2,160,192,200, 2,
+104,188,200, 2,208,189,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 48,193,200, 2,191, 0, 0, 0,
+ 1, 0, 0, 0,120,193,200, 2,232,192,200, 2,176,188,200, 2,208,189,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 24, 0, 0, 0,120,193,200, 2,191, 0, 0, 0, 1, 0, 0, 0,192,193,200, 2, 48,193,200, 2, 72,187,200, 2, 24,190,200, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,192,193,200, 2,191, 0, 0, 0, 1, 0, 0, 0, 8,194,200, 2,
+120,193,200, 2,104,188,200, 2, 24,190,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 8,194,200, 2,
+191, 0, 0, 0, 1, 0, 0, 0, 80,194,200, 2,192,193,200, 2,208,189,200, 2, 96,190,200, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 24, 0, 0, 0, 80,194,200, 2,191, 0, 0, 0, 1, 0, 0, 0,152,194,200, 2, 8,194,200, 2,136,189,200, 2,
+ 96,190,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,152,194,200, 2,191, 0, 0, 0, 1, 0, 0, 0,
+224,194,200, 2, 80,194,200, 2, 24,190,200, 2, 96,190,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,
+224,194,200, 2,191, 0, 0, 0, 1, 0, 0, 0,216, 50,213, 2,152,194,200, 2,136,189,200, 2,168,190,200, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,216, 50,213, 2,191, 0, 0, 0, 1, 0, 0, 0, 32, 51,213, 2,224,194,200, 2,
+208,189,200, 2,168,190,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 32, 51,213, 2,191, 0, 0, 0,
+ 1, 0, 0, 0,104, 51,213, 2,216, 50,213, 2,176,188,200, 2,240,190,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 24, 0, 0, 0,104, 51,213, 2,191, 0, 0, 0, 1, 0, 0, 0,176, 51,213, 2, 32, 51,213, 2, 32,188,200, 2,240,190,200, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,176, 51,213, 2,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+104, 51,213, 2,168,190,200, 2,240,190,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 0, 0, 0,168,120,207, 2,
+193, 0, 0, 0, 1, 0, 0, 0, 56,121,207, 2, 0, 0, 0, 0,104,188,200, 2,144,187,200, 2,216,187,200, 2,176,188,200, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0,110, 7, 0, 0,189, 3, 0, 0,219, 3, 0, 0, 7, 7,111, 7, 31, 0, 1, 0, 0, 0, 0, 0,
+ 7, 0, 0, 0, 64,202,201, 2, 32, 42,210, 2, 32, 42,210, 2,192, 66,213, 2,232, 67,213, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 41,210, 2,192, 41,210, 2, 68, 65, 84, 65,248, 0, 0, 0,192, 66,213, 2,194, 0, 0, 0, 1, 0, 0, 0,232, 67,213, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,237, 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,110, 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,111, 7, 26, 0,111, 7,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,110, 7, 0, 0,
+189, 3, 0, 0,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 7, 26, 0, 2, 0, 1, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,177,201, 2, 96,181,131, 3, 96,181,131, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0,240, 69,207, 2,104, 70,207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,232, 67,213, 2,
+194, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,192, 66,213, 2, 0, 0, 0, 0, 0,192,107, 69, 0, 0,128,192, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,191,107, 69, 0, 0, 0,192, 0, 0, 0, 0, 94, 7, 0, 0,111, 7, 0, 0, 18, 0, 0, 0, 4, 0, 0, 0,
+ 0, 0, 0, 0, 93, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 93, 7, 0, 0, 18, 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, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0,
+ 18, 0, 0, 4, 6, 0,111, 7, 5, 0, 94, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,110, 7, 0, 0,215, 3, 0, 0,219, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,111, 7, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,176,201, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224, 70,207, 2,208, 71,207, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 96, 0, 0, 0, 56,121,207, 2,193, 0, 0, 0, 1, 0, 0, 0,200,121,207, 2,168,120,207, 2,136,189,200, 2,
+168,190,200, 2,240,190,200, 2, 32,188,200, 2, 0, 0, 0, 0, 17, 6, 0, 0,110, 7, 0, 0, 0, 0, 0, 0,243, 2, 0, 0,
+ 4, 4, 94, 1,244, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,201,201, 2,216, 86,213, 2, 64, 93,213, 2, 16, 69,213, 2,
+ 56, 70,213, 2, 0, 0, 0, 0, 0, 0, 0, 0,224, 39,210, 2,160, 40,210, 2, 68, 65, 84, 65,248, 0, 0, 0, 16, 69,213, 2,
+194, 0, 0, 0, 1, 0, 0, 0, 56, 70,213, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 67, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0, 0, 0,175, 67, 0, 0, 0, 0, 0, 0,248, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 0, 0, 30, 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, 94, 1, 31, 0, 94, 1, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 17, 6, 0, 0,110, 7, 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, 94, 1, 31, 0, 4, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,176,201, 2,
+232, 29,139, 3,232, 29,139, 3, 0, 0, 0, 0, 0, 0, 0, 0, 72, 72,207, 2, 56, 73,207, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65,248, 0, 0, 0, 56, 70,213, 2,194, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, 69,213, 2, 0, 0, 0, 0,
+ 0, 0,166, 67, 0, 0, 89,196, 0, 0, 0, 0, 0, 0, 0, 0,253,127,166, 67,253,191, 48,196, 0, 0, 0, 0, 77, 1, 0, 0,
+ 94, 1, 0, 0, 18, 0, 0, 0,212, 2, 0, 0, 0, 0, 0, 0, 76, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+ 76, 1, 0, 0, 18, 0, 0, 0,212, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0, 94, 1,213, 2, 77, 1,195, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,136, 36,210, 2, 1, 0, 0, 0, 0, 0, 0, 0, 17, 6, 0, 0,110, 7, 0, 0, 31, 0, 0, 0,243, 2, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1,213, 2, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,168,175,201, 2,240,161,133, 3,120,181,138, 3, 96, 71,213, 2, 8,165,138, 3,176, 73,207, 2,
+ 24, 75,207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 96, 71,213, 2,192, 0, 0, 0, 1, 0, 0, 0,
+200, 72,213, 2, 0, 0, 0, 0, 56, 70,201, 2, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,
+120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,
+120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255, 76, 1, 36, 0, 0, 0, 0, 0, 0, 0, 42, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 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, 29, 11, 7,189, 0, 0, 0, 1, 0, 0, 0,216, 30, 11, 7,232, 27, 11, 7,152,168, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78,
- 69, 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,
+200, 72,213, 2,192, 0, 0, 0, 1, 0, 0, 0, 48, 74,213, 2, 96, 71,213, 2,248, 91,137, 3, 0, 0, 0, 0, 83, 67, 69, 78,
+ 69, 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, 0, 83, 67, 69, 78,
- 69, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,165,254,
-208, 0,178, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 69, 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, 0, 82,101,110,100,
+101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,
+ 76, 1, 61, 0, 0, 0, 0, 0, 0, 0, 10, 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, 68, 65, 84, 65, 56, 1, 0, 0,216, 30, 11, 7,189, 0, 0, 0, 1, 0, 0, 0, 80, 32, 11, 7, 96, 29, 11, 7,
-112,170, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 48, 74,213, 2,192, 0, 0, 0, 1, 0, 0, 0,152, 75,213, 2,200, 72,213, 2,
+184, 92,137, 3, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 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, 83, 67, 69, 78, 69, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 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, 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,208, 0, 58, 0, 20, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 4, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 10, 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, 68, 65, 84, 65, 56, 1, 0, 0, 80, 32, 11, 7,189, 0, 0, 0,
- 1, 0, 0, 0,104,153, 9, 7,216, 30, 11, 7, 72,172, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115,104, 97,
-100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115,104, 97,
-100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 68, 65, 84, 65, 56, 1, 0, 0,152, 75,213, 2,192, 0, 0, 0,
+ 1, 0, 0, 0, 0, 77,213, 2, 48, 74,213, 2,120, 93,137, 3, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,100,105,109,
+101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,100,105,109,
+101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,213,253,208, 0,102, 0, 0, 0, 0, 0,
- 0, 0, 2, 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,165,254, 76, 1,178, 0, 0, 0, 0, 0,
+ 0, 0, 10, 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, 68, 65, 84, 65,
- 56, 1, 0, 0,104,153, 9, 7,189, 0, 0, 0, 1, 0, 0, 0,224,154, 9, 7, 80, 32, 11, 7, 32,174, 2, 7, 0, 0, 0, 0,
- 83, 67, 69, 78, 69, 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,
+ 56, 1, 0, 0, 0, 77,213, 2,192, 0, 0, 0, 1, 0, 0, 0,104, 78,213, 2,152, 75,213, 2, 56, 94,137, 3, 0, 0, 0, 0,
+ 83, 67, 69, 78, 69, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 83, 67, 69, 78, 69, 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,
+ 83, 67, 69, 78, 69, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 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,
+ 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, 84,253,208, 0,105, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 83,254, 76, 1, 58, 0, 20, 0, 0, 0, 0, 0, 10, 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, 68, 65, 84, 65, 56, 1, 0, 0,224,154, 9, 7,189, 0, 0, 0, 1, 0, 0, 0, 88,156, 9, 7,
-104,153, 9, 7,208,177, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,104, 78,213, 2,192, 0, 0, 0, 1, 0, 0, 0,208, 79,213, 2,
+ 0, 77,213, 2,248, 94,137, 3, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 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, 83, 67, 69, 78, 69, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 60,253,208, 0, 0, 0, 0, 0, 0, 0, 4, 0, 2, 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,213,253, 76, 1,102, 0, 0, 0, 0, 0, 0, 0, 10, 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, 68, 65, 84, 65, 56, 1, 0, 0, 88,156, 9, 7,
-189, 0, 0, 0, 1, 0, 0, 0,208,157, 9, 7,224,154, 9, 7,168,179, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78, 69, 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, 68, 65, 84, 65, 56, 1, 0, 0,208, 79,213, 2,
+192, 0, 0, 0, 1, 0, 0, 0, 56, 81,213, 2,104, 78,213, 2,184, 95,137, 3, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84,
+ 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84,
- 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 36,253,208, 0, 0, 0,
- 0, 0, 0, 0, 4, 0, 2, 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,
+ 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 84,253, 76, 1,105, 0,
+ 0, 0, 0, 0, 0, 0, 10, 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,
- 68, 65, 84, 65, 56, 1, 0, 0,208,157, 9, 7,189, 0, 0, 0, 1, 0, 0, 0, 72,159, 9, 7, 88,156, 9, 7,128,181, 2, 7,
- 0, 0, 0, 0, 83, 67, 69, 78, 69, 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, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 56, 1, 0, 0, 56, 81,213, 2,192, 0, 0, 0, 1, 0, 0, 0,160, 82,213, 2,208, 79,213, 2, 56, 97,137, 3,
+ 0, 0, 0, 0, 83, 67, 69, 78, 69, 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, 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, 83, 67, 69, 78, 69, 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, 0, 0, 0, 12,253,208, 0, 0, 0, 20, 0, 0, 0, 4, 0, 2, 0, 0, 0, 0, 0, 9, 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, 60,253, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 10, 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, 68, 65, 84, 65, 56, 1, 0, 0, 72,159, 9, 7,189, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0,208,157, 9, 7, 88,183, 2, 7, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,160, 82,213, 2,192, 0, 0, 0, 1, 0, 0, 0,
+ 8, 84,213, 2, 56, 81,213, 2,248, 97,137, 3, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,112,111,115,116, 95,112,114,
+111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,112,111,115,116, 95,112,114,
+111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 85,110,105,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,253, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 10, 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,244,252,208, 0, 0, 0, 0, 0, 0, 0, 4, 0, 3, 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, 68, 65, 84, 65, 56, 1, 0, 0,
+ 8, 84,213, 2,192, 0, 0, 0, 1, 0, 0, 0,112, 85,213, 2,160, 82,213, 2,184, 98,137, 3, 0, 0, 0, 0, 83, 67, 69, 78,
+ 69, 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, 0, 83, 67, 69, 78,
+ 69, 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, 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, 12,253,
+ 76, 1, 0, 0, 20, 0, 0, 0, 4, 0, 10, 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, 68, 65, 84, 65,224, 0, 0, 0,
-192,160, 9, 7,158, 0, 0, 0, 1, 0, 0, 0,120,148, 10, 7, 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, 68, 65, 84, 65, 56, 1, 0, 0,112, 85,213, 2,192, 0, 0, 0, 1, 0, 0, 0,112,166,138, 3, 8, 84,213, 2,
+120, 99,137, 3, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 85,110,105,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,244,252, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 10, 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, 2, 0, 1, 0, 0, 0, 0, 0, 80,175, 11, 7,
-255, 20, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,224,161, 9, 7,191, 0, 0, 0, 1, 0, 0, 0,
- 40,144, 10, 7, 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, 0, 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, 68, 65, 84, 65,248, 0, 0, 0,
- 40,144, 10, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,224,161, 9, 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, 68, 65, 84, 65, 56, 1, 0, 0,112,166,138, 3,192, 0, 0, 0,
+ 1, 0, 0, 0, 8,165,138, 3,112, 85,213, 2, 56,100,137, 3, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,107,101,121,
+105,110,103, 95,115,101,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,107,101,121,
+105,110,103, 95,115,101,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75,101,121,105,110,103, 32, 83,101,116,115, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,252, 76, 1, 0, 0, 0, 0, 0, 0,
+ 4, 0, 2, 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, 68, 65, 84, 65,
+ 56, 1, 0, 0, 8,165,138, 3,192, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,112,166,138, 3,184,101,137, 3, 0, 0, 0, 0,
+ 83, 67, 69, 78, 69, 95, 80, 84, 95,112,104,121,115,105, 99,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 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,
+ 83, 67, 69, 78, 69, 95, 80, 84, 95,112,104,121,115,105, 99,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 96,145, 10, 7, 68, 65, 84, 65,216, 2, 0, 0, 96,145, 10, 7,152, 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,
+ 71,114, 97,118,105,116,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 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,160,252, 76, 1, 36, 0, 20, 0, 0, 0, 0, 0, 3, 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, 68, 65, 84, 65,224, 0, 0, 0,216, 86,213, 2,161, 0, 0, 0, 1, 0, 0, 0, 64, 93,213, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0,120,148, 10, 7,153, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0,192,160, 9, 7,224,161, 9, 7, 40,144, 10, 7, 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, 56,192, 9, 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, 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, 68, 65, 84, 65, 96, 0, 0, 0,200, 33, 11, 7,
-190, 0, 0, 0, 1, 0, 0, 0, 48,124, 9, 7, 24, 23, 11, 7,208, 79, 10, 7,104, 25, 4, 7, 64,160, 4, 7, 88,147, 4, 7,
- 0, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 15, 15,216, 3, 72, 0, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,123, 92, 2, 24,152, 10, 7, 0,123, 9, 7,168,149, 10, 7,224,150, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0,
-176, 58, 5, 7,144, 59, 5, 7, 68, 65, 84, 65,248, 0, 0, 0,168,149, 10, 7,191, 0, 0, 0, 1, 0, 0, 0,224,150, 10, 7,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,128, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 56, 0, 0,118, 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,215, 3, 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,216, 3, 26, 0,216, 3,
- 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0,
- 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 3, 26, 0, 5, 0, 1, 0,
- 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,124, 92, 2,248, 23, 6, 7,248, 23, 6, 7, 0, 0, 0, 0,
- 0, 0, 0, 0, 96, 61, 5, 7,112, 62, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,224,150, 10, 7,
-191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,168,149, 10, 7, 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,215, 3, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0, 18, 0, 0, 0, 45, 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,216, 3, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0, 26, 0, 0, 0, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,216, 3, 46, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,123, 92, 2,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 64, 5, 7,120, 66, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65,180, 0, 0, 0, 24,152, 10, 7,168, 0, 0, 0, 1, 0, 0, 0, 0,123, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 6, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 16,153, 10, 7,191, 0, 0, 0, 1, 0, 0, 0,176,118, 9, 7,
- 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, 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, 68, 65, 84, 65,248, 0, 0, 0,176,118, 9, 7,
-191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16,153, 10, 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, 2, 0, 1, 0, 0, 0, 0, 0, 32,153,136, 3,255, 20, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+248, 0, 0, 0,232, 87,213, 2,194, 0, 0, 0, 1, 0, 0, 0, 16, 89,213, 2, 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,
+ 0, 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, 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,232,119, 9, 7,
- 68, 65, 84, 65,216, 2, 0, 0,232,119, 9, 7,152, 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, 68, 65, 84, 65,248, 0, 0, 0, 16, 89,213, 2,194, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+232, 87,213, 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,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, 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, 56, 90,213, 2, 68, 65, 84, 65,216, 2, 0, 0, 56, 90,213, 2,
+155, 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, 0, 0, 68, 65, 84, 65,240, 0, 0, 0, 0,123, 9, 7,153, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 24,152, 10, 7, 16,153, 10, 7,176,118, 9, 7, 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, 56,192, 9, 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, 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, 68, 65, 84, 65, 96, 0, 0, 0, 48,124, 9, 7,190, 0, 0, 0,
- 1, 0, 0, 0, 72,136, 9, 7,200, 33, 11, 7,104, 25, 4, 7,232,251, 3, 7,136,121, 4, 7, 64,160, 4, 7, 0, 0, 0, 0,
- 0, 0, 0, 0,215, 3, 0, 0, 73, 0, 0, 0,226, 2, 0, 0, 1, 1,216, 3,154, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-232,124, 92, 2, 24,135, 9, 7, 24,135, 9, 7,208,124, 9, 7,160,229, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 5, 7,
- 48, 69, 5, 7, 68, 65, 84, 65,248, 0, 0, 0,208,124, 9, 7,191, 0, 0, 0, 1, 0, 0, 0, 8,126, 9, 7, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 64, 90, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,118, 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,215, 3, 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,216, 3, 26, 0,216, 3, 26, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0, 73, 0, 0, 0,
- 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 3, 26, 0, 7, 0, 1, 0, 2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,132, 92, 2, 32, 77,104, 2, 32, 77,104, 2, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 71, 5, 7,152, 72, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 8,126, 9, 7,191, 0, 0, 0,
- 1, 0, 0, 0, 48,130, 9, 7,208,124, 9, 7, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0,251,195, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 15, 67, 0, 0,251,195, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, 7, 2, 0, 0, 0, 0, 0, 0,
-142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, 7, 2, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4,
- 6, 0,160, 0, 8, 2,143, 0,246, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,159, 0, 0, 0,219, 0, 0, 0,226, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-160, 0, 8, 2, 8, 0, 5, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,129, 92, 2, 72,117,101, 2,
-136, 52,102, 2, 64,127, 9, 7,184,128, 9, 7,128, 74, 5, 7, 24, 76, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 56, 1, 0, 0, 64,127, 9, 7,189, 0, 0, 0, 1, 0, 0, 0,184,128, 9, 7, 0, 0, 0, 0,224,129, 92, 2, 0, 0, 0, 0,
- 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108, 95,115,104,101,108,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108, 95,115,104,101,108,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 84,111,111,108, 32, 83,104,101,108,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,196,255,143, 0, 36, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,184,128, 9, 7,189, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 64,127, 9, 7, 80,129, 4, 7, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101,
- 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101,
- 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 98,106,101, 99,116, 32, 84,111,111,108,115, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27,254,143, 0,145, 1, 0, 0, 0, 0, 0, 0, 7, 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, 68, 65, 84, 65,248, 0, 0, 0, 48,130, 9, 7,
-191, 0, 0, 0, 1, 0, 0, 0,152,219, 10, 7, 8,126, 9, 7, 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0,
- 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0,
- 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0,
- 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0, 99, 0, 0, 0,218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,160, 0,120, 0, 9, 0, 6, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,176,130, 92, 2,
-120, 73, 25, 7,120, 73, 25, 7, 32,218, 10, 7, 32,218, 10, 7, 0, 78, 5, 7,152, 79, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0, 32,218, 10, 7,189, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,131, 92, 2,
- 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 79,112,101,114, 97,116,111,114, 0,105,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,216,255,144, 0, 16, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,152,219, 10, 7,191, 0, 0, 0, 1, 0, 0, 0,
-160,229, 10, 7, 48,130, 9, 7, 0, 0, 0, 0, 0, 0, 75, 67, 0,128,118,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 67,
- 0,128, 27,196, 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, 18, 0, 0, 0,127, 2, 0, 0, 0, 0, 0, 0,202, 0, 0, 0,
- 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 18, 0, 0, 0,127, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,220, 0,
-128, 2,203, 0,110, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 3, 0, 0,
-215, 3, 0, 0, 99, 0, 0, 0,226, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
- 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48,126, 92, 2, 0, 0, 0, 0, 0, 0, 0, 0,
-208,220, 10, 7, 40,228, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,
-208,220, 10, 7,189, 0, 0, 0, 1, 0, 0, 0, 72,222, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
- 51, 68, 95, 80, 84, 95,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
- 51, 68, 95, 80, 84, 95,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 26,255,
-203, 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,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, 68, 65, 84, 65, 56, 1, 0, 0, 72,222, 10, 7,189, 0, 0, 0, 1, 0, 0, 0,192,223, 10, 7,208,220, 10, 7,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 71,114,101, 97,115,101, 32, 80,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65,240, 0, 0, 0, 64, 93,213, 2,156, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,216, 86,213, 2,232, 87,213, 2,
+ 16, 89,213, 2, 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,240,211,213, 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,200,254,203, 0, 58, 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, 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,
+ 1, 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, 68, 65, 84, 65, 96, 0, 0, 0,200,121,207, 2,193, 0, 0, 0, 1, 0, 0, 0, 88,122,207, 2, 56,121,207, 2,
+ 72,187,200, 2, 24,190,200, 2, 96,190,200, 2,136,189,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 15, 6, 0, 0, 0, 0, 0, 0,
+ 95, 0, 0, 0, 15, 15, 16, 6, 96, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,198,201, 2,176, 96,213, 2,240,102,213, 2,
+ 96, 94,213, 2,136, 95,213, 2, 0, 0, 0, 0, 0, 0, 0, 0, 64, 43,210, 2,128, 42,210, 2, 68, 65, 84, 65,248, 0, 0, 0,
+ 96, 94,213, 2,194, 0, 0, 0, 1, 0, 0, 0,136, 95,213, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,129, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0,194, 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, 15, 6, 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, 16, 6, 26, 0, 16, 6, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 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, 16, 6, 26, 0, 6, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 56,167,201, 2,136,163,133, 3,136,163,133, 3, 0, 0, 0, 0, 0, 0, 0, 0,144, 75,207, 2,128, 76,207, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,136, 95,213, 2,194, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 96, 94,213, 2,
+ 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, 15, 6, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
+ 0, 0, 0, 0, 15, 6, 0, 0, 18, 0, 0, 0, 69, 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, 16, 6, 70, 0, 0, 0, 0, 0, 0, 0,
+ 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, 6, 0, 0, 26, 0, 0, 0,
+ 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 6, 70, 0, 7, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,166,201, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+248, 76,207, 2,216, 78,207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,180, 0, 0, 0,176, 96,213, 2,171, 0, 0, 0,
+ 1, 0, 0, 0,240,102,213, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,
+152, 97,213, 2,194, 0, 0, 0, 1, 0, 0, 0,192, 98,213, 2, 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,
+ 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, 68, 65, 84, 65,248, 0, 0, 0,192, 98,213, 2,194, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,152, 97,213, 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, 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,232, 99,213, 2, 68, 65, 84, 65,216, 2, 0, 0,232, 99,213, 2,155, 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, 68, 65, 84, 65, 56, 1, 0, 0,192,223, 10, 7,189, 0, 0, 0,
- 1, 0, 0, 0, 56,225, 10, 7, 72,222, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,
-118,105,101,119, 95,112,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,
-118,105,101,119, 95,112,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86,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,129,253,203, 0, 47, 1, 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, 68, 65, 84, 65,
- 56, 1, 0, 0, 56,225, 10, 7,189, 0, 0, 0, 1, 0, 0, 0,176,226, 10, 7,192,223, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0,
- 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119, 95,100,105,115,112,108, 97,121, 0, 0, 0, 0, 0, 0, 0, 0,
+240, 0, 0, 0,240,102,213, 2,156, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,176, 96,213, 2,152, 97,213, 2,192, 98,213, 2,
+ 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,240,211,213, 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, 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, 1, 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,
+ 68, 65, 84, 65, 96, 0, 0, 0, 88,122,207, 2,193, 0, 0, 0, 1, 0, 0, 0,232,122,207, 2,200,121,207, 2, 24,190,200, 2,
+104,188,200, 2,208,189,200, 2, 96,190,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 15, 6, 0, 0, 97, 0, 0, 0,187, 3, 0, 0,
+ 1, 1, 16, 6, 91, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,198,201, 2,232,151,213, 2,232,151,213, 2, 16,104,213, 2,
+184,147,213, 2, 0, 0, 0, 0, 0, 0, 0, 0,128, 45,210, 2,160, 43,210, 2, 68, 65, 84, 65,248, 0, 0, 0, 16,104,213, 2,
+194, 0, 0, 0, 1, 0, 0, 0, 56,105,213, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 68, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0, 0, 0,194, 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, 15, 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, 16, 6, 26, 0, 16, 6, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 15, 6, 0, 0, 97, 0, 0, 0,122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 16, 6, 26, 0, 8, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,170,201, 2,
+ 32,165,133, 3, 32,165,133, 3, 0, 0, 0, 0, 0, 0, 0, 0, 80, 79,207, 2,184, 80,207, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65,248, 0, 0, 0, 56,105,213, 2,194, 0, 0, 0, 1, 0, 0, 0, 48,109,213, 2, 16,104,213, 2, 0, 0, 0, 0,
+ 0, 0, 15, 67, 0,192, 45,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0,192, 45,196, 0, 0, 0, 0,143, 0, 0, 0,
+160, 0, 0, 0, 18, 0, 0, 0,200, 2, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+142, 0, 0, 0, 18, 0, 0, 0,200, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,201, 2,143, 0,183, 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,159, 0, 0, 0,243, 0, 0, 0,187, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0,201, 2, 9, 0, 5, 0, 11, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,232,168,201, 2, 80,168,133, 3,184,166,133, 3, 96,106,213, 2,200,107,213, 2, 48, 81,207, 2,
+232, 78,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 96,106,213, 2,192, 0, 0, 0, 1, 0, 0, 0,
+200,107,213, 2, 0, 0, 0, 0, 56, 64,201, 2, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108, 95,115,
+104,101,108,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108, 95,115,
+104,101,108,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,111,111,108, 32, 83,104,101,108,102, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,196,255,143, 0, 36, 0, 0, 0, 0, 0, 0, 0, 34, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119, 95,100,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,
- 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, 68, 65, 84, 65, 56, 1, 0, 0,
+200,107,213, 2,192, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 96,106,213, 2,112,160,135, 3, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 98,106,101,
+ 99,116, 32, 84,111,111,108,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52,254,
+143, 0,120, 1, 0, 0, 0, 0, 0, 0, 11, 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, 68, 65, 84, 65,248, 0, 0, 0, 48,109,213, 2,194, 0, 0, 0, 1, 0, 0, 0,192,111,213, 2, 56,105,213, 2,
+ 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0,
+143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
+ 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0,123, 0, 0, 0,
+242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0,120, 0, 10, 0, 6, 0, 34, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,169,201, 2,232,169,133, 3,232,169,133, 3, 88,110,213, 2, 88,110,213, 2,
+ 96, 79,210, 2,200, 80,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 88,110,213, 2,192, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 64,201, 2, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97,
+115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97,
+115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,112,101,114, 97,116,111,114, 0,105,116,109,
+111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,255,144, 0, 16, 0, 0, 0, 0, 0,
+ 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+248, 0, 0, 0,192,111,213, 2,194, 0, 0, 0, 1, 0, 0, 0,184,147,213, 2, 48,109,213, 2, 0, 0, 0, 0, 0, 0, 75, 67,
+ 0,128,118,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 67, 0,128, 27,196, 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0,
+ 18, 0, 0, 0,127, 2, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0,
+ 18, 0, 0, 0,127, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64,
+ 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,220, 0,128, 2,203, 0,110, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 6, 0, 0, 15, 6, 0, 0,123, 0, 0, 0,187, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 88,168,201, 2, 0, 0, 0, 0, 0, 0, 0, 0,232,112,213, 2, 8,120,213, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,232,112,213, 2,192, 0, 0, 0, 1, 0, 0, 0, 80,114,213, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,111, 98,106,101, 99,116, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 66,252,203, 0, 39, 1, 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, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,111, 98,106,101, 99,116, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 68, 65, 84, 65, 56, 1, 0, 0,176,226, 10, 7,189, 0, 0, 0, 1, 0, 0, 0, 40,228, 10, 7,
- 56,225, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119, 95,109,101,115,
-104,100,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, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119, 95,109,101,115,
-104,100,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, 77,101,115,104, 32, 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, 26,255,203, 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,254,250,203, 0,104, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 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, 40,228, 10, 7,
-189, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,176,226, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
- 84, 95, 98, 97, 99,107,103,114,111,117,110,100, 95,105,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, 68, 65, 84, 65, 56, 1, 0, 0, 80,114,213, 2,
+192, 0, 0, 0, 1, 0, 0, 0,208,115,213, 2,232,112,213, 2, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
+ 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
- 84, 95, 98, 97, 99,107,103,114,111,117,110,100, 95,105,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, 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, 42,252,203, 0, 0, 0,
- 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65,248, 0, 0, 0,160,229, 10, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,152,219, 10, 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,215, 3, 0, 0, 99, 0, 0, 0,226, 2, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 3,128, 2, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,144,125, 92, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 81, 5, 7,
- 40, 84, 5, 7, 0, 0, 0, 0, 0,132, 9, 7, 68, 65, 84, 65,216, 2, 0, 0, 0,132, 9, 7,152, 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, 1, 64,215, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 28, 13,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, 74,215, 76,190, 0, 0, 0, 0,
-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,248,146,157,190,223,235, 46,191,247,217, 46,191,119,253, 69, 63,197,146,157, 62,220,235, 46, 63,244,217, 46, 63,
- 65,228, 68, 50,109,234,207, 63,107,145,132,190,217,131,132,190, 0, 0, 0, 0, 0, 0, 0, 0, 18,177,136, 65,152, 60,138, 65,
-252,128, 37, 63,186,128, 37, 63, 0, 0,180, 53, 0, 0, 60, 52,154,225,222,189,131,225,222, 61,139, 11, 19, 63, 0, 0,144, 51,
- 25,255,107,194, 1,255,107, 66,239,218,178,193,208,247,159,192,220, 91,105, 66,197, 91,105,194, 49,219,176, 65, 50, 8,160, 64,
-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,248,146,157,190,223,235, 46,191,247,217, 46,191,119,253, 69, 63,197,146,157, 62,220,235, 46, 63,244,217, 46, 63,
- 65,228, 68, 50,109,234,207, 63,107,145,132,190,217,131,132,190, 0, 0, 0, 0, 0, 0, 0, 0, 18,177,136, 65,152, 60,138, 65,
-166, 33, 26, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,166, 33, 26, 64, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,166, 33, 26, 64, 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,
- 83,146,243, 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, 68, 65, 84, 65,240, 0, 0, 0,
- 24,135, 9, 7,153, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 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, 56,192, 9, 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, 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,205,204,204, 61, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 10, 0, 0, 0, 0, 0, 1, 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, 68, 65, 84, 65,
- 96, 0, 0, 0, 72,136, 9, 7,190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48,124, 9, 7, 32, 26, 15, 7,136,121, 4, 7,
- 48, 16, 4, 7,176,183, 3, 7, 0, 0, 0, 0,217, 3, 0, 0,186, 4, 0, 0, 73, 2, 0, 0,226, 2, 0, 0, 3, 3,226, 0,
-154, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,121, 92, 2, 88,139, 9, 7, 24,238, 10, 7,232,136, 9, 7, 32,138, 9, 7,
- 0, 0, 0, 0, 0, 0, 0, 0,120, 86, 5, 7, 88, 87, 5, 7, 68, 65, 84, 65,248, 0, 0, 0,232,136, 9, 7,191, 0, 0, 0,
- 1, 0, 0, 0, 32,138, 9, 7, 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, 98, 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,225, 0, 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,226, 0, 26, 0,226, 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,
-217, 3, 0, 0,186, 4, 0, 0, 73, 2, 0, 0, 98, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-226, 0, 26, 0, 11, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,122, 92, 2, 96,150, 25, 7,
- 96,150, 25, 7, 0, 0, 0, 0, 0, 0, 0, 0, 40, 89, 5, 7,176, 89, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
-248, 0, 0, 0, 32,138, 9, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,232,136, 9, 7, 0, 0, 0, 0, 0,128,131, 67,
- 0, 0,228,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 67, 0, 0,220,194, 0, 0, 0, 0,209, 0, 0, 0,226, 0, 0, 0,
- 18, 0, 0, 0,127, 0, 0, 0, 0, 0, 0, 0,208, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,208, 0, 0, 0,
- 18, 0, 0, 0,127, 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,226, 0,128, 0,209, 0,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,217, 3, 0, 0,186, 4, 0, 0, 99, 2, 0, 0,226, 2, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,226, 0,128, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,192,121, 92, 2,200,170, 25, 7,200,170, 25, 7, 0, 0, 0, 0, 0, 0, 0, 0,152, 91, 5, 7,168, 92, 5, 7,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 4, 1, 0, 0, 88,139, 9, 7,162, 0, 0, 0, 1, 0, 0, 0,112,231, 10, 7,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,176,125, 25, 7,176,125, 25, 7,
-216,143, 12, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 68, 65, 84, 65, 12, 0, 0, 0,216,143, 12, 7,214, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0,160,140, 9, 7,
- 68, 65, 84, 65,156, 0, 0, 0,160,140, 9, 7,213, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,160, 33, 10, 7,
- 19, 0, 0, 0, 1, 0, 1, 0,160, 33, 10, 7, 20, 0, 0, 0, 1, 0, 1, 0,160, 33, 10, 7, 21, 0, 1, 0, 1, 0, 1, 0,
-160, 33, 10, 7, 0, 0, 0, 0, 1, 0, 1, 0, 64, 39, 10, 7, 0, 0, 0, 0, 1, 0, 1, 0,224,195, 9, 7, 0, 0, 0, 0,
- 1, 0, 1, 0, 48, 21, 12, 7, 0, 0, 0, 0, 1, 0, 1, 0, 48,203, 9, 7, 0, 0, 0, 0, 1, 0, 1, 0,224, 45, 10, 7,
- 0, 0, 0, 0, 1, 0, 1, 0,136,199, 9, 7, 0, 0, 0, 0, 1, 0, 1, 0,208,240, 10, 7, 0, 0, 0, 0, 1, 0, 1, 0,
- 56,192, 9, 7, 0, 0, 0, 0, 1, 0, 1, 0,240,143, 9, 7, 68, 65, 84, 65,248, 0, 0, 0,128,141, 9, 7,191, 0, 0, 0,
- 1, 0, 0, 0,184,142, 9, 7, 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, 0, 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, 68, 65, 84, 65,
-248, 0, 0, 0,184,142, 9, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,128,141, 9, 7, 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,
- 0, 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,
+ 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71,114,101, 97,115,101, 32, 80,
+101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,254,203, 0, 58, 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, 68, 65, 84, 65,224, 0, 0, 0,112,231, 10, 7,158, 0, 0, 0, 1, 0, 0, 0, 24,238, 10, 7,
- 88,139, 9, 7,128,141, 9, 7,184,142, 9, 7, 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,
+ 68, 65, 84, 65, 56, 1, 0, 0,208,115,213, 2,192, 0, 0, 0, 1, 0, 0, 0, 56,117,213, 2, 80,114,213, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119, 95,112,114,111,112,101,114,116,105,101,115, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119, 95,112,114,111,112,101,114,116,105,101,115, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 86,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,129,253,203, 0, 47, 1, 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, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
-248, 0, 0, 0,144,232, 10, 7,191, 0, 0, 0, 1, 0, 0, 0,200,233, 10, 7, 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,
- 0, 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, 68, 65, 84, 65,248, 0, 0, 0,200,233, 10, 7,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
-144,232, 10, 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, 68, 65, 84, 65, 56, 1, 0, 0, 56,117,213, 2,192, 0, 0, 0, 1, 0, 0, 0,
+160,118,213, 2,208,115,213, 2, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119,
+ 95,100,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, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119,
+ 95,100,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, 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, 66,252,203, 0, 39, 1, 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, 68, 65, 84, 65, 56, 1, 0, 0,
+160,118,213, 2,192, 0, 0, 0, 1, 0, 0, 0, 8,120,213, 2, 56,117,213, 2, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119, 95,109,101,115,104,100,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, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95, 51,100,118,105,101,119, 95,109,101,115,104,100,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, 77,101,115,104,
+ 32, 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,254,250,
+203, 0,104, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 8,120,213, 2,192, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,160,118,213, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 98, 97, 99,107,103,114,111,117,110,100, 95,105,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, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95, 98, 97, 99,107,103,114,111,117,110,100, 95,105,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, 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, 42,252,203, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,184,147,213, 2,194, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0,192,111,213, 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, 15, 6, 0, 0,123, 0, 0, 0,187, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 6, 65, 3, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,167,201, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 81,210, 2,176, 89,210, 2, 0, 0, 0, 0,224,148,213, 2, 68, 65, 84, 65,
+216, 2, 0, 0,224,148,213, 2,155, 0, 0, 0, 1, 0, 0, 0,255,255,139, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,144,107, 2, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 13,128,191, 0, 0,128,191,
+ 0, 0, 0, 0, 0, 0, 0, 0, 74,215, 76,190, 0, 0, 0, 0,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, 99,253, 69, 63,212,242,190,190,223,235, 46,191,247,217, 46,191,
+117,253, 69, 63,151,242,190, 62,220,235, 46, 63,244,217, 46, 63, 64,228, 68, 50,223,243,251, 63,107,145,132,190,217,131,132,190,
+ 0, 0, 0, 0, 0, 0, 0, 0, 18,177,136, 65,152, 60,138, 65,252,128, 37, 63,190,128, 37, 63, 0, 0,172, 53, 0, 0, 52, 52,
+ 40,237,183,189, 22,237,183, 61, 53,176,242, 62, 0, 0,160, 50, 25,255,107,194, 2,255,107, 66,239,218,178,193,209,247,159,192,
+220, 91,105, 66,198, 91,105,194, 49,219,176, 65, 51, 8,160, 64,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, 99,253, 69, 63,212,242,190,190,223,235, 46,191,247,217, 46,191,
+117,253, 69, 63,151,242,190, 62,220,235, 46, 63,244,217, 46, 63, 64,228, 68, 50,223,243,251, 63,107,145,132,190,217,131,132,190,
+ 0, 0, 0, 0, 0, 0, 0, 0, 18,177,136, 65,152, 60,138, 65,240,113,195, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,240,113,195, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,113,195, 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,240,109,154, 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, 68, 65, 84, 65,240, 0, 0, 0,232,151,213, 2,156, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 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,240,211,213, 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, 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,205,204,204, 61,
+ 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0,
+ 7, 0, 10, 0, 0, 0, 0, 0, 1, 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, 68, 65, 84, 65, 96, 0, 0, 0,232,122,207, 2,193, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 88,122,207, 2,168,190,200, 2,208,189,200, 2,176,188,200, 2,240,190,200, 2, 0, 0, 0, 0, 17, 6, 0, 0,
+110, 7, 0, 0,245, 2, 0, 0,187, 3, 0, 0, 3, 3, 94, 1,199, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,164,201, 2,
+ 88,155,213, 2,184,193,213, 2, 8,153,213, 2, 48,154,213, 2, 0, 0, 0, 0, 0, 0, 0, 0,160, 46,210, 2,224, 45,210, 2,
+ 68, 65, 84, 65,248, 0, 0, 0, 8,153,213, 2,194, 0, 0, 0, 1, 0, 0, 0, 48,154,213, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,180, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,175, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 93, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 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, 94, 1, 26, 0, 94, 1, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 6, 0, 0,110, 7, 0, 0,245, 2, 0, 0, 14, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 26, 0, 12, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 24,166,201, 2,128,171,133, 3,128,171,133, 3, 0, 0, 0, 0, 0, 0, 0, 0, 40, 90,210, 2,
+160, 90,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 48,154,213, 2,194, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 8,153,213, 2, 0, 0, 0, 0, 0,128,131, 67, 0, 0,228,194, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,166, 67,
+ 0, 0, 27,195, 0, 0, 0, 0, 77, 1, 0, 0, 94, 1, 0, 0, 18, 0, 0, 0,172, 0, 0, 0, 0, 0, 0, 0, 76, 1, 0, 0,
+ 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 76, 1, 0, 0, 18, 0, 0, 0,172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 18, 0, 0, 0, 2, 0, 3, 3, 0, 0, 0, 4, 6, 0, 94, 1,
+173, 0, 77, 1,155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 6, 0, 0,
+110, 7, 0, 0, 15, 3, 0, 0,187, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1,173, 0,
+ 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,112,165,201, 2, 96, 83,133, 3, 96, 83,133, 3,
+ 0, 0, 0, 0, 0, 0, 0, 0, 24, 91,210, 2, 8, 92,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 4, 1, 0, 0,
+ 88,155,213, 2,165, 0, 0, 0, 1, 0, 0, 0,160,189,213, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 24, 6,139, 3, 24, 6,139, 3,144,156,213, 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, 1, 0, 0, 0, 68, 65, 84, 65, 12, 0, 0, 0,144,156,213, 2,217, 0, 0, 0,
+ 1, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0,208,156,213, 2, 68, 65, 84, 65,156, 0, 0, 0,208,156,213, 2,216, 0, 0, 0,
+ 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,216,194,213, 2, 19, 0, 0, 0, 1, 0, 1, 0,216,194,213, 2, 20, 0, 0, 0,
+ 1, 0, 1, 0,216,194,213, 2, 21, 0, 1, 0, 1, 0, 1, 0,216,194,213, 2, 0, 0, 0, 0, 1, 0, 1, 0,128,205,213, 2,
+ 0, 0, 0, 0, 1, 0, 1, 0,168,215,213, 2, 0, 0, 0, 0, 1, 0, 1, 0, 80,184,210, 2, 0, 0, 0, 0, 1, 0, 1, 0,
+ 24,223,213, 2, 0, 0, 0, 0, 1, 0, 1, 0, 32,227,213, 2, 0, 0, 0, 0, 1, 0, 1, 0, 96,219,213, 2, 0, 0, 0, 0,
+ 1, 0, 1, 0,152,202,213, 2, 0, 0, 0, 0, 1, 0, 1, 0,240,211,213, 2, 0, 0, 0, 0, 1, 0, 1, 0,240,201,213, 2,
+ 68, 65, 84, 65,248, 0, 0, 0,184,157,213, 2,194, 0, 0, 0, 1, 0, 0, 0,224,158,213, 2, 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, 0, 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, 68, 65, 84, 65,248, 0, 0, 0,224,158,213, 2,194, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0,184,157,213, 2, 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, 0, 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, 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, 68, 65, 84, 65,224, 0, 0, 0,
+160,189,213, 2,161, 0, 0, 0, 1, 0, 0, 0,184,193,213, 2, 88,155,213, 2,184,157,213, 2,224,158,213, 2, 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,235, 10, 7, 68, 65, 84, 65,216, 2, 0, 0, 0,235, 10, 7,
-152, 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, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 8,160,213, 2,194, 0, 0, 0, 1, 0, 0, 0,
+ 48,161,213, 2, 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, 0, 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, 68, 65, 84, 65,248, 0, 0, 0,
+ 48,161,213, 2,194, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 8,160,213, 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,
- 68, 65, 84, 65,240, 0, 0, 0, 24,238, 10, 7,153, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,112,231, 10, 7,144,232, 10, 7,
-200,233, 10, 7, 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, 56,192, 9, 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, 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, 83, 67, 0, 0, 92, 5, 0, 0,160, 33, 10, 7,150, 0, 0, 0, 1, 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, 56,192, 9, 7, 64, 39, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0,
-120,188, 2, 7, 48,241, 2, 7,120,188, 2, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,239, 10, 7,152,230,101, 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, 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, 48,231, 9, 7, 48,231, 9, 7, 0, 0, 0, 0,
- 0, 0,200, 66, 0, 0,200, 66, 0, 0,128, 63, 0, 0,128, 63, 1, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 5, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0, 0, 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,
+176,190,213, 2, 68, 65, 84, 65,216, 2, 0, 0,176,190,213, 2,155, 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, 68, 65, 84, 65,240, 0, 0, 0,184,193,213, 2,156, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0,160,189,213, 2, 8,160,213, 2, 48,161,213, 2, 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,240,211,213, 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, 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, 1, 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, 83, 67, 0, 0,108, 5, 0, 0,216,194,213, 2,
+153, 0, 0, 0, 1, 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,
+240,211,213, 2,128,205,213, 2, 0, 0, 0, 0, 0, 0, 0, 0, 48, 74,208, 2,208, 74,208, 2, 48, 74,208, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+120,200,213, 2,232,140,138, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68,172, 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, 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, 48, 66,207, 2,
+ 48, 66,207, 2, 0, 0, 0, 0, 0, 0,200, 66, 0, 0,200, 66, 0, 0,128, 63, 0, 0,128, 63, 1, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 5, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 98, 97, 99,107, 98,117,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 98, 97,
- 99,107, 98,117,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 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,116,109,112,
- 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 47,116,109,112, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 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, 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,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, 0, 0, 0, 0,
- 0, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-152, 24, 11, 7, 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, 0, 0, 0, 0, 0, 0, 0, 0,205,204, 28, 65, 0, 0, 0, 0, 32, 0, 32, 0, 1, 0, 0, 0, 0, 0, 0, 0,
-128, 0, 5, 0, 60, 0, 5, 0, 1, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2,
-224, 1, 60, 0, 32, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0,180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 5, 0,128, 7, 56, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 28, 0, 0, 0,120,188, 2, 7,
-128, 0, 0, 0, 1, 0, 0, 0,136,223, 2, 7, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,236, 1, 64, 1,
-224,195, 9, 7, 68, 65, 84, 65, 28, 0, 0, 0,136,223, 2, 7,128, 0, 0, 0, 1, 0, 0, 0, 48,241, 2, 7,120,188, 2, 7,
- 1, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0,121, 2, 10, 2,136,199, 9, 7, 68, 65, 84, 65, 28, 0, 0, 0, 48,241, 2, 7,
-128, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,136,223, 2, 7, 1, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 38, 2, 28, 2,
- 56,192, 9, 7, 68, 65, 84, 65, 72, 1, 0, 0, 72,239, 10, 7,147, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68,172, 0, 0, 0, 0,128, 63,102,166,171, 67, 0, 0,128, 63, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,187,200, 2, 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, 0, 0, 0, 0, 0, 0, 0, 0,205,204, 28, 65,
+ 0, 0, 0, 0, 32, 0, 32, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 0, 5, 0, 60, 0, 5, 0, 1, 0, 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2,224, 1, 60, 0, 32, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0,
+180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 0,128, 7, 56, 4, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195,245, 28,193, 1, 0, 0, 0, 68, 65, 84, 65, 28, 0, 0, 0, 48, 74,208, 2,
+130, 0, 0, 0, 1, 0, 0, 0,128, 74,208, 2, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 8, 3,160, 1,
+168,215,213, 2, 68, 65, 84, 65, 28, 0, 0, 0,128, 74,208, 2,130, 0, 0, 0, 1, 0, 0, 0,208, 74,208, 2, 48, 74,208, 2,
+ 1, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0,231, 3,223, 2, 96,219,213, 2, 68, 65, 84, 65, 28, 0, 0, 0,208, 74,208, 2,
+130, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 74,208, 2, 1, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0,100, 3,251, 2,
+240,211,213, 2, 68, 65, 84, 65, 72, 1, 0, 0,120,200,213, 2,149, 0, 0, 0, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -687,18 +708,18 @@ char datatoc_B_blend[]= {
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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 72, 0, 0, 0, 48,231, 9, 7,133, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 32, 82,101,
+ 68, 65, 84, 65, 72, 0, 0, 0, 48, 66,207, 2,135, 0, 0, 0, 1, 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,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,
-120, 0, 0, 0,240,143, 9, 7, 29, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+120, 0, 0, 0,240,201,213, 2, 29, 0, 0, 0, 1, 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, 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, 76, 65, 0, 0,124, 1, 0, 0,208,240, 10, 7, 41, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 76, 65, 0, 0,124, 1, 0, 0,152,202,213, 2, 41, 0, 0, 0, 1, 0, 0, 0, 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, 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, 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,144,242, 10, 7,
+ 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, 72,204,213, 2,
2, 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,
@@ -706,20 +727,20 @@ 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 4, 7, 68, 65, 84, 65, 8, 1, 0, 0,
-144,242, 10, 7, 64, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 75,208, 2, 68, 65, 84, 65, 8, 1, 0, 0,
+ 72,204,213, 2, 71, 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,112,236, 2, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,243, 4, 53,191,242, 4, 53, 63,242, 4, 53,191,243, 4, 53, 63,248, 51,213, 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,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,112,236, 2, 7,
- 62, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0, 0, 42, 4, 7, 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, 87, 79, 0, 0,104, 1, 0, 0, 64, 39, 10, 7,
-127, 0, 0, 0, 1, 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,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,248, 51,213, 2,
+ 69, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 32, 0, 0, 0, 32, 75,208, 2, 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, 87, 79, 0, 0,104, 1, 0, 0,128,205,213, 2,
+129, 0, 0, 0, 1, 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,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,
@@ -730,23 +751,24 @@ char datatoc_B_blend[]= {
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, 84, 88, 0, 0,120, 0, 0, 0,232, 40, 10, 7, 27, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 88, 0, 0,120, 0, 0, 0, 24,207,213, 2, 27, 0, 0, 0,
1, 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, 7, 0, 0, 0,
- 1, 0, 0, 0, 96,142, 2, 7, 96,142, 2, 7, 96,142, 2, 7, 96,142, 2, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,160, 41, 10, 7,255,255,255,255, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 24, 0, 0, 0, 96,142, 2, 7, 25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104,248, 11, 7, 0, 0, 0, 0,
- 0, 0, 0, 0, 69, 69, 82, 70, 68, 65, 84, 65, 4, 0, 0, 0,104,248, 11, 7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
- 79, 66, 0, 0,100, 3, 0, 0, 56,192, 9, 7,118, 0, 0, 0, 1, 0, 0, 0,224,195, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 64, 52,213, 2, 64, 52,213, 2, 64, 52,213, 2, 64, 52,213, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,192,207,213, 2,255,255,255,255, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 24, 0, 0, 0, 64, 52,213, 2, 25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,180,207, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 69, 69, 82, 70, 68, 65, 84, 65, 4, 0, 0, 0, 80,180,207, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
+ 79, 66, 0, 0,136, 3, 0, 0,240,211,213, 2,118, 0, 0, 0, 1, 0, 0, 0,168,215,213, 2, 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, 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,240,143, 9, 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,240,201,213, 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,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,222,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,
@@ -758,122 +780,127 @@ char datatoc_B_blend[]= {
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, 1, 0, 2, 0, 1, 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, 1, 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, 1, 0, 0, 0,
- 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,100, 3, 0, 0,
-224,195, 9, 7,118, 0, 0, 0, 1, 0, 0, 0,136,199, 9, 7, 56,192, 9, 7, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,149, 25, 7, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 48, 21, 12, 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,224,127, 10, 7,
-168,144, 9, 7, 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,128, 63, 0, 64, 1, 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,120,137, 25, 7,152,143, 25, 7, 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, 4, 0, 0, 0,224,127, 10, 7, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0,168,144, 9, 7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 79, 66, 0, 0,100, 3, 0, 0,136,199, 9, 7,118, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,224,195, 9, 7, 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, 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,208,240, 10, 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,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, 35,233,134, 49,251,110, 17,179, 0, 0, 0, 0, 49,158,141, 50, 1, 0,128, 63,
-126,214,237, 50, 0, 0, 0, 0,155,248, 28,178,199,139, 96,177,254,255,127, 63, 0, 0, 0, 0, 80,136,159,178,192, 4,158,178,
-209,114,143,179, 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, 79, 66, 0, 0,
+136, 3, 0, 0,168,215,213, 2,118, 0, 0, 0, 1, 0, 0, 0, 96,219,213, 2,240,211,213, 2, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,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, 1, 0, 0, 0,
- 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,184, 2, 0, 0,
- 48,203, 9, 7, 44, 0, 0, 0, 1, 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,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,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 10,215, 35, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-205,204, 76, 62,205,204, 76, 62, 0, 0, 8, 0, 1, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,160, 63, 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 2, 0, 2, 0, 50, 0, 0, 6,
- 0, 0,128, 63, 0, 0,128, 63, 18, 0, 18, 0, 10,215,163, 59, 10,215,163, 59, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 67, 0, 0, 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,128, 63, 0, 0,128, 63, 40,206, 9, 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,232,154,136, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 80,184,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+136,180,207, 2,192,180,207, 2, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,144, 2, 7, 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,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,
+ 1, 0, 4, 0, 1, 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,128, 63, 0, 64, 1, 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, 48,179,210, 2,120,180,210, 2, 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, 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0,
+136,180,207, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0,192,180,207, 2, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 79, 66, 0, 0,136, 3, 0, 0, 96,219,213, 2,118, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+168,215,213, 2, 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, 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,152,202,213, 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,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 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, 35,233,134, 49,251,110, 17,179, 0, 0, 0, 0,
+ 49,158,141, 50, 1, 0,128, 63,126,214,237, 50, 0, 0, 0, 0,155,248, 28,178,199,139, 96,177,254,255,127, 63, 0, 0, 0, 0,
+ 80,136,159,178,192, 4,158,178,209,114,143,179, 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, 1, 0, 4, 0, 1, 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, 64, 1, 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, 68, 65, 84, 65,144, 0, 0, 0, 40,206, 9, 7, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,224, 45, 10, 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, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0,144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 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, 32, 0, 0, 0, 56,144, 2, 7, 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, 84, 69, 0, 0,
- 40, 1, 0, 0,224, 45, 10, 7, 39, 0, 0, 0, 1, 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,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, 0, 0, 0, 0,
- 8, 0, 0, 0, 1, 0, 1, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
-205,204,204, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 77, 69, 0, 0, 24, 1, 0, 0,
- 48, 21, 12, 7, 54, 0, 0, 0, 1, 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, 80,131, 2, 7, 80, 27, 12, 7, 0, 0, 0, 0,
- 0, 0, 0, 0,248,206, 9, 7, 72, 47, 10, 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,136, 22, 12, 7, 1, 0, 0, 0, 5, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 24, 12, 7,
- 1, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 25, 12, 7, 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, 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, 68, 65, 84, 65, 4, 0, 0, 0, 80,131, 2, 7, 0, 0, 0, 0, 1, 0, 0, 0, 48,203, 9, 7, 68, 65, 84, 65,
- 84, 1, 0, 0,136, 22, 12, 7, 67, 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, 1, 0, 0, 0, 0, 0, 0, 0, 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,160, 2, 0, 0, 24,223,213, 2, 44, 0, 0, 0, 1, 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,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,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 10,215, 35, 60, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, 50, 0,205,204, 76, 62, 0, 0, 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, 67, 0, 0, 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,128, 63, 0, 0,128, 63,
+232,225,213, 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,112, 75,208, 2, 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, 68, 65, 84, 65, 8, 1, 0, 0,
+232,225,213, 2, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,227,213, 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, 1, 2, 3, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,144, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 32, 0, 0, 0,112, 75,208, 2,
+ 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, 84, 69, 0, 0, 40, 1, 0, 0, 32,227,213, 2, 39, 0, 0, 0, 1, 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,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, 0, 0, 0, 0, 8, 0, 0, 0, 1, 0, 1, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,205,204,204, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 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, 77, 69, 0, 0, 24, 1, 0, 0, 80,184,210, 2, 54, 0, 0, 0, 1, 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,
+248,180,207, 2,104, 32,131, 3, 0, 0, 0, 0, 0, 0, 0, 0,120,228,213, 2,128, 0,131, 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, 72,140,210, 2, 1, 0, 0, 0, 5, 0, 0, 0, 24, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,208,141,210, 2, 1, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 88,143,210, 2, 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, 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, 68, 65, 84, 65, 4, 0, 0, 0,248,180,207, 2, 0, 0, 0, 0,
+ 1, 0, 0, 0, 24,223,213, 2, 68, 65, 84, 65, 84, 1, 0, 0, 72,140,210, 2, 74, 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,248,206, 9, 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,120,228,213, 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,
@@ -882,16 +909,16 @@ 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, 68, 65, 84, 65,192, 0, 0, 0,248,206, 9, 7, 60, 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,127, 1, 0, 0, 0, 0, 0,128, 63, 0, 0,128,191, 0, 0,128,191,230, 73, 26,182,
- 26,182,255,127, 1, 0, 0, 0, 1, 0,128,191,253,255,127,191, 0, 0,128,191, 26,182, 26,182, 26,182,255,127, 1, 0, 0, 0,
-250,255,127,191, 3, 0,128, 63, 0, 0,128,191, 26,182,230, 73, 26,182,255,127, 1, 0, 0, 0, 4, 0,128, 63,247,255,127, 63,
- 0, 0,128, 63,230, 73,230, 73,230, 73,255,127, 1, 0, 0, 0,245,255,127, 63, 5, 0,128,191, 0, 0,128, 63,230, 73, 26,182,
-230, 73,255,127, 1, 0, 0, 0, 3, 0,128,191,250,255,127,191, 0, 0,128, 63, 26,182, 26,182,230, 73,255,127, 1, 0, 0, 0,
-255,255,127,191, 0, 0,128, 63, 0, 0,128, 63, 26,182,230, 73,230, 73,255,127, 1, 0, 0, 0, 68, 65, 84, 65, 84, 1, 0, 0,
- 32, 24, 12, 7, 67, 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, 68, 65, 84, 65,192, 0, 0, 0,120,228,213, 2, 60, 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,127, 1, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128,191, 0, 0,128,191,230, 73, 26,182, 26,182,255,127, 1, 0, 0, 0, 1, 0,128,191,253,255,127,191, 0, 0,128,191,
+ 26,182, 26,182, 26,182,255,127, 1, 0, 0, 0,250,255,127,191, 3, 0,128, 63, 0, 0,128,191, 26,182,230, 73, 26,182,255,127,
+ 1, 0, 0, 0, 4, 0,128, 63,247,255,127, 63, 0, 0,128, 63,230, 73,230, 73,230, 73,255,127, 1, 0, 0, 0,245,255,127, 63,
+ 5, 0,128,191, 0, 0,128, 63,230, 73, 26,182,230, 73,255,127, 1, 0, 0, 0, 3, 0,128,191,250,255,127,191, 0, 0,128, 63,
+ 26,182, 26,182,230, 73,255,127, 1, 0, 0, 0,255,255,127,191, 0, 0,128, 63, 0, 0,128, 63, 26,182,230, 73,230, 73,255,127,
+ 1, 0, 0, 0, 68, 65, 84, 65, 84, 1, 0, 0,208,141,210, 2, 74, 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, 72, 47, 10, 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,128, 0,131, 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,
@@ -900,14 +927,15 @@ 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,
- 68, 65, 84, 65,144, 0, 0, 0, 72, 47, 10, 7, 57, 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, 84, 1, 0, 0,184, 25, 12, 7, 67, 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, 68, 65, 84, 65,144, 0, 0, 0,128, 0,131, 3, 57, 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, 84, 1, 0, 0, 88,143,210, 2, 74, 1, 0, 0,
+ 5, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 27, 12, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0,104, 32,131, 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,
@@ -915,28 +943,29 @@ 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,120, 0, 0, 0,
+104, 32,131, 3, 56, 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, 56, 11, 0, 0, 0, 94,252, 0,188, 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, 68, 65, 84, 65,120, 0, 0, 0, 80, 27, 12, 7, 56, 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, 56, 11, 0, 0,
- 0, 2, 68, 1,185, 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, 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, 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, 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, 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, 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, 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,
@@ -955,8 +984,8 @@ 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, 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, 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,
@@ -965,18 +994,17 @@ 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, 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,
+ 2, 0, 0, 0, 68,172, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 64, 0, 5, 0, 2, 0,
+104,229,213, 2,120, 44,131, 3,120,175,210, 2,120,175,210, 2, 24, 76,131, 3, 24, 76,131, 3, 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, 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, 2, 0, 0, 0, 68,172, 0, 0, 36, 0, 0, 0,
- 2, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 64, 0, 5, 0, 2, 0,168, 3, 10, 7, 40,207, 13, 7, 48, 93, 5, 7,
- 48, 93, 5, 7,128, 94, 5, 7,128, 94, 5, 7, 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,
@@ -985,817 +1013,830 @@ 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, 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,200, 21, 0, 0,104,229,213, 2,186, 0, 0, 0,
+ 1, 0, 0, 0,120, 44,131, 3, 0, 0, 0, 0, 68,101,102, 97,117,108,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,
+255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,
+255,255,255,255, 1, 0, 15, 0,241,255, 0, 0, 25, 25, 25,255,153,153,153,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,
+255,255,255,255, 1, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 86,128,194,255,255,255,255,255,255,255,255,255,
+ 0, 0, 0,255, 1, 0, 15, 0,241,255, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255, 0, 0, 0,255,
+255,255,255,255, 1, 0, 15, 0,241,255, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,
+255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,180,180,180,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,
+255,255,255,255, 1, 0,236,255, 0, 0, 0, 0, 25, 25, 25,255,180,180,180,255,153,153,153,255,128,128,128,255, 0, 0, 0,255,
+255,255,255,255, 1, 0,236,255, 0, 0, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255,255,255,255,255,
+204,204,204,255, 1, 0, 15, 0,241,255, 0, 0, 0, 0, 0,255, 63, 63, 63,255, 86,128,194,255,255,255,255,255, 0, 0, 0,255,
+ 0, 0, 0,255, 0, 0, 25, 0,236,255, 0, 0, 0, 0, 0,255, 25, 25, 25,230, 45, 45, 45,230,100,100,100,255,160,160,160,255,
+255,255,255,255, 0, 0, 25, 0,236,255, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255,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,128,128,128,255, 0, 0, 0,255,
+255,255,255,255, 1, 0, 5, 0,251,255, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255, 0, 0, 0,255, 0, 0, 0,255,
+ 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0,115,190, 76,255, 90,166, 51,255,240,235,100,255,215,211, 75,255,180, 0,255,255,
+153, 0,230,255, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,200, 21, 0, 0,168, 3, 10, 7,183, 0, 0, 0, 1, 0, 0, 0, 40,207, 13, 7, 0, 0, 0, 0,
- 68,101,102, 97,117,108,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 1, 0, 15, 0,241,255, 0, 0,
- 25, 25, 25,255,153,153,153,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0, 0, 0, 25, 0, 0, 0,
- 0, 0, 0,255, 70, 70, 70,255, 86,128,194,255,255,255,255,255,255,255,255,255, 0, 0, 0,255, 1, 0, 15, 0,241,255, 0, 0,
- 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255, 0, 0, 0,255,255,255,255,255, 1, 0, 15, 0,241,255, 0, 0,
- 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 25, 25,255,180,180,180,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0,
- 25, 25, 25,255,180,180,180,255,153,153,153,255,128,128,128,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0,
- 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255,255,255,255,255,204,204,204,255, 1, 0, 15, 0,241,255, 0, 0,
- 0, 0, 0,255, 63, 63, 63,255, 86,128,194,255,255,255,255,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 25, 0,236,255, 0, 0,
- 0, 0, 0,255, 25, 25, 25,230, 45, 45, 45,230,100,100,100,255,160,160,160,255,255,255,255,255, 0, 0, 25, 0,236,255, 0, 0,
- 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255,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,128,128,128,255, 0, 0, 0,255,255,255,255,255, 1, 0, 5, 0,251,255, 0, 0,
- 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0,
-115,190, 76,255, 90,166, 51,255,240,235,100,255,215,211, 75,255,180, 0,255,255,153, 0,230,255, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,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,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255,
- 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,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,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255,
- 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,173,173,173,255,127,112,112,100, 0, 0, 0, 0, 91, 91, 91,255,
- 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255,
- 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255,
- 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,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,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,143,143,143,255,198,119,119,255,255, 0, 0,255, 64, 64, 64,255,
- 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,173,173,173,255,127,112,112,100, 0, 0, 0, 0, 91, 91, 91,255,
- 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255,
- 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,200, 21, 0, 0, 40,207, 13, 7,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,168, 3, 10, 7, 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, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0,
- 0, 0, 0, 0, 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,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255,
+ 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,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,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, 0, 0, 0, 0,
- 0, 0, 0, 0, 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,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, 0, 0, 0, 0,
- 0, 0, 0, 0, 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,114,114,114,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,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,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, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 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,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, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,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,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, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,
+127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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, 76, 76, 76,255,
+ 0, 0, 0, 0,250,250,250,255, 15, 15, 15,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100,255,140, 25,255,250,250,250,255, 0, 0, 0,255,
+241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,
+112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255,
+ 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,
+241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,173,173,173,255,
+127,112,112,100, 0, 0, 0, 0, 91, 91, 91,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,
+241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,
+112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,
+241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,
+127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,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,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,143,143,143,255,
+198,119,119,255,255, 0, 0,255, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,
+241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,173,173,173,255,
+127,112,112,100, 0, 0, 0, 0, 91, 91, 91,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,
+241, 88, 0,255, 0, 0, 0, 40,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,155,155,155,160,100,100,100,255,108,105,111,255,104,106,117,255,105,117,110,255, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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,
-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,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,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,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,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,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, 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,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100,100,100,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,
+127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,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,114,114,114,255,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127,
+ 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,
+241, 88, 0,255, 0, 0, 0, 40,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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 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, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 0, 0,255,
-189, 17, 17,255,247, 10, 10,255, 0, 0, 0, 0,247, 64, 24,255,246,105, 19,255,250,153, 0,255, 0, 0, 0, 0, 30,145, 9,255,
- 89,183, 11,255,131,239, 29,255, 0, 0, 0, 0, 10, 54,148,255, 54,103,223,255, 94,193,239,255, 0, 0, 0, 0,169, 41, 78,255,
-193, 65,106,255,240, 93,145,255, 0, 0, 0, 0, 67, 12,120,255, 84, 58,163,255,135,100,213,255, 0, 0, 0, 0, 36,120, 90,255,
- 60,149,121,255,111,182,171,255, 0, 0, 0, 0, 75,112,124,255,106,134,145,255,155,194,205,255, 0, 0, 0, 0,244,201, 12,255,
-238,194, 54,255,243,255, 0,255, 0, 0, 0, 0, 30, 32, 36,255, 72, 76, 86,255,255,255,255,255, 0, 0, 0, 0,111, 47,106,255,
-152, 69,190,255,211, 48,214,255, 0, 0, 0, 0,108,142, 34,255,127,176, 34,255,187,239, 91,255, 0, 0, 0, 0,141,141,141,255,
-176,176,176,255,222,222,222,255, 0, 0, 0, 0,131, 67, 38,255,139, 88, 17,255,189,106, 17,255, 0, 0, 0, 0, 8, 49, 14,255,
- 28, 67, 11,255, 52, 98, 43,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 78, 65, 49,
- 28,222, 0, 0, 32, 80, 6, 7, 0, 0, 0, 0, 1, 0, 0, 0, 83, 68, 78, 65, 78, 65, 77, 69,212, 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,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, 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,114,111,116, 0,116,101,120,102,108, 97,103,
- 0, 99,111,108,111,114,109,111,100,101,108, 0,112,109, 97,112,116,111, 0,112,109, 97,112,116,111,110,101,103, 0,110,111,114,
-109, 97,112,115,112, 97, 99,101, 0,119,104,105, 99,104, 95,111,117,116,112,117,116, 0, 98,114,117,115,104, 95,109, 97,112, 95,
-109,111,100,101, 0,112, 97,100, 91, 55, 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,102, 97,108,108,111,102,102, 95,116,121,112,101, 0,102, 97,108,108,111,102,102, 95,115,111,102,116,110,
-101,115,115, 0,114, 97,100,105,117,115, 0, 99,111,108,111,114, 95,115,111,117,114, 99,101, 0,116,111,116,112,111,105,110,116,
-115, 0,112,100,112, 97,100, 0, 42,112,115,121,115, 0,112,115,121,115, 95, 99, 97, 99,104,101, 95,115,112, 97, 99,101, 0,111,
- 98, 95, 99, 97, 99,104,101, 95,115,112, 97, 99,101, 0,112,100,112, 97,100, 50, 91, 50, 93, 0, 42,112,111,105,110,116, 95,116,
-114,101,101, 0, 42,112,111,105,110,116, 95,100, 97,116, 97, 0,110,111,105,115,101, 95,115,105,122,101, 0,110,111,105,115,101,
- 95,100,101,112,116,104, 0,110,111,105,115,101, 95,105,110,102,108,117,101,110, 99,101, 0,110,111,105,115,101, 95, 98, 97,115,
-105,115, 0,112,100,112, 97,100, 51, 91, 51, 93, 0,110,111,105,115,101, 95,102, 97, 99, 0,115,112,101,101,100, 95,115, 99, 97,
-108,101, 0, 42, 99,111, 98, 97, 0,114,101,115,111,108, 91, 51, 93, 0,105,110,116,101,114,112, 95,116,121,112,101, 0,102,105,
-108,101, 95,102,111,114,109, 97,116, 0,105,110,116, 95,109,117,108,116,105,112,108,105,101,114, 0,115,116,105,108,108, 95,102,
-114, 97,109,101, 0,115,111,117,114, 99,101, 95,112, 97,116,104, 91, 50, 52, 48, 93, 0, 42,100, 97,116, 97,115,101,116, 0,110,
-111,105,115,101,115,105,122,101, 0,116,117,114, 98,117,108, 0, 98,114,105,103,104,116, 0, 99,111,110,116,114, 97,115,116, 0,
-114,102, 97, 99, 0,103,102, 97, 99, 0, 98,102, 97, 99, 0,102,105,108,116,101,114,115,105,122,101, 0,109,103, 95, 72, 0,109,
-103, 95,108, 97, 99,117,110, 97,114,105,116,121, 0,109,103, 95,111, 99,116, 97,118,101,115, 0,109,103, 95,111,102,102,115,101,
-116, 0,109,103, 95,103, 97,105,110, 0,100,105,115,116, 95, 97,109,111,117,110,116, 0,110,115, 95,111,117,116,115, 99, 97,108,
-101, 0,118,110, 95,119, 49, 0,118,110, 95,119, 50, 0,118,110, 95,119, 51, 0,118,110, 95,119, 52, 0,118,110, 95,109,101,120,
-112, 0,118,110, 95,100,105,115,116,109, 0,118,110, 95, 99,111,108,116,121,112,101, 0,110,111,105,115,101,100,101,112,116,104,
- 0,110,111,105,115,101,116,121,112,101, 0,110,111,105,115,101, 98, 97,115,105,115, 0,110,111,105,115,101, 98, 97,115,105,115,
- 50, 0,105,109, 97,102,108, 97,103, 0, 99,114,111,112,120,109,105,110, 0, 99,114,111,112,121,109,105,110, 0, 99,114,111,112,
-120,109, 97,120, 0, 99,114,111,112,121,109, 97,120, 0,116,101,120,102,105,108,116,101,114, 0, 97,102,109, 97,120, 0,120,114,
-101,112,101, 97,116, 0,121,114,101,112,101, 97,116, 0,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,
-101,110,118, 0, 42,112,100, 0, 42,118,100, 0,117,115,101, 95,110,111,100,101,115, 0,108,111, 99, 91, 51, 93, 0,114,111,116,
- 91, 51, 93, 0,109, 97,116, 91, 52, 93, 91, 52, 93, 0,109,105,110, 91, 51, 93, 0,109, 97,120, 91, 51, 93, 0,109,111,100,101,
- 0,116,111,116,101,120, 0,115,104,100,119,114, 0,115,104,100,119,103, 0,115,104,100,119, 98, 0,115,104,100,119,112, 97,100,
- 0,101,110,101,114,103,121, 0,100,105,115,116, 0,115,112,111,116,115,105,122,101, 0,115,112,111,116, 98,108,101,110,100, 0,
-104, 97,105,110,116, 0, 97,116,116, 49, 0, 97,116,116, 50, 0, 42, 99,117,114,102, 97,108,108,111,102,102, 0,115,104, 97,100,
-115,112,111,116,115,105,122,101, 0, 98,105, 97,115, 0,115,111,102,116, 0, 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,112,114, 95,116,101,120,116,117,114,101, 0,112, 97,100, 91, 51, 93, 0,100,101,110,115,105,
-116,121, 0,101,109,105,115,115,105,111,110, 0, 97, 98,115,111,114,112,116,105,111,110, 0,115, 99, 97,116,116,101,114,105,110,
-103, 0,101,109,105,115,115,105,111,110, 95, 99,111,108, 91, 51, 93, 0, 97, 98,115,111,114,112,116,105,111,110, 95, 99,111,108,
- 91, 51, 93, 0,100,101,110,115,105,116,121, 95,115, 99, 97,108,101, 0,100,101,112,116,104, 95, 99,117,116,111,102,102, 0,112,
-104, 97,115,101,102,117,110, 99, 95,116,121,112,101, 0,118,112, 97,100, 91, 51, 93, 0,112,104, 97,115,101,102,117,110, 99, 95,
-103, 0,115,116,101,112,115,105,122,101, 0,115,104, 97,100,101, 95,115,116,101,112,115,105,122,101, 0,115,116,101,112,115,105,
-122,101, 95,116,121,112,101, 0,115,104, 97,100,101,102,108, 97,103, 0,115,104, 97,100,101, 95,116,121,112,101, 0,112,114,101,
- 99, 97, 99,104,101, 95,114,101,115,111,108,117,116,105,111,110, 0,109,115, 95,100,105,102,102, 0,109,115, 95,105,110,116,101,
-110,115,105,116,121, 0,109,115, 95,115,116,101,112,115, 0,109, 97,116,101,114,105, 97,108, 95,116,121,112,101, 0,115,112,101,
- 99,114, 0,115,112,101, 99,103, 0,115,112,101, 99, 98, 0,109,105,114,114, 0,109,105,114,103, 0,109,105,114, 98, 0, 97,109,
- 98,114, 0, 97,109, 98, 98, 0, 97,109, 98,103, 0, 97,109, 98, 0,101,109,105,116, 0, 97,110,103, 0,115,112,101, 99,116,114,
- 97, 0,114, 97,121, 95,109,105,114,114,111,114, 0, 97,108,112,104, 97, 0,114,101,102, 0,115,112,101, 99, 0,122,111,102,102,
-115, 0, 97,100,100, 0,116,114, 97,110,115,108,117, 99,101,110, 99,121, 0,118,111,108, 0,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,102,108, 97,103, 50, 0,116,111,116, 99,111,108, 0,119,105,
-114,101,115,105,122,101, 0,114,101,110,100,101,114,115,105,122,101, 0,116,104,114,101,115,104, 0, 42,108, 97,115,116,101,108,
-101,109, 0,118,101, 99, 91, 51, 93, 91, 51, 93, 0, 97,108,102, 97, 0,119,101,105,103,104,116, 0,104, 49, 0,104, 50, 0,102,
- 49, 0,102, 50, 0,102, 51, 0,104,105,100,101, 0,118,101, 99, 91, 52, 93, 0,109, 97,116, 95,110,114, 0,112,110,116,115,117,
- 0,112,110,116,115,118, 0,114,101,115,111,108,117, 0,114,101,115,111,108,118, 0,111,114,100,101,114,117, 0,111,114,100,101,
-114,118, 0,102,108, 97,103,117, 0,102,108, 97,103,118, 0, 42,107,110,111,116,115,117, 0, 42,107,110,111,116,115,118, 0,116,
-105,108,116, 95,105,110,116,101,114,112, 0,114, 97,100,105,117,115, 95,105,110,116,101,114,112, 0, 99,104, 97,114,105,100,120,
- 0,107,101,114,110, 0,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,100,114, 97,119,102,108, 97,103, 0,116,119,105,115,116, 95,109,111,100,101, 0,112, 97,100, 91, 50, 93, 0,
-116,119,105,115,116, 95,115,109,111,111,116,104, 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,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,100,111,109,
- 97,105,110, 0, 42,102,108,111,119, 0, 42, 99,111,108,108, 0,116,105,109,101, 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,115,117, 98,116, 97,114,103,101,116, 91, 51, 50, 93, 0,112, 97,114,101,110,116,105,110,
-118, 91, 52, 93, 91, 52, 93, 0, 99,101,110,116, 91, 51, 93, 0, 42,105,110,100,101,120, 97,114, 0,116,111,116,105,110,100,101,
-120, 0,102,111,114, 99,101, 0, 42, 99,108,111,116,104, 79, 98,106,101, 99,116, 0, 42,115,105,109, 95,112, 97,114,109,115, 0,
- 42, 99,111,108,108, 95,112, 97,114,109,115, 0, 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 0,112,116, 99, 97, 99,104,101,
-115, 0, 42,120, 0, 42,120,110,101,119, 0, 42,120,111,108,100, 0, 42, 99,117,114,114,101,110,116, 95,120,110,101,119, 0, 42,
- 99,117,114,114,101,110,116, 95,120, 0, 42, 99,117,114,114,101,110,116, 95,118, 0, 42,109,102, 97, 99,101,115, 0,110,117,109,
-118,101,114,116,115, 0,110,117,109,102, 97, 99,101,115, 0, 42, 98,118,104,116,114,101,101, 0, 42,118, 0, 42,100,109, 0, 99,
-102,114, 97, 0,111,112,101,114, 97,116,105,111,110, 0,118,101,114,116,101,120, 0,116,111,116,105,110,102,108,117,101,110, 99,
-101, 0,103,114,105,100,115,105,122,101, 0,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,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, 42,115, 99,117,108,112,116, 0,112, 97,114,116,121,112,
-101, 0,112, 97,114, 49, 0,112, 97,114, 50, 0,112, 97,114, 51, 0,112, 97,114,115,117, 98,115,116,114, 91, 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, 42,103,112,
-100, 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,114,101,115,116,111,114,101, 95,109,111,100,101, 0, 42,109, 97,116, 98,105,116,115, 0, 97, 99,116,
- 99,111,108, 0,100,108,111, 99, 91, 51, 93, 0,111,114,105,103, 91, 51, 93, 0,100,115,105,122,101, 91, 51, 93, 0,100,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,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,112,
- 99, 95,105,100,115, 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,100, 97,116, 97, 95,116,121,112,101,115, 0, 42,105,110,100,101,120, 95, 97,114,114, 97,121, 0, 42,
-100, 97,116, 97, 91, 56, 93, 0, 42, 99,117,114, 91, 56, 93, 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,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,112, 97,116,104, 91, 50, 52, 48, 93, 0,109,101,109, 95, 99, 97, 99,104,101, 0, 42,101,100,105,116,
- 0, 40, 42,102,114,101,101, 95,101,100,105,116, 41, 40, 41, 0,108,105,110, 83,116,105,102,102, 0, 97,110,103, 83,116,105,102,
-102, 0,118,111,108,117,109,101, 0,118,105,116,101,114, 97,116,105,111,110,115, 0,112,105,116,101,114, 97,116,105,111,110,115,
- 0,100,105,116,101,114, 97,116,105,111,110,115, 0, 99,105,116,101,114, 97,116,105,111,110,115, 0,107, 83, 82, 72, 82, 95, 67,
- 76, 0,107, 83, 75, 72, 82, 95, 67, 76, 0,107, 83, 83, 72, 82, 95, 67, 76, 0,107, 83, 82, 95, 83, 80, 76, 84, 95, 67, 76, 0,
-107, 83, 75, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 83, 83, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 86, 67, 70, 0,107, 68, 80,
- 0,107, 68, 71, 0,107, 76, 70, 0,107, 80, 82, 0,107, 86, 67, 0,107, 68, 70, 0,107, 77, 84, 0,107, 67, 72, 82, 0,107, 75,
- 72, 82, 0,107, 83, 72, 82, 0,107, 65, 72, 82, 0, 99,111,108,108,105,115,105,111,110,102,108, 97,103,115, 0,110,117,109, 99,
-108,117,115,116,101,114,105,116,101,114, 97,116,105,111,110,115, 0,119,101,108,100,105,110,103, 0,116,111,116,115,112,114,105,
-110,103, 0, 42, 98,112,111,105,110,116, 0, 42, 98,115,112,114,105,110,103, 0,109,115,103, 95,108,111, 99,107, 0,109,115,103,
- 95,118, 97,108,117,101, 0,110,111,100,101,109, 97,115,115, 0,110, 97,109,101,100, 86, 71, 95, 77, 97,115,115, 91, 51, 50, 93,
- 0,103,114, 97,118, 0,109,101,100,105, 97,102,114,105, 99,116, 0,114,107,108,105,109,105,116, 0,112,104,121,115,105, 99,115,
- 95,115,112,101,101,100, 0,103,111, 97,108,115,112,114,105,110,103, 0,103,111, 97,108,102,114,105, 99,116, 0,109,105,110,103,
-111, 97,108, 0,109, 97,120,103,111, 97,108, 0,100,101,102,103,111, 97,108, 0,118,101,114,116,103,114,111,117,112, 0,110, 97,
-109,101,100, 86, 71, 95, 83,111,102,116,103,111, 97,108, 91, 51, 50, 93, 0,102,117,122,122,121,110,101,115,115, 0,105,110,115,
-112,114,105,110,103, 0,105,110,102,114,105, 99,116, 0,110, 97,109,101,100, 86, 71, 95, 83,112,114,105,110,103, 95, 75, 91, 51,
- 50, 93, 0,101,102,114, 97, 0,105,110,116,101,114,118, 97,108, 0,108,111, 99, 97,108, 0,115,111,108,118,101,114,102,108, 97,
-103,115, 0, 42, 42,107,101,121,115, 0,116,111,116,112,111,105,110,116,107,101,121, 0,115,101, 99,111,110,100,115,112,114,105,
-110,103, 0, 99,111,108, 98, 97,108,108, 0, 98, 97,108,108,100, 97,109,112, 0, 98, 97,108,108,115,116,105,102,102, 0,115, 98,
- 99, 95,109,111,100,101, 0, 97,101,114,111,101,100,103,101, 0,109,105,110,108,111,111,112,115, 0,109, 97,120,108,111,111,112,
-115, 0, 99,104,111,107,101, 0,115,111,108,118,101,114, 95, 73, 68, 0,112,108, 97,115,116,105, 99, 0,115,112,114,105,110,103,
-112,114,101,108,111, 97,100, 0, 42,115, 99,114, 97,116, 99,104, 0,115,104,101, 97,114,115,116,105,102,102, 0,105,110,112,117,
-115,104, 0, 42,112,111,105,110,116, 99, 97, 99,104,101, 0,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, 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,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, 99,111,108,111,114, 95,109,103,116, 95,102,108, 97,103, 0,112,111,115,116,103, 97,109,
-109, 97, 0,112,111,115,116,104,117,101, 0,112,111,115,116,115, 97,116, 0,100,105,116,104,101,114, 95,105,110,116,101,110,115,
-105,116,121, 0, 98, 97,107,101, 95,111,115, 97, 0, 98, 97,107,101, 95,102,105,108,116,101,114, 0, 98, 97,107,101, 95,109,111,
-100,101, 0, 98, 97,107,101, 95,102,108, 97,103, 0, 98, 97,107,101, 95,110,111,114,109, 97,108, 95,115,112, 97, 99,101, 0, 98,
- 97,107,101, 95,113,117, 97,100, 95,115,112,108,105,116, 0, 98, 97,107,101, 95,109, 97,120,100,105,115,116, 0, 98, 97,107,101,
- 95, 98,105, 97,115,100,105,115,116, 0, 98, 97,107,101, 95,112, 97,100, 0, 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,101,110,103,105,110,101, 91, 51, 50, 93, 0,112, 97,114,116,
-105, 99,108,101, 95,112,101,114, 99, 0,115,117, 98,115,117,114,102, 95,109, 97,120, 0,115,104, 97,100, 98,117,102,115, 97,109,
-112,108,101, 95,109, 97,120, 0, 97,111, 95,101,114,114,111,114, 0,116,105,108,116, 0,114,101,115, 98,117,102, 0, 42,119, 97,
-114,112,116,101,120,116, 0, 99,111,108, 91, 51, 93, 0,109, 97,116,109,111,100,101, 0,102,114, 97,109,105,110,103, 0,100,111,
-109,101, 0,115,116,101,114,101,111,102,108, 97,103, 0, 42, 42, 98,114,117,115,104,101,115, 0, 97, 99,116,105,118,101, 95, 98,
-114,117,115,104, 95,105,110,100,101,120, 0, 98,114,117,115,104, 95, 99,111,117,110,116, 0, 42,112, 97,105,110,116, 95, 99,117,
-114,115,111,114, 0,112, 97,105,110,116, 95, 99,117,114,115,111,114, 95, 99,111,108, 91, 52, 93, 0,112, 97,105,110,116, 0,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,115,101,108,101, 99,116,109,111,100,101, 0,101,100,105,116,116,121,112,101, 0,100,114, 97,119, 95,115,116,101,112, 0,
-102, 97,100,101, 95,102,114, 97,109,101,115, 0,110, 97,109,101, 91, 51, 54, 93, 0,109, 97,116, 91, 51, 93, 91, 51, 93, 0,112,
-105,118,111,116, 91, 51, 93, 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,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,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, 97,117,116,111,107,101,121, 95,102,108, 97,103, 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,115, 99, 97,108,101, 95,108,101,110,103,116,104, 0,115,121,115,116,101,109, 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, 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,115,111,117,110,100, 95,104, 97,110,100,108,
-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,103,109, 0,117,110,105,116, 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,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,112,105,118,111,116, 95,108, 97,115,
+ 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,200, 21, 0, 0,120, 44,131, 3,186, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0,104,229,213, 2, 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, 0, 0, 0, 0, 0, 0, 0, 0,
+ 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, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 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,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, 0, 0, 0, 0, 0, 0, 0, 0, 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,114,114,114,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, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 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,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,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 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,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,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,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, 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,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,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,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,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, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 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,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, 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,114,114,114,255, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,154, 0, 0,255,189, 17, 17,255,247, 10, 10,255, 0, 0, 0, 0,247, 64, 24,255,246,105, 19,255,
+250,153, 0,255, 0, 0, 0, 0, 30,145, 9,255, 89,183, 11,255,131,239, 29,255, 0, 0, 0, 0, 10, 54,148,255, 54,103,223,255,
+ 94,193,239,255, 0, 0, 0, 0,169, 41, 78,255,193, 65,106,255,240, 93,145,255, 0, 0, 0, 0, 67, 12,120,255, 84, 58,163,255,
+135,100,213,255, 0, 0, 0, 0, 36,120, 90,255, 60,149,121,255,111,182,171,255, 0, 0, 0, 0, 75,112,124,255,106,134,145,255,
+155,194,205,255, 0, 0, 0, 0,244,201, 12,255,238,194, 54,255,243,255, 0,255, 0, 0, 0, 0, 30, 32, 36,255, 72, 76, 86,255,
+255,255,255,255, 0, 0, 0, 0,111, 47,106,255,152, 69,190,255,211, 48,214,255, 0, 0, 0, 0,108,142, 34,255,127,176, 34,255,
+187,239, 91,255, 0, 0, 0, 0,141,141,141,255,176,176,176,255,222,222,222,255, 0, 0, 0, 0,131, 67, 38,255,139, 88, 17,255,
+189,106, 17,255, 0, 0, 0, 0, 8, 49, 14,255, 28, 67, 11,255, 52, 98, 43,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 78, 65, 49,144,226, 0, 0,184,251,141, 3, 0, 0, 0, 0, 1, 0, 0, 0, 83, 68, 78, 65,
+ 78, 65, 77, 69, 17, 11, 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,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, 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,114,111,116, 0,116,101,120,102,108, 97,103, 0, 99,111,108,111,114,109,111,100,101,108, 0,112,109, 97,112,116,111, 0,112,
+109, 97,112,116,111,110,101,103, 0,110,111,114,109, 97,112,115,112, 97, 99,101, 0,119,104,105, 99,104, 95,111,117,116,112,117,
+116, 0, 98,114,117,115,104, 95,109, 97,112, 95,109,111,100,101, 0,112, 97,100, 91, 55, 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,118, 97,114,102, 97, 99, 0,110,111,114,102, 97, 99, 0,100,105,115,
+112,102, 97, 99, 0,119, 97,114,112,102, 97, 99, 0, 99,111,108,115,112,101, 99,102, 97, 99, 0,109,105,114,114,102, 97, 99, 0,
+ 97,108,112,104, 97,102, 97, 99, 0,100,105,102,102,102, 97, 99, 0,115,112,101, 99,102, 97, 99, 0,101,109,105,116,102, 97, 99,
+ 0,104, 97,114,100,102, 97, 99, 0,114, 97,121,109,105,114,114,102, 97, 99, 0,116,114, 97,110,115,108,102, 97, 99, 0, 97,109,
+ 98,102, 97, 99, 0, 99,111,108,101,109,105,116,102, 97, 99, 0, 99,111,108,114,101,102,108,102, 97, 99, 0, 99,111,108,116,114,
+ 97,110,115,102, 97, 99, 0,100,101,110,115,102, 97, 99, 0,115, 99, 97,116,116,101,114,102, 97, 99, 0,114,101,102,108,102, 97,
+ 99, 0,116,105,109,101,102, 97, 99, 0,108,101,110,103,116,104,102, 97, 99, 0, 99,108,117,109,112,102, 97, 99, 0,107,105,110,
+107,102, 97, 99, 0,114,111,117,103,104,102, 97, 99, 0,112, 97,100,101,110,115,102, 97, 99, 0,108,105,102,101,102, 97, 99, 0,
+115,105,122,101,102, 97, 99, 0,105,118,101,108,102, 97, 99, 0,112,118,101,108,102, 97, 99, 0,115,104, 97,100,111,119,102, 97,
+ 99, 0,122,101,110,117,112,102, 97, 99, 0,122,101,110,100,111,119,110,102, 97, 99, 0, 98,108,101,110,100,102, 97, 99, 0,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,102, 97,108,108,111,102,102, 95,116,121,112,101, 0,102, 97,108,108,111,102,102, 95,115,111,102,116,110,101,115,
+115, 0,114, 97,100,105,117,115, 0, 99,111,108,111,114, 95,115,111,117,114, 99,101, 0,116,111,116,112,111,105,110,116,115, 0,
+112,100,112, 97,100, 0, 42,112,115,121,115, 0,112,115,121,115, 95, 99, 97, 99,104,101, 95,115,112, 97, 99,101, 0,111, 98, 95,
+ 99, 97, 99,104,101, 95,115,112, 97, 99,101, 0,112,100,112, 97,100, 50, 91, 50, 93, 0, 42,112,111,105,110,116, 95,116,114,101,
+101, 0, 42,112,111,105,110,116, 95,100, 97,116, 97, 0,110,111,105,115,101, 95,115,105,122,101, 0,110,111,105,115,101, 95,100,
+101,112,116,104, 0,110,111,105,115,101, 95,105,110,102,108,117,101,110, 99,101, 0,110,111,105,115,101, 95, 98, 97,115,105,115,
+ 0,112,100,112, 97,100, 51, 91, 51, 93, 0,110,111,105,115,101, 95,102, 97, 99, 0,115,112,101,101,100, 95,115, 99, 97,108,101,
+ 0, 42, 99,111, 98, 97, 0,114,101,115,111,108, 91, 51, 93, 0,105,110,116,101,114,112, 95,116,121,112,101, 0,102,105,108,101,
+ 95,102,111,114,109, 97,116, 0,101,120,116,101,110,100, 0,105,110,116, 95,109,117,108,116,105,112,108,105,101,114, 0,115,116,
+105,108,108, 95,102,114, 97,109,101, 0,115,111,117,114, 99,101, 95,112, 97,116,104, 91, 50, 52, 48, 93, 0, 42,100, 97,116, 97,
+115,101,116, 0,110,111,105,115,101,115,105,122,101, 0,116,117,114, 98,117,108, 0, 98,114,105,103,104,116, 0, 99,111,110,116,
+114, 97,115,116, 0,114,102, 97, 99, 0,103,102, 97, 99, 0, 98,102, 97, 99, 0,102,105,108,116,101,114,115,105,122,101, 0,109,
+103, 95, 72, 0,109,103, 95,108, 97, 99,117,110, 97,114,105,116,121, 0,109,103, 95,111, 99,116, 97,118,101,115, 0,109,103, 95,
+111,102,102,115,101,116, 0,109,103, 95,103, 97,105,110, 0,100,105,115,116, 95, 97,109,111,117,110,116, 0,110,115, 95,111,117,
+116,115, 99, 97,108,101, 0,118,110, 95,119, 49, 0,118,110, 95,119, 50, 0,118,110, 95,119, 51, 0,118,110, 95,119, 52, 0,118,
+110, 95,109,101,120,112, 0,118,110, 95,100,105,115,116,109, 0,118,110, 95, 99,111,108,116,121,112,101, 0,110,111,105,115,101,
+100,101,112,116,104, 0,110,111,105,115,101,116,121,112,101, 0,110,111,105,115,101, 98, 97,115,105,115, 0,110,111,105,115,101,
+ 98, 97,115,105,115, 50, 0,105,109, 97,102,108, 97,103, 0, 99,114,111,112,120,109,105,110, 0, 99,114,111,112,121,109,105,110,
+ 0, 99,114,111,112,120,109, 97,120, 0, 99,114,111,112,121,109, 97,120, 0,116,101,120,102,105,108,116,101,114, 0, 97,102,109,
+ 97,120, 0,120,114,101,112,101, 97,116, 0,121,114,101,112,101, 97,116, 0, 99,104,101, 99,107,101,114,100,105,115,116, 0,110,
+ 97, 98,108, 97, 0,105,117,115,101,114, 0, 42,110,111,100,101,116,114,101,101, 0, 42,112,108,117,103,105,110, 0, 42,101,110,
+118, 0, 42,112,100, 0, 42,118,100, 0,117,115,101, 95,110,111,100,101,115, 0,108,111, 99, 91, 51, 93, 0,114,111,116, 91, 51,
+ 93, 0,109, 97,116, 91, 52, 93, 91, 52, 93, 0,109,105,110, 91, 51, 93, 0,109, 97,120, 91, 51, 93, 0,109,111,100,101, 0,116,
+111,116,101,120, 0,115,104,100,119,114, 0,115,104,100,119,103, 0,115,104,100,119, 98, 0,115,104,100,119,112, 97,100, 0,101,
+110,101,114,103,121, 0,100,105,115,116, 0,115,112,111,116,115,105,122,101, 0,115,112,111,116, 98,108,101,110,100, 0,104, 97,
+105,110,116, 0, 97,116,116, 49, 0, 97,116,116, 50, 0, 42, 99,117,114,102, 97,108,108,111,102,102, 0,115,104, 97,100,115,112,
+111,116,115,105,122,101, 0, 98,105, 97,115, 0,115,111,102,116, 0, 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,112,114, 95,116,101,120,116,117,114,101, 0,112, 97,100, 91, 51, 93, 0,100,101,110,115,105,116,121,
+ 0,101,109,105,115,115,105,111,110, 0,115, 99, 97,116,116,101,114,105,110,103, 0,114,101,102,108,101, 99,116,105,111,110, 0,
+101,109,105,115,115,105,111,110, 95, 99,111,108, 91, 51, 93, 0,116,114, 97,110,115,109,105,115,115,105,111,110, 95, 99,111,108,
+ 91, 51, 93, 0,114,101,102,108,101, 99,116,105,111,110, 95, 99,111,108, 91, 51, 93, 0,100,101,110,115,105,116,121, 95,115, 99,
+ 97,108,101, 0,100,101,112,116,104, 95, 99,117,116,111,102,102, 0, 97,115,121,109,109,101,116,114,121, 0,115,116,101,112,115,
+105,122,101, 95,116,121,112,101, 0,115,104, 97,100,101,102,108, 97,103, 0,115,104, 97,100,101, 95,116,121,112,101, 0,112,114,
+101, 99, 97, 99,104,101, 95,114,101,115,111,108,117,116,105,111,110, 0,115,116,101,112,115,105,122,101, 0,109,115, 95,100,105,
+102,102, 0,109,115, 95,105,110,116,101,110,115,105,116,121, 0,109,115, 95,115,116,101,112,115, 0,109, 97,116,101,114,105, 97,
+108, 95,116,121,112,101, 0,115,112,101, 99,114, 0,115,112,101, 99,103, 0,115,112,101, 99, 98, 0,109,105,114,114, 0,109,105,
+114,103, 0,109,105,114, 98, 0, 97,109, 98,114, 0, 97,109, 98, 98, 0, 97,109, 98,103, 0, 97,109, 98, 0,101,109,105,116, 0,
+ 97,110,103, 0,115,112,101, 99,116,114, 97, 0,114, 97,121, 95,109,105,114,114,111,114, 0, 97,108,112,104, 97, 0,114,101,102,
+ 0,115,112,101, 99, 0,122,111,102,102,115, 0, 97,100,100, 0,116,114, 97,110,115,108,117, 99,101,110, 99,121, 0,118,111,108,
+ 0,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,109, 97,112,116,111, 95,116,101,
+120,116,117,114,101,100, 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,102,108, 97,103, 50, 0,116,111,116, 99,111,108, 0,119,105,114,101,115,105,122,
+101, 0,114,101,110,100,101,114,115,105,122,101, 0,116,104,114,101,115,104, 0, 42,108, 97,115,116,101,108,101,109, 0,118,101,
+ 99, 91, 51, 93, 91, 51, 93, 0, 97,108,102, 97, 0,119,101,105,103,104,116, 0,104, 49, 0,104, 50, 0,102, 49, 0,102, 50, 0,
+102, 51, 0,104,105,100,101, 0,118,101, 99, 91, 52, 93, 0,109, 97,116, 95,110,114, 0,112,110,116,115,117, 0,112,110,116,115,
+118, 0,114,101,115,111,108,117, 0,114,101,115,111,108,118, 0,111,114,100,101,114,117, 0,111,114,100,101,114,118, 0,102,108,
+ 97,103,117, 0,102,108, 97,103,118, 0, 42,107,110,111,116,115,117, 0, 42,107,110,111,116,115,118, 0,116,105,108,116, 95,105,
+110,116,101,114,112, 0,114, 97,100,105,117,115, 95,105,110,116,101,114,112, 0, 99,104, 97,114,105,100,120, 0,107,101,114,110,
+ 0,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,
+100,114, 97,119,102,108, 97,103, 0,116,119,105,115,116, 95,109,111,100,101, 0,112, 97,100, 91, 50, 93, 0,116,119,105,115,116,
+ 95,115,109,111,111,116,104, 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,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,100,111,109, 97,105,110, 0, 42,
+102,108,111,119, 0, 42, 99,111,108,108, 0,116,105,109,101, 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,115,117, 98,116, 97,114,103,101,116, 91, 51, 50, 93, 0,112, 97,114,101,110,116,105,110,118, 91, 52, 93, 91,
+ 52, 93, 0, 99,101,110,116, 91, 51, 93, 0, 42,105,110,100,101,120, 97,114, 0,116,111,116,105,110,100,101,120, 0,102,111,114,
+ 99,101, 0, 42, 99,108,111,116,104, 79, 98,106,101, 99,116, 0, 42,115,105,109, 95,112, 97,114,109,115, 0, 42, 99,111,108,108,
+ 95,112, 97,114,109,115, 0, 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 0,112,116, 99, 97, 99,104,101,115, 0, 42,120, 0,
+ 42,120,110,101,119, 0, 42,120,111,108,100, 0, 42, 99,117,114,114,101,110,116, 95,120,110,101,119, 0, 42, 99,117,114,114,101,
+110,116, 95,120, 0, 42, 99,117,114,114,101,110,116, 95,118, 0, 42,109,102, 97, 99,101,115, 0,110,117,109,118,101,114,116,115,
+ 0,110,117,109,102, 97, 99,101,115, 0, 42, 98,118,104,116,114,101,101, 0, 42,118, 0, 42,100,109, 0, 99,102,114, 97, 0,111,
+112,101,114, 97,116,105,111,110, 0,118,101,114,116,101,120, 0,116,111,116,105,110,102,108,117,101,110, 99,101, 0,103,114,105,
+100,115,105,122,101, 0,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,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, 42,115, 99,117,108,112,116, 0,112, 97,114,116,121,112,101, 0,112, 97,114,
+ 49, 0,112, 97,114, 50, 0,112, 97,114, 51, 0,112, 97,114,115,117, 98,115,116,114, 91, 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, 42,103,112,100, 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,114,101,115,116,111,114,101, 95,109,111,100,101, 0, 42,109, 97,116, 98,105,116,115, 0, 97, 99,116, 99,111,108, 0,100,
+108,111, 99, 91, 51, 93, 0,111,114,105,103, 91, 51, 93, 0,100,115,105,122,101, 91, 51, 93, 0,100,114,111,116, 91, 51, 93, 0,
+100,113,117, 97,116, 91, 52, 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,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,114,111,116,109,111,100,101, 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, 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,
+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,112, 99, 95,105,100,115, 0, 42,100,117,112,108,105,108,105,115,116, 0, 99,117,114,105,110,100,101,120, 0, 97, 99,
+116,105,118,101, 0,111,114,105,103,108, 97,121, 0,110,111, 95,100,114, 97,119, 0, 97,110,105,109, 97,116,101,100, 0,111,109,
+ 97,116, 91, 52, 93, 91, 52, 93, 0,111,114, 99,111, 91, 51, 93, 0,100,101,102,108,101, 99,116, 0,102,111,114, 99,101,102,105,
+101,108,100, 0,115,104, 97,112,101, 0,116,101,120, 95,109,111,100,101, 0,107,105,110,107, 0,107,105,110,107, 95, 97,120,105,
+115, 0,122,100,105,114, 0,102, 95,115,116,114,101,110,103,116,104, 0,102, 95,100, 97,109,112, 0,102, 95,102,108,111,119, 0,
+102, 95,115,105,122,101, 0,102, 95,112,111,119,101,114, 0,109, 97,120,100,105,115,116, 0,109,105,110,100,105,115,116, 0,102,
+ 95,112,111,119,101,114, 95,114, 0,109, 97,120,114, 97,100, 0,109,105,110,114, 97,100, 0,112,100,101,102, 95,100, 97,109,112,
+ 0,112,100,101,102, 95,114,100, 97,109,112, 0,112,100,101,102, 95,112,101,114,109, 0,112,100,101,102, 95,102,114,105, 99,116,
+ 0,112,100,101,102, 95,114,102,114,105, 99,116, 0, 97, 98,115,111,114,112,116,105,111,110, 0,112,100,101,102, 95,115, 98,100,
+ 97,109,112, 0,112,100,101,102, 95,115, 98,105,102,116, 0,112,100,101,102, 95,115, 98,111,102,116, 0, 99,108,117,109,112, 95,
+102, 97, 99, 0, 99,108,117,109,112, 95,112,111,119, 0,107,105,110,107, 95,102,114,101,113, 0,107,105,110,107, 95,115,104, 97,
+112,101, 0,107,105,110,107, 95, 97,109,112, 0,102,114,101,101, 95,101,110,100, 0,116,101,120, 95,110, 97, 98,108, 97, 0, 42,
+114,110,103, 0,102, 95,110,111,105,115,101, 0,119,101,105,103,104,116, 91, 49, 51, 93, 0,103,108,111, 98, 97,108, 95,103,114,
+ 97,118,105,116,121, 0,114,116, 91, 51, 93, 0,102,114, 97,109,101, 0,116,111,116,112,111,105,110,116, 0,100, 97,116, 97, 95,
+116,121,112,101,115, 0, 42,105,110,100,101,120, 95, 97,114,114, 97,121, 0, 42,100, 97,116, 97, 91, 56, 93, 0, 42, 99,117,114,
+ 91, 56, 93, 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,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,112, 97,116,104, 91,
+ 50, 52, 48, 93, 0,109,101,109, 95, 99, 97, 99,104,101, 0, 42,101,100,105,116, 0, 40, 42,102,114,101,101, 95,101,100,105,116,
+ 41, 40, 41, 0,108,105,110, 83,116,105,102,102, 0, 97,110,103, 83,116,105,102,102, 0,118,111,108,117,109,101, 0,118,105,116,
+101,114, 97,116,105,111,110,115, 0,112,105,116,101,114, 97,116,105,111,110,115, 0,100,105,116,101,114, 97,116,105,111,110,115,
+ 0, 99,105,116,101,114, 97,116,105,111,110,115, 0,107, 83, 82, 72, 82, 95, 67, 76, 0,107, 83, 75, 72, 82, 95, 67, 76, 0,107,
+ 83, 83, 72, 82, 95, 67, 76, 0,107, 83, 82, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 83, 75, 95, 83, 80, 76, 84, 95, 67, 76, 0,
+107, 83, 83, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 86, 67, 70, 0,107, 68, 80, 0,107, 68, 71, 0,107, 76, 70, 0,107, 80, 82,
+ 0,107, 86, 67, 0,107, 68, 70, 0,107, 77, 84, 0,107, 67, 72, 82, 0,107, 75, 72, 82, 0,107, 83, 72, 82, 0,107, 65, 72, 82,
+ 0, 99,111,108,108,105,115,105,111,110,102,108, 97,103,115, 0,110,117,109, 99,108,117,115,116,101,114,105,116,101,114, 97,116,
+105,111,110,115, 0,119,101,108,100,105,110,103, 0,116,111,116,115,112,114,105,110,103, 0, 42, 98,112,111,105,110,116, 0, 42,
+ 98,115,112,114,105,110,103, 0,109,115,103, 95,108,111, 99,107, 0,109,115,103, 95,118, 97,108,117,101, 0,110,111,100,101,109,
+ 97,115,115, 0,110, 97,109,101,100, 86, 71, 95, 77, 97,115,115, 91, 51, 50, 93, 0,103,114, 97,118, 0,109,101,100,105, 97,102,
+114,105, 99,116, 0,114,107,108,105,109,105,116, 0,112,104,121,115,105, 99,115, 95,115,112,101,101,100, 0,103,111, 97,108,115,
+112,114,105,110,103, 0,103,111, 97,108,102,114,105, 99,116, 0,109,105,110,103,111, 97,108, 0,109, 97,120,103,111, 97,108, 0,
+100,101,102,103,111, 97,108, 0,118,101,114,116,103,114,111,117,112, 0,110, 97,109,101,100, 86, 71, 95, 83,111,102,116,103,111,
+ 97,108, 91, 51, 50, 93, 0,102,117,122,122,121,110,101,115,115, 0,105,110,115,112,114,105,110,103, 0,105,110,102,114,105, 99,
+116, 0,110, 97,109,101,100, 86, 71, 95, 83,112,114,105,110,103, 95, 75, 91, 51, 50, 93, 0,101,102,114, 97, 0,105,110,116,101,
+114,118, 97,108, 0,108,111, 99, 97,108, 0,115,111,108,118,101,114,102,108, 97,103,115, 0, 42, 42,107,101,121,115, 0,116,111,
+116,112,111,105,110,116,107,101,121, 0,115,101, 99,111,110,100,115,112,114,105,110,103, 0, 99,111,108, 98, 97,108,108, 0, 98,
+ 97,108,108,100, 97,109,112, 0, 98, 97,108,108,115,116,105,102,102, 0,115, 98, 99, 95,109,111,100,101, 0, 97,101,114,111,101,
+100,103,101, 0,109,105,110,108,111,111,112,115, 0,109, 97,120,108,111,111,112,115, 0, 99,104,111,107,101, 0,115,111,108,118,
+101,114, 95, 73, 68, 0,112,108, 97,115,116,105, 99, 0,115,112,114,105,110,103,112,114,101,108,111, 97,100, 0, 42,115, 99,114,
+ 97,116, 99,104, 0,115,104,101, 97,114,115,116,105,102,102, 0,105,110,112,117,115,104, 0, 42,112,111,105,110,116, 99, 97, 99,
+104,101, 0, 42,101,102,102,101, 99,116,111,114, 95,119,101,105,103,104,116,115, 0, 42,102,109,100, 0,115,104,111,119, 95, 97,
+100,118, 97,110, 99,101,100,111,112,116,105,111,110,115, 0,114,101,115,111,108,117,116,105,111,110,120,121,122, 0,112,114,101,
+118,105,101,119,114,101,115,120,121,122, 0,114,101, 97,108,115,105,122,101, 0,103,117,105, 68,105,115,112,108, 97,121, 77,111,
+100,101, 0,114,101,110,100,101,114, 68,105,115,112,108, 97,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 86, 97,
+108,117,101, 0,118,105,115, 99,111,115,105,116,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 69,120,112,111,110,
+101,110,116, 0,103,114, 97,118,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, 97,117,100,105,111, 95,109,105,120,114, 97,116,101, 0, 97,117,100,105,111, 95,118,111,
+108,117,109,101, 0,103,111,112, 95,115,105,122,101, 0,114, 99, 95,109,105,110, 95,114, 97,116,101, 0,114, 99, 95,109, 97,120,
+ 95,114, 97,116,101, 0,114, 99, 95, 98,117,102,102,101,114, 95,115,105,122,101, 0,109,117,120, 95,112, 97, 99,107,101,116, 95,
+115,105,122,101, 0,109,117,120, 95,114, 97,116,101, 0,109,105,120,114, 97,116,101, 0,109, 97,105,110, 0,115,112,101,101,100,
+ 95,111,102, 95,115,111,117,110,100, 0,100,111,112,112,108,101,114, 95,102, 97, 99,116,111,114, 0,100,105,115,116, 97,110, 99,
+101, 95,109,111,100,101,108, 0, 42,109, 97,116, 95,111,118,101,114,114,105,100,101, 0, 42,108,105,103,104,116, 95,111,118,101,
+114,114,105,100,101, 0,108, 97,121, 95,122,109, 97,115,107, 0,108, 97,121,102,108, 97,103, 0,112, 97,115,115,102,108, 97,103,
+ 0,112, 97,115,115, 95,120,111,114, 0, 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,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,114,116, 50, 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, 99,111,108,111,114,
+ 95,109,103,116, 95,102,108, 97,103, 0,112,111,115,116,103, 97,109,109, 97, 0,112,111,115,116,104,117,101, 0,112,111,115,116,
+115, 97,116, 0,100,105,116,104,101,114, 95,105,110,116,101,110,115,105,116,121, 0, 98, 97,107,101, 95,111,115, 97, 0, 98, 97,
+107,101, 95,102,105,108,116,101,114, 0, 98, 97,107,101, 95,109,111,100,101, 0, 98, 97,107,101, 95,102,108, 97,103, 0, 98, 97,
+107,101, 95,110,111,114,109, 97,108, 95,115,112, 97, 99,101, 0, 98, 97,107,101, 95,113,117, 97,100, 95,115,112,108,105,116, 0,
+ 98, 97,107,101, 95,109, 97,120,100,105,115,116, 0, 98, 97,107,101, 95, 98,105, 97,115,100,105,115,116, 0, 98, 97,107,101, 95,
+112, 97,100, 0, 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,101,110,103,105,110,101, 91, 51, 50, 93, 0,112, 97,114,116,105, 99,108,101, 95,112,101,114, 99, 0,115,117, 98,115,117,
+114,102, 95,109, 97,120, 0,115,104, 97,100, 98,117,102,115, 97,109,112,108,101, 95,109, 97,120, 0, 97,111, 95,101,114,114,111,
+114, 0,116,105,108,116, 0,114,101,115, 98,117,102, 0, 42,119, 97,114,112,116,101,120,116, 0, 99,111,108, 91, 51, 93, 0,109,
+ 97,116,109,111,100,101, 0,102,114, 97,109,105,110,103, 0,100,111,109,101, 0,115,116,101,114,101,111,102,108, 97,103, 0, 42,
+ 42, 98,114,117,115,104,101,115, 0, 97, 99,116,105,118,101, 95, 98,114,117,115,104, 95,105,110,100,101,120, 0, 98,114,117,115,
+104, 95, 99,111,117,110,116, 0, 42,112, 97,105,110,116, 95, 99,117,114,115,111,114, 0,112, 97,105,110,116, 95, 99,117,114,115,
+111,114, 95, 99,111,108, 91, 52, 93, 0,112, 97,105,110,116, 0,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,115,101,108,101, 99,116,109,111,100,101, 0,101,100,
+105,116,116,121,112,101, 0,100,114, 97,119, 95,115,116,101,112, 0,102, 97,100,101, 95,102,114, 97,109,101,115, 0,110, 97,109,
+101, 91, 51, 54, 93, 0,109, 97,116, 91, 51, 93, 91, 51, 93, 0,112,105,118,111,116, 91, 51, 93, 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,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,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, 97,117,116,111,107,101,121, 95,102,108, 97,103, 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,115, 99, 97,108,101, 95,108,
+101,110,103,116,104, 0,115,121,115,116,101,109, 0,103,114, 97,118,105,116,121, 91, 51, 93, 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, 42,116,111,111,108,115,101,116,116,105,110,103,115, 0, 42,115,116, 97,116,115, 0,
+ 97,117,100,105,111, 0,116,114, 97,110,115,102,111,114,109, 95,115,112, 97, 99,101,115, 0,115,111,117,110,100, 95,104, 97,110,
+100,108,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,103,109, 0,117,110,105,116, 0,112,104,121,115,105, 99,
+115, 95,115,101,116,116,105,110,103,115, 0, 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,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,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,115, 99,101,110,101,108,111, 99,107, 0, 97,114,111,117,110,100, 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,
@@ -1975,374 +2016,379 @@ char datatoc_B_blend[]= {
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,111,116,121,112,101, 0,112,117,108,115,101, 0,102,114,101,113, 0,116,111,116,108,105,110,
-107,115, 0, 42, 42,108,105,110,107,115, 0,116, 97,112, 0,106,111,121,105,110,100,101,120, 0, 97,120,105,115, 95,115,105,110,
-103,108,101, 0, 97,120,105,115,102, 0, 98,117,116,116,111,110, 0,104, 97,116, 0,104, 97,116,102, 0,112,114,101, 99,105,115,
-105,111,110, 0,115,116,114, 91, 49, 50, 56, 93, 0,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,112,105,116,
- 99,104, 0,115,111,117,110,100, 51, 68, 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, 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,110,116, 95, 97,114,103, 95, 49, 0,105,110,116, 95, 97,114,103, 95,
- 50, 0,102,108,111, 97,116, 95, 97,114,103, 95, 49, 0,102,108,111, 97,116, 95, 97,114,103, 95, 50, 0,116,111, 80,114,111,112,
- 78, 97,109,101, 91, 51, 50, 93, 0, 42,116,111, 79, 98,106,101, 99,116, 0, 98,111,100,121, 84,121,112,101, 0,102,105,108,101,
-110, 97,109,101, 91, 54, 52, 93, 0,108,111, 97,100, 97,110,105,110, 97,109,101, 91, 54, 52, 93, 0,105,110,116, 95, 97,114,103,
- 0,102,108,111, 97,116, 95, 97,114,103, 0,103,111, 0, 97, 99, 99,101,108,108,101,114, 97,116,105,111,110, 0,109, 97,120,115,
-112,101,101,100, 0,109, 97,120,114,111,116,115,112,101,101,100, 0,109, 97,120,116,105,108,116,115,112,101,101,100, 0,116,105,
-108,116,100, 97,109,112, 0,115,112,101,101,100,100, 97,109,112, 0, 42,115,111,117,114, 99,101, 0,102,114, 97,109,101,115,107,
-105,112, 0,109,117,116,101, 0, 99,104, 97,110,103,101,100, 0,109,105,110, 95,103, 97,105,110, 0,109, 97,120, 95,103, 97,105,
-110, 0,114,101,102,101,114,101,110, 99,101, 95,100,105,115,116, 97,110, 99,101, 0,109, 97,120, 95,100,105,115,116, 97,110, 99,
-101, 0,114,111,108,108,111,102,102, 95,102, 97, 99,116,111,114, 0, 99,111,110,101, 95,105,110,110,101,114, 95, 97,110,103,108,
-101, 0, 99,111,110,101, 95,111,117,116,101,114, 95, 97,110,103,108,101, 0, 99,111,110,101, 95,111,117,116,101,114, 95,103, 97,
-105,110, 0, 42,110,101,119,112, 97, 99,107,101,100,102,105,108,101, 0, 97,116,116,101,110,117, 97,116,105,111,110, 0,100,105,
-115,116, 97,110, 99,101, 0, 42, 99, 97, 99,104,101, 0, 42, 97,114,101, 97, 0, 42,108, 97,109,112,114,101,110, 0,103,111, 98,
-106,101, 99,116, 0,100,117,112,108,105, 95,111,102,115, 91, 51, 93, 0, 99,104,105,108,100, 98, 97,115,101, 0,114,111,108,108,
- 0,104,101, 97,100, 91, 51, 93, 0,116, 97,105,108, 91, 51, 93, 0, 98,111,110,101, 95,109, 97,116, 91, 51, 93, 91, 51, 93, 0,
- 97,114,109, 95,104,101, 97,100, 91, 51, 93, 0, 97,114,109, 95,116, 97,105,108, 91, 51, 93, 0, 97,114,109, 95,109, 97,116, 91,
- 52, 93, 91, 52, 93, 0,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, 42,115,107,101,116, 99,104, 0,108, 97,121,101,114, 95,112,114,111,116,101, 99,116,
-101,100, 0,103,104,111,115,116,101,112, 0,103,104,111,115,116,115,105,122,101, 0,103,104,111,115,116,116,121,112,101, 0,112,
- 97,116,104,115,105,122,101, 0,103,104,111,115,116,115,102, 0,103,104,111,115,116,101,102, 0,112, 97,116,104,115,102, 0,112,
- 97,116,104,101,102, 0,112, 97,116,104, 98, 99, 0,112, 97,116,104, 97, 99, 0, 42,112,111,105,110,116,115, 0,115,116, 97,114,
-116, 95,102,114, 97,109,101, 0,101,110,100, 95,102,114, 97,109,101, 0, 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,104, 97,110,110,101,108,115, 0, 99,117,115,116,111,109, 67,111,108, 0, 99,115, 0, 99,117,
-114,118,101,115, 0,103,114,111,117,112,115, 0, 97, 99,116,105,118,101, 95,109, 97,114,107,101,114, 0,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,109, 97,116,
-114,105,120, 91, 52, 93, 91, 52, 93, 0,115,112, 97, 99,101, 0,114,111,116, 79,114,100,101,114, 0,116, 97,114,110,117,109, 0,
-116, 97,114,103,101,116,115, 0,105,116,101,114, 97,116,105,111,110,115, 0,114,111,111,116, 98,111,110,101, 0,109, 97,120, 95,
-114,111,111,116, 98,111,110,101, 0, 42,112,111,108,101,116, 97,114, 0,112,111,108,101,115,117, 98,116, 97,114,103,101,116, 91,
- 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,115,109,111,111,116,104, 95,115,116,114,111,107,101, 95,114, 97,100,105,117,
-115, 0,115,109,111,111,116,104, 95,115,116,114,111,107,101, 95,102, 97, 99,116,111,114, 0,114, 97,116,101, 0,114,103, 98, 91,
- 51, 93, 0,115, 99,117,108,112,116, 95,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, 42,103,114,111,117,110,100,
- 0,103,114, 97,118,105,116,121, 91, 51, 93, 0,119, 97,110,100,101,114, 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,112,114,101,118, 95,115,116, 97,116,101, 0, 42,104, 97,105,114, 0, 42, 98,111,105,100, 0,100,105,101,116,105,109,
-101, 0,110,117,109, 95,100,109, 99, 97, 99,104,101, 0, 97,108,105,118,101, 0,108,111,111,112, 0,104, 97,105,114, 95,105,110,
-100,101,120, 0, 42, 98,111,105,100,115, 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,101,110, 95,115,116,101,112, 0,104, 97,
-105,114, 95,115,116,101,112, 0,107,101,121,115, 95,115,116,101,112, 0, 97,100, 97,112,116, 95, 97,110,103,108,101, 0, 97,100,
- 97,112,116, 95,112,105,120, 0,114,111,116,102,114,111,109, 0,105,110,116,101,103,114, 97,116,111,114, 0, 98, 98, 95, 97,108,
-105,103,110, 0, 98, 98, 95,117,118, 95,115,112,108,105,116, 0, 98, 98, 95, 97,110,105,109, 0, 98, 98, 95,115,112,108,105,116,
- 95,111,102,102,115,101,116, 0, 98, 98, 95,116,105,108,116, 0, 98, 98, 95,114, 97,110,100, 95,116,105,108,116, 0, 98, 98, 95,
-111,102,102,115,101,116, 91, 50, 93, 0,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,101,102,102,101, 99,116,111,114, 95,119,101,105,103,104,116, 91, 49, 48,
- 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,112, 97,114,116,105, 99,108,101,115, 0, 42, 42,112, 97,116,104, 99, 97, 99,104,101, 0, 42, 42,
- 99,104,105,108,100, 99, 97, 99,104,101, 0,112, 97,116,104, 99, 97, 99,104,101, 98,117,102,115, 0, 99,104,105,108,100, 99, 97,
- 99,104,101, 98,117,102,115, 0, 42, 99,108,109,100, 0, 42,104, 97,105,114, 95,105,110, 95,100,109, 0, 42,104, 97,105,114, 95,
-111,117,116, 95,100,109, 0, 42,116, 97,114,103,101,116, 95,111, 98, 0, 42,108, 97,116,116,105, 99,101, 0,101,102,102,101, 99,
-116,111,114,115, 0,114,101, 97, 99,116,101,118,101,110,116,115, 0,116,114,101,101, 95,102,114, 97,109,101, 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,116,114,101,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,118,101,108,111, 99,105,116,121,
- 95,115,109,111,111,116,104, 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,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,116,121,112,101,115,116,114, 0, 42,109,101,
-115,115, 97,103,101, 0,108,105,115,116, 0,112,114,105,110,116,108,101,118,101,108, 0,115,116,111,114,101,108,101,118,101,108,
- 0, 42,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,112,114,111,112,118, 97,108,117,101, 0,105,110, 97, 99,116,105,118,101, 0,109, 97,112,116,
-121,112,101, 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,105,115, 95,109,111,100, 97,108, 0, 42,105,116,101,109,115, 0, 42, 99,117,115,116,111,109,100, 97,
-116, 97, 0, 42,114,101,112,111,114,116,115, 0,109, 97, 99,114,111, 0, 42,111,112,109, 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, 97, 99,116, 95, 98,108,101,110,100,109,111,100,
-101, 0, 97, 99,116, 95,101,120,116,101,110,100,109,111,100,101, 0, 97, 99,116, 95,105,110,102,108,117,101,110, 99,101, 0,114,
-117,108,101, 0,111,112,116,105,111,110,115, 0,102,101, 97,114, 95,102, 97, 99,116,111,114, 0,115,105,103,110, 97,108, 95,105,
-100, 0,108,111,111,107, 95, 97,104,101, 97,100, 0,111,108,111, 99, 91, 51, 93, 0,113,117,101,117,101, 95,115,105,122,101, 0,
-119, 97,110,100,101,114, 0,102,108,101,101, 95,100,105,115,116, 97,110, 99,101, 0,104,101, 97,108,116,104, 0,115,116, 97,116,
-101, 95,105,100, 0,114,117,108,101,115, 0, 99,111,110,100,105,116,105,111,110,115, 0, 97, 99,116,105,111,110,115, 0,114,117,
-108,101,115,101,116, 95,116,121,112,101, 0,114,117,108,101, 95,102,117,122,122,105,110,101,115,115, 0,108, 97,115,116, 95,115,
-116, 97,116,101, 95,105,100, 0,108, 97,110,100,105,110,103, 95,115,109,111,111,116,104,110,101,115,115, 0, 98, 97,110,107,105,
-110,103, 0, 97,103,103,114,101,115,115,105,111,110, 0, 97, 99, 99,117,114, 97, 99,121, 0, 97,105,114, 95,109,105,110, 95,115,
-112,101,101,100, 0, 97,105,114, 95,109, 97,120, 95,115,112,101,101,100, 0, 97,105,114, 95,109, 97,120, 95, 97, 99, 99, 0, 97,
-105,114, 95,109, 97,120, 95, 97,118,101, 0, 97,105,114, 95,112,101,114,115,111,110, 97,108, 95,115,112, 97, 99,101, 0,108, 97,
-110,100, 95,106,117,109,112, 95,115,112,101,101,100, 0,108, 97,110,100, 95,109, 97,120, 95,115,112,101,101,100, 0,108, 97,110,
-100, 95,109, 97,120, 95, 97, 99, 99, 0,108, 97,110,100, 95,109, 97,120, 95, 97,118,101, 0,108, 97,110,100, 95,112,101,114,115,
-111,110, 97,108, 95,115,112, 97, 99,101, 0,108, 97,110,100, 95,115,116,105, 99,107, 95,102,111,114, 99,101, 0,115,116, 97,116,
-101,115, 0, 42,115,109,100, 0, 42,102,108,117,105,100, 0, 42,102,108,117,105,100, 95,103,114,111,117,112, 0, 42, 99,111,108,
-108, 95,103,114,111,117,112, 0, 42,119,116, 0, 42,116,101,120, 95,119,116, 0, 42,116,101,120, 95,115,104, 97,100,111,119, 0,
- 42,115,104, 97,100,111,119, 0,112, 48, 91, 51, 93, 0,112, 49, 91, 51, 93, 0,100,120, 0,111,109,101,103, 97, 0,116,101,109,
-112, 65,109, 98, 0, 98,101,116, 97, 0,114,101,115, 91, 51, 93, 0, 97,109,112,108,105,102,121, 0,109, 97,120,114,101,115, 0,
-118,105,101,119,115,101,116,116,105,110,103,115, 0,110,111,105,115,101, 0,100,105,115,115, 95,112,101,114, 99,101,110,116, 0,
-100,105,115,115, 95,115,112,101,101,100, 0,114,101,115, 95,119,116, 91, 51, 93, 0,100,120, 95,119,116, 0,118, 51,100,110,117,
-109, 0, 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 91, 50, 93, 0,112,116, 99, 97, 99,104,101,115, 91, 50, 93, 0,118,101,
-108,111, 99,105,116,121, 91, 51, 93, 0,118,103,114,112, 95,104,101, 97,116, 95,115, 99, 97,108,101, 91, 50, 93, 0,118,103,114,
-111,117,112, 95,102,108,111,119, 0,118,103,114,111,117,112, 95,100,101,110,115,105,116,121, 0,118,103,114,111,117,112, 95,104,
-101, 97,116, 0, 42,112,111,105,110,116,115, 95,111,108,100, 0, 42,118,101,108, 0,109, 97,116, 95,111,108,100, 91, 52, 93, 91,
- 52, 93, 0,110,117,109,112,111,105,110,116,115, 0, 0, 0, 0, 84, 89, 80, 69,182, 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, 84,101,120,116, 76,105,110,101, 0, 84,101,120,116, 77, 97,114,107,101,
-114, 0, 84,101,120,116, 0, 80, 97, 99,107,101,100, 70,105,108,101, 0, 67, 97,109,101,114, 97, 0, 73,109, 97,103,101, 85,115,
-101,114, 0, 83, 99,101,110,101, 0, 73,109, 97,103,101, 0, 71, 80, 85, 84,101,120,116,117,114,101, 0, 97,110,105,109, 0, 82,
-101,110,100,101,114, 82,101,115,117,108,116, 0, 77, 84,101,120, 0, 84,101,120, 0, 80,108,117,103,105,110, 84,101,120, 0, 67,
- 66, 68, 97,116, 97, 0, 67,111,108,111,114, 66, 97,110,100, 0, 69,110,118, 77, 97,112, 0, 73,109, 66,117,102, 0, 80,111,105,
-110,116, 68,101,110,115,105,116,121, 0, 80, 97,114,116,105, 99,108,101, 83,121,115,116,101,109, 0, 86,111,120,101,108, 68, 97,
-116, 97, 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, 86,111,108,117,109,101, 83,101,116,116,105,110,103,115, 0, 77, 97,
-116,101,114,105, 97,108, 0, 71,114,111,117,112, 0, 86, 70,111,110,116, 0, 86, 70,111,110,116, 68, 97,116, 97, 0, 77,101,116,
- 97, 69,108,101,109, 0, 66,111,117,110,100, 66,111,120, 0, 77,101,116, 97, 66, 97,108,108, 0, 78,117,114, 98, 0, 67,104, 97,
-114, 73,110,102,111, 0, 84,101,120,116, 66,111,120, 0, 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, 77,117,108,116,105,114,101,115, 76,101,118,101,108, 59, 13, 10, 13, 10,
-116,121,112,101,100,101,102, 32,115,116,114,117, 99,116, 32, 77,117,108,116,105,114,101,115, 32,123, 13, 10, 9, 76,105,115,116,
- 66, 97,115,101, 32,108,101,118,101,108,115, 59, 13, 10, 9, 77, 86,101,114,116, 32, 42,118,101,114,116,115, 59, 13, 10, 13, 10,
- 9,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 32,108,101,118,101,108, 95, 99,111,117,110,116, 44, 32, 99,117,114,114,
-101,110,116, 44, 32,110,101,119,108,118,108, 44, 32,101,100,103,101,108,118,108, 44, 32,112,105,110,108,118,108, 44, 32,114,101,
-110,100,101,114,108,118,108, 59, 13, 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, 13, 10, 13, 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, 13, 10, 9, 67,117,115,116,111,109, 68, 97,116, 97, 32,118,100,
- 97,116, 97, 59, 13, 10, 9, 67,117,115,116,111,109, 68, 97,116, 97, 32,102,100, 97,116, 97, 59, 13, 10, 9,115,104,111,114,116,
- 32, 42,101,100,103,101, 95,102,108, 97,103,115, 59, 13, 10, 9, 99,104, 97,114, 32, 42,101,100,103,101, 95, 99,114,101, 97,115,
-101,115, 59, 13, 10,125, 32, 77,117,108,116,105,114,101,115, 59, 13, 10, 13, 10, 47, 42, 42, 32, 69,110,100, 32, 77,117,108,116,
-105,114,101,115, 32, 42, 42, 47, 13, 10, 13, 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, 13, 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, 13, 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, 13, 10, 9, 77, 70, 97, 99,101, 32, 42,111,108,100, 95,102, 97, 99,
-101,115, 59, 13, 10, 9, 77, 69,100,103,101, 32, 42,111,108,100, 95,101,100,103,101,115, 59, 13, 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, 13, 10,125, 32, 80, 97,114,116,105, 97,108, 86,105,115,105, 98,105,108,105,116,121, 59, 13, 10, 13, 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, 13, 10, 35,100,
-101,102,105,110,101, 32, 77, 69, 95, 83, 80, 72, 69, 82, 69, 84, 69, 83, 84, 9, 50, 13, 10, 35,100,101,102,105,110,101, 32, 77,
- 69, 95, 83, 80, 72, 69, 82, 69, 84, 69, 77, 80, 9, 52, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 72, 73, 68, 69, 9,
- 9, 9, 49, 54, 13, 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, 13, 10, 13, 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, 13, 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, 13, 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, 13, 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, 13, 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, 13, 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, 13, 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, 13, 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, 13, 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, 13, 10, 13, 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, 13, 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, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 49, 9, 9, 49,
- 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 50, 9, 9, 50, 13, 10, 35,100,101,102,105,110,101, 32,
- 77, 69, 95, 70, 76, 73, 80, 86, 51, 9, 9, 52, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 52, 9,
- 9, 56, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 89, 9, 9, 49, 54, 13, 10, 35,100,101,102,105,
-110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 90, 9, 9, 51, 50, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79,
- 74, 89, 90, 9, 9, 54, 52, 13, 10, 13, 10, 47, 42, 32,101,100, 99,111,100,101, 32, 40,109,102, 97, 99,101, 41, 32, 42, 47, 13,
- 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 49, 86, 50, 9, 9, 9, 49, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69,
- 95, 86, 50, 86, 51, 9, 9, 9, 50, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 49, 9, 9, 9, 52, 13, 10,
- 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 52, 9, 9, 9, 52, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95,
- 86, 52, 86, 49, 9, 9, 9, 56, 13, 10, 13, 10, 47, 42, 32,102,108, 97,103, 32, 40,109,102, 97, 99,101, 41, 32, 42, 47, 13, 10,
- 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 77, 79, 79, 84, 72, 9, 9, 9, 49, 13, 10, 35,100,101,102,105,110,101, 32, 77,
- 69, 95, 70, 65, 67, 69, 95, 83, 69, 76, 9, 9, 9, 50, 13, 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, 13, 10,
- 47, 42, 32,109,115,101,108,101, 99,116, 45, 62,116,121,112,101, 32, 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95,
- 86, 83, 69,108, 9, 48, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 83, 69,108, 32, 49, 13, 10, 35,100,101,102,105,
-110,101, 32, 77, 69, 95, 70, 83, 69, 76, 32, 50, 13, 10, 13, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,102,108, 97,103, 32,
- 42, 47, 13, 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, 13, 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, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 49, 9, 9, 52, 13, 10, 35,
-100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 50, 9, 9, 56, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69,
- 76, 51, 9, 9, 49, 54, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 52, 9, 9, 51, 50, 13, 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, 13, 10, 13, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,109,
-111,100,101, 32, 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 89, 78, 65, 77, 73, 67, 9, 9, 49, 13, 10, 35,
-100,101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 83, 79, 82, 84, 9, 50, 13, 10, 35,100,101,102,105,110,101, 32, 84,
- 70, 95, 84, 69, 88, 9, 9, 9, 52, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, 86, 69, 82, 84,
- 9, 56, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 76, 73, 71, 72, 84, 9, 9, 49, 54, 13, 10, 13, 10, 35,100,101,102,
-105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, 67, 79, 76, 9, 54, 52, 13, 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, 13, 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, 13, 10, 35,100,101,102,105,110,101, 32,
- 84, 70, 95, 84, 87, 79, 83, 73, 68, 69, 9, 9, 53, 49, 50, 13, 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, 13, 10, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 79, 66, 67, 79, 76, 9, 9,
- 50, 48, 52, 56, 13, 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, 13, 10, 35,
-100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 68, 79, 87, 9, 9, 56, 49, 57, 50, 13, 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, 13, 10, 13, 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, 13, 10, 35,100,101,102,105,110,101, 32, 84,
- 70, 95, 83, 79, 76, 73, 68, 9, 48, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 68, 68, 9, 9, 49, 13, 10, 35,100,
-101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 9, 50, 13, 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, 13, 10, 13, 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, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 85,
- 66, 9, 9, 51, 13, 10, 13, 10, 13, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,117,110,119,114, 97,112, 32, 42, 47, 13, 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, 13, 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, 13, 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, 13, 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, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 49, 9, 9, 32, 32, 32, 32, 49, 54, 13,
- 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 50, 9, 9, 32, 32, 32, 32, 51, 50, 13, 10, 35,100,101,102,105,110,
-101, 32, 84, 70, 95, 80, 73, 78, 51, 9, 32, 32, 32, 9, 9, 54, 52, 13, 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, 13, 10, 13, 10, 35,101,110,100,105,102, 13, 10,104, 79, 67, 75, 33,109, 98,101,114,
- 97, 2, 67, 3,191, 16, 8, 1,232, 80,100, 0, 77,117,108,116,105,114,101,115, 67,111,108, 0, 77,117,108,116,105,114,101,115,
+120,105,115,102,108, 97,103, 0,112,111,115,101, 99,104, 97,110,110,101,108, 91, 51, 50, 93, 0, 99,111,110,115,116,114, 97,105,
+110,116, 91, 51, 50, 93, 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,111,116,121,112,101, 0,112,117,108,115,101, 0,102,114,101,113, 0,116,111,116,108,105,110,107,
+115, 0, 42, 42,108,105,110,107,115, 0,116, 97,112, 0,106,111,121,105,110,100,101,120, 0, 97,120,105,115, 95,115,105,110,103,
+108,101, 0, 97,120,105,115,102, 0, 98,117,116,116,111,110, 0,104, 97,116, 0,104, 97,116,102, 0,112,114,101, 99,105,115,105,
+111,110, 0,115,116,114, 91, 49, 50, 56, 93, 0,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,112,105,116, 99,
+104, 0,115,111,117,110,100, 51, 68, 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, 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,110,116, 95, 97,114,103, 95, 49, 0,105,110,116, 95, 97,114,103, 95, 50,
+ 0,102,108,111, 97,116, 95, 97,114,103, 95, 49, 0,102,108,111, 97,116, 95, 97,114,103, 95, 50, 0,116,111, 80,114,111,112, 78,
+ 97,109,101, 91, 51, 50, 93, 0, 42,116,111, 79, 98,106,101, 99,116, 0, 98,111,100,121, 84,121,112,101, 0,102,105,108,101,110,
+ 97,109,101, 91, 54, 52, 93, 0,108,111, 97,100, 97,110,105,110, 97,109,101, 91, 54, 52, 93, 0,105,110,116, 95, 97,114,103, 0,
+102,108,111, 97,116, 95, 97,114,103, 0, 42,115,117, 98,116, 97,114,103,101,116, 0,103,111, 0, 97, 99, 99,101,108,108,101,114,
+ 97,116,105,111,110, 0,109, 97,120,115,112,101,101,100, 0,109, 97,120,114,111,116,115,112,101,101,100, 0,109, 97,120,116,105,
+108,116,115,112,101,101,100, 0,116,105,108,116,100, 97,109,112, 0,115,112,101,101,100,100, 97,109,112, 0, 42,115,111,117,114,
+ 99,101, 0,102,114, 97,109,101,115,107,105,112, 0,109,117,116,101, 0, 99,104, 97,110,103,101,100, 0,109,105,110, 95,103, 97,
+105,110, 0,109, 97,120, 95,103, 97,105,110, 0,114,101,102,101,114,101,110, 99,101, 95,100,105,115,116, 97,110, 99,101, 0,109,
+ 97,120, 95,100,105,115,116, 97,110, 99,101, 0,114,111,108,108,111,102,102, 95,102, 97, 99,116,111,114, 0, 99,111,110,101, 95,
+105,110,110,101,114, 95, 97,110,103,108,101, 0, 99,111,110,101, 95,111,117,116,101,114, 95, 97,110,103,108,101, 0, 99,111,110,
+101, 95,111,117,116,101,114, 95,103, 97,105,110, 0, 42,110,101,119,112, 97, 99,107,101,100,102,105,108,101, 0, 97,116,116,101,
+110,117, 97,116,105,111,110, 0,100,105,115,116, 97,110, 99,101, 0, 42, 99, 97, 99,104,101, 0, 42, 97,114,101, 97, 0, 42,108,
+ 97,109,112,114,101,110, 0,103,111, 98,106,101, 99,116, 0,100,117,112,108,105, 95,111,102,115, 91, 51, 93, 0, 99,104,105,108,
+100, 98, 97,115,101, 0,114,111,108,108, 0,104,101, 97,100, 91, 51, 93, 0,116, 97,105,108, 91, 51, 93, 0, 98,111,110,101, 95,
+109, 97,116, 91, 51, 93, 91, 51, 93, 0, 97,114,109, 95,104,101, 97,100, 91, 51, 93, 0, 97,114,109, 95,116, 97,105,108, 91, 51,
+ 93, 0, 97,114,109, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,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, 42,115,107,101,116, 99,104, 0,108, 97,121,
+101,114, 95,112,114,111,116,101, 99,116,101,100, 0,103,104,111,115,116,101,112, 0,103,104,111,115,116,115,105,122,101, 0,103,
+104,111,115,116,116,121,112,101, 0,112, 97,116,104,115,105,122,101, 0,103,104,111,115,116,115,102, 0,103,104,111,115,116,101,
+102, 0,112, 97,116,104,115,102, 0,112, 97,116,104,101,102, 0,112, 97,116,104, 98, 99, 0,112, 97,116,104, 97, 99, 0, 42,112,
+111,105,110,116,115, 0,115,116, 97,114,116, 95,102,114, 97,109,101, 0,101,110,100, 95,102,114, 97,109,101, 0, 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, 99,104, 97,110, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,
+115,101, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,101, 95,104,101, 97,100, 91, 51, 93, 0,112,111,115,101, 95,116,
+ 97,105,108, 91, 51, 93, 0,108,105,109,105,116,109,105,110, 91, 51, 93, 0,108,105,109,105,116,109, 97,120, 91, 51, 93, 0,115,
+116,105,102,102,110,101,115,115, 91, 51, 93, 0,105,107,115,116,114,101,116, 99,104, 0,105,107,114,111,116,119,101,105,103,104,
+116, 0,105,107,108,105,110,119,101,105,103,104,116, 0, 42, 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,105,107,115,111,108,118,101,114, 0, 42,105,107,100, 97,116, 97, 0, 42,105,107,112, 97,114, 97,109, 0,110,117,109,105,
+116,101,114, 0,110,117,109,115,116,101,112, 0,109,105,110,115,116,101,112, 0,109, 97,120,115,116,101,112, 0,115,111,108,118,
+101,114, 0,102,101,101,100, 98, 97, 99,107, 0,109, 97,120,118,101,108, 0,100, 97,109,112,109, 97,120, 0,100, 97,109,112,101,
+112,115, 0, 99,104, 97,110,110,101,108,115, 0, 99,117,115,116,111,109, 67,111,108, 0, 99,115, 0, 99,117,114,118,101,115, 0,
+103,114,111,117,112,115, 0, 97, 99,116,105,118,101, 95,109, 97,114,107,101,114, 0,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,108,105,110, 95,101,114,114,111,114, 0,114,111,116,
+ 95,101,114,114,111,114, 0, 42,116, 97,114, 0,109, 97,116,114,105,120, 91, 52, 93, 91, 52, 93, 0,115,112, 97, 99,101, 0,114,
+111,116, 79,114,100,101,114, 0,116, 97,114,110,117,109, 0,116, 97,114,103,101,116,115, 0,105,116,101,114, 97,116,105,111,110,
+115, 0,114,111,111,116, 98,111,110,101, 0,109, 97,120, 95,114,111,111,116, 98,111,110,101, 0, 42,112,111,108,101,116, 97,114,
+ 0,112,111,108,101,115,117, 98,116, 97,114,103,101,116, 91, 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, 98,108,111, 99,107, 0, 42,116,
+121,112,101,105,110,102,111, 0, 42,102,114,111,109,110,111,100,101, 0, 42,116,111,110,111,100,101, 0, 42,102,114,111,109,115,
+111, 99,107, 0,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,106,105,116,116,101,114, 0,115,109,
+111,111,116,104, 95,115,116,114,111,107,101, 95,114, 97,100,105,117,115, 0,115,109,111,111,116,104, 95,115,116,114,111,107,101,
+ 95,102, 97, 99,116,111,114, 0,114, 97,116,101, 0,114,103, 98, 91, 51, 93, 0,115, 99,117,108,112,116, 95,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, 42,103,114,111,117,110,100, 0,119, 97,110,100,101,114, 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,112,114,101,118, 95,115,116, 97,116,101, 0, 42,104, 97,105,114, 0, 42, 98,111,105,100, 0,100,105,101,116,105,109,101, 0,
+110,117,109, 95,100,109, 99, 97, 99,104,101, 0, 97,108,105,118,101, 0,108,111,111,112, 0,104, 97,105,114, 95,105,110,100,101,
+120, 0, 42, 98,111,105,100,115, 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,101,110, 95,115,116,101,112, 0,104, 97,105,114,
+ 95,115,116,101,112, 0,107,101,121,115, 95,115,116,101,112, 0, 97,100, 97,112,116, 95, 97,110,103,108,101, 0, 97,100, 97,112,
+116, 95,112,105,120, 0,114,111,116,102,114,111,109, 0,105,110,116,101,103,114, 97,116,111,114, 0, 98, 98, 95, 97,108,105,103,
+110, 0, 98, 98, 95,117,118, 95,115,112,108,105,116, 0, 98, 98, 95, 97,110,105,109, 0, 98, 98, 95,115,112,108,105,116, 95,111,
+102,102,115,101,116, 0, 98, 98, 95,116,105,108,116, 0, 98, 98, 95,114, 97,110,100, 95,116,105,108,116, 0, 98, 98, 95,111,102,
+102,115,101,116, 91, 50, 93, 0,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,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, 42,101,102,102, 95,103,114,111,117,112, 0, 42,100,117,112, 95,111, 98, 0, 42, 98, 98, 95,111, 98, 0, 42,112,100,
+ 50, 0, 42,112, 97,114,116, 0, 42,112, 97,114,116,105, 99,108,101,115, 0, 42, 42,112, 97,116,104, 99, 97, 99,104,101, 0, 42,
+ 42, 99,104,105,108,100, 99, 97, 99,104,101, 0,112, 97,116,104, 99, 97, 99,104,101, 98,117,102,115, 0, 99,104,105,108,100, 99,
+ 97, 99,104,101, 98,117,102,115, 0, 42, 99,108,109,100, 0, 42,104, 97,105,114, 95,105,110, 95,100,109, 0, 42,104, 97,105,114,
+ 95,111,117,116, 95,100,109, 0, 42,116, 97,114,103,101,116, 95,111, 98, 0, 42,108, 97,116,116,105, 99,101, 0,116,114,101,101,
+ 95,102,114, 97,109,101, 0,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,101,102,102,101, 99,
+116,111,114,115, 0, 42,116,114,101,101, 0, 42,112,100,100, 0, 42,102,114, 97,110,100, 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,118,101,108,111, 99,105,
+116,121, 95,115,109,111,111,116,104, 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,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,116,121,112,101,115,116,114, 0, 42,
+109,101,115,115, 97,103,101, 0,108,105,115,116, 0,112,114,105,110,116,108,101,118,101,108, 0,115,116,111,114,101,108,101,118,
+101,108, 0, 42,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,109,111,100, 97,108,104, 97,110,100,108,101,114,115, 0,115,117, 98,119,105,110,100,111,119,115, 0,
+103,101,115,116,117,114,101, 0,105,100,110, 97,109,101, 91, 54, 52, 93, 0, 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,112,114,111,112,118, 97,108,
+117,101, 0,105,110, 97, 99,116,105,118,101, 0,109, 97,112,116,121,112,101, 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,105,115, 95,109,111,100, 97,108, 0,
+ 42,105,116,101,109,115, 0, 40, 42,112,111,108,108, 41, 40, 41, 0, 42, 99,117,115,116,111,109,100, 97,116, 97, 0, 42,114,101,
+112,111,114,116,115, 0,109, 97, 99,114,111, 0, 42,111,112,109, 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, 97,
+ 99,116,105,118,101, 95,112, 97,116,104, 0, 42,116,109,112, 97, 99,116, 0,110,108, 97, 95,116,114, 97, 99,107,115, 0, 42, 97,
+ 99,116,115,116,114,105,112, 0,100,114,105,118,101,114,115, 0,111,118,101,114,114,105,100,101,115, 0, 97, 99,116, 95, 98,108,
+101,110,100,109,111,100,101, 0, 97, 99,116, 95,101,120,116,101,110,100,109,111,100,101, 0, 97, 99,116, 95,105,110,102,108,117,
+101,110, 99,101, 0,114,117,108,101, 0,111,112,116,105,111,110,115, 0,102,101, 97,114, 95,102, 97, 99,116,111,114, 0,115,105,
+103,110, 97,108, 95,105,100, 0,108,111,111,107, 95, 97,104,101, 97,100, 0,111,108,111, 99, 91, 51, 93, 0,113,117,101,117,101,
+ 95,115,105,122,101, 0,119, 97,110,100,101,114, 0,102,108,101,101, 95,100,105,115,116, 97,110, 99,101, 0,104,101, 97,108,116,
+104, 0,115,116, 97,116,101, 95,105,100, 0,114,117,108,101,115, 0, 99,111,110,100,105,116,105,111,110,115, 0, 97, 99,116,105,
+111,110,115, 0,114,117,108,101,115,101,116, 95,116,121,112,101, 0,114,117,108,101, 95,102,117,122,122,105,110,101,115,115, 0,
+108, 97,115,116, 95,115,116, 97,116,101, 95,105,100, 0,108, 97,110,100,105,110,103, 95,115,109,111,111,116,104,110,101,115,115,
+ 0, 98, 97,110,107,105,110,103, 0, 97,103,103,114,101,115,115,105,111,110, 0, 97, 99, 99,117,114, 97, 99,121, 0, 97,105,114,
+ 95,109,105,110, 95,115,112,101,101,100, 0, 97,105,114, 95,109, 97,120, 95,115,112,101,101,100, 0, 97,105,114, 95,109, 97,120,
+ 95, 97, 99, 99, 0, 97,105,114, 95,109, 97,120, 95, 97,118,101, 0, 97,105,114, 95,112,101,114,115,111,110, 97,108, 95,115,112,
+ 97, 99,101, 0,108, 97,110,100, 95,106,117,109,112, 95,115,112,101,101,100, 0,108, 97,110,100, 95,109, 97,120, 95,115,112,101,
+101,100, 0,108, 97,110,100, 95,109, 97,120, 95, 97, 99, 99, 0,108, 97,110,100, 95,109, 97,120, 95, 97,118,101, 0,108, 97,110,
+100, 95,112,101,114,115,111,110, 97,108, 95,115,112, 97, 99,101, 0,108, 97,110,100, 95,115,116,105, 99,107, 95,102,111,114, 99,
+101, 0,115,116, 97,116,101,115, 0, 42,115,109,100, 0, 42,102,108,117,105,100, 0, 42,102,108,117,105,100, 95,103,114,111,117,
+112, 0, 42, 99,111,108,108, 95,103,114,111,117,112, 0, 42,119,116, 0, 42,116,101,120, 95,119,116, 0, 42,116,101,120, 95,115,
+104, 97,100,111,119, 0, 42,115,104, 97,100,111,119, 0,112, 48, 91, 51, 93, 0,112, 49, 91, 51, 93, 0,100,120, 0,111,109,101,
+103, 97, 0,116,101,109,112, 65,109, 98, 0, 98,101,116, 97, 0,114,101,115, 91, 51, 93, 0, 97,109,112,108,105,102,121, 0,109,
+ 97,120,114,101,115, 0,118,105,101,119,115,101,116,116,105,110,103,115, 0,110,111,105,115,101, 0,100,105,115,115, 95,112,101,
+114, 99,101,110,116, 0,100,105,115,115, 95,115,112,101,101,100, 0,114,101,115, 95,119,116, 91, 51, 93, 0,100,120, 95,119,116,
+ 0,118, 51,100,110,117,109, 0, 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 91, 50, 93, 0,112,116, 99, 97, 99,104,101,115,
+ 91, 50, 93, 0,118,101,108,111, 99,105,116,121, 91, 51, 93, 0,118,103,114,112, 95,104,101, 97,116, 95,115, 99, 97,108,101, 91,
+ 50, 93, 0,118,103,114,111,117,112, 95,102,108,111,119, 0,118,103,114,111,117,112, 95,100,101,110,115,105,116,121, 0,118,103,
+114,111,117,112, 95,104,101, 97,116, 0, 42,112,111,105,110,116,115, 95,111,108,100, 0, 42,118,101,108, 0,109, 97,116, 95,111,
+108,100, 91, 52, 93, 91, 52, 93, 0,110,117,109,112,111,105,110,116,115, 0, 0, 84, 89, 80, 69,191, 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, 84,101,120,116, 76,105,110,101, 0, 84,101,120,116, 77,
+ 97,114,107,101,114, 0, 84,101,120,116, 0, 80, 97, 99,107,101,100, 70,105,108,101, 0, 67, 97,109,101,114, 97, 0, 73,109, 97,
+103,101, 85,115,101,114, 0, 83, 99,101,110,101, 0, 73,109, 97,103,101, 0, 71, 80, 85, 84,101,120,116,117,114,101, 0, 97,110,
+105,109, 0, 82,101,110,100,101,114, 82,101,115,117,108,116, 0, 77, 84,101,120, 0, 84,101,120, 0, 80,108,117,103,105,110, 84,
+101,120, 0, 67, 66, 68, 97,116, 97, 0, 67,111,108,111,114, 66, 97,110,100, 0, 69,110,118, 77, 97,112, 0, 73,109, 66,117,102,
+ 0, 80,111,105,110,116, 68,101,110,115,105,116,121, 0, 80, 97,114,116,105, 99,108,101, 83,121,115,116,101,109, 0, 86,111,120,
+101,108, 68, 97,116, 97, 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, 86,111,108,117,109,101, 83,101,116,116,105,110,103,
+115, 0, 77, 97,116,101,114,105, 97,108, 0, 71,114,111,117,112, 0, 86, 70,111,110,116, 0, 86, 70,111,110,116, 68, 97,116, 97,
+ 0, 77,101,116, 97, 69,108,101,109, 0, 66,111,117,110,100, 66,111,120, 0, 77,101,116, 97, 66, 97,108,108, 0, 78,117,114, 98,
+ 0, 67,104, 97,114, 73,110,102,111, 0, 84,101,120,116, 66,111,120, 0, 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,117,108,116,105,114,101,115, 76,101,118,101,108, 59,
+ 13, 10, 13, 10,116,121,112,101,100,101,102, 32,115,116,114,117, 99,116, 32, 77,117,108,116,105,114,101,115, 32,123, 13, 10, 9,
+ 76,105,115,116, 66, 97,115,101, 32,108,101,118,101,108,115, 59, 13, 10, 9, 77, 86,101,114,116, 32, 42,118,101,114,116,115, 59,
+ 13, 10, 13, 10, 9,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 32,108,101,118,101,108, 95, 99,111,117,110,116, 44, 32,
+ 99,117,114,114,101,110,116, 44, 32,110,101,119,108,118,108, 44, 32,101,100,103,101,108,118,108, 44, 32,112,105,110,108,118,108,
+ 44, 32,114,101,110,100,101,114,108,118,108, 59, 13, 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, 13, 10, 13, 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, 13, 10, 9, 67,117,115,116,111,109, 68, 97,116,
+ 97, 32,118,100, 97,116, 97, 59, 13, 10, 9, 67,117,115,116,111,109, 68, 97,116, 97, 32,102,100, 97,116, 97, 59, 13, 10, 9,115,
+104,111,114,116, 32, 42,101,100,103,101, 95,102,108, 97,103,115, 59, 13, 10, 9, 99,104, 97,114, 32, 42,101,100,103,101, 95, 99,
+114,101, 97,115,101,115, 59, 13, 10,125, 32, 77,117,108,116,105,114,101,115, 59, 13, 10, 13, 10, 47, 42, 42, 32, 69,110,100, 32,
+ 77,117,108,116,105,114,101,115, 32, 42, 42, 47, 13, 10, 13, 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, 13, 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, 13, 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, 13, 10, 9, 77, 70, 97, 99,101, 32, 42,111,108,100,
+ 95,102, 97, 99,101,115, 59, 13, 10, 9, 77, 69,100,103,101, 32, 42,111,108,100, 95,101,100,103,101,115, 59, 13, 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, 13, 10,125, 32, 80, 97,114,116,105, 97,108, 86,105,115,105, 98,105,108,105,116,121, 59,
+ 13, 10, 13, 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,
+ 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 80, 72, 69, 82, 69, 84, 69, 83, 84, 9, 50, 13, 10, 35,100,101,102,105,
+110,101, 32, 77, 69, 95, 83, 80, 72, 69, 82, 69, 84, 69, 77, 80, 9, 52, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 72,
+ 73, 68, 69, 9, 9, 9, 49, 54, 13, 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, 13, 10, 13, 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, 13, 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, 13, 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,
+ 13, 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, 13, 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, 13,
+ 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, 13, 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, 13, 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, 13, 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, 13, 10, 13, 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, 13, 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, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86,
+ 49, 9, 9, 49, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 50, 9, 9, 50, 13, 10, 35,100,101,102,
+105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 51, 9, 9, 52, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73,
+ 80, 86, 52, 9, 9, 56, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 89, 9, 9, 49, 54, 13, 10, 35,
+100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 90, 9, 9, 51, 50, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69,
+ 95, 80, 82, 79, 74, 89, 90, 9, 9, 54, 52, 13, 10, 13, 10, 47, 42, 32,101,100, 99,111,100,101, 32, 40,109,102, 97, 99,101, 41,
+ 32, 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 49, 86, 50, 9, 9, 9, 49, 13, 10, 35,100,101,102,105,110,
+101, 32, 77, 69, 95, 86, 50, 86, 51, 9, 9, 9, 50, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 49, 9, 9,
+ 9, 52, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 52, 9, 9, 9, 52, 13, 10, 35,100,101,102,105,110,101,
+ 32, 77, 69, 95, 86, 52, 86, 49, 9, 9, 9, 56, 13, 10, 13, 10, 47, 42, 32,102,108, 97,103, 32, 40,109,102, 97, 99,101, 41, 32,
+ 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 77, 79, 79, 84, 72, 9, 9, 9, 49, 13, 10, 35,100,101,102,105,
+110,101, 32, 77, 69, 95, 70, 65, 67, 69, 95, 83, 69, 76, 9, 9, 9, 50, 13, 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, 13, 10, 47, 42, 32,109,115,101,108,101, 99,116, 45, 62,116,121,112,101, 32, 42, 47, 13, 10, 35,100,101,102,105,110,101,
+ 32, 77, 69, 95, 86, 83, 69,108, 9, 48, 13, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 83, 69,108, 32, 49, 13, 10, 35,
+100,101,102,105,110,101, 32, 77, 69, 95, 70, 83, 69, 76, 32, 50, 13, 10, 13, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,102,
+108, 97,103, 32, 42, 47, 13, 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, 13, 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, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 49, 9, 9,
+ 52, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 50, 9, 9, 56, 13, 10, 35,100,101,102,105,110,101, 32, 84,
+ 70, 95, 83, 69, 76, 51, 9, 9, 49, 54, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 52, 9, 9, 51, 50, 13,
+ 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, 13, 10, 13, 10, 47, 42, 32,109,116,102, 97, 99,
+101, 45, 62,109,111,100,101, 32, 42, 47, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 89, 78, 65, 77, 73, 67, 9, 9,
+ 49, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 83, 79, 82, 84, 9, 50, 13, 10, 35,100,101,102,105,
+110,101, 32, 84, 70, 95, 84, 69, 88, 9, 9, 9, 52, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68,
+ 86, 69, 82, 84, 9, 56, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 76, 73, 71, 72, 84, 9, 9, 49, 54, 13, 10, 13, 10,
+ 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, 67, 79, 76, 9, 54, 52, 13, 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,
+ 13, 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, 13, 10, 35,100,101,102,
+105,110,101, 32, 84, 70, 95, 84, 87, 79, 83, 73, 68, 69, 9, 9, 53, 49, 50, 13, 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, 13, 10, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 79, 66, 67,
+ 79, 76, 9, 9, 50, 48, 52, 56, 13, 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, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 68, 79, 87, 9, 9, 56, 49, 57, 50, 13, 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, 13, 10, 13, 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, 13, 10, 35,100,101,102,105,
+110,101, 32, 84, 70, 95, 83, 79, 76, 73, 68, 9, 48, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 68, 68, 9, 9, 49,
+ 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 9, 50, 13, 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, 13, 10, 13, 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, 13, 10, 35,100,101,102,105,110,101, 32, 84,
+ 70, 95, 83, 85, 66, 9, 9, 51, 13, 10, 13, 10, 13, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,117,110,119,114, 97,112, 32,
+ 42, 47, 13, 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, 13, 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, 13, 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, 13, 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, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 49, 9, 9, 32, 32, 32,
+ 32, 49, 54, 13, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 50, 9, 9, 32, 32, 32, 32, 51, 50, 13, 10, 35,100,
+101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 51, 9, 32, 32, 32, 9, 9, 54, 52, 13, 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, 13, 10, 13, 10, 35,101,110,100,105,102, 13, 10,104, 79, 67, 75, 33,
+109, 98,101,114, 82,163, 81,172,147,203, 19, 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,
@@ -2374,770 +2420,787 @@ char datatoc_B_blend[]= {
76, 97,116,116,105, 99,101, 0, 98, 68,101,102,111,114,109, 71,114,111,117,112, 0, 83, 99,117,108,112,116, 83,101,115,115,105,
111,110, 0, 98, 65, 99,116,105,111,110, 0, 98, 80,111,115,101, 0, 98, 71, 80,100, 97,116, 97, 0, 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, 80, 84, 67, 97, 99,104,101, 69,100,105,116, 0, 83,
- 66, 86,101,114,116,101,120, 0, 66,111,100,121, 80,111,105,110,116, 0, 66,111,100,121, 83,112,114,105,110,103, 0, 83, 66, 83,
- 99,114, 97,116, 99,104, 0, 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, 68,111,109,101, 0, 71,
- 97,109,101, 70,114, 97,109,105,110,103, 0, 71, 97,109,101, 68, 97,116, 97, 0, 84,105,109,101, 77, 97,114,107,101,114, 0, 80,
- 97,105,110,116, 0, 66,114,117,115,104, 0, 73,109, 97,103,101, 80, 97,105,110,116, 83,101,116,116,105,110,103,115, 0, 80, 97,
-114,116,105, 99,108,101, 66,114,117,115,104, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 69,100,105,116, 83,101,116,116,
-105,110,103,115, 0, 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, 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, 85,110,105,116,
- 83,101,116,116,105,110,103,115, 0, 69,100,105,116,105,110,103, 0, 83, 99,101,110,101, 83,116, 97,116,115, 0, 68, 97,103, 70,
-111,114,101,115,116, 0, 66, 71,112,105, 99, 0, 82,101,103,105,111,110, 86,105,101,119, 51, 68, 0, 82,101,110,100,101,114, 73,
-110,102,111, 0, 82,101,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, 67,
-111,110,115,111,108,101, 76,105,110,101, 0, 83,112, 97, 99,101, 67,111,110,115,111,108,101, 0, 83,112, 97, 99,101, 85,115,101,
-114, 80,114,101,102, 0,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, 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, 83,111,117,110,100, 72, 97,110,100,108,101, 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, 83,111,117,110,100, 51, 68, 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, 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, 77,111,116,105,111,110, 80, 97,116,104, 86,101,114,116, 0, 98, 77,111,116,105,111,110, 80, 97,
-116,104, 0, 98, 65,110,105,109, 86,105,122, 83,101,116,116,105,110,103,115, 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, 66,111,105,100, 80, 97,114,
-116,105, 99,108,101, 0, 66,111,105,100, 68, 97,116, 97, 0, 67,104,105,108,100, 80, 97,114,116,105, 99,108,101, 0, 80, 97,114,
-116,105, 99,108,101, 84, 97,114,103,101,116, 0, 80, 97,114,116,105, 99,108,101, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,
-101, 83,101,116,116,105,110,103,115, 0, 66,111,105,100, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, 99,108,101, 67,
- 97, 99,104,101, 75,101,121, 0, 75, 68, 84,114,101,101, 0, 76,105,110,107, 78,111,100,101, 0, 98, 71, 80, 68,115,112,111,105,
-110,116, 0, 98, 71, 80, 68,115,116,114,111,107,101, 0, 98, 71, 80, 68,102,114, 97,109,101, 0, 98, 71, 80, 68,108, 97,121,101,
-114, 0, 82,101,112,111,114,116, 0, 82,101,112,111,114,116, 76,105,115,116, 0,119,109, 87,105,110,100,111,119, 77, 97,110, 97,
-103,101,114, 0,119,109, 87,105,110,100,111,119, 0,119,109, 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, 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, 66,111,105,100, 82,117,108,101,
- 0, 66,111,105,100, 82,117,108,101, 71,111, 97,108, 65,118,111,105,100, 0, 66,111,105,100, 82,117,108,101, 65,118,111,105,100,
- 67,111,108,108,105,115,105,111,110, 0, 66,111,105,100, 82,117,108,101, 70,111,108,108,111,119, 76,101, 97,100,101,114, 0, 66,
-111,105,100, 82,117,108,101, 65,118,101,114, 97,103,101, 83,112,101,101,100, 0, 66,111,105,100, 82,117,108,101, 70,105,103,104,
-116, 0, 66,111,105,100, 83,116, 97,116,101, 0, 70, 76, 85, 73, 68, 95, 51, 68, 0, 87, 84, 85, 82, 66, 85, 76, 69, 78, 67, 69,
- 0, 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, 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, 0,
- 40, 2, 0, 0, 32, 0,140, 0,100, 3, 92, 0, 36, 0, 56, 0, 84, 0,112, 0,124, 0, 56, 0, 24, 0, 40, 0,120, 0, 12, 0,
-120, 0, 36, 0, 92, 5,128, 1, 0, 0, 0, 0, 0, 0,144, 0, 40, 1, 84, 1, 24, 0, 8, 3,168, 0, 0, 0, 76, 0,128, 1,
- 24, 1,140, 0,132, 0,124, 1, 8, 1, 56, 0, 88, 0,184, 2, 76, 0, 60, 1, 0, 0,108, 0,104, 0,148, 0, 56, 0, 8, 0,
- 16, 0, 92, 1, 0, 0, 0, 0, 0, 0, 24, 1, 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, 0, 0, 1, 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, 76, 0,176, 0, 48, 0,
-168, 0,152, 0,156, 0, 64, 0, 96, 0,108, 0,188, 0,104, 0,216, 0, 56, 0, 84, 0, 0, 0,132, 0, 28, 0,240, 1,104, 0,
- 0, 0, 80, 0, 0, 0, 0, 0, 68, 0, 8, 0, 8, 0,220, 0, 80, 0, 76, 0, 68, 0, 68, 0, 64, 0,164, 1,112, 0,108, 0,
-188, 0, 40, 0, 0, 0, 92, 0, 56, 0, 72, 0,120, 0,128, 0,252, 0,208, 0, 0, 0, 92, 0, 0, 0, 16, 0, 0, 0, 0, 0,
- 0, 0,104, 1, 28, 0,176, 0,144, 0, 52, 0, 16, 0, 72, 0, 0, 4, 56, 0, 20, 0, 16, 0, 92, 0, 80, 0, 24, 0,196, 0,
- 36, 0, 8, 0,100, 0, 80, 0, 48, 0, 52, 0, 72, 1, 32, 0, 8, 0, 24, 2, 0, 0, 0, 0, 56, 0,216, 2, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,240, 0, 40, 0,148, 0, 48, 0,140, 0,208, 0, 20, 0,224, 0,216, 0,204, 1, 60, 0, 0, 0,112, 0,
- 0, 0, 4, 1, 12, 0, 12, 0,136, 0,200, 0,124, 2, 80, 2, 40, 0,180, 0,244, 0, 52, 0,148, 2, 28, 0, 80, 0, 24, 0,
- 16, 1, 32, 0,224, 0, 32, 0, 32, 0, 80, 2, 16, 1, 16, 0,200, 21, 56, 0, 56, 11, 20, 0, 24, 0, 56, 1, 0, 0, 0, 0,
- 96, 0, 0, 0,248, 0, 0, 0, 32, 0, 80, 0, 28, 0, 16, 0, 8, 0, 52, 0,252, 0,240, 0,168, 1,196, 0, 8, 1, 48, 0,
- 16, 0, 12, 0, 24, 0, 48, 0, 16, 0, 20, 0, 16, 0, 24, 0, 56, 1, 0, 0, 56, 0, 52, 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, 76, 0, 60, 0, 12, 0, 92, 0,
- 68, 0, 32, 0, 80, 0, 16, 0, 76, 0,108, 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,196, 0, 24, 0, 4, 1,124, 0, 16, 0, 20, 0, 24, 0,172, 1,104, 0,228, 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, 0, 16, 1, 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, 52, 0, 20, 0, 72, 0, 28, 0,180, 0,208, 1, 96, 0, 0, 0, 0, 0, 0, 0, 16, 0, 20, 0, 24, 0,
-172, 0, 24, 0, 24, 0,140, 0,148, 0, 56, 0, 0, 0, 0, 0,100, 0, 0, 0, 92, 0, 0, 0, 88, 0, 20, 0, 24, 0, 16, 0,
- 20, 0, 8, 0, 8, 0, 24, 0, 20, 0, 88, 0, 24, 1, 16, 0, 68, 0, 0, 1, 20, 0,160, 0, 88, 0, 96, 0, 88, 0, 20, 0,
- 56, 0, 48, 0, 68, 0, 56, 0, 92, 0, 64, 0, 56, 0, 96, 0, 0, 0, 0, 0, 83, 84, 82, 67,126, 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, 6, 0, 40, 0, 0, 0, 40, 0, 1, 0, 0, 0, 84, 0, 0, 0, 85, 0, 4, 0, 23, 0, 4, 0, 86, 0, 41, 0, 10, 0,
- 41, 0, 0, 0, 41, 0, 1, 0, 4, 0, 87, 0, 4, 0, 88, 0, 4, 0, 89, 0, 4, 0, 43, 0, 4, 0, 14, 0, 4, 0, 90, 0,
- 0, 0, 91, 0, 0, 0, 92, 0, 42, 0, 15, 0, 27, 0, 31, 0, 0, 0, 93, 0, 4, 0, 90, 0, 4, 0, 94, 0, 12, 0, 95, 0,
- 40, 0, 96, 0, 40, 0, 97, 0, 4, 0, 98, 0, 4, 0, 99, 0, 12, 0,100, 0, 0, 0,101, 0, 4, 0,102, 0, 4, 0,103, 0,
- 9, 0,104, 0, 8, 0,105, 0, 43, 0, 3, 0, 4, 0,106, 0, 4, 0,107, 0, 9, 0, 2, 0, 44, 0, 20, 0, 27, 0, 31, 0,
- 39, 0, 75, 0, 2, 0, 17, 0, 2, 0, 19, 0, 7, 0,108, 0, 7, 0,109, 0, 7, 0,110, 0, 7, 0,111, 0, 7, 0,112, 0,
- 7, 0,113, 0, 7, 0,114, 0, 7, 0,115, 0, 7, 0,116, 0, 7, 0,117, 0, 7, 0,118, 0, 2, 0,119, 0, 2, 0,120, 0,
- 7, 0,121, 0, 36, 0, 80, 0, 32, 0,122, 0, 45, 0, 13, 0, 4, 0,123, 0, 4, 0,124, 0, 4, 0,125, 0, 4, 0,126, 0,
- 2, 0,127, 0, 2, 0,128, 0, 2, 0, 19, 0, 2, 0,129, 0, 2, 0,130, 0, 2, 0,131, 0, 2, 0,132, 0, 2, 0,133, 0,
- 46, 0,134, 0, 47, 0, 32, 0, 27, 0, 31, 0, 0, 0, 34, 0, 12, 0,135, 0, 48, 0,136, 0, 49, 0,137, 0, 50, 0,138, 0,
- 2, 0,129, 0, 2, 0, 19, 0, 2, 0,139, 0, 2, 0, 17, 0, 2, 0, 37, 0, 2, 0, 43, 0, 4, 0,140, 0, 2, 0,141, 0,
- 2, 0,142, 0, 2, 0,143, 0, 2, 0,144, 0, 2, 0,145, 0, 2, 0,146, 0, 4, 0,147, 0, 4, 0,148, 0, 43, 0,149, 0,
- 30, 0,150, 0, 0, 0,151, 0, 7, 0,152, 0, 4, 0,153, 0, 2, 0,154, 0, 2, 0,155, 0, 2, 0,156, 0, 2, 0,157, 0,
- 7, 0,158, 0, 7, 0,159, 0, 51, 0, 33, 0, 2, 0,160, 0, 2, 0,161, 0, 2, 0,162, 0, 2, 0,163, 0, 32, 0,164, 0,
- 52, 0,165, 0, 0, 0,166, 0, 0, 0,167, 0, 0, 0,168, 0, 0, 0,169, 0, 0, 0,170, 0, 7, 0,171, 0, 7, 0,172, 0,
- 7, 0,173, 0, 2, 0,174, 0, 2, 0,175, 0, 2, 0,176, 0, 2, 0,177, 0, 2, 0,178, 0, 2, 0,179, 0, 0, 0,180, 0,
- 0, 0,181, 0, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0, 7, 0,185, 0, 7, 0,186, 0, 7, 0, 57, 0, 7, 0,187, 0,
- 7, 0,188, 0, 7, 0,189, 0, 7, 0,190, 0, 7, 0,191, 0, 53, 0, 15, 0, 0, 0,192, 0, 9, 0,193, 0, 0, 0,194, 0,
- 0, 0,195, 0, 4, 0,196, 0, 4, 0,197, 0, 9, 0,198, 0, 7, 0,199, 0, 7, 0,200, 0, 7, 0,201, 0, 4, 0,202, 0,
- 9, 0,203, 0, 9, 0,204, 0, 4, 0,205, 0, 4, 0, 37, 0, 54, 0, 6, 0, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0,
- 7, 0,206, 0, 7, 0, 67, 0, 4, 0, 64, 0, 55, 0, 5, 0, 2, 0, 19, 0, 2, 0, 36, 0, 2, 0, 64, 0, 2, 0,207, 0,
- 54, 0,201, 0, 56, 0, 17, 0, 32, 0,164, 0, 47, 0,208, 0, 57, 0,209, 0, 7, 0,210, 0, 7, 0,211, 0, 2, 0, 17, 0,
- 2, 0,212, 0, 7, 0,110, 0, 7, 0,111, 0, 7, 0,213, 0, 4, 0,214, 0, 2, 0,215, 0, 2, 0,216, 0, 4, 0,129, 0,
- 4, 0,140, 0, 2, 0,217, 0, 2, 0,218, 0, 58, 0, 23, 0, 2, 0, 19, 0, 2, 0,219, 0, 7, 0,220, 0, 7, 0,221, 0,
- 2, 0,139, 0, 2, 0,222, 0, 4, 0,223, 0, 4, 0,224, 0, 32, 0,164, 0, 59, 0,225, 0, 2, 0,226, 0, 2, 0,227, 0,
- 2, 0,228, 0, 9, 0,229, 0, 7, 0,230, 0, 7, 0,231, 0, 2, 0,232, 0, 2, 0,233, 0, 2, 0,234, 0, 2, 0,235, 0,
- 7, 0,236, 0, 7, 0,237, 0, 55, 0,238, 0, 60, 0, 10, 0, 4, 0,239, 0, 4, 0,240, 0, 2, 0,241, 0, 2, 0, 19, 0,
- 4, 0, 37, 0, 32, 0,164, 0, 7, 0,242, 0, 4, 0,243, 0, 0, 0,244, 0, 7, 0,245, 0, 52, 0, 61, 0, 27, 0, 31, 0,
- 39, 0, 75, 0, 7, 0,246, 0, 7, 0,247, 0, 7, 0,248, 0, 7, 0,249, 0, 7, 0,250, 0, 7, 0,251, 0, 7, 0,252, 0,
- 7, 0,253, 0, 7, 0,254, 0, 7, 0,255, 0, 7, 0, 0, 1, 7, 0, 1, 1, 7, 0, 2, 1, 7, 0, 3, 1, 7, 0, 4, 1,
- 7, 0, 5, 1, 7, 0, 6, 1, 7, 0, 7, 1, 7, 0, 8, 1, 7, 0, 9, 1, 2, 0, 10, 1, 2, 0, 11, 1, 2, 0, 12, 1,
- 2, 0, 13, 1, 2, 0, 14, 1, 2, 0, 15, 1, 2, 0, 16, 1, 2, 0, 19, 0, 2, 0, 17, 0, 2, 0,212, 0, 7, 0, 17, 1,
- 7, 0, 18, 1, 7, 0, 19, 1, 7, 0, 20, 1, 4, 0, 21, 1, 4, 0, 22, 1, 2, 0, 23, 1, 2, 0, 24, 1, 2, 0, 25, 1,
- 2, 0,127, 0, 4, 0, 23, 0, 4, 0,124, 0, 4, 0,125, 0, 4, 0,126, 0, 7, 0, 26, 1, 7, 0, 27, 1, 7, 0,188, 0,
- 45, 0, 28, 1, 61, 0, 29, 1, 36, 0, 80, 0, 47, 0,208, 0, 53, 0, 30, 1, 55, 0,238, 0, 56, 0, 31, 1, 30, 0,150, 0,
- 58, 0, 32, 1, 60, 0, 33, 1, 0, 0, 34, 1, 0, 0,181, 0, 62, 0, 8, 0, 7, 0, 35, 1, 7, 0, 36, 1, 7, 0,172, 0,
- 4, 0, 19, 0, 7, 0, 37, 1, 7, 0, 38, 1, 7, 0, 39, 1, 32, 0, 45, 0, 63, 0, 82, 0, 27, 0, 31, 0, 39, 0, 75, 0,
- 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 40, 1, 2, 0,175, 0, 2, 0, 41, 1, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0,
- 7, 0,185, 0, 7, 0, 42, 1, 7, 0, 43, 1, 7, 0, 44, 1, 7, 0, 45, 1, 7, 0, 46, 1, 7, 0, 47, 1, 7, 0, 48, 1,
- 7, 0, 49, 1, 7, 0, 50, 1, 7, 0, 51, 1, 7, 0, 52, 1, 64, 0, 53, 1, 2, 0,219, 0, 2, 0, 70, 0, 7, 0,110, 0,
- 7, 0,111, 0, 7, 0, 54, 1, 7, 0, 55, 1, 7, 0, 56, 1, 2, 0, 57, 1, 2, 0, 58, 1, 2, 0, 59, 1, 2, 0, 60, 1,
- 0, 0, 61, 1, 0, 0, 62, 1, 2, 0, 63, 1, 2, 0, 64, 1, 2, 0, 65, 1, 2, 0, 66, 1, 2, 0, 67, 1, 7, 0, 68, 1,
- 7, 0, 69, 1, 7, 0, 70, 1, 7, 0, 71, 1, 2, 0, 72, 1, 2, 0, 43, 0, 2, 0, 73, 1, 2, 0, 74, 1, 2, 0, 75, 1,
- 2, 0, 76, 1, 7, 0, 77, 1, 7, 0, 78, 1, 7, 0, 79, 1, 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, 2, 0, 89, 1, 2, 0, 90, 1, 4, 0, 91, 1,
- 4, 0, 92, 1, 2, 0, 93, 1, 2, 0, 94, 1, 2, 0, 95, 1, 2, 0, 96, 1, 7, 0, 97, 1, 7, 0, 98, 1, 7, 0, 99, 1,
- 7, 0,100, 1, 2, 0,101, 1, 2, 0,102, 1, 36, 0, 80, 0, 51, 0,103, 1, 2, 0,104, 1, 2, 0,105, 1, 30, 0,150, 0,
- 65, 0, 2, 0, 27, 0, 31, 0, 36, 0, 80, 0, 66, 0, 20, 0, 7, 0,106, 1, 7, 0,107, 1, 7, 0,108, 1, 7, 0,109, 1,
- 7, 0,110, 1, 7, 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, 2, 0,119, 1, 2, 0,120, 1, 2, 0,121, 1, 2, 0,122, 1, 7, 0,123, 1, 7, 0,124, 1, 4, 0,125, 1,
- 67, 0,130, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0,126, 1, 2, 0, 19, 0, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0,
- 7, 0,127, 1, 7, 0,128, 1, 7, 0,129, 1, 7, 0,130, 1, 7, 0,131, 1, 7, 0,132, 1, 7, 0,133, 1, 7, 0,134, 1,
- 7, 0,135, 1, 7, 0,136, 1, 7, 0,137, 1, 7, 0,138, 1, 7, 0,139, 1, 7, 0,140, 1, 7, 0,141, 1, 7, 0,142, 1,
- 7, 0,143, 1, 7, 0,144, 1, 7, 0,145, 1, 7, 0,146, 1, 66, 0,147, 1, 7, 0,148, 1, 7, 0,149, 1, 7, 0,150, 1,
- 7, 0,151, 1, 7, 0,152, 1, 7, 0,153, 1, 7, 0,154, 1, 2, 0,155, 1, 2, 0,156, 1, 2, 0,157, 1, 0, 0,158, 1,
- 0, 0,159, 1, 7, 0,160, 1, 7, 0,161, 1, 2, 0,162, 1, 2, 0,163, 1, 7, 0,164, 1, 7, 0,165, 1, 7, 0,166, 1,
- 7, 0,167, 1, 2, 0,168, 1, 2, 0,169, 1, 4, 0, 40, 1, 4, 0,170, 1, 2, 0,171, 1, 2, 0,172, 1, 2, 0,173, 1,
- 2, 0,174, 1, 7, 0,175, 1, 7, 0,176, 1, 7, 0,177, 1, 7, 0,178, 1, 7, 0,179, 1, 7, 0,180, 1, 7, 0,181, 1,
- 7, 0,182, 1, 7, 0,183, 1, 7, 0,184, 1, 0, 0,185, 1, 7, 0,186, 1, 7, 0,187, 1, 7, 0,188, 1, 4, 0,189, 1,
- 0, 0,190, 1, 0, 0, 73, 1, 0, 0,191, 1, 0, 0, 34, 1, 2, 0,192, 1, 2, 0,193, 1, 2, 0,104, 1, 2, 0,194, 1,
- 2, 0,195, 1, 2, 0,196, 1, 7, 0,197, 1, 7, 0,198, 1, 7, 0,199, 1, 7, 0,200, 1, 7, 0,201, 1, 2, 0,160, 0,
- 2, 0,161, 0, 55, 0,202, 1, 55, 0,203, 1, 0, 0,204, 1, 0, 0,205, 1, 0, 0,206, 1, 0, 0,207, 1, 2, 0,208, 1,
- 2, 0,209, 1, 7, 0,210, 1, 7, 0,211, 1, 51, 0,103, 1, 61, 0, 29, 1, 36, 0, 80, 0, 68, 0,212, 1, 30, 0,150, 0,
- 7, 0,213, 1, 7, 0,214, 1, 7, 0,215, 1, 7, 0,216, 1, 7, 0,217, 1, 2, 0,218, 1, 2, 0, 70, 0, 7, 0,219, 1,
- 7, 0,220, 1, 7, 0,221, 1, 7, 0,222, 1, 7, 0,223, 1, 7, 0,224, 1, 7, 0,225, 1, 7, 0,226, 1, 7, 0,227, 1,
- 2, 0,228, 1, 2, 0,229, 1, 7, 0,230, 1, 7, 0,231, 1, 7, 0,232, 1, 7, 0,233, 1, 7, 0,234, 1, 4, 0,235, 1,
- 4, 0,236, 1, 4, 0,237, 1, 12, 0,238, 1, 69, 0, 4, 0, 27, 0, 31, 0, 0, 0,239, 1, 70, 0, 2, 0, 43, 0,149, 0,
- 71, 0, 26, 0, 71, 0, 0, 0, 71, 0, 1, 0, 72, 0,240, 1, 4, 0,241, 1, 4, 0,242, 1, 4, 0,243, 1, 4, 0,244, 1,
- 4, 0,245, 1, 4, 0,246, 1, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,247, 1, 2, 0,248, 1, 7, 0, 5, 0, 7, 0, 6, 0,
- 7, 0, 7, 0, 7, 0,249, 1, 7, 0,250, 1, 7, 0,251, 1, 7, 0,252, 1, 7, 0,253, 1, 7, 0,254, 1, 7, 0,255, 1,
- 7, 0, 23, 0, 7, 0, 0, 2, 7, 0, 1, 2, 73, 0, 19, 0, 27, 0, 31, 0, 39, 0, 75, 0, 72, 0,240, 1, 12, 0, 2, 2,
- 12, 0, 3, 2, 12, 0, 4, 2, 36, 0, 80, 0, 67, 0, 5, 2, 0, 0, 19, 0, 0, 0, 6, 2, 2, 0, 7, 2, 4, 0,174, 0,
- 7, 0, 35, 1, 7, 0,172, 0, 7, 0, 36, 1, 7, 0, 8, 2, 7, 0, 9, 2, 7, 0, 10, 2, 71, 0, 11, 2, 35, 0, 11, 0,
- 7, 0, 12, 2, 7, 0, 13, 2, 7, 0, 14, 2, 7, 0,221, 0, 2, 0, 55, 0, 0, 0, 15, 2, 0, 0, 16, 2, 0, 0, 17, 2,
- 0, 0, 18, 2, 0, 0, 19, 2, 0, 0, 20, 2, 34, 0, 7, 0, 7, 0, 21, 2, 7, 0, 13, 2, 7, 0, 14, 2, 2, 0, 17, 2,
- 2, 0, 20, 2, 7, 0,221, 0, 7, 0, 37, 0, 74, 0, 21, 0, 74, 0, 0, 0, 74, 0, 1, 0, 2, 0, 17, 0, 2, 0, 22, 2,
- 2, 0, 20, 2, 2, 0, 19, 0, 2, 0, 23, 2, 2, 0, 24, 2, 2, 0, 25, 2, 2, 0, 26, 2, 2, 0, 27, 2, 2, 0, 28, 2,
- 2, 0, 29, 2, 2, 0, 30, 2, 7, 0, 31, 2, 7, 0, 32, 2, 34, 0, 49, 0, 35, 0, 50, 0, 2, 0, 33, 2, 2, 0, 34, 2,
- 4, 0, 35, 2, 75, 0, 5, 0, 2, 0, 36, 2, 2, 0, 22, 2, 0, 0, 19, 0, 0, 0, 37, 0, 2, 0, 70, 0, 76, 0, 4, 0,
- 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 8, 0, 7, 0, 37, 2, 77, 0, 67, 0, 27, 0, 31, 0, 39, 0, 75, 0, 72, 0,240, 1,
- 12, 0, 38, 2, 12, 0, 3, 2, 12, 0, 39, 2, 32, 0, 40, 2, 32, 0, 41, 2, 32, 0, 42, 2, 36, 0, 80, 0, 78, 0, 43, 2,
- 38, 0, 44, 2, 67, 0, 5, 2, 12, 0, 45, 2, 7, 0, 35, 1, 7, 0,172, 0, 7, 0, 36, 1, 4, 0,174, 0, 2, 0, 46, 2,
- 2, 0, 47, 2, 2, 0, 48, 2, 7, 0, 49, 2, 7, 0, 70, 0, 2, 0, 50, 2, 2, 0, 7, 2, 2, 0, 19, 0, 2, 0, 51, 2,
- 7, 0, 52, 2, 7, 0, 53, 2, 7, 0, 54, 2, 2, 0, 25, 2, 2, 0, 26, 2, 2, 0, 55, 2, 2, 0, 56, 2, 4, 0, 57, 2,
- 34, 0, 58, 2, 2, 0, 23, 0, 2, 0, 95, 0, 2, 0, 67, 0, 2, 0, 59, 2, 7, 0, 60, 2, 7, 0, 61, 2, 7, 0, 62, 2,
- 7, 0, 63, 2, 7, 0, 64, 2, 7, 0, 65, 2, 7, 0, 66, 2, 7, 0, 67, 2, 7, 0, 68, 2, 7, 0, 69, 2, 0, 0, 70, 2,
- 79, 0, 71, 2, 80, 0, 72, 2, 0, 0, 73, 2, 69, 0, 74, 2, 69, 0, 75, 2, 69, 0, 76, 2, 69, 0, 77, 2, 4, 0, 78, 2,
- 7, 0, 79, 2, 4, 0, 80, 2, 4, 0, 81, 2, 76, 0, 82, 2, 4, 0, 83, 2, 4, 0, 84, 2, 75, 0, 85, 2, 75, 0, 86, 2,
- 81, 0, 39, 0, 27, 0, 31, 0, 72, 0,240, 1, 12, 0, 87, 2, 36, 0, 80, 0, 38, 0, 44, 2, 67, 0, 5, 2, 82, 0, 88, 2,
- 83, 0, 89, 2, 84, 0, 90, 2, 85, 0, 91, 2, 86, 0, 92, 2, 87, 0, 93, 2, 88, 0, 94, 2, 89, 0, 95, 2, 81, 0, 96, 2,
- 90, 0, 97, 2, 91, 0, 98, 2, 92, 0, 99, 2, 92, 0,100, 2, 92, 0,101, 2, 4, 0, 54, 0, 4, 0,102, 2, 4, 0,103, 2,
- 4, 0,104, 2, 4, 0,105, 2, 4, 0,174, 0, 7, 0, 35, 1, 7, 0,172, 0, 7, 0, 36, 1, 7, 0,106, 2, 4, 0, 46, 2,
- 2, 0,107, 2, 2, 0, 19, 0, 2, 0,108, 2, 2, 0,109, 2, 2, 0, 7, 2, 2, 0,110, 2, 93, 0,111, 2, 94, 0,112, 2,
- 84, 0, 8, 0, 9, 0,113, 2, 7, 0,114, 2, 4, 0,115, 2, 0, 0, 19, 0, 0, 0,116, 2, 2, 0, 40, 1, 2, 0,117, 2,
- 2, 0,118, 2, 82, 0, 7, 0, 4, 0,119, 2, 4, 0,120, 2, 4, 0,121, 2, 4, 0,122, 2, 2, 0, 22, 2, 0, 0,123, 2,
- 0, 0, 19, 0, 86, 0, 5, 0, 4, 0,119, 2, 4, 0,120, 2, 0, 0,124, 2, 0, 0,125, 2, 2, 0, 19, 0, 95, 0, 2, 0,
- 4, 0,126, 2, 7, 0, 14, 2, 87, 0, 3, 0, 95, 0,127, 2, 4, 0,128, 2, 4, 0, 19, 0, 85, 0, 6, 0, 7, 0,129, 2,
- 2, 0,130, 2, 2, 0, 22, 2, 0, 0, 19, 0, 0, 0,125, 2, 0, 0, 48, 2, 88, 0, 4, 0, 0, 0,206, 0, 0, 0,182, 0,
- 0, 0,183, 0, 0, 0,184, 0, 96, 0, 6, 0, 47, 0,113, 2, 0, 0, 19, 0, 0, 0,116, 2, 2, 0, 40, 1, 2, 0,117, 2,
- 2, 0,118, 2, 97, 0, 1, 0, 7, 0,131, 2, 98, 0, 5, 0, 0, 0,206, 0, 0, 0,182, 0, 0, 0,183, 0, 0, 0,184, 0,
- 4, 0, 37, 0, 89, 0, 1, 0, 7, 0,132, 2, 90, 0, 2, 0, 4, 0,133, 2, 4, 0, 17, 0, 83, 0, 7, 0, 7, 0,114, 2,
- 47, 0,113, 2, 0, 0, 19, 0, 0, 0,116, 2, 2, 0, 40, 1, 2, 0,117, 2, 2, 0,118, 2, 99, 0, 1, 0, 7, 0,134, 2,
-100, 0, 1, 0, 4, 0,135, 2,101, 0, 1, 0, 0, 0,136, 2,102, 0, 1, 0, 7, 0,114, 2,103, 0, 3, 0, 4, 0,137, 2,
- 0, 0, 92, 0, 7, 0,138, 2,105, 0, 4, 0, 7, 0,206, 0, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0,106, 0, 1, 0,
-105, 0,115, 2,107, 0, 5, 0, 4, 0,139, 2, 4, 0,140, 2, 0, 0, 19, 0, 0, 0, 22, 2, 0, 0, 48, 2,108, 0, 2, 0,
- 4, 0,141, 2, 4, 0,140, 2,109, 0, 10, 0,109, 0, 0, 0,109, 0, 1, 0,107, 0,142, 2,106, 0,143, 2,108, 0,144, 2,
- 4, 0, 54, 0, 4, 0,103, 2, 4, 0,102, 2, 4, 0, 37, 0, 85, 0,145, 2, 93, 0, 14, 0, 12, 0,146, 2, 85, 0,145, 2,
- 0, 0,147, 2, 0, 0,148, 2, 0, 0,149, 2, 0, 0,150, 2, 0, 0,151, 2, 0, 0,152, 2, 0, 0,153, 2, 0, 0, 19, 0,
- 92, 0, 99, 2, 92, 0,101, 2, 2, 0,154, 2, 0, 0,155, 2, 94, 0, 8, 0, 4, 0,156, 2, 4, 0,157, 2, 82, 0,158, 2,
- 86, 0,159, 2, 4, 0,103, 2, 4, 0,102, 2, 4, 0, 54, 0, 4, 0, 37, 0,110, 0, 7, 0,110, 0, 0, 0,110, 0, 1, 0,
- 4, 0, 17, 0, 4, 0, 40, 1, 0, 0, 20, 0, 46, 0,134, 0, 0, 0,160, 2,111, 0, 7, 0,110, 0,161, 2, 2, 0,162, 2,
- 2, 0,146, 2, 2, 0,163, 2, 2, 0, 90, 0, 9, 0,164, 2, 9, 0,165, 2,112, 0, 3, 0,110, 0,161, 2, 32, 0,164, 0,
- 0, 0, 20, 0,113, 0, 5, 0,110, 0,161, 2, 32, 0,164, 0, 0, 0, 20, 0, 2, 0,166, 2, 0, 0,167, 2,114, 0, 5, 0,
-110, 0,161, 2, 7, 0, 88, 0, 7, 0,168, 2, 4, 0,169, 2, 4, 0,170, 2,115, 0, 5, 0,110, 0,161, 2, 32, 0,171, 2,
- 0, 0, 72, 0, 4, 0, 40, 1, 4, 0, 19, 0,116, 0, 13, 0,110, 0,161, 2, 32, 0,172, 2, 32, 0,173, 2, 32, 0,174, 2,
- 32, 0,175, 2, 7, 0,176, 2, 7, 0,177, 2, 7, 0,168, 2, 7, 0,178, 2, 4, 0,179, 2, 4, 0,180, 2, 4, 0, 90, 0,
- 4, 0,181, 2,117, 0, 5, 0,110, 0,161, 2, 2, 0,182, 2, 2, 0, 19, 0, 7, 0,183, 2, 32, 0,184, 2,118, 0, 3, 0,
-110, 0,161, 2, 7, 0,185, 2, 4, 0, 90, 0,119, 0, 10, 0,110, 0,161, 2, 7, 0,186, 2, 4, 0,187, 2, 4, 0, 37, 0,
- 2, 0, 90, 0, 2, 0,188, 2, 2, 0,189, 2, 2, 0,190, 2, 7, 0,191, 2, 0, 0,192, 2,120, 0, 3, 0,110, 0,161, 2,
- 7, 0, 37, 0, 4, 0, 17, 0,121, 0, 6, 0,110, 0,161, 2,122, 0,193, 2,123, 0,194, 2,124, 0,195, 2, 7, 0,196, 2,
- 4, 0, 17, 0,125, 0, 11, 0,110, 0,161, 2, 52, 0,197, 2, 7, 0,198, 2, 4, 0,199, 2, 0, 0,192, 2, 7, 0,200, 2,
- 4, 0,201, 2, 32, 0,202, 2, 0, 0,203, 2, 4, 0,204, 2, 4, 0, 37, 0,126, 0, 10, 0,110, 0,161, 2, 32, 0,205, 2,
- 47, 0,206, 2, 4, 0, 90, 0, 4, 0,207, 2, 7, 0,208, 2, 7, 0,209, 2, 0, 0,203, 2, 4, 0,204, 2, 4, 0, 37, 0,
-127, 0, 3, 0,110, 0,161, 2, 7, 0,210, 2, 4, 0,211, 2,128, 0, 5, 0,110, 0,161, 2, 7, 0,212, 2, 0, 0,192, 2,
- 2, 0, 19, 0, 2, 0,213, 2,129, 0, 8, 0,110, 0,161, 2, 32, 0,164, 0, 7, 0,212, 2, 7, 0,221, 0, 7, 0,106, 0,
- 0, 0,192, 2, 2, 0, 19, 0, 2, 0, 17, 0,130, 0, 21, 0,110, 0,161, 2, 32, 0,214, 2, 0, 0,192, 2, 52, 0,197, 2,
- 32, 0,202, 2, 2, 0, 19, 0, 2, 0, 37, 0, 7, 0,215, 2, 7, 0,216, 2, 7, 0,217, 2, 7, 0, 52, 2, 7, 0,218, 2,
- 7, 0,219, 2, 7, 0,220, 2, 7, 0,221, 2, 4, 0,201, 2, 4, 0,204, 2, 0, 0,203, 2, 7, 0,222, 2, 7, 0,223, 2,
- 7, 0, 43, 0,131, 0, 7, 0,110, 0,161, 2, 2, 0,224, 2, 2, 0,225, 2, 4, 0, 70, 0, 32, 0,164, 0, 7, 0,226, 2,
- 0, 0,192, 2,132, 0, 10, 0,110, 0,161, 2, 32, 0,164, 0, 0, 0,227, 2, 7, 0,228, 2, 7, 0,229, 2, 7, 0,221, 2,
- 4, 0,230, 2, 4, 0,231, 2, 7, 0,232, 2, 0, 0, 20, 0,133, 0, 1, 0,110, 0,161, 2,134, 0, 7, 0,110, 0,161, 2,
- 46, 0,134, 0,135, 0,233, 2,136, 0,234, 2,137, 0,235, 2,138, 0,236, 2, 12, 0,237, 2,139, 0, 14, 0,110, 0,161, 2,
- 85, 0,238, 2, 85, 0,239, 2, 85, 0,240, 2, 85, 0,241, 2, 85, 0,242, 2, 85, 0,243, 2, 82, 0,244, 2, 4, 0,245, 2,
- 4, 0,246, 2, 2, 0,108, 1, 2, 0, 37, 0, 7, 0,196, 2,140, 0,247, 2,141, 0, 7, 0,110, 0,161, 2, 85, 0,238, 2,
- 85, 0,248, 2,142, 0,249, 2,143, 0,247, 2, 4, 0,250, 2, 4, 0,245, 2,144, 0, 4, 0,110, 0,161, 2, 32, 0,164, 0,
- 4, 0,251, 2, 4, 0, 37, 0,145, 0, 2, 0, 4, 0,252, 2, 7, 0, 14, 2,146, 0, 2, 0, 4, 0,125, 0, 4, 0,253, 2,
-147, 0, 20, 0,110, 0,161, 2, 32, 0,164, 0, 0, 0,192, 2, 2, 0,254, 2, 2, 0,255, 2, 2, 0, 19, 0, 2, 0, 37, 0,
- 7, 0, 0, 3, 7, 0, 1, 3, 4, 0, 54, 0, 4, 0, 2, 3,146, 0, 3, 3,145, 0, 4, 3, 4, 0, 5, 3, 4, 0, 6, 3,
- 4, 0, 7, 3, 4, 0,253, 2, 7, 0, 8, 3, 7, 0, 9, 3, 7, 0, 10, 3,148, 0, 8, 0,110, 0,161, 2, 59, 0,225, 0,
-142, 0,249, 2, 4, 0, 11, 3, 4, 0, 12, 3, 4, 0, 13, 3, 2, 0, 19, 0, 2, 0, 57, 0,149, 0, 8, 0,110, 0,161, 2,
- 32, 0, 45, 0, 2, 0, 14, 3, 2, 0, 19, 0, 2, 0,182, 2, 2, 0, 57, 0, 7, 0, 15, 3, 7, 0, 16, 3,150, 0, 5, 0,
-110, 0,161, 2, 4, 0, 17, 3, 2, 0, 19, 0, 2, 0, 18, 3, 7, 0, 19, 3,151, 0, 7, 0,110, 0,161, 2, 85, 0, 20, 3,
- 4, 0, 21, 3, 0, 0, 22, 3, 0, 0, 23, 3, 0, 0, 24, 3, 0, 0, 25, 3,152, 0, 3, 0,110, 0,161, 2,153, 0, 26, 3,
-138, 0,236, 2,154, 0, 10, 0,110, 0,161, 2, 32, 0, 27, 3, 32, 0, 28, 3, 0, 0, 29, 3, 7, 0, 30, 3, 2, 0, 31, 3,
- 2, 0, 32, 3, 0, 0, 33, 3, 0, 0, 34, 3, 0, 0,167, 2,155, 0, 9, 0,110, 0,161, 2, 32, 0, 35, 3, 0, 0, 29, 3,
- 7, 0, 36, 3, 7, 0, 37, 3, 0, 0, 40, 1, 0, 0,182, 2, 0, 0, 38, 3, 0, 0, 37, 0,156, 0, 27, 0, 27, 0, 31, 0,
- 2, 0, 23, 2, 2, 0, 24, 2, 2, 0, 39, 3, 2, 0, 19, 0, 2, 0, 40, 3, 2, 0, 41, 3, 2, 0, 42, 3, 2, 0, 70, 0,
- 0, 0, 43, 3, 0, 0, 44, 3, 0, 0, 45, 3, 0, 0, 17, 0, 4, 0, 37, 0, 7, 0, 46, 3, 7, 0, 47, 3, 7, 0, 48, 3,
- 7, 0, 49, 3, 7, 0, 50, 3, 7, 0, 51, 3, 34, 0, 52, 3, 36, 0, 80, 0, 38, 0, 44, 2, 87, 0, 93, 2, 7, 0, 53, 3,
- 7, 0, 54, 3,156, 0, 55, 3,157, 0, 3, 0,157, 0, 0, 0,157, 0, 1, 0, 0, 0, 20, 0, 72, 0, 3, 0, 7, 0, 56, 3,
- 4, 0, 19, 0, 4, 0, 37, 0, 32, 0,116, 0, 27, 0, 31, 0, 39, 0, 75, 0,158, 0, 57, 3, 2, 0, 17, 0, 2, 0, 58, 3,
- 4, 0, 59, 3, 4, 0, 60, 3, 4, 0, 61, 3, 0, 0, 62, 3, 32, 0, 38, 0, 32, 0, 63, 3, 32, 0, 64, 3, 32, 0, 65, 3,
- 32, 0, 66, 3, 36, 0, 80, 0, 78, 0, 43, 2, 72, 0,240, 1,159, 0, 67, 3,159, 0, 68, 3,160, 0, 69, 3, 9, 0, 2, 0,
-161, 0, 70, 3, 12, 0, 71, 3, 12, 0, 87, 2, 12, 0, 3, 2, 12, 0, 72, 3, 12, 0, 73, 3, 4, 0, 40, 1, 4, 0, 74, 3,
- 67, 0, 5, 2, 0, 0, 75, 3, 4, 0, 7, 2, 4, 0, 76, 3, 7, 0, 35, 1, 7, 0, 77, 3, 7, 0, 78, 3, 7, 0,172, 0,
- 7, 0, 79, 3, 7, 0, 36, 1, 7, 0, 80, 3, 7, 0, 81, 3, 7, 0,228, 2, 7, 0, 82, 3, 7, 0,210, 0, 4, 0, 83, 3,
- 2, 0, 19, 0, 2, 0, 84, 3, 2, 0, 85, 3, 2, 0, 86, 3, 2, 0, 87, 3, 2, 0, 88, 3, 2, 0, 89, 3, 2, 0, 90, 3,
- 2, 0, 91, 3, 2, 0, 92, 3, 2, 0, 93, 3, 2, 0, 94, 3, 4, 0, 95, 3, 4, 0, 96, 3, 4, 0, 97, 3, 4, 0, 98, 3,
- 7, 0, 99, 3, 7, 0, 79, 2, 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, 0, 0,110, 3, 0, 0,111, 3, 0, 0,112, 3, 0, 0,113, 3,
- 7, 0,114, 3, 7, 0,115, 3, 12, 0,116, 3, 12, 0,117, 3, 12, 0,118, 3, 12, 0,119, 3, 7, 0,120, 3, 2, 0,133, 2,
- 2, 0,121, 3, 7, 0,115, 2, 4, 0,122, 3, 4, 0,123, 3,162, 0,124, 3, 2, 0,125, 3, 2, 0,217, 0, 7, 0,126, 3,
- 12, 0,127, 3, 12, 0,128, 3, 12, 0,129, 3, 12, 0,130, 3,163, 0, 32, 1,164, 0,131, 3, 68, 0,132, 3, 2, 0,133, 3,
- 2, 0,134, 3, 2, 0,135, 3, 2, 0,136, 3, 7, 0,107, 2, 2, 0,137, 3, 2, 0,138, 3,153, 0,139, 3,142, 0,140, 3,
-142, 0,141, 3, 4, 0,142, 3, 4, 0,143, 3, 4, 0,144, 3, 4, 0, 70, 0, 12, 0,145, 3, 12, 0,146, 3,165, 0, 14, 0,
-165, 0, 0, 0,165, 0, 1, 0, 32, 0, 38, 0, 7, 0,228, 2, 7, 0, 37, 1, 7, 0,229, 2, 7, 0,221, 2, 0, 0, 20, 0,
- 4, 0,230, 2, 4, 0,231, 2, 4, 0,147, 3, 2, 0, 17, 0, 2, 0,148, 3, 7, 0,232, 2,163, 0, 36, 0, 2, 0,149, 3,
- 2, 0,150, 3, 2, 0, 19, 0, 2, 0,221, 2, 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, 7, 0,160, 3, 7, 0,161, 3, 7, 0,162, 3, 7, 0,163, 3,
- 7, 0,164, 3, 7, 0,165, 3, 7, 0,166, 3, 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, 2, 0,175, 3, 2, 0,176, 3, 2, 0,177, 3, 2, 0,178, 3, 52, 0,165, 0,
-166, 0,179, 3, 7, 0,180, 3, 4, 0,170, 2,167, 0, 9, 0,167, 0, 0, 0,167, 0, 1, 0, 4, 0,181, 3, 4, 0,182, 3,
- 4, 0,183, 3, 4, 0, 19, 0, 4, 0,184, 3, 9, 0,185, 3, 9, 0,186, 3,138, 0, 19, 0,138, 0, 0, 0,138, 0, 1, 0,
- 4, 0, 19, 0, 4, 0,187, 3, 4, 0,188, 3, 4, 0,189, 3, 4, 0,190, 3, 4, 0,191, 3, 4, 0,192, 3, 4, 0,182, 3,
- 4, 0,133, 2, 4, 0, 57, 0, 0, 0,193, 3, 0, 0,194, 3, 0, 0,195, 3, 0, 0,196, 3, 12, 0,197, 3,168, 0,198, 3,
- 9, 0,199, 3,169, 0, 1, 0, 7, 0, 21, 2,162, 0, 30, 0, 4, 0, 19, 0, 7, 0,200, 3, 7, 0,201, 3, 7, 0,202, 3,
- 4, 0,203, 3, 4, 0,204, 3, 4, 0,205, 3, 4, 0,206, 3, 7, 0,207, 3, 7, 0,208, 3, 7, 0,209, 3, 7, 0,210, 3,
- 7, 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, 7, 0,218, 3,
- 7, 0,219, 3, 7, 0,220, 3, 7, 0,221, 3, 7, 0,222, 3, 7, 0,223, 3, 7, 0,224, 3, 4, 0,225, 3, 4, 0,226, 3,
- 7, 0,227, 3, 7, 0,106, 3,164, 0, 49, 0, 4, 0,182, 3, 4, 0,228, 3,170, 0,229, 3,171, 0,230, 3, 0, 0, 37, 0,
- 0, 0,231, 3, 2, 0,232, 3, 7, 0,233, 3, 0, 0,234, 3, 7, 0,235, 3, 7, 0,236, 3, 7, 0,237, 3, 7, 0,238, 3,
- 7, 0,239, 3, 7, 0,240, 3, 7, 0,241, 3, 7, 0,242, 3, 7, 0,243, 3, 2, 0,244, 3, 0, 0,245, 3, 2, 0,246, 3,
- 7, 0,247, 3, 7, 0,248, 3, 0, 0,249, 3, 4, 0,126, 0, 4, 0,250, 3, 4, 0,251, 3, 2, 0,252, 3, 2, 0,253, 3,
-169, 0,254, 3, 4, 0,255, 3, 4, 0, 82, 0, 7, 0, 0, 4, 7, 0, 1, 4, 7, 0, 2, 4, 7, 0, 3, 4, 2, 0, 4, 4,
- 2, 0, 5, 4, 2, 0, 6, 4, 2, 0, 7, 4, 2, 0, 8, 4, 2, 0, 9, 4, 2, 0, 10, 4, 2, 0, 11, 4,172, 0, 12, 4,
- 7, 0, 13, 4, 7, 0, 14, 4,138, 0, 15, 4, 12, 0,237, 2,153, 0, 48, 0, 2, 0, 17, 0, 2, 0, 16, 4, 2, 0, 17, 4,
- 2, 0, 18, 4, 7, 0, 19, 4, 2, 0, 20, 4, 2, 0, 21, 4, 7, 0, 22, 4, 2, 0, 23, 4, 2, 0, 24, 4, 7, 0, 25, 4,
- 7, 0, 26, 4, 7, 0, 27, 4, 7, 0, 28, 4, 7, 0, 29, 4, 7, 0, 30, 4, 4, 0, 31, 4, 7, 0, 32, 4, 7, 0, 33, 4,
- 7, 0, 34, 4, 81, 0, 35, 4, 81, 0, 36, 4, 81, 0, 37, 4, 0, 0, 38, 4, 7, 0, 39, 4, 7, 0, 40, 4, 36, 0, 80, 0,
- 2, 0, 41, 4, 0, 0, 42, 4, 0, 0, 43, 4, 7, 0, 44, 4, 4, 0, 45, 4, 7, 0, 46, 4, 7, 0, 47, 4, 4, 0, 48, 4,
- 4, 0, 19, 0, 7, 0, 49, 4, 7, 0, 50, 4, 7, 0, 51, 4, 85, 0, 52, 4, 7, 0, 53, 4, 7, 0, 54, 4, 7, 0, 55, 4,
- 7, 0, 56, 4, 7, 0, 57, 4, 7, 0, 58, 4, 7, 0, 59, 4, 4, 0, 60, 4,173, 0, 73, 0, 27, 0, 31, 0, 39, 0, 75, 0,
- 2, 0,175, 0, 2, 0, 41, 1, 2, 0, 73, 1, 2, 0, 61, 4, 7, 0, 62, 4, 7, 0, 63, 4, 7, 0, 64, 4, 7, 0, 65, 4,
- 7, 0, 66, 4, 7, 0, 67, 4, 7, 0, 68, 4, 7, 0, 69, 4, 7, 0,133, 1, 7, 0,135, 1, 7, 0,134, 1, 7, 0, 70, 4,
- 4, 0, 71, 4, 7, 0, 72, 4, 7, 0, 73, 4, 7, 0, 74, 4, 7, 0, 75, 4, 7, 0, 76, 4, 7, 0, 77, 4, 7, 0, 78, 4,
- 2, 0, 79, 4, 2, 0, 40, 1, 2, 0, 80, 4, 2, 0, 81, 4, 2, 0, 82, 4, 2, 0, 83, 4, 2, 0, 84, 4, 2, 0, 85, 4,
- 7, 0, 86, 4, 7, 0, 87, 4, 7, 0, 88, 4, 7, 0, 89, 4, 7, 0, 90, 4, 7, 0, 91, 4, 7, 0, 92, 4, 7, 0, 93, 4,
- 7, 0, 94, 4, 7, 0, 95, 4, 7, 0, 96, 4, 7, 0, 97, 4, 2, 0, 98, 4, 2, 0, 99, 4, 2, 0,100, 4, 2, 0,101, 4,
- 7, 0,102, 4, 7, 0,103, 4, 7, 0,104, 4, 7, 0,105, 4, 2, 0,106, 4, 2, 0,107, 4, 2, 0,108, 4, 2, 0,109, 4,
- 7, 0,110, 4, 7, 0,111, 4, 7, 0,112, 4, 7, 0,113, 4, 2, 0,114, 4, 2, 0,115, 4, 2, 0,116, 4, 2, 0, 19, 0,
- 7, 0,117, 4, 7, 0,118, 4, 36, 0, 80, 0, 51, 0,103, 1, 2, 0,104, 1, 2, 0,105, 1, 30, 0,150, 0,174, 0, 8, 0,
-174, 0, 0, 0,174, 0, 1, 0, 4, 0, 83, 3, 4, 0,119, 4, 4, 0, 19, 0, 2, 0,120, 4, 2, 0,121, 4, 32, 0,164, 0,
-175, 0, 13, 0, 9, 0,122, 4, 9, 0,123, 4, 4, 0,124, 4, 4, 0,125, 4, 4, 0,126, 4, 4, 0,127, 4, 4, 0,128, 4,
- 4, 0,129, 4, 4, 0,130, 4, 4, 0,131, 4, 4, 0,132, 4, 4, 0, 37, 0, 0, 0,133, 4,176, 0, 5, 0, 9, 0,134, 4,
- 9, 0,135, 4, 4, 0,136, 4, 4, 0, 70, 0, 0, 0,137, 4,177, 0, 13, 0, 4, 0, 17, 0, 4, 0,138, 4, 4, 0,139, 4,
- 4, 0,140, 4, 4, 0,141, 4, 4, 0,142, 4, 4, 0, 90, 0, 4, 0,143, 4, 4, 0,144, 4, 4, 0,145, 4, 4, 0,146, 4,
- 4, 0,147, 4, 26, 0, 30, 0,178, 0, 4, 0, 4, 0,148, 4, 7, 0,149, 4, 2, 0, 19, 0, 2, 0,105, 1,179, 0, 11, 0,
-179, 0, 0, 0,179, 0, 1, 0, 0, 0, 20, 0, 67, 0,150, 4, 68, 0,151, 4, 4, 0, 83, 3, 4, 0,152, 4, 4, 0,153, 4,
- 4, 0, 37, 0, 4, 0,154, 4, 4, 0,155, 4,180, 0,132, 0,175, 0,156, 4,176, 0,157, 4,177, 0,158, 4,178, 0,159, 4,
- 4, 0,250, 2, 4, 0,126, 0, 4, 0,250, 3, 4, 0,160, 4, 4, 0,161, 4, 4, 0,162, 4, 4, 0,163, 4, 2, 0, 19, 0,
- 2, 0,164, 4, 7, 0, 79, 2, 7, 0,165, 4, 7, 0,166, 4, 7, 0,167, 4, 7, 0,168, 4, 7, 0,169, 4, 2, 0,170, 4,
- 2, 0,171, 4, 2, 0,172, 4, 2, 0,173, 4, 2, 0,216, 0, 2, 0,174, 4, 2, 0,175, 4, 2, 0,178, 3, 2, 0,176, 4,
- 2, 0,177, 4, 2, 0, 60, 1, 2, 0,106, 0, 2, 0,178, 4, 2, 0,179, 4, 2, 0,180, 4, 2, 0,181, 4, 2, 0,182, 4,
- 2, 0,183, 4, 2, 0,184, 4, 2, 0,185, 4, 2, 0,186, 4, 2, 0, 61, 1, 2, 0,187, 4, 2, 0,188, 4, 2, 0,189, 4,
- 2, 0,190, 4, 4, 0,191, 4, 4, 0, 40, 1, 2, 0,192, 4, 2, 0,193, 4, 2, 0,194, 4, 2, 0,195, 4, 2, 0,196, 4,
- 2, 0,197, 4, 24, 0,198, 4, 24, 0,199, 4, 23, 0,200, 4, 12, 0,201, 4, 2, 0,202, 4, 2, 0, 37, 0, 7, 0,203, 4,
- 7, 0,204, 4, 7, 0,205, 4, 7, 0,206, 4, 4, 0,207, 4, 7, 0,208, 4, 7, 0,209, 4, 7, 0,210, 4, 7, 0,211, 4,
- 2, 0,212, 4, 2, 0,213, 4, 2, 0,214, 4, 2, 0,215, 4, 2, 0,216, 4, 2, 0,217, 4, 7, 0,218, 4, 7, 0,219, 4,
- 7, 0,220, 4, 2, 0,221, 4, 2, 0,222, 4, 2, 0,223, 4, 2, 0,224, 4, 2, 0,225, 4, 2, 0,226, 4, 2, 0,227, 4,
- 2, 0,228, 4, 2, 0,229, 4, 2, 0,230, 4, 4, 0,231, 4, 4, 0,232, 4, 4, 0,233, 4, 4, 0,234, 4, 4, 0,235, 4,
- 7, 0,236, 4, 4, 0,237, 4, 4, 0,238, 4, 4, 0,239, 4, 4, 0,240, 4, 7, 0,241, 4, 7, 0,242, 4, 7, 0,243, 4,
- 7, 0,244, 4, 7, 0,245, 4, 7, 0,246, 4, 7, 0,247, 4, 7, 0,248, 4, 7, 0,249, 4, 0, 0,250, 4, 0, 0,251, 4,
- 4, 0,252, 4, 2, 0,253, 4, 2, 0,209, 1, 0, 0,254, 4, 7, 0,255, 4, 7, 0, 0, 5, 4, 0, 1, 5, 4, 0, 2, 5,
- 7, 0, 3, 5, 7, 0, 4, 5, 2, 0, 5, 5, 2, 0, 6, 5, 7, 0, 7, 5, 2, 0, 8, 5, 2, 0, 9, 5, 4, 0, 10, 5,
- 2, 0, 11, 5, 2, 0, 12, 5, 2, 0, 13, 5, 2, 0, 14, 5, 7, 0, 15, 5, 7, 0, 70, 0, 42, 0, 16, 5, 0, 0, 17, 5,
-181, 0, 9, 0,181, 0, 0, 0,181, 0, 1, 0, 0, 0, 20, 0, 2, 0, 18, 5, 2, 0, 19, 5, 2, 0, 20, 5, 2, 0, 43, 0,
- 7, 0, 21, 5, 7, 0, 70, 0,182, 0, 7, 0, 2, 0,187, 2, 2, 0, 40, 1, 2, 0,109, 0, 2, 0, 22, 5, 7, 0, 23, 5,
- 7, 0, 70, 0, 42, 0, 24, 5,183, 0, 5, 0, 7, 0, 25, 5, 0, 0, 17, 0, 0, 0, 43, 0, 0, 0, 70, 0, 0, 0,209, 1,
-184, 0, 26, 0, 7, 0, 77, 4, 7, 0, 78, 4, 2, 0, 40, 1, 2, 0, 19, 0, 2, 0, 26, 5, 2, 0,105, 1, 2, 0, 80, 4,
- 2, 0, 81, 4, 2, 0, 82, 4, 2, 0, 83, 4, 2, 0, 84, 4, 2, 0, 85, 4,183, 0, 27, 5, 2, 0,170, 4, 2, 0,171, 4,
- 2, 0,172, 4, 2, 0,173, 4, 2, 0,216, 0, 2, 0,174, 4, 2, 0,175, 4, 2, 0,178, 3,182, 0, 28, 5, 2, 0, 29, 5,
- 2, 0,176, 4, 2, 0,179, 4, 2, 0,180, 4,185, 0, 5, 0,185, 0, 0, 0,185, 0, 1, 0, 4, 0,181, 3, 0, 0,193, 3,
- 4, 0, 19, 0,186, 0, 6, 0,187, 0, 30, 5, 4, 0, 31, 5, 4, 0, 32, 5, 9, 0, 33, 5, 0, 0, 34, 5, 4, 0, 37, 0,
-188, 0, 6, 0,186, 0, 35, 5, 2, 0, 19, 0, 2, 0, 36, 5, 2, 0, 37, 5, 2, 0, 38, 5, 9, 0, 39, 5,189, 0, 4, 0,
- 2, 0,106, 0, 2, 0,198, 2, 2, 0,187, 3, 2, 0, 40, 5,190, 0, 14, 0, 2, 0, 19, 0, 2, 0, 41, 5, 2, 0, 42, 5,
- 2, 0, 43, 5,189, 0, 44, 5, 9, 0, 39, 5, 7, 0, 45, 5, 7, 0, 57, 0, 4, 0, 46, 5, 4, 0, 47, 5, 4, 0, 48, 5,
- 4, 0, 49, 5, 46, 0,134, 0, 32, 0,164, 0,191, 0, 4, 0,191, 0, 0, 0,191, 0, 1, 0, 0, 0, 50, 5, 7, 0, 51, 5,
-192, 0, 6, 0,186, 0, 35, 5, 7, 0, 52, 5, 4, 0, 90, 0, 0, 0, 53, 5, 0, 0, 54, 5, 0, 0,167, 2,193, 0, 9, 0,
-186, 0, 35, 5, 7, 0, 55, 5, 7, 0, 56, 5, 2, 0, 40, 1, 2, 0, 19, 0, 4, 0, 36, 0, 4, 0, 57, 5, 87, 0, 58, 5,
- 9, 0, 39, 5,194, 0, 72, 0,193, 0, 59, 5,193, 0, 60, 5,192, 0, 57, 3, 7, 0, 61, 5, 2, 0, 62, 5, 2, 0, 63, 5,
- 7, 0, 64, 5, 7, 0, 65, 5, 2, 0,187, 3, 2, 0, 66, 5, 7, 0, 67, 5, 7, 0, 68, 5, 7, 0, 69, 5, 2, 0, 70, 5,
- 2, 0, 46, 5, 2, 0, 71, 5, 2, 0, 72, 5, 2, 0, 73, 5, 2, 0, 74, 5, 7, 0, 75, 5, 7, 0, 76, 5, 7, 0, 77, 5,
- 2, 0, 78, 5, 2, 0, 79, 5, 2, 0, 80, 5, 2, 0, 81, 5, 2, 0, 82, 5, 2, 0, 83, 5, 2, 0, 84, 5,188, 0, 85, 5,
-190, 0, 86, 5, 7, 0, 87, 5, 7, 0, 88, 5, 7, 0, 89, 5, 2, 0, 90, 5, 2, 0, 91, 5, 0, 0, 92, 5, 0, 0, 93, 5,
- 0, 0, 94, 5, 0, 0, 95, 5, 0, 0, 96, 5, 0, 0, 97, 5, 2, 0, 98, 5, 7, 0, 99, 5, 7, 0,100, 5, 7, 0,101, 5,
- 7, 0,102, 5, 7, 0,103, 5, 7, 0,104, 5, 7, 0,105, 5, 7, 0,106, 5, 7, 0,107, 5, 7, 0,108, 5, 2, 0,109, 5,
- 0, 0,110, 5, 0, 0,111, 5, 0, 0,112, 5, 0, 0,113, 5, 32, 0,114, 5, 0, 0,115, 5, 0, 0,116, 5, 0, 0,117, 5,
- 0, 0,118, 5, 0, 0,119, 5, 0, 0,120, 5, 0, 0,121, 5, 0, 0,122, 5, 2, 0,123, 5, 2, 0,124, 5, 2, 0,125, 5,
- 2, 0,126, 5, 2, 0,127, 5,195, 0, 8, 0, 4, 0,128, 5, 4, 0,129, 5, 4, 0,130, 5, 4, 0,131, 5, 4, 0,132, 5,
- 4, 0,133, 5, 4, 0, 54, 0, 4, 0,103, 2,196, 0, 3, 0, 7, 0,134, 5, 2, 0,135, 5, 2, 0, 19, 0, 46, 0, 37, 0,
- 27, 0, 31, 0, 39, 0, 75, 0, 32, 0,136, 5,173, 0,137, 5, 46, 0,138, 5, 47, 0,208, 0, 12, 0,139, 5,174, 0,140, 5,
- 32, 0,141, 5, 7, 0,142, 5, 7, 0,143, 5, 7, 0,144, 5, 7, 0,145, 5, 4, 0, 83, 3, 2, 0, 19, 0, 2, 0, 34, 1,
- 61, 0, 29, 1,197, 0,146, 5,194, 0,147, 5,198, 0,148, 5,180, 0,182, 0,178, 0,159, 4, 12, 0,100, 0, 12, 0,149, 5,
- 12, 0,150, 5,199, 0,151, 5, 2, 0,152, 5, 2, 0,153, 5, 2, 0,217, 0, 2, 0,154, 5, 4, 0,155, 5, 4, 0,156, 5,
- 12, 0,157, 5,183, 0, 27, 5,184, 0,158, 5,196, 0,159, 5,161, 0, 70, 3,200, 0, 6, 0, 47, 0,208, 0, 45, 0, 28, 1,
- 7, 0, 67, 2, 7, 0, 68, 2, 7, 0,106, 0, 7, 0,160, 5,201, 0, 35, 0, 7, 0,161, 5, 7, 0,162, 5, 7, 0,163, 5,
- 7, 0,164, 5, 7, 0,165, 5, 7, 0,166, 5, 7, 0,167, 5, 7, 0,168, 5, 7, 0,169, 5, 7, 0, 47, 1, 7, 0,170, 5,
- 7, 0,171, 5, 7, 0,172, 5, 7, 0,173, 5, 7, 0,171, 0, 2, 0,174, 5, 2, 0,175, 5, 4, 0,176, 5, 2, 0,177, 5,
- 2, 0,178, 5, 2, 0,179, 5, 2, 0,180, 5, 7, 0,181, 5, 72, 0,182, 5,161, 0, 70, 3,201, 0,183, 5,202, 0,184, 5,
-203, 0,185, 5,204, 0,186, 5,205, 0,187, 5,206, 0,188, 5, 7, 0,189, 5, 2, 0,190, 5, 2, 0,191, 5, 4, 0,209, 1,
-207, 0, 54, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5, 7, 0,169, 5,
- 7, 0, 47, 1, 7, 0, 43, 0, 4, 0,196, 5, 2, 0,179, 5, 2, 0,180, 5, 32, 0,136, 5, 32, 0,197, 5,200, 0,198, 5,
-207, 0,183, 5, 0, 0,199, 5, 4, 0, 83, 3, 4, 0,200, 5, 2, 0,201, 5, 2, 0,202, 5, 2, 0,203, 5, 2, 0,204, 5,
- 2, 0,209, 1, 2, 0, 19, 0, 2, 0, 6, 2, 2, 0,205, 5, 7, 0,112, 0, 7, 0,206, 5, 7, 0,207, 5, 7, 0,208, 5,
- 7, 0,209, 5, 7, 0,210, 5, 7, 0,171, 0, 7, 0,142, 5, 2, 0,211, 5, 2, 0, 90, 1, 2, 0,212, 5, 2, 0,213, 5,
- 2, 0,214, 5, 2, 0,215, 5, 2, 0,216, 5, 2, 0,217, 5, 2, 0,218, 5, 2, 0,219, 5, 4, 0,220, 5, 12, 0,221, 5,
- 2, 0,222, 5, 2, 0,116, 2, 2, 0,223, 5, 0, 0,224, 5, 0, 0,225, 5, 9, 0,226, 5,161, 0, 70, 3,209, 0, 25, 0,
- 24, 0, 36, 0, 24, 0, 64, 0, 23, 0,227, 5, 23, 0,228, 5, 23, 0,229, 5, 7, 0,230, 5, 7, 0,231, 5, 7, 0,232, 5,
- 7, 0,233, 5, 2, 0,234, 5, 2, 0,235, 5, 2, 0,236, 5, 2, 0,237, 5, 2, 0,238, 5, 2, 0, 19, 0, 2, 0,239, 5,
- 2, 0,240, 5, 2, 0,241, 5, 2, 0,242, 5, 2, 0,243, 5, 2, 0,204, 5, 7, 0,244, 5, 7, 0,245, 5, 4, 0,246, 5,
- 4, 0,247, 5,208, 0, 6, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5,
-210, 0, 8, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5,211, 0,248, 5,
- 46, 0,134, 0,212, 0, 14, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5,
-209, 0,249, 5,213, 0,250, 5, 12, 0,251, 5, 2, 0, 40, 1, 2, 0, 19, 0, 2, 0,252, 5, 0, 0,253, 5, 0, 0,254, 5,
-214, 0, 20, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5,202, 0,184, 5,
-209, 0,249, 5, 2, 0,255, 5, 2, 0, 0, 6, 2, 0, 1, 6, 2, 0, 2, 6, 2, 0,239, 5, 2, 0, 3, 6, 0, 0, 19, 0,
- 0, 0,105, 1, 9, 0, 43, 2, 4, 0, 4, 6, 4, 0, 5, 6, 27, 0, 6, 6,215, 0, 16, 0,208, 0, 0, 0,208, 0, 1, 0,
- 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5,209, 0,249, 5, 7, 0, 67, 2, 7, 0, 68, 2, 2, 0,255, 5,
- 2, 0, 7, 6, 2, 0, 8, 6, 2, 0, 9, 6, 4, 0, 19, 0, 7, 0, 10, 6,161, 0, 70, 3,216, 0, 16, 0, 0, 0, 11, 6,
- 0, 0, 12, 6, 0, 0, 13, 6, 0, 0, 14, 6, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 15, 6, 2, 0, 16, 6, 2, 0,152, 1,
- 2, 0, 17, 6, 4, 0, 18, 6, 4, 0, 19, 6, 2, 0, 20, 6, 2, 0, 21, 6, 0, 0, 22, 6, 0, 0, 23, 6,217, 0, 16, 0,
-208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 4, 0, 37, 0,216, 0, 24, 6,218, 0, 25, 6, 12, 0, 26, 6,
- 12, 0, 27, 6,219, 0, 28, 6,206, 0, 29, 6,220, 0, 30, 6, 2, 0, 31, 6, 2, 0, 32, 6, 2, 0, 33, 6, 2, 0, 70, 0,
-221, 0, 17, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5,209, 0,249, 5,
- 12, 0, 34, 6,222, 0, 35, 6, 0, 0, 36, 6,223, 0, 37, 6, 4, 0, 38, 6, 4, 0, 39, 6, 2, 0, 19, 0, 2, 0, 40, 6,
- 2, 0, 41, 6, 2, 0, 37, 0,224, 0, 29, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5,
- 2, 0,195, 5, 47, 0,206, 2, 45, 0, 28, 1, 64, 0, 42, 6, 2, 0,133, 0, 2, 0, 43, 6, 2, 0, 70, 0, 2, 0, 44, 6,
- 4, 0, 19, 0, 2, 0, 45, 6, 2, 0,254, 5, 2, 0,253, 5, 2, 0,209, 1, 0, 0, 46, 6, 0, 0, 47, 6, 0, 0, 48, 6,
- 0, 0,204, 5, 7, 0, 67, 2, 7, 0, 68, 2, 7, 0, 10, 6, 7, 0, 90, 1, 7, 0, 49, 6, 7, 0, 50, 6,161, 0, 70, 3,
-225, 0, 11, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5, 2, 0,252, 5,
- 2, 0, 19, 0, 4, 0, 37, 0,213, 0,250, 5,209, 0,249, 5,226, 0, 27, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5,
- 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5, 42, 0, 51, 6, 4, 0, 52, 6, 4, 0, 53, 6, 2, 0, 90, 0, 2, 0,133, 0,
- 2, 0, 54, 6, 0, 0, 55, 6, 0, 0, 56, 6, 4, 0, 57, 6, 4, 0, 58, 6, 4, 0, 59, 6, 4, 0, 60, 6, 2, 0, 61, 6,
- 2, 0, 62, 6, 7, 0, 63, 6, 23, 0, 64, 6, 23, 0, 65, 6, 4, 0, 66, 6, 4, 0, 67, 6, 0, 0, 68, 6, 0, 0, 69, 6,
-227, 0, 10, 0, 27, 0, 31, 0, 9, 0, 70, 6, 9, 0, 71, 6, 9, 0, 72, 6, 9, 0, 73, 6, 9, 0, 74, 6, 4, 0, 90, 0,
- 4, 0, 75, 6, 0, 0, 76, 6, 0, 0, 77, 6,228, 0, 10, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5,
- 7, 0,194, 5,227, 0, 78, 6, 2, 0, 90, 0, 2, 0,133, 0, 4, 0, 43, 0, 9, 0, 79, 6,229, 0, 8, 0,208, 0, 0, 0,
-208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5,209, 0,249, 5, 4, 0, 19, 0, 4, 0, 80, 6,230, 0, 23, 0,
-208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5,209, 0,249, 5, 27, 0, 81, 6,
- 27, 0, 81, 0, 2, 0, 19, 0, 2, 0,133, 0, 7, 0, 82, 6, 9, 0, 83, 6, 7, 0, 67, 2, 7, 0, 68, 2, 7, 0, 84, 6,
- 7, 0, 85, 6, 61, 0, 29, 1, 61, 0, 86, 6, 4, 0, 87, 6, 2, 0, 88, 6, 2, 0, 37, 0,161, 0, 70, 3,231, 0, 10, 0,
-208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5, 2, 0, 19, 0, 2, 0, 92, 3,
- 4, 0, 37, 0,161, 0, 70, 3,232, 0, 42, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5,
- 2, 0,195, 5,209, 0,249, 5,218, 0, 25, 6, 0, 0, 11, 6, 0, 0, 12, 6, 0, 0, 13, 6, 2, 0, 17, 0, 2, 0, 21, 6,
- 2, 0, 19, 0, 2, 0, 15, 6, 9, 0, 83, 6, 4, 0, 18, 6, 4, 0, 89, 6, 4, 0, 90, 6, 4, 0, 19, 6, 23, 0, 91, 6,
- 23, 0, 92, 6, 7, 0, 93, 6, 7, 0, 94, 6, 7, 0, 95, 6, 7, 0, 82, 6, 2, 0, 96, 6, 2, 0,207, 0, 2, 0,152, 1,
- 2, 0, 17, 6, 2, 0, 37, 0, 2, 0, 43, 0, 2, 0, 97, 6, 2, 0, 98, 6, 9, 0, 99, 6, 9, 0,100, 6, 9, 0,101, 6,
- 9, 0,102, 6, 9, 0,103, 6, 2, 0,104, 6, 0, 0, 23, 6, 57, 0,105, 6,233, 0, 7, 0,233, 0, 0, 0,233, 0, 1, 0,
- 4, 0,106, 6, 4, 0, 23, 0, 0, 0, 84, 0, 4, 0,107, 6, 4, 0, 17, 0,234, 0, 13, 0,208, 0, 0, 0,208, 0, 1, 0,
- 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5, 2, 0,195, 5, 4, 0, 17, 0, 4, 0,108, 6, 4, 0, 19, 0, 4, 0, 54, 6,
- 12, 0,109, 6, 12, 0,110, 6, 0, 0,111, 6,235, 0, 5, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5,
- 4, 0, 37, 0,236, 0, 7, 0,236, 0, 0, 0,236, 0, 1, 0, 0, 0,112, 6, 2, 0,113, 6, 2, 0,114, 6, 2, 0,115, 6,
- 2, 0, 37, 0,237, 0, 12, 0, 2, 0,114, 6, 2, 0,116, 6, 2, 0,117, 6, 0, 0,167, 2, 2, 0,118, 6, 2, 0,119, 6,
- 2, 0,120, 6, 2, 0,121, 6, 2, 0,122, 6, 2, 0,239, 5, 7, 0,123, 6, 7, 0,124, 6,238, 0, 18, 0,238, 0, 0, 0,
-238, 0, 1, 0, 0, 0,193, 3,237, 0,125, 6,237, 0,126, 6,237, 0,127, 6,237, 0,128, 6, 7, 0,129, 6, 2, 0,130, 6,
- 2, 0,131, 6, 2, 0,132, 6, 2, 0,133, 6, 2, 0,134, 6, 2, 0,135, 6, 2, 0,136, 6, 2, 0,137, 6, 2, 0,138, 6,
- 2, 0,139, 6,239, 0, 10, 0, 0, 0,140, 6, 0, 0,141, 6, 0, 0,142, 6, 0, 0,143, 6, 0, 0,144, 6, 0, 0,145, 6,
- 2, 0,146, 6, 2, 0,147, 6, 2, 0,148, 6, 2, 0, 37, 0,240, 0, 8, 0, 0, 0,149, 6, 0, 0,150, 6, 0, 0,151, 6,
- 0, 0,152, 6, 0, 0,153, 6, 0, 0,154, 6, 7, 0,160, 5, 7, 0, 37, 0,241, 0, 17, 0,239, 0,155, 6,239, 0,156, 6,
-239, 0,157, 6,239, 0,158, 6,239, 0,159, 6,239, 0,160, 6,239, 0,161, 6,239, 0,162, 6,239, 0,163, 6,239, 0,164, 6,
-239, 0,165, 6,239, 0,166, 6,239, 0,167, 6,239, 0,168, 6,239, 0,169, 6,240, 0,170, 6, 0, 0,171, 6,242, 0, 71, 0,
- 0, 0,172, 6, 0, 0,173, 6, 0, 0,144, 6, 0, 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, 0, 0,184, 6, 0, 0,185, 6, 0, 0,186, 6,
- 0, 0,187, 6, 0, 0,188, 6, 0, 0,189, 6, 0, 0,190, 6, 0, 0,191, 6, 0, 0,192, 6, 0, 0,193, 6, 0, 0,194, 6,
- 0, 0,195, 6, 0, 0,196, 6, 0, 0,197, 6, 0, 0,198, 6, 0, 0,199, 6, 0, 0,200, 6, 0, 0,201, 6, 0, 0,202, 6,
- 0, 0,203, 6, 0, 0,204, 6, 0, 0,205, 6, 0, 0,206, 6, 0, 0,207, 6, 0, 0,208, 6, 0, 0,209, 6, 0, 0,210, 6,
- 0, 0,211, 6, 0, 0,212, 6, 0, 0,213, 6, 0, 0,214, 6, 0, 0,215, 6, 0, 0,216, 6, 0, 0,217, 6, 0, 0,218, 6,
- 0, 0,219, 6, 0, 0,220, 6, 0, 0,221, 6, 0, 0,222, 6, 0, 0,223, 6, 0, 0,224, 6, 0, 0,225, 6, 0, 0,226, 6,
- 0, 0,227, 6, 0, 0,228, 6, 0, 0,229, 6, 0, 0,230, 6, 0, 0,231, 6, 0, 0,232, 6, 0, 0,233, 6, 0, 0,234, 6,
- 0, 0,235, 6, 0, 0,236, 6, 0, 0,237, 6, 0, 0,238, 6, 0, 0,239, 6, 0, 0,240, 6, 0, 0, 92, 0,243, 0, 5, 0,
- 0, 0,241, 6, 0, 0,196, 6, 0, 0,198, 6, 2, 0, 19, 0, 2, 0, 37, 0,244, 0, 22, 0,244, 0, 0, 0,244, 0, 1, 0,
- 0, 0, 20, 0,241, 0,242, 6,242, 0,243, 6,242, 0,244, 6,242, 0,245, 6,242, 0,246, 6,242, 0,247, 6,242, 0,248, 6,
-242, 0,249, 6,242, 0,250, 6,242, 0,251, 6,242, 0,252, 6,242, 0,253, 6,242, 0,254, 6,242, 0,255, 6,242, 0, 0, 7,
-242, 0, 1, 7,242, 0, 2, 7,242, 0, 3, 7,243, 0, 4, 7,245, 0, 5, 0, 4, 0, 19, 0, 4, 0, 37, 0, 7, 0,115, 2,
- 7, 0, 5, 7, 7, 0, 21, 2,246, 0, 71, 0, 4, 0, 19, 0, 4, 0, 6, 7, 4, 0, 7, 7, 0, 0, 8, 7, 0, 0, 9, 7,
- 0, 0, 10, 7, 0, 0, 11, 7, 0, 0, 12, 7, 0, 0, 13, 7, 0, 0, 14, 7, 0, 0, 15, 7, 0, 0, 16, 7, 2, 0, 17, 7,
- 2, 0, 37, 0, 4, 0, 18, 7, 4, 0, 19, 7, 4, 0, 20, 7, 4, 0, 21, 7, 2, 0, 22, 7, 2, 0, 23, 7, 4, 0, 24, 7,
- 4, 0, 25, 7, 4, 0, 26, 7, 4, 0, 27, 7, 4, 0, 28, 7, 4, 0,109, 6, 4, 0, 29, 7, 2, 0, 30, 7, 2, 0, 31, 7,
- 2, 0, 32, 7, 2, 0, 33, 7, 12, 0, 34, 7, 12, 0, 35, 7, 12, 0, 36, 7, 2, 0, 37, 7, 2, 0, 38, 7, 2, 0, 39, 7,
- 2, 0, 40, 7, 2, 0, 41, 7, 2, 0, 42, 7, 2, 0, 43, 7, 2, 0, 44, 7,245, 0, 45, 7, 2, 0, 46, 7, 2, 0, 47, 7,
- 2, 0, 48, 7, 2, 0, 49, 7, 2, 0, 50, 7, 2, 0, 51, 7, 2, 0, 52, 7, 2, 0, 53, 7, 4, 0, 54, 7, 4, 0, 55, 7,
- 2, 0, 56, 7, 2, 0, 57, 7, 2, 0, 58, 7, 2, 0, 59, 7, 2, 0, 60, 7, 2, 0, 61, 7, 2, 0, 62, 7, 2, 0, 63, 7,
- 2, 0, 64, 7, 2, 0, 65, 7, 2, 0, 66, 7, 2, 0, 67, 7, 0, 0, 68, 7, 0, 0, 69, 7, 7, 0, 70, 7, 2, 0, 90, 5,
- 2, 0, 91, 5, 55, 0, 71, 7,211, 0, 21, 0, 27, 0, 31, 0, 12, 0, 72, 7, 12, 0, 73, 7, 12, 0, 74, 7, 12, 0,192, 5,
- 46, 0,134, 0, 46, 0, 75, 7, 2, 0, 76, 7, 2, 0, 77, 7, 2, 0, 78, 7, 2, 0, 79, 7, 2, 0, 80, 7, 2, 0, 81, 7,
- 2, 0, 82, 7, 2, 0, 37, 0, 2, 0, 83, 7, 2, 0, 84, 7, 4, 0, 70, 0,206, 0, 85, 7, 9, 0, 86, 7, 2, 0, 87, 7,
-247, 0, 5, 0,247, 0, 0, 0,247, 0, 1, 0,247, 0, 88, 7, 13, 0, 89, 7, 4, 0, 19, 0,248, 0, 7, 0,248, 0, 0, 0,
-248, 0, 1, 0,247, 0, 90, 7,247, 0, 91, 7, 2, 0,199, 4, 2, 0, 19, 0, 4, 0, 37, 0,249, 0, 23, 0,249, 0, 0, 0,
-249, 0, 1, 0,250, 0, 92, 7,251, 0, 30, 6, 0, 0, 93, 7, 0, 0, 94, 7, 0, 0, 95, 7, 2, 0, 96, 7, 2, 0, 97, 7,
- 2, 0, 98, 7, 2, 0, 99, 7, 2, 0,100, 7, 2, 0, 37, 0, 2, 0, 19, 0, 2, 0,101, 7, 2, 0,102, 7, 2, 0,103, 7,
- 4, 0,104, 7,249, 0,105, 7, 9, 0,106, 7, 4, 0,107, 7, 4, 0,108, 7, 0, 0,109, 7,252, 0, 22, 0,252, 0, 0, 0,
-252, 0, 1, 0,247, 0, 90, 7,247, 0, 91, 7,247, 0,110, 7,247, 0,111, 7,211, 0,112, 7, 23, 0, 52, 0, 0, 0,193, 5,
- 0, 0,113, 7, 2, 0,240, 5, 2, 0,241, 5, 2, 0,114, 7, 2, 0, 37, 0, 2, 0, 79, 7, 2, 0,107, 6, 2, 0, 19, 0,
-253, 0, 92, 7, 12, 0,115, 7, 12, 0,192, 5, 12, 0,116, 7, 12, 0,117, 7,254, 0, 21, 0,254, 0, 0, 0,254, 0, 1, 0,
-209, 0,249, 5, 23, 0,118, 7, 23, 0,119, 7, 2, 0,240, 5, 2, 0,241, 5, 2, 0,120, 7, 2, 0,121, 7, 2, 0,122, 7,
- 2, 0, 19, 0, 7, 0, 63, 2, 2, 0, 78, 7, 2, 0, 82, 7, 4, 0, 43, 0,255, 0, 92, 7, 12, 0,123, 7, 12, 0,124, 7,
- 12, 0,116, 7, 0, 0,125, 7, 9, 0,126, 7, 0, 1, 11, 0, 0, 0,127, 7, 2, 0,128, 7, 2, 0,129, 7, 2, 0,130, 7,
- 2, 0,131, 7, 2, 0,188, 4, 2, 0,183, 4,211, 0,132, 7, 46, 0,133, 7, 4, 0,134, 7, 4, 0,135, 7, 1, 1, 1, 0,
- 0, 0,136, 7, 2, 1, 8, 0, 57, 0,137, 7, 57, 0,138, 7, 2, 1,139, 7, 2, 1,140, 7, 2, 1,141, 7, 2, 0,129, 0,
- 2, 0, 19, 0, 4, 0,142, 7, 3, 1, 4, 0, 4, 0, 52, 6, 4, 0,143, 7, 4, 0, 57, 6, 4, 0,144, 7, 4, 1, 2, 0,
- 4, 0,145, 7, 4, 0,146, 7, 5, 1, 7, 0, 7, 0,147, 7, 7, 0,148, 7, 7, 0,149, 7, 4, 0, 19, 0, 4, 0, 37, 0,
- 7, 0, 72, 4, 7, 0,150, 7, 6, 1, 6, 0, 0, 0,151, 7, 0, 0, 13, 6, 49, 0,137, 0, 2, 0,106, 0, 2, 0,187, 4,
- 4, 0, 37, 0, 7, 1, 21, 0, 7, 1, 0, 0, 7, 1, 1, 0, 4, 0, 57, 0, 4, 0, 23, 0, 4, 0, 28, 0, 4, 0,152, 7,
- 4, 0,153, 7, 4, 0,154, 7, 1, 1,155, 7, 0, 0,151, 7, 4, 0,156, 7, 4, 0,157, 7, 6, 1, 64, 3, 3, 1,158, 7,
- 4, 1,159, 7, 5, 1,160, 7, 2, 1,161, 7, 2, 1,162, 7, 2, 1,163, 7, 57, 0,164, 7, 57, 0,165, 7, 8, 1, 12, 0,
- 0, 0,239, 1, 9, 0,193, 0, 0, 0,194, 0, 4, 0,197, 0, 4, 0,205, 0, 9, 0,198, 0, 7, 0,200, 0, 7, 0,201, 0,
- 9, 0,166, 7, 9, 0,167, 7, 9, 0,202, 0, 9, 0,204, 0, 9, 1, 43, 0, 9, 1, 0, 0, 9, 1, 1, 0, 9, 0,168, 7,
- 9, 0, 26, 0, 0, 0, 27, 0, 4, 0, 19, 0, 4, 0, 17, 0, 4, 0, 23, 0, 4, 0, 88, 0, 4, 0,169, 7, 4, 0,170, 7,
- 4, 0,153, 7, 4, 0,154, 7, 4, 0,171, 7, 4, 0,216, 0, 4, 0,172, 7, 4, 0,173, 7, 7, 0, 56, 5, 7, 0,174, 7,
- 4, 0,126, 0, 4, 0,175, 7, 7, 1,176, 7, 36, 0, 80, 0, 46, 0,134, 0, 49, 0,137, 0, 7, 0,177, 7, 7, 0,178, 7,
- 8, 1, 30, 1, 9, 1,179, 7, 9, 1,180, 7, 9, 1,181, 7, 12, 0,182, 7, 10, 1,183, 7, 11, 1,184, 7, 7, 0,185, 7,
- 7, 0,186, 7, 4, 0,187, 7, 7, 0,188, 7, 9, 0,189, 7, 4, 0,190, 7, 4, 0,191, 7, 4, 0,192, 7, 7, 0,193, 7,
- 12, 1, 4, 0, 12, 1, 0, 0, 12, 1, 1, 0, 12, 0,194, 7, 9, 1,195, 7,197, 0, 6, 0, 12, 0,196, 7, 12, 0,182, 7,
- 12, 0,197, 7, 9, 1,198, 7, 0, 0,199, 7, 0, 0,200, 7, 13, 1, 4, 0, 7, 0,201, 7, 7, 0,109, 0, 2, 0,202, 7,
- 2, 0,203, 7, 14, 1, 6, 0, 7, 0,204, 7, 7, 0,205, 7, 7, 0,206, 7, 7, 0,207, 7, 4, 0,208, 7, 4, 0,209, 7,
- 15, 1, 12, 0, 7, 0,210, 7, 7, 0,211, 7, 7, 0,212, 7, 7, 0,213, 7, 7, 0,214, 7, 7, 0,215, 7, 7, 0,216, 7,
- 7, 0,217, 7, 7, 0,218, 7, 7, 0,219, 7, 4, 0,210, 2, 4, 0,220, 7, 16, 1, 2, 0, 7, 0, 25, 5, 7, 0, 37, 0,
- 17, 1, 5, 0, 7, 0,221, 7, 7, 0,222, 7, 4, 0, 90, 0, 4, 0,168, 2, 4, 0,223, 7, 18, 1, 6, 0, 18, 1, 0, 0,
- 18, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,224, 7, 2, 0, 57, 0, 19, 1, 8, 0, 19, 1, 0, 0, 19, 1, 1, 0,
- 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,224, 7, 2, 0, 57, 0, 7, 0, 23, 0, 7, 0,126, 0, 20, 1, 45, 0, 20, 1, 0, 0,
- 20, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,224, 7, 2, 0,212, 0, 2, 0,244, 3, 2, 0,225, 7, 7, 0,226, 7,
- 7, 0, 89, 0, 7, 0,223, 2, 4, 0,227, 7, 4, 0, 82, 0, 4, 0,170, 2, 7, 0,228, 7, 7, 0,229, 7, 7, 0,230, 7,
- 7, 0,231, 7, 7, 0,232, 7, 7, 0,233, 7, 7, 0,220, 2, 7, 0, 27, 1, 7, 0,234, 7, 7, 0,235, 7, 7, 0, 37, 0,
- 7, 0,236, 7, 7, 0,237, 7, 7, 0,238, 7, 2, 0,239, 7, 2, 0,240, 7, 2, 0,241, 7, 2, 0,242, 7, 2, 0,243, 7,
- 2, 0,244, 7, 2, 0,245, 7, 2, 0,246, 7, 2, 0, 6, 2, 2, 0,247, 7, 2, 0, 3, 2, 2, 0,248, 7, 0, 0,249, 7,
- 0, 0,250, 7, 7, 0,210, 0, 21, 1,251, 7, 68, 0,212, 1, 22, 1, 16, 0, 22, 1, 0, 0, 22, 1, 1, 0, 2, 0, 17, 0,
- 2, 0, 19, 0, 2, 0,224, 7, 2, 0,212, 0, 7, 0,215, 2, 7, 0,216, 2, 7, 0,217, 2, 7, 0, 52, 2, 7, 0,218, 2,
- 7, 0,219, 2, 7, 0,252, 7, 7, 0,220, 2, 7, 0,222, 2, 7, 0,223, 2,223, 0, 5, 0, 2, 0, 17, 0, 2, 0,142, 7,
- 2, 0, 19, 0, 2, 0,253, 7, 27, 0, 81, 6,222, 0, 3, 0, 4, 0, 69, 0, 4, 0,254, 7,223, 0, 2, 0, 23, 1, 7, 0,
- 23, 1, 0, 0, 23, 1, 1, 0, 0, 0, 20, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 22, 0, 9, 0,255, 7, 24, 1, 5, 0,
- 0, 0, 20, 0, 7, 0, 47, 1, 7, 0, 0, 8, 4, 0, 1, 8, 4, 0, 37, 0, 25, 1, 4, 0, 2, 0, 17, 0, 2, 0, 19, 0,
- 2, 0, 43, 0, 2, 0, 70, 0, 26, 1, 4, 0, 0, 0, 20, 0, 67, 0, 2, 8, 7, 0, 47, 1, 7, 0, 37, 0, 27, 1, 6, 0,
- 2, 0, 3, 8, 2, 0, 4, 8, 2, 0, 17, 0, 2, 0, 5, 8, 0, 0, 6, 8, 0, 0, 7, 8, 28, 1, 5, 0, 4, 0, 17, 0,
- 4, 0, 37, 0, 0, 0, 20, 0, 0, 0, 8, 8, 0, 0, 9, 8, 29, 1, 3, 0, 4, 0, 17, 0, 4, 0, 37, 0, 0, 0, 20, 0,
- 30, 1, 4, 0, 2, 0, 10, 8, 2, 0, 11, 8, 2, 0, 19, 0, 2, 0, 37, 0, 31, 1, 6, 0, 0, 0, 20, 0, 0, 0, 12, 8,
- 2, 0, 13, 8, 2, 0,220, 2, 2, 0, 40, 1, 2, 0, 70, 0, 32, 1, 5, 0, 0, 0, 20, 0, 7, 0,109, 0, 7, 0, 74, 4,
- 2, 0, 19, 0, 2, 0,182, 2, 33, 1, 3, 0, 0, 0, 20, 0, 4, 0,170, 2, 4, 0, 10, 8, 34, 1, 7, 0, 0, 0, 20, 0,
- 7, 0, 74, 4, 0, 0, 14, 8, 0, 0, 15, 8, 2, 0, 40, 1, 2, 0, 43, 0, 4, 0, 16, 8, 35, 1, 3, 0, 32, 0, 17, 8,
- 0, 0, 18, 8, 0, 0, 19, 8, 36, 1, 18, 0, 36, 1, 0, 0, 36, 1, 1, 0, 2, 0, 17, 0, 2, 0, 20, 8, 2, 0, 19, 0,
- 2, 0, 21, 8, 2, 0, 22, 8, 2, 0, 23, 8, 2, 0, 43, 0, 2, 0, 70, 0, 0, 0, 20, 0, 9, 0, 2, 0, 37, 1, 24, 8,
- 32, 0, 45, 0, 2, 0, 40, 5, 2, 0,185, 7, 2, 0, 25, 8, 2, 0, 37, 0, 38, 1, 11, 0, 0, 0, 20, 0, 0, 0, 17, 0,
- 0, 0, 26, 8, 2, 0, 19, 0, 2, 0,182, 2, 2, 0, 27, 8, 4, 0, 28, 8, 4, 0, 29, 8, 4, 0, 30, 8, 4, 0, 31, 8,
- 4, 0, 32, 8, 39, 1, 1, 0, 0, 0, 33, 8, 40, 1, 4, 0, 42, 0, 51, 6, 0, 0, 34, 8, 4, 0, 40, 1, 4, 0, 19, 0,
- 37, 1, 18, 0, 37, 1, 0, 0, 37, 1, 1, 0, 37, 1, 35, 8, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 36, 8, 2, 0, 23, 8,
- 2, 0, 20, 8, 2, 0, 37, 8, 2, 0, 70, 0, 2, 0,209, 1, 0, 0, 20, 0, 9, 0, 2, 0, 41, 1, 24, 8, 36, 1, 38, 8,
- 2, 0, 15, 0, 2, 0, 39, 8, 4, 0, 40, 8, 42, 1, 3, 0, 4, 0,196, 2, 4, 0, 37, 0, 32, 0, 45, 0, 43, 1, 12, 0,
-159, 0, 41, 8, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0,226, 7, 4, 0, 89, 0, 0, 0, 20, 0, 0, 0, 42, 8, 2, 0, 43, 8,
- 2, 0, 44, 8, 2, 0, 45, 8, 2, 0, 46, 8, 7, 0, 47, 8, 44, 1, 13, 0, 2, 0, 19, 0, 2, 0, 48, 8, 4, 0,226, 7,
- 4, 0, 89, 0, 2, 0, 49, 8, 7, 0,202, 3, 7, 0, 50, 8, 10, 1,183, 7, 45, 1, 51, 8, 2, 0, 17, 0, 2, 0, 52, 8,
- 2, 0, 53, 8, 2, 0, 54, 8, 46, 1, 11, 0, 4, 0,196, 2, 2, 0, 17, 0, 2, 0, 19, 0, 32, 0, 45, 0, 81, 0, 55, 8,
- 0, 0, 20, 0, 7, 0, 56, 8, 7, 0, 57, 8, 7, 0,100, 3, 2, 0, 58, 8, 2, 0, 59, 8, 47, 1, 5, 0, 2, 0, 17, 0,
- 2, 0, 19, 0, 4, 0, 37, 0, 46, 0,134, 0, 32, 0,136, 5, 48, 1, 5, 0, 4, 0, 19, 0, 4, 0, 17, 0, 0, 0, 20, 0,
- 0, 0, 8, 8, 32, 0, 45, 0, 49, 1, 13, 0, 2, 0, 19, 0, 2, 0, 17, 0, 2, 0, 20, 8, 2, 0,101, 3, 7, 0, 60, 8,
- 7, 0, 61, 8, 7, 0, 35, 1, 7, 0, 36, 1, 7, 0, 77, 3, 7, 0, 80, 3, 7, 0, 62, 8, 7, 0, 63, 8, 32, 0, 64, 8,
- 50, 1, 10, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 0,226, 7, 4, 0, 89, 0, 0, 0, 20, 0, 0, 0, 42, 8, 2, 0, 43, 0,
- 2, 0, 64, 0, 2, 0, 65, 8, 2, 0, 66, 8, 51, 1, 8, 0, 32, 0, 45, 0, 7, 0,217, 2, 7, 0, 67, 8, 7, 0, 68, 8,
- 7, 0,212, 2, 2, 0, 19, 0, 2, 0,182, 2, 7, 0, 69, 8, 52, 1, 12, 0, 2, 0, 17, 0, 2, 0, 40, 1, 2, 0, 19, 0,
- 2, 0,220, 2, 2, 0,196, 2, 2, 0, 70, 8, 4, 0, 37, 0, 7, 0, 71, 8, 7, 0, 72, 8, 7, 0, 73, 8, 7, 0, 74, 8,
- 0, 0, 75, 8, 53, 1, 10, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 0,226, 7, 4, 0, 89, 0, 0, 0, 20, 0, 2, 0,105, 1,
- 2, 0, 64, 0, 2, 0, 65, 8, 2, 0, 66, 8, 68, 0,212, 1, 54, 1, 7, 0, 4, 0,170, 2, 4, 0, 76, 8, 4, 0, 77, 8,
- 4, 0, 78, 8, 7, 0, 79, 8, 7, 0, 80, 8, 0, 0, 14, 8, 55, 1, 7, 0, 0, 0, 81, 8, 32, 0, 82, 8, 0, 0, 18, 8,
- 2, 0, 83, 8, 2, 0, 43, 0, 4, 0, 70, 0, 0, 0, 19, 8, 56, 1, 6, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 0,226, 7,
- 4, 0, 89, 0, 0, 0, 84, 8, 0, 0, 85, 8, 57, 1, 1, 0, 4, 0, 19, 0, 58, 1, 6, 0, 0, 0, 92, 0, 2, 0, 17, 0,
- 2, 0, 19, 0, 4, 0, 86, 8, 7, 0, 87, 8, 42, 0, 51, 6, 59, 1, 4, 0, 0, 0, 48, 2, 2, 0, 19, 0, 4, 0, 17, 0,
- 32, 0, 45, 0, 60, 1, 2, 0, 4, 0, 17, 0, 4, 0,229, 5, 41, 1, 10, 0, 41, 1, 0, 0, 41, 1, 1, 0, 41, 1, 35, 8,
- 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 20, 8, 2, 0, 88, 8, 0, 0, 20, 0, 9, 0, 2, 0, 32, 0, 45, 0, 61, 1, 10, 0,
- 7, 0,100, 3, 7, 0, 89, 8, 7, 0, 90, 8, 7, 0, 91, 8, 7, 0, 92, 8, 4, 0, 19, 0, 7, 0, 70, 8, 7, 0, 93, 8,
- 7, 0, 94, 8, 7, 0, 37, 0, 11, 1, 12, 0, 11, 1, 0, 0, 11, 1, 1, 0, 10, 1, 95, 8, 9, 0,193, 0, 4, 0,143, 3,
- 4, 0,189, 3, 4, 0,190, 3, 4, 0, 96, 8, 4, 0, 97, 8, 4, 0, 98, 8, 7, 0,202, 3, 7, 0, 37, 0, 45, 1, 8, 0,
- 7, 0, 99, 8, 7, 0,100, 8, 7, 0,101, 8, 7, 0,102, 8, 7, 0,103, 8, 7, 0,104, 8, 7, 0,105, 8, 7, 0,106, 8,
- 10, 1, 15, 0, 27, 0, 31, 0, 0, 0,192, 0, 43, 0,149, 0, 9, 0,193, 0, 43, 0,107, 8, 36, 0, 80, 0, 7, 0,202, 3,
- 7, 0,108, 8, 7, 0, 50, 8, 7, 0, 99, 8, 7, 0,100, 8, 7, 0,109, 8, 4, 0, 90, 0, 4, 0, 98, 8, 9, 0,110, 8,
- 62, 1, 15, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5,252, 0,111, 8,209, 0,249, 5,
- 10, 1,183, 7, 2, 0, 40, 1, 2, 0, 48, 8, 2, 0, 67, 2, 2, 0, 68, 2, 2, 0, 19, 0, 2, 0,254, 5, 4, 0, 70, 0,
- 63, 1, 6, 0, 63, 1, 0, 0, 63, 1, 1, 0, 32, 0, 45, 0, 9, 0,112, 8, 4, 0,217, 0, 4, 0, 37, 0, 68, 0, 4, 0,
- 27, 0, 31, 0, 12, 0,113, 8, 4, 0,131, 0, 7, 0,114, 8, 64, 1, 25, 0, 64, 1, 0, 0, 64, 1, 1, 0, 64, 1, 38, 0,
- 12, 0,115, 8, 0, 0, 20, 0, 7, 0,116, 8, 7, 0,117, 8, 7, 0,118, 8, 7, 0,119, 8, 4, 0, 19, 0, 7, 0,120, 8,
- 7, 0,121, 8, 7, 0,122, 8, 7, 0, 47, 1, 7, 0, 14, 2, 7, 0,123, 8, 7, 0,168, 2, 7, 0,124, 8, 7, 0,125, 8,
- 7, 0,126, 8, 7, 0,127, 8, 7, 0,128, 8, 7, 0,172, 0, 2, 0,131, 0, 2, 0, 71, 5, 65, 1, 21, 0, 27, 0, 31, 0,
- 12, 0,129, 8, 12, 0,130, 8, 12, 0,131, 8, 9, 0,132, 8, 4, 0, 19, 0, 4, 0,201, 5, 2, 0,224, 2, 2, 0, 4, 6,
- 2, 0,131, 0, 2, 0,133, 8, 2, 0,134, 8, 2, 0,135, 8, 2, 0,136, 8, 2, 0,137, 8, 4, 0,138, 8, 4, 0,139, 8,
- 4, 0,140, 8, 4, 0,141, 8, 4, 0,142, 8, 4, 0,143, 8, 66, 1, 2, 0, 7, 0,129, 2, 4, 0, 19, 0, 67, 1, 5, 0,
- 66, 1,144, 8, 4, 0,168, 2, 4, 0,145, 8, 4, 0,146, 8, 4, 0, 19, 0, 68, 1, 6, 0, 4, 0, 37, 0, 4, 0, 4, 6,
- 4, 0,140, 8, 4, 0,141, 8, 4, 0,142, 8, 4, 0,143, 8, 69, 1, 38, 0, 69, 1, 0, 0, 69, 1, 1, 0, 26, 0,147, 8,
- 12, 0,127, 3, 0, 0, 20, 0, 2, 0, 19, 0, 2, 0,148, 8, 2, 0,149, 8, 2, 0,150, 8, 2, 0, 86, 3, 2, 0,151, 8,
- 4, 0, 50, 2, 4, 0,140, 8, 4, 0,141, 8, 64, 1,152, 8, 69, 1, 38, 0, 69, 1,153, 8, 12, 0,154, 8, 9, 0,155, 8,
- 9, 0,156, 8, 9, 0,157, 8, 7, 0, 35, 1, 7, 0,172, 0, 7, 0,158, 8, 7, 0,249, 1, 2, 0,159, 8, 2, 0, 37, 0,
- 7, 0,160, 8, 7, 0,161, 8, 7, 0, 82, 3, 7, 0,162, 8, 7, 0,163, 8, 7, 0,164, 8, 7, 0,165, 8, 7, 0,166, 8,
- 7, 0,167, 8, 7, 0, 43, 2, 32, 0,168, 8,160, 0, 9, 0, 12, 0,169, 8, 2, 0, 19, 0, 2, 0,170, 8, 7, 0, 79, 2,
- 7, 0,171, 8, 7, 0,172, 8, 12, 0,173, 8, 4, 0,174, 8, 4, 0, 37, 0, 70, 1, 7, 0, 70, 1, 0, 0, 70, 1, 1, 0,
- 12, 0,175, 8, 4, 0, 19, 0, 4, 0,176, 8, 0, 0,193, 3,243, 0,177, 8,159, 0, 7, 0, 27, 0, 31, 0, 12, 0,178, 8,
- 12, 0,169, 8, 12, 0,179, 8, 12, 0,100, 0, 4, 0, 19, 0, 4, 0,180, 8,213, 0, 4, 0, 27, 0, 95, 8, 12, 0,169, 8,
- 4, 0,181, 8, 4, 0, 19, 0, 71, 1, 17, 0,208, 0, 0, 0,208, 0, 1, 0, 12, 0,192, 5, 4, 0,193, 5, 7, 0,194, 5,
- 2, 0,195, 5,209, 0,249, 5,159, 0, 67, 3,213, 0,182, 8, 0, 0, 40, 1, 0, 0,252, 5, 2, 0, 19, 0, 2, 0,183, 8,
- 2, 0,253, 5, 2, 0,254, 5, 2, 0,184, 8, 7, 0,185, 8, 72, 1, 8, 0, 72, 1, 0, 0, 72, 1, 1, 0, 70, 1,186, 8,
- 36, 0, 80, 0, 12, 0, 71, 3, 4, 0, 19, 0, 0, 0, 20, 0, 4, 0,187, 8, 73, 1, 5, 0, 73, 1, 0, 0, 73, 1, 1, 0,
- 36, 0, 80, 0, 2, 0, 19, 0, 0, 0,188, 8, 74, 1, 12, 0, 74, 1, 0, 0, 74, 1, 1, 0, 9, 0, 2, 0, 2, 0, 17, 0,
- 2, 0, 19, 0, 0, 0,189, 8, 0, 0,190, 8, 0, 0,188, 8, 7, 0,191, 8, 7, 0,192, 8, 4, 0, 37, 0, 36, 0, 80, 0,
- 75, 1, 9, 0, 75, 1, 0, 0, 75, 1, 1, 0, 32, 0,193, 8, 0, 0,227, 2, 7, 0,194, 8, 2, 0,195, 8, 2, 0, 19, 0,
- 2, 0, 17, 0, 2, 0,196, 8, 76, 1, 7, 0, 42, 0, 51, 6, 26, 0,147, 8, 4, 0, 19, 0, 4, 0,197, 8, 12, 0,198, 8,
- 32, 0,193, 8, 0, 0,227, 2, 77, 1, 12, 0, 32, 0,193, 8, 2, 0,199, 8, 2, 0, 19, 0, 2, 0,200, 8, 2, 0,201, 8,
- 0, 0,227, 2, 32, 0,202, 8, 0, 0,203, 8, 7, 0,204, 8, 7, 0, 14, 2, 7, 0,205, 8, 7, 0,206, 8, 78, 1, 6, 0,
- 32, 0,193, 8, 4, 0,207, 8, 4, 0,208, 8, 4, 0, 90, 0, 4, 0, 37, 0, 0, 0,227, 2, 79, 1, 4, 0, 32, 0,193, 8,
- 4, 0, 19, 0, 4, 0,207, 8, 0, 0,227, 2, 80, 1, 4, 0, 32, 0,193, 8, 4, 0, 19, 0, 4, 0,207, 8, 0, 0,227, 2,
- 81, 1, 10, 0, 32, 0,193, 8, 4, 0,209, 8, 7, 0,125, 0, 4, 0, 19, 0, 2, 0, 47, 6, 2, 0,210, 8, 2, 0, 43, 0,
- 2, 0, 70, 0, 7, 0,211, 8, 0, 0,227, 2, 82, 1, 4, 0, 32, 0,193, 8, 4, 0, 19, 0, 4, 0,207, 8, 0, 0,227, 2,
- 83, 1, 10, 0, 32, 0,193, 8, 2, 0, 17, 0, 2, 0,252, 3, 4, 0, 88, 0, 4, 0, 89, 0, 7, 0, 67, 8, 7, 0, 68, 8,
- 4, 0, 37, 0,159, 0, 41, 8, 0, 0,227, 2, 84, 1, 4, 0, 32, 0,193, 8, 4, 0, 87, 3, 4, 0,212, 8, 0, 0,227, 2,
- 85, 1, 5, 0, 32, 0,193, 8, 7, 0,125, 0, 4, 0,213, 8, 4, 0, 87, 3, 4, 0, 88, 3, 86, 1, 6, 0, 32, 0,193, 8,
- 4, 0,214, 8, 4, 0,215, 8, 7, 0,216, 8, 7, 0,217, 8, 0, 0,227, 2, 87, 1, 16, 0, 32, 0,193, 8, 32, 0,153, 8,
- 4, 0, 17, 0, 7, 0,218, 8, 7, 0,219, 8, 7, 0,220, 8, 7, 0,221, 8, 7, 0,222, 8, 7, 0,223, 8, 7, 0,224, 8,
- 7, 0,225, 8, 7, 0,226, 8, 2, 0, 19, 0, 2, 0, 37, 0, 2, 0, 43, 0, 2, 0, 70, 0, 88, 1, 3, 0, 32, 0,193, 8,
- 4, 0, 19, 0, 4, 0, 6, 2, 89, 1, 5, 0, 32, 0,193, 8, 4, 0, 19, 0, 4, 0, 37, 0, 7, 0,227, 8, 0, 0,227, 2,
- 90, 1, 10, 0, 32, 0,193, 8, 0, 0,227, 2, 2, 0,228, 8, 2, 0,229, 8, 0, 0,230, 8, 0, 0,231, 8, 7, 0,232, 8,
- 7, 0,233, 8, 7, 0,234, 8, 7, 0,235, 8, 91, 1, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 12, 0,
- 7, 0,236, 8, 7, 0,237, 8, 2, 0, 19, 0, 2, 0, 6, 2, 92, 1, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0,
- 7, 0, 12, 0, 7, 0,236, 8, 7, 0,237, 8, 2, 0, 19, 0, 2, 0, 6, 2, 93, 1, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0,
- 7, 0, 11, 0, 7, 0, 12, 0, 7, 0,236, 8, 7, 0,237, 8, 2, 0, 19, 0, 2, 0, 6, 2, 94, 1, 7, 0, 32, 0,193, 8,
- 0, 0,227, 2, 7, 0, 47, 1, 7, 0, 56, 1, 2, 0, 19, 0, 2, 0, 40, 1, 4, 0, 37, 0, 95, 1, 5, 0, 32, 0, 27, 3,
- 7, 0, 47, 1, 2, 0, 31, 3, 0, 0, 33, 3, 0, 0,238, 8, 96, 1, 10, 0, 96, 1, 0, 0, 96, 1, 1, 0, 2, 0, 17, 0,
- 2, 0, 19, 0, 0, 0,239, 8, 7, 0,246, 0, 7, 0,247, 0, 2, 0,175, 8, 2, 0,240, 8, 32, 0, 45, 0, 97, 1, 22, 0,
- 97, 1, 0, 0, 97, 1, 1, 0, 2, 0, 19, 0, 2, 0, 40, 1, 2, 0,241, 8, 2, 0,242, 8, 36, 0, 80, 0,159, 0, 41, 8,
- 32, 0,164, 0, 7, 0, 88, 0, 7, 0, 89, 0, 7, 0,243, 8, 7, 0,244, 8, 7, 0,245, 8, 7, 0,246, 8, 7, 0,213, 2,
- 7, 0,247, 8, 7, 0, 43, 8, 7, 0,248, 8, 0, 0,249, 8, 0, 0,250, 8, 12, 0, 73, 3, 98, 1, 8, 0, 7, 0, 21, 2,
- 7, 0, 67, 8, 7, 0, 68, 8, 9, 0, 2, 0, 2, 0,251, 8, 2, 0,252, 8, 2, 0,253, 8, 2, 0,254, 8, 99, 1, 18, 0,
- 99, 1, 0, 0, 99, 1, 1, 0, 99, 1,255, 8, 0, 0, 20, 0, 98, 1, 0, 9, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 1, 9,
- 2, 0, 2, 9, 2, 0, 3, 9, 2, 0, 4, 9, 4, 0, 43, 0, 7, 0, 5, 9, 7, 0, 6, 9, 4, 0, 7, 9, 4, 0, 8, 9,
- 99, 1, 9, 9,100, 1, 10, 9,101, 1, 33, 0,101, 1, 0, 0,101, 1, 1, 0,101, 1, 11, 9, 0, 0, 20, 0, 0, 0, 12, 9,
- 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,152, 7, 2, 0,185, 7, 2, 0, 13, 9, 2, 0,133, 0, 2, 0, 2, 9, 2, 0,142, 7,
- 12, 0, 36, 8, 12, 0, 14, 9, 27, 0, 81, 6, 9, 0, 15, 9, 7, 0, 5, 9, 7, 0, 6, 9, 7, 0, 52, 2, 7, 0, 16, 9,
- 2, 0, 17, 9, 2, 0, 18, 9, 7, 0, 19, 9, 7, 0, 20, 9, 2, 0, 21, 9, 2, 0, 22, 9, 9, 0, 23, 9, 24, 0, 24, 9,
- 24, 0, 25, 9, 24, 0, 26, 9,102, 1,150, 0,103, 1, 27, 9,100, 1, 8, 0,100, 1, 0, 0,100, 1, 1, 0,101, 1, 28, 9,
-101, 1, 29, 9, 99, 1, 30, 9, 99, 1, 9, 9, 4, 0, 19, 0, 4, 0, 37, 0, 61, 0, 20, 0, 27, 0, 31, 0, 39, 0, 75, 0,
- 12, 0, 31, 9, 12, 0, 32, 9, 98, 1, 33, 9, 12, 0, 34, 9, 4, 0, 17, 0, 4, 0, 35, 9, 4, 0, 36, 9, 4, 0, 37, 9,
- 12, 0, 38, 9,103, 1, 39, 9, 99, 1, 40, 9, 99, 1, 41, 9, 9, 0, 42, 9, 9, 0, 43, 9, 4, 0, 44, 9, 9, 0, 45, 9,
- 9, 0, 46, 9, 9, 0, 47, 9,104, 1, 6, 0, 4, 0,124, 0, 4, 0,126, 0, 4, 0,142, 7, 0, 0, 48, 9, 0, 0, 49, 9,
- 2, 0, 37, 0,105, 1, 16, 0, 2, 0, 98, 7, 2, 0, 99, 7, 2, 0, 50, 9, 2, 0, 90, 8, 2, 0, 51, 9, 2, 0, 68, 0,
- 7, 0,212, 2, 7, 0, 52, 9, 7, 0, 53, 9, 2, 0, 60, 1, 0, 0, 54, 9, 0, 0, 55, 5, 2, 0, 55, 9, 2, 0, 37, 0,
- 4, 0, 56, 9, 4, 0, 57, 9,106, 1, 9, 0, 7, 0, 58, 9, 7, 0, 59, 9, 7, 0,109, 8, 7, 0,109, 0, 7, 0, 60, 9,
- 7, 0, 10, 6, 2, 0, 61, 9, 0, 0, 62, 9, 0, 0, 37, 0,107, 1, 4, 0, 7, 0, 63, 9, 7, 0, 64, 9, 2, 0, 61, 9,
- 2, 0, 37, 0,108, 1, 3, 0, 7, 0, 65, 9, 7, 0, 66, 9, 7, 0, 15, 0,109, 1, 7, 0, 0, 0,239, 1, 2, 0,185, 4,
- 2, 0,186, 4, 2, 0,187, 4, 2, 0,138, 4, 4, 0,126, 0, 4, 0,250, 3,110, 1, 7, 0, 7, 0, 67, 9, 7, 0, 68, 9,
- 7, 0, 69, 9, 7, 0, 63, 2, 7, 0, 70, 9, 7, 0, 71, 9, 7, 0, 72, 9,111, 1, 4, 0, 2, 0, 73, 9, 2, 0, 74, 9,
- 2, 0, 75, 9, 2, 0, 76, 9,112, 1, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0,113, 1, 2, 0, 0, 0,166, 0, 0, 0, 77, 9,
-114, 1, 1, 0, 0, 0, 20, 0,115, 1, 10, 0, 0, 0, 78, 9, 0, 0, 79, 9, 0, 0, 3, 6, 0, 0, 80, 9, 2, 0, 50, 9,
- 2, 0, 81, 9, 7, 0, 82, 9, 7, 0, 83, 9, 7, 0, 84, 9, 7, 0,247, 8,116, 1, 2, 0, 9, 0, 85, 9, 9, 0, 86, 9,
-117, 1, 11, 0, 0, 0,187, 4, 0, 0, 17, 0, 0, 0, 61, 9, 0, 0,109, 0, 0, 0, 87, 9, 0, 0,106, 0, 0, 0, 48, 2,
- 7, 0, 88, 9, 7, 0, 89, 9, 7, 0, 90, 9, 7, 0, 91, 9,118, 1, 8, 0, 7, 0, 3, 8, 7, 0,125, 0, 7, 0, 55, 5,
- 7, 0,134, 2, 7, 0, 92, 9, 7, 0,206, 0, 7, 0, 93, 9, 4, 0, 17, 0,119, 1, 4, 0, 2, 0, 94, 9, 2, 0, 95, 9,
- 2, 0, 96, 9, 2, 0, 37, 0,120, 1, 1, 0, 0, 0, 20, 0,121, 1, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 2, 0, 19, 0,
- 2, 0, 97, 9,122, 1, 10, 0, 2, 0,182, 3, 2, 0, 19, 0, 7, 0, 74, 4, 7, 0, 98, 9, 7, 0, 99, 9, 7, 0,100, 9,
- 7, 0,101, 9,121, 1,102, 9,121, 1,103, 9,121, 1,104, 9, 64, 0, 9, 0, 4, 0, 19, 0, 4, 0, 64, 0, 24, 0,105, 9,
- 24, 0,106, 9,122, 1,107, 9, 7, 0,108, 9, 7, 0,109, 9, 7, 0,110, 9, 7, 0,111, 9,123, 1, 4, 0, 47, 0,206, 2,
- 7, 0,112, 9, 7, 0,141, 1, 7, 0, 37, 0,187, 0, 17, 0, 27, 0, 31, 0,123, 1,113, 9, 64, 0,102, 9, 51, 0,103, 1,
- 2, 0, 19, 0, 2, 0,160, 5, 4, 0,106, 0, 7, 0,114, 9, 7, 0, 60, 2, 4, 0,115, 9, 7, 0,116, 9, 7, 0,117, 9,
- 7, 0,118, 9, 7, 0,141, 1, 2, 0, 73, 1, 0, 0,119, 9, 0, 0,139, 6,124, 1, 10, 0, 4, 0, 17, 0, 4, 0,125, 0,
- 4, 0, 19, 0, 4, 0,148, 3, 4, 0,120, 9, 4, 0,121, 9, 4, 0,122, 9, 0, 0, 92, 0, 0, 0, 20, 0, 9, 0, 2, 0,
- 92, 0, 6, 0,124, 1,123, 9, 4, 0,124, 9, 4, 0,125, 9, 4, 0,126, 9, 4, 0, 37, 0, 9, 0,127, 9,125, 1, 5, 0,
- 7, 0,129, 2, 7, 0,196, 2, 7, 0, 14, 2, 2, 0,128, 9, 2, 0, 37, 0,126, 1, 5, 0, 7, 0,129, 2, 7, 0,129, 9,
- 7, 0,130, 9, 7, 0,131, 9, 7, 0,196, 2,127, 1, 5, 0, 32, 0,132, 9,128, 1, 22, 0, 7, 0,133, 9, 7, 0,134, 9,
- 7, 0, 57, 0,129, 1, 7, 0, 4, 0,135, 9, 4, 0,136, 9, 4, 0,137, 9, 7, 0,138, 9, 7, 0,139, 9, 7, 0,140, 9,
- 7, 0,141, 9,130, 1, 8, 0,130, 1, 0, 0,130, 1, 1, 0, 32, 0, 45, 0, 4, 0, 14, 3, 2, 0, 19, 0, 2, 0, 40, 1,
- 7, 0,196, 2, 7, 0, 11, 8,131, 1, 18, 0,126, 1,143, 3,126, 1,142, 9,125, 1,143, 9,126, 1,251, 7,127, 1,144, 9,
- 4, 0, 82, 0, 7, 0,196, 2, 7, 0,223, 2, 7, 0,145, 9, 4, 0,135, 9, 4, 0,146, 9, 7, 0,139, 9, 7, 0,140, 9,
- 7, 0,106, 0, 2, 0, 19, 0, 2, 0,147, 9, 2, 0,148, 9, 2, 0,149, 9,132, 1,107, 0, 27, 0, 31, 0, 39, 0, 75, 0,
-133, 1,150, 9, 4, 0, 19, 0, 2, 0, 17, 0, 2, 0,228, 8, 2, 0,151, 9, 2, 0,152, 9, 2, 0,159, 8, 2, 0,153, 9,
- 2, 0,154, 9, 2, 0,155, 9, 2, 0,156, 9, 2, 0,157, 9, 2, 0,158, 9, 2, 0,159, 9, 2, 0,178, 3, 2, 0, 48, 5,
- 2, 0,160, 9, 2, 0,161, 9, 2, 0,162, 9, 2, 0,163, 9, 2, 0,164, 9, 2, 0, 3, 2, 2, 0,244, 7, 2, 0,220, 7,
- 2, 0,165, 9, 2, 0,166, 9, 2, 0,176, 3, 2, 0,177, 3, 2, 0,167, 9, 2, 0,168, 9, 2, 0,169, 9, 2, 0,170, 9,
- 7, 0,171, 9, 7, 0,172, 9, 7, 0,173, 9, 2, 0,174, 9, 2, 0,175, 9, 7, 0,176, 9, 7, 0,177, 9, 7, 0,178, 9,
- 7, 0,226, 7, 7, 0, 89, 0, 7, 0,223, 2, 7, 0,232, 7, 7, 0,179, 9, 7, 0,180, 9, 7, 0,181, 9, 4, 0,227, 7,
- 4, 0,225, 7, 4, 0,182, 9, 7, 0,228, 7, 7, 0,229, 7, 7, 0,230, 7, 7, 0,183, 9, 7, 0,184, 9, 7, 0,185, 9,
- 7, 0,186, 9, 7, 0,187, 9, 7, 0,188, 9, 7, 0,189, 9, 7, 0,190, 9, 7, 0,100, 3, 7, 0,106, 0, 7, 0,191, 9,
- 7, 0,192, 9, 7, 0,193, 9, 7, 0,194, 9, 7, 0,195, 9, 7, 0,196, 9, 7, 0,197, 9, 4, 0,198, 9, 4, 0,199, 9,
- 7, 0,200, 9, 7, 0,201, 9, 7, 0,202, 9, 7, 0,203, 9, 7, 0,204, 9, 7, 0,205, 9, 7, 0,206, 9, 7, 0,172, 3,
- 7, 0,170, 3, 7, 0,171, 3, 7, 0,207, 9, 7, 0,208, 9, 7, 0,209, 9, 7, 0,210, 9, 7, 0,211, 9, 7, 0,212, 9,
- 7, 0,213, 9, 7, 0,214, 9, 7, 0,215, 9, 7, 0,216, 9, 7, 0,217, 9, 7, 0,218, 9, 7, 0,219, 9, 4, 0,220, 9,
- 4, 0,221, 9, 7, 0,222, 9, 68, 0,132, 3, 68, 0,223, 9, 32, 0,224, 9, 32, 0,225, 9, 36, 0, 80, 0,163, 0, 32, 1,
-163, 0,226, 9, 59, 0, 43, 0, 59, 0, 0, 0, 59, 0, 1, 0,132, 1,227, 9,131, 1,228, 9,129, 1,153, 8,168, 0,198, 3,
- 9, 0,199, 3,134, 1,229, 9,134, 1,230, 9, 12, 0,231, 9, 12, 0,232, 9,134, 0,233, 9,142, 0,234, 9,142, 0,235, 9,
- 32, 0,236, 9, 32, 0,237, 9, 32, 0, 38, 0, 12, 0,238, 9, 12, 0,239, 9, 12, 0,198, 8, 0, 0, 20, 0, 7, 0,210, 0,
- 7, 0,250, 2, 7, 0,240, 9, 4, 0,170, 2, 4, 0, 57, 0, 4, 0, 19, 0, 4, 0,227, 7, 4, 0,241, 9, 4, 0,242, 9,
- 4, 0,243, 9, 2, 0,217, 0, 2, 0,244, 9, 2, 0,245, 9, 2, 0,246, 9, 0, 0,247, 9, 2, 0,248, 9, 2, 0,249, 9,
- 2, 0,250, 9, 9, 0,251, 9,138, 0, 15, 4, 12, 0,237, 2,135, 1,252, 9,136, 0, 34, 0,136, 1,110, 8, 7, 0,241, 3,
- 7, 0,253, 9, 7, 0,254, 9, 7, 0, 77, 4, 7, 0,255, 9, 7, 0,110, 3, 7, 0,100, 3, 7, 0, 0, 10, 7, 0, 62, 2,
- 7, 0, 1, 10, 7, 0, 2, 10, 7, 0, 3, 10, 7, 0, 4, 10, 7, 0, 5, 10, 7, 0, 6, 10, 7, 0,242, 3, 7, 0, 7, 10,
- 7, 0, 8, 10, 7, 0, 9, 10, 7, 0,243, 3, 7, 0,239, 3, 7, 0,240, 3, 7, 0, 10, 10, 4, 0, 11, 10, 4, 0, 90, 0,
- 4, 0, 12, 10, 4, 0, 13, 10, 2, 0, 14, 10, 2, 0, 15, 10, 2, 0, 16, 10, 2, 0, 17, 10, 2, 0, 18, 10, 2, 0, 37, 0,
-137, 0, 8, 0,136, 1, 19, 10, 7, 0, 20, 10, 7, 0, 21, 10, 7, 0,213, 1, 7, 0, 22, 10, 4, 0, 90, 0, 2, 0, 23, 10,
- 2, 0, 24, 10,137, 1, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 7, 0, 25, 10,138, 1, 6, 0,138, 1, 0, 0,
-138, 1, 1, 0,137, 1,144, 8, 4, 0,223, 0, 2, 0, 26, 10, 2, 0, 19, 0,139, 1, 5, 0,139, 1, 0, 0,139, 1, 1, 0,
- 12, 0, 27, 10, 4, 0, 28, 10, 4, 0, 19, 0,140, 1, 9, 0,140, 1, 0, 0,140, 1, 1, 0, 12, 0,124, 0,139, 1, 29, 10,
- 4, 0, 19, 0, 2, 0, 26, 10, 2, 0, 30, 10, 7, 0, 91, 0, 0, 0, 31, 10,161, 0, 6, 0, 27, 0, 31, 0, 12, 0,201, 4,
- 4, 0, 19, 0, 2, 0, 32, 10, 2, 0, 33, 10, 9, 0, 34, 10,141, 1, 7, 0,141, 1, 0, 0,141, 1, 1, 0, 2, 0, 17, 0,
- 2, 0, 19, 0, 4, 0, 23, 0, 0, 0, 35, 10, 0, 0, 36, 10,142, 1, 5, 0, 12, 0, 37, 10, 4, 0, 38, 10, 4, 0, 39, 10,
- 4, 0, 19, 0, 4, 0, 37, 0,143, 1, 13, 0, 27, 0, 31, 0,144, 1, 40, 10,144, 1, 41, 10, 12, 0, 42, 10, 4, 0, 43, 10,
- 2, 0, 44, 10, 2, 0, 37, 0, 12, 0, 45, 10, 12, 0, 46, 10,142, 1, 47, 10, 12, 0, 48, 10, 12, 0, 49, 10, 12, 0, 50, 10,
-144, 1, 30, 0,144, 1, 0, 0,144, 1, 1, 0, 9, 0, 51, 10, 4, 0, 77, 7, 4, 0, 37, 0,211, 0,248, 5,211, 0, 52, 10,
- 0, 0, 53, 10, 2, 0, 54, 10, 2, 0, 55, 10, 2, 0, 98, 7, 2, 0, 99, 7, 2, 0, 56, 10, 2, 0, 57, 10, 2, 0,148, 3,
- 2, 0,107, 6, 2, 0, 58, 10, 2, 0, 59, 10, 4, 0,209, 1,145, 1, 60, 10,146, 1, 61, 10,147, 1, 62, 10, 4, 0, 63, 10,
- 4, 0, 64, 10, 9, 0, 65, 10, 12, 0, 66, 10, 12, 0, 46, 10, 12, 0,116, 7, 12, 0, 67, 10, 12, 0, 68, 10,148, 1, 16, 0,
-148, 1, 0, 0,148, 1, 1, 0, 0, 0, 69, 10,149, 1, 70, 10, 2, 0, 17, 0, 2, 0, 15, 0, 2, 0, 71, 10, 2, 0, 72, 10,
- 2, 0, 73, 10, 2, 0, 74, 10, 2, 0, 75, 10, 2, 0, 76, 10, 2, 0, 77, 10, 2, 0, 78, 10, 2, 0, 70, 0, 2, 0,209, 1,
-150, 1, 9, 0,150, 1, 0, 0,150, 1, 1, 0, 12, 0, 79, 10, 0, 0, 80, 10, 2, 0, 81, 10, 2, 0, 82, 10, 2, 0, 83, 10,
- 2, 0, 37, 0, 9, 0, 84, 10,219, 0, 12, 0,219, 0, 0, 0,219, 0, 1, 0, 0, 0, 69, 10, 26, 0, 30, 0,151, 1, 92, 7,
- 9, 0, 85, 10,149, 1, 70, 10,142, 1, 86, 10, 12, 0, 87, 10,219, 0, 88, 10, 2, 0, 19, 0, 2, 0,105, 1,145, 1, 23, 0,
-145, 1, 0, 0,145, 1, 1, 0, 2, 0, 17, 0, 2, 0, 15, 0, 2, 0, 5, 0, 2, 0, 6, 0, 2, 0, 89, 10, 2, 0, 90, 10,
- 2, 0, 91, 10, 2, 0, 92, 10, 0, 0, 93, 10, 0, 0, 37, 0, 2, 0, 71, 10, 2, 0, 72, 10, 2, 0, 73, 10, 2, 0, 74, 10,
- 2, 0, 75, 10, 2, 0, 43, 0, 0, 0, 94, 10, 2, 0, 95, 10, 2, 0, 96, 10, 4, 0, 70, 0, 9, 0, 85, 10,152, 1, 8, 0,
-152, 1, 0, 0,152, 1, 1, 0, 9, 0, 2, 0, 9, 0, 97, 10, 0, 0,193, 3, 2, 0, 17, 0, 2, 0, 19, 0, 7, 0, 98, 10,
-153, 1, 5, 0, 7, 0, 99, 10, 4, 0,100, 10, 4, 0,101, 10, 4, 0, 40, 1, 4, 0, 19, 0,154, 1, 6, 0, 7, 0,102, 10,
- 7, 0,103, 10, 7, 0,104, 10, 7, 0,105, 10, 4, 0, 17, 0, 4, 0, 19, 0,155, 1, 5, 0, 7, 0, 67, 8, 7, 0, 68, 8,
- 7, 0,196, 2, 2, 0, 17, 2, 2, 0, 18, 2,156, 1, 5, 0,155, 1, 2, 0, 4, 0, 54, 0, 7, 0,106, 10, 7, 0, 67, 8,
- 7, 0, 68, 8,157, 1, 4, 0, 2, 0,107, 10, 2, 0,108, 10, 2, 0,109, 10, 2, 0,110, 10,158, 1, 2, 0, 42, 0, 78, 6,
- 26, 0,147, 8,159, 1, 3, 0, 24, 0,111, 10, 4, 0, 19, 0, 4, 0, 37, 0,160, 1, 6, 0, 7, 0,106, 0, 7, 0,198, 2,
- 7, 0,112, 10, 7, 0, 37, 0, 2, 0,216, 0, 2, 0,113, 10,161, 1, 7, 0,161, 1, 0, 0,161, 1, 1, 0, 27, 0, 81, 6,
- 0, 0,114, 10, 4, 0,115, 10, 4, 0, 90, 0, 0, 0,193, 3,162, 1, 6, 0, 12, 0,198, 8, 0, 0,116, 10, 7, 0, 61, 0,
- 7, 0, 98, 10, 4, 0, 17, 0, 4, 0, 19, 0,163, 1, 3, 0, 7, 0,117, 10, 4, 0, 19, 0, 4, 0, 37, 0,164, 1, 15, 0,
-164, 1, 0, 0,164, 1, 1, 0, 70, 1,186, 8,162, 1, 62, 0, 12, 0, 73, 3, 35, 0, 50, 0,163, 1,118, 10, 4, 0, 54, 0,
- 7, 0, 61, 0, 2, 0, 19, 0, 2, 0, 25, 1, 4, 0,115, 10, 0, 0,114, 10, 4, 0,119, 10, 7, 0,120, 10,165, 1, 2, 0,
- 0, 0,121, 10, 0, 0,122, 10,166, 1, 4, 0,166, 1, 0, 0,166, 1, 1, 0,159, 0, 27, 3, 12, 0,123, 10,167, 1, 24, 0,
-167, 1, 0, 0,167, 1, 1, 0, 12, 0,124, 10,159, 0, 41, 8,166, 1,125, 10, 12, 0,126, 10, 12, 0, 73, 3, 0, 0,193, 3,
- 7, 0, 98, 10, 7, 0,127, 10, 7, 0, 88, 0, 7, 0, 89, 0, 7, 0,243, 8, 7, 0,244, 8, 7, 0,213, 2, 7, 0,247, 8,
- 7, 0, 43, 8, 7, 0,248, 8, 2, 0,128, 10, 2, 0,129, 10, 2, 0, 43, 0, 2, 0, 17, 0, 4, 0, 19, 0, 4, 0, 70, 0,
-168, 1, 6, 0,168, 1, 0, 0,168, 1, 1, 0, 12, 0,124, 10, 4, 0, 19, 0, 4, 0,133, 2, 0, 0,193, 3,169, 1, 10, 0,
-169, 1, 0, 0,169, 1, 1, 0, 27, 0, 81, 6, 0, 0,130, 10, 4, 0,131, 10, 4, 0,132, 10, 0, 0,114, 10, 4, 0,115, 10,
- 2, 0, 19, 0, 2, 0,133, 10,170, 1, 6, 0,170, 1, 0, 0,170, 1, 1, 0, 12, 0,134, 10, 0, 0,193, 3, 4, 0, 19, 0,
- 4, 0,135, 10,171, 1, 5, 0,171, 1, 0, 0,171, 1, 1, 0, 0, 0,114, 10, 4, 0,115, 10, 7, 0,186, 2, 39, 0, 12, 0,
-159, 0, 67, 3,159, 0,136, 10,166, 1,125, 10, 12, 0,137, 10,167, 1,138, 10, 12, 0,139, 10, 12, 0,140, 10, 4, 0, 19, 0,
- 4, 0,217, 0, 2, 0,141, 10, 2, 0,142, 10, 7, 0,143, 10,172, 1, 2, 0, 27, 0, 31, 0, 39, 0, 75, 0,173, 1, 5, 0,
-173, 1, 0, 0,173, 1, 1, 0, 4, 0, 17, 0, 4, 0, 19, 0, 0, 0, 20, 0,174, 1, 6, 0,173, 1,144, 10, 32, 0, 45, 0,
- 4, 0,145, 10, 7, 0,146, 10, 4, 0,147, 10, 4, 0,175, 8,175, 1, 3, 0,173, 1,144, 10, 4, 0,145, 10, 7, 0,148, 10,
-176, 1, 8, 0,173, 1,144, 10, 32, 0, 45, 0, 7, 0, 35, 1, 7, 0,149, 10, 7, 0,250, 2, 7, 0,109, 8, 4, 0,145, 10,
- 4, 0,150, 10,177, 1, 5, 0,173, 1,144, 10, 7, 0,151, 10, 7, 0,185, 7, 7, 0,219, 2, 7, 0, 57, 0,178, 1, 3, 0,
-173, 1,144, 10, 7, 0,109, 8, 7, 0,152, 10,128, 1, 4, 0, 7, 0,153, 10, 7, 0,193, 9, 2, 0,154, 10, 2, 0, 40, 1,
-179, 1, 14, 0,179, 1, 0, 0,179, 1, 1, 0, 12, 0,155, 10, 12, 0,156, 10, 12, 0,157, 10, 0, 0, 20, 0, 4, 0, 31, 0,
- 4, 0, 19, 0, 4, 0,158, 10, 7, 0,159, 10, 4, 0,147, 10, 4, 0,175, 8, 7, 0,202, 3, 7, 0,221, 2,133, 1, 23, 0,
- 4, 0,145, 10, 4, 0,160, 10, 7, 0,161, 10, 7, 0, 57, 0, 7, 0,162, 10, 7, 0,217, 2, 7, 0,153, 10, 7, 0,163, 10,
- 7, 0,198, 2, 7, 0,164, 10, 7, 0, 74, 4, 7, 0,165, 10, 7, 0,166, 10, 7, 0,167, 10, 7, 0,168, 10, 7, 0,169, 10,
- 7, 0,170, 10, 7, 0,171, 10, 7, 0,172, 10, 7, 0,173, 10, 7, 0,174, 10, 7, 0,175, 10, 12, 0,176, 10,122, 0, 33, 0,
-121, 0,177, 10,180, 1,178, 10, 68, 0,179, 10, 68, 0,223, 9, 68, 0,180, 10,181, 1,181, 10, 48, 0,165, 0, 48, 0,182, 10,
- 48, 0,183, 10, 7, 0,184, 10, 7, 0,185, 10, 7, 0,186, 10, 7, 0,187, 10, 7, 0,188, 10, 7, 0,187, 8, 7, 0,189, 10,
- 7, 0,141, 1, 7, 0,190, 10, 4, 0,191, 10, 4, 0,192, 10, 4, 0,193, 10, 4, 0, 90, 0, 4, 0, 37, 0, 4, 0,194, 10,
- 2, 0,195, 10, 2, 0,196, 10, 4, 0,197, 10, 7, 0,198, 2, 4, 0,198, 10, 7, 0,199, 10, 4, 0,200, 10,138, 0,201, 10,
- 12, 0,202, 10,123, 0, 11, 0,121, 0,177, 10, 59, 0,225, 0, 7, 0,106, 1, 7, 0,187, 8, 7, 0,203, 10, 7, 0,204, 10,
- 2, 0,205, 10, 2, 0,206, 10, 2, 0,207, 10, 2, 0, 17, 0, 4, 0, 37, 0,124, 0, 13, 0,121, 0,177, 10,140, 0,247, 2,
-142, 0,249, 2, 7, 0,144, 8, 7, 0,208, 10, 7, 0,209, 10, 7, 0, 37, 1, 7, 0,210, 10, 4, 0,211, 10, 4, 0,245, 2,
+111,111,107, 0, 68,117,112,108,105, 79, 98,106,101, 99,116, 0, 82, 78, 71, 0, 69,102,102,101, 99,116,111,114, 87,101,105,103,
+104,116,115, 0, 80, 84, 67, 97, 99,104,101, 77,101,109, 0, 80, 84, 67, 97, 99,104,101, 69,100,105,116, 0, 83, 66, 86,101,114,
+116,101,120, 0, 66,111,100,121, 80,111,105,110,116, 0, 66,111,100,121, 83,112,114,105,110,103, 0, 83, 66, 83, 99,114, 97,116,
+ 99,104, 0, 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, 68,111,109,101, 0, 71, 97,109,101, 70,
+114, 97,109,105,110,103, 0, 71, 97,109,101, 68, 97,116, 97, 0, 84,105,109,101, 77, 97,114,107,101,114, 0, 80, 97,105,110,116,
+ 0, 66,114,117,115,104, 0, 73,109, 97,103,101, 80, 97,105,110,116, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, 99,
+108,101, 66,114,117,115,104, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 69,100,105,116, 83,101,116,116,105,110,103,115,
+ 0, 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, 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, 85,110,105,116, 83,101,116,116,
+105,110,103,115, 0, 80,104,121,115,105, 99,115, 83,101,116,116,105,110,103,115, 0, 69,100,105,116,105,110,103, 0, 83, 99,101,
+110,101, 83,116, 97,116,115, 0, 68, 97,103, 70,111,114,101,115,116, 0, 66, 71,112,105, 99, 0, 82,101,103,105,111,110, 86,105,
+101,119, 51, 68, 0, 82,101,110,100,101,114, 73,110,102,111, 0, 82,101,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, 67,111,110,115,111,108,101, 76,105,110,101, 0, 83,112, 97, 99,101, 67,111,110,115,
+111,108,101, 0, 83,112, 97, 99,101, 85,115,101,114, 80,114,101,102, 0,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, 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, 83,111,117,110,100, 72, 97,110,100,108,101, 0, 77,101,116,
+ 97, 83,116, 97, 99,107, 0, 87,105,112,101, 86, 97,114,115, 0, 71,108,111,119, 86, 97,114,115, 0, 84,114, 97,110,115,102,111,
+114,109, 86, 97,114,115, 0, 83,111,108,105,100, 67,111,108,111,114, 86, 97,114,115, 0, 83,112,101,101,100, 67,111,110,116,114,
+111,108, 86, 97,114,115, 0, 69,102,102,101, 99,116, 0, 66,117,105,108,100, 69,102,102, 0, 80, 97,114,116, 69,102,102, 0, 80,
+ 97,114,116,105, 99,108,101, 0, 87, 97,118,101, 69,102,102, 0, 98, 80,114,111,112,101,114,116,121, 0, 98, 78,101, 97,114, 83,
+101,110,115,111,114, 0, 98, 77,111,117,115,101, 83,101,110,115,111,114, 0, 98, 84,111,117, 99,104, 83,101,110,115,111,114, 0,
+ 98, 75,101,121, 98,111, 97,114,100, 83,101,110,115,111,114, 0, 98, 80,114,111,112,101,114,116,121, 83,101,110,115,111,114, 0,
+ 98, 65, 99,116,117, 97,116,111,114, 83,101,110,115,111,114, 0, 98, 68,101,108, 97,121, 83,101,110,115,111,114, 0, 98, 67,111,
+108,108,105,115,105,111,110, 83,101,110,115,111,114, 0, 98, 82, 97,100, 97,114, 83,101,110,115,111,114, 0, 98, 82, 97,110,100,
+111,109, 83,101,110,115,111,114, 0, 98, 82, 97,121, 83,101,110,115,111,114, 0, 98, 65,114,109, 97,116,117,114,101, 83,101,110,
+115,111,114, 0, 98, 77,101,115,115, 97,103,101, 83,101,110,115,111,114, 0, 98, 83,101,110,115,111,114, 0, 98, 67,111,110,116,
+114,111,108,108,101,114, 0, 98, 74,111,121,115,116,105, 99,107, 83,101,110,115,111,114, 0, 98, 69,120,112,114,101,115,115,105,
+111,110, 67,111,110,116, 0, 98, 80,121,116,104,111,110, 67,111,110,116, 0, 98, 65, 99,116,117, 97,116,111,114, 0, 98, 65,100,
+100, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 65, 99,116,105,111,110, 65, 99,116,117, 97,116,111,114, 0,
+ 98, 83,111,117,110,100, 65, 99,116,117, 97,116,111,114, 0, 83,111,117,110,100, 51, 68, 0, 98, 69,100,105,116, 79, 98,106,101,
+ 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 83, 99,101,110,101, 65, 99,116,117, 97,116,111,114, 0, 98, 80,114,111,112,101,
+114,116,121, 65, 99,116,117, 97,116,111,114, 0, 98, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 73,112,111,
+ 65, 99,116,117, 97,116,111,114, 0, 98, 67, 97,109,101,114, 97, 65, 99,116,117, 97,116,111,114, 0, 98, 67,111,110,115,116,114,
+ 97,105,110,116, 65, 99,116,117, 97,116,111,114, 0, 98, 71,114,111,117,112, 65, 99,116,117, 97,116,111,114, 0, 98, 82, 97,110,
+100,111,109, 65, 99,116,117, 97,116,111,114, 0, 98, 77,101,115,115, 97,103,101, 65, 99,116,117, 97,116,111,114, 0, 98, 71, 97,
+109,101, 65, 99,116,117, 97,116,111,114, 0, 98, 86,105,115,105, 98,105,108,105,116,121, 65, 99,116,117, 97,116,111,114, 0, 98,
+ 84,119,111, 68, 70,105,108,116,101,114, 65, 99,116,117, 97,116,111,114, 0, 98, 80, 97,114,101,110,116, 65, 99,116,117, 97,116,
+111,114, 0, 98, 83,116, 97,116,101, 65, 99,116,117, 97,116,111,114, 0, 98, 65,114,109, 97,116,117,114,101, 65, 99,116,117, 97,
+116,111,114, 0, 70,114,101,101, 67, 97,109,101,114, 97, 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, 77,111,116,105,111,110, 80, 97,116,104,
+ 86,101,114,116, 0, 98, 77,111,116,105,111,110, 80, 97,116,104, 0, 98, 65,110,105,109, 86,105,122, 83,101,116,116,105,110,103,
+115, 0, 98, 80,111,115,101, 67,104, 97,110,110,101,108, 0, 98, 73, 75, 80, 97,114, 97,109, 0, 98, 73,116, 97,115, 99, 0, 98,
+ 65, 99,116,105,111,110, 71,114,111,117,112, 0, 83,112, 97, 99,101, 65, 99,116,105,111,110, 0, 98, 65, 99,116,105,111,110, 67,
+104, 97,110,110,101,108, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 67,104, 97,110,110,101,108, 0, 98, 67,111,110,115,116,
+114, 97,105,110,116, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 84, 97,114,103,101,116, 0, 98, 80,121,116,104,111,110, 67,
+111,110,115,116,114, 97,105,110,116, 0, 98, 75,105,110,101,109, 97,116,105, 99, 67,111,110,115,116,114, 97,105,110,116, 0, 98,
+ 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,117,105, 66,108,111, 99,107, 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, 66,
+111,105,100, 80, 97,114,116,105, 99,108,101, 0, 66,111,105,100, 68, 97,116, 97, 0, 67,104,105,108,100, 80, 97,114,116,105, 99,
+108,101, 0, 80, 97,114,116,105, 99,108,101, 84, 97,114,103,101,116, 0, 80, 97,114,116,105, 99,108,101, 68, 97,116, 97, 0, 80,
+ 97,114,116,105, 99,108,101, 83,101,116,116,105,110,103,115, 0, 66,111,105,100, 83,101,116,116,105,110,103,115, 0, 80, 97,114,
+116,105, 99,108,101, 67, 97, 99,104,101, 75,101,121, 0, 75, 68, 84,114,101,101, 0, 80, 97,114,116,105, 99,108,101, 68,114, 97,
+119, 68, 97,116, 97, 0, 76,105,110,107, 78,111,100,101, 0, 98, 71, 80, 68,115,112,111,105,110,116, 0, 98, 71, 80, 68,115,116,
+114,111,107,101, 0, 98, 71, 80, 68,102,114, 97,109,101, 0, 98, 71, 80, 68,108, 97,121,101,114, 0, 82,101,112,111,114,116, 0,
+ 82,101,112,111,114,116, 76,105,115,116, 0,119,109, 87,105,110,100,111,119, 77, 97,110, 97,103,101,114, 0,119,109, 87,105,110,
+100,111,119, 0,119,109, 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, 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, 66,111,105,100, 82,117,108,101, 0, 66,111,105,100, 82,117,108,101,
+ 71,111, 97,108, 65,118,111,105,100, 0, 66,111,105,100, 82,117,108,101, 65,118,111,105,100, 67,111,108,108,105,115,105,111,110,
+ 0, 66,111,105,100, 82,117,108,101, 70,111,108,108,111,119, 76,101, 97,100,101,114, 0, 66,111,105,100, 82,117,108,101, 65,118,
+101,114, 97,103,101, 83,112,101,101,100, 0, 66,111,105,100, 82,117,108,101, 70,105,103,104,116, 0, 66,111,105,100, 83,116, 97,
+116,101, 0, 70, 76, 85, 73, 68, 95, 51, 68, 0, 87, 84, 85, 82, 66, 85, 76, 69, 78, 67, 69, 0, 84, 76, 69, 78, 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, 0, 40, 2, 0, 0, 32, 0,140, 0,136, 3, 92, 0,
+ 36, 0, 56, 0, 84, 0,112, 0,124, 0, 56, 0, 24, 0, 40, 0,120, 0, 12, 0,120, 0, 36, 0,108, 5,128, 1, 0, 0, 0, 0,
+ 0, 0, 8, 1, 40, 1, 84, 1, 24, 0, 8, 3,168, 0, 0, 0, 76, 0,124, 1, 24, 1,140, 0,132, 0,124, 1, 8, 1, 56, 0,
+ 88, 0,160, 2, 76, 0, 60, 1, 0, 0,108, 0,104, 0,148, 0, 56, 0, 8, 0, 16, 0, 92, 1, 0, 0, 0, 0, 0, 0, 24, 1,
+ 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, 0, 0, 1, 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, 76, 0,176, 0, 48, 0,168, 0,152, 0,156, 0, 64, 0, 96, 0,108, 0,
+188, 0,104, 0,216, 0, 56, 0, 84, 0, 0, 0,136, 0, 28, 0,240, 1,104, 0, 0, 0, 80, 0, 0, 0, 0, 0, 68, 0, 8, 0,
+ 8, 0,220, 0, 80, 0, 76, 0, 68, 0, 68, 0, 64, 0,168, 1,112, 0,108, 0,188, 0, 40, 0, 0, 0, 92, 0, 64, 0, 72, 0,
+120, 0,144, 0, 0, 1,208, 0,180, 0, 0, 0, 68, 0, 92, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0,104, 1, 28, 0,176, 0,
+144, 0, 60, 0, 24, 0, 72, 0,248, 3, 56, 0, 20, 0, 16, 0, 92, 0, 80, 0, 24, 0,196, 0, 36, 0, 8, 0,100, 0, 80, 0,
+ 48, 0, 52, 0, 72, 1, 32, 0, 8, 0, 16, 0, 24, 2, 0, 0, 0, 0, 56, 0,216, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+240, 0, 40, 0,148, 0, 48, 0,140, 0,208, 0, 20, 0,224, 0,216, 0,204, 1, 60, 0, 0, 0,112, 0, 0, 0, 4, 1, 12, 0,
+ 12, 0,136, 0,200, 0,124, 2, 80, 2, 40, 0,180, 0,244, 0, 52, 0,148, 2, 28, 0, 80, 0, 24, 0, 16, 1, 32, 0,224, 0,
+ 32, 0, 32, 0, 80, 2, 16, 1, 16, 0,200, 21, 56, 0, 56, 11, 20, 0, 24, 0, 56, 1, 0, 0, 0, 0, 96, 0, 0, 0,248, 0,
+ 0, 0, 32, 0, 80, 0, 28, 0, 16, 0, 8, 0, 52, 0,252, 0,240, 0,168, 1,196, 0, 8, 1, 48, 0, 16, 0, 12, 0, 24, 0,
+ 48, 0, 16, 0, 20, 0, 16, 0, 24, 0, 56, 1, 0, 0, 56, 0, 52, 0, 48, 0, 8, 0, 44, 0, 72, 0,104, 0, 40, 0, 8, 0,
+ 72, 0, 44, 0, 40, 0,108, 0, 72, 0, 68, 0, 76, 0, 80, 0, 60, 0,128, 0, 76, 0, 60, 0, 12, 0, 92, 0, 68, 0, 32, 0,
+ 80, 0, 16, 0, 76, 0,108, 0, 84, 0, 28, 0, 96, 0, 56, 0, 56, 0,108, 0,140, 0, 4, 0, 20, 0, 12, 0, 8, 0, 80, 0,
+ 40, 0,196, 0, 24, 0, 4, 1,128, 0, 16, 0, 20, 0, 24, 0,180, 1, 4, 0, 40, 0,104, 0,228, 0, 64, 0, 44, 0, 72, 0,
+116, 0, 60, 0,112, 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,212, 0, 0, 0, 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, 8, 0, 24, 0, 32, 0, 8, 0, 32, 0, 12, 0,
+ 44, 0, 20, 0, 68, 0, 24, 0, 56, 0, 52, 0, 20, 0, 64, 0, 28, 0,180, 0,172, 1, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 0, 20, 0, 24, 0,172, 0, 24, 0, 24, 0,140, 0,156, 0, 56, 0, 0, 0, 0, 0,100, 0, 0, 0, 96, 0, 0, 0, 88, 0,
+ 20, 0, 24, 0, 16, 0, 20, 0, 8, 0, 8, 0, 24, 0, 20, 0, 88, 0, 24, 1, 16, 0, 68, 0, 0, 1, 20, 0,160, 0, 88, 0,
+ 96, 0, 88, 0, 20, 0, 56, 0, 48, 0, 68, 0, 56, 0, 92, 0, 64, 0, 56, 0, 96, 0, 0, 0, 0, 0, 0, 0, 83, 84, 82, 67,
+133, 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, 6, 0, 40, 0, 0, 0, 40, 0, 1, 0, 0, 0, 84, 0, 0, 0, 85, 0, 4, 0, 23, 0,
+ 4, 0, 86, 0, 41, 0, 10, 0, 41, 0, 0, 0, 41, 0, 1, 0, 4, 0, 87, 0, 4, 0, 88, 0, 4, 0, 89, 0, 4, 0, 43, 0,
+ 4, 0, 14, 0, 4, 0, 90, 0, 0, 0, 91, 0, 0, 0, 92, 0, 42, 0, 15, 0, 27, 0, 31, 0, 0, 0, 93, 0, 4, 0, 90, 0,
+ 4, 0, 94, 0, 12, 0, 95, 0, 40, 0, 96, 0, 40, 0, 97, 0, 4, 0, 98, 0, 4, 0, 99, 0, 12, 0,100, 0, 0, 0,101, 0,
+ 4, 0,102, 0, 4, 0,103, 0, 9, 0,104, 0, 8, 0,105, 0, 43, 0, 3, 0, 4, 0,106, 0, 4, 0,107, 0, 9, 0, 2, 0,
+ 44, 0, 20, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0, 17, 0, 2, 0, 19, 0, 7, 0,108, 0, 7, 0,109, 0, 7, 0,110, 0,
+ 7, 0,111, 0, 7, 0,112, 0, 7, 0,113, 0, 7, 0,114, 0, 7, 0,115, 0, 7, 0,116, 0, 7, 0,117, 0, 7, 0,118, 0,
+ 2, 0,119, 0, 2, 0,120, 0, 7, 0,121, 0, 36, 0, 80, 0, 32, 0,122, 0, 45, 0, 13, 0, 4, 0,123, 0, 4, 0,124, 0,
+ 4, 0,125, 0, 4, 0,126, 0, 2, 0,127, 0, 2, 0,128, 0, 2, 0, 19, 0, 2, 0,129, 0, 2, 0,130, 0, 2, 0,131, 0,
+ 2, 0,132, 0, 2, 0,133, 0, 46, 0,134, 0, 47, 0, 32, 0, 27, 0, 31, 0, 0, 0, 34, 0, 12, 0,135, 0, 48, 0,136, 0,
+ 49, 0,137, 0, 50, 0,138, 0, 2, 0,129, 0, 2, 0, 19, 0, 2, 0,139, 0, 2, 0, 17, 0, 2, 0, 37, 0, 2, 0, 43, 0,
+ 4, 0,140, 0, 2, 0,141, 0, 2, 0,142, 0, 2, 0,143, 0, 2, 0,144, 0, 2, 0,145, 0, 2, 0,146, 0, 4, 0,147, 0,
+ 4, 0,148, 0, 43, 0,149, 0, 30, 0,150, 0, 0, 0,151, 0, 7, 0,152, 0, 4, 0,153, 0, 2, 0,154, 0, 2, 0,155, 0,
+ 2, 0,156, 0, 2, 0,157, 0, 7, 0,158, 0, 7, 0,159, 0, 51, 0, 63, 0, 2, 0,160, 0, 2, 0,161, 0, 2, 0,162, 0,
+ 2, 0,163, 0, 32, 0,164, 0, 52, 0,165, 0, 0, 0,166, 0, 0, 0,167, 0, 0, 0,168, 0, 0, 0,169, 0, 0, 0,170, 0,
+ 7, 0,171, 0, 7, 0,172, 0, 7, 0,173, 0, 2, 0,174, 0, 2, 0,175, 0, 2, 0,176, 0, 2, 0,177, 0, 2, 0,178, 0,
+ 2, 0,179, 0, 0, 0,180, 0, 0, 0,181, 0, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0, 7, 0,185, 0, 7, 0,186, 0,
+ 7, 0, 57, 0, 7, 0,187, 0, 7, 0,188, 0, 7, 0,189, 0, 7, 0,190, 0, 7, 0,191, 0, 7, 0,192, 0, 7, 0,193, 0,
+ 7, 0,194, 0, 7, 0,195, 0, 7, 0,196, 0, 7, 0,197, 0, 7, 0,198, 0, 7, 0,199, 0, 7, 0,200, 0, 7, 0,201, 0,
+ 7, 0,202, 0, 7, 0,203, 0, 7, 0,204, 0, 7, 0,205, 0, 7, 0,206, 0, 7, 0,207, 0, 7, 0,208, 0, 7, 0,209, 0,
+ 7, 0,210, 0, 7, 0,211, 0, 7, 0,212, 0, 7, 0,213, 0, 7, 0,214, 0, 7, 0,215, 0, 7, 0,216, 0, 7, 0,217, 0,
+ 7, 0,218, 0, 7, 0,219, 0, 7, 0,220, 0, 7, 0,221, 0, 53, 0, 15, 0, 0, 0,222, 0, 9, 0,223, 0, 0, 0,224, 0,
+ 0, 0,225, 0, 4, 0,226, 0, 4, 0,227, 0, 9, 0,228, 0, 7, 0,229, 0, 7, 0,230, 0, 7, 0,231, 0, 4, 0,232, 0,
+ 9, 0,233, 0, 9, 0,234, 0, 4, 0,235, 0, 4, 0, 37, 0, 54, 0, 6, 0, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0,
+ 7, 0,236, 0, 7, 0, 67, 0, 4, 0, 64, 0, 55, 0, 5, 0, 2, 0, 19, 0, 2, 0, 36, 0, 2, 0, 64, 0, 2, 0,237, 0,
+ 54, 0,231, 0, 56, 0, 17, 0, 32, 0,164, 0, 47, 0,238, 0, 57, 0,239, 0, 7, 0,240, 0, 7, 0,241, 0, 2, 0, 17, 0,
+ 2, 0,242, 0, 7, 0,110, 0, 7, 0,111, 0, 7, 0,243, 0, 4, 0,244, 0, 2, 0,245, 0, 2, 0,246, 0, 4, 0,129, 0,
+ 4, 0,140, 0, 2, 0,247, 0, 2, 0,248, 0, 58, 0, 23, 0, 2, 0, 19, 0, 2, 0,249, 0, 7, 0,250, 0, 7, 0,251, 0,
+ 2, 0,139, 0, 2, 0,252, 0, 4, 0,253, 0, 4, 0,254, 0, 32, 0,164, 0, 59, 0,255, 0, 2, 0, 0, 1, 2, 0, 1, 1,
+ 2, 0, 2, 1, 9, 0, 3, 1, 7, 0, 4, 1, 7, 0, 5, 1, 2, 0, 6, 1, 2, 0, 7, 1, 2, 0, 8, 1, 2, 0, 9, 1,
+ 7, 0, 10, 1, 7, 0, 11, 1, 55, 0, 12, 1, 60, 0, 11, 0, 4, 0, 13, 1, 4, 0, 14, 1, 2, 0, 15, 1, 2, 0, 19, 0,
+ 2, 0, 16, 1, 2, 0, 37, 0, 32, 0,164, 0, 7, 0, 17, 1, 4, 0, 18, 1, 0, 0, 19, 1, 7, 0, 20, 1, 52, 0, 61, 0,
+ 27, 0, 31, 0, 39, 0, 75, 0, 7, 0, 21, 1, 7, 0, 22, 1, 7, 0, 23, 1, 7, 0, 24, 1, 7, 0, 25, 1, 7, 0, 26, 1,
+ 7, 0, 27, 1, 7, 0, 28, 1, 7, 0, 29, 1, 7, 0, 30, 1, 7, 0, 31, 1, 7, 0, 32, 1, 7, 0, 33, 1, 7, 0, 34, 1,
+ 7, 0, 35, 1, 7, 0, 36, 1, 7, 0, 37, 1, 7, 0, 38, 1, 7, 0, 39, 1, 7, 0, 40, 1, 2, 0, 41, 1, 2, 0, 42, 1,
+ 2, 0, 43, 1, 2, 0, 44, 1, 2, 0, 45, 1, 2, 0, 46, 1, 2, 0, 47, 1, 2, 0, 19, 0, 2, 0, 17, 0, 2, 0,242, 0,
+ 7, 0, 48, 1, 7, 0, 49, 1, 7, 0, 50, 1, 7, 0, 51, 1, 4, 0, 52, 1, 4, 0, 53, 1, 2, 0, 54, 1, 2, 0, 55, 1,
+ 2, 0, 16, 1, 2, 0,127, 0, 4, 0, 23, 0, 4, 0,124, 0, 4, 0,125, 0, 4, 0,126, 0, 7, 0, 56, 1, 7, 0, 57, 1,
+ 7, 0,189, 0, 45, 0, 58, 1, 61, 0, 59, 1, 36, 0, 80, 0, 47, 0,238, 0, 53, 0, 60, 1, 55, 0, 12, 1, 56, 0, 61, 1,
+ 30, 0,150, 0, 58, 0, 62, 1, 60, 0, 63, 1, 0, 0, 64, 1, 0, 0,181, 0, 62, 0, 8, 0, 7, 0, 65, 1, 7, 0, 66, 1,
+ 7, 0,172, 0, 4, 0, 19, 0, 7, 0, 67, 1, 7, 0, 68, 1, 7, 0, 69, 1, 32, 0, 45, 0, 63, 0, 82, 0, 27, 0, 31, 0,
+ 39, 0, 75, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 70, 1, 2, 0,175, 0, 2, 0, 71, 1, 7, 0,182, 0, 7, 0,183, 0,
+ 7, 0,184, 0, 7, 0,185, 0, 7, 0, 72, 1, 7, 0, 73, 1, 7, 0, 74, 1, 7, 0, 75, 1, 7, 0, 76, 1, 7, 0, 77, 1,
+ 7, 0, 78, 1, 7, 0, 79, 1, 7, 0, 80, 1, 7, 0, 81, 1, 7, 0, 82, 1, 64, 0, 83, 1, 2, 0,249, 0, 2, 0, 70, 0,
+ 7, 0,110, 0, 7, 0,111, 0, 7, 0, 84, 1, 7, 0, 85, 1, 7, 0, 86, 1, 2, 0, 87, 1, 2, 0, 88, 1, 2, 0, 89, 1,
+ 2, 0, 90, 1, 0, 0, 91, 1, 0, 0, 92, 1, 2, 0, 93, 1, 2, 0, 94, 1, 2, 0, 95, 1, 2, 0, 96, 1, 2, 0, 97, 1,
+ 7, 0, 98, 1, 7, 0, 99, 1, 7, 0,100, 1, 7, 0,101, 1, 2, 0,102, 1, 2, 0, 43, 0, 2, 0,103, 1, 2, 0,104, 1,
+ 2, 0,105, 1, 2, 0,106, 1, 7, 0,107, 1, 7, 0,108, 1, 7, 0,109, 1, 7, 0,110, 1, 7, 0,111, 1, 7, 0,112, 1,
+ 7, 0,113, 1, 7, 0,114, 1, 7, 0,115, 1, 7, 0,116, 1, 7, 0,117, 1, 7, 0,118, 1, 2, 0,119, 1, 2, 0,120, 1,
+ 4, 0,121, 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, 2, 0,131, 1, 2, 0,132, 1, 36, 0, 80, 0, 51, 0,133, 1, 2, 0,134, 1, 2, 0,135, 1,
+ 30, 0,150, 0, 65, 0, 2, 0, 27, 0, 31, 0, 36, 0, 80, 0, 66, 0, 18, 0, 7, 0,136, 1, 7, 0,137, 1, 7, 0,138, 1,
+ 7, 0,139, 1, 7, 0,140, 1, 7, 0,141, 1, 7, 0,142, 1, 7, 0,143, 1, 7, 0,144, 1, 7, 0,145, 1, 2, 0,146, 1,
+ 2, 0,147, 1, 2, 0,148, 1, 2, 0,149, 1, 7, 0,150, 1, 7, 0,151, 1, 7, 0,152, 1, 4, 0,153, 1, 67, 0,124, 0,
+ 27, 0, 31, 0, 39, 0, 75, 0, 2, 0,154, 1, 2, 0, 19, 0, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0, 7, 0,155, 1,
+ 7, 0,156, 1, 7, 0,157, 1, 7, 0,158, 1, 7, 0,159, 1, 7, 0,160, 1, 7, 0,161, 1, 7, 0,162, 1, 7, 0,163, 1,
+ 7, 0,164, 1, 7, 0,165, 1, 7, 0,166, 1, 7, 0,167, 1, 7, 0,168, 1, 7, 0,169, 1, 7, 0,170, 1, 7, 0,171, 1,
+ 7, 0,172, 1, 7, 0,173, 1, 7, 0,174, 1, 66, 0,175, 1, 7, 0,176, 1, 7, 0,177, 1, 7, 0,178, 1, 7, 0,179, 1,
+ 7, 0,180, 1, 7, 0,181, 1, 7, 0,182, 1, 2, 0,183, 1, 2, 0,184, 1, 2, 0,185, 1, 0, 0,186, 1, 0, 0,187, 1,
+ 7, 0,188, 1, 7, 0,189, 1, 2, 0,190, 1, 2, 0,191, 1, 7, 0,192, 1, 7, 0,193, 1, 7, 0,194, 1, 7, 0,195, 1,
+ 2, 0,196, 1, 2, 0,197, 1, 4, 0, 70, 1, 4, 0,198, 1, 2, 0,199, 1, 2, 0,200, 1, 2, 0,201, 1, 2, 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,208, 1, 7, 0,209, 1, 7, 0,210, 1,
+ 7, 0,211, 1, 7, 0,212, 1, 0, 0,213, 1, 7, 0,214, 1, 7, 0,215, 1, 7, 0,216, 1, 4, 0,217, 1, 0, 0,218, 1,
+ 0, 0,103, 1, 0, 0,219, 1, 0, 0, 64, 1, 2, 0,220, 1, 2, 0,221, 1, 2, 0,134, 1, 2, 0,222, 1, 2, 0,223, 1,
+ 2, 0,224, 1, 7, 0,225, 1, 7, 0,226, 1, 7, 0,227, 1, 7, 0,228, 1, 7, 0,229, 1, 2, 0,160, 0, 2, 0,161, 0,
+ 55, 0,230, 1, 55, 0,231, 1, 0, 0,232, 1, 0, 0,233, 1, 0, 0,234, 1, 0, 0,235, 1, 2, 0,236, 1, 2, 0,237, 1,
+ 7, 0,238, 1, 7, 0,239, 1, 51, 0,133, 1, 61, 0, 59, 1, 36, 0, 80, 0, 68, 0,240, 1, 30, 0,150, 0, 7, 0,241, 1,
+ 7, 0,242, 1, 7, 0,243, 1, 7, 0,244, 1, 7, 0,245, 1, 2, 0,246, 1, 2, 0, 70, 0, 7, 0,247, 1, 7, 0,248, 1,
+ 7, 0,249, 1, 7, 0,250, 1, 7, 0,251, 1, 7, 0,252, 1, 7, 0,253, 1, 7, 0,254, 1, 7, 0,255, 1, 2, 0, 0, 2,
+ 2, 0, 1, 2, 4, 0, 2, 2, 4, 0,120, 1, 12, 0, 3, 2, 69, 0, 4, 0, 27, 0, 31, 0, 0, 0, 4, 2, 70, 0, 2, 0,
+ 43, 0,149, 0, 71, 0, 26, 0, 71, 0, 0, 0, 71, 0, 1, 0, 72, 0, 5, 2, 4, 0, 6, 2, 4, 0, 7, 2, 4, 0, 8, 2,
+ 4, 0, 9, 2, 4, 0, 10, 2, 4, 0, 11, 2, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 12, 2, 2, 0, 13, 2, 7, 0, 5, 0,
+ 7, 0, 6, 0, 7, 0, 7, 0, 7, 0, 14, 2, 7, 0, 15, 2, 7, 0, 16, 2, 7, 0, 17, 2, 7, 0, 18, 2, 7, 0, 19, 2,
+ 7, 0, 20, 2, 7, 0, 23, 0, 7, 0, 21, 2, 7, 0, 22, 2, 73, 0, 19, 0, 27, 0, 31, 0, 39, 0, 75, 0, 72, 0, 5, 2,
+ 12, 0, 23, 2, 12, 0, 24, 2, 12, 0, 25, 2, 36, 0, 80, 0, 67, 0, 26, 2, 0, 0, 19, 0, 0, 0, 27, 2, 2, 0, 28, 2,
+ 4, 0,174, 0, 7, 0, 65, 1, 7, 0,172, 0, 7, 0, 66, 1, 7, 0, 29, 2, 7, 0, 30, 2, 7, 0, 31, 2, 71, 0, 32, 2,
+ 35, 0, 11, 0, 7, 0, 33, 2, 7, 0, 34, 2, 7, 0, 35, 2, 7, 0,251, 0, 2, 0, 55, 0, 0, 0, 36, 2, 0, 0, 37, 2,
+ 0, 0, 38, 2, 0, 0, 39, 2, 0, 0, 40, 2, 0, 0, 41, 2, 34, 0, 7, 0, 7, 0, 42, 2, 7, 0, 34, 2, 7, 0, 35, 2,
+ 2, 0, 38, 2, 2, 0, 41, 2, 7, 0,251, 0, 7, 0, 37, 0, 74, 0, 21, 0, 74, 0, 0, 0, 74, 0, 1, 0, 2, 0, 17, 0,
+ 2, 0, 43, 2, 2, 0, 41, 2, 2, 0, 19, 0, 2, 0, 44, 2, 2, 0, 45, 2, 2, 0, 46, 2, 2, 0, 47, 2, 2, 0, 48, 2,
+ 2, 0, 49, 2, 2, 0, 50, 2, 2, 0, 51, 2, 7, 0, 52, 2, 7, 0, 53, 2, 34, 0, 49, 0, 35, 0, 50, 0, 2, 0, 54, 2,
+ 2, 0, 55, 2, 4, 0, 56, 2, 75, 0, 5, 0, 2, 0, 57, 2, 2, 0, 43, 2, 0, 0, 19, 0, 0, 0, 37, 0, 2, 0, 70, 0,
+ 76, 0, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 8, 0, 7, 0, 58, 2, 77, 0, 67, 0, 27, 0, 31, 0, 39, 0, 75, 0,
+ 72, 0, 5, 2, 12, 0, 59, 2, 12, 0, 24, 2, 12, 0, 60, 2, 32, 0, 61, 2, 32, 0, 62, 2, 32, 0, 63, 2, 36, 0, 80, 0,
+ 78, 0, 64, 2, 38, 0, 65, 2, 67, 0, 26, 2, 12, 0, 66, 2, 7, 0, 65, 1, 7, 0,172, 0, 7, 0, 66, 1, 4, 0,174, 0,
+ 2, 0, 67, 2, 2, 0, 68, 2, 2, 0, 69, 2, 7, 0, 70, 2, 7, 0, 70, 0, 2, 0, 71, 2, 2, 0, 28, 2, 2, 0, 19, 0,
+ 2, 0, 72, 2, 7, 0, 73, 2, 7, 0, 74, 2, 7, 0, 75, 2, 2, 0, 46, 2, 2, 0, 47, 2, 2, 0, 76, 2, 2, 0, 77, 2,
+ 4, 0, 78, 2, 34, 0, 79, 2, 2, 0, 23, 0, 2, 0, 95, 0, 2, 0, 67, 0, 2, 0, 80, 2, 7, 0, 81, 2, 7, 0, 82, 2,
+ 7, 0, 83, 2, 7, 0, 84, 2, 7, 0, 85, 2, 7, 0, 86, 2, 7, 0, 87, 2, 7, 0, 88, 2, 7, 0, 89, 2, 7, 0, 90, 2,
+ 0, 0, 91, 2, 79, 0, 92, 2, 80, 0, 93, 2, 0, 0, 94, 2, 69, 0, 95, 2, 69, 0, 96, 2, 69, 0, 97, 2, 69, 0, 98, 2,
+ 4, 0, 99, 2, 7, 0,100, 2, 4, 0,101, 2, 4, 0,102, 2, 76, 0,103, 2, 4, 0,104, 2, 4, 0,105, 2, 75, 0,106, 2,
+ 75, 0,107, 2, 81, 0, 39, 0, 27, 0, 31, 0, 72, 0, 5, 2, 12, 0,108, 2, 36, 0, 80, 0, 38, 0, 65, 2, 67, 0, 26, 2,
+ 82, 0,109, 2, 83, 0,110, 2, 84, 0,111, 2, 85, 0,112, 2, 86, 0,113, 2, 87, 0,114, 2, 88, 0,115, 2, 89, 0,116, 2,
+ 81, 0,117, 2, 90, 0,118, 2, 91, 0,119, 2, 92, 0,120, 2, 92, 0,121, 2, 92, 0,122, 2, 4, 0, 54, 0, 4, 0,123, 2,
+ 4, 0,124, 2, 4, 0,125, 2, 4, 0,126, 2, 4, 0,174, 0, 7, 0, 65, 1, 7, 0,172, 0, 7, 0, 66, 1, 7, 0,127, 2,
+ 4, 0, 67, 2, 2, 0,128, 2, 2, 0, 19, 0, 2, 0,129, 2, 2, 0,130, 2, 2, 0, 28, 2, 2, 0,131, 2, 93, 0,132, 2,
+ 94, 0,133, 2, 84, 0, 8, 0, 9, 0,134, 2, 7, 0,135, 2, 4, 0,136, 2, 0, 0, 19, 0, 0, 0,137, 2, 2, 0, 70, 1,
+ 2, 0,138, 2, 2, 0,139, 2, 82, 0, 7, 0, 4, 0,140, 2, 4, 0,141, 2, 4, 0,142, 2, 4, 0,143, 2, 2, 0, 43, 2,
+ 0, 0,144, 2, 0, 0, 19, 0, 86, 0, 5, 0, 4, 0,140, 2, 4, 0,141, 2, 0, 0,145, 2, 0, 0,146, 2, 2, 0, 19, 0,
+ 95, 0, 2, 0, 4, 0,147, 2, 7, 0, 35, 2, 87, 0, 3, 0, 95, 0,148, 2, 4, 0,149, 2, 4, 0, 19, 0, 85, 0, 6, 0,
+ 7, 0,150, 2, 2, 0,151, 2, 2, 0, 43, 2, 0, 0, 19, 0, 0, 0,146, 2, 0, 0, 69, 2, 88, 0, 4, 0, 0, 0,236, 0,
+ 0, 0,182, 0, 0, 0,183, 0, 0, 0,184, 0, 96, 0, 6, 0, 47, 0,134, 2, 0, 0, 19, 0, 0, 0,137, 2, 2, 0, 70, 1,
+ 2, 0,138, 2, 2, 0,139, 2, 97, 0, 1, 0, 7, 0,152, 2, 98, 0, 5, 0, 0, 0,236, 0, 0, 0,182, 0, 0, 0,183, 0,
+ 0, 0,184, 0, 4, 0, 37, 0, 89, 0, 1, 0, 7, 0,153, 2, 90, 0, 2, 0, 4, 0,154, 2, 4, 0, 17, 0, 83, 0, 7, 0,
+ 7, 0,135, 2, 47, 0,134, 2, 0, 0, 19, 0, 0, 0,137, 2, 2, 0, 70, 1, 2, 0,138, 2, 2, 0,139, 2, 99, 0, 1, 0,
+ 7, 0,155, 2,100, 0, 1, 0, 4, 0,156, 2,101, 0, 1, 0, 0, 0,157, 2,102, 0, 1, 0, 7, 0,135, 2,103, 0, 3, 0,
+ 4, 0,158, 2, 0, 0, 92, 0, 7, 0,159, 2,105, 0, 4, 0, 7, 0,236, 0, 7, 0,182, 0, 7, 0,183, 0, 7, 0,184, 0,
+106, 0, 1, 0,105, 0,136, 2,107, 0, 5, 0, 4, 0,160, 2, 4, 0,161, 2, 0, 0, 19, 0, 0, 0, 43, 2, 0, 0, 69, 2,
+108, 0, 2, 0, 4, 0,162, 2, 4, 0,161, 2,109, 0, 10, 0,109, 0, 0, 0,109, 0, 1, 0,107, 0,163, 2,106, 0,164, 2,
+108, 0,165, 2, 4, 0, 54, 0, 4, 0,124, 2, 4, 0,123, 2, 4, 0, 37, 0, 85, 0,166, 2, 93, 0, 14, 0, 12, 0,167, 2,
+ 85, 0,166, 2, 0, 0,168, 2, 0, 0,169, 2, 0, 0,170, 2, 0, 0,171, 2, 0, 0,172, 2, 0, 0,173, 2, 0, 0,174, 2,
+ 0, 0, 19, 0, 92, 0,120, 2, 92, 0,122, 2, 2, 0,175, 2, 0, 0,176, 2, 94, 0, 8, 0, 4, 0,177, 2, 4, 0,178, 2,
+ 82, 0,179, 2, 86, 0,180, 2, 4, 0,124, 2, 4, 0,123, 2, 4, 0, 54, 0, 4, 0, 37, 0,110, 0, 7, 0,110, 0, 0, 0,
+110, 0, 1, 0, 4, 0, 17, 0, 4, 0, 70, 1, 0, 0, 20, 0, 46, 0,134, 0, 0, 0,181, 2,111, 0, 7, 0,110, 0,182, 2,
+ 2, 0,183, 2, 2, 0,167, 2, 2, 0,184, 2, 2, 0, 90, 0, 9, 0,185, 2, 9, 0,186, 2,112, 0, 3, 0,110, 0,182, 2,
+ 32, 0,164, 0, 0, 0, 20, 0,113, 0, 5, 0,110, 0,182, 2, 32, 0,164, 0, 0, 0, 20, 0, 2, 0,187, 2, 0, 0,188, 2,
+114, 0, 5, 0,110, 0,182, 2, 7, 0, 88, 0, 7, 0,189, 2, 4, 0,190, 2, 4, 0,191, 2,115, 0, 5, 0,110, 0,182, 2,
+ 32, 0,192, 2, 0, 0, 72, 0, 4, 0, 70, 1, 4, 0, 19, 0,116, 0, 13, 0,110, 0,182, 2, 32, 0,193, 2, 32, 0,194, 2,
+ 32, 0,195, 2, 32, 0,196, 2, 7, 0,197, 2, 7, 0,198, 2, 7, 0,189, 2, 7, 0,199, 2, 4, 0,200, 2, 4, 0,201, 2,
+ 4, 0, 90, 0, 4, 0,202, 2,117, 0, 5, 0,110, 0,182, 2, 2, 0,203, 2, 2, 0, 19, 0, 7, 0,204, 2, 32, 0,205, 2,
+118, 0, 3, 0,110, 0,182, 2, 7, 0,206, 2, 4, 0, 90, 0,119, 0, 10, 0,110, 0,182, 2, 7, 0,207, 2, 4, 0,208, 2,
+ 4, 0, 37, 0, 2, 0, 90, 0, 2, 0,209, 2, 2, 0,210, 2, 2, 0,211, 2, 7, 0,212, 2, 0, 0,213, 2,120, 0, 3, 0,
+110, 0,182, 2, 7, 0, 37, 0, 4, 0, 17, 0,121, 0, 6, 0,110, 0,182, 2,122, 0,214, 2,123, 0,215, 2,124, 0,216, 2,
+ 7, 0,217, 2, 4, 0, 17, 0,125, 0, 11, 0,110, 0,182, 2, 52, 0,218, 2, 7, 0,219, 2, 4, 0,220, 2, 0, 0,213, 2,
+ 7, 0,221, 2, 4, 0,222, 2, 32, 0,223, 2, 0, 0,224, 2, 4, 0,225, 2, 4, 0, 37, 0,126, 0, 10, 0,110, 0,182, 2,
+ 32, 0,226, 2, 47, 0,227, 2, 4, 0, 90, 0, 4, 0,228, 2, 7, 0,229, 2, 7, 0,230, 2, 0, 0,224, 2, 4, 0,225, 2,
+ 4, 0, 37, 0,127, 0, 3, 0,110, 0,182, 2, 7, 0,231, 2, 4, 0,232, 2,128, 0, 5, 0,110, 0,182, 2, 7, 0,233, 2,
+ 0, 0,213, 2, 2, 0, 19, 0, 2, 0,234, 2,129, 0, 8, 0,110, 0,182, 2, 32, 0,164, 0, 7, 0,233, 2, 7, 0,251, 0,
+ 7, 0,106, 0, 0, 0,213, 2, 2, 0, 19, 0, 2, 0, 17, 0,130, 0, 21, 0,110, 0,182, 2, 32, 0,235, 2, 0, 0,213, 2,
+ 52, 0,218, 2, 32, 0,223, 2, 2, 0, 19, 0, 2, 0, 37, 0, 7, 0,236, 2, 7, 0,237, 2, 7, 0,238, 2, 7, 0, 73, 2,
+ 7, 0,239, 2, 7, 0,240, 2, 7, 0,241, 2, 7, 0,242, 2, 4, 0,222, 2, 4, 0,225, 2, 0, 0,224, 2, 7, 0,243, 2,
+ 7, 0,244, 2, 7, 0, 43, 0,131, 0, 7, 0,110, 0,182, 2, 2, 0,245, 2, 2, 0,246, 2, 4, 0, 70, 0, 32, 0,164, 0,
+ 7, 0,247, 2, 0, 0,213, 2,132, 0, 10, 0,110, 0,182, 2, 32, 0,164, 0, 0, 0,248, 2, 7, 0,249, 2, 7, 0,250, 2,
+ 7, 0,242, 2, 4, 0,251, 2, 4, 0,252, 2, 7, 0,253, 2, 0, 0, 20, 0,133, 0, 1, 0,110, 0,182, 2,134, 0, 7, 0,
+110, 0,182, 2, 46, 0,134, 0,135, 0,254, 2,136, 0,255, 2,137, 0, 0, 3,138, 0, 1, 3, 12, 0, 2, 3,139, 0, 13, 0,
+110, 0,182, 2, 85, 0, 3, 3, 85, 0, 4, 3, 85, 0, 5, 3, 85, 0, 6, 3, 85, 0, 7, 3, 85, 0, 8, 3, 82, 0, 9, 3,
+ 4, 0, 10, 3, 4, 0, 11, 3, 7, 0,217, 2, 7, 0, 37, 0,140, 0, 12, 3,141, 0, 7, 0,110, 0,182, 2, 85, 0, 3, 3,
+ 85, 0, 13, 3,142, 0, 14, 3,143, 0, 12, 3, 4, 0, 15, 3, 4, 0, 10, 3,144, 0, 4, 0,110, 0,182, 2, 32, 0,164, 0,
+ 4, 0, 16, 3, 4, 0, 37, 0,145, 0, 2, 0, 4, 0, 17, 3, 7, 0, 35, 2,146, 0, 2, 0, 4, 0,125, 0, 4, 0, 18, 3,
+147, 0, 20, 0,110, 0,182, 2, 32, 0,164, 0, 0, 0,213, 2, 2, 0, 19, 3, 2, 0, 20, 3, 2, 0, 19, 0, 2, 0, 37, 0,
+ 7, 0, 21, 3, 7, 0, 22, 3, 4, 0, 54, 0, 4, 0, 23, 3,146, 0, 24, 3,145, 0, 25, 3, 4, 0, 26, 3, 4, 0, 27, 3,
+ 4, 0, 28, 3, 4, 0, 18, 3, 7, 0, 29, 3, 7, 0, 30, 3, 7, 0, 31, 3,148, 0, 8, 0,110, 0,182, 2, 59, 0,255, 0,
+142, 0, 14, 3, 4, 0, 32, 3, 4, 0, 33, 3, 4, 0, 34, 3, 2, 0, 19, 0, 2, 0, 57, 0,149, 0, 8, 0,110, 0,182, 2,
+ 32, 0, 45, 0, 2, 0, 35, 3, 2, 0, 19, 0, 2, 0,203, 2, 2, 0, 57, 0, 7, 0, 36, 3, 7, 0, 37, 3,150, 0, 5, 0,
+110, 0,182, 2, 4, 0, 38, 3, 2, 0, 19, 0, 2, 0, 39, 3, 7, 0, 40, 3,151, 0, 7, 0,110, 0,182, 2, 85, 0, 41, 3,
+ 4, 0, 42, 3, 0, 0, 43, 3, 0, 0, 44, 3, 0, 0, 45, 3, 0, 0, 46, 3,152, 0, 3, 0,110, 0,182, 2,153, 0, 47, 3,
+138, 0, 1, 3,154, 0, 10, 0,110, 0,182, 2, 32, 0, 48, 3, 32, 0, 49, 3, 0, 0, 50, 3, 7, 0, 51, 3, 2, 0, 52, 3,
+ 2, 0, 53, 3, 0, 0, 54, 3, 0, 0, 55, 3, 0, 0,188, 2,155, 0, 9, 0,110, 0,182, 2, 32, 0, 56, 3, 0, 0, 50, 3,
+ 7, 0, 57, 3, 7, 0, 58, 3, 0, 0, 70, 1, 0, 0,203, 2, 0, 0, 59, 3, 0, 0, 37, 0,156, 0, 27, 0, 27, 0, 31, 0,
+ 2, 0, 44, 2, 2, 0, 45, 2, 2, 0, 60, 3, 2, 0, 19, 0, 2, 0, 61, 3, 2, 0, 62, 3, 2, 0, 63, 3, 2, 0, 70, 0,
+ 0, 0, 64, 3, 0, 0, 65, 3, 0, 0, 66, 3, 0, 0, 17, 0, 4, 0, 37, 0, 7, 0, 67, 3, 7, 0, 68, 3, 7, 0, 69, 3,
+ 7, 0, 70, 3, 7, 0, 71, 3, 7, 0, 72, 3, 34, 0, 73, 3, 36, 0, 80, 0, 38, 0, 65, 2, 87, 0,114, 2, 7, 0, 74, 3,
+ 7, 0, 75, 3,156, 0, 76, 3,157, 0, 3, 0,157, 0, 0, 0,157, 0, 1, 0, 0, 0, 20, 0, 72, 0, 3, 0, 7, 0, 77, 3,
+ 4, 0, 19, 0, 4, 0, 37, 0, 32, 0,120, 0, 27, 0, 31, 0, 39, 0, 75, 0,158, 0, 78, 3, 2, 0, 17, 0, 2, 0, 79, 3,
+ 4, 0, 80, 3, 4, 0, 81, 3, 4, 0, 82, 3, 0, 0, 83, 3, 32, 0, 38, 0, 32, 0, 84, 3, 32, 0, 85, 3, 32, 0, 86, 3,
+ 32, 0, 87, 3, 36, 0, 80, 0, 78, 0, 64, 2, 72, 0, 5, 2,159, 0, 88, 3,159, 0, 89, 3,160, 0, 90, 3, 9, 0, 2, 0,
+161, 0, 91, 3, 12, 0, 92, 3, 12, 0,108, 2, 12, 0, 24, 2, 12, 0, 93, 3, 12, 0, 94, 3, 4, 0, 70, 1, 4, 0, 95, 3,
+ 67, 0, 26, 2, 0, 0, 96, 3, 4, 0, 28, 2, 4, 0, 97, 3, 7, 0, 65, 1, 7, 0, 98, 3, 7, 0, 99, 3, 7, 0,172, 0,
+ 7, 0,100, 3, 7, 0, 66, 1, 7, 0,101, 3, 7, 0, 14, 2, 7, 0,102, 3, 7, 0,103, 3, 7, 0,249, 2, 7, 0,104, 3,
+ 7, 0,240, 0, 4, 0,105, 3, 2, 0, 19, 0, 2, 0,106, 3, 2, 0,107, 3, 2, 0,108, 3, 2, 0,109, 3, 2, 0,110, 3,
+ 2, 0,111, 3, 2, 0,112, 3, 2, 0,113, 3, 2, 0,114, 3, 2, 0,115, 3, 2, 0,116, 3, 4, 0,117, 3, 4, 0,118, 3,
+ 4, 0,119, 3, 4, 0,120, 3, 7, 0,121, 3, 7, 0,100, 2, 7, 0,122, 3, 7, 0,123, 3, 7, 0,124, 3, 7, 0,125, 3,
+ 7, 0,126, 3, 7, 0,215, 0, 7, 0,127, 3, 7, 0,128, 3, 7, 0,129, 3, 7, 0,130, 3, 2, 0,131, 3, 0, 0,132, 3,
+ 0, 0,133, 3, 0, 0,134, 3, 0, 0,135, 3, 7, 0,136, 3, 7, 0,137, 3, 12, 0,138, 3, 12, 0,139, 3, 12, 0,140, 3,
+ 12, 0,141, 3, 7, 0,142, 3, 2, 0,154, 2, 2, 0,143, 3, 7, 0,136, 2, 4, 0,144, 3, 4, 0,145, 3,162, 0,146, 3,
+ 2, 0,147, 3, 2, 0,247, 0, 7, 0,148, 3, 12, 0,149, 3, 12, 0,150, 3, 12, 0,151, 3, 12, 0,152, 3,163, 0, 62, 1,
+164, 0,153, 3, 68, 0,154, 3, 2, 0,155, 3, 2, 0,156, 3, 2, 0,157, 3, 2, 0,158, 3, 7, 0,128, 2, 2, 0,159, 3,
+ 2, 0,160, 3,153, 0,161, 3,142, 0,162, 3,142, 0,163, 3, 4, 0,164, 3, 4, 0,165, 3, 4, 0,166, 3, 4, 0, 70, 0,
+ 12, 0,167, 3, 12, 0,168, 3, 12, 0,169, 3,165, 0, 14, 0,165, 0, 0, 0,165, 0, 1, 0, 32, 0, 38, 0, 7, 0,249, 2,
+ 7, 0, 67, 1, 7, 0,250, 2, 7, 0,242, 2, 0, 0, 20, 0, 4, 0,251, 2, 4, 0,252, 2, 4, 0,170, 3, 2, 0, 17, 0,
+ 2, 0,171, 3, 7, 0,253, 2,166, 0, 12, 0,166, 0, 0, 0,166, 0, 1, 0, 32, 0, 45, 0, 4, 0,172, 3, 4, 0,154, 2,
+ 4, 0,173, 3, 4, 0, 17, 0, 4, 0,174, 3, 7, 0, 67, 1, 7, 0,175, 3, 7, 0,176, 3, 7, 0,152, 2,163, 0, 41, 0,
+ 2, 0,177, 3, 2, 0,178, 3, 2, 0, 19, 0, 2, 0,242, 2, 2, 0,179, 3, 2, 0,180, 3, 2, 0,181, 3, 2, 0,182, 3,
+ 2, 0,183, 3, 2, 0, 57, 0, 7, 0,184, 3, 7, 0,185, 3, 7, 0,186, 3, 7, 0,187, 3, 7, 0,188, 3, 7, 0,189, 3,
+ 7, 0,190, 3, 7, 0,191, 3, 7, 0,192, 3, 7, 0,193, 3, 7, 0,194, 3, 7, 0,195, 3, 7, 0,196, 3, 7, 0,197, 3,
+ 7, 0,198, 3, 7, 0,199, 3, 7, 0, 37, 0, 7, 0,200, 3, 7, 0,201, 3, 7, 0,202, 3, 7, 0,203, 3, 7, 0,204, 3,
+ 7, 0,205, 3, 7, 0,206, 3, 7, 0,207, 3, 7, 0,208, 3, 7, 0,209, 3, 52, 0,165, 0,167, 0,210, 3, 7, 0,211, 3,
+ 4, 0,191, 2,168, 0, 5, 0, 68, 0,240, 1, 7, 0,212, 3, 7, 0,213, 3, 2, 0, 19, 0, 2, 0,214, 3,169, 0, 9, 0,
+169, 0, 0, 0,169, 0, 1, 0, 4, 0,215, 3, 4, 0,216, 3, 4, 0,217, 3, 4, 0, 19, 0, 4, 0,218, 3, 9, 0,219, 3,
+ 9, 0,220, 3,138, 0, 19, 0,138, 0, 0, 0,138, 0, 1, 0, 4, 0, 19, 0, 4, 0,221, 3, 4, 0,222, 3, 4, 0,223, 3,
+ 4, 0,224, 3, 4, 0,225, 3, 4, 0,226, 3, 4, 0,216, 3, 4, 0,154, 2, 4, 0, 57, 0, 0, 0,227, 3, 0, 0,228, 3,
+ 0, 0,229, 3, 0, 0,230, 3, 12, 0,231, 3,170, 0,232, 3, 9, 0,233, 3,171, 0, 1, 0, 7, 0, 42, 2,162, 0, 30, 0,
+ 4, 0, 19, 0, 7, 0,234, 3, 7, 0,235, 3, 7, 0,236, 3, 4, 0,237, 3, 4, 0,238, 3, 4, 0,239, 3, 4, 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, 7, 0,247, 3, 7, 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, 1, 4, 7, 0, 2, 4, 4, 0, 3, 4, 4, 0, 4, 4, 7, 0, 5, 4, 7, 0,127, 3,164, 0, 50, 0, 4, 0,216, 3,
+ 4, 0, 6, 4,172, 0, 7, 4,173, 0, 8, 4, 0, 0, 37, 0, 0, 0, 9, 4, 2, 0, 10, 4, 7, 0, 11, 4, 0, 0, 12, 4,
+ 7, 0, 13, 4, 7, 0, 14, 4, 7, 0, 15, 4, 7, 0, 16, 4, 7, 0, 17, 4, 7, 0, 18, 4, 7, 0, 19, 4, 7, 0, 20, 4,
+ 7, 0, 21, 4, 2, 0, 22, 4, 0, 0, 23, 4, 2, 0, 24, 4, 7, 0, 25, 4, 7, 0, 26, 4, 0, 0, 27, 4, 4, 0,126, 0,
+ 4, 0, 28, 4, 4, 0, 29, 4, 2, 0, 30, 4, 2, 0, 31, 4,171, 0, 32, 4, 4, 0, 33, 4, 4, 0, 82, 0, 7, 0, 34, 4,
+ 7, 0, 35, 4, 7, 0, 36, 4, 7, 0, 37, 4, 2, 0, 38, 4, 2, 0, 39, 4, 2, 0, 40, 4, 2, 0, 41, 4, 2, 0, 42, 4,
+ 2, 0, 43, 4, 2, 0, 44, 4, 2, 0, 45, 4,174, 0, 46, 4, 7, 0, 47, 4, 7, 0, 48, 4,138, 0, 49, 4, 12, 0, 2, 3,
+168, 0, 50, 4,153, 0, 49, 0,152, 0, 51, 4, 2, 0, 17, 0, 2, 0, 52, 4, 2, 0, 53, 4, 2, 0, 54, 4, 7, 0, 55, 4,
+ 2, 0, 56, 4, 2, 0, 57, 4, 7, 0, 58, 4, 2, 0, 59, 4, 2, 0, 60, 4, 7, 0, 61, 4, 7, 0, 62, 4, 7, 0, 63, 4,
+ 7, 0, 64, 4, 7, 0, 65, 4, 7, 0, 66, 4, 4, 0, 67, 4, 7, 0, 68, 4, 7, 0, 69, 4, 7, 0, 70, 4, 81, 0, 71, 4,
+ 81, 0, 72, 4, 81, 0, 73, 4, 0, 0, 74, 4, 7, 0, 75, 4, 7, 0, 76, 4, 36, 0, 80, 0, 2, 0, 77, 4, 0, 0, 78, 4,
+ 0, 0, 79, 4, 7, 0, 80, 4, 4, 0, 81, 4, 7, 0, 82, 4, 7, 0, 83, 4, 4, 0, 84, 4, 4, 0, 19, 0, 7, 0, 85, 4,
+ 7, 0, 86, 4, 7, 0, 87, 4, 85, 0, 88, 4, 7, 0, 89, 4, 7, 0, 90, 4, 7, 0, 91, 4, 7, 0, 92, 4, 7, 0, 93, 4,
+ 7, 0, 94, 4, 7, 0, 95, 4, 4, 0, 96, 4,175, 0, 73, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0,175, 0, 2, 0, 71, 1,
+ 2, 0,103, 1, 2, 0, 97, 4, 7, 0, 98, 4, 7, 0, 99, 4, 7, 0,100, 4, 7, 0,101, 4, 7, 0,102, 4, 7, 0,103, 4,
+ 7, 0,104, 4, 7, 0,105, 4, 7, 0,161, 1, 7, 0,163, 1, 7, 0,162, 1, 7, 0,106, 4, 4, 0,107, 4, 7, 0,108, 4,
+ 7, 0,109, 4, 7, 0,110, 4, 7, 0,111, 4, 7, 0,112, 4, 7, 0,113, 4, 7, 0,114, 4, 2, 0,115, 4, 2, 0, 70, 1,
+ 2, 0,116, 4, 2, 0,117, 4, 2, 0,118, 4, 2, 0,119, 4, 2, 0,120, 4, 2, 0,121, 4, 7, 0,122, 4, 7, 0,123, 4,
+ 7, 0,124, 4, 7, 0,125, 4, 7, 0,126, 4, 7, 0,127, 4, 7, 0,128, 4, 7, 0,129, 4, 7, 0,130, 4, 7, 0,131, 4,
+ 7, 0,132, 4, 7, 0,133, 4, 2, 0,134, 4, 2, 0,135, 4, 2, 0,136, 4, 2, 0,137, 4, 7, 0,138, 4, 7, 0,139, 4,
+ 7, 0,140, 4, 7, 0,141, 4, 2, 0,142, 4, 2, 0,143, 4, 2, 0,144, 4, 2, 0,145, 4, 7, 0,146, 4, 7, 0,147, 4,
+ 7, 0,148, 4, 7, 0,149, 4, 2, 0,150, 4, 2, 0,151, 4, 2, 0,152, 4, 2, 0, 19, 0, 7, 0,153, 4, 7, 0,154, 4,
+ 36, 0, 80, 0, 51, 0,133, 1, 2, 0,134, 1, 2, 0,135, 1, 30, 0,150, 0,176, 0, 8, 0,176, 0, 0, 0,176, 0, 1, 0,
+ 4, 0,105, 3, 4, 0,155, 4, 4, 0, 19, 0, 2, 0,156, 4, 2, 0,157, 4, 32, 0,164, 0,177, 0, 13, 0, 9, 0,158, 4,
+ 9, 0,159, 4, 4, 0,160, 4, 4, 0,161, 4, 4, 0,162, 4, 4, 0,163, 4, 4, 0,164, 4, 4, 0,165, 4, 4, 0,166, 4,
+ 4, 0,167, 4, 4, 0,168, 4, 4, 0, 37, 0, 0, 0,169, 4,178, 0, 5, 0, 9, 0,170, 4, 9, 0,171, 4, 4, 0,172, 4,
+ 4, 0, 70, 0, 0, 0,173, 4,179, 0, 15, 0, 4, 0, 17, 0, 4, 0,174, 4, 4, 0,175, 4, 4, 0,176, 4, 4, 0,177, 4,
+ 4, 0,178, 4, 7, 0,179, 4, 4, 0,180, 4, 4, 0, 90, 0, 4, 0,181, 4, 4, 0,182, 4, 4, 0,183, 4, 4, 0,184, 4,
+ 4, 0,185, 4, 26, 0, 30, 0,180, 0, 7, 0, 4, 0,186, 4, 7, 0,187, 4, 7, 0,188, 4, 7, 0,189, 4, 4, 0,190, 4,
+ 2, 0, 19, 0, 2, 0, 37, 0,181, 0, 11, 0,181, 0, 0, 0,181, 0, 1, 0, 0, 0, 20, 0, 67, 0,191, 4, 68, 0,192, 4,
+ 4, 0,105, 3, 4, 0,193, 4, 4, 0,194, 4, 4, 0, 37, 0, 4, 0,195, 4, 4, 0,196, 4,182, 0,131, 0,177, 0,197, 4,
+178, 0,198, 4,179, 0,199, 4, 4, 0, 15, 3, 4, 0,126, 0, 4, 0, 28, 4, 4, 0,200, 4, 4, 0,201, 4, 4, 0,202, 4,
+ 4, 0,203, 4, 2, 0, 19, 0, 2, 0,204, 4, 7, 0,100, 2, 7, 0,205, 4, 7, 0,206, 4, 7, 0,207, 4, 7, 0,208, 4,
+ 7, 0,209, 4, 2, 0,210, 4, 2, 0,211, 4, 2, 0,212, 4, 2, 0,213, 4, 2, 0,246, 0, 2, 0,214, 4, 2, 0,215, 4,
+ 2, 0,216, 4, 2, 0,217, 4, 2, 0,218, 4, 2, 0, 90, 1, 2, 0,106, 0, 2, 0,219, 4, 2, 0,220, 4, 2, 0,221, 4,
+ 2, 0,222, 4, 2, 0,223, 4, 2, 0,224, 4, 2, 0,225, 4, 2, 0,226, 4, 2, 0,227, 4, 2, 0, 91, 1, 2, 0,228, 4,
+ 2, 0,229, 4, 2, 0,230, 4, 2, 0,231, 4, 4, 0,232, 4, 4, 0, 70, 1, 2, 0,233, 4, 2, 0,234, 4, 2, 0,235, 4,
+ 2, 0,236, 4, 2, 0,237, 4, 2, 0,238, 4, 24, 0,239, 4, 24, 0,240, 4, 23, 0,241, 4, 12, 0,242, 4, 2, 0,243, 4,
+ 2, 0, 37, 0, 7, 0,244, 4, 7, 0,245, 4, 7, 0,246, 4, 7, 0,247, 4, 4, 0,248, 4, 7, 0,249, 4, 7, 0,250, 4,
+ 7, 0,251, 4, 7, 0,252, 4, 2, 0,253, 4, 2, 0,254, 4, 2, 0,255, 4, 2, 0, 0, 5, 2, 0, 1, 5, 2, 0, 2, 5,
+ 7, 0, 3, 5, 7, 0, 4, 5, 7, 0, 5, 5, 2, 0, 6, 5, 2, 0, 7, 5, 2, 0, 8, 5, 2, 0, 9, 5, 2, 0, 10, 5,
+ 2, 0, 11, 5, 2, 0, 12, 5, 2, 0, 13, 5, 2, 0, 14, 5, 2, 0, 15, 5, 4, 0, 16, 5, 4, 0, 17, 5, 4, 0, 18, 5,
+ 4, 0, 19, 5, 4, 0, 20, 5, 7, 0, 21, 5, 4, 0, 22, 5, 4, 0, 23, 5, 4, 0, 24, 5, 4, 0, 25, 5, 7, 0, 26, 5,
+ 7, 0, 27, 5, 7, 0, 28, 5, 7, 0, 29, 5, 7, 0, 30, 5, 7, 0, 31, 5, 7, 0, 32, 5, 7, 0, 33, 5, 7, 0, 34, 5,
+ 0, 0, 35, 5, 0, 0, 36, 5, 4, 0, 37, 5, 2, 0, 38, 5, 2, 0,237, 1, 0, 0, 39, 5, 7, 0, 40, 5, 7, 0, 41, 5,
+ 4, 0, 42, 5, 4, 0, 43, 5, 7, 0, 44, 5, 7, 0, 45, 5, 2, 0, 46, 5, 2, 0, 47, 5, 7, 0, 48, 5, 2, 0, 49, 5,
+ 2, 0, 50, 5, 4, 0, 51, 5, 2, 0, 52, 5, 2, 0, 53, 5, 2, 0, 54, 5, 2, 0, 55, 5, 7, 0, 56, 5, 7, 0, 70, 0,
+ 42, 0, 57, 5, 0, 0, 58, 5,183, 0, 9, 0,183, 0, 0, 0,183, 0, 1, 0, 0, 0, 20, 0, 2, 0, 59, 5, 2, 0, 60, 5,
+ 2, 0, 61, 5, 2, 0, 43, 0, 7, 0, 62, 5, 7, 0, 70, 0,184, 0, 7, 0, 2, 0,208, 2, 2, 0, 70, 1, 2, 0,109, 0,
+ 2, 0, 63, 5, 7, 0, 64, 5, 7, 0, 70, 0, 42, 0, 65, 5,185, 0, 5, 0, 7, 0, 66, 5, 0, 0, 17, 0, 0, 0, 43, 0,
+ 0, 0, 70, 0, 0, 0,237, 1,186, 0, 26, 0, 7, 0,113, 4, 7, 0,114, 4, 2, 0, 70, 1, 2, 0, 19, 0, 2, 0, 67, 5,
+ 2, 0,135, 1, 2, 0,116, 4, 2, 0,117, 4, 2, 0,118, 4, 2, 0,119, 4, 2, 0,120, 4, 2, 0,121, 4,185, 0, 68, 5,
+ 2, 0,210, 4, 2, 0,211, 4, 2, 0,212, 4, 2, 0,213, 4, 2, 0,246, 0, 2, 0,214, 4, 2, 0,215, 4, 2, 0,216, 4,
+184, 0, 69, 5, 2, 0, 70, 5, 2, 0,217, 4, 2, 0,220, 4, 2, 0,221, 4,187, 0, 5, 0,187, 0, 0, 0,187, 0, 1, 0,
+ 4, 0,215, 3, 0, 0,227, 3, 4, 0, 19, 0,188, 0, 6, 0,189, 0, 71, 5, 4, 0, 72, 5, 4, 0, 73, 5, 9, 0, 74, 5,
+ 0, 0, 75, 5, 4, 0, 37, 0,190, 0, 6, 0,188, 0, 76, 5, 2, 0, 19, 0, 2, 0, 77, 5, 2, 0, 78, 5, 2, 0, 79, 5,
+ 9, 0, 80, 5,191, 0, 4, 0, 2, 0,106, 0, 2, 0,219, 2, 2, 0,221, 3, 2, 0, 81, 5,192, 0, 14, 0, 2, 0, 19, 0,
+ 2, 0, 82, 5, 2, 0, 83, 5, 2, 0, 84, 5,191, 0, 85, 5, 9, 0, 80, 5, 7, 0, 86, 5, 7, 0, 57, 0, 4, 0, 87, 5,
+ 4, 0, 88, 5, 4, 0, 89, 5, 4, 0, 90, 5, 46, 0,134, 0, 32, 0,164, 0,193, 0, 4, 0,193, 0, 0, 0,193, 0, 1, 0,
+ 0, 0, 91, 5, 7, 0, 92, 5,194, 0, 6, 0,188, 0, 76, 5, 7, 0, 93, 5, 4, 0, 90, 0, 0, 0, 94, 5, 0, 0, 95, 5,
+ 0, 0,188, 2,195, 0, 9, 0,188, 0, 76, 5, 7, 0, 96, 5, 7, 0, 97, 5, 2, 0, 70, 1, 2, 0, 19, 0, 4, 0, 36, 0,
+ 4, 0, 98, 5, 87, 0, 99, 5, 9, 0, 80, 5,196, 0, 72, 0,195, 0,100, 5,195, 0,101, 5,194, 0, 78, 3, 7, 0,102, 5,
+ 2, 0,103, 5, 2, 0,104, 5, 7, 0,105, 5, 7, 0,106, 5, 2, 0,221, 3, 2, 0,107, 5, 7, 0,108, 5, 7, 0,109, 5,
+ 7, 0,110, 5, 2, 0,111, 5, 2, 0, 87, 5, 2, 0,112, 5, 2, 0,113, 5, 2, 0,114, 5, 2, 0,115, 5, 7, 0,116, 5,
+ 7, 0,117, 5, 7, 0,118, 5, 2, 0,119, 5, 2, 0,120, 5, 2, 0,121, 5, 2, 0,122, 5, 2, 0,123, 5, 2, 0,124, 5,
+ 2, 0,125, 5,190, 0,126, 5,192, 0,127, 5, 7, 0,128, 5, 7, 0,129, 5, 7, 0,130, 5, 2, 0,131, 5, 2, 0,132, 5,
+ 0, 0,133, 5, 0, 0,134, 5, 0, 0,135, 5, 0, 0,136, 5, 0, 0,137, 5, 0, 0,138, 5, 2, 0,139, 5, 7, 0,140, 5,
+ 7, 0,141, 5, 7, 0,142, 5, 7, 0,143, 5, 7, 0,144, 5, 7, 0,145, 5, 7, 0,146, 5, 7, 0,147, 5, 7, 0,148, 5,
+ 7, 0,149, 5, 2, 0,150, 5, 0, 0,151, 5, 0, 0,152, 5, 0, 0,153, 5, 0, 0,154, 5, 32, 0,155, 5, 0, 0,156, 5,
+ 0, 0,157, 5, 0, 0,158, 5, 0, 0,159, 5, 0, 0,160, 5, 0, 0,161, 5, 0, 0,162, 5, 0, 0,163, 5, 2, 0,164, 5,
+ 2, 0,165, 5, 2, 0,166, 5, 2, 0,167, 5, 2, 0,168, 5,197, 0, 8, 0, 4, 0,169, 5, 4, 0,170, 5, 4, 0,171, 5,
+ 4, 0,172, 5, 4, 0,173, 5, 4, 0,174, 5, 4, 0, 54, 0, 4, 0,124, 2,198, 0, 3, 0, 7, 0,175, 5, 2, 0,176, 5,
+ 2, 0, 19, 0,199, 0, 2, 0, 7, 0,177, 5, 4, 0, 19, 0, 46, 0, 38, 0, 27, 0, 31, 0, 39, 0, 75, 0, 32, 0,178, 5,
+175, 0,179, 5, 46, 0,180, 5, 47, 0,238, 0, 12, 0,181, 5,176, 0,182, 5, 32, 0,183, 5, 7, 0,184, 5, 7, 0,185, 5,
+ 7, 0,186, 5, 7, 0,187, 5, 4, 0,105, 3, 2, 0, 19, 0, 2, 0, 64, 1, 61, 0, 59, 1,200, 0,188, 5,196, 0,189, 5,
+201, 0,190, 5,182, 0,182, 0,180, 0,191, 5, 12, 0,100, 0, 12, 0,192, 5, 12, 0,193, 5,202, 0,194, 5, 2, 0,195, 5,
+ 2, 0,196, 5, 2, 0,247, 0, 2, 0,197, 5, 4, 0,198, 5, 4, 0,199, 5, 12, 0,200, 5,185, 0, 68, 5,186, 0,201, 5,
+198, 0,202, 5,161, 0, 91, 3,199, 0,203, 5,203, 0, 6, 0, 47, 0,238, 0, 45, 0, 58, 1, 7, 0, 88, 2, 7, 0, 89, 2,
+ 7, 0,106, 0, 7, 0,204, 5,204, 0, 35, 0, 7, 0,205, 5, 7, 0,206, 5, 7, 0,207, 5, 7, 0,208, 5, 7, 0,209, 5,
+ 7, 0,210, 5, 7, 0,211, 5, 7, 0,212, 5, 7, 0,213, 5, 7, 0, 77, 1, 7, 0,214, 5, 7, 0,215, 5, 7, 0,216, 5,
+ 7, 0,217, 5, 7, 0,171, 0, 2, 0,218, 5, 2, 0,219, 5, 2, 0, 69, 2, 2, 0,220, 5, 2, 0,221, 5, 2, 0,222, 5,
+ 2, 0,223, 5, 7, 0,224, 5, 72, 0,225, 5,161, 0, 91, 3,204, 0,226, 5,205, 0,227, 5,206, 0,228, 5,207, 0,229, 5,
+208, 0,230, 5,209, 0,231, 5, 7, 0,232, 5, 2, 0,233, 5, 2, 0,234, 5, 4, 0,237, 1,210, 0, 54, 0,211, 0, 0, 0,
+211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5, 2, 0,238, 5, 7, 0,213, 5, 7, 0, 77, 1, 7, 0, 43, 0,
+ 4, 0,239, 5, 2, 0,222, 5, 2, 0,223, 5, 32, 0,178, 5, 32, 0,240, 5,203, 0,241, 5,210, 0,226, 5, 0, 0,242, 5,
+ 4, 0,105, 3, 4, 0,243, 5, 2, 0,244, 5, 2, 0, 70, 0, 2, 0,245, 5, 2, 0,246, 5, 2, 0,237, 1, 2, 0, 19, 0,
+ 2, 0, 27, 2, 2, 0,247, 5, 7, 0,112, 0, 7, 0,248, 5, 7, 0,249, 5, 7, 0,250, 5, 7, 0,251, 5, 7, 0,252, 5,
+ 7, 0,171, 0, 7, 0,184, 5, 2, 0,253, 5, 2, 0,120, 1, 2, 0,254, 5, 2, 0,255, 5, 2, 0, 0, 6, 2, 0, 1, 6,
+ 2, 0, 2, 6, 2, 0, 3, 6, 2, 0, 4, 6, 2, 0, 5, 6, 4, 0, 6, 6, 12, 0, 7, 6, 2, 0, 8, 6, 2, 0,137, 2,
+ 2, 0, 9, 6, 0, 0, 10, 6, 0, 0, 11, 6, 9, 0, 12, 6,161, 0, 91, 3,212, 0, 25, 0, 24, 0, 36, 0, 24, 0, 64, 0,
+ 23, 0, 13, 6, 23, 0, 14, 6, 23, 0, 15, 6, 7, 0, 16, 6, 7, 0, 17, 6, 7, 0, 18, 6, 7, 0, 19, 6, 2, 0, 20, 6,
+ 2, 0, 21, 6, 2, 0, 22, 6, 2, 0, 23, 6, 2, 0, 24, 6, 2, 0, 19, 0, 2, 0, 25, 6, 2, 0, 26, 6, 2, 0, 27, 6,
+ 2, 0, 28, 6, 2, 0, 29, 6, 2, 0,246, 5, 7, 0, 30, 6, 7, 0, 31, 6, 4, 0, 32, 6, 4, 0, 33, 6,211, 0, 6, 0,
+211, 0, 0, 0,211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5, 2, 0,238, 5,213, 0, 8, 0,211, 0, 0, 0,
+211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5, 2, 0,238, 5,214, 0, 34, 6, 46, 0,134, 0,215, 0, 14, 0,
+211, 0, 0, 0,211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5, 2, 0,238, 5,212, 0, 35, 6,216, 0, 36, 6,
+ 12, 0, 37, 6, 2, 0, 70, 1, 2, 0, 19, 0, 2, 0, 38, 6, 0, 0, 39, 6, 0, 0, 40, 6,217, 0, 20, 0,211, 0, 0, 0,
+211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5, 2, 0,238, 5,205, 0,227, 5,212, 0, 35, 6, 2, 0, 41, 6,
+ 2, 0, 42, 6, 2, 0, 43, 6, 2, 0, 44, 6, 2, 0, 25, 6, 2, 0, 45, 6, 0, 0, 19, 0, 0, 0,135, 1, 9, 0, 64, 2,
+ 4, 0, 46, 6, 4, 0, 47, 6, 27, 0, 48, 6,218, 0, 16, 0,211, 0, 0, 0,211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5,
+ 7, 0,237, 5, 2, 0,238, 5,212, 0, 35, 6, 7, 0, 88, 2, 7, 0, 89, 2, 2, 0, 41, 6, 2, 0, 49, 6, 2, 0, 50, 6,
+ 2, 0, 51, 6, 4, 0, 19, 0, 7, 0, 52, 6,161, 0, 91, 3,219, 0, 16, 0, 0, 0, 53, 6, 0, 0, 54, 6, 0, 0, 55, 6,
+ 0, 0, 56, 6, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 57, 6, 2, 0, 58, 6, 2, 0,180, 1, 2, 0, 59, 6, 4, 0, 60, 6,
+ 4, 0, 61, 6, 2, 0, 62, 6, 2, 0, 63, 6, 0, 0, 64, 6, 0, 0, 65, 6,220, 0, 16, 0,211, 0, 0, 0,211, 0, 1, 0,
+ 12, 0,235, 5, 4, 0,236, 5, 4, 0, 37, 0,219, 0, 66, 6,221, 0, 67, 6, 12, 0, 68, 6, 12, 0, 69, 6,222, 0, 70, 6,
+209, 0, 71, 6,223, 0, 72, 6, 2, 0, 73, 6, 2, 0, 74, 6, 2, 0, 75, 6, 2, 0, 70, 0,224, 0, 17, 0,211, 0, 0, 0,
+211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5, 2, 0,238, 5,212, 0, 35, 6, 12, 0, 76, 6,225, 0, 77, 6,
+ 0, 0, 78, 6,226, 0, 79, 6, 4, 0, 80, 6, 4, 0, 81, 6, 2, 0, 19, 0, 2, 0, 82, 6, 2, 0, 83, 6, 2, 0, 37, 0,
+227, 0, 29, 0,211, 0, 0, 0,211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5, 2, 0,238, 5, 47, 0,227, 2,
+ 45, 0, 58, 1, 64, 0, 84, 6, 2, 0,133, 0, 2, 0, 85, 6, 2, 0, 70, 0, 2, 0, 86, 6, 4, 0, 19, 0, 2, 0, 87, 6,
+ 2, 0, 40, 6, 2, 0, 39, 6, 2, 0,237, 1, 0, 0, 88, 6, 0, 0, 89, 6, 0, 0, 90, 6, 0, 0,246, 5, 7, 0, 88, 2,
+ 7, 0, 89, 2, 7, 0, 52, 6, 7, 0,120, 1, 7, 0, 91, 6, 7, 0, 92, 6,161, 0, 91, 3,228, 0, 11, 0,211, 0, 0, 0,
+211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5, 2, 0,238, 5, 2, 0, 38, 6, 2, 0, 19, 0, 4, 0, 37, 0,
+216, 0, 36, 6,212, 0, 35, 6,229, 0, 27, 0,211, 0, 0, 0,211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5,
+ 2, 0,238, 5, 42, 0, 93, 6, 4, 0, 94, 6, 4, 0, 95, 6, 2, 0, 90, 0, 2, 0,133, 0, 2, 0, 96, 6, 0, 0, 97, 6,
+ 0, 0, 98, 6, 4, 0, 99, 6, 4, 0,100, 6, 4, 0,101, 6, 4, 0,102, 6, 2, 0,103, 6, 2, 0,104, 6, 7, 0,105, 6,
+ 23, 0,106, 6, 23, 0,107, 6, 4, 0,108, 6, 4, 0,109, 6, 0, 0,110, 6, 0, 0,111, 6,230, 0, 10, 0, 27, 0, 31, 0,
+ 9, 0,112, 6, 9, 0,113, 6, 9, 0,114, 6, 9, 0,115, 6, 9, 0,116, 6, 4, 0, 90, 0, 4, 0,117, 6, 0, 0,118, 6,
+ 0, 0,119, 6,231, 0, 10, 0,211, 0, 0, 0,211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5,230, 0,120, 6,
+ 2, 0, 90, 0, 2, 0,133, 0, 4, 0, 43, 0, 9, 0,121, 6,232, 0, 8, 0,211, 0, 0, 0,211, 0, 1, 0, 12, 0,235, 5,
+ 4, 0,236, 5, 7, 0,237, 5,212, 0, 35, 6, 4, 0, 19, 0, 4, 0,122, 6,233, 0, 23, 0,211, 0, 0, 0,211, 0, 1, 0,
+ 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5, 2, 0,238, 5,212, 0, 35, 6, 27, 0,123, 6, 27, 0, 81, 0, 2, 0, 19, 0,
+ 2, 0,133, 0, 7, 0,124, 6, 9, 0,125, 6, 7, 0, 88, 2, 7, 0, 89, 2, 7, 0,126, 6, 7, 0,127, 6, 61, 0, 59, 1,
+ 61, 0,128, 6, 4, 0,129, 6, 2, 0,130, 6, 2, 0, 37, 0,161, 0, 91, 3,234, 0, 10, 0,211, 0, 0, 0,211, 0, 1, 0,
+ 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5, 2, 0,238, 5, 2, 0, 19, 0, 2, 0,114, 3, 4, 0, 37, 0,161, 0, 91, 3,
+235, 0, 42, 0,211, 0, 0, 0,211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5, 2, 0,238, 5,212, 0, 35, 6,
+221, 0, 67, 6, 0, 0, 53, 6, 0, 0, 54, 6, 0, 0, 55, 6, 2, 0, 17, 0, 2, 0, 63, 6, 2, 0, 19, 0, 2, 0, 57, 6,
+ 9, 0,125, 6, 4, 0, 60, 6, 4, 0,131, 6, 4, 0,132, 6, 4, 0, 61, 6, 23, 0,133, 6, 23, 0,134, 6, 7, 0,135, 6,
+ 7, 0,136, 6, 7, 0,137, 6, 7, 0,124, 6, 2, 0,138, 6, 2, 0,237, 0, 2, 0,180, 1, 2, 0, 59, 6, 2, 0, 37, 0,
+ 2, 0, 43, 0, 2, 0,139, 6, 2, 0,140, 6, 9, 0,141, 6, 9, 0,142, 6, 9, 0,143, 6, 9, 0,144, 6, 9, 0,145, 6,
+ 2, 0,146, 6, 0, 0, 65, 6, 57, 0,147, 6,236, 0, 7, 0,236, 0, 0, 0,236, 0, 1, 0, 4, 0,148, 6, 4, 0, 23, 0,
+ 0, 0, 84, 0, 4, 0,149, 6, 4, 0, 17, 0,237, 0, 13, 0,211, 0, 0, 0,211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5,
+ 7, 0,237, 5, 2, 0,238, 5, 4, 0, 17, 0, 4, 0,150, 6, 4, 0, 19, 0, 4, 0, 96, 6, 12, 0,151, 6, 12, 0,152, 6,
+ 0, 0,153, 6,238, 0, 5, 0,211, 0, 0, 0,211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 4, 0, 37, 0,239, 0, 7, 0,
+239, 0, 0, 0,239, 0, 1, 0, 0, 0,154, 6, 2, 0,155, 6, 2, 0,156, 6, 2, 0,157, 6, 2, 0, 37, 0,240, 0, 12, 0,
+ 2, 0,156, 6, 2, 0,158, 6, 2, 0,159, 6, 0, 0,188, 2, 2, 0,160, 6, 2, 0,161, 6, 2, 0,162, 6, 2, 0,163, 6,
+ 2, 0,164, 6, 2, 0, 25, 6, 7, 0,165, 6, 7, 0,166, 6,241, 0, 18, 0,241, 0, 0, 0,241, 0, 1, 0, 0, 0,227, 3,
+240, 0,167, 6,240, 0,168, 6,240, 0,169, 6,240, 0,170, 6, 7, 0,171, 6, 2, 0,172, 6, 2, 0,173, 6, 2, 0,174, 6,
+ 2, 0,175, 6, 2, 0,176, 6, 2, 0,177, 6, 2, 0,178, 6, 2, 0,179, 6, 2, 0,180, 6, 2, 0,181, 6,242, 0, 10, 0,
+ 0, 0,182, 6, 0, 0,183, 6, 0, 0,184, 6, 0, 0,185, 6, 0, 0,186, 6, 0, 0,187, 6, 2, 0,188, 6, 2, 0,189, 6,
+ 2, 0,190, 6, 2, 0, 37, 0,243, 0, 8, 0, 0, 0,191, 6, 0, 0,192, 6, 0, 0,193, 6, 0, 0,194, 6, 0, 0,195, 6,
+ 0, 0,196, 6, 7, 0,204, 5, 7, 0, 37, 0,244, 0, 17, 0,242, 0,197, 6,242, 0,198, 6,242, 0,199, 6,242, 0,200, 6,
+242, 0,201, 6,242, 0,202, 6,242, 0,203, 6,242, 0,204, 6,242, 0,205, 6,242, 0,206, 6,242, 0,207, 6,242, 0,208, 6,
+242, 0,209, 6,242, 0,210, 6,242, 0,211, 6,243, 0,212, 6, 0, 0,213, 6,245, 0, 71, 0, 0, 0,214, 6, 0, 0,215, 6,
+ 0, 0,186, 6, 0, 0,216, 6, 0, 0,217, 6, 0, 0,218, 6, 0, 0,219, 6, 0, 0,220, 6, 0, 0,221, 6, 0, 0,222, 6,
+ 0, 0,223, 6, 0, 0,224, 6, 0, 0,225, 6, 0, 0,226, 6, 0, 0,227, 6, 0, 0,228, 6, 0, 0,229, 6, 0, 0,230, 6,
+ 0, 0,231, 6, 0, 0,232, 6, 0, 0,233, 6, 0, 0,234, 6, 0, 0,235, 6, 0, 0,236, 6, 0, 0,237, 6, 0, 0,238, 6,
+ 0, 0,239, 6, 0, 0,240, 6, 0, 0,241, 6, 0, 0,242, 6, 0, 0,243, 6, 0, 0,244, 6, 0, 0,245, 6, 0, 0,246, 6,
+ 0, 0,247, 6, 0, 0,248, 6, 0, 0,249, 6, 0, 0,250, 6, 0, 0,251, 6, 0, 0,252, 6, 0, 0,253, 6, 0, 0,254, 6,
+ 0, 0,255, 6, 0, 0, 0, 7, 0, 0, 1, 7, 0, 0, 2, 7, 0, 0, 3, 7, 0, 0, 4, 7, 0, 0, 5, 7, 0, 0, 6, 7,
+ 0, 0, 7, 7, 0, 0, 8, 7, 0, 0, 9, 7, 0, 0, 10, 7, 0, 0, 11, 7, 0, 0, 12, 7, 0, 0, 13, 7, 0, 0, 14, 7,
+ 0, 0, 15, 7, 0, 0, 16, 7, 0, 0, 17, 7, 0, 0, 18, 7, 0, 0, 19, 7, 0, 0, 20, 7, 0, 0, 21, 7, 0, 0, 22, 7,
+ 0, 0, 23, 7, 0, 0, 24, 7, 0, 0, 25, 7, 0, 0, 26, 7, 0, 0, 92, 0,246, 0, 5, 0, 0, 0, 27, 7, 0, 0,238, 6,
+ 0, 0,240, 6, 2, 0, 19, 0, 2, 0, 37, 0,247, 0, 22, 0,247, 0, 0, 0,247, 0, 1, 0, 0, 0, 20, 0,244, 0, 28, 7,
+245, 0, 29, 7,245, 0, 30, 7,245, 0, 31, 7,245, 0, 32, 7,245, 0, 33, 7,245, 0, 34, 7,245, 0, 35, 7,245, 0, 36, 7,
+245, 0, 37, 7,245, 0, 38, 7,245, 0, 39, 7,245, 0, 40, 7,245, 0, 41, 7,245, 0, 42, 7,245, 0, 43, 7,245, 0, 44, 7,
+245, 0, 45, 7,246, 0, 46, 7,248, 0, 5, 0, 4, 0, 19, 0, 4, 0, 37, 0, 7, 0,136, 2, 7, 0, 47, 7, 7, 0, 42, 2,
+249, 0, 71, 0, 4, 0, 19, 0, 4, 0, 48, 7, 4, 0, 49, 7, 0, 0, 50, 7, 0, 0, 51, 7, 0, 0, 52, 7, 0, 0, 53, 7,
+ 0, 0, 54, 7, 0, 0, 55, 7, 0, 0, 56, 7, 0, 0, 57, 7, 0, 0, 58, 7, 2, 0, 59, 7, 2, 0, 37, 0, 4, 0, 60, 7,
+ 4, 0, 61, 7, 4, 0, 62, 7, 4, 0, 63, 7, 2, 0, 64, 7, 2, 0, 65, 7, 4, 0, 66, 7, 4, 0, 67, 7, 4, 0, 68, 7,
+ 4, 0, 69, 7, 4, 0, 70, 7, 4, 0,151, 6, 4, 0, 71, 7, 2, 0, 72, 7, 2, 0, 73, 7, 2, 0, 74, 7, 2, 0, 75, 7,
+ 12, 0, 76, 7, 12, 0, 77, 7, 12, 0, 78, 7, 2, 0, 79, 7, 2, 0, 80, 7, 2, 0, 81, 7, 2, 0, 82, 7, 2, 0, 83, 7,
+ 2, 0, 84, 7, 2, 0, 85, 7, 2, 0, 86, 7,248, 0, 87, 7, 2, 0, 88, 7, 2, 0, 89, 7, 2, 0, 90, 7, 2, 0, 91, 7,
+ 2, 0, 92, 7, 2, 0, 93, 7, 2, 0, 94, 7, 2, 0, 95, 7, 4, 0, 96, 7, 4, 0, 97, 7, 2, 0, 98, 7, 2, 0, 99, 7,
+ 2, 0,100, 7, 2, 0,101, 7, 2, 0,102, 7, 2, 0,103, 7, 2, 0,104, 7, 2, 0,105, 7, 2, 0,106, 7, 2, 0,107, 7,
+ 2, 0,108, 7, 2, 0,109, 7, 0, 0,110, 7, 0, 0,111, 7, 7, 0,112, 7, 2, 0,131, 5, 2, 0,132, 5, 55, 0,113, 7,
+214, 0, 21, 0, 27, 0, 31, 0, 12, 0,114, 7, 12, 0,115, 7, 12, 0,116, 7, 12, 0,235, 5, 46, 0,134, 0, 46, 0,117, 7,
+ 2, 0,118, 7, 2, 0,119, 7, 2, 0,120, 7, 2, 0,121, 7, 2, 0,122, 7, 2, 0,123, 7, 2, 0,124, 7, 2, 0, 37, 0,
+ 2, 0,125, 7, 2, 0,126, 7, 4, 0, 70, 0,209, 0,127, 7, 9, 0,128, 7, 2, 0,129, 7,250, 0, 5, 0,250, 0, 0, 0,
+250, 0, 1, 0,250, 0,130, 7, 13, 0,131, 7, 4, 0, 19, 0,251, 0, 7, 0,251, 0, 0, 0,251, 0, 1, 0,250, 0,132, 7,
+250, 0,133, 7, 2, 0,240, 4, 2, 0, 19, 0, 4, 0, 37, 0,252, 0, 23, 0,252, 0, 0, 0,252, 0, 1, 0,253, 0,134, 7,
+254, 0, 72, 6, 0, 0,135, 7, 0, 0,136, 7, 0, 0,137, 7, 2, 0,138, 7, 2, 0,139, 7, 2, 0,140, 7, 2, 0,141, 7,
+ 2, 0,142, 7, 2, 0, 37, 0, 2, 0, 19, 0, 2, 0,143, 7, 2, 0,144, 7, 2, 0,145, 7, 4, 0,146, 7,252, 0,147, 7,
+ 9, 0,148, 7, 4, 0,149, 7, 4, 0,150, 7, 0, 0,151, 7,255, 0, 22, 0,255, 0, 0, 0,255, 0, 1, 0,250, 0,132, 7,
+250, 0,133, 7,250, 0,152, 7,250, 0,153, 7,214, 0,154, 7, 23, 0, 52, 0, 0, 0,236, 5, 0, 0,155, 7, 2, 0, 26, 6,
+ 2, 0, 27, 6, 2, 0,156, 7, 2, 0, 37, 0, 2, 0,121, 7, 2, 0,149, 6, 2, 0, 19, 0, 0, 1,134, 7, 12, 0,157, 7,
+ 12, 0,235, 5, 12, 0,158, 7, 12, 0,159, 7, 1, 1, 21, 0, 1, 1, 0, 0, 1, 1, 1, 0,212, 0, 35, 6, 23, 0,160, 7,
+ 23, 0,161, 7, 2, 0, 26, 6, 2, 0, 27, 6, 2, 0,162, 7, 2, 0,163, 7, 2, 0,164, 7, 2, 0, 19, 0, 7, 0, 84, 2,
+ 2, 0,120, 7, 2, 0,124, 7, 4, 0, 43, 0, 2, 1,134, 7, 12, 0,165, 7, 12, 0,166, 7, 12, 0,158, 7, 0, 0,167, 7,
+ 9, 0,168, 7, 3, 1, 11, 0, 0, 0,169, 7, 2, 0,170, 7, 2, 0,171, 7, 2, 0,172, 7, 2, 0,173, 7, 2, 0,229, 4,
+ 2, 0,224, 4,214, 0,174, 7, 46, 0,175, 7, 4, 0,176, 7, 4, 0,177, 7, 4, 1, 1, 0, 0, 0,178, 7, 5, 1, 8, 0,
+ 57, 0,179, 7, 57, 0,180, 7, 5, 1,181, 7, 5, 1,182, 7, 5, 1,183, 7, 2, 0,129, 0, 2, 0, 19, 0, 4, 0,184, 7,
+ 6, 1, 4, 0, 4, 0, 94, 6, 4, 0,185, 7, 4, 0, 99, 6, 4, 0,186, 7, 7, 1, 2, 0, 4, 0,187, 7, 4, 0,188, 7,
+ 8, 1, 7, 0, 7, 0,189, 7, 7, 0,190, 7, 7, 0,191, 7, 4, 0, 19, 0, 4, 0, 37, 0, 7, 0,108, 4, 7, 0,192, 7,
+ 9, 1, 6, 0, 0, 0,193, 7, 0, 0, 55, 6, 49, 0,137, 0, 2, 0,106, 0, 2, 0,228, 4, 4, 0, 37, 0, 10, 1, 21, 0,
+ 10, 1, 0, 0, 10, 1, 1, 0, 4, 0, 57, 0, 4, 0, 23, 0, 4, 0, 28, 0, 4, 0,194, 7, 4, 0,195, 7, 4, 0,196, 7,
+ 4, 1,197, 7, 0, 0,193, 7, 4, 0,198, 7, 4, 0,199, 7, 9, 1, 85, 3, 6, 1,200, 7, 7, 1,201, 7, 8, 1,202, 7,
+ 5, 1,203, 7, 5, 1,204, 7, 5, 1,205, 7, 57, 0,206, 7, 57, 0,207, 7, 11, 1, 12, 0, 0, 0, 4, 2, 9, 0,223, 0,
+ 0, 0,224, 0, 4, 0,227, 0, 4, 0,235, 0, 9, 0,228, 0, 7, 0,230, 0, 7, 0,231, 0, 9, 0,208, 7, 9, 0,209, 7,
+ 9, 0,232, 0, 9, 0,234, 0, 12, 1, 43, 0, 12, 1, 0, 0, 12, 1, 1, 0, 9, 0,210, 7, 9, 0, 26, 0, 0, 0, 27, 0,
+ 4, 0, 19, 0, 4, 0, 17, 0, 4, 0, 23, 0, 4, 0, 88, 0, 4, 0,211, 7, 4, 0,212, 7, 4, 0,195, 7, 4, 0,196, 7,
+ 4, 0,213, 7, 4, 0,246, 0, 4, 0,214, 7, 4, 0,215, 7, 7, 0, 97, 5, 7, 0,216, 7, 4, 0,126, 0, 4, 0,217, 7,
+ 10, 1,218, 7, 36, 0, 80, 0, 46, 0,134, 0, 49, 0,137, 0, 7, 0,219, 7, 7, 0,220, 7, 11, 1, 60, 1, 12, 1,221, 7,
+ 12, 1,222, 7, 12, 1,223, 7, 12, 0,224, 7, 13, 1,225, 7, 14, 1,226, 7, 7, 0,227, 7, 7, 0,228, 7, 4, 0,229, 7,
+ 7, 0,230, 7, 9, 0,231, 7, 4, 0,232, 7, 4, 0,233, 7, 4, 0,234, 7, 7, 0,235, 7, 15, 1, 4, 0, 15, 1, 0, 0,
+ 15, 1, 1, 0, 12, 0,236, 7, 12, 1,237, 7,200, 0, 6, 0, 12, 0,238, 7, 12, 0,224, 7, 12, 0,239, 7, 12, 1,240, 7,
+ 0, 0,241, 7, 0, 0,242, 7, 16, 1, 4, 0, 7, 0,243, 7, 7, 0,109, 0, 2, 0,244, 7, 2, 0,245, 7, 17, 1, 6, 0,
+ 7, 0,246, 7, 7, 0,247, 7, 7, 0,248, 7, 7, 0,249, 7, 4, 0,250, 7, 4, 0,251, 7, 18, 1, 12, 0, 7, 0,252, 7,
+ 7, 0,253, 7, 7, 0,254, 7, 7, 0,255, 7, 7, 0, 0, 8, 7, 0, 1, 8, 7, 0, 2, 8, 7, 0, 3, 8, 7, 0, 4, 8,
+ 7, 0, 5, 8, 4, 0,231, 2, 4, 0, 6, 8, 19, 1, 2, 0, 7, 0, 66, 5, 7, 0, 37, 0, 20, 1, 5, 0, 7, 0, 7, 8,
+ 7, 0, 8, 8, 4, 0, 90, 0, 4, 0,189, 2, 4, 0, 9, 8, 21, 1, 6, 0, 21, 1, 0, 0, 21, 1, 1, 0, 2, 0, 17, 0,
+ 2, 0, 19, 0, 2, 0, 10, 8, 2, 0, 57, 0, 22, 1, 8, 0, 22, 1, 0, 0, 22, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0,
+ 2, 0, 10, 8, 2, 0, 57, 0, 7, 0, 23, 0, 7, 0,126, 0, 23, 1, 45, 0, 23, 1, 0, 0, 23, 1, 1, 0, 2, 0, 17, 0,
+ 2, 0, 19, 0, 2, 0, 10, 8, 2, 0,242, 0, 2, 0, 22, 4, 2, 0, 11, 8, 7, 0, 12, 8, 7, 0, 89, 0, 7, 0,244, 2,
+ 4, 0, 13, 8, 4, 0, 82, 0, 4, 0,191, 2, 7, 0, 14, 8, 7, 0, 15, 8, 7, 0, 16, 8, 7, 0, 17, 8, 7, 0, 18, 8,
+ 7, 0, 19, 8, 7, 0,241, 2, 7, 0, 57, 1, 7, 0, 20, 8, 7, 0, 21, 8, 7, 0, 37, 0, 7, 0, 22, 8, 7, 0, 23, 8,
+ 7, 0, 24, 8, 2, 0, 25, 8, 2, 0, 26, 8, 2, 0, 27, 8, 2, 0, 28, 8, 2, 0, 29, 8, 2, 0, 30, 8, 2, 0, 31, 8,
+ 2, 0, 32, 8, 2, 0, 27, 2, 2, 0, 33, 8, 2, 0, 24, 2, 2, 0, 34, 8, 0, 0, 35, 8, 0, 0, 36, 8, 7, 0,240, 0,
+ 24, 1, 37, 8, 68, 0,240, 1, 25, 1, 16, 0, 25, 1, 0, 0, 25, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 10, 8,
+ 2, 0,242, 0, 7, 0,236, 2, 7, 0,237, 2, 7, 0,238, 2, 7, 0, 73, 2, 7, 0,239, 2, 7, 0,240, 2, 7, 0, 38, 8,
+ 7, 0,241, 2, 7, 0,243, 2, 7, 0,244, 2,226, 0, 5, 0, 2, 0, 17, 0, 2, 0,184, 7, 2, 0, 19, 0, 2, 0, 39, 8,
+ 27, 0,123, 6,225, 0, 3, 0, 4, 0, 69, 0, 4, 0, 40, 8,226, 0, 2, 0, 26, 1, 7, 0, 26, 1, 0, 0, 26, 1, 1, 0,
+ 0, 0, 20, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 22, 0, 9, 0, 41, 8, 27, 1, 5, 0, 0, 0, 20, 0, 7, 0, 77, 1,
+ 7, 0, 42, 8, 4, 0, 43, 8, 4, 0, 37, 0, 28, 1, 4, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 43, 0, 2, 0, 70, 0,
+ 29, 1, 4, 0, 0, 0, 20, 0, 67, 0, 44, 8, 7, 0, 77, 1, 7, 0, 37, 0, 30, 1, 6, 0, 2, 0, 45, 8, 2, 0, 46, 8,
+ 2, 0, 17, 0, 2, 0, 47, 8, 0, 0, 48, 8, 0, 0, 49, 8, 31, 1, 5, 0, 4, 0, 17, 0, 4, 0, 37, 0, 0, 0, 20, 0,
+ 0, 0, 50, 8, 0, 0, 51, 8, 32, 1, 3, 0, 4, 0, 17, 0, 4, 0, 37, 0, 0, 0, 20, 0, 33, 1, 4, 0, 2, 0, 52, 8,
+ 2, 0, 53, 8, 2, 0, 19, 0, 2, 0, 37, 0, 34, 1, 6, 0, 0, 0, 20, 0, 0, 0, 54, 8, 2, 0, 55, 8, 2, 0,241, 2,
+ 2, 0, 70, 1, 2, 0, 70, 0, 35, 1, 5, 0, 0, 0, 20, 0, 7, 0,109, 0, 7, 0,110, 4, 2, 0, 19, 0, 2, 0,203, 2,
+ 36, 1, 3, 0, 0, 0, 20, 0, 4, 0,191, 2, 4, 0, 52, 8, 37, 1, 7, 0, 0, 0, 20, 0, 7, 0,110, 4, 0, 0, 56, 8,
+ 0, 0, 57, 8, 2, 0, 70, 1, 2, 0, 43, 0, 4, 0, 58, 8, 38, 1, 4, 0, 0, 0, 59, 8, 0, 0, 60, 8, 4, 0, 17, 0,
+ 7, 0,207, 2, 39, 1, 3, 0, 32, 0, 61, 8, 0, 0, 62, 8, 0, 0, 63, 8, 40, 1, 18, 0, 40, 1, 0, 0, 40, 1, 1, 0,
+ 2, 0, 17, 0, 2, 0, 64, 8, 2, 0, 19, 0, 2, 0, 65, 8, 2, 0, 66, 8, 2, 0, 67, 8, 2, 0, 43, 0, 2, 0, 70, 0,
+ 0, 0, 20, 0, 9, 0, 2, 0, 41, 1, 68, 8, 32, 0, 45, 0, 2, 0, 81, 5, 2, 0,227, 7, 2, 0, 69, 8, 2, 0, 37, 0,
+ 42, 1, 11, 0, 0, 0, 20, 0, 0, 0, 17, 0, 0, 0, 70, 8, 2, 0, 19, 0, 2, 0,203, 2, 2, 0, 71, 8, 4, 0, 72, 8,
+ 4, 0, 73, 8, 4, 0, 74, 8, 4, 0, 75, 8, 4, 0, 76, 8, 43, 1, 1, 0, 0, 0, 77, 8, 44, 1, 4, 0, 42, 0, 93, 6,
+ 0, 0, 78, 8, 4, 0, 70, 1, 4, 0, 19, 0, 41, 1, 18, 0, 41, 1, 0, 0, 41, 1, 1, 0, 41, 1, 79, 8, 2, 0, 17, 0,
+ 2, 0, 19, 0, 2, 0, 80, 8, 2, 0, 67, 8, 2, 0, 64, 8, 2, 0, 81, 8, 2, 0, 70, 0, 2, 0,237, 1, 0, 0, 20, 0,
+ 9, 0, 2, 0, 45, 1, 68, 8, 40, 1, 82, 8, 2, 0, 15, 0, 2, 0, 83, 8, 4, 0, 84, 8, 46, 1, 3, 0, 4, 0,217, 2,
+ 4, 0, 37, 0, 32, 0, 45, 0, 47, 1, 12, 0,159, 0, 85, 8, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 12, 8, 4, 0, 89, 0,
+ 0, 0, 20, 0, 0, 0, 86, 8, 2, 0, 87, 8, 2, 0, 88, 8, 2, 0, 89, 8, 2, 0, 90, 8, 7, 0, 91, 8, 48, 1, 13, 0,
+ 2, 0, 19, 0, 2, 0, 92, 8, 4, 0, 12, 8, 4, 0, 89, 0, 2, 0, 93, 8, 7, 0,236, 3, 7, 0, 94, 8, 13, 1,225, 7,
+ 49, 1, 95, 8, 2, 0, 17, 0, 2, 0, 96, 8, 2, 0, 97, 8, 2, 0, 98, 8, 50, 1, 11, 0, 4, 0,217, 2, 2, 0, 17, 0,
+ 2, 0, 19, 0, 32, 0, 45, 0, 81, 0, 99, 8, 0, 0, 20, 0, 7, 0,100, 8, 7, 0,101, 8, 7, 0,122, 3, 2, 0,102, 8,
+ 2, 0,103, 8, 51, 1, 5, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 37, 0, 46, 0,134, 0, 32, 0,178, 5, 52, 1, 5, 0,
+ 4, 0, 19, 0, 4, 0, 17, 0, 0, 0, 20, 0, 0, 0, 50, 8, 32, 0, 45, 0, 53, 1, 13, 0, 2, 0, 19, 0, 2, 0, 17, 0,
+ 2, 0, 64, 8, 2, 0,123, 3, 7, 0,104, 8, 7, 0,105, 8, 7, 0, 65, 1, 7, 0, 66, 1, 7, 0, 98, 3, 7, 0,101, 3,
+ 7, 0,106, 8, 7, 0,107, 8, 32, 0,108, 8, 54, 1, 10, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 0, 12, 8, 4, 0, 89, 0,
+ 0, 0, 20, 0, 0, 0, 86, 8, 2, 0, 43, 0, 2, 0, 64, 0, 2, 0,109, 8, 2, 0,110, 8, 55, 1, 8, 0, 32, 0, 45, 0,
+ 7, 0,238, 2, 7, 0,111, 8, 7, 0,112, 8, 7, 0,233, 2, 2, 0, 19, 0, 2, 0,203, 2, 7, 0,113, 8, 56, 1, 12, 0,
+ 2, 0, 17, 0, 2, 0, 70, 1, 2, 0, 19, 0, 2, 0,241, 2, 2, 0,217, 2, 2, 0,114, 8, 4, 0, 37, 0, 7, 0,115, 8,
+ 7, 0,116, 8, 7, 0,117, 8, 7, 0,118, 8, 0, 0,119, 8, 57, 1, 9, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 0, 12, 8,
+ 4, 0, 89, 0, 0, 0, 20, 0, 2, 0,135, 1, 2, 0, 64, 0, 2, 0,109, 8, 2, 0,110, 8, 58, 1, 7, 0, 4, 0,191, 2,
+ 4, 0,120, 8, 4, 0,121, 8, 4, 0,122, 8, 7, 0,123, 8, 7, 0,124, 8, 0, 0, 56, 8, 59, 1, 7, 0, 0, 0,125, 8,
+ 32, 0,126, 8, 0, 0, 62, 8, 2, 0,127, 8, 2, 0, 43, 0, 4, 0, 70, 0, 0, 0, 63, 8, 60, 1, 6, 0, 2, 0, 19, 0,
+ 2, 0, 17, 0, 4, 0, 12, 8, 4, 0, 89, 0, 0, 0,128, 8, 0, 0,129, 8, 61, 1, 1, 0, 4, 0, 19, 0, 62, 1, 6, 0,
+ 0, 0, 92, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0,130, 8, 7, 0,131, 8, 42, 0, 93, 6, 63, 1, 4, 0, 0, 0, 69, 2,
+ 2, 0, 19, 0, 4, 0, 17, 0, 32, 0, 45, 0, 64, 1, 2, 0, 4, 0, 17, 0, 4, 0, 15, 6, 65, 1, 6, 0, 0, 0, 59, 8,
+ 0, 0, 60, 8, 4, 0, 17, 0, 7, 0, 35, 2, 32, 0, 48, 3, 32, 0,132, 8, 45, 1, 10, 0, 45, 1, 0, 0, 45, 1, 1, 0,
+ 45, 1, 79, 8, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 64, 8, 2, 0,133, 8, 0, 0, 20, 0, 9, 0, 2, 0, 32, 0, 45, 0,
+ 66, 1, 10, 0, 7, 0,122, 3, 7, 0,134, 8, 7, 0,135, 8, 7, 0,136, 8, 7, 0,137, 8, 4, 0, 19, 0, 7, 0,114, 8,
+ 7, 0,138, 8, 7, 0,139, 8, 7, 0, 37, 0, 14, 1, 12, 0, 14, 1, 0, 0, 14, 1, 1, 0, 13, 1,140, 8, 9, 0,223, 0,
+ 4, 0,165, 3, 4, 0,223, 3, 4, 0,224, 3, 4, 0,141, 8, 4, 0,142, 8, 4, 0,143, 8, 7, 0,236, 3, 7, 0, 37, 0,
+ 49, 1, 8, 0, 7, 0,144, 8, 7, 0,145, 8, 7, 0,146, 8, 7, 0,147, 8, 7, 0,148, 8, 7, 0,149, 8, 7, 0,150, 8,
+ 7, 0,151, 8, 13, 1, 15, 0, 27, 0, 31, 0, 0, 0,222, 0, 43, 0,149, 0, 9, 0,223, 0, 43, 0,152, 8, 36, 0, 80, 0,
+ 7, 0,236, 3, 7, 0,153, 8, 7, 0, 94, 8, 7, 0,144, 8, 7, 0,145, 8, 7, 0,154, 8, 4, 0, 90, 0, 4, 0,143, 8,
+ 9, 0,155, 8, 67, 1, 15, 0,211, 0, 0, 0,211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5,255, 0,156, 8,
+212, 0, 35, 6, 13, 1,225, 7, 2, 0, 70, 1, 2, 0, 92, 8, 2, 0, 88, 2, 2, 0, 89, 2, 2, 0, 19, 0, 2, 0, 40, 6,
+ 4, 0, 70, 0, 68, 1, 6, 0, 68, 1, 0, 0, 68, 1, 1, 0, 32, 0, 45, 0, 9, 0,157, 8, 4, 0,247, 0, 4, 0, 37, 0,
+ 68, 0, 4, 0, 27, 0, 31, 0, 12, 0,158, 8, 4, 0,131, 0, 7, 0,159, 8, 69, 1, 25, 0, 69, 1, 0, 0, 69, 1, 1, 0,
+ 69, 1, 38, 0, 12, 0,160, 8, 0, 0, 20, 0, 7, 0,161, 8, 7, 0,162, 8, 7, 0,163, 8, 7, 0,164, 8, 4, 0, 19, 0,
+ 7, 0,165, 8, 7, 0,166, 8, 7, 0,167, 8, 7, 0, 77, 1, 7, 0, 35, 2, 7, 0,168, 8, 7, 0,189, 2, 7, 0,169, 8,
+ 7, 0,170, 8, 7, 0,171, 8, 7, 0,172, 8, 7, 0,173, 8, 7, 0,172, 0, 2, 0,131, 0, 2, 0,112, 5, 70, 1, 22, 0,
+ 27, 0, 31, 0, 39, 0, 75, 0, 12, 0,174, 8, 12, 0,175, 8, 12, 0,176, 8, 9, 0,177, 8, 4, 0, 19, 0, 4, 0,244, 5,
+ 2, 0,245, 2, 2, 0, 46, 6, 2, 0,131, 0, 2, 0,178, 8, 2, 0,179, 8, 2, 0,180, 8, 2, 0,181, 8, 2, 0,182, 8,
+ 4, 0,183, 8, 4, 0,184, 8, 4, 0,185, 8, 4, 0,186, 8, 4, 0,187, 8, 4, 0,188, 8, 71, 1, 2, 0, 7, 0,150, 2,
+ 4, 0, 19, 0, 72, 1, 5, 0, 71, 1,189, 8, 4, 0,189, 2, 4, 0,190, 8, 4, 0,191, 8, 4, 0, 19, 0, 73, 1, 6, 0,
+ 4, 0, 37, 0, 4, 0, 46, 6, 4, 0,185, 8, 4, 0,186, 8, 4, 0,187, 8, 4, 0,188, 8, 74, 1, 40, 0, 74, 1, 0, 0,
+ 74, 1, 1, 0, 26, 0,192, 8, 12, 0,149, 3, 0, 0, 20, 0, 2, 0, 19, 0, 2, 0,193, 8, 2, 0,194, 8, 2, 0,195, 8,
+ 2, 0,108, 3, 2, 0,196, 8, 4, 0, 71, 2, 4, 0,185, 8, 4, 0,186, 8, 69, 1,197, 8, 74, 1, 38, 0, 74, 1,198, 8,
+ 12, 0,199, 8, 9, 0,200, 8, 9, 0,201, 8, 9, 0,202, 8, 7, 0, 65, 1, 7, 0,172, 0, 7, 0,203, 8, 7, 0, 14, 2,
+ 2, 0,131, 3, 2, 0, 37, 0, 7, 0,204, 8, 7, 0,205, 8, 7, 0,104, 3, 7, 0,206, 8, 7, 0,207, 8, 7, 0,208, 8,
+ 7, 0,209, 8, 7, 0,210, 8, 7, 0,211, 8, 7, 0,212, 8, 7, 0,213, 8, 7, 0, 64, 2, 32, 0,214, 8,160, 0, 11, 0,
+ 12, 0,215, 8, 2, 0, 19, 0, 2, 0,216, 8, 7, 0,100, 2, 7, 0,217, 8, 7, 0,218, 8, 12, 0,219, 8, 4, 0,220, 8,
+ 4, 0,221, 8, 9, 0,222, 8, 9, 0,223, 8, 75, 1, 1, 0, 4, 0,221, 8, 76, 1, 12, 0, 4, 0,221, 8, 7, 0, 76, 8,
+ 2, 0,224, 8, 2, 0,225, 8, 7, 0,226, 8, 7, 0,227, 8, 2, 0,228, 8, 2, 0, 19, 0, 7, 0,229, 8, 7, 0,230, 8,
+ 7, 0,231, 8, 7, 0,232, 8, 77, 1, 7, 0, 77, 1, 0, 0, 77, 1, 1, 0, 12, 0,233, 8, 4, 0, 19, 0, 4, 0,234, 8,
+ 0, 0,227, 3,246, 0,235, 8,159, 0, 7, 0, 27, 0, 31, 0, 12, 0,236, 8, 12, 0,215, 8, 12, 0,237, 8, 12, 0,100, 0,
+ 4, 0, 19, 0, 4, 0,238, 8,216, 0, 4, 0, 27, 0,140, 8, 12, 0,215, 8, 4, 0,239, 8, 4, 0, 19, 0, 78, 1, 17, 0,
+211, 0, 0, 0,211, 0, 1, 0, 12, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5, 2, 0,238, 5,212, 0, 35, 6,159, 0, 88, 3,
+216, 0,240, 8, 0, 0, 70, 1, 0, 0, 38, 6, 2, 0, 19, 0, 2, 0,241, 8, 2, 0, 39, 6, 2, 0, 40, 6, 2, 0,242, 8,
+ 7, 0,243, 8, 79, 1, 8, 0, 79, 1, 0, 0, 79, 1, 1, 0, 77, 1,244, 8, 36, 0, 80, 0, 12, 0, 92, 3, 4, 0, 19, 0,
+ 0, 0, 20, 0, 4, 0,245, 8, 80, 1, 5, 0, 80, 1, 0, 0, 80, 1, 1, 0, 36, 0, 80, 0, 2, 0, 19, 0, 0, 0,246, 8,
+ 81, 1, 14, 0, 81, 1, 0, 0, 81, 1, 1, 0, 9, 0, 2, 0, 2, 0, 17, 0, 2, 0, 19, 0, 0, 0,247, 8, 0, 0,248, 8,
+ 0, 0,246, 8, 7, 0,249, 8, 7, 0,250, 8, 4, 0, 37, 0, 36, 0, 80, 0, 7, 0,251, 8, 7, 0,252, 8, 82, 1, 9, 0,
+ 82, 1, 0, 0, 82, 1, 1, 0, 32, 0,253, 8, 0, 0,248, 2, 7, 0,254, 8, 2, 0,255, 8, 2, 0, 19, 0, 2, 0, 17, 0,
+ 2, 0, 0, 9, 83, 1, 7, 0, 42, 0, 93, 6, 26, 0,192, 8, 4, 0, 19, 0, 4, 0, 1, 9, 12, 0, 2, 9, 32, 0,253, 8,
+ 0, 0,248, 2, 84, 1, 15, 0, 32, 0,253, 8, 2, 0, 3, 9, 2, 0, 19, 0, 2, 0, 4, 9, 2, 0, 5, 9, 0, 0,248, 2,
+ 32, 0, 6, 9, 0, 0, 7, 9, 7, 0, 8, 9, 7, 0, 35, 2, 7, 0, 9, 9, 7, 0, 10, 9, 2, 0, 17, 0, 2, 0, 70, 1,
+ 7, 0, 77, 1, 85, 1, 6, 0, 32, 0,253, 8, 4, 0, 11, 9, 4, 0, 12, 9, 4, 0, 90, 0, 4, 0, 37, 0, 0, 0,248, 2,
+ 86, 1, 4, 0, 32, 0,253, 8, 4, 0, 19, 0, 4, 0, 11, 9, 0, 0,248, 2, 87, 1, 4, 0, 32, 0,253, 8, 4, 0, 19, 0,
+ 4, 0, 11, 9, 0, 0,248, 2, 88, 1, 10, 0, 32, 0,253, 8, 4, 0, 13, 9, 7, 0,125, 0, 4, 0, 19, 0, 2, 0, 89, 6,
+ 2, 0, 14, 9, 2, 0, 43, 0, 2, 0, 70, 0, 7, 0, 15, 9, 0, 0,248, 2, 89, 1, 4, 0, 32, 0,253, 8, 4, 0, 19, 0,
+ 4, 0, 11, 9, 0, 0,248, 2, 90, 1, 10, 0, 32, 0,253, 8, 2, 0, 17, 0, 2, 0, 30, 4, 4, 0, 88, 0, 4, 0, 89, 0,
+ 7, 0,111, 8, 7, 0,112, 8, 4, 0, 37, 0,159, 0, 85, 8, 0, 0,248, 2, 91, 1, 4, 0, 32, 0,253, 8, 4, 0,109, 3,
+ 4, 0, 16, 9, 0, 0,248, 2, 92, 1, 5, 0, 32, 0,253, 8, 7, 0,125, 0, 4, 0, 17, 9, 4, 0,109, 3, 4, 0,110, 3,
+ 93, 1, 6, 0, 32, 0,253, 8, 4, 0, 18, 9, 4, 0, 19, 9, 7, 0, 20, 9, 7, 0, 21, 9, 0, 0,248, 2, 94, 1, 16, 0,
+ 32, 0,253, 8, 32, 0,198, 8, 4, 0, 17, 0, 7, 0, 22, 9, 7, 0, 23, 9, 7, 0, 24, 9, 7, 0, 25, 9, 7, 0, 26, 9,
+ 7, 0, 27, 9, 7, 0, 28, 9, 7, 0, 29, 9, 7, 0, 30, 9, 2, 0, 19, 0, 2, 0, 37, 0, 2, 0, 43, 0, 2, 0, 70, 0,
+ 95, 1, 3, 0, 32, 0,253, 8, 4, 0, 19, 0, 4, 0, 27, 2, 96, 1, 5, 0, 32, 0,253, 8, 4, 0, 19, 0, 4, 0, 37, 0,
+ 7, 0, 31, 9, 0, 0,248, 2, 97, 1, 10, 0, 32, 0,253, 8, 0, 0,248, 2, 2, 0, 32, 9, 2, 0, 33, 9, 0, 0, 34, 9,
+ 0, 0, 35, 9, 7, 0, 36, 9, 7, 0, 37, 9, 7, 0, 38, 9, 7, 0, 39, 9, 98, 1, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0,
+ 7, 0, 11, 0, 7, 0, 12, 0, 7, 0, 40, 9, 7, 0, 41, 9, 2, 0, 19, 0, 2, 0, 27, 2, 99, 1, 8, 0, 7, 0, 9, 0,
+ 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 12, 0, 7, 0, 40, 9, 7, 0, 41, 9, 2, 0, 19, 0, 2, 0, 27, 2,100, 1, 8, 0,
+ 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 12, 0, 7, 0, 40, 9, 7, 0, 41, 9, 2, 0, 19, 0, 2, 0, 27, 2,
+101, 1, 7, 0, 32, 0,253, 8, 0, 0,248, 2, 7, 0, 77, 1, 7, 0, 86, 1, 2, 0, 19, 0, 2, 0, 70, 1, 4, 0, 37, 0,
+102, 1, 5, 0, 32, 0, 48, 3, 7, 0, 77, 1, 2, 0, 52, 3, 0, 0, 54, 3, 0, 0, 42, 9,103, 1, 10, 0,103, 1, 0, 0,
+103, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 0, 0, 43, 9, 7, 0, 21, 1, 7, 0, 22, 1, 2, 0,233, 8, 2, 0, 44, 9,
+ 32, 0, 45, 0,104, 1, 22, 0,104, 1, 0, 0,104, 1, 1, 0, 2, 0, 19, 0, 2, 0, 70, 1, 2, 0, 45, 9, 2, 0, 46, 9,
+ 36, 0, 80, 0,159, 0, 85, 8, 32, 0,164, 0, 7, 0, 88, 0, 7, 0, 89, 0, 7, 0, 47, 9, 7, 0, 48, 9, 7, 0, 49, 9,
+ 7, 0, 50, 9, 7, 0,234, 2, 7, 0, 51, 9, 7, 0, 87, 8, 7, 0, 52, 9, 0, 0, 53, 9, 0, 0, 54, 9, 12, 0, 94, 3,
+105, 1, 8, 0, 7, 0, 42, 2, 7, 0,111, 8, 7, 0,112, 8, 9, 0, 2, 0, 2, 0, 55, 9, 2, 0, 56, 9, 2, 0, 57, 9,
+ 2, 0, 58, 9,106, 1, 18, 0,106, 1, 0, 0,106, 1, 1, 0,106, 1, 59, 9, 0, 0, 20, 0,105, 1, 60, 9, 2, 0, 17, 0,
+ 2, 0, 19, 0, 2, 0, 61, 9, 2, 0, 62, 9, 2, 0, 63, 9, 2, 0, 64, 9, 4, 0, 43, 0, 7, 0, 65, 9, 7, 0, 66, 9,
+ 4, 0, 67, 9, 4, 0, 68, 9,106, 1, 69, 9,107, 1, 70, 9,108, 1, 34, 0,108, 1, 0, 0,108, 1, 1, 0,108, 1, 71, 9,
+ 0, 0, 20, 0, 0, 0, 72, 9, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,194, 7, 2, 0,227, 7, 2, 0, 73, 9, 2, 0,133, 0,
+ 2, 0, 62, 9, 2, 0,184, 7, 12, 0, 80, 8, 12, 0, 74, 9, 27, 0,123, 6, 9, 0, 75, 9, 7, 0, 65, 9, 7, 0, 66, 9,
+ 7, 0, 73, 2, 7, 0, 76, 9, 2, 0, 77, 9, 2, 0, 78, 9, 7, 0, 79, 9, 7, 0, 80, 9, 2, 0, 81, 9, 2, 0, 82, 9,
+ 9, 0, 83, 9, 24, 0, 84, 9, 24, 0, 85, 9, 24, 0, 86, 9,109, 1,150, 0,110, 1, 87, 9,111, 1, 88, 9,107, 1, 8, 0,
+107, 1, 0, 0,107, 1, 1, 0,108, 1, 89, 9,108, 1, 90, 9,106, 1, 91, 9,106, 1, 69, 9, 4, 0, 19, 0, 4, 0, 37, 0,
+ 61, 0, 20, 0, 27, 0, 31, 0, 39, 0, 75, 0, 12, 0, 92, 9, 12, 0, 93, 9,105, 1, 94, 9, 12, 0, 95, 9, 4, 0, 17, 0,
+ 4, 0, 96, 9, 4, 0, 97, 9, 4, 0, 98, 9, 12, 0, 99, 9,111, 1,100, 9,106, 1,101, 9,106, 1,102, 9, 9, 0,103, 9,
+ 9, 0,104, 9, 4, 0,105, 9, 9, 0,106, 9, 9, 0,107, 9, 9, 0,108, 9,112, 1, 6, 0, 4, 0,124, 0, 4, 0,126, 0,
+ 4, 0,184, 7, 0, 0,109, 9, 0, 0,110, 9, 2, 0, 37, 0,113, 1, 16, 0, 2, 0,140, 7, 2, 0,141, 7, 2, 0,111, 9,
+ 2, 0,135, 8, 2, 0,112, 9, 2, 0, 68, 0, 7, 0,233, 2, 7, 0,113, 9, 7, 0,114, 9, 2, 0, 90, 1, 0, 0,115, 9,
+ 0, 0, 96, 5, 2, 0,116, 9, 2, 0, 37, 0, 4, 0,117, 9, 4, 0,118, 9,114, 1, 9, 0, 7, 0,119, 9, 7, 0,120, 9,
+ 7, 0,154, 8, 7, 0,109, 0, 7, 0,121, 9, 7, 0, 52, 6, 2, 0,122, 9, 0, 0,123, 9, 0, 0, 37, 0,115, 1, 4, 0,
+ 7, 0,124, 9, 7, 0,125, 9, 2, 0,122, 9, 2, 0, 37, 0,116, 1, 3, 0, 7, 0,126, 9, 7, 0,127, 9, 7, 0, 15, 0,
+117, 1, 7, 0, 0, 0, 4, 2, 2, 0,226, 4, 2, 0,227, 4, 2, 0,228, 4, 2, 0,174, 4, 4, 0,126, 0, 4, 0, 28, 4,
+118, 1, 7, 0, 7, 0,128, 9, 7, 0,129, 9, 7, 0,130, 9, 7, 0, 84, 2, 7, 0,131, 9, 7, 0,132, 9, 7, 0,133, 9,
+119, 1, 4, 0, 2, 0,134, 9, 2, 0,135, 9, 2, 0,136, 9, 2, 0,137, 9,120, 1, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0,
+121, 1, 2, 0, 0, 0,166, 0, 0, 0,138, 9,122, 1, 1, 0, 0, 0, 20, 0,123, 1, 10, 0, 0, 0,139, 9, 0, 0,140, 9,
+ 0, 0, 45, 6, 0, 0,141, 9, 2, 0,111, 9, 2, 0,142, 9, 7, 0,143, 9, 7, 0,144, 9, 7, 0,145, 9, 7, 0, 51, 9,
+124, 1, 2, 0, 9, 0,146, 9, 9, 0,147, 9,125, 1, 11, 0, 0, 0,228, 4, 0, 0, 17, 0, 0, 0,122, 9, 0, 0,109, 0,
+ 0, 0,148, 9, 0, 0,106, 0, 0, 0, 69, 2, 7, 0,149, 9, 7, 0,150, 9, 7, 0,151, 9, 7, 0,152, 9,126, 1, 8, 0,
+ 7, 0, 45, 8, 7, 0,125, 0, 7, 0, 96, 5, 7, 0,155, 2, 7, 0,153, 9, 7, 0,236, 0, 7, 0,154, 9, 4, 0, 17, 0,
+127, 1, 4, 0, 2, 0,155, 9, 2, 0,156, 9, 2, 0,157, 9, 2, 0, 37, 0,128, 1, 1, 0, 0, 0, 20, 0,129, 1, 4, 0,
+ 7, 0, 5, 0, 7, 0, 6, 0, 2, 0, 19, 0, 2, 0,158, 9,130, 1, 10, 0, 2, 0,216, 3, 2, 0, 19, 0, 7, 0,110, 4,
+ 7, 0,159, 9, 7, 0,160, 9, 7, 0,161, 9, 7, 0,162, 9,129, 1,163, 9,129, 1,164, 9,129, 1,165, 9, 64, 0, 9, 0,
+ 4, 0, 19, 0, 4, 0, 64, 0, 24, 0,166, 9, 24, 0,167, 9,130, 1,168, 9, 7, 0,169, 9, 7, 0,170, 9, 7, 0,171, 9,
+ 7, 0,172, 9,131, 1, 4, 0, 47, 0,227, 2, 7, 0,173, 9, 7, 0,169, 1, 7, 0, 37, 0,189, 0, 17, 0, 27, 0, 31, 0,
+131, 1,174, 9, 64, 0,163, 9, 51, 0,133, 1, 2, 0, 19, 0, 2, 0,204, 5, 4, 0,106, 0, 7, 0,175, 9, 7, 0, 81, 2,
+ 4, 0,176, 9, 7, 0,177, 9, 7, 0,178, 9, 7, 0,179, 9, 7, 0,169, 1, 2, 0,103, 1, 0, 0,180, 9, 0, 0,181, 6,
+132, 1, 10, 0, 4, 0, 17, 0, 4, 0,125, 0, 4, 0, 19, 0, 4, 0,171, 3, 4, 0,181, 9, 4, 0,182, 9, 4, 0,183, 9,
+ 0, 0, 92, 0, 0, 0, 20, 0, 9, 0, 2, 0, 92, 0, 6, 0,132, 1,184, 9, 4, 0,185, 9, 4, 0,186, 9, 4, 0,187, 9,
+ 4, 0, 37, 0, 9, 0,188, 9,133, 1, 5, 0, 7, 0,150, 2, 7, 0,217, 2, 7, 0, 35, 2, 2, 0,189, 9, 2, 0, 37, 0,
+134, 1, 5, 0, 7, 0,150, 2, 7, 0,190, 9, 7, 0,191, 9, 7, 0,192, 9, 7, 0,217, 2,135, 1, 5, 0, 32, 0,193, 9,
+136, 1, 22, 0, 7, 0,177, 5, 7, 0,194, 9, 7, 0, 57, 0,137, 1, 7, 0, 4, 0,195, 9, 4, 0,196, 9, 4, 0,197, 9,
+ 7, 0,198, 9, 7, 0,199, 9, 7, 0,200, 9, 7, 0, 57, 0,138, 1, 8, 0,138, 1, 0, 0,138, 1, 1, 0, 32, 0, 45, 0,
+ 4, 0, 35, 3, 2, 0, 19, 0, 2, 0, 70, 1, 7, 0,217, 2, 7, 0, 53, 8,139, 1, 18, 0,134, 1,165, 3,134, 1,201, 9,
+133, 1,202, 9,134, 1, 37, 8,135, 1,203, 9, 4, 0, 82, 0, 7, 0,217, 2, 7, 0,244, 2, 7, 0,204, 9, 4, 0,195, 9,
+ 4, 0,205, 9, 7, 0,199, 9, 7, 0,200, 9, 7, 0,106, 0, 2, 0, 19, 0, 2, 0,206, 9, 2, 0,207, 9, 2, 0,208, 9,
+140, 1,107, 0, 27, 0, 31, 0, 39, 0, 75, 0,141, 1,209, 9,168, 0, 50, 4, 4, 0, 19, 0, 2, 0, 17, 0, 2, 0, 32, 9,
+ 2, 0,210, 9, 2, 0,211, 9, 2, 0,131, 3, 2, 0,212, 9, 2, 0,213, 9, 2, 0,214, 9, 2, 0,215, 9, 2, 0,216, 9,
+ 2, 0,217, 9, 2, 0,218, 9, 2, 0,216, 4, 2, 0, 89, 5, 2, 0,219, 9, 2, 0,220, 9, 2, 0,221, 9, 2, 0,222, 9,
+ 2, 0,223, 9, 2, 0, 24, 2, 2, 0, 30, 8, 2, 0, 6, 8, 2, 0,224, 9, 2, 0,225, 9, 2, 0,181, 3, 2, 0,182, 3,
+ 2, 0,226, 9, 2, 0,227, 9, 2, 0,228, 9, 2, 0,229, 9, 7, 0,230, 9, 7, 0,231, 9, 7, 0,232, 9, 2, 0,233, 9,
+ 2, 0,234, 9, 7, 0,235, 9, 7, 0,236, 9, 7, 0,237, 9, 7, 0, 12, 8, 7, 0, 89, 0, 7, 0,244, 2, 7, 0, 18, 8,
+ 7, 0,238, 9, 7, 0,239, 9, 7, 0,240, 9, 4, 0, 13, 8, 4, 0, 11, 8, 4, 0,241, 9, 7, 0, 14, 8, 7, 0, 15, 8,
+ 7, 0, 16, 8, 7, 0,242, 9, 7, 0,243, 9, 7, 0,244, 9, 7, 0,245, 9, 7, 0,246, 9, 7, 0,247, 9, 7, 0,248, 9,
+ 7, 0,249, 9, 7, 0,122, 3, 7, 0,106, 0, 7, 0,250, 9, 7, 0,251, 9, 7, 0,252, 9, 7, 0,253, 9, 7, 0,254, 9,
+ 7, 0,255, 9, 7, 0, 0, 10, 4, 0, 1, 10, 4, 0, 2, 10, 7, 0, 3, 10, 7, 0, 4, 10, 7, 0, 5, 10, 7, 0, 6, 10,
+ 7, 0, 7, 10, 7, 0,210, 0, 7, 0, 8, 10, 7, 0,207, 3, 7, 0,205, 3, 7, 0,206, 3, 7, 0, 9, 10, 7, 0, 10, 10,
+ 7, 0, 11, 10, 7, 0, 12, 10, 7, 0, 13, 10, 7, 0, 14, 10, 7, 0, 15, 10, 7, 0, 16, 10, 7, 0, 17, 10, 7, 0, 18, 10,
+ 7, 0, 19, 10, 7, 0, 20, 10, 7, 0, 21, 10, 4, 0, 22, 10, 4, 0, 23, 10, 68, 0,154, 3, 68, 0, 24, 10, 32, 0, 25, 10,
+ 32, 0, 26, 10, 36, 0, 80, 0,163, 0, 62, 1,163, 0, 27, 10, 59, 0, 44, 0, 59, 0, 0, 0, 59, 0, 1, 0,140, 1, 28, 10,
+139, 1, 29, 10,137, 1,198, 8,170, 0,232, 3, 9, 0,233, 3,142, 1, 30, 10,142, 1, 31, 10, 12, 0, 32, 10, 12, 0, 33, 10,
+134, 0, 34, 10,142, 0, 35, 10,142, 0, 36, 10, 32, 0, 37, 10, 32, 0, 38, 10, 32, 0, 38, 0, 12, 0, 2, 9, 0, 0, 20, 0,
+ 7, 0,240, 0, 7, 0, 15, 3, 7, 0, 39, 10, 4, 0,191, 2, 4, 0, 57, 0, 4, 0, 19, 0, 4, 0, 13, 8, 4, 0, 40, 10,
+ 4, 0, 41, 10, 4, 0, 42, 10, 2, 0,247, 0, 2, 0, 43, 10, 2, 0, 44, 10, 2, 0, 45, 10, 0, 0, 46, 10, 2, 0, 47, 10,
+ 2, 0, 48, 10, 2, 0, 49, 10, 9, 0, 50, 10,138, 0, 49, 4, 12, 0, 2, 3, 12, 0, 51, 10,143, 1, 52, 10,144, 1, 53, 10,
+ 7, 0, 54, 10,136, 0, 35, 0,145, 1,155, 8, 7, 0, 19, 4, 7, 0, 55, 10, 7, 0, 56, 10, 7, 0,113, 4, 7, 0, 57, 10,
+ 7, 0,132, 3, 7, 0,122, 3, 7, 0, 58, 10, 7, 0, 83, 2, 7, 0, 59, 10, 7, 0, 60, 10, 7, 0, 61, 10, 7, 0, 62, 10,
+ 7, 0, 63, 10, 7, 0, 64, 10, 7, 0, 20, 4, 7, 0, 65, 10, 7, 0, 66, 10, 7, 0, 67, 10, 7, 0, 21, 4, 7, 0, 17, 4,
+ 7, 0, 18, 4, 7, 0, 68, 10, 4, 0, 69, 10, 4, 0, 90, 0, 4, 0, 70, 10, 4, 0, 71, 10, 2, 0, 72, 10, 2, 0, 73, 10,
+ 2, 0, 74, 10, 2, 0, 75, 10, 2, 0, 76, 10, 2, 0, 37, 0,168, 0, 50, 4,137, 0, 8, 0,145, 1, 77, 10, 7, 0, 78, 10,
+ 7, 0, 79, 10, 7, 0,241, 1, 7, 0, 80, 10, 4, 0, 90, 0, 2, 0, 81, 10, 2, 0, 82, 10,146, 1, 4, 0, 7, 0, 5, 0,
+ 7, 0, 6, 0, 7, 0, 7, 0, 7, 0, 83, 10,147, 1, 6, 0,147, 1, 0, 0,147, 1, 1, 0,146, 1,189, 8, 4, 0,253, 0,
+ 2, 0, 84, 10, 2, 0, 19, 0,148, 1, 5, 0,148, 1, 0, 0,148, 1, 1, 0, 12, 0, 85, 10, 4, 0, 86, 10, 4, 0, 19, 0,
+149, 1, 9, 0,149, 1, 0, 0,149, 1, 1, 0, 12, 0,124, 0,148, 1, 87, 10, 4, 0, 19, 0, 2, 0, 84, 10, 2, 0, 88, 10,
+ 7, 0, 91, 0, 0, 0, 89, 10,161, 0, 6, 0, 27, 0, 31, 0, 12, 0,242, 4, 4, 0, 19, 0, 2, 0, 90, 10, 2, 0, 91, 10,
+ 9, 0, 92, 10,150, 1, 7, 0,150, 1, 0, 0,150, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 23, 0, 0, 0, 93, 10,
+ 0, 0, 94, 10,151, 1, 5, 0, 12, 0, 95, 10, 4, 0, 96, 10, 4, 0, 97, 10, 4, 0, 19, 0, 4, 0, 37, 0,152, 1, 13, 0,
+ 27, 0, 31, 0,153, 1, 98, 10,153, 1, 99, 10, 12, 0,100, 10, 4, 0,101, 10, 2, 0,102, 10, 2, 0, 37, 0, 12, 0,103, 10,
+ 12, 0,104, 10,151, 1,105, 10, 12, 0,106, 10, 12, 0,107, 10, 12, 0,108, 10,153, 1, 31, 0,153, 1, 0, 0,153, 1, 1, 0,
+ 9, 0,109, 10, 4, 0,119, 7, 4, 0, 37, 0,214, 0, 34, 6,214, 0,110, 10, 0, 0,111, 10, 2, 0,112, 10, 2, 0,113, 10,
+ 2, 0,140, 7, 2, 0,141, 7, 2, 0,114, 10, 2, 0,115, 10, 2, 0,171, 3, 2, 0,149, 6, 2, 0,116, 10, 2, 0,117, 10,
+ 4, 0,237, 1,154, 1,118, 10,155, 1,119, 10,156, 1,120, 10, 4, 0,121, 10, 4, 0,122, 10, 9, 0,123, 10, 12, 0,124, 10,
+ 12, 0,104, 10, 12, 0,158, 7, 12, 0,125, 10, 12, 0,126, 10, 12, 0,127, 10,157, 1, 16, 0,157, 1, 0, 0,157, 1, 1, 0,
+ 0, 0,128, 10,158, 1,129, 10, 2, 0, 17, 0, 2, 0, 15, 0, 2, 0,130, 10, 2, 0,131, 10, 2, 0,132, 10, 2, 0,133, 10,
+ 2, 0,134, 10, 2, 0,135, 10, 2, 0,136, 10, 2, 0,137, 10, 2, 0, 70, 0, 2, 0,237, 1,159, 1, 10, 0,159, 1, 0, 0,
+159, 1, 1, 0, 12, 0,138, 10, 0, 0,139, 10, 2, 0,140, 10, 2, 0,141, 10, 2, 0,142, 10, 2, 0, 37, 0, 9, 0,143, 10,
+ 4, 0,144, 10,222, 0, 12, 0,222, 0, 0, 0,222, 0, 1, 0, 0, 0,128, 10, 26, 0, 30, 0,160, 1,134, 7, 9, 0,145, 10,
+158, 1,129, 10,151, 1,146, 10, 12, 0,147, 10,222, 0,148, 10, 2, 0, 19, 0, 2, 0,135, 1,154, 1, 23, 0,154, 1, 0, 0,
+154, 1, 1, 0, 2, 0, 17, 0, 2, 0, 15, 0, 2, 0, 5, 0, 2, 0, 6, 0, 2, 0,149, 10, 2, 0,150, 10, 2, 0,151, 10,
+ 2, 0,152, 10, 0, 0,153, 10, 0, 0, 37, 0, 2, 0,130, 10, 2, 0,131, 10, 2, 0,132, 10, 2, 0,133, 10, 2, 0,134, 10,
+ 2, 0, 43, 0, 0, 0,154, 10, 2, 0,155, 10, 2, 0,156, 10, 4, 0, 70, 0, 9, 0,145, 10,161, 1, 8, 0,161, 1, 0, 0,
+161, 1, 1, 0, 9, 0, 2, 0, 9, 0,157, 10, 0, 0,227, 3, 2, 0, 17, 0, 2, 0, 19, 0, 7, 0,158, 10,162, 1, 5, 0,
+ 7, 0,159, 10, 4, 0,160, 10, 4, 0,161, 10, 4, 0, 70, 1, 4, 0, 19, 0,163, 1, 6, 0, 7, 0,162, 10, 7, 0,163, 10,
+ 7, 0,164, 10, 7, 0,165, 10, 4, 0, 17, 0, 4, 0, 19, 0,164, 1, 5, 0, 7, 0,111, 8, 7, 0,112, 8, 7, 0,217, 2,
+ 2, 0, 38, 2, 2, 0, 39, 2,165, 1, 5, 0,164, 1, 2, 0, 4, 0, 54, 0, 7, 0,166, 10, 7, 0,111, 8, 7, 0,112, 8,
+166, 1, 4, 0, 2, 0,167, 10, 2, 0,168, 10, 2, 0,169, 10, 2, 0,170, 10,167, 1, 2, 0, 42, 0,120, 6, 26, 0,192, 8,
+168, 1, 3, 0, 24, 0,171, 10, 4, 0, 19, 0, 4, 0, 37, 0,169, 1, 6, 0, 7, 0,106, 0, 7, 0,219, 2, 7, 0,172, 10,
+ 7, 0, 37, 0, 2, 0,246, 0, 2, 0,173, 10,170, 1, 7, 0,170, 1, 0, 0,170, 1, 1, 0, 27, 0,123, 6, 0, 0,174, 10,
+ 4, 0,175, 10, 4, 0, 90, 0, 0, 0,227, 3,171, 1, 6, 0, 12, 0, 2, 9, 0, 0,176, 10, 7, 0, 61, 0, 7, 0,158, 10,
+ 4, 0, 17, 0, 4, 0, 19, 0,172, 1, 3, 0, 7, 0,177, 10, 4, 0, 19, 0, 4, 0, 37, 0,173, 1, 15, 0,173, 1, 0, 0,
+173, 1, 1, 0, 77, 1,244, 8,171, 1, 62, 0, 12, 0, 94, 3, 35, 0, 50, 0,172, 1,178, 10, 4, 0, 54, 0, 7, 0, 61, 0,
+ 2, 0, 19, 0, 2, 0, 16, 1, 4, 0,175, 10, 0, 0,174, 10, 4, 0,179, 10, 7, 0,180, 10,174, 1, 2, 0, 0, 0,181, 10,
+ 0, 0,182, 10,175, 1, 4, 0,175, 1, 0, 0,175, 1, 1, 0,159, 0, 48, 3, 12, 0,183, 10,176, 1, 24, 0,176, 1, 0, 0,
+176, 1, 1, 0, 12, 0,184, 10,159, 0, 85, 8,175, 1,185, 10, 12, 0,186, 10, 12, 0, 94, 3, 0, 0,227, 3, 7, 0,158, 10,
+ 7, 0,187, 10, 7, 0, 88, 0, 7, 0, 89, 0, 7, 0, 47, 9, 7, 0, 48, 9, 7, 0,234, 2, 7, 0, 51, 9, 7, 0, 87, 8,
+ 7, 0, 52, 9, 2, 0,188, 10, 2, 0,189, 10, 2, 0, 43, 0, 2, 0, 17, 0, 4, 0, 19, 0, 4, 0, 70, 0,177, 1, 6, 0,
+177, 1, 0, 0,177, 1, 1, 0, 12, 0,184, 10, 4, 0, 19, 0, 4, 0,154, 2, 0, 0,227, 3,178, 1, 10, 0,178, 1, 0, 0,
+178, 1, 1, 0, 27, 0,123, 6, 0, 0,190, 10, 4, 0,191, 10, 4, 0,192, 10, 0, 0,174, 10, 4, 0,175, 10, 2, 0, 19, 0,
+ 2, 0,193, 10,179, 1, 7, 0,179, 1, 0, 0,179, 1, 1, 0, 12, 0,194, 10, 0, 0,227, 3, 2, 0, 19, 0, 2, 0,195, 10,
+ 4, 0,196, 10,180, 1, 5, 0,180, 1, 0, 0,180, 1, 1, 0, 0, 0,174, 10, 4, 0,175, 10, 7, 0,207, 2, 39, 0, 12, 0,
+159, 0, 88, 3,159, 0,197, 10,175, 1,185, 10, 12, 0,198, 10,176, 1,199, 10, 12, 0,200, 10, 12, 0,201, 10, 4, 0, 19, 0,
+ 4, 0,247, 0, 2, 0,202, 10, 2, 0,203, 10, 7, 0,204, 10,181, 1, 2, 0, 27, 0, 31, 0, 39, 0, 75, 0,182, 1, 5, 0,
+182, 1, 0, 0,182, 1, 1, 0, 4, 0, 17, 0, 4, 0, 19, 0, 0, 0, 20, 0,183, 1, 6, 0,182, 1,205, 10, 32, 0, 45, 0,
+ 4, 0,206, 10, 7, 0,207, 10, 4, 0,208, 10, 4, 0,233, 8,184, 1, 3, 0,182, 1,205, 10, 4, 0,206, 10, 7, 0,209, 10,
+185, 1, 8, 0,182, 1,205, 10, 32, 0, 45, 0, 7, 0, 65, 1, 7, 0,210, 10, 7, 0, 15, 3, 7, 0,154, 8, 4, 0,206, 10,
+ 4, 0,211, 10,186, 1, 5, 0,182, 1,205, 10, 7, 0,212, 10, 7, 0,227, 7, 7, 0,240, 2, 7, 0, 57, 0,187, 1, 3, 0,
+182, 1,205, 10, 7, 0,154, 8, 7, 0,213, 10,136, 1, 4, 0, 7, 0,214, 10, 7, 0,252, 9, 2, 0,215, 10, 2, 0, 70, 1,
+188, 1, 14, 0,188, 1, 0, 0,188, 1, 1, 0, 12, 0,216, 10, 12, 0,217, 10, 12, 0,218, 10, 0, 0, 20, 0, 4, 0, 31, 0,
+ 4, 0, 19, 0, 4, 0,219, 10, 7, 0,220, 10, 4, 0,208, 10, 4, 0,233, 8, 7, 0,236, 3, 7, 0,242, 2,141, 1, 23, 0,
+ 4, 0,206, 10, 4, 0,221, 10, 7, 0,222, 10, 7, 0, 57, 0, 7, 0,223, 10, 7, 0,238, 2, 7, 0,214, 10, 7, 0,224, 10,
+ 7, 0,219, 2, 7, 0,225, 10, 7, 0,110, 4, 7, 0,226, 10, 7, 0,227, 10, 7, 0,228, 10, 7, 0,229, 10, 7, 0,230, 10,
+ 7, 0,231, 10, 7, 0,232, 10, 7, 0,233, 10, 7, 0,234, 10, 7, 0,235, 10, 7, 0,236, 10, 12, 0,237, 10,122, 0, 33, 0,
+121, 0,238, 10,189, 1,239, 10, 68, 0,240, 10, 68, 0, 24, 10, 68, 0,241, 10,190, 1,242, 10, 48, 0,165, 0, 48, 0,243, 10,
+ 48, 0,244, 10, 7, 0,245, 10, 7, 0,246, 10, 7, 0,247, 10, 7, 0,248, 10, 7, 0,249, 10, 7, 0,245, 8, 7, 0,250, 10,
+ 7, 0,169, 1, 7, 0,251, 10, 4, 0,252, 10, 4, 0,253, 10, 4, 0,254, 10, 4, 0, 90, 0, 4, 0, 37, 0, 4, 0,255, 10,
+ 2, 0, 0, 11, 2, 0, 1, 11, 4, 0, 2, 11, 7, 0,219, 2, 4, 0, 3, 11, 7, 0, 4, 11, 4, 0, 5, 11,138, 0, 6, 11,
+ 12, 0, 7, 11,123, 0, 11, 0,121, 0,238, 10, 59, 0,255, 0, 7, 0,136, 1, 7, 0,245, 8, 7, 0, 8, 11, 7, 0, 9, 11,
+ 2, 0, 10, 11, 2, 0, 11, 11, 2, 0, 12, 11, 2, 0, 17, 0, 4, 0, 37, 0,124, 0, 13, 0,121, 0,238, 10,140, 0, 12, 3,
+142, 0, 14, 3, 7, 0,189, 8, 7, 0, 13, 11, 7, 0, 14, 11, 7, 0, 67, 1, 7, 0, 15, 11, 4, 0, 16, 11, 4, 0, 10, 3,
2, 0, 17, 0, 2, 0, 37, 0, 4, 0, 70, 0, 69, 78, 68, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0};
diff --git a/source/blender/editors/datafiles/blenderbuttons.c b/source/blender/editors/datafiles/blenderbuttons.c
index cfd526d82ef..8b8c349e851 100644
--- a/source/blender/editors/datafiles/blenderbuttons.c
+++ b/source/blender/editors/datafiles/blenderbuttons.c
@@ -1,5710 +1,6114 @@
-/* DataToC output of file <blenderbuttons> */
+/* DataToC output of file </Users/William/blender25/blender/release/datafiles/blenderbuttons> */
-int datatoc_blenderbuttons_size= 182512;
+int datatoc_blenderbuttons_size= 195438;
char datatoc_blenderbuttons[]= {
-137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82,
- 0, 0, 2, 88, 0, 0, 2,128, 8, 6, 0, 0, 0, 64, 11, 6,158, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,
-215, 1, 66, 40,155,120, 0, 0, 10, 79,105, 67, 67, 80, 80,104,111,116,111,115,104,111,112, 32, 73, 67, 67, 32,112,114,111,102,
-105,108,101, 0, 0,120,218,157, 83,103, 84, 83,233, 22, 61,247,222,244, 66, 75,136,128,148, 75,111, 82, 21, 8, 32, 82, 66,139,
-128, 20,145, 38, 42, 33, 9, 16, 74,136, 33,161,217, 21, 81,193, 17, 69, 69, 4, 27,200,160,136, 3,142,142,128,140, 21, 81, 44,
- 12,138, 10,216, 7,228, 33,162,142,131,163,136,138,202,251,225,123,163,107,214,188,247,230,205,254,181,215, 62,231,172,243,157,
-179,207, 7,192, 8, 12,150, 72, 51, 81, 53,128, 12,169, 66, 30, 17,224,131,199,196,198,225,228, 46, 64,129, 10, 36,112, 0, 16,
- 8,179,100, 33,115,253, 35, 1, 0,248,126, 60, 60, 43, 34,192, 7,190, 0, 1,120,211, 11, 8, 0,192, 77,155,192, 48, 28,135,
-255, 15,234, 66,153, 92, 1,128,132, 1,192,116,145, 56, 75, 8,128, 20, 0, 64,122,142, 66,166, 0, 64, 70, 1,128,157,152, 38,
- 83, 0,160, 4, 0, 96,203, 99, 98,227, 0, 80, 45, 0, 96, 39,127,230,211, 0,128,157,248,153,123, 1, 0, 91,148, 33, 21, 1,
-160,145, 0, 32, 19,101,136, 68, 0,104, 59, 0,172,207, 86,138, 69, 0, 88, 48, 0, 20,102, 75,196, 57, 0,216, 45, 0, 48, 73,
- 87,102, 72, 0,176,183, 0,192,206, 16, 11,178, 0, 8, 12, 0, 48, 81,136,133, 41, 0, 4,123, 0, 96,200, 35, 35,120, 0,132,
-153, 0, 20, 70,242, 87, 60,241, 43,174, 16,231, 42, 0, 0,120,153,178, 60,185, 36, 57, 69,129, 91, 8, 45,113, 7, 87, 87, 46,
- 30, 40,206, 73, 23, 43, 20, 54, 97, 2, 97,154, 64, 46,194,121,153, 25, 50,129, 52, 15,224,243,204, 0, 0,160,145, 21, 17,224,
-131,243,253,120,206, 14,174,206,206, 54,142,182, 14, 95, 45,234,191, 6,255, 34, 98, 98,227,254,229,207,171,112, 64, 0, 0,225,
-116,126,209,254, 44, 47,179, 26,128, 59, 6,128,109,254,162, 37,238, 4,104, 94, 11,160,117,247,139,102,178, 15, 64,181, 0,160,
-233,218, 87,243,112,248,126, 60, 60, 69,161,144,185,217,217,229,228,228,216, 74,196, 66, 91, 97,202, 87,125,254,103,194, 95,192,
- 87,253,108,249,126, 60,252,247,245,224,190,226, 36,129, 50, 93,129, 71, 4,248,224,194,204,244, 76,165, 28,207,146, 9,132, 98,
-220,230,143, 71,252,183, 11,255,252, 29,211, 34,196, 73, 98,185, 88, 42, 20,227, 81, 18,113,142, 68,154,140,243, 50,165, 34,137,
- 66,146, 41,197, 37,210,255,100,226,223, 44,251, 3, 62,223, 53, 0,176,106, 62, 1,123,145, 45,168, 93, 99, 3,246, 75, 39, 16,
- 88,116,192,226,247, 0, 0,242,187,111,193,212, 40, 8, 3,128,104,131,225,207,119,255,239, 63,253, 71,160, 37, 0,128,102, 73,
-146,113, 0, 0, 94, 68, 36, 46, 84,202,179, 63,199, 8, 0, 0, 68,160,129, 42,176, 65, 27,244,193, 24, 44,192, 6, 28,193, 5,
-220,193, 11,252, 96, 54,132, 66, 36,196,194, 66, 16, 66, 10,100,128, 28,114, 96, 41,172,130, 66, 40,134,205,176, 29, 42, 96, 47,
-212, 64, 29, 52,192, 81,104,134,147,112, 14, 46,194, 85,184, 14, 61,112, 15,250, 97, 8,158,193, 40,188,129, 9, 4, 65,200, 8,
- 19, 97, 33,218,136, 1, 98,138, 88, 35,142, 8, 23,153,133,248, 33,193, 72, 4, 18,139, 36, 32,201,136, 20, 81, 34, 75,145, 53,
- 72, 49, 82,138, 84, 32, 85, 72, 29,242, 61,114, 2, 57,135, 92, 70,186,145, 59,200, 0, 50,130,252,134,188, 71, 49,148,129,178,
- 81, 61,212, 12,181, 67,185,168, 55, 26,132, 70,162, 11,208,100,116, 49,154,143, 22,160,155,208,114,180, 26, 61,140, 54,161,231,
-208,171,104, 15,218,143, 62, 67,199, 48,192,232, 24, 7, 51,196,108, 48, 46,198,195, 66,177, 56, 44, 9,147, 99,203,177, 34,172,
- 12,171,198, 26,176, 86,172, 3,187,137,245, 99,207,177,119, 4, 18,129, 69,192, 9, 54, 4,119, 66, 32, 97, 30, 65, 72, 88, 76,
- 88, 78,216, 72,168, 32, 28, 36, 52, 17,218, 9, 55, 9, 3,132, 81,194, 39, 34,147,168, 75,180, 38,186, 17,249,196, 24, 98, 50,
- 49,135, 88, 72, 44, 35,214, 18,143, 19, 47, 16,123,136, 67,196, 55, 36, 18,137, 67, 50, 39,185,144, 2, 73,177,164, 84,210, 18,
-210, 70,210,110, 82, 35,233, 44,169,155, 52, 72, 26, 35,147,201,218,100,107,178, 7, 57,148, 44, 32, 43,200,133,228,157,228,195,
-228, 51,228, 27,228, 33,242, 91, 10,157, 98, 64,113,164,248, 83,226, 40, 82,202,106, 74, 25,229, 16,229, 52,229, 6,101,152, 50,
- 65, 85,163,154, 82,221,168,161, 84, 17, 53,143, 90, 66,173,161,182, 82,175, 81,135,168, 19, 52,117,154, 57,205,131, 22, 73, 75,
-165,173,162,149,211, 26,104, 23,104,247,105,175,232,116,186, 17,221,149, 30, 78,151,208, 87,210,203,233, 71,232,151,232, 3,244,
-119, 12, 13,134, 21,131,199,136,103, 40, 25,155, 24, 7, 24,103, 25,119, 24,175,152, 76,166, 25,211,139, 25,199, 84, 48, 55, 49,
-235,152,231,153, 15,153,111, 85, 88, 42,182, 42,124, 21,145,202, 10,149, 74,149, 38,149, 27, 42, 47, 84,169,170,166,170,222,170,
- 11, 85,243, 85,203, 84,143,169, 94, 83,125,174, 70, 85, 51, 83,227,169, 9,212,150,171, 85,170,157, 80,235, 83, 27, 83,103,169,
- 59,168,135,170,103,168,111, 84, 63,164,126, 89,253,137, 6, 89,195, 76,195, 79, 67,164, 81,160,177, 95,227,188,198, 32, 11, 99,
- 25,179,120, 44, 33,107, 13,171,134,117,129, 53,196, 38,177,205,217,124,118, 42,187,152,253, 29,187,139, 61,170,169,161, 57, 67,
- 51, 74, 51, 87,179, 82,243,148,102, 63, 7,227,152,113,248,156,116, 78, 9,231, 40,167,151,243,126,138,222, 20,239, 41,226, 41,
- 27,166, 52, 76,185, 49,101, 92,107,170,150,151,150, 88,171, 72,171, 81,171, 71,235,189, 54,174,237,167,157,166,189, 69,187, 89,
-251,129, 14, 65,199, 74, 39, 92, 39, 71,103,143,206, 5,157,231, 83,217, 83,221,167, 10,167, 22, 77, 61, 58,245,174, 46,170,107,
-165, 27,161,187, 68,119,191,110,167,238,152,158,190, 94,128,158, 76,111,167,222,121,189,231,250, 28,125, 47,253, 84,253,109,250,
-167,245, 71, 12, 88, 6,179, 12, 36, 6,219, 12,206, 24, 60,197, 53,113,111, 60, 29, 47,199,219,241, 81, 67, 93,195, 64, 67,165,
- 97,149, 97,151,225,132,145,185,209, 60,163,213, 70,141, 70, 15,140,105,198, 92,227, 36,227,109,198,109,198,163, 38, 6, 38, 33,
- 38, 75, 77,234, 77,238,154, 82, 77,185,166, 41,166, 59, 76, 59, 76,199,205,204,205,162,205,214,153, 53,155, 61, 49,215, 50,231,
-155,231,155,215,155,223,183, 96, 90,120, 90, 44,182,168,182,184,101, 73,178,228, 90,166, 89,238,182,188,110,133, 90, 57, 89,165,
- 88, 85, 90, 93,179, 70,173,157,173, 37,214,187,173,187,167, 17,167,185, 78,147, 78,171,158,214,103,195,176,241,182,201,182,169,
-183, 25,176,229,216, 6,219,174,182,109,182,125, 97,103, 98, 23,103,183,197,174,195,238,147,189,147,125,186,125,141,253, 61, 7,
- 13,135,217, 14,171, 29, 90, 29,126,115,180,114, 20, 58, 86, 58,222,154,206,156,238, 63,125,197,244,150,233, 47,103, 88,207, 16,
-207,216, 51,227,182, 19,203, 41,196,105,157, 83,155,211, 71,103, 23,103,185,115,131,243,136,139,137, 75,130,203, 46,151, 62, 46,
-155, 27,198,221,200,189,228, 74,116,245,113, 93,225,122,210,245,157,155,179,155,194,237,168,219,175,238, 54,238,105,238,135,220,
-159,204, 52,159, 41,158, 89, 51,115,208,195,200, 67,224, 81,229,209, 63, 11,159,149, 48,107,223,172,126, 79, 67, 79,129,103,181,
-231, 35, 47, 99, 47,145, 87,173,215,176,183,165,119,170,247, 97,239, 23, 62,246, 62,114,159,227, 62,227, 60, 55,222, 50,222, 89,
- 95,204, 55,192,183,200,183,203, 79,195,111,158, 95,133,223, 67,127, 35,255,100,255,122,255,209, 0,167,128, 37, 1,103, 3,137,
-129, 65,129, 91, 2,251,248,122,124, 33,191,142, 63, 58,219,101,246,178,217,237, 65,140,160,185, 65, 21, 65,143,130,173,130,229,
-193,173, 33,104,200,236,144,173, 33,247,231,152,206,145,206,105, 14,133, 80,126,232,214,208, 7, 97,230, 97,139,195,126, 12, 39,
-133,135,133, 87,134, 63,142,112,136, 88, 26,209, 49,151, 53,119,209,220, 67,115,223, 68,250, 68,150, 68,222,155,103, 49, 79, 57,
-175, 45, 74, 53, 42, 62,170, 46,106, 60,218, 55,186, 52,186, 63,198, 46,102, 89,204,213, 88,157, 88, 73,108, 75, 28, 57, 46, 42,
-174, 54,110,108,190,223,252,237,243,135,226,157,226, 11,227,123, 23,152, 47,200, 93,112,121,161,206,194,244,133,167, 22,169, 46,
- 18, 44, 58,150, 64, 76,136, 78, 56,148,240, 65, 16, 42,168, 22,140, 37,242, 19,119, 37,142, 10,121,194, 29,194,103, 34, 47,209,
- 54,209,136,216, 67, 92, 42, 30, 78,242, 72, 42, 77,122,146,236,145,188, 53,121, 36,197, 51,165, 44,229,185,132, 39,169,144,188,
- 76, 13, 76,221,155, 58,158, 22,154,118, 32,109, 50, 61, 58,189, 49,131,146,145,144,113, 66,170, 33, 77,147,182,103,234,103,230,
-102,118,203,172,101,133,178,254,197,110,139,183, 47, 30,149, 7,201,107,179,144,172, 5, 89, 45, 10,182, 66,166,232, 84, 90, 40,
-215, 42, 7,178,103,101, 87,102,191,205,137,202, 57,150,171,158, 43,205,237,204,179,202,219,144, 55,156,239,159,255,237, 18,194,
- 18,225,146,182,165,134, 75, 87, 45, 29, 88,230,189,172,106, 57,178, 60,113,121,219, 10,227, 21, 5, 43,134, 86, 6,172, 60,184,
-138,182, 42,109,213, 79,171,237, 87,151,174,126,189, 38,122, 77,107,129, 94,193,202,130,193,181, 1,107,235, 11, 85, 10,229,133,
-125,235,220,215,237, 93, 79, 88, 47, 89,223,181, 97,250,134,157, 27, 62, 21,137,138,174, 20,219, 23,151, 21,127,216, 40,220,120,
-229, 27,135,111,202,191,153,220,148,180,169,171,196,185,100,207,102,210,102,233,230,222, 45,158, 91, 14,150,170,151,230,151, 14,
-110, 13,217,218,180, 13,223, 86,180,237,245,246, 69,219, 47,151,205, 40,219,187,131,182, 67,185,163,191, 60,184,188,101,167,201,
-206,205, 59, 63, 84,164, 84,244, 84,250, 84, 54,238,210,221,181, 97,215,248,110,209,238, 27,123,188,246, 52,236,213,219, 91,188,
-247,253, 62,201,190,219, 85, 1, 85, 77,213,102,213,101,251, 73,251,179,247, 63,174,137,170,233,248,150,251,109, 93,173, 78,109,
-113,237,199, 3,210, 3,253, 7, 35, 14,182,215,185,212,213, 29,210, 61, 84, 82,143,214, 43,235, 71, 14,199, 31,190,254,157,239,
-119, 45, 13, 54, 13, 85,141,156,198,226, 35,112, 68,121,228,233,247, 9,223,247, 30, 13, 58,218,118,140,123,172,225, 7,211, 31,
-118, 29,103, 29, 47,106, 66,154,242,154, 70,155, 83,154,251, 91, 98, 91,186, 79,204, 62,209,214,234,222,122,252, 71,219, 31, 15,
-156, 52, 60, 89,121, 74,243, 84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, 46,249,220, 96,219,162,182,123,
-231, 99,206,223,106, 15,111,239,186, 16,116,225,210, 69,255,139,231, 59,188, 59,206, 92,242,184,116,242,178,219,229, 19, 87,184,
- 87,154,175, 58, 95,109,234,116,234, 60,254,147,211, 79,199,187,156,187,154,174,185, 92,107,185,238,122,189,181,123,102,247,233,
- 27,158, 55,206,221,244,189,121,241, 22,255,214,213,158, 57, 61,221,189,243,122,111,247,197,247,245,223, 22,221,126,114, 39,253,
-206,203,187,217,119, 39,238,173,188, 79,188, 95,244, 64,237, 65,217, 67,221,135,213, 63, 91,254,220,216,239,220,127,106,192,119,
-160,243,209,220, 71,247, 6,133,131,207,254,145,245,143, 15, 67, 5,143,153,143,203,134, 13,134,235,158, 56, 62, 57, 57,226, 63,
-114,253,233,252,167, 67,207,100,207, 38,158, 23,254,162,254,203,174, 23, 22, 47,126,248,213,235,215,206,209,152,209,161,151,242,
-151,147,191,109,124,165,253,234,192,235, 25,175,219,198,194,198, 30,190,201,120, 51, 49, 94,244, 86,251,237,193,119,220,119, 29,
-239,163,223, 15, 79,228,124, 32,127, 40,255,104,249,177,245, 83,208,167,251,147, 25,147,147,255, 4, 3,152,243,252, 99, 51, 45,
-219, 0, 0, 0, 32, 99, 72, 82, 77, 0, 0,122, 37, 0, 0,128,131, 0, 0,249,255, 0, 0,128,233, 0, 0,117, 48, 0, 0,234,
- 96, 0, 0, 58,152, 0, 0, 23,111,146, 95,197, 70, 0, 2,190, 27, 73, 68, 65, 84,120,218,236,157,119,120, 20,197, 31,198,223,
-217,221,235,119,233, 33, 61,144,132, 26, 8, 61,116, 66,111, 34, 77, 69,186, 10, 22, 64,129,159, 32,205,134, 32,130, 93, 1,149,
-174, 34, 32, 34, 72, 85,148, 42,189, 73,239, 61,129, 52,210,235,245,178,243,251, 35,185,243, 18,146,220, 37, 32, 22,230,243, 60,
-251, 92,178,187,247,222,236,236,236,236,187,223, 41, 75, 40,165, 96, 48, 24, 12, 6,131,193, 96, 60, 56, 56,150, 5, 12, 6,131,
-193, 96, 48, 24,255, 34,131, 69, 8,233,198, 52,153, 38,211,100,154, 76,147,105, 50, 77,166,201, 12, 22,131,193, 96, 48, 24, 12,
- 6,131, 25, 44, 6,131,193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 48,131,
-197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12,198,127, 3,194, 38, 26,101, 48, 24, 12, 6,131,193,120,176, 8,
-229,109,104,214,172,217,207, 10,133,162, 86,121,219,117, 58, 93,234,153, 51,103, 58,179, 44,100, 48, 24, 46,159,228, 8,225,240,
-103,196, 92, 4, 64, 41,123,186, 99, 48, 24,143,162,193,146, 74,165, 81,251,247,239,175, 35,138, 34,108, 54, 27,172, 86,171,227,
-211,100, 50,225,169,167,158, 18, 42,251, 99, 77,154, 52,217,207,113, 92, 68,101,190, 99,179,217,238,156, 61,123,182,125,121,219,
- 3, 3, 3, 15, 3,136, 34,132,216, 43,242, 50, 63, 1,128,227, 28, 45,162, 41,137,137,137,205, 42,210, 36,132, 68, 57,221, 28,
-238,209,178,255,237,174,102,189,122,245, 78, 8,130, 16, 86,250,251,101,253,111,255, 91, 20,197, 91,231,207,159,111,203,138,233,
-195,161, 73,147, 38,251,121,158,175,116,249, 60,115,230, 76,185,229,179, 97,195,134,167, 57,142, 11, 41,235, 28,151,117,206, 1,
-240, 54,155,237,234,217,179,103,219,151,103, 64,130,131,131, 15, 3,136,170,168,236,148, 42,155, 0,144,148,152,152, 24,235,234,
- 58,170,232, 26, 42,163,204, 87,168,233,108,174, 66, 67, 67, 63,168, 86,173,218, 88,157, 78,103, 0, 64,121,158,167,245,235,215,
- 47,145, 15, 54,155, 45,227,242,229,203, 13, 89, 73,100, 48, 24,255,105,131, 37,138, 34,103, 52, 26,113,237,218, 53,148, 85,207,
-115, 28,103,171,236,143, 81, 74,235,236, 94,179, 42, 64, 89, 45, 16, 54,139, 25,114,191,106, 14,237,220,203, 23, 32,154,205,176,
-153, 77,240,143,109,109,175,112,209,185,115,103,222,133,108,216,164, 73,147, 2, 60, 60, 60, 96, 48, 24, 96, 48, 24, 96, 52, 26,
- 97, 48, 24, 96, 50,153, 96, 50,153, 96, 54,155, 97, 54,155, 97,181, 90, 97, 52, 26,113,238,220, 57,155,139, 27, 66,216,132, 9,
- 19, 2, 60, 61, 61, 29,122,246,197,174,105,215,181, 88, 44, 48, 24, 12,184,112,225, 66,133,154,130, 32,132,157, 58,117, 42, 64,
- 42,149,130, 82, 10, 81, 20, 65, 41, 45,177,148,166,109,219,182,102, 86, 68, 31, 42,117, 54,125, 52, 55, 64,238,235, 7,209, 98,
-129, 95,147,230,246,114,139,148, 61,219, 97, 51,155, 33, 90, 44,168,209,247, 73,199,250,142, 29, 59,186, 42,159, 53,126,154,241,
-186,183,212,195, 3, 86,131, 1,145,125,158,112,108,184,184,120, 30, 68,139, 25,212, 98, 70,163, 73,111, 1, 0, 50, 51, 51,245,
-209,209,209, 41, 0, 8,128,242, 34, 60, 97,183,110,221, 10,176,167,161, 44,211,239,188, 28, 58,116, 8,195,135, 15,119,117,236,
- 97,111,190,249,102,128,253, 26, 41, 93,206,173, 86,171,227,211,106,181,194, 96, 48,224,244,233,211,110, 69,174,130,131,131, 63,
-140,139,139, 27,181,122,245,106,245,166, 77,155,212, 17, 17, 17,144, 74,165,224,121, 30, 60,207,131,227, 56, 8,130,128,126,253,
-250, 17, 86, 4, 25, 12,198,127,222, 96,153,205,230,248, 30, 61,122, 80, 0, 48,153, 76,161, 50,153, 76, 90,202,128,133,180,107,
-215,238,106,233,239,185,106, 58, 84, 86, 11,196, 55,145,190, 0,128,167,111,102, 57,110, 12,235,227,154, 56,246, 25,122, 59,175,
-104, 95,165, 18, 28,199, 17, 23, 21, 56,212,106, 53,186,119,239, 14,153, 76,134,216,216, 88, 72, 36,146, 50, 23,169, 84, 10,137,
- 68,114, 79,244,168, 44, 52, 26, 13,102,205,154,101, 55, 71, 80, 43,228, 24,223, 54, 22, 10, 80, 44,189,112, 29, 38,145, 66, 16,
- 4,199,226,142,166, 84, 42,197,249,243,231, 33, 8, 2,120,158,119,124,218,255,222,178,101, 11, 6, 14, 28, 8, 65, 16,160, 84,
- 42, 81,124,147,101, 60, 68, 20,126,254, 88,223,161, 41, 0, 96,120, 98,129,163,140,253, 58,184,143, 99,159,103,146,181, 32,132,
- 64, 42,149,186,119,222, 61, 60,176,109,224, 99, 0,128, 39,175,165, 67, 34,145, 64, 16, 4,156,251,236, 61, 72,100, 50, 8, 82,
- 41, 26, 77,122, 11,153,153,153,250, 39,158,120,226,160, 66,161,216,238,198,195, 10, 18, 19, 19, 33, 8, 66,185,229,157,227, 56,
-172, 88,177, 2,183,111,223,118,235,216,245,122, 61,222,127,255,125, 16, 66, 74, 92, 47,229,253,237,234,216, 9, 33, 92, 80, 80,
-208,123,113,113,113, 35, 86,175, 94,237, 67, 8,193,151, 95,126, 9,169, 84,138,222,189,123,195,207,207, 15, 59,118,236,128, 84,
- 42,197,212,169, 83, 89,225, 99, 48, 24,143,134,193, 58,115,230,204, 99,246,191, 91,183,110,125,249,224,193,131,245,156, 66,249,
-176, 90,173, 82,171,213, 90,199,222,108,104,127,242, 29, 58,116,104,133, 79,244, 54,139,249, 30,131, 84, 86, 69,237,206,141,203,
-201, 12, 98,208,160, 65, 0, 80,238,205,198,121,113,227,169, 27, 38,147, 9,130, 32,160,110,120, 53,188,221,179, 41, 90, 82, 11,
-180,133, 4,214, 60, 45,250,107, 44,184, 92,191, 25,150,220,201,192,237,252, 66, 8,130,123,173,165,162, 40,150,107,174,120,158,
-199,162, 69,139, 48,100,200, 16,240, 60, 95,110,190, 48,254, 90,108,102,179,203,114, 88,217,115, 99, 53, 24,138, 34, 75, 2,239,
- 48, 87, 18,137, 4, 18,185, 28,130, 84, 10, 65, 38, 69,102,102,166,190, 91,183,110, 71,101, 50,217,119,129,129,129, 41, 73, 73,
- 73, 21,150, 79, 74,105, 73,173, 50, 30, 38,190,253,246, 91,172, 92,185, 18,173, 90,181,114,199, 12,193,100, 50, 65, 42,149,226,
-189,247,222,187,103,251,226,197,139,239, 49, 88, 46,244, 8, 0, 46, 48, 48,240,229, 53,107,214,120,218,127,223,223,223, 31, 18,
-137, 4, 13, 27, 54,132,135,135, 7, 14, 30, 60, 8,155,205,230,246,131, 15,131,193, 96,252,235, 13, 86, 41, 99,192, 25,141, 70,
- 92,185,114, 5,174,250,165, 82, 74, 43,172, 37,229,126,213, 28,145,171,117, 53,253, 28,235,135, 36,228, 58,110, 92,219, 90,214,
-130, 76,163, 70,236, 59, 31,187,109,134,210,211,211, 29, 79,222,174, 22,119, 42,114,147,201, 4,149, 82,129, 93, 19, 27, 34, 49,
- 75,134,153, 71,178,241,203,153, 27,144, 72, 36,232, 85,191, 33, 30,147,122,224,173, 26, 50, 76,188,158, 0, 11,165,110,221,192,
- 40,165,101, 26, 43,251,223,246,166, 18,187,193, 98, 60,124,252,154, 52,119, 68,174, 86,135,123,220, 19,181, 2,128, 45,205, 34,
- 32,247,208,160,225,255,166,187, 85, 62, 35,251, 60,225,136, 92,253,210, 60, 18,188, 68, 2,137, 76,134,167,207, 39, 3, 40,106,
- 22,236,220, 48,122, 95, 46, 47, 91, 49, 98,196,136,248,223,127,255, 93,233, 78, 90,203, 50, 88,118,243,243,237,183,223, 98,213,
-170, 85, 16, 4, 1,102,179,217,173,116, 26,141,198,114,141, 83, 85, 34, 88, 0,160,211,233, 76,155, 55,111,198, 23, 95,124, 1,
- 63, 63, 63,244,232,209, 3,193,193,193, 88,183,110, 29, 40,165, 24, 55,110, 28,148, 74, 37,148, 74, 37, 43,243, 12, 6,227,209,
- 51, 88,102,179, 57,190, 91,183,110,110,141,248,209,235,245,119, 93, 24,176, 50, 35, 3,206, 81, 1,185,135, 6,114,141, 6,156,
-155,179,116, 89, 44, 22,135, 65,217,185,115, 39,148, 74, 37,122,247,238,125, 95, 17, 44,179,217, 12,153, 84, 2,206, 63, 16,207,
-126,254, 59,178, 10,244,142, 27,218,222, 91,241, 56,149,150,142,137,109,186, 66,173, 76, 71,161,201,228,118, 4,171,180,185, 18,
- 4, 1,131, 6, 13,130,209,104, 4, 33,164, 68,191, 20, 87,102,149,241,215, 81,222, 32, 4, 66, 8, 20,158, 30,144,169,213,224,
-121,222, 45, 45,231,104,147, 32,147, 65, 34,151, 65, 40, 46,135,246,200, 85, 46, 47, 91,145,156,156,124, 20,128,162,101,203,150,
- 74,119,210,230,108,176,156, 13,144,179,185,226,121, 30, 22,139,197, 45,243, 98, 52, 26, 33,149,254,217, 19,224,206,157, 59, 21,
- 26, 44, 23,199, 76, 9, 33, 34, 33, 68,140,138,138,114,124, 55, 40, 40, 8,222,222,222, 16, 69, 17,162, 40, 66,161, 80, 64,169,
- 84,150,248, 93, 6,131,193,120,100, 12,150,115,115,225,131,186,121, 85,116, 3, 83,122,122, 66,170, 86,219, 71, 43, 81,119,204,
-144,189,207,201,216,177, 99, 43,236,151, 98, 55, 98,110,152, 74,112, 2,143,212,160, 72,216,184, 3,127,222, 32,139, 23, 78,144,
-224,118, 80, 61,240, 87, 78, 67, 34,138,110,221,192, 74, 71,176,198,141, 27,135,101,203,150,129,227, 56, 71,158, 8,130,128,218,
-181,107, 35, 62, 62,158,149,206,191, 1, 90, 65, 52,210,190, 94,225,225, 1,153, 70, 3,222,141,190,119,165,205,144, 84, 46,135,
- 32,147, 66,144, 22, 53, 11,246,237,219,119, 95,110,110,238,138, 6, 13, 26, 92, 71,209, 52, 6,156,187,215,144, 32, 8, 37,140,
- 79, 89,230, 74, 16, 4, 88,173, 86,183, 31, 42, 74, 27,157, 57,115,230,220,179,239, 83, 79, 61,229,110, 4,139, 18, 66,168, 84,
- 42, 69,247,238,221,209,168, 81, 35,108,218,180, 9,162, 40,226,149, 87, 94,129, 82,169,196,188,121,243, 96,181, 90,241,225,135,
- 31,178, 8, 22,131,193,120,244, 12,214,131, 36,247,210,121, 71, 39, 98,231,102,193,223,218,214,131, 92,163,134, 92,163, 65,187,
- 77, 7, 28, 79,205,120,239, 83,183, 34, 88,118,131,149,149,149, 85,161,185,114, 39,130,229, 48, 88, 50, 1,235,195,114, 64,101,
- 18, 8, 38, 75, 9,131,197, 11, 18, 36,250, 69,130,147, 72, 33,216,172,110,105, 82, 74,239,105, 18,124,238,185,231, 64, 8,113,
-140,248,106,220,184,177,243,141,134,221,113, 30, 50, 41,123,182, 59, 58,180, 59, 55, 11,254,220,178, 22, 20, 30, 26,200,212,106,
-116,216,122,216, 17,109,196,188,165, 46, 53,175,126,253, 21,206,207,155, 11,137, 76,134, 39, 79,223,118, 68,174,218,214,173,117,
-212,164,246, 92,113,231,206,157,163, 0,184,193,131, 7,123, 55,110,220,216,173,107,210,222,201,190, 60,115,229,108,176, 44, 22,
-139,219,101,222,157,235,195, 30,197,114,163,188,211,232,232,104,112, 28, 7, 79, 79, 79,104, 52, 26,199, 8, 90,133, 66, 1,149,
- 74,229,232,191,233,238,117,201, 96, 48, 24,255,106,131,213,164, 73,147, 95, 85, 42, 85,164,187, 34,149,153,116,212,185, 19,177,
-221, 92, 17, 66,160,208,104, 32,211,168, 33,247,208,148, 27,229, 42,239, 70, 99,111, 34,228,121,222,113,179,249,238,187,239,160,
-209,104, 48,114,228,200, 74,247,193,178, 63,205,115, 82, 14, 59,228,123,192,203,132, 18,230, 74, 16, 4,240, 18, 9,238,106,130,
-193, 73, 36, 16,172,174,163, 98,132, 16,228,229,229, 65, 16, 4,188,253,246,219,142, 39,118,103,115,197, 58,182,255,253,136, 78,
-102,164, 68, 84,213,195,195, 81, 62,157,215,187,234,147, 72, 8, 1,181, 90, 32,145,203, 33, 41, 30,136,107,143, 92,153,212,158,
- 43,234,213,171,231,136, 92,169, 84, 42,251,232, 81,151,154, 28,199,149, 40,211, 43, 86,172, 40, 97,174, 74, 71,176,220, 45,243,
- 82,169, 20,203,150, 45,171,208, 68, 73,165, 82,183, 71, 80, 2, 69,211, 70,236,219,183, 15,167, 78,157,194,216,177, 99,161, 84,
- 42,177, 96,193, 2, 88,173, 86,204,158, 61, 27, 74,165, 18, 50,153,140, 21, 62, 6,131,241,223, 55, 88, 50,153, 44,242,208,161,
- 67,142, 73, 70, 43,250, 52,153, 76, 24, 52,104,144,219,145, 48,177,120, 20, 33, 87,106,164,156,220, 83, 3,121,113,211,139,243,
-122,226, 70, 45,110,127, 2,118, 54, 88,239,188,243, 14, 4, 65,192,178,101,203, 0, 0,147, 39, 79,118,187, 15,150, 93, 19, 54,
-130, 36,122, 19, 77, 63, 31, 8,211,106, 11,210, 14,157,133, 32, 8, 8,104,253, 24,196,150, 3,161, 83,106, 32,216,172,110,143,
- 34,204,206,206, 70,124,124, 60,120,158,199,164, 73,147, 74,204, 85, 84,234,152,177,115,231, 78,214, 7,235,111, 52, 88, 92,113,
-255,170,178,202,103, 41,243,229,186,157,204,102, 45,234,119, 37,253,115,180, 96,110,110,238,138, 59,119,238, 28, 3,192,141, 24,
- 49,194, 91,165, 82,225,235,175,191,214, 1,144,173, 91,183,206,165,203,178,151,155,242,204, 85, 85,154, 8,237,145, 96,231,126,
- 93,247,107,176,236,102,144, 16, 2,155,205, 6,165, 82, 89, 34,114,165, 80, 40, 32,151,203, 89,193, 99, 48, 24,143,134,193,226,
- 56, 14, 70,163, 17,151, 46, 93,114,247, 9,213,237, 73, 71,253,154,183,194,208,219,121, 32,132, 96, 71, 92, 3, 71,179, 75,219,
-159,246, 57, 42,236,219,239, 79,134, 68,173,129, 95, 92,143, 74,221, 24,156, 13, 86,110,110, 46, 36, 18, 9,222,123,239, 61,112,
- 28,135, 15, 63,252, 16,161,161,161, 72, 77, 77, 69,199,142, 29,221,122,154,231,109, 60,130,159,137,134,234, 57, 47,120, 62,211,
- 1, 62,221,223, 65,178, 73,192, 97,131, 10, 29, 12, 23, 33,219, 49, 31, 38,209,230,150,193, 34,132,192,106,181, 98,223,190,125,
- 37, 58,178, 3, 69, 77,135,246,233, 46, 44, 22, 11,204,102, 51, 62,252,240, 67, 86, 58,255, 6,194, 31, 31,128,103, 83,116, 0,
-128, 95,157,154,173,219,111, 60,224, 40,159,241,115, 38, 65,162,214,192,167, 69,156, 91,154,245, 95,153,130,250,175, 76, 65,102,
-102,166,190,107,147, 6,251, 11,165,170,111, 27, 54,108, 88, 34,114,165, 80, 40, 72,241,255,196,157,178,196,113, 28,120,158,119,
-152, 43,187,153, 42,203, 96,185,251, 0, 96,177, 88, 32,149, 74,221, 54, 88,238,194,113, 28,158,127,254,121, 4, 7, 7, 59, 34,
- 87,239,190,251, 46,148, 74, 37, 94,127,253,117, 88, 44, 22,204,159, 63,159, 21, 62, 6,131,241,223, 55, 88, 70,163, 49,161,107,
-215,174, 40,103, 91,168, 92, 46, 47, 17, 6,178, 79, 58, 90,186,169,144, 16,210,141, 82,186,171,172, 27,132,243,104, 44,121,169,
-168,149,212,195, 19, 18,181, 6, 92, 25,209,166,210,154,246, 39,227,210, 6,203,190,228,229,229, 65, 34,145,224,139, 47,190,128,
-167,167,167, 99,180, 94, 69,154,246, 8, 22,207,243,208, 37, 22,224,242,220, 93,144, 41, 14,163, 86,143, 33, 8,150, 40, 33, 61,
-184, 1,122,155,165,194,137, 70,203,210,172, 83,167, 14,102,204,152,113,207,244, 12,229,209,172, 89, 51,151,154,247, 11,211, 44,
- 91,211,157,242,201,203,229, 46,207,187,125,187, 61,114, 85, 40, 85,125, 27, 31, 31,111,143, 92,121,169, 84, 42, 44, 94,188, 88,
- 7,128,155, 61,123,182,170, 70,141, 26,188, 59,233,228,121, 30,223,125,247,221, 61, 29,218,203, 50, 87,101, 77,251, 81, 86, 58,
-173, 86,235, 61, 6,107,208,160, 65,247,140, 30, 44, 47,130, 85, 86, 58,237,125,213,252,252,252, 28,145, 43,155,205,230, 24, 61,
-104,177, 88, 96,181, 90,203,109,106,101,229,147,105, 50,205, 71, 71,243,145, 48, 88,167, 79,159,238, 85,222, 23,218,181,107,119,
-237,208,161, 67,181,109, 54,155,243, 59, 10,165, 6,131,161, 78,255,254,253, 93, 62, 42,139,162, 8,185, 92, 14, 74, 41,154,190,
-245, 1, 8,185,183,191,149,119,219,174, 32,130, 0,155,205, 6,139,197,226,114,122, 8,189, 94,239,184,153,148,215,193,189,176,
-176,176,194,121,126, 74,223, 20, 12, 6, 67,137, 27, 21,161, 34,110,239,254,241,158,209,132,149,137, 16, 0,128, 66,161, 40,209,
-239,202, 85, 82, 88, 17,125,184,216,167, 84,160,148,162,193,248,105, 69,231,169,184,185,208,110, 2,188, 98,227, 64, 36, 2, 68,
- 0,102,179,217, 85,249, 36,246, 62, 87,148,210,111,250,247,239,127, 21,128, 17, 0,213,104, 52,114,137, 68, 34, 2,200, 6, 64,
-115,114,114,188,146,147,147, 69,131,193, 80,221, 85, 58,247,237,219,135, 27, 55,110,160,121,243,230,142, 87, 54,217,155,221,236,
- 38,198,217, 96,185, 27,193, 42,107, 78,173,242,102,115,119, 23,158,231,225,229,229,229,152,196, 84, 42,149, 66,165, 82, 1, 0,
-230,207,159,239,200,115, 6,131,193,248,207, 27, 44, 23, 6,137, 47,175,249,208, 85, 83,161,205,102, 75,106,217,178,101,101,127,
- 47,205,197, 13, 49,105,255,254,253,210,138, 94,242, 92,198, 58,151,154,199,142, 29,147, 86,240,253,178,254, 78,115,117,236,173,
- 90,181, 42,243,251,229, 97,181, 90,147, 89, 17,125,120, 88,173,214,242,203,231, 59, 31,148,119, 94,211, 92,152,150,235,181,107,
-215, 78,209,104, 52,191, 4, 6, 6,102, 29, 58,116,200,175, 69,139, 22,126,206,251,180,104,209, 34,184,212,215, 76,168, 96,122,
- 18, 66, 72,210,179,207, 62, 43,117, 81,198, 75,255,159,228,226,161, 34,233,194,133, 11,210,178,180,202,251,164,148, 38,185,145,
-173,183,123,245,234,197, 57,127,183,188,178,111,181, 90, 51, 88, 41,100, 48, 24,143,172,193, 50, 24, 12,137, 93,187,118, 45,179,
-215,172, 78,167,187, 83,209,119, 47, 92,184, 16,251,160, 15, 32, 41, 41,169,237,191, 65,243,175, 56,118,198, 63,255, 28, 93,184,
-112,161,229,131,214,188,115,231, 78,219,127,131, 38, 0, 92,188,120,177, 13, 43, 89, 12, 6,131, 25, 44, 55,112,119, 58, 6, 6,
-131,193, 96, 48, 24,140, 71, 21,142,101, 1,131,193, 96, 48, 24, 12,198,131,133, 0,232, 86,214,134,202,140, 14, 32,132,116,171,
-236, 15,187,210,103,154, 76,147,105, 50, 77,166,201, 52,153,230,127, 79,211,149,246,127,102,116, 34,165,244, 47, 91, 0,116, 99,
-154, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,212, 22,214, 68,200, 96, 48, 24, 12, 6,131,241,128, 17, 88, 22,252, 61, 16,
- 66,120, 74,169,237, 1, 74,250, 0, 40,239,133,110, 38, 0, 57, 85, 73, 38, 0,105,241, 98,159,168,200, 2,192, 92,188, 80,215,
- 18,179,184,148, 20,159, 24,106,147,180,160,132, 72, 68, 17,103,170, 87, 15, 63, 13,244, 50, 1,128, 38,168,126,125,141, 90,217,
-205,104, 54, 69,202, 37,178, 75,185,218,194,157,134,180,171, 9,172,132, 48, 24, 15,159,216,216,216, 81,148,210, 57, 69, 85, 20,
-121,239,196,137, 19, 95,178, 92, 97, 48, 30,176,193,170, 85,171,214, 9,142,227,194,236,147, 97, 86, 52,231,142,253,211,102,179,
- 37, 93,190,124,217,173,161,238,132, 16, 33, 56, 56,248,105,181, 90,221,153,231,249,118,197,223, 63,164,213,106,127, 79, 77, 77,
- 93, 71, 41,181, 86,229,128,162,162,162, 60, 13, 6,195, 32, 66,200, 48, 0,160,148,126,175, 80, 40,126,188,117,235, 86,126, 21,
-141, 80,173,160,160,160,239, 37, 18, 9,159,152,152,216, 25, 0,194,195,195,127, 55,153, 76,182,244,244,244, 97,148,210, 27,149,
-212,227,164, 82,233, 7,113,113,113,237, 9, 33, 43, 41,165,139, 30,208,185,148,115, 28, 87,166, 49, 17, 69, 49,162, 10,122, 82,
- 0, 94, 95,124,241,133,223,170, 85,171,154, 38, 37, 37, 53, 4,128,176,176,176,243, 35, 70,140, 56, 61,126,252,248, 44, 0,121,
-197, 70,171, 92, 82, 82,124, 98,210,239,222, 26,155,150,126,105, 16, 0, 4, 5, 55,252,145,231, 57,105,104,232,169, 35, 42,255,
- 97,254,117,235,213, 28,243,195,215, 95, 72, 35, 34,195,177,231,240,169, 38,227,255,247, 70,140, 34,176,238,167,204,100, 61, 60,
-234,212,169,115,130,227,184,176,202,204, 37, 87,252, 6,133,164,139, 23, 47,198,150,167,201,243,124,152,171,185,186, 74,175, 19,
- 69,241,214,133, 11, 23,202,156, 50,162,110,221,186, 71,120,158,143,116,183, 62,114, 78,103,121, 83,112,212,173, 91,247, 4,207,
-243, 97,174, 52, 75,175, 19, 69,241,214,249,243,231,219,186,171,233, 98, 14,189, 42,165,211, 29,205,138,210, 9, 0,157, 58,117,
-146,107,181,218,239, 53, 26, 77, 99,173, 86, 59,138, 82, 58, 99,239,222,189,129, 28,199,161, 91,183,110, 51, 98, 99, 99,227, 21,
- 10,197, 66,189, 94,127, 90,163,209, 12,221,187,119,175,145, 93, 49, 12,198,125, 26, 44,142,227,194, 78,157, 58, 21,160, 86,171,
- 81,108, 84, 96,159,189, 93, 20, 69,136,162, 8, 74,169,227,211,106,181,162, 83,167, 78,110,253,104, 88, 88, 88,195,186,117,235,
-174, 31, 55,110, 92,245,190,125,251,202, 2, 3, 3, 65, 8,193,221,187,119,235,252,242,203, 47,195, 23, 44, 88,240, 78, 88, 88,
-216,192,164,164,164,243,238,154,150,224,224,224,174, 0,158,107,216,176,225,147,147, 39, 79,150,182,107,215, 14, 54,155, 13,123,
-246,236,137,155, 55,111,222, 23, 33, 33, 33, 27, 0,172, 72, 77, 77,221, 77, 41, 21,221,212,109, 26, 25, 25,249,227,129, 3, 7,
- 34, 19, 18, 18,108, 3, 6, 12, 88, 9, 0,135, 15, 31,110, 44,138, 34,105,215,174,221,175,132,144, 65,148,210,211,149,200,243,
-254,227,199,143, 31, 56,110,220,184,106, 35, 71,142,124, 6,192,162,226,223, 34,197,249, 76, 43,121, 14, 29,145, 43, 74,105, 69,
-211,107, 7, 85, 34,146,165,142,143,143,247,105,219,182,237,203,233,233,233, 19,157,117,211,210,210,112,242,228, 73,243,220,185,
-115, 63, 63,124,248,240,194,200,200,200, 28, 0,218,242,132,168, 77,210, 34, 45,253,210,160, 14,109,190,240, 2,128,117, 91, 94,
- 30,114,252,116,134,199,207,191, 45, 25, 46, 83, 72,141,171,150,126, 46,173, 93, 43, 2,123, 79, 92,199,177, 75,217,164, 97,251,
- 62, 66,222,207, 43,187, 3, 88,194, 46,207,135, 3,207,243,161, 39, 78,156, 8, 80,169, 84,101,190,208,189, 84,191, 11, 16, 66,
- 64, 41, 69, 92, 92, 92, 69,154, 97,167, 78,157, 10, 80, 40, 20,142,186,163,116,157, 97,175, 87, 28,101,133, 82,116,232,208,193,
- 92, 65,157, 84,227,143, 63,254, 8, 80,169, 84, 14,157,178,210, 87,218,104,116,232,208,161,194,116,158, 60,121,210,145, 78,119,
- 52, 41,165,104,215,174,157,205,213,177,219,223, 88,225,234,184,237,154,109,218,180,161,149,209,116, 51,157, 21, 62, 0,105,181,
-218,239,215,173, 91,247, 68, 96, 96, 32,250,247,239,191,163, 65,131, 6, 50,149, 74,133,223,126,251, 13,225,225,225,254, 30, 30,
- 30,219,222,127,255,125,124,250,233,167,213,119,238,220,185, 6,192, 19,236,138, 97, 48,238,223, 96, 65,173, 86, 99,237,218,181,
-142,215,195,216, 95,147, 81,214,223,213,171, 87,119,235, 7,131,130,130, 98, 35, 34, 34,246,109,218,180, 73, 25, 16, 16,224, 88,
-111, 50,153,224,233,233,137,231,158,123, 78,214,189,123,247,218,195,134, 13, 59, 26, 20, 20,212,241,238,221,187, 39, 42,210, 11,
- 14, 14,126, 50, 38, 38,230,203,137, 19, 39, 6,246,235,215, 15, 62, 62, 62, 37,182,247,233,211, 7,189,123,247,150,222,186,117,
-107,200,186,117,235,134,172, 92,185,242,110,112,112,240,248,212,212,212, 13, 21, 58, 12,181,186, 91,147, 38, 77,190,222,179,103,
- 79,152,183,183, 55, 66, 66, 66,184,183,223,126,187, 97,205,154, 53,149, 65, 65, 65, 92,106,106, 42, 54,108,216, 80,115,196,136,
- 17,155, 21, 10,197, 40,131,193,176,219, 13,195, 38,243,245,245,157, 50,122,244,104,191,252,252,124,235,169, 83,167,174,219,215,
-203,229,242, 25,173, 91,183,110, 70, 8, 89, 75, 41, 93, 81,149,200, 21,165, 52, 31,127, 54,229,217,177,216,183,187, 25,201,146,
-157, 57,115,198,183, 77,155, 54, 27,140, 70, 99,179,177, 99,199,222,153, 59,119,174,210,211,211,211, 19, 0,201,207,207,207,153,
- 53,107,150,105,222,188,121,211,234,215,175,223,245,200,145, 35, 79, 54,105,210,196, 82,108,222,238, 53, 88,132, 56,210,147,152,
-156,129,125,135, 69,217,140,215, 39,135,125, 52, 39,242,246, 31, 23, 19, 69, 65,233,137,173,251, 47, 32, 45,171, 16,191, 30,185,
-136, 32, 63, 15, 34,149, 75, 98,188,195, 98, 58,230, 37, 95,220, 95, 5,195,201,168, 2, 42,149, 10, 91,183,110,189,231, 21, 83,
-101,189,126, 74, 16, 4,120,123,123, 87,248, 54, 2, 66, 8, 20, 10, 5,118,238,220, 89,226,245, 82,101,253,109,255,244,242,242,
- 2,165,180,194, 87, 28, 40, 20, 10, 28, 58,116, 8, 28,199,221,243,253,210,105, 22, 4, 1,106,181, 26,132, 16,206,149,230,254,
-253,251, 93,106,217, 63, 53, 26, 13, 0, 84,248,254, 33,185, 92,142,131, 7, 15,150,123,204,165,255,214, 20,191,239,210,149,230,
-161, 67,135, 74,188,162,171,244,171,187,156,255, 47,126, 56,174, 80, 84,169, 84, 54, 14, 12, 12,196,241,227,199, 49,115,230, 76,
- 89, 76, 76, 12,174, 95,191, 14, 66, 8, 70,142, 28,137, 6, 13, 26, 32, 53, 53, 21, 13, 26, 52,192,193,131, 7,155,178, 43,133,
-193,120, 0, 6,203,142, 59,230,202,254, 30,177,210, 21, 68,233,161,150, 17, 17, 17,114,141, 70,243,211,214,173, 91,149,126,126,
-127,190, 45,196,104, 52,162,160,160, 0,133,133,133, 40, 40, 40,128,135,135, 7, 22, 46, 92,168, 28, 58,116,232, 79, 17, 17, 17,
-117, 18, 18, 18,140,229,105, 18, 66, 62, 63,115,230, 76,160,213,106,133, 76, 38, 43,215, 44,214,170, 85, 11,227,199,143, 71, 92,
- 92, 92,208,224,193,131, 63, 7,176,161, 60,205, 98,227,246,213,225,195,135,195,164, 82, 41,174, 93,187,134,164,164, 36,140, 25,
- 51,166,134, 40,138, 72, 76, 76,196,245,235,215,145,156,156,140,101,203,150,133, 13, 29, 58,116, 33,128,218, 21, 29,123, 49, 47,
- 78,154, 52,169,142,175,175, 47,247,241,199, 31,231, 21, 22, 22, 46, 45, 94,255,250,252,249,243,135,118,232,208,161,218, 11, 47,
-188, 0, 66,200, 15,148,210,123, 12, 75, 41,205,178, 34, 87, 54, 0,151, 75,125, 45,186, 84,100, 43, 8, 69,239,194,203, 45, 67,
-147, 0,240,234,209,163,199, 36,163,209,216,236,224,193,131, 55,218,181,107, 87, 3, 64, 42,128, 12, 0,240,242,242, 82,127,254,
-249,231,129,125,250,244,185,218,165, 75,151,102, 61,122,244,152,148,145,145, 49,183,120, 59, 45,173, 41,138, 56, 19, 20,220,240,
-199,253, 71,198, 15,218,123,200, 36,157,252,191,119,238, 84, 15,143,200, 59,115, 45,219,118,241, 86, 6, 10,244, 86, 60,209,165,
- 17, 0,160,117,195,234,248,114,237, 65,188,242,234,155,146, 13, 63,174,124,234, 6,133, 26,192, 47, 21,228,231,125,193, 52,255,
- 52, 67,162, 40, 66, 34,145,224,177,199, 30, 3, 33,228,158,119,109, 74, 36, 18, 28, 57,114, 4, 93,186,116,129, 68, 34,193,243,
-207, 63,239, 50,157,162, 40, 66, 16, 4,244,232,209, 3, 86,171,245, 30,189,210,102,193,254,142,206,138, 52, 41,165, 16, 4, 1,
- 28,199,149,105,126, 74, 47,101,153,150,178,142,221,149,150,243,182,178, 94,247, 83, 90,211,158, 78,119,204,149, 93,211,221,116,
- 10,130,128,182,109,219,226,244,233,211, 21,154, 45,142,227, 92,214,201, 90,173,246,185,254,253,251,239, 24, 59,118,172, 2, 0,
-178,178,178, 28, 47,162,231,121, 30, 87,174, 92,129,201,100,194,234,213,171, 97, 52, 26,199,178,235,136,105,254,149,154,143,140,
-193,178, 87, 18,238, 26, 44,119,222,173, 71, 41, 29,247,250,235,175, 7, 86,100,174, 10, 11, 11,145,146,146,130, 26, 53,106,224,
-233,167,159, 14, 92,185,114,229, 56, 0,159, 84, 32, 43,229,121, 30,199,143, 31, 71,122,122, 58, 26, 53,106,132,200,200,200, 18,
- 59,220,188,121, 19,219,182,109, 67,110,110, 46,154, 55,111, 14, 20,245, 47, 42,147, 38, 77,154,204,140,142,142,238,209,169, 83,
- 39,185, 68, 34,193,153, 51,103,208,172, 89, 51,172, 93,187, 22,213,171, 87,135, 74,165,194,213,171, 87,209,168, 81, 35,236,219,
-183, 15,213,170, 85, 67, 76, 76,140,188,121,243,230, 7,178,179,179,127, 79, 72, 72,152, 89, 78,126, 74, 67, 67, 67,223, 24, 61,
-122,180, 44, 37, 37, 69,252,238,187,239, 14, 83, 74, 15, 19, 66,198,188,249,230,155,207,244,236,217,179,218,169, 83,167,242,255,
-248,227,143, 63,202, 50, 87,110, 70,174,172,165,111, 70, 54,155,205,168,215,235, 77, 70,163,209,194,113, 92, 2, 33,196,100,179,
-217,234,148,247, 48,255,220,115,207,213,204,204,204,124,229,213, 87, 95,141, 47, 54, 87, 87, 80,212,177, 29, 0, 96,181, 90,141,
-133,133,133,249,109,218,180,169, 49,116,232,208, 27,107,214,172,121,229,185,231,158, 91,183, 98,197,138, 66, 0,250,210,130,213,
-171,135,159,230,121, 78,170, 45,240,189,181,126,221,242,137,219,182,140, 11, 79, 76, 76,174,237,231, 95, 77, 43,213, 84, 75, 89,
-247,253,183, 39, 0,152, 82, 50,242,113,238,230, 93, 72, 36, 60, 46, 37,230,161, 67,175,167, 37, 55,174,205,105,111, 55, 88,140,
-191, 20,106,127, 57,244,222,189,123, 43,140, 96, 29, 57,114, 4, 18,137, 4, 74,165, 18,107,215,174,173, 80,212,110, 8,236,209,
- 33, 87, 38,198,213,203,207,237, 38,195,254, 2,246,210,203, 87, 95,125,133, 87, 95,125,181,196,111, 20,107, 18,119,210, 89, 86,
-250,106, 68, 68, 32, 61, 45,173,196, 58, 55, 94,210, 14,155,205, 6,137, 68,130,101,203,150,161, 79,159, 62,248,249,231,159, 43,
-252, 44, 54,182,212,157,116,182,109,219, 22,102,179,217,145,230, 43, 87,174,148,169,187,104, 81,197,221, 59, 99, 99, 99, 71, 17,
- 66,230,212,173, 91, 87,222,185,115,103,236,223,191, 31,115,230,204, 17,173, 86,107, 38, 0,180,109,219,182,218,196,137, 19,201,
-201,147, 39,161,209,104,144,145,145,177, 34, 54, 54,118, 54,235,248,206, 96, 60,128, 8,150,189,210,117,101,174,236, 79,138,174,
- 76,150, 70,163,233,221,171, 87, 47,135,185, 49, 24, 12, 14, 99,101, 55, 87,246,255,175, 94,189,138,152,152, 24,169, 70,163,233,
-237,194, 96, 21, 29,136, 32, 32, 36, 36, 4,153,153,153, 56,127,254, 60,106,212,168, 1,139,197,130,237,219,183, 35, 47, 47, 15,
- 18,137, 4, 82,169, 20,102,115,133, 93, 18, 16, 29, 29,253,216,170, 85,171, 98, 87,174, 92,153, 99,127,130,251,254,251,239, 65,
- 41, 69,181,106,213,160,211,233,144,150,150,134,223,127,255, 29, 86,171, 21, 26,141, 6,161,161,161,138,113,227,198,181,159, 53,
-107,150, 4,192,204,114,164, 91, 61,245,212, 83,158,158,158,158,248,223,255,254, 71,205,102,243, 39,132,144,214, 79, 62,249,228,
- 27,227,199,143,247, 77, 72, 72, 48,189,248,226,139, 39,204,102,243,231,197, 55, 19, 9,165,212,226,194,176,150, 27,185,178, 88,
- 44,246, 60,141, 47, 44, 44,132,191,191,127, 13, 23,125,180, 0, 64,122,232,208,161,182, 0,248,217,179,103, 43, 80,244, 2,107,
- 71, 26, 76, 38, 19, 10, 11, 11,161,213,106, 45,121,121,121,233, 83,166, 76,177,174, 89,179,134, 47,254,206,165,178, 12, 22,208,
-203,212,160,129, 90, 70, 41,255,230,146, 37, 75, 52, 61,123,246,228, 52, 26, 13, 10, 10, 10, 60,127,253,237, 55, 77,215,206,237,
-163,230,126,240,209, 14,207,176, 70,105,135,206,220, 66,242,221, 60,152, 44, 22, 68, 5,123, 21,197,191, 24,127, 57,197, 29,172,
- 29, 17, 44,103, 51,177,127,255,126,244,234,213,203,113,173, 75,165, 82,199,126,238,104, 10,130,128, 94,189,122,221, 19,209,217,
-187,119,111,153,209, 38, 87,117,136,179, 25, 42,109,138,202, 50, 94, 28,199,193, 85, 43,179, 61,122, 87,150,201,114,142,226,151,
- 50,109,174, 30, 38, 33, 8, 2,198,143, 31, 15,137, 68,130,169, 83,167, 66, 16, 4, 52,109,218, 20,130, 32,160, 77,155, 54,144,
- 72, 36,232,210,165, 75,185,145,182,178,204,165, 32, 8, 56,122,244, 40,154, 53,107,230, 72, 83,211,166, 77,209,162, 69, 11, 8,
-130,128,184,184, 56, 72, 36, 18,244,232,209,195,165,166,189, 67,187, 70,163,193,213,171, 87,193,243, 60, 8, 33, 89, 39, 79,158,
- 12, 4,128,153, 51,103,102,234,245,122, 63,131,193,128,174, 93,187,162,125,251,246,213,190,255,254,251,183, 1, 48,131,197, 96,
-220,111, 4,203, 94,233,186,107,176, 92, 97, 48, 24,154,216,163, 87,101,153, 43,231, 79,147,201,132,154, 53,107,194, 96, 48, 52,
-169,236,205, 34, 56, 56, 24,102,179, 25,203,151, 47,135, 84, 42,133, 84,250,167,175, 48,153, 42, 14, 14, 93,188,120, 49,254,232,
-209,163,205,154, 55,111,238,179,113,227,198,140,238,221,187, 87,235,217,179, 39,148, 74, 37,244,122, 61, 44, 22, 11, 90,183,110,
-141,232,232,104,164,167,167,227,215, 95,127,205,172, 83,167,142,255,177, 99,199,196,187,119,239,222,174, 64,186,107,215,174, 93,
- 65, 8,193,175,191,254,154, 69, 41, 61,169, 84, 42, 55,206,157, 59,215,219,100, 50,137,207, 60,243, 76, 98,118,118,246, 20, 0,
- 22,185, 92,254, 73,207,158, 61, 91,241, 60,191,214,102,179, 85,186, 50, 43,157,183, 90,173, 22, 10,133,194,157, 41, 33, 36,217,
-217,217, 13, 1, 64,173, 86,251, 2,112,140,144,212,235,245, 37, 76,176,201,100, 50,248,250,250,170, 1,160,248, 59,146,114,206,
- 71, 53,149, 74,181,254,246,237, 91, 30,206,145, 75,111,111,111, 12, 27, 58,148,107,215,182,173,172,113,147, 38, 61,222,250,116,
-229,218, 16, 63, 79, 83, 84,136, 31, 44, 54, 11,118,237,216, 46, 82,209,178,131, 93,162, 15, 7,187,201, 40, 29,193,146, 72, 36,
-216,183,111,223, 61,235,164, 82, 41,182,110,221,234,150, 25,178,155,169,242,154,200, 74,153, 33,226, 78, 84,157,231,121, 44, 91,
-182, 12,162, 40, 98,226,196,137, 37,154, 13,157,245,237,102,199,149,166,253, 59,209,239,136, 0, 76, 72,250, 76,238,248,126,233,
-244, 22,107, 18,119,204,208, 23, 95,124,225, 86, 4,235,241,199, 31,119,203,180, 57, 31,151, 61, 93,167, 79,159, 46, 83,119,201,
-146, 37, 46,251,180,137,162,136, 95,126,249,197, 97, 78,237,188,253,246,219,163, 61, 61, 61, 53,251,247,239,199,221,187,119,161,
-213,106, 81, 88, 88, 8, 31, 31, 31,239,110,221,186,157,185,123,247,110,194,197,139, 23, 89,135,119, 6,163,170, 17, 44,123,165,
-235, 78, 51, 97, 89,237,253,101,232, 9,132, 16, 24, 12,134, 50,141,149,179, 41, 48,155,205,200,202,202,130, 40,138, 85,158,171,
-171,172,138,213,149,193, 58,127,254,252,200, 81,163, 70,165,120,121,121, 53,206,202,202, 74,149,203,229,113,251,247,239, 15, 55,
-155,205,240,244,244,132,167,167, 39,182,109,219, 6,111,111,111,188,250,234,171,119,244,122,253, 97,181, 90, 29,168,215,235,207,
-222,189,123,247,173,114,157,139, 68,210,181, 67,135, 14, 56,121,242, 36,114,115,115,247, 16, 66, 26,191,240,194, 11,221,195,195,
-195,201,156, 57,115, 12, 55,110,220,248, 10, 64,134, 90,173, 94,190,106,213,170,142,205,155, 55,215,140, 24, 49, 2,132,144,175,
- 41,165, 6,119,143, 89,171,213,150, 48, 86,249,249,249, 40, 40, 40,128, 90,173,182,186,153,103, 18, 20,245,165,178,247,167,114,
-156,155,226,232,149,253,252, 80, 65, 16,104,209, 46, 84, 82,158,158, 90,173,158,189,114,229,202, 18,125,238,236,209,209,180,180,
- 52,120,122,122,226,237,183,222,146,190,251,218, 11,205,120, 77,224, 17,142, 35, 48,153,105, 46, 21, 77,219,181,105,131, 15,176,
- 75,244,225, 68,176,236,134,160, 95,191,126,247, 52, 11, 74,165, 82,236,220,185, 19, 3, 6, 12,112, 60,176, 20, 55,181,187,101,
- 8,250,246,237,235,136, 4,109,223,190,189,204,230, 61,123, 4,202, 29, 35,104,223,119,194,132, 9, 16, 4, 1, 95,126,249, 37,
- 38, 77,154, 4,142,227,240,217,103,159,129,227, 56,204,152, 49,163, 82,245,132,189, 46, 75,248,168,232, 51,108, 82, 62,178, 22,
- 5, 2, 0, 60, 60, 61,237, 59, 86, 74, 83, 16, 4, 71,228,170, 73,147, 38,144, 72, 36,104,211,166, 13, 4, 65,112, 68,174,122,
-247,238,237, 60,173, 2,117, 71, 83, 16, 4, 92,187,118,205,145,230, 54,109,218,148,136, 92, 9,130,224,150, 97, 35,132,188,219,
-165, 75,151, 57, 97, 97, 97, 1, 99,199,142, 37, 60,207, 35, 54, 54,214,127,198,140, 25,121, 18,137, 68, 57,121,242,228,178,174,
-107, 9,128,198,245,235,215, 87,179, 43,135,193,184,143, 8, 86,101, 12,150, 59,149,163, 74,165, 58,151,153,153,217, 70, 46,151,
-151, 48, 87,101, 25, 45,158,231,145,158,158, 14,149, 74,117,238, 65, 30,176,171, 38,194, 98, 51,243,154, 83, 62,180,120,250,233,
-167,215,172, 93,187, 54,106,215,174, 93, 56,118,236, 24,170, 85,171,134,185,115,231,222, 74, 72, 72, 24, 74, 41,253,195,157,223,
-173, 89,179,102, 3,181, 90,141,195,135, 15, 3,192, 1, 0,207,189,242,202, 43,196,106,181, 98,225,194,133, 58, 0, 59,189,188,
-188, 54,252,244,211, 79, 77, 26, 53,106, 36,219,181,107, 87,193,177, 99,199,246,186,105,174,108,162, 40,222, 99,172,156,243,212,
-195,195,195,157, 8,150,197,203,203,235,124,126,126,254,211,122,189, 62, 95, 46,151,123,228,231,231, 27,157,141,149, 93, 95, 16,
- 4,201,181,107,215, 82, 0, 68,121,121,121,157,135, 83, 83, 98,137, 2, 38, 8, 93,187,118,237, 42,148, 62, 7,105,105,105,184,
-123,247, 46,204,102, 51,154, 55,111, 78,120, 98,225,179,239,156, 29,205, 46,201,135, 15,199,113,212,126,173,219, 71,253,149, 53,
-114,112,251,246,237,142,255, 57,142,195,175,191,254,234,150,105,219,185,115,103,133, 29,209, 75,117, 72,119, 25, 10,183,239,191,
-112,225,194,162,215, 81, 20, 71,174, 56,142,195,244,233,211, 33,151,203, 49,103,206, 28, 76,159, 62,189, 68, 84,198, 85, 4, 75,
- 16, 4, 68, 76,213, 57, 63, 20, 21, 93, 20,197,253,157, 8, 33,206, 38,203,173, 72,155,171, 14,238,238, 68,254,203, 74,167, 66,
-161, 40,183,131,123, 41,205,114,127,224,196,137, 19,223, 52,107,214,236, 70,181,106,213,118,182,105,211, 70,126,226,196, 9,140,
- 27, 55,142, 24,141, 70,207, 93,187,118, 57,126,183, 44,163,167,213,106,149,236,202, 97, 48,238, 35,130, 85,153, 78,238,238,244,
- 75,208,235,245,187,247,238,221,219,162,127,255,254, 66, 69,205,131, 90,173, 22,129,129,129,184,121,243,166, 85,175,215,187,156,
-254,192,102,115,127, 66,116, 87, 6,171,140, 60,248, 35, 38, 38,198,106,177, 88, 80,187,118,109,132,134,134,194, 96, 48, 96,222,
-188,121, 86,119,205, 21, 33, 68, 26, 27, 27,203, 3, 64, 78, 78, 14, 0,100, 1,168, 83,167, 78, 29,156, 60,121, 18, 57, 57, 57,
-155, 1,116,123,247,221,119,155,182,106,213, 74,186,118,237, 90,221,216,177, 99, 55, 91, 44,150, 57,238,232,139,162,104,178, 90,
-173,145, 28,199,153,115,115,115,147,157,243, 51, 48, 48,208, 87,173, 86,147,180,180, 52,139, 59, 6,171,113,227,198,199,239,220,
-185,131,217,179,103,103,204,157, 59,183, 78, 65, 65, 65, 78, 94, 94,158,213,217,100, 25, 12, 6,206,223,223, 95,190,104,209, 34,
- 37, 0, 52,110,220,248,120,121, 6, 75,171,213,134,171, 84, 42,199,255, 70,163, 17,119,239,222,197,221,187,119,145,150,150,134,
-130,130, 2, 68, 69, 69, 65,167,211,213, 96,151,227,223,135,115, 51,153,243,245,237,124, 3,175,204,181,238,172,217,175, 95, 63,
- 71,223, 45,123, 68,204,190,172, 95,191,190, 68,199,113, 87, 77,111,118,131,181,112,225, 66, 76,152, 48, 1, 10,133, 2,159,127,
-254,121,137, 38,194, 50, 76, 1,113, 39,157,145,211,244,184,187,192, 23, 18,137, 4,126, 99,211, 74, 52,197,149, 49, 26,207, 45,
- 35, 56,119,238,220, 7,214, 68,104,215,172, 81,163,232, 82, 89,182,108, 25,158,126,250,105, 28, 56,112,160,202, 77,132,145,145,
-145,171,230,207,159, 47,191,120,241, 34,242,243,243,145,145,145, 1,163,209,136,164,164, 36, 71,222,148,133, 78,167, 83,176,171,
-134,193,184, 15,131,229,220,249,211,149,193, 42,238, 32,233,202, 8,124,254,206, 59,239,188,210,190,125,123, 95, 15, 15, 15,164,
-164,164,220, 99,174, 10, 11, 11,161,209,104, 96, 50,153,176,119,239,222,124, 81, 20, 63,119,101, 10, 44, 22, 11, 2, 2, 2,144,
-153,153, 9,177,156,126,209, 28,199, 65,169, 84, 66,171,213,162, 60, 51, 80, 81, 5,108, 54,155, 97,177, 88, 96,177, 88, 42,109,
-210, 0, 40,237, 19,182, 22,255,190, 54, 36, 36,164,166, 66,161, 64,124,124, 60, 0, 92, 3,208,185,103,207,158,146,172,172, 44,
-250,226,139, 47, 30,161,148,142,119, 49,155,189,105,255,254,253,145, 0,160, 84, 42,175, 2, 64, 82, 82,146, 37, 55, 55,183, 68,
-100, 80,165, 82,209, 1, 3, 6, 4, 83, 74,177,127,255,254, 72,169, 84, 74, 81,206,156, 85, 0, 12,155, 55,111,190,232,229,229,
-181,230,131, 15, 62, 24,218,167, 79,159, 11, 13, 27, 54,140,212,106,181,233,122,189, 94,111, 48, 24, 40,207,243, 82, 31, 31, 31,
-197,142, 29, 59,110, 28, 57,114,164,155,167,167,231,154,205,155, 55, 95, 4, 80,102,164, 77,173, 86, 39,233,116,186, 8,141, 70,
- 3,189, 94, 95,194, 92,221,189,123, 23,148, 82,220,186,117, 11, 42,149,234, 14,187, 28,255, 30,156, 35, 46,165, 35, 45,165,215,
-185,107,174,156,205,208,142, 29, 59, 42,156, 3,203, 93, 77,103, 51, 52,105,210, 36, 44, 88,176,224,158, 8,214,156, 57, 69,207,
- 36,111,189,245,150,203,232,149, 51, 18,137, 4,119, 23,248, 34,104, 66,118, 9, 51, 3, 0,196,158,190, 74, 78,201, 38, 8, 2,
-102,207,158,125, 79,231,115,231, 38, 60,119,141,149,115, 58,211,211,211, 33, 8, 2,124,125,125, 49,108,216, 48,244,232,209,195,
-209,212, 88, 89,221,196,196,196,211,159,126,250,105,245,208,208, 80,172, 93,187,214,164, 86,171,101, 93,186,116,161,185,185,185,
-164,162, 8, 22, 51, 88, 12,134,107, 56,119, 42, 72,119,154, 9,203,170, 36, 9, 33,221,156,255, 79, 72, 72,200,211,106,181,195,
-134, 12, 25,162, 55, 26,141,168, 89,179, 38,228,114, 57, 44, 22, 11, 76, 38, 19,164, 82, 41,130,131,131, 65, 41,197,134, 13, 27,
-244, 58,157,110, 88, 66, 66, 66, 94, 69,154,132,144, 55, 31,123,236, 49, 67,124,124, 60,170, 87,175, 14, 15, 15,143,123, 94, 27,
-225,233,233, 9,111,111,111, 92,190,124, 25,203,151, 47,215, 19, 66,222,172, 72,179, 44,163,105, 55, 86,118,163,229,106,100, 82,
- 41, 77,181, 61,138,163,211,233, 0,192, 90,189,122,245, 64, 0,184,117,235, 22, 0,220,142,138,138,234, 88,171, 86, 45,114,224,
-192, 1, 80, 74,119,149,101,174, 74,105,102,199,197,197,221,142,139,139, 51,153, 76, 38,169,201,100,146,230,229,229,153,253,253,
-253, 3,252,253,253,253, 3, 3, 3,125, 3, 2, 2,188, 83, 82, 82,172, 86,171, 85,106,179,217,164,113,113,113,166, 86,173, 90,
-221,129,211,108,238,165, 52, 69, 0,249, 75,150, 44,153, 37,145, 72,110,183,109,219, 54,102,218,180,105, 9, 22,139,197, 24, 26,
- 26,234, 19, 20, 20,164,212,233,116, 5,239,191,255,126,250,130, 5, 11,186, 73, 36,146,219, 75,150, 44,153, 5, 32,191,248,187,
-247,104, 90,173,214,221,187,118,237,178, 90, 44, 22, 36, 39, 39, 35, 37, 37, 5,169,169,169,142, 79,111,111,111, 28, 63,126,220,
-102, 54,155,119, 85, 34, 63, 31,148,177, 96,154,248,179,239, 79, 69,198,202,157,110, 0,165,211,105, 55, 67, 79, 63,253, 52, 6,
- 15, 30,140, 33, 67,134, 96,216,176, 97, 24, 49, 98, 68,101,166,102, 40,125,189, 59,190, 59,109,218, 52,188,245,214, 91,120,231,
-157,119, 32,151,203,241,246,219,111, 99,230,204,153,152, 57,115,102,105,115, 69, 42, 56,246, 18,245, 92,222,178, 80,232, 86, 68,
-192,180,186, 86, 81, 19, 33,165,127, 46,238,231,167,195, 12,189,253,246,219, 56,114,228, 8,166, 76,153,130, 61,123,246, 96,220,
-184,113,216,182,109, 27, 70,143, 30,141, 95,126,249,197,241, 89,252, 16, 72,221, 73,167, 32, 8,232,216,177, 35,116, 58,157,195,
-192,142, 25, 51,166,132,222,232,209,163,221,202, 79,165, 82, 57,116,243,230,205, 27,151, 47, 95,126, 43, 59, 59,187, 71, 66, 66,
-194, 29,173, 86, 75,242,242,242, 28,231,176,244, 82, 28,137,150,179,235,136,105, 50, 11,117, 31, 17, 44,171,213,138,240,240,240,
- 18,239,182,226, 56,174,196, 82,153,126, 4, 0,144,154,154,186, 35, 56, 56,248,201, 39,158,120, 98,245,115,207, 61,231, 17, 29,
- 29, 45,137,136,136,128, 78,167,195,237,219,183,145,144,144, 96,221,179,103, 79,190, 78,167, 27,158,154,154,234,114, 20, 89,114,
-114,242,202,192,192,192,237,195,135, 15,159,209,180,105,211, 49, 19, 39, 78,228,163,162,162,144,151,151, 7, 31, 31, 31, 4, 4,
- 4, 32, 62, 62, 30,251,246,237,179,229,230,230, 46,182,217,108,239,166,165,165,101, 84, 38,147,172, 86, 43,111, 54,155, 49,100,
-200, 16,136,162,136,121,243,230,193,106,181,242,149,144, 48,155,205,102, 10,128,100,102,102, 2,128,206,110,184,174, 95,191, 14,
- 0,119, 34, 34, 34, 52, 0,176,107,215, 46, 2,224,176,187, 15,244,206,145,172,232,232,232,120,123,165,232,124,147,179,111, 47,
-142, 92,185,122, 12, 55, 12, 26, 52, 40, 93,167,211,245,156, 52,105,210,140,133, 11, 23, 14, 93,184,112,225, 61, 59,121,122,122,
-174,249,236,179,207,222, 29, 52,104, 80,122,121,209,171,226,136,221, 91,207, 62,251,236,160,115,231,206,121, 40, 20, 10,104,181,
- 90,100,101,101,193,108, 54, 35, 42, 42, 10,233,233,233, 88,185,114,101,129, 94,175,159,201, 46,199,191,151,242,140,149,187,125,
- 44,203,139,226,108,221,186,181,204, 57,166, 42,171, 89,218,100,184, 59, 55,149, 27, 15, 67,101, 78,253, 80,153,122,173, 60,205,
-143, 63,254,216, 49,217,106, 89,145,171,202, 68,176,236,154,190,190,190, 0,138,102,223, 23, 69, 17,143, 63,254,120,149,117,139,
-223, 45,248,164,253,255,216,216,216,119,215,174, 93, 59,135, 82,234, 7, 64,112,206, 3,246, 82, 5, 6,227, 1, 25, 44,155,205,
-150,212,177, 99,199, 18, 21, 91, 69, 47, 85, 45, 54, 34, 73,110,154,172,237, 81, 81, 81, 81,203,150, 45,251,159, 90,173,238,102,
- 48, 24, 26, 1,128, 66,161, 56,167,213,106,119,113, 28, 55, 63, 53, 53,213,237,151, 51, 23, 27,166,113, 97, 97, 97,243, 70,140,
- 24, 49,167,109,219,182, 3, 95,124,241, 69, 34, 8, 2,214,173, 91, 71,147,146,146,214,115, 28,247,102, 74, 74,202,205,170,100,
-146, 74,165,186,186,126,253,250,154, 91,183,110,133,197, 98,193,162, 69,139,160, 80, 40,174,186,251,125, 74,105,134, 32, 8,171,
-219,182,109, 59,244,200,145, 35,107, 40,165,231,229,114,249,247,113,113,113,195, 14, 31, 62,252, 35,165,244,146, 32, 8,223,183,
-105,211,102,216,241,227,199, 55, 80, 74,207, 86, 34,121,217,113,113,113, 57, 0,130,172,214,178, 91, 20,227,226,226, 76, 0,238,
-186, 97,174,236,228,143, 26, 53,202, 60,106,212,168,215, 6, 13, 26,180,252,143, 63,254,104,153,155,155,219, 8, 0,188,189,189,
-207,181,104,209,226,248,143, 63,254,120,165, 56,114,101,112,117,236,132,144, 1,141, 26, 53,218,240,222,123,239,169, 99, 98, 98,
-132,218,181,107, 35, 33, 33, 1,231,207,159,183,126,243,205, 55,133,122,189,190, 31,165, 52,135, 93,142,127, 15,246, 38, 66,111,
-111,239, 18, 15, 79,246,161,251,149,105,194, 43, 75,179,244,131, 25,207,243, 21,105,186,116, 53, 26,141,198, 49,106,217,157,174,
- 9, 21,189,123,212,158, 78,187,166,125,113,195, 92, 81, 87,154,197,175,233,169,140, 38,220,209,180, 88, 44, 14, 93, 55, 52, 43,
-245,163, 39, 78,156,248, 6,192, 55,181,107,215,190, 14,160, 22, 51, 85, 12,198, 95, 96,176, 46, 95,190, 28,251, 87,254,240,173,
- 91,183,242, 1,188, 91,188, 60, 16,146,146,146,110, 2, 24, 20, 20, 20,244,201,225,195,135,223, 6, 0, 81, 20,103,187,122,159,
-161, 43,206,158, 61, 59, 64, 34,145, 44, 92,177, 98, 69, 91, 74, 41,188,188,188, 14, 95,191,126,253,229, 74, 70,193,198, 16, 66,
- 38,218, 71, 5, 26,141,198, 49,132,144,201,148, 82,173,211,118,199,255,149,132, 2, 48, 82, 74, 67,202,217,110,172,132,185,114,
- 68,178, 0,152,126,252,241,199, 66, 0,103,240,231, 60, 87,150,226,197, 0,167,102, 65, 23, 55,184,223, 9, 33,181,223,126,251,
-237,185, 60,207,119,213,106,181,161,106,181, 58,209,106,181,238,214,233,116,111, 82, 74,179,216,165,248,247, 97,181, 90,147, 59,
-118,236, 40,148,245,224, 84,209, 13,188,162, 7, 42,155,205,150, 20, 23, 23,135, 42,104, 38, 87,144,212,219,109,218,180,225,220,
-213,178, 99,177, 88,210, 43, 74,103,155, 54,109,202,125,104,172,234,177,183,105,211,166, 82,105, 44,174,171,146, 31,180,166,139,
-252, 44, 23,189, 94,159, 83,173, 90,181, 66,131,193, 32, 49, 26,141,146,210, 17,123,165, 82,153,193,174, 28, 6,163,138, 6,235,
-223, 76,177,161,234,251,160,244,138,251, 67,189,244, 0,116, 12,165,254,215, 86,244,127, 37,249, 43, 34, 64, 34, 0,221, 3,202,
-195, 76, 0, 47,178, 75,238,159,199,249,243,231, 91, 61,104,205,139, 23, 47,198,254, 5,233,108,243,160, 53, 47, 92,184, 16,251,
-168,106, 86, 68,114,114,114, 43,118,101, 48, 24,247, 7,199,178,128,193, 96, 48, 24, 12, 6,227,193, 66, 0,148, 57, 18,160, 50,
-111,202,174,202,104, 2, 87,250, 76,147,105, 50, 77,166,201, 52,153, 38,211,252,239,105,186,210,174,140,255,248, 71, 83,214, 48,
-220, 7,181, 0,232,198, 52,153, 38,211,100,154, 76,147,105, 50, 77,166,249,168, 45,172,137,144,193, 96, 48, 24, 12, 6,227, 1,
-195, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193,120,132, 32,132,144,
-176,176,176,142, 33, 33, 33,109, 30,213, 60, 16, 88, 49, 96, 48, 24, 12, 6,131,241, 32,168, 94,189,186,183,205,102,123, 46, 36,
- 36,228,229,154, 53,107,214, 4,128,208,208,208,243,148,210,249, 74,165,242,251, 27, 55,110,152, 30, 25,147,201, 94,133,192, 96,
- 48, 24, 12, 6,227,126, 8, 9, 9,105, 10,224,101,165, 82, 57,188, 85,171, 86,178, 46, 93,186,192,199,199, 7, 86,171, 21,169,
-169,169,248,253,247,223,113,250,244,233,108,139,197,178,208, 98,177, 44,204,200,200, 72, 99, 6,139,193, 96, 48, 24, 12, 6,163,
- 28,130,131,131, 63,237,213,171,215, 36, 31, 31, 31,212,174, 93, 27, 65, 65, 65, 48, 26,141,208,235,245,160,148, 66, 16, 4, 80,
- 74, 81, 80, 80,128, 19, 39, 78,224,216,177, 99,214,252,252,252, 53,132,144,249, 41, 41, 41,167,153,193, 98, 48, 24, 12, 6,131,
-193, 40, 69, 72, 72, 72,218,158, 61,123, 2,172, 86, 43, 50, 51, 51, 97, 52, 26,161,211,233, 28, 6,139,231,121, 80, 74, 97,181,
- 90, 1, 0,162, 40,226,210,165, 75, 56,114,228, 8, 18, 19, 19, 63, 75, 77, 77,125,237,191,152, 47,172,147, 59,131,193, 96, 48,
- 24,140,251,194,104, 52, 98,213,170, 85,200,204,204, 68,120,120, 56, 66, 67, 67,225,237,237, 13,165, 82, 9, 0, 14,115, 5, 0,
- 28,199, 33, 38, 38, 6,195,135, 15, 7, 33,100,216,127, 53, 79, 88, 39,119, 6,131,193, 96, 48, 24,247,131,197,100, 50, 33, 54,
- 54, 22,241,241,241, 56,121,242, 36,154, 53,107,134,250,245,235, 35, 51, 51, 19, 41, 41, 41, 37,118, 62,126,252, 56, 78,157, 58,
-133, 14, 29, 58,252,167, 51,133, 53, 17, 50, 24, 12, 6,131,193,168, 50,161,161,161,207, 84,171, 86,109,209,136, 17, 35,148, 77,
-154, 52, 65, 82, 82, 18,146,147,147,145,147,147,131,166, 77,155, 34, 38, 38, 6, 55,111,222,196,246,237,219,113,234,212, 41,200,
-229,114,132,133,133, 65,179,230, 7,252, 18, 18,156,156,146,146, 18,198, 12, 22,131,193, 96, 48, 24, 12, 70, 41, 66, 66, 66,252,
- 8, 33,111,134,134,134,190, 50,108,216, 48, 73,237,218,181,145,148,148,132,140,140, 12,228,228,228,224,232,209,163,118, 51,134,
-176,176, 48, 36, 36, 36,224,220,185,115,122,163,209, 56, 54, 57, 57,121, 37, 51, 88, 12, 6,131,193, 96, 48, 24,229, 27,173,112,
- 0,179,106,213,170,245,204,211, 79, 63,205,133,132,132, 32, 57, 57, 25,123,246,236, 65,173, 90,181,144,150,150,134, 19, 39, 78,
-216,242,243,243, 23,219,108,182,119,211,210,210, 50,254,171,121,241,151,118,114, 39,132,116, 99,154, 76,147,105, 50, 77,166,201,
- 52,153,230,163,161,153,146,146,146,152,146,146, 50,242,218,181,107, 49,115,230,204,217,188,104,209, 34,240, 60,143,208,208, 80,
-236,217,179,135,238,222,189,123,125, 97, 97, 97,221,148,148,148,113,255,101,115, 5,176, 78,238, 12, 6,131,193, 96, 48, 30, 48,
-119,239,222,189, 12, 96, 64,104,104,104,171, 11, 23, 46,188, 1, 0,162, 40,206,190,123,247,238,137, 71, 37, 15,152,193, 98, 48,
- 24, 12, 6,131,241,151,144,156,156,124, 12, 64,223, 71,241,216,217, 60, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,
-131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,241, 72, 65, 0,148, 57, 18,128, 82,186,203,109,145, 42,140, 80,112,165,207, 52,
-153, 38,211,100,154, 76,147,105, 50,205,255,158,166, 43,237,202,248,143,127, 52,148, 82,151, 11,138,231,203,170,236, 2,160, 91,
- 85,190,199, 52,153, 38,211,100,154, 76,243,225,107, 86,165,174, 47, 75,179,248,225,157,160,168,149,132,179,255,255, 79, 75,231,
-191,229,216, 31, 21,205,255,218, 34,184,112,151,142, 76, 34,132,136, 0, 68,250, 0,102, 38, 37,132,216, 79,192, 3,209, 99,252,
- 5,161,205,162,115, 68,254,244,225,236, 60, 49, 24,255,225,235,253,129,213,245, 78,117, 7,239,116,147,181, 1,176, 17, 66,112,
- 63,117,201, 95,113, 79,250,167, 31,251,163,172,249,111, 71,168, 40,163,170, 85,171,182, 35, 32, 32,160,115,102,102,166, 88,188,
- 30,161,161,161,224, 56, 14,130, 32,232,227,227,227, 61, 43,251,131,129,129,129, 95,199,196,196, 60,151,149,149, 37,114, 28,135,
-240,240,112, 16, 66,192,243, 60,120,158,215,223,184,113,195,243,239,206,148,230,205,155,231,152, 76, 38, 77,233,245, 50,153,204,
-112,242,228, 73,143, 71,193, 92,249,251,251, 63, 25, 24, 24,232,157,157,157, 77, 1, 32, 44, 44, 12, 60,207, 23, 21, 26, 65,176,
-222,188,121,115,133,187,122,145,145,145,199,149, 74,165,183, 32, 8,224,121, 30,130, 32, 64,171,213,230, 94,186,116,169,101,241,
-246, 67, 74,165,210,143,231,121,123,217,130,193, 96,200,186,120,241, 98, 59,118,235,251,119,178,126,253,122,190,103,232,243,181,
- 4,170,111,204,113,212, 75, 20, 73,158,149, 40,207,110, 79,254,250,134, 59,223, 31, 56,112,160,237,111,190, 6,170, 3,176, 82,
- 74, 83,170,240,101,174,140,138,182,151, 13, 24, 92,252,175,129, 3,178, 8,112,173, 46,176,225, 34,160, 47,213,172, 32, 62,236,
- 7,169,234,213,171,207,175, 86,173,218,200,194,194, 66, 29,199,113, 32,132,208,152,152, 24,251, 62, 37, 62, 69, 81, 76,186,112,
-225, 66,172,139,155,172,164,122,245,234,159, 85,171, 86,237, 89,157, 78,167, 35,132,128, 16, 66, 9, 33,104,212,168,209, 61,154,
- 54,155, 45,233,252,249,243,177, 15, 43,157,127,215,177, 55,108,216,176, 76,205,242,142,189, 44, 77,231,116, 18, 66, 16, 19, 19,
-115,223,233,252, 39,106,254,103, 13, 22, 0, 46, 32, 32, 96,115,203,150, 45, 59,109,217,178,133,187,124,249, 50, 23, 29, 29, 13,
-155,205, 6, 81, 44,186,246,155, 53,107,166,170,236,143, 5, 5, 5,125,215,178,101,203, 33, 91,182,108,225, 54,111,222,204,181,
-104,209, 2,132, 16,216,108, 54,216,108, 54,116,237,218, 85,121,159,149,133, 70, 16,132,137, 50,153,172,163,213,106,173, 15, 0,
- 18,137,228,146,209,104,220,103,181, 90, 63,167,148, 22,186,163, 99,177, 88, 84, 23, 46, 92,184, 39,111, 90,182,108, 41,171,106,
-218,234,212,169,115,152,227,184,168,178, 46,218,242, 62, 41,165,183, 46, 92,184,208,182, 60,205,122,245,234, 29,230, 56, 46,202,
-190,127, 89, 26,165,215,137,162,120,235,252,249,243,109, 43,170,116, 2, 3, 3,159,106,219,182,173,215, 79, 63,253, 68, 18, 19,
- 19,137, 82,169,132, 40,138,176,217,108,176, 88, 44,232,210,165, 75,165,230, 79, 83,169, 84,158,187,119,239,174, 21, 16, 16,128,
-244,244,116,100,101,101, 97,244,232,209,215,236,219,149, 74,165,223,239,191,255, 94,199,215,215, 23, 58,157, 14,121,121,121, 24,
- 54,108,216,191,254,226,234,209,161,230,123, 4,240,181,255,111, 19,145,189,235,224,205,183,238, 87,183, 94,189,122,167,100, 50,
- 89, 96,121,231,188,172,115,111, 50,153,210, 46, 92,184,208,204,197,245, 19, 1,160, 47,207,243,181, 5, 65,168, 7, 32,194,106,
-181, 6, 2,128, 84, 42, 77,227,121, 62,193, 98,177, 92, 49,153, 76,215, 1,108,165,148, 38,148,167,213, 51,244,249, 90,196,170,
- 27, 88, 96, 20,123,171,106,126, 80, 87,119,115,250, 85,149, 92,183,173,103,232,243,235,221, 53, 89,127,163,185,138, 12, 9, 9,
-249,184,248,239, 41,148,210,248,251,213,180, 1,131, 41,165, 94, 0,144,151,151,231,149,152,152, 24,180,117,235,214,152,185,115,
-231,118,145, 25, 12, 31,153,128,203, 21,125,191,123,199, 90, 39, 4,142,132,161, 56, 6, 96,165, 98,210,206,125, 55, 31,196,141,
-137, 11, 13, 13,157,223,179,103,207, 17,139, 23, 47, 86, 29, 59,118, 76,213,176, 97, 67,240, 60,111,175, 47, 80, 58,240,208,186,
-117,235, 10,179, 15,128, 16, 18, 18, 50,239,177,199, 30, 27,186,112,225, 66,213,149, 43, 87, 84,145,145,145, 40,190,217,150, 40,
-155,246,117, 77,155, 54,125,216,233,252, 75,143,189, 87,175, 94, 67, 23, 45, 90,164, 58,119,238,156,170,118,237,218,224, 56, 14,
- 28,199,221,163,199,113, 28, 98, 99, 99,221,210,236,209,163,199,208, 37, 75,150,168, 78,157, 58,165,170, 87,175,158, 35,239,156,
-154,231, 42,157,206,127,184,230,127,207, 96, 17, 66,184,106,213,170,173,138,141,141,237,185,101,203, 22, 30, 0, 78,157, 58,133,
-236,236,108,132,134,134, 66,163,209, 64, 46,151,195, 96, 48, 84, 42,220, 23, 24, 24,248,117,177,185,146, 0,192,134,225, 3,112,
- 75, 2,140, 79, 55, 65, 42,149,226,230,205,155,224,121,254,126, 66,199, 29, 60, 61, 61, 87,110,220,184,209,167, 89,179,102, 92,
-102,102, 38, 34, 35, 35,145,157,157,221,114,255,254,253,205,159,127,254,249,231, 9, 33,207, 80, 74,247,187,171,185,109,219, 54,
-168,213,106,168, 84, 42,168,213,106,152,205,102, 82,213,244,241, 60, 31,118,236,216,177, 0,141, 70, 3, 81, 20, 29, 75,169,246,
-107, 7,162, 40,162, 67,135, 14,230, 10, 79,158, 32,132, 29, 59,118, 44, 64,169, 84,130, 82, 90, 66,207,102,179, 65, 46,151, 59,
- 63, 33,194,102,179,161, 77,155, 54,102, 87,145, 43,187,185, 2,128, 53,107,214, 32, 40, 40, 8, 1, 1, 1, 80,171,213, 80, 42,
-149, 85, 57,118,248,249,249,225,149, 87, 94,193,224,193,131,177,122,245,106, 72, 36, 18,231,227,128,175,175, 47,126,251,237, 55,
-120,122,122,162, 70,141, 26, 37,182,255,107, 35,129,128,239,246,253, 55, 29, 17,217,129,125,154, 8,221,226,162, 22, 58, 42,215,
-162,157,168, 88,180, 47, 21,109,182,156,221,135,110,207,112,121, 87,224,184,144, 99,199,142, 5,200,229,114,247,110,238, 54, 27,
-154, 53,107,198,187,184,126,122,199,196,196,108,120,249,229,151,165,181,107,215, 38, 82,169, 20,130, 32, 64, 16, 4,123,121,172,
- 65, 41,173, 33,138, 98,167,180,180, 52,250,197, 23, 95,124, 68, 8,121,130, 82,186,173,204,178, 73,245,141, 11,140, 98,239, 3,
-167,209,114, 96,183,105,248,109,221,244,150,113, 77, 69,120,168,244, 55, 0,252, 99, 13, 22, 33,196, 83,169, 84,190,189,110,221,
- 58, 41, 0,116,235,214,237,109, 66,200,171,148,210,252, 7,245, 27, 94, 94, 94,240,242,242, 66,195,134, 13,241,228,147, 79,122,
- 55,109,218,116,114, 39,163,113,204, 94,160,220,107, 83,224,184,176, 95,127,191, 22, 96,255,127,232,128,230,210,158,157,106,165,
- 21, 61,136,149,222,155, 66,180,209,164, 93, 7,111,197,186, 56, 86, 46, 40, 40,232,147, 94,189,122, 13, 90,188,120,177, 7, 0,
-124,253,245,215,120,252,241,199, 17, 24, 24, 8,165, 82, 9,153, 76, 6,137, 68, 2,169, 84,234,248,116, 17, 17,226,131,130,130,
- 62,122,252,241,199, 7, 46, 92,184,208, 3, 0,190,251,238, 59,244,233,211, 7,126,126,126,240,244,244,132, 92, 46,135, 76, 38,
-131, 84, 42, 45, 97,184, 42,147,206, 23,122,116, 65, 77,165, 28,125,222,251, 8, 62, 62, 62,216,253,218,203,144,112, 28,198,109,
-223, 15, 15, 15,143, 10,211, 89,158,230,201,147, 39,145,158,158, 94,230,177, 19, 66, 42,172,251,156,143,189,119,239,222, 3, 23,
- 45, 90,228, 56,246,158, 61,123,194,207,207, 15, 30, 30, 30,144,203,229,144, 74,165, 37,150,242,242,192, 89,179, 87,175, 94, 3,
-151, 44, 89,226, 1, 0, 43, 86,172, 64,183,110,221,224,227,227, 3, 15, 15, 15, 71, 94, 86,246, 28,253,147, 53,255,147, 6,203,
-222, 55, 42, 32, 32, 96,208,207, 63,255,204, 57,223, 0,229,114,185,227,194,144,201,100,224, 56,174, 50,149, 22,137,137,137,121,
-110,203,150, 45,142, 47,153, 74, 85, 10,114,185,188, 82,154,165,244,187,117,238,220,249,135,159,127,254, 89, 33,149, 74,161,215,
-235,113,225,194, 5,120,121,121, 65, 38,147,161,127,255,254,124,187,118,237,252, 58,117,234,244, 19, 33,100,168, 59, 35, 20, 40,
-165,208,104, 52, 37, 12,214,253, 52, 33,219, 47,208, 45, 91,182,128,231,249, 18,133,204,254,233,252,119, 64, 64,128, 91,186,114,
-185, 28,135, 15, 31, 6,207,243,144, 72, 36, 16, 4, 1, 18,137, 4,191,252,242, 11, 94,123,237, 53,100,102,102,130, 16, 2,137,
- 68, 2, 15, 15,151,173,155, 36, 48, 48,208,219,110,174,138, 35,128, 80, 42,149,144, 72, 36, 68, 16, 4, 98,111,198, 35,132, 16,
-119,219,212, 5, 65, 64, 66, 66, 2,134, 15, 31,142, 21, 43, 86, 96,246,236,217, 24, 58,116,104,137,237,249,249,249,240,241,241,
-129,143,143, 15, 20, 10, 69,149,203,194, 63, 9,177, 84,238,188, 59,231, 99, 21, 68,138,162, 78, 30, 34, 32, 2, 20, 20, 34, 21,
-145,150,124, 3,159,126,178,128,119,183, 44,201,229,114, 28, 58,116,200, 97,130, 4, 65, 0, 33, 4,206,198,200,190, 4, 5, 5,
-185,212,148, 74,165,179, 54,109,218, 36, 91,189,122, 53,214,174, 93,235,248, 13,181, 90, 13,111,111,111,248,249,249, 57,150,176,
-176, 48,242,205, 55,223, 72, 27, 55,110, 60, 11,192,182,178, 77, 32,245, 82,213,252,160,238,192,110,211,138,204,229, 52,138,156,
-107,115,154,112,185, 51,188,254,193,230, 74, 0,240,250,151, 95,126,233,215,188,121,115, 0,192,151, 95,126,233, 55,106,212,168,
-215, 9, 33,111, 81, 74,173, 85,126,192, 2,214, 18, 66, 6, 23, 71,108, 21,221,187,119,151,125,245,213, 87,168, 87,175, 30, 38,
- 76,152,224,251,233, 71, 31,245, 5,240, 83,249,101,169,100, 97,250,224,227,249,222,148, 22,149, 31, 42,210, 18,159,217,233, 9,
-120,251,237,247, 92,214,201, 0,184,144,144,144,231,151, 46, 93,234,232, 14,225,227,227, 83,102,221, 36,145, 72, 28, 75, 5,166,
-136, 20, 71,133, 70, 45, 94,188,216,161,233,239,239, 15,169, 84, 90,226, 6,123,251,242, 25,108, 91,254, 62,212,190, 65, 24, 62,
-229,195, 74,167, 51, 76, 46, 67,152, 82,134, 38, 77,154, 64,165, 82,225,164,164,232, 86,230,225,225,225, 50,157,229,105, 58,215,
-203, 0,160,211,233, 28, 81,123,147,201,132,216,216, 88,183,142,125,201,146, 37, 14, 77, 63, 63, 63,199,177,219,211,229, 92,215,
-219, 31, 96, 42,210, 12, 9, 9, 25,181,108,217, 50,135,166,175,175,111, 9, 13,137, 68,130,149, 43, 87,222, 83, 71,220,175,102,
-101,207,123,105,205,132,132, 4,204,157, 59,215, 81, 39,217,163,120,246,174, 70, 11, 22, 44,112,203, 96,255,167, 34, 88, 0, 72,
-102,102,166,120,249,242,101,238,228,201,147,144, 72, 36, 8, 8, 8, 64,139, 22, 45, 0, 0,102,179,217,126,211, 37,245,234,213,
- 75,227, 56, 14,246,155, 46,199,113,176, 90,173,142,246,100, 39, 35,195,101,103,103,139, 59,119,238,228, 86, 61,209, 3, 38, 10,
- 52,125,251,125,244,236,211, 7,219, 67,101,224, 1,180,188,156, 9,153, 76, 38, 4, 7, 7, 91,236, 39,193,174,237,220, 55,171,
-180, 57, 34,132,120,168,213,234,111,182,110,221,170,224, 56, 14, 5, 5, 5, 16, 69, 17,237,218,181, 3,199,113, 56,127,254, 60,
-222,124,243, 77,108,216,176, 1,155, 54,109, 82, 54,107,214,236, 27, 66, 72,125, 74,105,129,147,153,218, 85, 86,225,244,240,240,
-128, 74,165,114, 24, 44,251, 49, 23,183,169,151,110,146, 73,190,112,225, 66,243,242, 52,237,145,132, 1, 3, 6, 56,250,156,217,
-205, 80,233, 79,169, 84,138,243,231,207,151,101,250,238,209, 20, 69, 17,237,219,183,183, 55,197, 65,163,209, 96,239,222,189,142,
-237, 77,155, 54,133,201,100,130,191,191, 63, 46, 93,186,228, 82, 51, 35, 35,131,166,164,164,144, 85,171, 86, 65, 34,145,192,207,
-207, 15, 42,149,138,252,244,211, 79,175, 43, 20,138, 48,163,209, 40, 90, 44, 22,132,133,133, 45,168, 81,163,134,253, 28,105,111,
-220,184,225, 87,158, 38,207,243, 80, 40, 20,248,238,187,239, 48,119,238, 92,188,241,198, 27, 37, 46, 44,158,231, 97, 48, 24,224,
-239,239,239, 48, 89,165, 47,188,191, 98,216,238, 95,173, 73, 65,113,225,212,118, 92, 60,183, 11,162, 77,132, 77,164,160,212, 6,
-209, 10,156,220,121,180, 78,234,173,148, 80, 10, 10, 20,247,184,177, 20,106,173,157,252,229,245, 0,108,222,155,105,156,231, 42,
-157,130, 32,192, 98,177, 96,235,214,173,184,113,227, 6,118,236,216, 1,189, 94,239,200,199, 54,109,218, 96,212,168, 81, 8, 10,
- 10,114,153,159,148,210,239, 18, 19, 19,155,182,111,223,158,228,230,230, 34, 55, 55, 23,122,189, 30, 54,155, 13, 86,171, 21,130,
- 32, 64,161, 80, 64,169, 84, 34, 48, 48, 16, 6,131,129, 26,141,198,239,202,211, 20, 69,146,167,187, 57,253,234,111,235,166,183,
- 28, 56,141, 98,253,135, 4,117, 34,228,186,125,103,188, 71,109, 59,246,122,119, 66, 57, 10, 20, 29, 58, 71, 64,109, 54, 91,230,
- 75,227, 63, 24,247,176,207, 81, 41,198, 76,156, 56,177,190,115,243,244,176, 97,195,112,225,194,133,250,159,127,254,249, 24, 0,
- 95, 86, 86,211, 7, 8, 5, 0, 43,240, 27,138, 22,172,215,235,201,144,205,155, 7, 0,120,118,211,166, 77, 24, 58,116, 40, 62,
-249,232,163,134,165, 13, 86,137,178, 68, 41, 18,174, 29, 64,194,245,131, 16, 69,234, 20, 5, 47,251,111,234, 94, 58, 73, 97, 97,
-161,225,216,177, 99,154, 21, 43, 86,192,219,219, 27, 81, 81, 81,142, 86,138,210, 55, 88,251,255,174,202,146, 78,167, 51, 92,190,
-124, 89,243,195, 15, 63,192,215,215, 23, 53,106,212,128, 74,165,114,104,202,100, 50, 28,221,190, 17, 99,134,247, 70,102,194, 69,
-204,127,117,144,219,233,124,161,123, 23,132, 43,100, 24, 48,251, 3, 68, 71, 71, 99,253,224,126,224, 8, 48,118,207, 81, 72,165,
- 82,172,232,221, 1, 50,185, 12, 99,247,252,225, 42,157, 14,205, 19, 39, 78, 64, 20, 69, 68, 68, 68, 64,167,211,193,211,211, 19,
- 10,133, 2, 18,137, 4, 59,119,238, 68,255,254,253,177,122,245,106,180,105,211,198,229,177, 23, 22, 22, 26,206,157, 59,167,249,
-254,251,239,225,235,235,139,240,240,112,168, 84, 42, 71, 96,194,110,180,120,158, 71, 84, 84, 20,242,242,242, 80,179,102,205, 10,
- 53,181, 90,173,225,228,201,147,154,239,191,255, 30, 62, 62, 62, 8, 11, 11,115, 68,216,236,166,104,230,204,153, 37, 52,154, 52,
-105,114,223,154,149, 61,239,165, 53, 7, 12, 24,128, 90,181,106,193,211,211, 19,106,181,218,161, 93,145,230,127,218, 96, 81, 74,
-105,241, 40, 10, 68, 71, 71, 35, 59, 59, 27,114,185, 28, 45, 90,180, 64,102,102, 38, 52, 26, 13,164, 82, 41, 40,165, 24, 60,120,
- 48, 63,101,202,148,128, 98, 83,229,168,240,203,105, 75, 23, 57,142, 67,219,182,109,113,161,184,229,167,103,159, 62, 8, 11, 11,
-131,189, 19,135, 66,161,192,208,161, 67,201,107,175,189, 38,216,163, 23,148, 82,232,245,122, 52,110,220, 88, 89, 65,116,228,213,
-159,126,250,201, 75, 38,147,161,160,160,192,209, 68,198,243, 60, 46, 95,190,140, 79, 62,249, 4,207, 62,251, 44,238,220,185,131,
-144,144, 16, 76,158, 60, 89,243,193, 7, 31,188, 10,224, 93, 87,153,163,209,104, 28,230, 74,165, 82, 97,196,136, 17, 66,187,118,
-237, 2, 52, 26, 13, 60, 60, 60, 96,111,238,179,217,108,104,219,182, 45,113, 21,117, 16, 69, 17,219,183,111,135, 32, 8, 46, 35,
- 88,197,109,214,110,105, 30, 59,118,204, 97,206,156,159,138, 8, 33,184,112,225,130,195,204, 21, 23,230,138, 52, 41,207,243, 80,
-171,213, 8, 10, 10,130, 82,169,132, 74,165, 34, 91,182,108,121, 43, 34, 34, 34,248,229,151, 95,230,242,243,243,185,216,216, 88,
-244,238,221, 91, 16, 69, 17,102,179, 25, 93,186,116,169, 48, 31, 37, 18, 9,142, 31, 63,142, 15, 62,248, 0,211,166, 77,195,146,
- 37, 75,208,173, 91,183, 18, 70,129, 16,130,106,213,170,193,211,211,243,191,115,117,137,128,217,106,129,174, 80,239,104,194,181,
-217,108, 56,183,247, 76,157, 91,103,174,197,252,252,195,106, 9, 0, 24,246,110,116,254, 86,240,147, 11,127,172,219,201, 87,122,
-108,111,182,249,152,139,166, 66, 76,152, 48, 1, 51,102,204,192,224,193,131,177,115,231, 78,188,249,230,155,120,254,249,231, 75,
- 68,176,220,193, 98,177, 44,125,230,153,103, 70,175, 95,191,190,222,180,105,211, 56,123, 4, 75,165, 82,129, 16, 2,131,193, 0,
-163,209, 8,189, 94,143, 43, 87,174,136, 47,190,248,226, 85,147,201,180,180, 60, 61, 43, 81,158, 85,201,117,219,106, 87,231,107,
-105,227, 63,246,104,223, 42, 66, 79,148,205,243, 30,175,221,141,118, 27, 26,225, 3, 74, 65,197,162, 40,159,209,168,197,235, 83,
- 39,243,127,231,169, 34,132,244,238,222,189,123,143, 57,115,230,220,179,109,206,156, 57,184,116,233, 82, 15, 66, 72, 66,121, 77,
-162,101,225, 13,132, 41,130,130, 62, 3, 0,239,187,119, 39,229, 2, 73, 0, 48, 4,232,105, 3,250,237,220,185, 19, 0, 80,189,
-122,117,136, 64, 3, 2,124,199, 3,107,173,101, 69, 5, 41,133,197, 98,133, 94,111,172,208, 88,217,255,119, 21, 92,182,215,245,
- 60,207,163, 97,195,134,232,217,179, 39,164, 82, 41, 60, 60, 60, 28,205, 57,101, 69, 49, 92, 52,221, 83, 0, 34, 33, 4, 81, 81,
- 81,232,209,163, 7,164, 82, 41,212,106,181,195,180,200,100, 50,240, 60,143, 70,237,186, 98,245,202, 57,120,174, 79, 51, 60, 27,
- 23,136, 13,231,178,220, 74,103,132, 82,134, 26, 42, 57,162,163,163,225,225,225, 1, 66, 0,129,255,179, 62, 85,169,148,144,201,
-101, 21,166,179,180,102, 90, 90, 26,226,227,227, 17, 31, 31, 15,142,227,208,190,125,123, 71,212,229,250,245,235,120,247,221,119,
- 97, 52, 26,221, 58,118,142,227, 80,187,118,109,116,233,210, 5, 50,153, 12, 42,149,170, 68,211,160, 61, 79, 11, 10, 10, 80,171,
- 86, 45,108,222,188, 25, 29, 58,116,112,169, 25, 29, 29,141,142, 29, 59, 66, 42,149, 58, 30,164,149, 74,165,227,190, 81,108,238,
- 28,191,209,172, 89,179, 74,105,238, 56,126, 7,203,119,254, 14,163, 73, 68,190,206, 82,226, 11,193,254,158, 56,248,253, 52,183,
-142,221,174,185,108,217, 50,228,230,230, 58,234, 32,123, 0,198, 30, 60, 9, 15, 15,199,162, 69,139, 30,173, 38, 66,251,109,193,
-238, 42, 67, 67, 67, 97,239,231,161,209,104, 32,147,253,217,199,219,106,181, 98,195,134, 13, 8, 8, 8,112, 44, 94, 94, 94,229,
- 22,232,234,213,171,131, 82,138, 9, 25, 69,221, 12,126, 11,145, 34, 1,192,227, 25,212, 17,221,177,217,108,248,233,167,159,224,
-108, 96, 60, 60, 60, 42,108, 46,146,201,100,157, 90,180,104,193, 25,141,198,123,204,213, 7, 31,124,128,161, 67,135,162,110,221,
-186, 16, 69, 17,133,133,133,232,220,185,179,100,193,130, 5,157, 42, 99,176, 84,170,162,254,252, 38,147, 9,123,247,238,133,143,
-143, 15,252,252,252,224,235,235, 11, 15, 15, 15, 40, 20, 10, 16, 66, 92, 54,151, 81, 74, 49, 96,192, 0, 71,161,115,142, 90,149,
- 54, 91,135, 15, 31,118,171,153,140, 82,138, 86,173, 90, 65,173, 86, 67,163,209, 64,163,209, 96,251,246,237,142,237, 45, 91,182,
-132, 40,138, 8, 8, 8,192,145, 35, 71, 92, 86,186, 97, 97, 97,142,253, 37, 18, 9,249,233,167,159, 94,143,140,140, 12, 30, 59,
-118, 44,199,243, 60, 78,157, 58,133,139, 23, 47, 34, 40, 40,200,209, 39,203, 85, 58,181, 90,109,234,130, 5, 11,108, 95,125,245,
- 21, 0,160, 75,151, 46,200,203,203, 75,119,218,158, 53,124,248,112,199, 40, 69, 0,200,206,206,206,250, 15,248, 43, 88,205, 86,
-232, 12, 6, 20, 22,232, 28,209,160,244,148, 52,239,105,175, 77,148,124, 50,110, 36, 0,224,181,121, 95,162, 96,201,159, 21,216,
-198,215,134, 4, 60,241,233,218,233, 0,250, 87,164,175,211,233, 96, 52, 26, 81,163, 70, 13, 28, 63,126, 28, 5, 5, 5,232,214,
-173, 91,137, 8,169,115,158,186, 56,247, 38, 66, 72,187, 62,125,250,252,241,249,231,159,215,172, 95,191, 62,209,106,181,208,233,
-116,112,254, 60,119,238, 28, 93,179,102,205, 45,157, 78,215,150, 82,106, 42, 79,111,123,242,215, 55,122,134, 62,191,126,255, 89,
- 89, 31,255,168,171,158,201, 57, 53,173, 89,201,114,109,190,254,138,193, 70, 47,130,218, 0, 27, 68, 80,171, 8, 27, 40,254,206,
-241,219,132,144,176, 58,117,234,188,180,122,245,234, 50,243,139,231,121,172, 94,189, 26,237,219,183,127,137, 16,114,185,162,206,
-253,118,218, 0, 50,131, 68, 50,109,235,143, 63, 22,245,229,234,210,101, 90, 27,139,229,181, 35,128,169, 65,163, 70, 79, 29, 62,
-124,216,203, 94,175,120,121,121,129, 82,202,235,116, 58,175,182,109,219, 62, 85, 86,179, 43, 21, 1,139,197, 2,189,222,136,188,
-188, 2,152,204,150,226, 58, 83,132,205,102, 45,254, 20, 97, 45,174, 71, 37, 2,239,209,169, 77,245,194, 34,163, 69,114,247, 29,
-189, 19, 94, 78, 93, 79, 9, 33, 8, 12, 12,132, 84, 42, 45, 17,101,114, 39,122, 85, 6, 54,123, 93,232,231,231, 7,153, 76,134,
-179,123,127, 70,250,165,131,144, 18, 10,209,102,129,104, 53,195,102, 53,131,231,120, 92,185,153,130,232, 96,151, 99,135, 28,233,
-236,249,246,108,180,110,221, 26,235, 7,247, 3, 33,192,203,123,142, 66, 34,145,224,251, 1, 93, 33,151, 73,241,226,206,163,238,
-166,179,196,177,159, 56,113, 2, 19, 38, 76,192,135, 31,126, 8,165, 82,105,111, 57,193,229,203,151,241,227,143, 63,162,123,247,
-238,110, 31, 59, 33,196,113,236,130, 32, 96,250,244,233, 72, 73, 73,193,188,121,243,208,188,121,115, 72, 36, 18,228,230,230,162,
-109,219,182, 72, 75, 75,115, 59, 63,237,205,120, 50,153,172, 68,180,201,110,252,170,114,142,236,154, 35, 7, 4, 99,203,161, 53,
- 32, 32, 56,250,253,196, 18,247,162, 69,107, 15, 84, 90,115,198,140, 25, 37,210,249, 40, 70,175,202, 52, 88,148, 82, 26, 26, 26,
- 10, 81, 20, 75,152,170,210, 29,106,237, 33, 63,231,144, 98,133,125, 16,120, 30,162, 40, 58, 10, 3, 95,198,246, 35, 71,142,220,
- 99, 2,150, 47, 95, 94,225, 13,220,106,181,214,247,240,240, 40, 17,189,146, 74,165,152, 62,125, 58, 70,140, 24,225, 48, 87, 82,
-169, 20, 43, 86,172, 64,108,108, 44, 76, 38, 83,253,138,210, 42,149, 74,117,141, 26, 53,226,236, 81, 32,165, 82, 73,134, 14, 29,
-202, 91,173, 86, 71,158,216, 23,123,223, 52, 87, 38,195, 30,109,218,177, 99,135, 91, 17, 44,119,251, 32, 81, 74,113,230,204,153,
- 18,166,205, 62, 10, 6, 0,206,156, 57,227,232,159,229,174,166,205,102,131, 82,169, 36, 82,169,148, 40, 20,138, 48,187,185,226,
-121,222,113,190,157,251,228,185,186, 80,206,158, 61,219,185,162,237,231,206,157,251, 79, 78,199, 32, 66,132,217, 98,129, 94,103,
- 66, 65,161, 30,179,222,255,182,104,195, 44, 28, 3,112,172,221,152, 9,120,185,103,247, 46, 0,170, 85,210, 16,192,126, 3,251,
-233,167,159, 32,145, 72,176,121,243,102,120,122,122,162, 95,191,126,240,244,244,196,180,105,211, 48,120,240, 96,183, 35, 88,197,
-101, 41,143, 16,210,238,213, 87, 95,253,227,227,143, 63,174, 30, 30, 30, 14,147,201, 4,179,217, 12,147,201,132, 27, 55,110, 96,
-205,154, 53,137, 58,157,174, 29,165, 52,207,149,222,246,228,175,111,252,124,228,245,148,184, 39,159,212, 95, 78,251, 13,119,239,
-102,193,106, 77,134,104,179,194,108, 45, 26,145,108,179, 90, 97,181,218, 32,240,156,231,162,207,167,236, 44,234,240, 79, 76, 3,
- 7, 14,124,236, 33,158, 42,122,237,218,181,172,106,213,170,217, 43, 49, 79,147,201, 68,138, 31,224, 40, 0,123, 7,119, 45, 42,
-232,136,238,204,113, 96,244, 39, 31,126, 24,102,111,190,127,255,195, 15,195, 38, 79,154, 52, 26,192,130, 75,231,206,173, 30, 57,
-114,228,171,235,214,173, 43,241,157,145, 35, 71,226,210,185,115,171,203, 14, 17, 20, 71,176, 12, 6,100,100,229,224,133, 49,111,
- 57, 66, 7, 0,133,179, 67,165, 69,255, 43, 0, 32, 51,237, 6,198, 79,120, 77, 94,222, 3, 85,131, 6, 13, 32,138, 98,137,104,
- 72, 21,250, 94, 57, 71,134, 28,251,121,122,122, 66, 42,149,226,198,225,159, 49,105,204, 32,192,102, 6,181,232, 1,179, 14, 48,
- 23, 66, 52,233, 64,164, 74,192,162,119,169,107, 79,167,167,167,103, 81,159, 80,129,135, 76,250,167,249,115,142, 92,185,115,227,
- 46,125,236, 9, 9, 9,120,249,229,151, 97, 54,155, 49, 96,192, 0,152, 76, 38, 24, 12, 6,232,245,122, 68, 69, 69, 65,167,211,
-185,125,236,246,123,167, 84, 42,197,196,137, 19, 17, 27, 27,139,119,223,125, 23, 83,167, 78, 69, 84, 84, 20,198,142, 29,139, 53,
-107,214, 32, 38, 38,166, 66, 93,187,102, 81,147,123,145,166,253,120, 75, 55,229,217, 91, 10,220, 61, 71,101,105,218,103, 23, 41,
-125,222,255,247, 76,215, 74,107,126,240,193, 7,200,200,200,184, 39,114,101,255, 59, 52, 52, 20, 11, 23, 46,124, 36, 35, 88,142,
-225,164,246, 27,168,253, 70,238, 92,185,171, 84, 42,108,216,176,161, 68,231,186,138,194,210, 28,199, 65, 20, 69,108,171, 86,244,
-253,222,197,145, 43,231,255,251,246,237,139,200,200,200, 18,209, 43,165, 82, 89, 97,161, 17, 69, 17,183,111,223,198,133, 11, 23,
-208,186,117,107,228,229,229, 65,194,113,120,237,220, 57, 52,120,230, 25,152,164, 82,136,162, 8,153, 76,134,209,163, 71,187,213,
- 81,253,143, 63,254,240,113,254,191, 65,131, 6, 73,113,113,113,161,199,143, 31,119,116,124, 47,110, 62,115, 24, 13, 55, 47,106,
- 60,245,212, 83, 37,162, 86,206,230,202,121,249,237,183,223,220,106, 34,164,148, 34, 46, 46,206, 17,189,242,240,240,192,166, 77,
-155, 28,219,237,225,231,192,192, 64,183, 52,237, 79,240,197, 29,219, 97, 52, 26,197,130,130, 2,238,228,201,147,144,201,100,142,
-115,162, 84, 42,161, 80, 40,238,107,112,194,127, 30,155, 8,147,197, 2,189, 94,143,194,194,162, 25, 66,110,156, 47,217,143,217,
-108,172,250,224, 52,123,148,170,160,160, 0,187,119,239,198,198,141, 27,209,188,121,243,123, 58,185, 59, 95,183,110,148,209, 12,
- 66, 72,251, 41, 83,166, 28,125,239,189,247, 66,124,125,125, 97, 54,155,113,231,206, 29,124,243,205, 55, 41, 58,157,174, 61,165,
- 52,163, 18,174, 13, 22,139, 21, 6,157, 17,121,249, 5,152, 57,103, 69,185, 85, 4, 0,100,167, 95,193,208,161,195,100, 15,243,
- 52, 81, 74,147, 1, 60,239,116, 93,173, 2, 96, 15,199,231, 83, 74, 71, 84, 70, 79, 2,116,122,114,224,192, 46, 19, 39, 78,116,
-172,155, 56,113, 34,142, 30, 61,218, 69,178,126,253, 5, 11,176,151, 95,191, 62,230,243,207, 63,119,236,243,249,231,159, 99,195,
-250,245,123,108,192,222,242,234, 14,123, 19, 97, 97,161, 30,158,222,193, 72,142,223,231, 50, 45, 82,222, 0, 42,138, 46, 31,252,
- 74,247,187, 41, 93, 63, 85,162,252,208, 70,141, 26,217, 91, 23, 32,149, 74,209,176,203, 64,124, 58,127, 41,228, 28,197,147,221,
- 26,162,154,194, 6, 40,125, 33,237, 48, 13,196,187, 70,241, 67, 71, 83,183, 30, 80,247,191, 53, 25,183,212, 10,188,184,227, 32,
-164, 82, 41,126, 26,220, 27,114,185, 20,207,254,188, 31, 82,169, 20, 63,143,122, 2, 82,153, 20, 61, 23,255,232,214,131,138,253,
-216,111,220,184,129,195,135, 15, 35, 58, 58, 26,215,175, 95,135,115, 63, 91, 74,169,219,166,173, 97,195,134,142,128,132, 68, 34,
-193,221,187,119,209,167, 79, 31,199, 3,254,190,125,251, 48,101,202, 20,140, 26, 53, 10,157, 58,117, 42,179, 95,108,105,205,152,
-152, 24, 71,224,160,180, 9,118,110,182,173,204, 57, 42, 75,211, 81,126,171,120,222,157, 53,223,123,239,189, 50,205,122,101, 52,
-255,211, 6,203,126,129,148,215,238,172, 86,171,241,202, 43,175, 96,198,140, 25,240,247,247,119,217,119,198,238, 92, 43, 98,235,
-214,173,247,172,219,188,121,179,171, 38,194,203, 94, 94, 94,177,157, 59,119, 70, 94, 94, 30, 18, 19, 19,161, 86,171,209,224,211,
- 79,113,238,229,151,209,100,241, 98,112, 93,186,128, 16, 2,153, 76,134,115,231,206, 65,169, 84, 94,174,108,196,192,195,195, 3,
- 62, 62, 62,142, 54,117,187,209,114, 50, 88,212, 29, 51,180,109,219,182, 50, 71,232, 84,165, 15,150,189,226, 61,122,244,104,137,
-254, 87,206,205, 28, 71,143, 30,117, 68,176,138,247, 39,174,206, 83,241, 83, 29,181,235,169, 84, 42,248,250,250, 66, 46,151, 59,
-140,149,221, 92,185, 99, 46, 93, 77, 36, 26, 17, 17, 81, 98, 34, 82,137, 68, 82, 98, 34,210,127,123, 19,161, 94,111, 64, 97,129,
-254, 65, 54,105, 21,153,179,226, 1, 39, 27, 54,108, 64,171, 86,173,238, 49, 87,246,168, 99, 21, 12, 71, 18, 33,164,211,252,249,
-243,143,125,246,217,103, 62,133,133,133,248,246,219,111,243, 10, 11, 11, 59, 81, 74,147, 42,165, 5,192, 98, 54, 67,103, 48, 66,
- 91, 88,148, 7, 55, 47,252,228,210,148,253,155,169,223,168,209,240,111,191,253,246,158,245,223,126,251, 45,174, 95,191, 62, 28,
-231,206,237,109, 9, 44,121,125,218,180,218,205,155, 55, 15, 3,128,215,167, 77, 75,106, 9, 44,169,232, 58, 55, 23, 55, 17, 22,
- 22, 22, 69, 61, 12,218,204, 7, 83, 78,139, 77, 70,121,125,174,170,114, 67,180,215,183, 82,169, 20, 61, 6,191,128,148, 91, 87,
- 16,173,206, 68, 53,111, 21,104,126, 50,164, 93,222,193,185,108, 21,230, 45,222, 94,169,116,170,229, 50, 40, 20,114,167, 62, 87,
- 10,200, 20,114, 71, 58, 21, 74, 37, 36,114, 89,165,143,253,234,213,171, 80, 42,149,176,217,108,247,220,111, 42,123,252,206,198,
-229,243,207, 63,199,148, 41, 83,176, 98,197, 10,156, 59,119, 14, 77,154, 52, 65,183,110,221,144,158,158,142,179,103,207,194,104,
- 52,186,157, 78,231,126,113, 23, 47, 94,196,175,191,254,138,248,248,120, 36, 38, 38, 86,249,188, 59,107,150, 54, 88, 27,118,157,
-198, 83,221,155, 85, 73,115,230,204,153, 72, 79, 79, 47, 17,185,114,142,110, 62,210, 17, 44,123, 19,147,211, 77,249,158, 40,149,
- 90,173,118,116,136,244,244,244,116, 25, 25,178, 27,172,184, 91, 5, 37,250,114,217, 35, 89, 0, 48,106,212,168,123, 34, 88,165,
- 39,167, 43,141,209,104,220,183,111,223,190,166,125,251,246,229, 47, 95,190,236,104,138, 52,181,105,131, 38,139, 23,227,252,196,
-137,232,152,144, 0,131,217, 12,133, 66,129,237,219,183,155,117, 58,221,190, 74, 86, 22,196,217, 96,169,213,106,120,121,121, 57,
- 12, 70,101, 92,121,121, 79,136,206,255, 87, 38, 34,100,239,115,102, 95,236, 55, 86, 66, 8,244,122,189,163,179,102,101,162, 34,
- 54,155,205,113,225,217, 59, 40,122,123,123, 59, 42, 13,251,104, 50,119,155, 71, 93, 77, 36,170, 80, 40, 60, 15, 28, 56, 80,203,
- 62,141, 68,102,102, 38, 6, 15, 30,124,237,223,126,113, 81, 80,152,173, 54, 20,234, 13, 40,212,235, 30,184,254,234,213,171,113,
-227,198, 13,152,205,102,188,255,254,251,247, 24,171,202,116,114, 47,163, 92,221,104,214,172,153,216,171, 87, 47, 28, 61,122, 20,
-114,185,220, 66, 41,173,244,252, 85, 84, 20, 97,182, 90, 97,208,235, 81,168,213, 62, 18, 79,173, 23,207,157,251, 73,173, 86, 15,
- 6,160,201,205,205,229,189,188,188,160, 82,169,160,215,235,243,248,226,145,130, 71, 0,147,183,197,242,225,160, 65,131, 62, 3,
- 0,133,197,242,225, 17,192, 84,209,117,110,177, 22,155,245, 7,152,143,246,122,171,188, 58,169, 42,209,105,251,141, 84, 42,149,
- 66,224,121,124, 59,119, 50,162,213, 25,104, 22,233, 1, 99,218,117,200, 60,252, 65,188, 35, 48,111,241,118, 92, 74,200,174, 84,
- 58,135,172, 92,143,240,240,112,108,121,166, 31, 20,114, 5,134,108,216, 13,137, 68,130, 29, 99, 7, 67, 42,147,161,219, 87,223,
- 87,233,216,181, 90,109,185,145, 42,119, 35, 88,165,143, 93, 34,145,160,105,211,166,168, 83,167, 14,246,238,221,139,102,205,154,
-225,250,245,235,184,126,253, 58, 18, 18, 18,112,238,220, 57,228,228,228, 84,250, 28,173, 93,187, 22,217,217,217,144,201,100,200,
-204,204, 68,124,124,188, 91, 83,177,184, 58,239,118,234, 61, 62, 19, 0, 16, 82,205,171, 82, 6,203, 89,243,163,143, 62,186,199,
-180, 63,138, 45, 29, 66, 57, 38, 64, 95,175, 94, 61,165,115,251, 41,199,113,240,240,240, 32, 83,166, 76,225,139,255,134,151,151,
- 23,170, 85,171,230, 86,179,155, 68, 34,209,183,108,217, 82,105, 47,128,118,227,164, 86,171,249,169, 83,167,146,229,203,151,151,
- 27,213,114,209, 7,235,179, 17, 35, 70, 60,159,148,148,228, 19, 16, 16,128,212,212, 84,200,100,178,162,139,162,115,103,196,221,
-186, 5,115, 81,159, 34, 92,189,122, 21, 75,151, 46,213, 26,141,198,207, 42,155, 81, 26,141, 6,126,126,126,142,166, 65,123, 4,
-199,201, 44,210,170, 84,100,165,151,202, 68, 28,236,154,206, 6,203,126, 99, 29, 51,102, 76, 9,179,229,118,129, 16, 4,107,199,
-142, 29, 5,123, 58, 44, 22, 11, 26, 53,106,132,244,244,116, 72, 36, 18,200,100,178, 18,145, 59,119, 12,150,171,137, 68, 5, 65,
-128,201,100, 66,135, 14, 29, 64, 8,193,151, 95,126, 89,165,200,203, 63,206, 96, 89, 69,162,209,248, 33, 36,164, 46,170, 5, 24,
- 32,138, 15,238,237, 47, 86,171, 21, 99,199,142, 45, 17,177,178,143, 84,180, 55,241, 23, 53, 43, 89,170, 60,105,171,253,186,190,
-159,249,223, 68, 10, 71,211,150, 86,107,248,215,157,195, 26, 53,106,120, 22, 55, 25,150,230, 7, 74,233,175,101,158,155,226, 41,
- 25,120, 96,246,157, 59,119, 26,122,121,121,161, 71,143, 30,216,186,105,211,150, 31, 0, 71,200, 38, 23, 72,242,185,123,119, 98,
-241,223,201,174,130,122, 69,125,176,140,208,106,245, 15,252, 56,239,247, 65,175,172, 7,106,158,231,177, 97,241, 7,136, 86,165,
-161,105,117, 57, 14, 31, 61,141, 86,225, 0, 76, 85,111, 1,182,247,109, 82,169,148,144,202,228,142,116, 42, 84, 42, 72,164,178,
- 42, 31,187,115,125, 90,186,190,172, 74, 4,207, 57, 63, 95,120,225, 5, 76,155, 54, 13, 61,122,244,192,245,235,215,177,127,255,
-126, 92,191,126, 29, 19, 38, 76, 64, 76, 76, 12,122,246,236, 89, 41,205,245,235,215, 35, 47, 47, 15, 28,199, 33, 43, 43, 11,122,
-189, 30, 51,102,204,184,239,243,110, 39,126,215,251, 0,128,159,118,158,170,178,230,155,111,190,137,187,119,239,150,136, 92, 61,
- 42, 81, 43,151, 6,235,234,213,171,101,182,247,197,196,196,164,117,239,222, 61, 32, 53, 53, 21, 26,141,198,165,185, 34,132,116,
-179,207,149,113,225,194,133, 50, 53,107,214,172,105,238,222,189,187, 36, 56, 56,184,196,232, 65,181, 90, 93,226, 98, 45, 75,179,
-184,242, 47, 32,132,188,212,174, 93,187,239,126,251,237, 55, 85,157, 58,117,144,159,159, 15, 74, 41, 86,172, 88,129,113,227,198,
- 65,161, 80,224,234,213,171,232,215,175,159, 78,167,211,189,228, 60, 7, 86, 89,154,101, 25, 25,142,227, 28,243,195,148, 97,174,
- 42, 60,118,103,230,207,159,239,152, 11,170, 34,150, 44, 89, 2,148,154, 82,161, 44, 77, 74, 41, 62,249,228,147, 7,166,121,229,
-202,149, 21,206,219, 35, 35, 35,191,124,236,177,199,132,196,196,196, 18,166,202,121, 41,163, 66, 42,161,233,106, 34, 81,158,231,
- 17, 24, 24,136,247,222,123, 15,126,126,126, 8, 10, 10,186, 39,242,226,234, 28, 85,241,233,253, 47,213,164, 28, 61, 57,255,179,
-153,237,151,124,189, 81, 34,151, 1, 71,246,255,132,252,156,187, 37, 35,176,230, 63,135, 68,203,154,117,133,233,212,110,183,210,
-105, 52, 26,241,209, 71, 31, 97,230,204,153,247,204,129, 83,206,121,191,175, 99,119,199,100,149,165, 41,138, 34, 81,169,125,160,
- 80,135,160, 65,140, 15, 68, 55,230,234, 20,255,254,243,174, 75, 76, 76,244, 10, 15, 15,199,181,107,215, 8,254,236,143,245,231,
-185,146,201,134, 0,248,181, 34, 77, 2,156, 91,179,102, 77,195, 70,141, 26,225,203, 47,191, 4,128,103,159,219,177, 99,240,211,
-122,189, 1, 40,154,124,180,216,140,185, 76,167,141, 82,162, 84,121, 67,161, 14, 70,131,134,222, 16, 69,247,231, 60,165, 21, 28,
-187,253,230, 87, 58,122, 85,201,137,164,239,209,180, 63, 32,221, 60,242, 11,250,244, 14,195,161, 99,231,177, 59, 81,133, 48, 89,
- 42, 66,116, 25, 16, 51, 46,227,213,129,205, 48,111,125,209, 77,252,252, 73,215,154,132, 16, 28,122,237, 69,168, 85, 10, 60,185,
-230, 87, 72,165, 82,252,254,234, 51,144, 74,229,232,248, 89, 81,147,236,185, 15,167, 67, 34,151, 35,250,127, 51,221, 74,103,233,
-150, 26,123, 87, 14,231,125, 42,138, 96, 85,116,236, 5, 5, 5,200,205,205,197,119,223,125,135,145, 35, 71, 34, 61, 61, 29, 9,
- 9, 9,184,118,237, 26,126,248,225, 7,199,232,244,202,164,211,110, 94, 38, 77,154, 4, 74, 41, 26, 52,104,128,153, 51,103,162,
- 77,155, 54,149, 62, 71,165,207,123,105, 92, 69,175, 42,210,156, 55,111, 94,149,202,210, 35, 97,176, 42,122, 42,225, 56, 14,254,
-254,254,142,194,225, 92,240,170,242,164,203,243, 60,172, 86,171,163,227,180,125, 1,128,190,125,251, 98,235,214,173,238,140,140,
-248,141, 16, 50,188,126,253,250,223,204,154, 53, 75,211,177, 99, 71, 33, 36, 36, 4, 45, 90,180,192,213,171, 87,241,203, 47,191,
- 88, 22, 46, 92,168,213,233,116,163, 40,165, 59,171, 82, 39,219, 95, 61,227,188, 84, 6,155,205,150, 24, 31, 31, 31,252,201, 39,
-159,240, 28,199, 97,222,188,121,206, 47,185,190,167, 16, 30, 61,122,212,234,170, 73,198,106,181, 38,198,199,199, 7,127,250,233,
-167, 60, 33,196,161,233, 60,249,171,115,222,185,163, 89,150,185,180, 15,120, 40,107, 41, 43,237,101,157,227,138, 38, 18, 21, 4,
- 1, 87,175, 94,197,140, 25, 51, 64, 8,193, 79, 63,253,244,159,184,184, 14, 29, 79, 89,222, 54, 54,196,103,200,192, 78,141, 8,
- 56,152,204,247, 14, 64,227,179,114, 29,230,234,137, 79,215, 98,227,107,131,221, 49, 59, 55,142, 31, 63,238,251,209, 71, 31, 9,
- 60,207,227,243,207, 63, 47, 49,217,111,233,243,126,236,216, 49,107,149,154,247,138,175,103,179,217, 12,189,190,106, 81, 19,202,
-145,195,243, 62,122,167,251,146,111,183, 74, 8, 49,225,200,190,159,144,151, 91,246,208,116,153, 68,192,170, 53, 91,172, 2,207,
- 37,254,205,167,110, 73,183,110,221,102,236,218,181, 75, 8, 15, 15,175,178, 72,123, 96,235,130, 5, 11, 30,123,230,153,103,124,
-235,215,175,143,141, 27, 55, 2,128,172,120, 65,241,204,238,191,185,103,146,196,205,159,127,252,206,179, 75,191,221, 42,227,136,
- 25, 71,246,255,132,188, 82,102,189, 52, 82,169, 4,171,215,108, 54, 11, 2,127,197, 85,189,238, 28,189,186,223, 27,162,115,217,
-107,214,231,121,124,249,203, 82, 4, 52,234,133, 65,125,227,112,240,203,103, 48, 40,218, 0,243,186, 97,104, 56,112, 37, 86,188,
- 94, 20,189,105,186,254, 13,183,238, 63, 30, 30,106, 71, 7,114,142,227, 32, 87,168, 32,145,255,217,127, 72,166, 82, 65,168, 68,
- 36,203,126,236, 21, 69,170, 42, 27,193,226, 56, 14,145,145,145,168, 89,179, 38,218,181,107,135,102,205,154,161,115,231,206, 56,
-123,246, 44,206,158, 61,139, 9, 19, 38,148,107,174,220, 57, 71,221,187,119,199,149, 43, 87,238,187,144,151, 62,239, 15, 2,119,
-202,210,203, 47,191, 12, 0,143,110, 31, 44, 87,153,103, 47,144,244, 1,116, 70, 37,132,192,100, 50, 57,154,222,156,231, 85,178,
-119,122,119,115, 62,168,157,132,144,152,183,223,126,123,162, 66,161,232,172,211,233,234, 2,128, 90,173,190,106, 52, 26,127,215,
-235,245,159, 83, 74,115,239, 39,173,206,211, 50,148,113, 28, 21,102, 70, 70, 70, 70,207, 17, 35, 70,236,228, 56, 46,178,162,151,
-243, 58, 61,249, 39,164,165,165, 61,230, 74,115,248,240,225,101,106,150,165,235,142,102, 89,231, 92, 20,197,114,205,149, 59, 21,
-144,171,137, 68, 37, 18, 9,212,106, 53, 54,109,218, 4,127,127,255,255,212, 5,118,248, 68,202, 71, 21,109,239,228, 47,223, 7,
-160,218, 19,159,174,189,179, 55,211, 84,163,147,191,236,246,198,215, 6, 87,175,232, 59, 57, 57, 57, 61, 38, 77,154,244,171, 32,
- 8,145, 21,157,111, 39, 35, 30,159,145,145, 81,233,105, 15, 40,165,184,114,229,138,248,194, 11, 47,100,102,100,100, 60, 93,149,
-227, 31, 63,241,227,207, 22,124,242,170,223,192,254,237, 91,128, 16,152, 76,229,116,234, 37,160,148, 82, 42,240, 92,226, 43,147,
- 62,125,241,239, 60,103,148,210, 51,132,144,119,107,213,170, 53, 26, 64,121,119,194, 31, 92,233,236, 5,204, 50,163,241,147,216,
-216,216,169,111,188,241,134,119,223,190,125, 17, 30, 30, 94,238,124,129, 21,113,240, 88,210,232, 54,177,193, 97, 79,245,107,223,
-147, 35,132, 26, 77, 70, 23,245,106,113,126, 10,252,149,125, 71, 19, 27,187,138,206,115, 28, 87,233, 46, 10,238,208,117,224, 72,
-116, 29, 56,210, 81,158,118,173,235,132,147, 41, 59,209,156, 75,130,113,105,123, 16, 79,123, 81,231, 93,222, 39, 56,142, 67,191,
- 21,155, 75,164,179,221,135, 37,163,179,117,199,189, 93,169,123,143,243,224,171, 7,213, 7,139,231,121,100,102,102,226,234,213,
-171, 72, 75, 75,131, 78,167,195,165, 75,151, 96, 54,155,145,147,147, 3,251, 72,195,170,164,243, 65,157,163,191, 83,243, 81,106,
- 38,172,148,193,178,217,108, 73,174,222,122,110,181, 90, 43, 53,202, 72, 16, 4, 67,251,246,237, 73, 89,163, 13,236,127, 43,149,
- 74,189,155, 21, 99, 46,128, 25, 0,102, 20,191,111, 10,217,217,217,247,237, 2,109, 54, 91, 74,203,150, 45,249,138, 12,145,205,
-102, 75,115, 97,134,180, 0,218, 60,200,147,247, 87,104,150,113,126,180, 29, 59,118,188,103, 30, 19,231,243,163, 80, 40, 42,236,
-117,235,106, 34, 81,157, 78,151, 58, 98,196, 8,155,115,179,160,243, 68,164,255,105, 8,189,221,123,200,243, 53,246,102,154,106,
- 0,128,221,100,129,210,219,229,125, 37, 37, 37, 69, 15,160,227, 95,157,180, 91,183,110,153, 90,181,106,181,186,160,160,224,101,
- 74,105,149,123,233, 79,152, 60,239,141,127,219,105,161,148,158, 1, 48,230,126,117, 76,192,229, 6, 6,195,203, 51,223,126,251,
-201,119,222,126,187,142, 8,248, 1, 69,115, 84,241,192,218,202,104, 29, 57,145,250,192,231, 6,179,217,108, 73,109,219,182,173,
- 84,164,198, 85, 29,111,181, 90, 43,188, 79,172, 65, 56,112,162,114,154,127, 69, 58,157, 53,155, 52,105,130,166, 77,155, 58, 62,
-237,148, 94,239,142,102,243,230,205,209,160, 65,131,114,103,104, 47,221,231,234,239, 62,118,187,166,221,246, 55,109,186,227,129,
-105,222,111, 58, 31, 41,131,101,127,199,224,131,228,226,197,139,127,201,187, 81, 40,125,112, 99,189, 47, 94,188,216, 2,143, 40,
- 87,174, 92,241,187, 95, 13, 87, 19,137,158, 59,119,174,243,163,154,191,123, 51, 76,207,221,179,174,216,108,253,221,104,181,218,
-234,148,210, 42,245,204, 31, 56,112,160,237, 81, 61,167,160,180,196,196, 83, 23,139, 38, 40,253,238,159,152,212, 11, 23, 46, 60,
-240, 58,253,175,184, 79,252, 21,233,100,199,254,207,215,252,183,195,102,136,100, 48, 24,229, 61,164,216, 88, 46, 48, 24, 12, 70,
-213, 32, 0,186,149, 83,185,186, 61,114,135, 16,210,173, 10,149,247, 46,166,201, 52,153, 38,211,100,154, 76,147,105, 62, 90,154,
-174,180, 31,244,200,225,191,243, 41,245, 47, 91, 0,116, 99,154, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,212, 22,214, 68,
-200, 96, 48, 24, 12, 6,131,241,128, 97, 6,139,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, 96, 48, 24, 12,102,176, 24, 12,
- 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 84, 29,242, 0,231,227,100, 48, 24, 12, 6,131,193, 96,128, 69,176,
- 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, 96,
- 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193,
-248, 39, 24, 44, 66, 72, 55,166,201, 52,153, 38,211,100,154, 76,147,105, 50, 77,102,176, 24, 12, 6,131,193, 96, 48, 24,204, 96,
- 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193,
- 96, 48, 24,140,191, 9, 2,160,204,145, 0,148,210, 93,110,139, 84, 97, 52,129, 43,125,166,201, 52,153, 38,211,100,154, 76,147,
-105,254,247, 52, 93,105, 87,198,127,252,163,161,148,254,101, 11,128,110, 76,147,105, 50, 77,166,201, 52,153, 38,211,100,154,143,
-218,194,154, 8, 25,174,158, 48, 4, 66,136, 80,213,237, 15, 75,147,193, 96, 48, 24,140,127, 18,236, 38,198,168,200, 8,181, 1,
-208,167,248,239,159, 41,165, 71, 42,179,253, 97,105, 62, 44,154, 55,111,174, 84, 40, 20, 61,246,236,217, 35,187,116,233, 18,254,
-248,227, 15,186,122,245,106,179,193, 96,216,113,242,228, 73, 61, 43, 49,255,126,154, 53,107,214, 19,192,244,226,127, 63, 56,117,
-234,212,246,251,188,134, 72,173, 90,181, 38,200,100,178,222, 82,169, 52,196,106,181, 18,163,209,152,162,215,235,119, 38, 39, 39,
-127, 74, 41, 21,171,160,217,194,223,223,127, 76, 76, 76, 76,157, 91,183,110, 37,222,185,115,103, 21,128,237, 0,122, 86,175, 94,
-125, 68, 84, 84, 84,248,133, 11, 23,174,101,102,102, 46,166,148,254,241,119,165,147,193, 96, 6,203,189,139,143,243,241,241,233,
-174, 84, 42,255, 87, 88, 88,216,212,211,211,243,162,213,106, 93,144,154,154,250, 51,187,240,254,179,230, 74, 0,208,135, 82, 42,
- 1, 0,158,231,251,183,105,211,166, 6, 33, 68, 36,132, 80, 74, 41,225, 56,174,169,205,102,227,138,247,239, 67, 8,249,131, 82,
-106,173,140,102,171, 86,173,194, 5, 65,160,148, 82, 66, 41,229, 56,142,107, 92, 25,205, 7, 69, 76, 76,204, 92, 74,105, 72, 69,
-251,168,213,234,216, 61,123,246,212,219,188,121,179,109,213,170, 85,185, 67,134, 12,209,140, 28, 57, 82,248,246,219,111,191, 2,
-240,191,210,251, 55,104,208,224, 51,142,227,252,221,249,125, 81, 20, 51, 47, 94,188, 56,137,149,188,191,157,233, 47,124,184,175,
- 3,165,192,215,211, 59,114,197,198,165,202, 52,109,218,244,187, 1, 3, 6, 12,169, 91,183,174, 32,138, 34, 44, 22, 11, 76, 38,
- 83,189, 83,167, 78,117,218,177, 99, 71, 44,128,167, 43,121, 93,246,153, 62,125,250,178,119,223,125,183,154, 68, 34, 33, 22,139,
-165,245,143, 63,254,216,107,204,152, 49,103, 22, 47, 94,220,100,208,160, 65, 30,246,245,239,188,243,206, 99,132,144,137,148,210,
- 31, 30,118, 58, 25, 12,134, 11,131,229,225,225, 81,187, 90,181,106,175,249,249,249, 61, 22, 27, 27,155,247,210, 75, 47,221,188,
-113,227,198,249,200,200, 72,221,183,223,126, 59,199, 98,177, 44,172, 91,183,238,142,252,252,252, 79,239,222,189,123,169,146, 21,
- 69,109, 0, 47, 1,120, 12, 64, 24,128, 20, 0,191, 2, 88, 70, 41,189, 82,149,131, 9, 13, 13,109,164, 86,171,167, 18, 66, 90,
-107,181,218, 48,181, 90,157, 66, 41, 61, 86, 80, 80,240,113,106,106,234,169,170,104,134,133,133,213, 4, 48, 94, 16,132, 56,155,
-205, 22,201,243,252,109,155,205,118,192,102,179,125,153,146,146,114,173, 42,154,237,194, 61,250,138, 26,207, 79, 45,188, 50,188,
-208, 96,149,106,228,130, 69, 34, 26, 18, 69,109,238,244, 99,119, 10,127,250, 39, 22, 20,153, 76,198,173, 90,181,170,137, 76, 38,
- 3, 0,152, 76, 38,196,196,196,144,251,209,148, 72, 36,220,167,159,126,218, 76, 16, 4,152,205,102,177,160,160,128, 62,249,228,
-147,127, 75,179, 53, 33, 36,236,228,201,147, 94, 82,169,180,204,237, 54,155, 13,253,250,245,139,148, 74,165, 88,180,104,145, 37,
- 43, 43,171,233,242,229,203, 79, 45, 92,184,208,127,197,138, 21, 3,203, 50, 88, 28,199,249,151,167,105,179,217, 96, 54,155, 97,
-181, 90, 97, 50,153,208,185,115,103, 86, 27,253, 51,168, 1, 0,219,206, 26, 0,192,247,126,197,148, 74,101,244, 19, 79, 60, 33,
-100,100,100, 64, 34,145,192,108, 54,227,238,221,187,168, 85,171, 22,191,121,243,230,186,149,213,171, 87,175,222,152,247,223,127,
- 63, 96,219,182,109,230,213,171, 87, 27,187,117,235, 38, 29, 53,106,148,103,135, 14, 29,226,194,194,194,184,111,190,249,198,184,
-107,215, 46,243,240,225,195,229,115,231,206, 13,248,245,215, 95,135, 0,248,225, 97,167,147,193, 96, 84, 96,176, 60, 60, 60,246,
-105, 52,154, 90, 47,190,248,226,149,151, 95,126,121,135, 70,163,177, 1,192,247,223,127, 47,244,239,223, 63,227,201, 39,159, 76,
-215,233,116,252,194,133, 11,171,127,241,197, 23, 59, 61, 60, 60,146, 11, 10, 10, 90,186,113, 35, 35, 0,254,199,113,220,248, 30,
- 61,122,236,179, 88, 44, 25, 91,182,108, 89,247,196, 19, 79,196, 81, 74,213,123,246,236,249,133, 16,178, 4,192, 39,238, 70,199,
- 8, 33,124, 84, 84,212,204,176,176,176,201,139, 22, 45,146, 71, 69, 69, 65,169, 84,162,160,160,160,250,181,107,215,194,255,247,
-191,255,245,171, 89,179,230, 2, 47, 47,175,183, 78,158, 60,105,113, 83,147,132,132,132,188,234,233,233,249,222,220,185,115, 21,
-245,235,215, 39,106,181, 26,241,241,241, 13,143, 30, 61, 26,179,124,249,242, 81, 97, 97, 97,179,146,147,147,221, 78,103, 39, 66,
- 4, 67,205,106, 59,124,234,181,236,180,120,217,215,196, 95,173,130, 64, 8, 44,102,179, 36, 77,167,143, 26, 55,118,244,186, 54,
-117,130, 14, 21, 72,210,186, 94,188, 72,205,127,147,209,144, 3, 0,165,212, 72, 8,249,153,231,249,254, 50,153,140,235,223,191,
- 63,118,237,218, 69, 12, 6,131, 0, 0, 10,133,194,218,191,127,127, 40,149, 74,152, 76, 38, 17,192,207,229, 69,154,202,210,148,
- 72, 36, 92,231,206,157,117,199,143, 31,207,182,107,170, 84, 42, 75,231,206,157,253,100, 50,153,210,106,181,210,138, 52,255, 34,
- 19,137, 27, 55,110,148, 88, 87, 80, 80,128,140,140, 12,100,101,101,193,100, 50, 33, 55, 55, 23,162, 40, 18,163,209,152, 33,138,
- 34, 56,174, 40,216, 86,158,166, 84, 42,197,213,171, 87, 75,172,179, 90,173,208,106,181, 48, 26,141, 48,155,205,208,235,245, 74,
-133, 66, 81, 59, 46, 46, 46, 9,192,230,194,194,194, 79,207,156, 57,115,155, 85, 79,127, 11,119,126, 62,109,168, 14,192, 4, 32,
-254, 1, 92, 79, 34, 0, 28, 56,112, 0,105,105,105,200,204,204, 68, 70, 70, 6,194,194,194, 80,149,232,255,149, 43, 87,230, 55,
-109,218,148,156, 57,115,102, 43,128,101,107,215,174,125, 34, 59, 59,123,209,148, 41, 83,124, 63,254,248,227,236,169, 83,167,142,
- 5,176,113,237,218,181, 35, 27, 53,106,212,247,220,185,115,243,254,142,116, 50, 24,140, 10,230,193,162,148,134,212,174, 93, 59,
-251,243,207, 63,175, 55,125,250,116,191,194,194, 66,190, 56, 74,100, 32,132, 80,157, 78,199, 79,155, 54,173,218, 7, 31,124, 80,
- 79, 46,151,231, 88,173,214,106,101,104,148, 53,212,114,188,167,167,103,191,248,248,248,181,245,234,213,243,125,255,253,247, 79,
- 43,149, 74, 58,127,254,252,147, 53,107,214, 12,190,125,251,246, 74, 79, 79,207, 46, 0, 38,151,147,174,123, 52, 35, 35, 35,223,
- 27, 56,112,224,228, 67,135, 14,201, 27, 55,110, 12,141, 70, 3,158,231,225,237,237,141, 86,173, 90,145,253,251,247,203,123,247,
-238, 61, 33, 47, 47,239, 99,119, 53, 67, 66, 66,222,232,213,171,215,156,147, 39, 79, 42,187,118,237, 74,100, 50, 25,114,114,114,
- 32,151,203,209,186,117,107,178,120,225, 87,202,134, 13,234,191, 19, 22, 22,246,174,187,154,230,218,254, 59,135,188, 50,173,243,
-207,191,110, 39,129,129,129,184,249,201,187, 56,208, 33, 6,215,103, 79, 71,112,112, 48,182,110,251,141,244,125,246,149,246,158,
-150,192, 61,238,106,222, 47,206,154,132,144,151, 1,100, 3,200, 38,132,188, 76, 41, 61, 18, 19, 19,115,242,210,165, 75,136,139,
-139,195,186,117,235, 26, 79,153, 50,229,229, 41, 83,166,188,188,110,221,186,198,113,113,113,184,116,233, 18, 98, 98, 98, 78, 58,
-247,149,114, 71,115,223,190,125,232,210,165, 75,206,186,117,235,162,102,204,152, 49,119,198,140, 25,115,215,174, 93, 91,179, 75,
-151, 46, 57,243,230,205, 51, 86,164,249, 87, 28,187,115,100,201,121, 17,197, 63,239, 45, 1, 1, 1,233, 63,255,252, 51,250,246,
-237,203, 5, 6, 6,166,246,239,223, 95,126,252,248,113, 10,224,231,202,164,211, 96, 48, 64,175,215, 67,171,213,226,206,157, 59,
-202,133, 11, 23,182,159, 60,121,114,173,117,235,214,133, 78,152, 48, 97,172,167,167,231,169, 38, 77,154,212,120,216,199,206, 52,
- 1,142,227,238, 2, 48, 3,208,114, 28,119,251,126, 52,159,122,234,169,134, 17, 17, 17,129, 63, 94,240, 65,142,180, 30, 68,169,
- 55, 68,169, 55,108,126, 45,112, 67,246, 24, 66, 67, 67, 3,107,212,168,209,166, 50,154,148,210,157,167, 79,159,126,140, 82,186,
-152, 82,106,163,148,174,159, 58,117,234, 11,132,144,159,166, 78,157, 58,154, 82,186,190,120,253,242,179,103,207,246,165,148,254,
-254,119,164,147,149, 37,166,201,168,192, 96, 17, 66, 44, 31,125,244,209,209,175,191,254,122, 87,106,106,106,112, 84, 84,212,227,
- 79, 60,241, 68,141,188,188, 60,242,196, 19, 79, 68, 6, 7, 7,247,217,183,111, 95,208,192,129, 3,247, 12, 28, 56,240, 8, 33,
-196,101,164,129, 16, 82,147,231,249,137,103,206,156, 57, 88,189,122,117,115, 74, 74,138, 71,211,166, 77, 11, 0,160, 78,157, 58,
-186,172,172, 44,165,151,151, 23,126,251,237,183,227,132,144,151, 8, 33,245, 92,105, 6, 7, 7, 55,243,243,243,251,223,123,239,
-189, 39,231,121,190,204,125,228,114, 57,222,123,239, 61,185,167,167,231,139,161,161,161,173, 93,105, 6, 5, 5,213,247,240,240,
-120,243,139, 47,190, 80, 24,141, 70,152, 76, 38, 4, 6, 6, 66,163,209, 32, 53, 37, 5, 41, 9,241, 72,139,191,133, 9, 47, 60,
-175, 84, 43,149, 19, 67, 66, 66,154,184,210,140,139,240,232,175, 14,107,208,105,220,248,255,225,194,132,145,216, 21, 42, 67,208,
-248,105,104,188,247, 60,194,102,125,138,223,163, 60,113,242,233,238,120,245,213, 73,144, 6, 68,181,109, 27,174, 25,252, 55, 68,
-174, 62,166,148, 42, 41,165, 74, 66,200,252,182,109,219,174, 86, 42,149, 47,191,255,254,251, 61,119,236,216,209,107,255,254,253,
-157,172, 86,171,196,106,181, 74, 14, 28, 56, 16,103, 48, 24, 4,185, 92, 14, 65, 16,168,187,154,109,218,180,249, 78,169, 84,142,
- 93,180,104, 81,207,223,127,255,125,196,137, 19, 39, 94,177,217,108, 50,155,205, 38, 59,113,226,196,104,189, 94, 47,161,148,218,
-202,211,124,216, 72, 36, 18, 72,165, 82, 40,149, 74, 52,109,218,244,230,154, 53,107, 44,193,193,193,146,101,203,150,249, 4, 6,
- 6,170, 87,172, 88,145,155,155,155,251,161,187,122,102,179, 25, 70,163, 17,122,189, 30, 6,131, 1,135, 15, 31,142, 28, 53,106,
-148, 96, 50,153,108, 35, 70,140,200,182, 88, 44,198,113,227,198,121,106, 52,154,215, 88,245,244,240, 41,142,152, 22, 2,208, 82,
- 74,141,246,245, 17, 17, 17,242,208,208,208, 70, 17, 17, 17,114,119,181, 10, 11, 11,151,124,246,217,103, 97,156,220, 27, 7, 77,
-189,241,131, 56, 11, 59,188,190, 68,122,141,201, 8, 8,171,133, 94,189,122, 5, 16, 66,190,124, 0,105,222, 76, 41, 29, 72, 41,
-221, 80,149,239,255,213,233,108,209,162, 69, 92,108,108,236,137,230,205,155,167,198,198,198,158,104,209,162, 69,220,253, 30,243,
-211, 49,164,219,136, 38,124,210,192, 6,132,142,104,194, 39, 61, 29, 83,249,185,154, 24,140,191, 26,151,157,220,171, 85,171,102,
-122,227,141, 55,206, 24, 12,134,243,223,125,247, 93,173,225,195,135, 55,173, 81,163,198,213, 39,159,124,242, 23,141, 70, 99,181,
-247,201,113,147,231,123,247,238,189,205,223,223, 31,121,121,121,130,197, 98,225,181, 90, 45, 15, 0,162, 40,194, 96, 48,240,183,
-110,221, 18,140, 70, 35,109,221,186,245,150, 35, 71,142,188, 4, 96, 98, 69,130,106,181,250,229,165, 75,151, 42,202, 51, 87, 54,
-155, 13, 5, 5, 5,176, 90,173,152, 53,107,150, 98,242,228,201,255, 3,112,212,197, 77,117,252,252,249,243,229, 86,171, 21, 28,
-199,129, 82,138, 83,167, 78, 33, 43, 61, 29,134,130,124, 24,243,243, 96,206,207, 3,175, 45,192,136,199,122, 42, 22,111,216, 52,
- 9,192,136,138, 52, 77,114,205, 7,223, 45, 93, 14,155,205,134,212,205, 63,150,185, 79,246,161,189,176, 89, 45,120,255,195,143,
-201,171,207, 15,122, 31,192,218,191,171, 96,200,229,114, 97,213,170, 85, 67,101, 50, 25, 40,165,196,100, 50, 97,199,142, 29,247,
-173,185,114,229,202, 17,118, 77,179,217, 76, 27, 54,108,120, 79,243,154,209,104,164,255,148, 11, 68, 38,147, 65,161, 80,192,108,
- 54,163,122,245,234,250,126,253,250, 29,158, 63,127,126,117,158,231,213,130, 32,252,150,151,151, 55,247,194,133, 11,183,220,213,
- 43,238, 60, 12,147,201, 4,189, 94,143, 59,119,238, 4,133,134,134,146, 55,223,124,211,166,211,233,162,150, 47, 95,126,227,199,
- 31,127, 84,125,241,197, 23, 79, 2, 24,207,170,168,135, 71,173, 90,181,100,158,158,158, 94,213,253, 4,173,132, 71, 97, 58,165,
- 30, 17, 17, 17, 53, 44, 22,203,147,132,144,214,117,234,212,241,185,126,253,122, 78,104,104,232, 81,142,227,126, 72, 76, 76, 76,
-117, 97,124,136,213,106,197,232,150,185,120,185, 13, 15,139, 37, 15,121,121,121,184,125,251, 54, 46, 94,188,136, 99,199, 46, 84,
- 41,157,145,145,145,207, 43, 20,138, 30, 50,153, 44,194,102,179,113, 58,157,238,182,209,104,220,149,146,146,178,132, 22, 79, 80,
- 84, 73,131,246,151,164,211, 73,255,211, 39,158,120, 34,196,203,203, 11,167, 79,159, 14, 57,123,246,236,167, 0, 98,239,235,186,
- 20,184,111,102,127,242,101,104,176,191, 55, 46, 28,218, 26, 58,111,217,143,223,160,168, 47, 47,131,241,239, 49, 88,118, 20, 10,
-133,109,204,152, 49, 87,183,108,217, 18, 17, 27, 27,123,185,188,206,192, 46,104, 23, 29, 29,125,251,240,225,195,240,245,245, 53,
- 91, 44, 22,222, 96, 48,112, 82,169,148,102,103,103, 19,189, 94,207,157, 61,123, 86,145,148,148, 36,245,241,241,145, 0,104,230,
- 70,132,161, 77,100,100,100,217,166,198,100, 66, 97, 97, 33, 10, 10, 10, 96, 52, 26, 17, 24, 24, 72, 56,142,107,229, 50,172,199,
-113,237,235,214,173, 75,114,114,114, 16, 18, 18,130, 67,135, 14,161, 48, 55, 23,134,130,124,152,242,243, 96,206,203,133, 37, 47,
- 23,185,233, 41,136, 8, 14, 35,197, 83, 11, 84,136,149, 87,214, 8,208,168,113,125,246, 52,180, 56,117, 27, 68, 34,197,241,134,
-193,160,150,162,174, 86, 45,207,165,128, 72,101,184, 60,225, 57, 4, 14,127, 17, 22, 78, 30,250,144,159,220,141,132,144, 41, 28,
-199,205,151,203,229,194,216,177, 99,145,154,154, 90,194,252,140, 29, 59,214,209,231,170, 67,135, 14, 7, 20, 10,133, 53, 35, 35,
- 3, 70,163, 81,226,142,102, 68, 68,196,237,183,222,122,235,184,201,100, 10, 11, 9, 9,241, 54, 26,141,250,186,117,235,134, 40,
-149,202, 64,147,201,100,139,141,141, 93,162, 84, 42, 45,133,133,133,212,106,181,146,127,194, 5, 66, 8, 1, 33, 4, 86,171, 21,
- 86,171, 21,222,222,222,218,172,172,172, 99, 55,111,222, 28, 90, 21, 61,139,197, 2,139,197,226,136, 98,137,162,136,115,231,206,
- 65,161, 80, 72, 68, 81,188, 96,179,217, 84, 18,137, 4, 60,207,179, 57,234, 30, 34,205,155, 55,239,212, 56,208,243,179,177, 33,
- 70,239,154,125,213, 90,149,140,215,126,156,165,140,248,229, 59,237,218, 62,189, 7,123, 76,158, 60,185,134,175,175,175,226,214,
-173, 91,134,121,243,230, 69,110,220,184,145, 0,248,164, 34,205,148,148,148,159, 62,248,224, 3,223, 78,157, 58, 69, 73, 36, 18,
-146,155,155,139,140,140, 12,164,167,167,227,206,157, 59, 52, 33, 33,225,166,213,106, 93, 87,153,116, 54,110,220,120,249,240,225,
-195,159,105,208,160,129,132, 82, 10,179,217, 12,157, 78,215,244,216,177, 99,253, 14, 30, 60, 24, 7,160,210,229, 50, 53, 53,117,
-221,135, 31,126,168,238,216,177, 99, 61,137, 68,194, 61,136,116,150,170, 7, 66, 52, 26, 13,118,237,218, 5,111,111,111,184, 26,
-173,235, 14, 70,139, 24, 26, 20,224, 7,195,161,207, 80,219,183, 6,140, 22, 49,148,149, 98,198,191,214, 96,101,100,100,200,180,
- 90,173, 32,138, 34,159,151,151,167, 82,169, 84, 86,153, 76,102,170,228,239, 53,232,215,175,223,241, 86,173, 90, 21, 22, 71, 52,
- 44, 1, 1, 1,230,188,188, 60,136,162, 8, 81, 20,173,158,158,158,133, 22,139, 5, 81, 81, 81, 28, 0,151, 77,132,122,189,190,
-186, 82,169,188,103,189, 78,167,115,152,171,194,194, 66,232,116, 58,120,121,121, 65,171,213,186,188,184,109, 54, 91,132, 74,165,
- 66, 74, 74, 10, 0,160, 32, 39, 27,198,252,124,152, 10,254, 52, 87,182,220, 28,136,122, 45,188,195,194, 97,181, 90,195, 93,105,
-106,141, 54, 25, 15,138,244,173, 63, 33,240,229, 41,229,238,151,115,112, 47, 60,106, 71, 67,175, 55, 63,244, 57,202, 40,165, 11,
-155, 54,109,218,108,227,198,141,163,146,147,147,239,217, 62, 96,192, 0,140, 31, 63, 30,227,198,141,187,252,248,227,143,159,221,
-186,117, 43, 94,121,229, 21,136,162,216,132, 16,146, 71, 41,253,181, 34,205,233,211,167,159, 72, 76, 76,220,123,237,218,181,177,
- 1, 1, 1,242, 70,141, 26, 93,111,212,168, 17,191,113,227,198,192, 23, 95,124,241,100,175, 94,189, 18,118,239,222,237,187,107,
-215, 46,133, 40,138,205, 9, 33,201,127,247, 60, 88,246, 38, 98,147,201, 4,131,193, 0,179,217, 12,155,205, 70, 42,145,167, 37,
-254, 23, 69,209, 97,214,140, 70, 35, 44, 22, 11,217,185,115, 7,182,110,221,202, 93,186,116, 49,108,250,244,215,145,151,151, 7,
-155,205,198,106,167,135, 64,108,108,236, 99, 2, 21,151, 14, 15,178, 42,134, 6, 90,181, 82, 66, 11,175, 45,125,171, 48,190,134,
- 70,235,233,207,155, 60,253, 36, 33,211,166, 79, 11,190,121,227,166,241,163,143, 62,186,212,167, 79,159,128, 23, 95,124,177,254,
-182,109,219,226,170, 87,175,254,245,157, 59,119,114,203, 49,230,210, 81,163, 70, 29,243,246,246,174,185,122,245,234,244,228,228,
-100, 31,139,197,162,178, 88, 44,102,131,193,112,195,108, 54, 31, 52,153, 76,187, 82, 83, 83, 79, 86, 38,189, 26,141,166,241,160,
- 65,131, 36,185,185,185, 40, 30,125,139,244,244,116, 52,107,214,140,223,189,123,119,131,170,228,193,197,139, 23, 63, 11, 9, 9,
-217,187,101,203,150, 30,106,181,186,185, 76, 38, 11, 18, 69,209,166,215,235,211, 12, 6,195,153,170,164,179, 84, 94,164,156, 58,
-117, 42,196,211,211, 19,137,137,137, 32,132,164,220,239,121, 83, 72,185,196, 75, 7,183,132,215,246,141,196,177,163, 71,161,144,
-114,137,172, 52, 51,254, 85, 6,171,160,160, 64, 56,117,234,148, 79, 98, 98,162,198,223,223,223, 80,191,126,253, 60, 66,136,200,
-113, 28, 77, 77, 77,245,141,143,143, 87,248,249,249,105,107,214,172,153,237,230,239, 93,155, 48, 97, 66,220,140, 25, 51, 78,118,
-239,222, 61, 19, 0,114,114,114,144,149,149,133,140,140, 12,152,205,102,164,164,164,112, 39, 78,156,240,253,237,183,223,154, 2,
-112,217,244,162, 84, 42,239, 20, 20, 20,212,245,246,246,118,220,208,236,166,202,217, 96,217,163, 89,106,181,218,229,197,205,113,
- 92,114,114,114,114, 45,131, 94,143, 59,215,175,195, 88, 80,212, 36,232, 48, 87,121,217, 64, 97, 1,212, 10, 5, 10,178,179,192,
-243,252, 93, 87,154,106, 57,111,178, 88,109,178,106,189,250, 1,164,252,251,179, 87,203,118, 16,235, 53,130, 82,185,222,242,119,
- 20, 8,142,227,108, 21, 53,251,202,100, 50, 4, 6, 6,138,173, 91,183,198, 43,175,188, 98, 55, 2,132, 16,210,137, 16,114,144,
- 82, 90, 88,158,166, 40,138,220,165, 75,151,158,184,113,227, 6, 47,145, 72,184, 86,173, 90,197,180,111,223,222, 36,147,201, 32,
-149, 74,133,194,194, 66,143, 93,187,118, 41, 44, 22, 11, 41,214,124,104,243, 96, 1, 69,163,251,202, 48,240,208,106,181,208,235,
-245, 40, 44, 44, 68,110,110,174,160, 84, 42,235,118,232,208,225,168,209,104, 92,103,179,217,190, 57,121,242,100,126,121,154,102,
-179,185,132,217, 18, 69, 17,148, 82,216,108, 54, 88, 44, 22, 72, 36, 18,113,203,150,173,248, 98,225,124,172, 95,187,129,118,235,
-214,141,252,246,219,111, 16, 69, 49,137, 85, 79,127, 61,162, 40,126,250,251,180,167, 20,176,218,180,198,125,107, 10,183,103, 11,
-218,175, 47,252,126, 66, 47,112,249,213,235,163, 81, 68,120, 77,222,203,211,139, 91,177,114,105,214,111,219,246,220, 72, 74, 74,
-202,159, 61,123,118,155,168,168, 40,175,171, 87,175,134, 2,200, 45,199, 8, 69,140, 28, 57,114,100, 78, 78,142,116,217,178,101,
- 43,146,147,147,247, 81, 74,111,150, 50, 30,205, 8, 33, 31, 3,144, 0, 8, 4, 96, 5,176,147, 82,186,178, 2,179, 34, 18, 66,
-240,251,239,191,223, 51,218, 79,116, 30,145, 81,249, 40, 86, 78,171, 86,173, 26, 95,187,118,109,115, 78, 78,206,234,210,219, 85,
- 42, 85,191,152,152,152, 33,199,143, 31,127,155, 82,122,163,146, 15,110, 19, 47, 93,186,244,145, 40,138, 53, 56,142,187, 77, 41,
-157,250, 0, 34, 88, 47,204, 91,182,118,153,193,108,171,174,144,242,119,140, 22,241, 69, 86,154, 25,255, 26,131,101,181, 90, 53,
-111,189,245, 86,155, 38, 77,154,164,118,232,208,225,110,100,100,164,206,190,205,195,195, 67,239,231,231,167, 55, 24, 12,202,219,
-183,111, 7,111,218,180,169,142,205,102, 83,185,241,123,123,188,189,189,125, 79,156, 56,225,247,195, 15, 63,212, 62,117,234, 84,
-141, 97,195,134,117, 52,153, 76, 48, 26,141,184,117,235, 86,141,165, 75,151,138, 82,169, 52,151, 16,242, 7, 0,151,143,241, 22,
-139,229,200,181,107,215,234,180,106,213,138, 88, 44, 22,135,161,114, 54, 89,133,133,133,144, 74,165, 72, 73, 73,161,162, 40, 30,
-115, 35,157, 71, 79, 28, 63, 94,171, 97,253,104, 24,243,114,138,205, 85, 30,172,121, 57, 16,243,178,193,105, 11,225,231, 43, 64,
-165,208,224,106, 74, 42,138,211, 90, 33, 18,171, 62, 33, 57, 47,191,110,173,153,159,224,247, 40, 79, 80,139,217,209, 44, 8,192,
-209, 92,216,246,114, 6, 14, 28, 62, 2,193,102, 76,254,167, 22,154,179,103,207,166, 15, 27, 54,236,164, 40,138,205, 80,193, 20,
- 5, 21, 60,133, 23, 20, 22, 22, 34, 51, 51,211,150,149,149,101, 0,128,244,244,244,156, 45, 91,182, 92, 18, 69,177,101, 85, 52,
- 31, 4, 22,139,229,158,232,147,205,102,131,213,106,133,217,108, 70, 70, 70,134,236,224,193,131, 29,142, 30, 61, 42,189,120,241,
- 34,142, 30, 61,218,100,211,166, 77,175, 71, 71, 71, 55,186,124,249,242, 93, 87,166,141,148,109,172,121, 0,216,178,241,103, 12,
- 25, 50,132,100,102,102, 98,211,166, 77, 15,164, 25,133,225, 22, 90, 88,109, 74,211,190, 53,133,175, 93,151, 23, 92,208,241,179,
- 79,158, 60,185,157, 82, 74,123,247,238,125,182,110,189, 40,127, 0,144,203, 52, 65, 13, 27, 54,236,232,227,227, 35, 3,128,144,
-144,144,230, 22,139,101, 33,128,246,101,137, 14, 24, 48,160,109, 64, 64, 64,211, 95,127,253,245, 76,114,114,242,254,210,230, 10,
- 0,234,214,173, 59,235,252,249,243,143, 73, 36, 18,226, 84, 70, 40,128, 50, 13,214, 83, 79, 61, 85, 55, 44, 44,204,111,219, 53,
- 47,228, 75,107,129,242,121,128,160,128,205,187, 49,110, 75,235, 35, 40,232,138, 95,173, 90,181,154,220,184,113,227, 76, 37, 35,
- 76,213, 7, 13, 26,244,203,242,229,203,163,123,245,234, 37, 3,112,143,193,138,142,142,126,114,247,238,221, 3,199,142, 29,219,
-152, 16,210,151, 82,122,221, 93,253,147, 39, 79, 30, 2,208,230, 65,158,180,117, 23,232, 46, 20,207, 89,198, 96,252,235, 12,150,
-217,108,222,121,253,250,245, 22, 79, 61,245, 84,166,179,185,162,148, 58, 42, 3, 47, 47, 47,189,191,191,127,246,153, 51,103,170,
-137,162,184,207,141,223, 91,182,123,247,238,223, 23, 44, 88,176,198,215,215,215, 50, 98,196, 8,110,218,180,105, 7,178,178,178,
-104, 86, 86, 22,190,252,242,203, 14,113,113,113, 7,110,223,190,109, 59,121,242,228, 72, 0,189, 92,214,142, 90,237,194, 87, 94,
-121,101,200,129, 3, 7, 20,246,121,138, 74, 71,175, 44, 22, 11, 4, 65,192,194,133, 11,141, 90,173,118,190, 27,145,140, 37, 95,
-125,245,213,192,165, 95, 44, 80,240,102, 51, 44,185,217,176,230,229,194,150,155, 13, 78,167,133,135,130,160,118,179,106,200, 73,
-150, 99,213,246, 67,122,171,213,250,149, 75,131,101, 40,156, 50,118,244, 75, 63,239,220,243, 59,124,219,119, 65,214,239,191,221,
- 27, 29,170, 22, 8,147,217,140,247,222,157, 73,137, 62,119,218,223,244, 68,207,155, 76,229,183,252,154, 76, 38,136,162,152,116,
-241,226,197,181,132,144, 2, 66, 72,167,226, 77,123,203,138, 94, 57,107,114, 28, 39,214,175, 95,127, 99, 96, 96,224, 19, 0,180,
-245,235,215,223, 40,151,203,187,152, 76,166, 86,162, 40, 38,157, 62,125,122, 3, 33,228, 46, 33,164, 79,241, 87, 31,234, 60, 88,
- 22,139, 5, 51,102,204,192, 7, 31,124,128,233,211,167, 59,142,215,222, 76,104, 54,155, 35,119,236,216, 33, 61,116,232, 16,253,
-238,187,239,178,158,126,250,105,239, 97,195,134,121,175, 90,181,106, 34,128,169,229,105, 78,157, 58, 21,139, 23, 47,198,152, 49,
- 99,238,117, 87, 60, 47, 38, 39, 39,193,100, 54,209,149, 43, 87,166, 8,130,224,243,249,231,159, 43, 39, 79,158, 76, 88,245,244,
-215, 99,179,217,222,108,247,233,166, 87, 9, 81,154,173, 86,235,252,179,103, 79,239,117,122, 16, 80,126,250,201,167, 2, 0,124,
-242,241,167, 18, 74,169,151,125, 98,216,217,179,103, 43, 70,143, 30, 29, 80,158,238,250,245,235,115,103,207,158,237,247,194, 11,
- 47,244,218,187,119,175,138, 16,178, 13,192, 31, 0, 50,139, 31, 28,253, 1, 28,170, 86,173, 90,240,218,181,107,107,245,232,209,
- 67,237, 70, 93,247,245,162, 69,139, 34, 62,221,239,129,109,218, 39,144, 40, 62, 13,234, 77,225, 27, 80,128,250,154, 59,232, 28,
-154, 28,178,122,245,234,101, 0,154, 87,194, 92, 53,120,234,169,167, 54, 45, 95,190, 60,242,165,151, 94, 74, 58,116,232, 80, 34,
- 33,100, 86, 25,187,102, 61,247,220,115,183, 87,172, 88, 81, 75, 20,197,237,132,144, 94,148,210,107,172, 4, 49, 24, 85,139, 96,
- 61, 79, 8,137,153, 62,125,250, 71, 33, 33, 33,213,103,206,156, 25, 95,191,126,125,173,227,106,203,202,210,236,219,183, 47, 42,
- 63, 63,191,192,106,181,142,160,148,158, 45,227,226,237,230, 60, 87, 6,165,244, 54, 33,228,163, 38, 77,154, 12,249,241,199, 31,
-247,121,120,120,228, 31, 61,122,212,211,211,211, 51,239,210,165, 75,106,158,231,117,241,241,241,216,177, 99, 71, 7, 0, 95,148,
-245,148, 84, 90, 51, 53, 53,245, 84, 84, 84,212,252,201,147, 39,255,239,237,183,223, 86, 80, 74,161,211,233,144,159,159, 15,163,
-209, 8, 65, 16, 64, 8,193,154, 53,107,140, 70,163,113,105,114,114,242, 81, 87,154, 41, 41, 41, 71,194,195,195,191,153, 63,111,
-222, 11, 47, 14, 25, 44, 67, 94, 22,114, 83,147, 65,116,133,208, 40,229,136,233, 26, 6,109, 22,193,242,125,127,152,178,141,230,
-181,201,201,201,123, 93,105, 30,188, 83,240, 75,155, 58, 1,187,103,207,158,217,245,245,111, 55, 64, 20, 69, 92,126,229, 25,228,
-236,223, 9, 85,253, 70,104,123, 57, 3, 38,147, 9,211,167, 78, 6,175, 75, 59,112,244, 78,225,122, 87,154, 15, 2,103, 77, 66,
-200,203,132,144,103,162,163,163, 49,118,236, 88, 12, 24, 48,160,196,190,155, 54,109,194,162, 69,139, 96, 52, 26,159, 33,132,156,
-162,148, 46, 36,132, 28, 44, 62,183,133,174, 52, 35, 34, 34, 90,196,196,196, 32, 36, 36, 68, 87,108, 46,186, 95,188,120,177,121,
-116,116,116,105,205, 63,138, 53,173, 15,235,216, 41,165, 57,215,175, 95,247,252,248,227,143,137,217,108,198,172, 89,179, 96, 55,
-154,246,150,151, 55,222,120, 35, 68,163,209,224,147, 79, 62, 49,101,102,102,118, 89,180,104,209,158, 5, 11, 22,248,175, 89,179,
-102,168,221, 96,149,210, 76,191,116,233,146,199,226,197,139, 57,171,213,138,207, 62,251,236,158,102,200,137, 19, 39,194,108,182,
- 64,224, 5,147, 65,111,104,160, 80, 40,110,248,248,248, 40, 69, 81,164, 15,235,216, 31,101,205,179,103,207,238, 4,176,211,157,
-239, 25, 12, 6,100,100,100, 32, 51, 51, 19,197, 93, 18, 72,121,233, 52, 24, 12,167,167, 78,157,122,114,201,146, 37,189, 14, 29,
- 58, 52,112,255,254,253,189,118,237,218,101,184,125,251,182,213, 98,177,208,224,224, 96,161,125,251,246,138,222,189,123,171,229,
-114, 57,247,230,155,111,102,206,153, 51,199, 31, 64, 86, 5,245, 39, 79, 41,197,107, 29, 10, 48,181, 51, 15,147,201,140,220,220,
- 92, 36, 39, 39,225,226,197,139, 56,114,228, 50, 40,165, 92, 37,243,115,254,234,213,171,163,100, 50, 25, 89,179,102, 77,245, 53,
-107,214, 76,112,149, 15, 43, 87,174,140, 88,179,102,205,194, 98, 45,145,149, 37,166,201,168,164,193, 42,190,160, 47, 0,232, 69,
- 8,105,255,210, 75, 47,125, 24, 29, 29,109,180, 90,173,146,237,219,183,215,203,204,204,148, 89,173,214,169,148,210,253,149,249,
- 65, 74,233, 98, 66, 8,250,247,239, 63,181,102,205,154,187, 79,157, 58,213,184, 95,191,126,219, 55,110,220,216,222,106,181,222,
- 60,127,254,252, 51, 0,230, 3,248,194, 93,205,248,248,248,183,118,237,218,101, 61,122,244,232,107,211,166, 77,147, 7, 4, 4,
- 16, 31, 31, 31,164,164,164, 32, 41, 41,137,126,251,237,183, 70,163,209,248,133,151,151,215, 91,238,106,202,100,178,215,246,159,
- 56, 73,174,222,184, 49,242,249,199,122, 40,194,235,212,133,134,212, 69, 65, 86, 38,246,239, 77,195,138, 63,206, 24,210, 12,166,
-239,121,158,119,123, 40,125,232,245,140,158, 59,127, 88,254,235,222,221,123,186,205,253,224, 35, 18, 50,252, 5,168, 35, 34, 33,
- 70,212,198,190,189,123, 49,103,246, 44,202, 23,166,237,183,220, 72,235,254,176, 11,130,125,206, 42, 81, 20, 5, 0, 80, 42,149,
- 24, 63,126, 60,156, 95,141,179,104,209, 34,232,245,122, 0, 16, 8, 33, 31, 19, 66,190, 41, 47,106, 85,142,102,245,109,219,182,
- 85,119,214,140,142,142, 46, 75,211,248,176,143, 63, 45, 45,237,173,231,158,123,238,125,137, 68,226, 93,222, 62,106,181, 26, 5,
- 5, 5,176,217,108, 54, 95, 95,223, 43,246,200,104,121,215,145, 86,171,125,107,204,152, 49,239, 17, 66,202,141,116, 40,149,202,
-219, 7, 15, 30,172, 61,108,216, 48,110,237,218,181,183,134, 14, 29, 42, 63,120,240,160, 13,192, 6, 86, 61,253,179,112, 30,176,
-160,213,106, 1,128, 86,176,239, 29, 66,200,212,147, 39, 79, 42,198,140, 25,211,124,248,240,225,158,157, 59,119,214, 56,239,163,
-215,235,197,173, 91,183,106, 23, 47, 94,156,181,127,255,254, 63, 70,141, 26,245, 4,138,102,144, 47,147,148,148,148, 95,190,248,
-226, 11,175, 78,157, 58,213,177,217,108,142,254, 87, 25, 25, 25, 72, 74, 74, 66, 66, 66,194,109, 81, 20,183, 84,242,176, 94, 25,
- 54,108,216,182, 21, 43, 86,212,120,233,165,151,146,126,248,225,135, 45, 0,242,202,216, 79,243,228,147, 79,246, 91,177, 98, 69,
-141,209,163, 71,223, 1, 48,129,205,240,206, 96,220,135,193,114,170, 44, 14, 2,104, 67, 8,233,207,243,252,148,194,194,194,207,
- 40,165,155,239,163,162, 90, 76, 8,217,126,253,250,245, 23, 0,196,126,246,217,103,175, 3, 72, 68, 81, 8,189, 71, 89,253, 21,
- 92,232,217, 0,188, 29, 26, 26,250,211,172, 89,179, 30,200,187, 8,111,220,184, 97, 2,240, 74, 72, 72,200, 15,239,255,176,254,
- 45, 74,105, 51,158,138,126, 54,194,229,112, 28,119,218,102,179,205, 73, 74, 74,218, 87, 25,205,117, 69,233,236,209,186,186, 71,
-159,169,163,135,125,100,149, 40, 35, 10, 13, 86,153, 90, 46,152,164, 54,227,109, 78,159,243,230,209,219,133,255,136, 27,171,209,
-104,180, 62,241,196, 19, 95,115, 28, 39, 2,128,205,102, 19,140, 70,227, 72, 84, 98,228,105, 89,154, 3, 6, 12,248,150,231,121,
-107,113,100,136, 51, 26,141,207,223,143,230,131, 34, 51, 51,179, 16,192,184,138,246,137,139,139, 91,245,235,175,191, 14,235,222,
-189,187,237,151, 95,126, 73,127,252,241,199,133, 83,167, 78, 81, 66, 72,153, 79,113, 9, 9, 9, 70,148,243, 70, 2, 59, 77,154,
- 52,169,241,205, 55,223,156,122,225,133, 23, 60, 23, 46, 92,232,123,252,248,113,219,242,229,203,243, 11, 11, 11, 63,101,213,211,
- 63, 11,137, 68, 2,149, 74, 5,147,201,132,140,140, 12,184,234, 83, 78, 41,189, 65, 8,121,124,202,148, 41,113, 83,166, 76,121,
- 60, 44, 44,172, 65,245,234,213,171,115, 28,199,165,166,166,102, 36, 38, 38, 38,152,205,230,221, 0,126, 1, 32,173, 89,179,230,
-105, 0,171,202,211,187,120,241,226,123, 33, 33, 33,191,111,220,184,241,113,185, 92, 94, 95, 38,147,249, 90,173, 86,174,176,176,
- 48,219,108, 54, 95, 50, 26,141, 63,167,164,164, 28,174,100,221,121,149, 16,210, 89, 16,132, 95,150, 47, 95, 30,157,154,154, 26,
-177,111,223,190,190,165,247,107,222,188,249,138, 21, 43, 86,212, 24, 59,118,236,141, 53,107,214, 84,170, 15, 22,131,193, 12,150,
-123, 23,227,102, 0,155, 31,196, 15, 83, 74,111, 3,120,171,120,121, 32, 36, 39, 39,159, 3, 48,236, 65,102, 80, 74, 74,202, 33,
- 0, 61,129,162,217,156, 19,139,110,154,247,197,209, 59, 5, 63,195,233,245, 42,255,144,167,115, 35, 33,100, 74,241,168, 38, 0,
-152,114,250,244,233,133,165, 34, 82,103,157,183,187,138, 52,149,165,121,230,204,153,210,154,231, 43,163,249,119,146,147,147,243,
-191, 21, 43, 86, 28,127,229,149, 87,228,131, 6, 13,194,229,203,151,241,213, 87, 95, 25,115,114,114,214, 84, 85,243,204,153, 51,
-183,155, 52,105,210,108,217,178,101,175, 45, 93,186,180, 63, 33,132,189,139,240, 31,130,193, 96,184, 57,100,200, 16,112, 28, 71,
- 40,165,212,106,181, 58, 6, 61, 20,207,103,118,211,141,235,202, 10,224,247,226,197, 21, 31,187, 81, 31, 29, 1,112,228, 1, 95,
-251,119, 8, 33,143, 39, 36, 36,204,189,122,245,234,111,101,237,115,225,194,133, 77, 61,122,244, 80, 29, 57,114,228,141,202,142,
- 34,100, 48,152,193, 98,184, 36,225, 1,152,171,127, 50,197,253,159,190,177,155,163,202,110,127, 88,154,127, 23, 23, 47, 94,204,
- 1,224,120,101, 72, 84, 84, 20,250,244,233,115,223,186,197,102,106, 60,216,204,237,255, 40,182,108,217,242,216,163,114,172,148,
-210, 59, 21, 61,156,154, 76,166, 45, 0,182,176, 82,193, 96, 48,131,197,168,122, 69,107,188,159,237, 15, 75,147,193, 96, 48, 24,
-140,127, 50, 4, 64,183,114,110,122,110,143, 14, 32,164,242, 47,218,116,165,207, 52,153, 38,211,100,154, 76,147,105, 50,205,255,
-158,166, 43,237,255,204,232, 68, 74,233, 95,182, 0,232,198, 52,153, 38,211,100,154, 76,147,105, 50, 77,166,249,168, 45,236,133,
-178, 12, 6, 3,237,171, 19,239,158, 97,196,167,172,109, 61,195,136, 79,251,234,196,155,229, 18,131,193, 96,184, 15,235,131,197,
-248,215,241,244,211, 79,243,149,217, 63,222,219,155,203, 75,170,254,169, 70, 37,239,171, 51, 24, 63,189,254,203, 27, 95,252, 23,
-242, 33, 56, 56,184,158,167,167,231, 8, 0, 13,116, 58, 93,128, 74,165, 74, 7,112, 49, 63, 63,127, 85,106,106,234, 21,119,117,
- 58, 69,145,233, 2,143,153, 70, 30,164,115, 4,153,243,123, 2,125,215,190,173,115, 4,153, 33, 74,240,166, 0,208, 78,145,228,
-189,189,241,244, 61,119,117,123,214, 34, 6, 10,200, 9,129,121,251,117,234,120,193,101,175,218,196, 32,210,123,215,247,172, 77,
- 76,148, 66, 74, 0,227,246, 27, 84,193, 74, 58,131,193,248,207, 27, 44,153, 76, 22, 67, 41, 29, 69, 8, 9, 34,132,220,165,148,
-126, 99, 50,153, 46, 60,106,153, 37,147,201, 98, 8, 33,163, 40,165, 65,148,210,187,132,144,191, 57, 31, 8, 89,255,116, 81, 20,
-114,224, 58,136, 0,165,172, 72,151, 97,174,146,171, 47, 29,217,191,197,115,211, 70,117, 70,179, 65,159, 77, 69, 37, 38,177,253,
- 39, 66, 8,225,163,162,162, 94,169, 81,163,198,224, 37, 75,150, 72,163,162,162,160, 80, 40,160,215,235,131,111,222,188, 25, 60,
-118,236,216,142, 53,107,214, 92,123,235,214,173,175,138,231,136, 43,223, 4,133, 17, 31, 72, 48,115,239,194,177, 50, 0,232, 56,
-118,209,140,200,208, 0,106,134, 68, 47,133, 69, 25, 46,193,140,125, 11,199,242,197,219,102, 70,134, 6, 16, 51, 36,122, 39,137,
-164,228,228,228,117,101,105, 83, 64,246,243,202, 79,208,239,153,201, 66,104,104,232,107,246,245, 77, 52,132,252,188,106, 30,122,
- 13,249, 95,137,245, 49, 10, 8, 91, 87,126,130, 62,207, 76, 46,247,109,227,189,234,112, 22, 81,164,229,214, 91, 28, 71,172, 23,
-116,193,211,203,216, 84,102, 58,251, 68, 11,105,102,139,173,204,137, 96,165, 18, 62,253,231,203,214,192,208,208,208,167, 1,132,
-185,171,201, 96, 48, 24, 21, 26,172,136,240,240, 65, 28, 79, 22,152, 45, 54, 31,111,111,111,238,203, 47,191,228,250,246,237,139,
-159,183,110,197,248,241,227, 39,132,134,134,136, 82, 65,200,161,162,117, 66, 66, 98,202,143,238,252,216,147, 79, 62,153,102,177,
- 88,202,157,213,154,231,249,244, 77,155, 54, 5,222,239, 65,133, 54, 31,148,102, 49,155,203,253, 29, 65,144,164,167,156, 94,231,
-214,239,132,135,135, 12,226, 9,183,192, 98, 19,125,124,124,124,184, 47,190,248,130,235,219,183, 47,182,110,221,138,113,227,198,
- 77, 8, 11, 13, 21,165, 18, 62, 71,180,209, 9, 9,137,137, 63, 62,188, 83, 71,200,250,245,224, 48,176,232,191,245,235,193, 13,
- 28, 72, 30,105,147,149,153,153, 73, 0,192,223,223,159,150, 48, 87,253, 90, 60,247,230, 75, 93, 49,103,233,110,232,141,166,213,
-255,246,227,140,138,138,122,229,233,167,159, 30,252,222,123,239, 73, 57,174,168,149, 95,171,213, 66,175,215, 35, 52, 52, 20,123,
-247,238,149,190,245,214, 91,131, 55,109,218, 4, 0, 11, 42,163,205,243, 60,249,125,231,254, 40,223,192, 16, 83,118, 90,138,236,
-249, 94, 13, 72, 89,219,236,235,234,213,171,231, 82,179,154,175,167,241,202,174, 43,181,237,255,143,235, 22,102, 43,103,189, 17,
-128,178, 34, 45, 81,164,194,142, 47,198,150,187,125,204,251,107,109,235,126,249, 83,211, 85, 58,205, 22, 91, 64,121,122, 61,198,
- 47,178,215, 33, 97, 87,174,184,175,201, 96, 48, 24, 21, 26, 44,194, 97,225,154, 37, 31,251,100,101,231,224,135, 77,219, 17, 29,
- 29,141,139, 23, 47,162, 94,116, 52,226, 90, 54,225,122,180,109,204, 9,132, 84,123,251,139,149, 11, 1,184,101, 44, 44, 22, 75,
-192,198,141, 27, 65, 8,129,205,102,131,205,102,179, 79,216,135,194,194, 66, 76,152, 48, 33,224, 65, 28,148,197,108, 14,184,249,
-199, 6, 72,120, 2,171,141,194, 98,163, 48, 91, 69,152,173, 20,249, 58, 43,186, 60, 62,204,237,223,225,192, 45,252,246,139, 79,
-124,114,114,115,177,241,215, 93,142,124,136,142,142, 70,151,118, 45,185,167, 31,239,200,169, 21,242,106, 47, 78,123,223,237,124,
-120, 16,172,127,250, 79,115,229,188,110,224, 58,216, 30,165, 2,124,249,242,101,222,104, 52, 14,241,244,244,108, 45,145, 72, 2,
- 85,222,193, 98,174,180,102,150,150, 4,221, 50,107,101, 29, 70, 13,168,213,235,141, 23, 58, 97,206,210,221,248,118,203, 31, 43,
-188, 66, 19,103,252,155,143, 55, 56, 56,184, 94,141, 26, 53, 74,152, 43,251, 75,205,243,243,243, 81, 80, 80, 0,142,227, 48,117,
-234, 84,233,190,125,251, 6, 7, 7, 7,239,170,168,185,112,123, 18,205,233, 20, 69,102,118,124,121,209,108,158,227, 57,153, 79,
-248,169,217, 31,124,156,175, 86,171,169, 66,161,208, 87,139,136, 57,213,101,220,210,102,148, 82,234, 21, 90,231,143, 37,223,124,
-151,167, 86,171,169, 92, 46,151,191,244,210, 75,110,245,225,212, 27,244,152, 52,105,146, 81,169, 84, 82,133, 66, 65,141,166,162,
- 89, 57, 12, 70, 3,222,124,243, 77,163, 74,165,162,106,181,154,154,204, 38,183,243,225,214,221, 2, 72, 5, 14, 82, 9, 15,169,
-192, 67, 25, 84, 23,178,194,120,152,205,230, 18,154,238,166,115,207,217,100, 40,101, 18,168,228, 2,106, 71,134, 65, 78,245,247,
-236, 51,118,236, 88,209,203,203,203,172,209,104,164,111,188,241, 6,235,191,202, 96, 48,170,102,176, 76, 22,155, 79,144,159, 55,
-190,253,230, 91, 76,125,125, 54,234,213,171, 7, 74, 41, 8, 33,120,125,198, 44,124,254,238,116, 12,126,172, 35, 44, 86,209,167,
- 60,141,178,134, 90, 18, 66, 16, 31, 31, 15,131,193, 0,189, 94,239, 88, 98, 98, 98,220, 74,176,187,195, 55, 37, 60,193, 47,167,
- 10,138,140,149, 69,132,217, 42,194, 98, 21,209, 57,198,163, 82,154, 22,155,232,227,229,161,198,210,197, 11, 49,245,221,143, 75,
-228,195,180, 55,222,194, 87, 31,190,141,137, 99,158,133,201, 98,243,169, 74, 58, 43, 3,211, 44,201,225,195,135,131, 85, 42,213,
-103,195,134, 13, 11,153, 48, 97,130,140, 10,106, 97,251,177,219, 94,159,124,179, 59,196, 96, 50,243,143,183,175,137,231, 7,196,
- 98,206,178,223,139,205,213,157,151, 34,115,115,197,127,243,177,123,122,122,142, 88,178,100,201, 61,230, 42, 45, 45,141, 43, 44,
- 44,132,217,108, 22,139,223,151,136,233,211,167, 75,222,122,235,173, 17,132,144,119,139,117,140,101,105,238,189, 69, 63,168, 17,
- 26, 40,236,219,187,175,230,187,239,127,148, 63, 96,192,128,235, 28,199, 65, 34,145,224, 70,120, 56,125,172, 91,231,203,239,127,
-248,161,241,185,231, 95,186,192,113, 28,120,158,199,213,171, 87,163, 0,168,220, 57,118, 2,208,126,253,250, 57, 52,191,217, 57,
-159,218,215, 15, 25, 50,228,186, 93,243,210,198, 57,212,221,252, 20,120,130, 48,127,245,159,191, 32, 87, 2,197,111,197,116,214,
-116, 55,157, 2,207,161,117,189,226,231,174,208,102, 64,210,193,123,126, 83,161, 80,152,159,122,234,169,235, 9, 9, 9,110, 31,
- 59,187,222,153, 38,211,100, 6,171, 76,204, 70, 61, 98,170,251, 98,241,167,239, 65,164, 28, 40, 40,168, 72, 65,169, 13,145,254,
-106, 24,117,218, 74,255,160, 40,138,176, 88, 44, 48,155,205, 88,178,100, 9, 10, 11, 11, 33,138, 34,234,215,175, 15, 0,104,222,
-188,185,115, 37,123,231,228,201,147, 53, 92,105, 6, 52, 26,112, 27, 20,213,157,215,189,243,241,215, 56,124,250, 38, 68, 17,144,
- 43, 85, 24, 56, 98, 52,172, 54, 10,147,165,242,239, 39, 53,234,117, 8,209, 72, 48,111,238, 12, 16, 65, 2,158, 16, 16, 66,192,
- 17, 17,245, 66,189, 97, 50,232, 30,250,137, 27,184, 14,226,250,245, 37, 71,129, 22,245,195,122,116, 34, 87, 42,149,234,179, 85,
-171, 86,213,104,209,162, 5, 7, 0,199,175,229,200, 63,249,102,119,200,215, 51,159, 32,205,234, 5, 33, 43, 79,143, 57,203,247,
- 97,207,169,148,223, 74,155,171,127, 49, 13,162,162,162, 74,152,171, 79, 62,249,196,127,225,194,133,161, 0,240,212, 83, 79, 37,
-119,237,218, 53,243,234,213,171, 8, 14, 14, 38,153,153,153,143, 3,248, 95,241,195,205, 20, 74,233,194,178, 68,173, 16, 12,190,
-129, 33, 38,153, 76, 6,137, 68, 2,142,227, 28,139,111, 96,136, 73,237,233, 99, 42,189,222, 93, 8, 33, 37, 52, 75, 60, 8,149,
-179,222,101,197, 85,193,254, 85, 73, 39,207, 17, 39,241,178,187,128,201,100, 50, 8,130, 80,233,180, 50, 24, 12,102,176,238,141,
- 98, 25,245, 8,243,150, 33, 72, 35,192, 98,177,226,162, 37, 4, 5, 58, 3,204,102, 11,238,152,205,184,117,230, 46,218,181,107,
-135, 39,158,120,194,102, 54,155, 33,149, 74,243, 54,110,220,232,235,202, 96,153,205,102,152,205,102,104,181, 90,172, 94,189, 26,
-130, 32, 56, 94,156,234,252,198,250,182,109,219, 86,119,207, 74,163,250,141,227, 63,193, 67,193,195, 42, 82, 88,173, 20, 86, 17,
-176,218, 40,244,102,138, 39, 70,189, 9,155,141,194, 38, 82,152,172,174,187, 40,149, 48,108,190, 45,208,111,250, 15, 0, 52,142,
-237,158,114,138,169,237,120,200,100, 18,200,100, 2, 12, 58,253,223,112,234, 40, 29, 56,144,136,143,106, 39,119,163,209, 56,116,
-216,176, 97, 33,118,115, 5, 0, 57,249, 70,193, 96, 50,243,205,234, 5,161,251,224,201,216,185,246, 19,252,122,232, 26,124, 52,
-194,254,176,255,134,185,130, 78,167, 11, 80, 40, 20,208,106,181,142,200,213,194,133, 11, 67, 77, 38, 19, 7, 0,130, 32, 9,203,
- 16, 67, 21, 54, 17,240,242, 76, 69, 78, 78,158, 31,165,148, 20, 27,157,143, 9, 33,223,148, 53,115,190, 20, 22,101, 86, 90,138,
- 76, 46,151, 27,236,198,132,231,121,112, 28,135,172,180, 20, 25,103, 51,209,210,235, 43,131,243,119,157,141, 87, 89,235,221,170,
-184,120, 82,162, 2, 40, 79,211,221,116, 10,188,211,126,124,217, 6, 75, 46,151, 83,158,231, 43,157, 86, 6,131,193, 12,214,189,
- 17, 44,189, 30, 22,139, 21, 86,171, 13, 22,171, 13,121,133,122,124,248,225,135,144,203,229, 32,132, 64, 20, 69, 20,191, 0,149,
-179, 88, 44,120,252,241,199,125, 92,253,160,115,191, 43, 74, 41,120,158, 71,171, 86,173,238,217,239,232,209,163,149, 58, 16, 15,
- 5,143,200,110,175,223,179,254,216, 79,239,129, 82,192, 38, 22, 27, 44,179, 27,247, 89, 23,134,173, 73,135,129, 48,153,204, 69,
- 17, 61, 74,171, 20,201,123, 96, 38,235, 17,235,115,229, 20, 77,232, 54, 97,194,132, 18,119, 66, 31, 79,185, 85, 33,147,218, 78,
- 93, 78, 37, 59,215,126,194,157,184,148, 34,202, 36, 2, 85,211,187, 81,255,149,227, 86,169, 84,233, 58,157, 46, 88,175,215, 35,
- 63, 63, 31,249,249,249, 37, 47,104,137,132,188, 52,102,156,191, 68, 42,131,197,108,194,175,171,230,184,212,236, 28, 65,102,132,
- 75, 48,227,197,199, 98,224, 87,163,193,233, 27,181,106,137,118,131,114,252,183, 85,109,214,125,252, 74,115, 81, 20, 73,222,157,
-179,199, 59, 13,124,249, 24,199,113, 48,153, 76,238, 79,163, 64, 8,185,113,227, 70,148,195, 72, 17, 66,236,235, 47, 95,190, 28,
-101, 55, 68,180,232,205, 18,110,161,241,240, 0, 52,213, 0,185,125,122,174, 63,191,234,172,233,110, 58, 27,212, 12, 1,130, 26,
- 1, 50,175,138,202,156,236,234,213,171, 81, 54,155,141, 77, 33,193, 96, 48,238,207, 96, 25, 13, 58, 88,172, 54, 88, 45, 69,111,
-144, 55,153, 76, 80, 42,149,232,208,161, 67,137,104, 19,165, 20, 59,118,236,128,201,228,186,147,170,213,106,117, 68,176, 68, 81,
- 4,165, 20, 63,252,240, 3, 36, 18, 9,164, 82, 41, 36, 18, 9, 36, 18,137,163, 14,118, 23,171,141,226,141,105,175, 65, 34,112,
-144, 10, 28, 36, 2,129, 84,224, 96,163, 20, 20, 20, 86, 91,209, 98,178,186, 23,200,168,200,176, 1,128,209,100, 41,122,110,166,
-128, 78,167, 99, 37,233, 33,146,153,153, 73,244,122,125,132,183,183,183,147,213,164,168,166,178, 25, 71,246,109,146, 50,242,157,
- 13, 33, 38,139, 21, 82,129,167, 67,123, 68,167,236,222,184,215, 47,211,152, 75,236,163, 11,255,229, 92,188,113,227, 70,112,120,
-120, 56,242,243,243, 97,181, 90,197,167,158,122, 42, 89, 16, 36, 97,130, 68, 66,250, 12, 25, 39,222,189,155, 98,225, 56, 30,148,
-218,240,216,211, 99,137, 92,161,148,154, 77, 38, 43,128, 41,165,163, 87, 61,195,136,143, 40,193,155,246,169, 24,186,140, 91,218,
-236,177,110,157, 47,219, 71, 17,254,248,209,203,205,119,127,241,162,125, 91,203, 55, 63, 90,126,221,121, 20,161, 59,200,101,114,
-140, 24, 49,194,209,103,233,208,215, 83,138, 12,139, 84,134,126,253,250, 57,214,255, 54, 79,234,182,166,146,183, 2,133,119, 1,
-237,221, 18,235, 37, 18, 73, 9, 77,119, 81, 11, 86,224,238,169, 10,247,153, 62,125, 58,135, 82,125,175, 24, 12, 6,163,106, 6,
- 75,175,135,213, 98,117,152, 44,179,217, 12, 0,248,244,211, 79,239, 49, 68,148, 82,199,246, 10, 53,141, 70, 68, 69, 69,193,100,
- 50, 33, 58, 58, 26,148, 82, 12, 25, 50,228,158,253,142, 31, 63, 94,169, 3,177,216, 40,230,126,248,233, 61,235, 15,174,123, 15,
-141,163, 35,209,170,182, 10, 6,139,136, 60,173,245,190, 13, 27, 0,152, 76,102,160,120, 58,124,189, 86,203, 74,210,223,136,197,
- 98, 65, 78, 78, 14,140,133, 57,214,186, 65, 52,239,133, 62, 53,141, 25,217, 58,129,163, 6,107,152,135,206, 88,152,157,204,171,
- 84,255,141,251, 98,126,126,254,170,177, 99,199,118,220,191,127,191,148,227, 56,228,231,231,163,115,231,206,153, 25, 98,168,226,
-165, 49,227,252, 83, 82,146,173,158, 74,193, 40,149, 74,144,158,158, 46,118,236, 61, 76, 63,100,212,171, 33,175,190,249,254,146,
-148, 67, 11,239,233,127,165,227, 64, 5,167, 54, 54, 74, 41,253,240,227,143,140, 94,190, 1, 70,129,216,108,206, 77,246,148, 82,
-250,205,138,111, 13,190,213,130,141,114,185, 92, 62,116,232, 80,183,218,223, 12, 70, 3,222,126,251,109,163, 66,161, 40, 49, 90,
-208, 96, 52, 96,238,220,185, 70,141, 70, 67, 85, 42, 21, 53, 91, 92,215, 31, 28, 71,172, 99,222, 95,107,179,215, 53, 78,193, 48,
- 8,130, 0,179,141,104,157, 53,221, 77,167, 59,163, 8, 39, 77,154, 36,250,248,248,152, 61, 61, 61,165,227,199,143,103, 29,177,
- 24, 12,198,125, 24, 44,157, 22, 22,139,173,184,137,208,234,136, 58,141, 31, 63,254,158,125,119,239,222,237,210, 96, 9,130,144,
-254,194, 11, 47,148,152, 34,129, 82,138, 13, 27, 54,192,222,185,214,110,218,170, 18,193,154,249,214,100,200, 36,124,177, 33, 42,
- 50, 70, 34,165,216,242,203, 14,108,249,101,135, 99, 95,158,151,164,223,143, 97, 43, 50,138, 22, 80, 90,116,103,210, 23, 50,131,
-245, 48,241,247,247,167, 25, 25, 25, 9,185,185,185,117,213,106, 53,178,178,178,144,157,157,141,220,220, 92,232,243,115,172,106,
-107,174,214,100,205,134, 32, 8,184,155,152, 6,155,205,118,247, 63, 18,189, 66,106,106,234,149,154, 53,107,174,125,227,141, 55,
-134, 76,159, 62, 93, 34,138, 34,174, 94,189, 10, 16, 66, 37, 82, 25,138, 70,234, 9,200,203,203, 23, 85, 26,239, 84, 51,229, 85,
- 18,169, 12, 28, 47, 45,179, 41,249,224, 29,154,219, 41,130,188,211,241,229, 69,179, 37, 82, 41,241, 10,171,119,236,153,145, 47,
- 94,176,119, 20,207, 78, 56,115,168,219,171, 95,183,181, 89,173,104,210,182,219,182,103, 70,190,120, 81, 34,145,224,252,249,243,
- 81,174,162, 57, 4,176, 14,120,110, 42,239,225,161, 46, 28, 52,104,208,117,187,230,141, 95,231, 23, 62, 59,110, 6, 4,169,162,
-112,228,200,145,142,209,133,231,126,122,191,112,192,115, 83,229, 4,229, 55,123, 95,208, 5, 79, 95,247,203,149,218,175,191,254,
-186,113,216,176, 97, 14,205,203,151, 47, 71,245,235,215, 79,245,222,123,239, 25,157, 53,221, 73, 39,224,222, 40, 66,149, 74,101,
-126,230,153,103,174,151, 53, 50,145,193, 96, 48, 42,111,176,172, 86, 88, 45, 69,125,176,204,102, 51,172, 86, 43,150, 46, 93, 90,
-194, 12, 73,165, 82,112, 28,231,210, 96,109,220,184,177,196,228,158,205,155, 55,167,148, 82, 60,245,212, 83,142,230,198,145, 35,
- 71, 98,244,232,209,149,238, 68,107,177, 1,179,230,124,234,208,233,221, 61, 14,253, 31,235, 8, 42, 22, 25,181,244,243,155, 42,
-229,216, 42, 50,108,142, 8, 22, 40, 64, 41, 10, 11, 10, 88, 73,122,200,152, 76,166, 93, 11, 22, 44,136,120,235,173,183,100,217,
-217,217,200,204,204, 68, 78, 78,142, 99, 41, 44, 44, 68, 80, 80, 16,126,251,237, 55,115,126,126,254,209,255,210,177,223,186,117,
-235,171, 45, 91,182, 96,223,190,125,131,167, 79,159, 46, 9, 10, 10, 34, 94, 94,105,196, 98, 54, 1,160, 52, 35, 35, 67, 84,105,
-188, 83,253, 3,195,238,164,220, 77,143,182,152, 77, 16,109,230,114,123,102,239, 77,160, 31,134,135, 6,242, 71,247, 31,171,249,
-217,188, 47, 10,237,166, 69, 34,145,160, 93,159,145,167,223,252,104, 89,252,130, 47, 22,152, 94,124,233,229,139,149, 25,245,119,
-209, 16,242,250,149, 43, 87,106,207,156, 57,211,232,172,217,253,149,121,107,250,244,233,163,250,248,227,143,141,246,117, 28,199,
-225,201,233, 95,175,137,139,139, 83,213,171, 87,239,186, 43,109,231,209,142,246, 79,251,122,231,117, 15,114, 20,161, 66,161,168,
-210,136, 71, 6,131,193, 12, 86, 9, 36, 2,151,119,237,118,170, 87, 53,181, 18, 86,209, 8,155,169,104,106, 5,155,205,134,151,
- 94,122,201,177,223,208,161, 67,241,236,179,207,218, 59,148,150,124,130, 37,164,155,171,185, 50, 68, 81,196,193,131, 7, 75,140,
-254,169,168, 2, 43, 79, 83,107,180,225,208,143,239, 66,164,128, 88,228,123, 64, 65,220, 26, 53, 88,150,166, 43,195,166,240,240,
- 1, 7, 10,240,192,205,228,116, 8, 60,151, 87,217, 99,175, 44, 76,243, 79, 77,185, 92,190,230,135, 31,126,232, 29, 23, 23, 87,
-163,113,227,198, 92,118,118, 54, 10, 11, 11, 81, 88, 88,104,143,114,225,210,165, 75,226,237,219,183,147,229,114,249, 15,255,165,
- 99, 47,126,253,205,130,224,224,224, 93, 51,102,204, 24,145,153,153,249,120, 78, 78,174,223,207,223,206, 70,175,167,199,146,142,
-189,135,106, 77, 84, 80, 36,165,166,213,219,187,237,123,223, 95,215,126, 5,179,201, 52,154,144, 69,151,237,211, 52,148,214, 20,
- 33,152, 60,188,124, 45, 74,165,146, 58, 27, 20, 65, 16,224,225,229,107,241,246,169,102,114, 54, 52,101,141,164, 43,239,216,203,
-210,180,175,255,167,104, 86,102, 20,161,253,183,216,181,201, 52,153, 38,155, 11,171, 74, 6,139,218,232,132,197, 63, 31, 93, 96,
-177,137, 94,246,117, 13, 26, 52,128,217,108,198,111,191,253,230, 48, 30,130, 32, 56,230,134,113,167, 15, 86, 41,238,116,232,208,
-161,162,169, 24,238,184,119,166,113, 39,182,243,160,234, 21,109,175,108,194, 92, 25,182,101,123,207,255,153,137, 28,151, 7, 74,
- 39,176,226,244,240,136,142,142,182, 29, 62,124,120,210,216,177, 99, 63,235,218,181,107,104,255,254,253,165,225,225,225,144,203,
-229,184,121,243, 38, 14, 28, 56, 96,190,117,235, 86,178, 78,167,155,212,184,113,227,255,228, 72,203,212,212,212, 43,197,147,136,
-254,207, 62, 21,131, 92,161,148, 14, 29,245,106,152, 99, 20,225,218,175, 96, 52,232, 1, 64,168,104,154, 6, 59, 30, 30, 30, 50,
-251, 40, 60, 65, 16, 28,163,240, 60, 61, 61,101,231,207,159,119,140, 4,172,204, 40,194,135,169, 41,145, 72,170,164,233,206, 40,
- 66,137, 68, 34,187,116,233, 18, 27, 69,200, 96, 48,238,207, 96,221, 73, 78, 94, 5, 96,149,243,186,199, 31,127,188,176, 95,191,
-126, 74,251,136, 66,251,104, 64,147,201, 4,147,201, 4,133, 66, 81,169, 9,161,220,153, 68,212, 29,210,207,109,170,241, 64,115,
-197, 13,195,150,146,146, 82,131, 21,159,191,151,182,109,219,166, 94,190,124,121,216,206,157, 59,135,238,223,191,191,155, 78,167,
-139, 32,132, 64,169, 84, 38,152, 76,166, 93,114,185,124,205,127,213, 92,149,135,217,108,182, 78,159,245,201,119,188, 32,181,138,
-162,153,152,205,230, 81,112,243,165,238, 0, 48,102,204,152, 50, 71,202, 13, 31, 62,188,202, 35,232, 30,166,102,241,107,113,254,
-146, 81,132,197, 29,219, 89,223, 43, 6,131,113,127, 6,171, 44,116, 58,157, 55, 33, 68, 72, 73, 73,185,103,155, 84, 42,197,237,
-219,183,173,255,133, 76,121,224,134,141,241,151, 17, 29, 29,109, 43,126, 16, 88, 85,250,101,207,143, 2,148, 82, 35, 33,100, 10,
- 33,228,227,226, 85, 83,110,253, 62,223, 49, 90,144,144, 5,231,156,183, 85, 16,189, 74,170,226,203,139,147, 42,218,246, 79,215,
-148, 74,248,116,167,151, 58,223,179,205,197,111, 38,177, 43,144,193, 96, 60, 16,131,181,119,239, 94, 43,128,202,152,168,244,191,
- 32,205,233,236,180, 61,218,172, 91,183,206,198,114,161,132,201, 90, 72, 8,249,198,110,184,220,221,230, 76,114,114,242,186, 7,
-157,174,127,131,230,207,151,173,129,127,199,113, 48, 24, 12,102,176, 24, 12,198,191,195,100, 25,171,178,141,193, 96, 48, 24,127,
- 13, 4, 64,195,114, 42,229,243,110,139, 16,210,176, 10, 55,132,243,255, 32,205,128, 10, 52,119,185,208,236, 86,133,116, 50, 77,
-166,201, 52,153, 38,211,100,154,143,164,166, 43,237,255,204,232, 68, 90, 60, 27,249, 95,177, 0,104,248, 47,209,236,198, 52,153,
- 38,211,100,154, 76,147,105, 50,205,191, 79,243,191,182,176, 25,243, 24, 12, 6,131,193, 96, 48, 30, 48,101,246,193,170, 22, 51,
- 0, 92,169,121,207, 69, 10,100, 92,216, 84,165,253, 0, 96,214,172, 89,247,101,230,222,121,231, 29,183,222,210, 92,173,225, 0,
-112,110,140, 33, 19, 9,144,113,126,147,219,191, 79,106, 12,120, 11, 34,222, 40,250, 7, 31,209, 59,155,102,178,226, 83, 53,154,
-106,136,191,133, 72,250,120, 40, 36,253, 34, 60, 36,109,110,230, 26, 15,235,204,226, 86, 74, 44,155, 47,230,211, 28,150, 67, 12,
-198, 95,143, 79, 84,187, 97,126,254, 65,163, 69, 74,149, 0, 96, 50, 25, 44,201,137,119,230,211,156,139,107, 75,212,125,190,245,
- 7, 6,133,132,141, 87, 42,212,202,162,234,143,152,178,179,238, 46,204,185,117,232,251,135,149, 86, 82,252,238,180,208,208, 80,
-239, 67,135, 14,213,104,215,174,221,237,228,228,228, 92,231,125,202,218, 70,157, 95,166, 89,134,102, 96, 84,179,103, 60, 52,234,
-151, 13, 70, 99,164,151,167,103,122,118, 86,214,226,212, 91,167,191,178,239, 83,163, 70, 13,207,181,107,215, 6, 15, 29, 58, 52,
- 37, 62, 62,190,192,149, 38,131,225,210, 96,113, 4, 88,183,110, 45, 40,165,197,147,108, 82, 12, 29, 50,180,204,253,194,229, 41,
-145,162, 40, 62, 11, 96, 56,165,244, 76,138, 37,252,169,170, 36,100,247,238,221,161, 22,139,165,133,213,106,109, 6,160,153, 82,
-165,105, 98, 52, 26,210, 9,232,115,143, 61,246,216,105,119,117, 56, 10, 44,251,118, 37,102,141,233,244, 11,128,222,229, 92, 88,
-179,146,140,161,149, 51, 72, 34,125,243,143,253, 27,228,222, 42,130, 90,205,159,156, 10,224, 31,105,176, 66, 66, 66,148, 0,158,
-227, 56,174,171, 92, 46,175, 99, 48, 24, 18, 0,156, 35,132, 44, 76, 74, 74, 74,169, 98,229,198,197,104, 36,207,171,148,170, 94,
-193,106, 89,179,212,220,252,100,157, 69, 60, 32, 18,243,199,149, 53, 68,181, 8,145,213, 12,247,222,247, 90,255,184,232,198,209,
- 53, 97,187,176, 31, 38,179,185,223,137, 84, 93,191, 37,167,211, 38,213, 34,164,217, 13, 74, 77,110,166, 43, 24,128, 64, 41, 77,
- 4,128,176,176, 48, 31, 81, 20,227, 0, 52, 1,112,134,227,184, 3, 73, 73, 73,247,101,216,254, 69,154, 33,162, 40,190, 16, 24,
- 24,248,120, 90, 90,218, 47, 28,199, 45,175,234,249,102, 60, 26,248,250, 5,189,252,229, 55,235, 29,211,214, 83, 81,148, 12,233,
-223,105, 4,128, 18, 6,203,219,219,239,185,111,215,252,170, 36,127,190, 97, 67, 54,110,212,192,209, 0, 30,138,193, 34,132, 16,
- 74, 41,102,205,154, 69,150, 45, 91, 54,178,122,245,234,181, 41,165, 87,103,206,156, 57,223,121,191,210,219,222,121,231, 29, 90,
-252, 93, 90,150,102, 84, 76,251,205,207, 63, 59,184,211,132,177,207,105, 84, 74, 37,244,122,131,223,162,101, 43, 63,249,106,249,
-170, 62,207, 62,213,173, 23, 0, 44, 93,186,116, 64,120,120,120,132,201,100,138,159, 57,115,230,202,138, 52, 25, 12,183, 12, 86,
-177, 75,199,245,203,103,240,203,207,219,112,252,204, 37,136, 78,197,169, 65,131, 6,106,153, 76, 54, 48, 76,198, 61,215,168, 89,
-155,246,253,158,126,142, 88,136, 10,115, 38, 15,173,244, 60, 88,167, 78,157,146,167,166,166,206,142,172,215,252,213, 78, 61,250,
-115,245,163,235,193,223,207, 7, 34, 39,195,138,223,174,249,237, 93, 50,242, 75, 0,109,220,246, 65, 4,120,113,228, 51, 8,149,
-161,247,143,219,142, 33, 53,215, 6, 66, 0, 66,138, 12, 97,161, 65,196, 27,163,218,191, 83,121,131, 68, 56,111, 21,193,196, 53,
- 6, 0,224,255,137, 39, 51, 56, 56,184,153,159,159,223, 87, 35, 71,142,244,169, 83,167, 78,176, 76, 38, 83, 25, 12,134,218,119,
-238,220,137,252,236,179,207,186, 7, 7, 7,127,144,154,154,186,161, 50,154,209,222,138,234,143,213,171,241,227,180, 49,207,181,
-172, 27, 17, 14,193, 88, 8,209,168, 13,191,125,235, 70,155,185,223,110,120, 49,198, 75, 50,228, 66,158,197,237, 14,137, 10, 15,
-233,155,111, 60, 63, 52,186,150,154,194,116,254, 16, 36, 60, 15,133,167, 15, 90,241, 60, 56, 66,235,191,115, 32,249, 13, 0,239,
-184, 81,233,190, 11,224, 13, 0, 68, 42,149,110, 8, 12, 12,188,218,182,109,219,198,131, 7, 15, 38, 13, 27, 54,196,153, 51,103,
-154,254,252,243,207,163,194,195,195,207, 90, 44,150,223,213,106,245,209, 27, 55,110,184,101,220,106,213,170, 37,211,106,181,173,
- 37, 18, 73,231,127,178,102, 72, 72,136,210,100, 50, 61, 27, 22, 22,246, 82,191,126,253, 26,245,237,219,151,212,173, 91, 23, 87,
-174, 92,105,254,235,175,191,190,211,164, 73,147,115, 73, 73, 73, 75,101, 50,217,119, 41, 41, 41,110, 77, 2, 60,184, 33,185,178,
-246, 60,173, 87,213,237,165,206,145, 55, 0, 37,165, 52,197,141,125, 3, 1,168, 41,165, 55, 31,182,230, 95,244,160,115, 9,128,
-175,253,165,245, 28,199, 57, 94, 96,239,252,105,255,219,102,179,105,239,220,185, 83,211,133,102, 93, 81, 20,221,110, 9, 32,132,
-208,212,212,212, 43,229,214,241,160, 50, 0,152,251,206,100, 36, 39,222,134,222,160,213,231,230,102,173, 40,189, 95,110, 78,246,
-170, 23,134,247,249,159, 76,166,144,132,134,215,192, 27,179, 62,129, 61,234,245,176,152, 53,107, 22,121,231,157,119,176,116,233,
-210,190, 0,226, 40,165, 7,162,163,163, 23,148,186,103, 57,182,189,243,206, 59,243,103,205,154, 69, 0,148,105,132,170, 69, 53,
- 25, 49, 98,200,128, 78,175,191,246,178,198,190, 78,169, 84,224,181,255,141,150,233,141,166, 54,139,190, 94,249,210,252, 57,211,
-150, 1,232, 2, 32,150, 82,122, 2,192,202,138, 52, 25, 12,183, 13,150, 72,129, 95,126,222,134,215,166,191,141,111, 86,124,135,
-239, 62, 28, 77, 98, 99, 99, 59, 80, 74,159,139,136,170, 53,240,201, 97,163,149, 17,181, 27,162, 80,244, 68,124,166,136, 83,191,
-175, 65,233, 39, 31, 87,108,223,190, 61,150, 82,124, 59,118,250,103,245, 26, 55,109,129,243,201, 86, 28, 74,180, 65,123,195, 6,
-129,215, 67, 20, 43, 63,196,220,222,236,215,188,121,115, 36,229, 88,113,224,138, 9, 60, 7,112, 92,209, 11, 93,121, 82,197,156,
- 18, 77,215,102,127,123, 42, 38, 51, 77, 4, 68,211,181,127,218,137, 12, 13, 13,237, 18, 21, 21, 53,239,127,255,251, 95, 80,106,
-106,170,239,241,227,199, 33,151,203,225,227,227, 35,248,249,249,213,155, 62,125,122,222,220,185,115,167, 4, 6, 6,158, 78, 75,
- 75, 75,112, 71,179,129, 70, 22,221,177, 89,204,225, 25, 51,223,241, 50, 29,251, 21, 57,107,214,129,231, 40,164,106, 13, 66,148,
- 74, 44,232, 17,225, 59,109, 79,226,134, 70, 74,101,244, 57,189, 62,217, 29,205,240, 0,223, 30,181,235,214, 67,206,198, 47,113,
- 61,223,136, 35, 25, 70,244,239,216, 18,181,124,149,104, 98,181,193, 79, 33,116,113,101,176, 8, 33, 62, 0,166,153, 76, 38, 78,
- 42,149, 18,133, 66, 49,112,197,138, 21,123,234,214,173,107,176,239,211,186,117,107,180,110,221,154,104,181,218, 38,135, 14, 29,
-106,178,113,227, 70,115,112,112,240,193,212,212,212,121,229,233, 42,149,170, 59, 6,131, 62, 92,165, 86,155,150, 47, 91,182,187,
-117,235,214, 84, 34,145,224,126, 52, 1, 32, 40, 40,104, 67, 68, 68,132,255,156, 57,115, 10, 90,182,108,249, 64, 52, 35, 35, 35,
-119,196,197,197,117,238,209,163,135,208,174, 93, 59,132,132,132, 56,182,249,251,251, 35, 46, 46,142, 36, 38, 38, 54, 62,112,224,
-192,194, 29, 59,118, 44,136,140,140,252, 61, 62, 62,190,135,171,243, 67,129,186,247,179,189, 20, 60,128,185,132,144,101,148,210,
- 67, 21,156,207,102, 0,134, 1,248,240,111,210,172, 16,165, 82,153,102, 48, 24, 2, 0, 64,161, 80,164,235,245,122,151,115,103,
- 17, 66, 52, 31,125,244, 81,128, 84, 42, 5,207,243,176,217,108,142,133, 82, 10, 81, 20, 75,116,134,253,240,195, 15,221,154,219,
-237,238,221,187, 90, 20,141,254,166, 78,139, 88,214,103, 68, 68,132,191, 59,154,201,137,183,225, 97,137,207, 10,244, 80,214,136,
-244,240,158,221,174, 93,187,217,206,219,219, 70,123, 1,200,135, 94,127,247,118,114, 34,252,254,134,186,205,123,217,178,101,207,
- 46, 93,186,180, 63, 33, 68, 91,156,191,141, 94,125,245,213,223, 75,229,121,163,226, 79,109, 72, 72,200, 94, 66,200,214,208,208,
-208,111, 1,220, 19, 29,246,210,120,140,158, 52,238, 69,205,255,217, 59,239,168, 42,174,181,141, 63,123, 78, 47,244, 94, 5, 20,
-164, 8, 54, 64,196,138,189,196,222,141, 37, 38, 26, 75, 98, 55,150,104,236, 81, 99, 76,108,177, 37,246, 30, 77,236,189,247,138,
- 21, 4, 20, 5,164,247,126,250, 57,179,191, 63, 0, 47, 26,133, 3,122,111,242,153,249,173, 53, 11,157, 51,243,204,158,153, 61,
-123,158,121,119, 3,128,121,251,179, 48,119,127, 38,190,235,105,133,169,159,200, 49,108, 80,111,249,230,237,191,143, 4,240, 91,
- 57,237,104, 95, 95, 95, 18, 21, 21,197,153, 43,142, 15, 19,193,186,253,224, 9, 54,111,221,134, 65,131, 6, 35,226,236,134,227,
-157,122, 14,233,216,184, 69,123,232,133,118,136,206, 32, 72,140,163,224,243,244, 96,192,226,197,157, 67,148, 97,152,109,111,104,
-188,115,216,132,227,199,143, 79,170,225, 89,127,201,183,115, 23,243, 30,167,139,176,229,138, 18, 6,117, 62,148, 89,177, 40,206,
-120,138,194,180, 39,200, 75,126,252,136, 97,152,185,198,106,254,245, 28, 0,150, 82, 16, 74, 74,138, 28, 80,252,165,209, 24,140,
-236, 18,170, 45,142,170,233,237,239,159, 43, 50, 0,218,226,168,202,143,253,225,187,153,190, 75,211,201,201,169,157,187,187,251,
-143, 35, 71,142,116,121,244,232,145,153, 66,161, 40,190,117,235,214,165,212,212, 84,123, 27, 27,155,196,254,253,251, 55,177,183,
-183,183,107,209,162,133,236,212,169, 83, 51, 1, 12,175, 76, 51, 64, 46,242,111, 30, 28,112, 99,225,210,159,228, 89,251, 86, 67,
- 19,251, 16, 55,178,148,120,148,173,164,206,166,121,164,159,175, 21,100, 34, 62, 70, 6,218,155,140, 63, 21,247, 67,233,203,172,
-210,115,247,112,180,175,165, 83, 42,160, 82,234,112,252,121,190,242, 70, 65,190, 29,243,240,101,230,212,174,193, 18, 94,102, 10,
- 28, 76, 4, 94, 85,189,158,132, 16, 72, 36,111,159, 30,206,194,194, 2,161,161,161,168, 89,179,166,112,224,192,129,173, 1,172,
-120,151,166, 86,171,113,100, 89, 10, 51, 51, 51, 97,155, 54,109, 8, 33,132,190, 57,129,121, 85, 53, 1, 64, 46,151,119,168, 95,
-191, 62,111,247,238,221, 69,105,105,105,241,159,124,242, 73,150, 68, 34, 97,223,216, 6,110,110,110,248,234,171,175,132,195,135,
- 15,175, 84,211,222,222,190,221,142, 29, 59, 64, 8,121,245,226,126, 19, 55, 55, 55, 56, 56, 56,160,115,231,206,252,222,189,123,
-183,171,232,122,246, 15, 32,209,101,230,169, 95, 0,169,240, 37,210, 47,128, 80, 2,196,188, 25,201,122, 83,147, 82,154, 77, 8,
- 89, 15,224, 0, 33,164,207,219, 12, 17, 33,164, 41,128,253, 0, 58, 81, 74, 51, 42,187,239,229, 53, 69, 34,145, 80,171,213, 90,
-190,105,124,170,170, 89, 62,226, 19, 30, 30,142,192,192, 64,148,255,171, 82,169, 94,205,189, 74, 8,177, 51, 54,127,242,120, 60,
-252,252,243,207,224,241,120, 16, 10,133, 16,137, 68,111,253, 27, 28, 28, 92,213, 50, 36,145, 16,194,212,168, 81, 99, 26,143,199,
- 27,174,209,104, 92,196, 98,113,138,193, 96,216,106,101,101,245,125,120,120,184, 14,128,197,219,230,134, 45,175,169, 84, 21, 43,
- 41,203, 74, 53, 26,149, 78, 42,151,186, 93,187,118,173,246,187,238,185, 90,173, 70,155, 54,109,144, 94, 88,156, 89,182,207,255,
-170,172,187,118,237,154, 91,141, 26, 53,188, 1, 52, 47, 93,117, 57, 57, 57,185, 69,185,255,151,231,114,114,114,114,167,210,127,
-199,188,124,249,210,173,204, 96,149,215,212,104,180, 30, 38, 38,114, 0,192,220,253,153, 80,239,168, 5,241,224,231,248, 60, 68,
- 13, 83, 83, 83, 24, 12,122,239, 9, 19, 38,108, 67,201, 51,113,135, 82,218, 99,194,132, 9, 62, 0,206,187,185,185, 29, 4,144,
-255,191, 46,231,255, 13,154, 31,165,193, 42,173, 82, 46,171, 90, 38, 44, 5, 6, 14, 24, 8,150, 2, 39, 79,158, 4, 91, 82,118,
-155, 37, 41, 45, 80, 20,103, 3, 62,195,130,207, 35,224,243, 0,128, 32, 59,233, 9, 52,197,217, 87,147, 52,206,113,172, 17,254,
-254,228,201,147,161,238,126,141,126,152,187,112, 25,179,249,178, 18,249, 10, 21,178, 34, 15, 35,245,246,166, 84, 86,175, 61,204,
- 48,204, 93,134, 97,238, 53,172, 87, 55,218,209,209,177,218,163,118,179, 20, 48,148, 55, 86, 44, 64, 62,178,232,174,139,139, 75,
- 39, 79, 79,207,197,163, 70,141,114, 11, 15, 15, 55, 45, 44, 44,204, 60,123,246,108,180, 86,171,189,207, 48,204,202,148,148,148,
-150, 59,118,236,144, 77,157, 58,181,189,183,183,183,247,233,211,167, 21,149, 70,174,228,194,122, 67, 62,237,127,163,251,168,113,
-146,200,223,215, 64,252, 36, 28, 27,158,230, 26,238,102, 42,103,170,138,244, 43,164, 50,126,211, 92,181,254,204,148, 16, 39,198,
- 81, 46,128,171,153, 32,204,216,244,138, 68, 18, 62,229, 75,160,209,232, 81,172, 99, 53,145,153,180,120, 82,203,186, 90, 42,183,
-145, 0, 0,159, 97,248, 70, 60,216,185,132,144, 31, 68, 34,209, 44, 66, 8,237,222,189,123,124,195,134, 13, 85, 0,160, 84, 42,
-161, 86,171, 33, 16, 8,160, 82,169,240,226,197, 11,220,188,121, 19,150,150,150, 85,186,174,185,185,185,112,115,115,131,137,137,
-201,123,107, 26, 12, 6,178,102,205, 26, 81, 68, 68,132,232,143, 63,254, 48,155, 50,101, 74,113, 72, 72, 72,194, 39,159,124,146,
- 97,102,102,166,127,240,224, 1,110,220,184,129,188,188, 60, 52,106,212,200, 40, 77,141, 70, 3, 62,159, 15,165, 82, 9,177, 88,
- 12, 62,159, 15,189, 94, 15,150,101, 95,153,174,162,162, 34,228,228,228, 64, 40, 20,226,109, 70,177, 60,101,102,169, 95, 0,161,
-191, 31,191,158, 1,176, 20,154, 66, 29, 52,249, 58,168,203,150, 92, 93,191,137, 63,213,255,253, 49, 37, 85, 40,132,111, 18, 66,
-250, 0,216,255,166,201, 42,103,132,250, 80, 74, 31, 84, 85, 83,171,213, 94, 45, 51, 62, 18,137,196,142,144, 18, 99, 40, 22,139,
-117,106,181,186, 85, 85, 52, 1, 32, 60, 60, 28, 13, 27, 54,228,149,106,150,111,102,195, 86,245,185, 36,132,128,199,227, 65, 44,
- 22,131, 97, 24,132,132,132,160,119,239,222,240,245,245, 69, 98, 98, 34, 78,159, 62,141,168,168, 40, 8,133,194,215,170, 10,141,
- 33, 44, 44,140,231,225,225,113,189, 93,187,118,254, 99,199,142,149,184,185,185, 33, 58, 58,186,198,218,181,107,167, 93,189,122,
-181,123, 96, 96, 96, 80,120,120,120,165,105, 78, 75, 73, 90, 61,160,123,216,103,121,185, 57, 59,106,248,154,207, 85,171,213,120,
-242,228,137,209,251,252,175,202,184,166, 77,155, 38, 80, 74,159, 81, 74,175, 16, 66,234, 38, 39, 39,183,112,118,118, 62, 65, 41,
-149,191,113,205,139,147,147,147, 59, 57, 59, 59, 23, 80, 74, 31, 17, 66, 98, 8, 33, 9, 73, 73,127,157,209,200,194,220, 44,179,
-168,168,216,222,196, 68,142,153,221, 45, 32, 30,252, 28, 99, 91,241,160,211,233,240,226, 69, 60, 60,220, 93,201,158,205,135,130,
- 0,220, 1, 16, 28, 30, 30, 14, 0, 65, 0,226, 18, 19, 19, 29,203, 12, 22, 7, 71,149, 35, 88,111,246, 2,180,171,219, 3, 53,
- 68,188, 94,143, 79,174,184,233,165,165,110,246,254,159,148, 70,162, 75, 34,213, 9, 15, 78,130,101,217,173,233, 70,244,202,187,
-113,227,134, 68,207, 98,243,212,111,231, 51, 27, 46, 40,145,158,150,130,148, 75, 75,161,204,120,178, 69, 42,149, 78,110,211,177,
- 75, 65,117, 78,164,124,143, 70,103, 97,146,191,133,181, 3,212, 90, 90,106,176, 94, 55, 89, 31, 11, 78, 78, 78, 93, 61, 61, 61,
-231, 31, 62,124,216, 77,169, 84,154, 94,187,118, 45,239,204,153, 51,207,180, 90,237,198,212,212,212,157,165,133,206, 97, 62,159,
-191, 0, 0, 76, 77, 77,249, 60, 30, 79, 90, 81, 35,205, 0,115, 97,195, 97,159, 13,186, 58,105,229,111,146,103,143, 31, 96,229,
-254,227, 16, 27, 52,134,200, 92, 77,143,199,133,186,163,165,155,157,239,236, 36, 75,166,160,174, 2,134,192, 74, 42,116, 8, 37,
- 68,114,131, 82, 85,101,105,182,113,117, 99,116, 53, 60,112, 69,175,130,137,169, 80, 4, 0,206,181,253,120,247,149, 58, 92,123,
-248, 4, 18,137,165,208,200,151,236,108, 59, 59,187,198,151, 46, 93, 34, 69, 69, 69,170, 71,143, 30,193,202,202, 10,246,246,246,
- 48, 55, 55,199,147, 39, 79,112,238,220, 57,196,196,196,128, 82,138,122,245,234, 85,233,218,166,167,167,163,160,160, 0, 61,122,
-244,108,157,146,146, 44,177,179,119,208,156, 63,119,246,108,117, 52, 89,150, 37, 0,224,239,239, 15,127,127,127, 65,114,114,178,
-197,209,163, 71, 77, 22, 47, 94,236,100,107,107,123, 71,169, 84,190,102,156,140, 53, 88, 0,160, 82,169,160, 86,171, 33, 20, 10,
- 33,145, 72, 32, 20, 10, 81, 80, 80,128,244,244,116, 20, 22, 22,190,138,184, 25,171,251,234,211,100,123,179,187,127,205, 28,159,
-217, 85,243, 75,247, 90,169,201, 58, 79, 8, 41,187,191,233,165,127,251, 84, 84,213, 87,137,230,107, 17,150,114, 81, 38, 65,117,
- 52, 3, 3, 3,203, 52, 94, 43, 37, 36, 18, 73, 70, 89,228, 74, 34,145, 24, 53, 85, 23, 33, 4, 44,203, 66, 40, 20,162, 94,189,
-122,152, 57,115, 38, 34, 35, 35,113,225,194, 5, 56, 58, 58,162,107,215,174, 16, 8, 4,136,143,143,127,173,125,150, 49, 55, 39,
- 62, 62,126, 90,251,246,237,253, 87,174, 92, 41, 73, 72, 72, 64, 84, 84, 20,204,204,204, 48,127,254,124,241,244,233,211, 61,175,
- 95,191, 62, 27,192,143,149, 94,195,156, 39,251, 75, 13, 46, 26, 52,104,240, 89,155, 54,109,254, 90,174,218,218,154,239,222,189,
-219,174,204,120,149,223,231,127, 69,114,114,114,222,220,185,115,151,251,250,250,174, 40,173, 22,108, 78, 41,149,167,164,164,132,
-237,223,191,159, 0, 64,159, 62,125,168,147,147,211,197,210,188,241,104,197,138, 21,173,162,162,162,232,220,185,115,223, 90,206,
-165,102,164,174,255,113,213,134,229,115,103, 76, 20,125,211, 89,134,207, 67,212, 96, 89, 22, 60, 30, 15, 43,215,109,214,197, 68,
- 62,122, 24, 20, 20,116,148, 82,218,163, 52,154, 89, 4, 32,134, 16, 18, 39, 18,137, 82, 94,188,120,193,185, 7,142, 74, 97,202,
-135,199,223,181, 81,198,163,131, 96, 89,214,209,194,214,217,106,228,167, 29,192,178,128,158, 5,244, 6, 10,165,162, 24,105,209,
- 23, 20, 26,141,198,168,135, 46, 59, 59,123,193,176, 9, 75, 60,239,190,228, 35, 53, 87,131,164,115,243,169, 58, 43,186,119,215,
-174, 93,135,183,105,211,166,160,218, 39, 82,218,243,209, 89,152,228,111,105,227,116,241,187,165,155,112,231,133, 6, 44,253, 79,
- 36,203,192, 2,236, 71, 18,192,114,118,118,246,178,180,180, 92,118,248,240, 97,119,145, 72,100, 26, 27, 27,107,184,120,241, 98,
-138, 78,167, 91, 91,102,174, 74, 77,216,160,128,128, 0,157, 76, 38,131, 66,161, 80,233,116,186,162,119,153, 43,127,169,212, 37,
- 48, 32,224,242,164,149,191, 73, 84, 26, 13,242,149,106,216, 58, 58, 24, 30,229, 42,122, 60, 42, 84, 31,125, 21,225, 50, 21, 52,
- 9,170,229,236, 76, 36,166,160, 0,146, 11, 53, 41,198,152, 43, 0,144,155,154, 51, 46, 65, 97, 8, 26,191, 26, 74,158, 57, 5,
- 0, 75, 59, 39,166,213,152,239,209,113,229, 37,168,249,166, 70, 91, 96, 62,159,175,246,242,242, 82,149, 22,170,200,206,206, 70,
-100,100, 36,114,114,114,176,122,245,106, 68, 71, 71,191,122,233, 86,205, 96,188,122,137, 35, 51, 51, 67, 76, 41, 69, 70,122,154,
-168,186,154,101, 6,171,220,189,195,232,209,163,249,197,197,197,146,242,230,170,170, 6,171, 44, 29,148, 82,104, 52, 26,228,231,
-231, 67,163,209,224,217,179,103,175,204, 85,105, 4,173,106,231,175, 41,212,189,117,189, 42, 71,247, 30,213, 9,215, 0, 8,203,
- 13, 82,104, 95, 93,115,245,134,241,169, 82,244,167,178, 8, 22,222,210,128, 89,169, 84,218, 83, 74, 73,120,120, 56,140,105,127,
- 85,222, 96,137, 68, 34,244,237,219, 23, 17, 17, 17, 72, 76, 76, 4,159,207,135, 74,165,130, 74,165, 66,163, 70,141, 32, 18,137,
-170, 26,193,162, 2,129, 96,208,216,177, 99, 37,113,113,113,200,202,202, 2,195, 48,208,235,245, 48, 24, 12, 24, 62,124,184, 84,
- 36, 18, 13, 66, 21, 27, 98,223,191,127,191,195,181,107,215,188,223, 92, 50, 51, 51,243,197, 98,241, 63,178, 12,220,191,127, 63,
-233,211,167, 15,237,211,167, 15, 45, 51, 90,198,146, 25,247,120,253,206, 61, 7,207,204,156,187,180, 40, 43, 59, 7,114,185, 28,
-153, 89,217,248,110,193, 50,221,133,171,183, 47,142, 30,254,105,232,242,229,203,151, 0,136, 41,221, 37,102,197,138, 21, 67, 71,
-140, 24,177,189,108,184, 6, 14, 14,163, 35, 88,101, 85,132,239,248,178,107, 96, 97,227,124, 97,198,162,223, 76, 14, 60,228, 33,
- 55, 53, 6,170,140, 24,184, 54,236,142,244,152,107,160, 6,221,159,145,145,145,197,149, 29,236,212,169, 83,181, 93,189,131,198,
-215, 15, 12,193,210, 99, 69, 40,138,220, 3, 77,110,220,186, 46, 93,186, 28,124,223, 19, 97, 41, 48,105, 80, 19,127, 75,107,199,
-139,223, 46,249,205,234, 72,132, 0,217, 41, 49,136, 62, 52, 13, 6,237, 95,106,197,142, 87, 85, 95,202,106, 68, 69,121,233,208,
- 20, 26, 32, 97, 20,146,191,251,198, 37, 39, 39, 63,243,247,247,223,246,235,175,191,142,170, 87,175,158,108,252,248,241, 79, 11,
- 10, 10, 22,166,164,164,252, 94,238, 69,222,186,102,205,154, 83,230,207,159,239,249,242,229, 75, 92,190,124,249, 25,143,199,187,
-243, 46,205, 8,165, 50,169,174,185,120,237,213, 93, 27,191,225,185,121, 99,239,220,169,250,235,143,159,116,139, 44,212,159,120,
-101,174, 76, 68,190,161,254, 94, 71,191, 30, 59,138, 49,220, 59,137,232,196, 12,164, 22,235,206, 25,157,238, 66,133, 78, 32,150,
-194,196,193, 29, 9, 42, 86,232,226,226,114,123, 68,207,174, 66,134,199, 7,195, 23,226, 69,158,218,232,151,184, 94,175, 23, 63,
-121,242,132, 0,120,205,220,169, 84,170,119, 70,124, 62, 36,198,106,190,173,125, 20, 0,232,116,186,106,107,150,143,216, 84,118,
- 44,150,101,161, 86, 87,161,175,136, 58,239,237,247, 64,153,165,251, 16,151,173,244,175,232,125,204, 85,153,241, 41,107,128, 46,
- 22,139, 95,153, 20, 99,163, 76, 21, 68,176,170,245,251,219, 12,186, 80, 40,132,143,143, 15, 46, 95,190, 12, 11, 11, 11,152,152,
-152, 64, 46,151, 67, 34,145,192,194,194, 2, 34,145, 8, 12, 83,165, 33, 2,169, 86,171,173,225,226,226,130,103,207,158, 65, 34,
-145,188, 90,196, 98, 49,124,124,124,160, 80, 40,156,241, 81,197,234,255, 59, 12,237,211,182,251,250, 93, 7,134,236, 61,112,116,
-140, 90,165, 10,240,241,246,162, 81,143,239, 61, 28, 61,124, 80, 71,238,234,112,124, 80,131, 85, 65,161,210,192,194,198,249,194,
-180,239,127, 53,219,119,143, 65, 94,106, 52, 18, 78,126, 91,104,208, 42,114, 89, 86,231,150,251,252, 42, 0,108, 53,242, 75, 62,
-184, 73,235,238,204,197, 40, 13,180,133, 41, 40,136,216, 27, 47, 22,139,167,127,136, 19,113, 21, 37,249, 91, 90, 59, 94,156,190,
-248, 55,171, 3, 15,249,200, 73,137,193,243,227, 51,242, 13, 90, 69,235,240,240,240, 87,227,104,217,251,247,192,231,211,150, 99,
-243, 15, 19,141,214, 30, 44, 18,117,239,239,103,209,101,120,243, 20, 24,136, 1,131,158, 68,117,114,106, 78,186,167, 92,161,135,
-254,206,155, 23, 17, 17,241,189,151,151, 23,163,215,235, 63,215,106,181,115, 83, 82, 82,246,151,139, 92,181,115,115,115, 91,186,
- 96,193, 2,151,132,132, 4,209,141, 27, 55,114,238,223,191,207, 26, 12,134, 37, 21,105, 62,202, 87, 79, 13, 48, 21,242,188, 92,
-157,198, 62, 75, 74,234,246,184, 64,127,178,236,183, 0,185,200,191,121,125,223,107, 11,230,126,107,170,185,186, 31,197,169,137,
- 88, 29,158, 86,192, 26,116, 51,140,140,186, 89,185, 9, 41,153, 49,226, 51,182,176,176, 16, 50,145,144, 77,140,126,206, 27,210,
-182,133,225,135,105,147,153,180,180, 52, 40,138,139,249,206,206,206, 86,201,201,201, 57,149, 68, 8,230, 3,104, 93,175, 94, 61,
-180,111,223, 62,126,222,188,121, 81,229,205,199, 63,204, 96,189,245,235, 90,171,213,146,234,106,150,143, 96, 85,102,176,170, 28,
-193, 82, 23,188,221, 72, 41, 50,223,215, 96,189, 36,132,212, 40,251,247,135,184, 7, 42,149,202,174, 92,213, 32, 40,165,213, 14,
-103,149, 70,176,170,253,123,121, 24,134, 1,165, 20, 34,145, 8, 49, 49, 49,112,112,112,128, 94,175,135, 92, 46,135, 76, 38, 67,
-105, 68, 25, 34,145, 8,124, 62,191, 42,201,100, 69, 34,209,203,152,152, 24,111, 75, 75, 75, 24, 12,134,215, 76, 86, 92, 92, 28,
-228,114,121,114, 85, 35, 88, 13, 26, 52, 56, 37,149, 74,221,222, 92,111,107,107,107,254, 79,125,121,149,143, 92,245,233,211,135,
- 78,152, 48,161,202, 26,171,190,255,102, 7,128, 29, 19, 38, 76,216,182,107,227,241,160,160,160,160, 99,190,190,190, 4, 0,184,
- 30,131, 28, 31,196, 96,149, 21, 74,101,127,203,218, 51, 57, 11,147, 26, 88, 88, 59, 93,152,178, 96,131,217,174,187, 12,242, 83,
-163,144,114,118, 86, 62,171, 85,180,102, 24, 38, 53,241,250,175,251, 1, 40,238,221,187,119,201,214,191, 7, 8, 41,233,185,247,
-182,145,220, 75, 11,250,134, 62,181,107, 99, 95,132, 30,170,180,135, 96, 8,221,218,182,109, 91,197,251,158, 68, 96, 96,160,191,
-165,181,227,197,169,139,126,181,218,119,159,143,220, 18, 19,152,207,106, 21,173,147,181, 46,175, 13, 82,202, 18, 96,243, 15, 19,
-193, 26, 81, 12, 15, 39,196,146, 39,151,172, 29,210, 62,184,159, 91, 45, 23,176, 84, 7, 86, 72,209,107,170, 13, 63,230,158,226,
- 96,141,246,188,223,217, 34,118, 76,210,141,191,111,244,241,103,207,158, 45,112,112,112, 56,144,150,150,246,170,117,170,139,139,
- 75, 39,119,119,247, 69,243,231,207,119, 79, 74, 74, 50,189,127,255,126,193,254,253,251,227, 24,134,153,159,154,154, 90,233,215,
-253,227, 66,237,100,127, 19,209,198,136, 34,253,171, 49,116,234,200,133,245, 62, 27, 50,240, 70,219,129,159, 73,158,159,221, 1,
-171,184, 39, 88,121, 47,221,144, 92,168, 26, 24,165,160,105,198,152, 43,177, 88,188,127,245,254,253,207,234,214,173, 75,138,139,
-139,161,211,233,144,149,149,133, 31,119,238,139,164,148,194,210,210, 18,103,207,158,101,199,143, 31,191,223,217,217,185,207,187,
- 76, 86,185, 97, 26, 32, 20, 10,137, 84, 42,245,136,143,143,143,119,119,119, 87,189,205,164,136,197,226, 42, 27, 44,169, 84, 10,
-150,125,119, 16,160, 42,154,122,189,158, 24,179,190, 42,154,101,105, 43,107,220,254,230,250, 50,120, 60, 30, 88,150,173,240, 92,
-254,234,222,222, 17,193, 82,100,188,151,193,162,148,186,149,117,164,249,167, 21,132,165,145, 48, 0, 96,223, 53, 20, 67, 85, 34,
- 88,165,102, 15, 34,145, 8,151, 47, 95, 70,215,174, 93, 65, 41,133, 88, 44,134, 76, 38,131, 68, 34,193,181,107,215, 32, 18,137,
-192,227,241,170, 18,197,162,122,189,126,231, 47,191,252,242,237,226,197,139,165,101,199, 40, 51, 88, 63,253,244,147, 82,173, 86,
-239, 52,198, 96, 17,203, 58,253, 45, 44,173, 6,231,229,101,111,109,226, 99, 81, 97, 47,194,183,237, 83,218, 30,235,191, 78,217,
- 48, 13,148,210,238,111, 14,197, 80,182,205,132, 9, 19,240,230, 16, 14, 21, 13,211,224,228,228,100,185,113,227,198, 17, 44,203,
-214, 41, 93,245,102,111,193,178,251, 88,246,126, 42,235, 85,248, 90, 47, 66, 14,142, 42, 71,176, 24, 2, 56,242, 95,250, 90, 88,
-187, 92,152,180, 96,131,217,182, 91, 60,228,167, 62, 65,214,133,239,242,169, 94,217, 58, 60, 60,252,190, 93,221, 30, 8,105,218,
-186, 89,219, 79,250,192,254,200, 62,220,185,126, 30, 63,174,222,140,111,198,126, 81,225,135,146,157,157, 53,178,174,171,160,203,
-125, 6, 66,200,189,247, 61,129, 70,141, 26,121, 89, 88, 57, 92,156,178,240, 87,171,221,225,124,228,165,252,199, 4,206, 88,115,
-225,254, 87, 35,134,190,182,189,177,211,227, 12, 22,137,186,251,215,118,217, 52,160, 83, 83, 75,115,162,135, 62, 33, 10, 27, 63,
-235,135,240,174, 90, 52,237,111,142, 70,157, 77,225,217, 64,210,239,248,111, 57,109,156,154,147,225,127,103, 52,171,188,185,114,
-114,114,234,234,226,226, 50,239,216,177, 99,110,122,189,222,244,242,229,203,133,251,247,239,127,174,215,235, 87,165,166,166, 30,
- 51, 58, 58, 86,164,121,101,174, 2,204,133, 13,135,127, 62,244,234,248, 21,235, 37,145,225,119,176,116,231, 17,152,241,116,134,
-187,105,170,190, 17, 69,255,169, 62,172, 48,163,241,249, 11,118,239,222, 45,247,243,243, 35,217,217,217,175, 34, 45, 90,173, 22,
-249,249,249, 40, 44, 44,132, 90,173, 70, 64, 64, 0, 51,119,238, 92,249,119,223,125,183, 0,192, 24, 99,211,107,107,107, 11,161,
- 80, 8,173, 86,251,202,164,136, 68, 34, 88, 88, 88, 32, 63, 63, 31,103,206,156, 65,101,131, 83, 10,133,162, 84,134, 33,174, 38,
-166,166, 58,185, 92, 78,229,114,249, 95,182,169,170,102,169,201,201,236,212,169,147,237,252,249,243, 5,129,129,129,175,214,151,
- 85, 17, 86, 71,147, 82,170,104,223,190,189,108,213,170, 85,112,115,115,131, 70,163,121,205, 72, 49, 12, 3,161, 80,136,196,196,
- 68, 44, 92,184, 16,148, 82,227, 63,100, 84,185, 58, 4, 12,181,131, 50, 91, 7,101,182, 14,170, 44, 45,138, 51,116,208, 41, 12,
-255,180, 2,172, 58, 13,208,141,136,132,217,189,111, 4,171,172,186, 82, 44, 22, 35, 62, 62, 30,167, 78,157, 66,104,104, 40,204,
-204,204, 80, 92, 92,140, 43, 87,174, 32, 57, 57, 25, 98,177, 24, 60, 30,175, 74,141,220,107,212,168,241,195,237,219,183,187,142,
- 27, 55,174,206,151, 95,126, 41,245,245,245, 69, 92, 92, 28,150, 47, 95,174,122,244,232, 81,172,165,165,229,124,160,242,121,102,
-157, 93,107,140,223,184,243,168, 96,216,192, 78, 99,129, 98, 24,211,139,240,245,125,254, 55,141,221,223, 49, 76, 67,167,119,108,
- 94,126, 8,135,215,134,105, 40,207,193,131, 7, 61,156,157,157,125, 81,210, 51, 16,248,107,111,193,242,220, 9, 15, 15, 15, 6,
-215,139,144,227, 67, 24,172,210, 2,122, 98, 72,239,153,102, 91,111,242,145,155, 28,129,252, 43,115, 94,153, 43,160,164,225,187,
- 93,221, 30, 48,176, 20,173, 59,246, 46, 27, 20,244,205, 66, 38,160,252,184, 85, 2,137,105,128,158, 10, 1,168,160,207,123, 14,
-145, 72,116,191,170, 9,126, 83,147,101,217,201,141,123,207,180,218,126,135,143,252,148, 39,200,188, 56, 59,159,213, 42, 90, 39,
-106, 92,238,127, 53, 98,168, 81,141,218, 9, 33,109,203,198,244, 24, 44, 18,125, 39,224,145, 89,159,180,104, 40,108,214,160, 54,
-228, 25,241, 72, 75, 74,193,222, 39,153, 57,177,185,234,225,215,136, 22, 9,207,213, 27, 59,143,176,178,178,116, 16,160,203, 40,
-107,171,155, 71, 10, 14, 58,183,102,180, 84, 75, 23,167, 92,165,115,223,212,252, 80, 84,166,233,236,236,236,101,106,106,250,227,
-201,147, 39,109, 69, 34,145, 89,100,100,164,225,192,129, 3,137, 6,131,225,167,212,212,212, 61,213,209,244,151, 74, 93,234,120,
-123, 92, 26,255,243, 58, 73, 81,177, 2,197, 26, 45,156, 92,157, 13,151,238, 69,245,142, 40,210, 28, 50, 70,211,222,222,190,213,
-192,129, 3,235, 5, 6, 6, 50,229,205,149, 70,163, 65, 65, 65, 1, 10, 11, 11, 81, 80, 80,128,130,130, 2, 36, 39, 39,163,105,
-211,166,140,175,175,111,128,189,189,125,171,244,244,244, 11,111,106,150, 27,166,225, 91, 0,140, 76, 38,139,185,126,253,186,170,
-119,239,222,144, 74,165, 40, 46, 46,134,139,139, 11, 88,150,197,149, 43, 87, 16, 19, 19,147, 7, 96,119, 90, 90,218,217,138,210,
-169, 84, 42,106, 16, 66,120,102,166,166,109, 59,116,232, 48,112,248,240,225, 22,229,183,175,142, 38, 0,100,102,102,186, 95,190,
-124,249,187,238,221,187,143,237,216,177,163,108,198,140, 25, 2, 15, 15, 15,232,245,122, 82, 93,205,220,220, 92,243,123,247,238,
- 45,107,214,172,217, 87, 29, 59,118,228, 47, 90,180, 8,230,230,230, 48, 24, 12,144, 74,165, 40, 40, 40,192,252,249,243,113,245,
-234, 85, 61,165,116, 77,126,126,254,148,138, 52, 95, 27, 7,107,210,207,245, 43,202,135,239, 26, 7,235,239,200,243, 74,165,210,
-190,170, 81, 49, 99,210,121,239,222, 61,250,230,120, 88, 21, 69,176,222,166, 89, 22, 93,226,243,249, 72, 75, 75,195,209,163, 71,
- 95, 27, 3,171,108,121, 87, 21,225, 59,210, 73, 47, 94,188,104, 32,132,132,234,245,250,105, 19, 38, 76, 24,174, 80, 40, 92,228,
-114,121,138, 86,171,221,106, 97, 97, 81, 54, 14,150,176, 50, 77,145, 72, 34, 32, 12, 3,169, 68, 46, 85, 42, 51, 19,222,214,139,
-240,141,107,157, 32, 18,217, 91,151,237,243,191,186,239,111, 12,211,240,218, 80, 12,111,236,243,218, 16, 14,111, 14,211, 80, 94,
-179, 71,143, 30,113, 0,162, 41,165, 12, 33, 36,250,205,222,130,229,100,189,195,195,195,131,131,130,130, 46, 81, 74,101,111,246,
- 34,252, 59,242,252,199,172,249,175, 49, 88, 0, 36,215,194,159,130, 17,103,160,240,214,143,175,153,171, 87, 79, 58, 11,220,185,
-126, 30, 44, 11,180,104,223,179, 82, 51,163, 87, 23,199, 46,216,251,162,129, 65,163,132,190, 32, 33,166,227, 39,157, 51,222, 39,
-241,182, 1, 61,225, 42,164,242,171,247, 98,193,151,100, 35,239,230, 15,121,196,160,110, 29, 30, 30,254,160,218,153, 6,152,177,
-238,196,126, 33, 49,183,194,195, 9,195,144,146, 87,140, 19, 47,114,127,167, 10,245,152, 29,180,164, 42,208, 37,148, 92,217, 52,
- 51,109,109,243, 94,230,253,108,156, 5,248,249,155,173,144, 76,183, 22, 54,106,211,226,111,157,163,176,172,225,251,198,141, 27,
- 71, 7, 6, 6,154,124,253,245,215, 79,243,243,243, 95,107,248, 94, 85, 34,148,202, 36,127, 83,209,186, 11,191,254,252,141,212,
- 63, 4,251, 23,206, 48, 92,190, 23,221,227,113,161,230,168,177, 26, 98,177, 56,108,204,152, 49,194,226,226,226,191,152,171, 55,
- 13, 86, 65, 65, 1, 30, 62,124,136, 62,125,250,136,163,162,162,194, 0, 92,120, 71, 4,103,118,233,128,147,124, 27, 27,155,204,
-117,235,214,117,223,190,125,123,175,225,195,135,139,195,194,194, 16, 25, 25,137,219,183,111,171, 53, 26,205,159, 66,161,240, 80,
-124,124,188, 81,173,188, 41,165, 6, 0,167,220,221,221, 47,173, 91,183,174, 59,203,178,175,230,179,124, 15, 77, 29,128,217, 86,
- 86, 86,203,246,239,223,191,244,252,249,243, 3,135, 12, 25, 34,209,233,116,228, 61, 52,245, 0, 38,216,218,218,206, 58,126,252,
-248,214,211,167, 79,247, 24, 60,120, 48, 51,110,220, 56,172, 94,189, 26,127,252,241, 7,107, 48, 24, 14, 9, 4,130,161,153,153,
-153,149,118, 64,121,109, 28,172, 10,198,185,170,236,119, 35,184,251, 95,200,250,239,173,249,102, 36,172, 97,195,134,246,229,123,
-105,150,255,107,108, 4,139, 16,130,160,160,160,215,254, 95, 54, 36, 3,143,199,123,109,169, 74, 21, 33, 0, 11, 74, 41, 11, 96,
- 13,128,213,120,125, 20,119, 30,254, 51,210,187, 81, 56,187,186, 33, 57, 17,214, 89,197,170,188,138, 39,123,182,183,118,118,117,
-251, 59,202,181,188,185,115,231, 46,159, 51,103,206,242, 55,135, 98, 40,191,221,155, 67, 56,204,155, 55, 15,239, 26,166, 33, 37,
- 37, 37,119,238,220,185, 63, 0,128,175,175, 47, 41,173, 22, 12, 66,105,111,193,114,154,219, 80, 50, 85,142,236,203, 47,191, 28,
- 2,224,157,154, 28, 28, 85, 49, 88,223, 22,133,175,212, 1,176, 38,132,204, 72,214,186, 68,254,181, 16, 1,126, 92,189,249,181,
- 73,161, 43,130,199, 99,102,100, 28, 25,182,138, 2,185, 60,130, 25,239,155,120, 75, 11, 51, 24, 10, 13, 51,139,239,173, 98, 41,
-165, 22,132,144,233,119,239,222,141,124,111,103,110,110,133,194,249,163,241, 71, 68, 10, 77, 43,214,245,220,161,121, 61, 82, 83,
-218,230,170,191, 83,115,178,215,210, 73,112, 96, 66,107,107,114, 44,103,200, 63,226,134, 70, 68, 68, 44,242,242,242,226,173, 95,
-191,254,115,141, 70,243, 90,195,247,106,107, 22,106,166, 6,152, 10,121,190, 30,174, 99,163,226, 19,186, 63, 46, 52,174, 90,176,
- 28, 34,103,103,231,199, 10,133, 2,132, 16,168,213,234, 87,198,170,176,176, 16,249,249,249,175,254,175,213,106,145,153,153, 9,
- 15, 15, 15,148, 27, 51,233, 93, 38, 35,181,188, 71,176,180,180, 60,185,106,213,170,129,171, 86,173,106, 3,224,156, 82,169,220,
-157,155,155, 91,173,161, 63, 74,141,206, 94,169, 84,246, 35, 33,196, 89, 44,145,106,174, 94,189,122,226,125, 52,115,114,114, 10,
- 1,140,146, 74,165, 11,126,249,229,151, 85, 18,137, 36, 56, 35, 35,227,189, 52, 75,205, 83,111,107,107,107,167,109,219,182,237,
-219,180,105, 83, 99, 62,159,127,147, 16,210, 55, 47, 47,175,202,147, 61,147,215,191,222,171,252,187, 17,252,241, 95,200,246,239,
-173,105,236,240, 11,198,162,215,235,139,230,204,153,147,241,182,121, 7,203,204, 84,249,117, 90,173,214,168, 97, 78, 28, 28, 28,
-140, 30,139,172,162,161,119, 0,128, 33, 68, 9, 64,250,237,188,101,165, 31,204, 70, 79,246, 12, 2,162,249, 95,150,107,115,230,
-204,161,243,230,205, 35,132,144, 67, 40, 25,143,234,217,155,141,208,203,255, 54,111,222, 60,204,153, 51,135,206,157, 59,183, 82,
-205,168,168, 40, 74, 8, 57, 7, 32, 14, 64,124,121,221,242,235,203,246,169, 72,147,131,163, 82,131,197, 82, 32, 89,235,146, 8,
- 96, 88,249,117,127,125,193,225, 47,109,174, 42,242, 88, 29, 59,118, 60, 7,192,247, 67, 37, 62, 47, 55, 31,196,170, 97, 66,110,
-110,246,224,140,199,135, 62,136, 38, 11,252, 56,188, 81,216, 55, 0, 8, 5,126,126,211, 92,189,246, 21,116,133, 30,114,108, 74,
- 22, 55,106,211, 98, 98,233,203,103,209, 63,225,166,190,173,225,251,251,242,182,134,239, 85,120,217,156, 22,139,197,164,176,176,
- 16, 74,165,242,181,104, 85, 65, 65, 1, 20, 10, 5,138,138,138, 80, 54,181, 71, 81, 81, 17, 76, 76, 76,160,211,233,170,244,165,
- 88,106, 82,214, 5, 6, 6,110, 44,173, 38,121,111,148, 74,133, 11, 0, 4, 6, 6, 10, 62,156,166, 50, 5, 64,175, 15,169,153,
-157,157,157, 2,160,137,167,167,167,200,216,201,162, 43,138,100, 85,247,119, 35, 88,255, 95,200,242, 59,240, 15, 35, 33, 33,193,
-239, 67,107,166,164,164,196,124, 72,189,236,172,180, 13, 95, 13,235, 51,166,108,210,103, 99, 38,123, 46, 51,102, 57,217,105, 27,
-254, 87,215,178,108,154, 17, 0,212,217,217,121,219,203,151, 47,221, 8, 33, 9,111, 70,146,222,252,109,238,220,185,120,215,152,
-127,229, 53, 1,192,195,195,227, 96, 98, 98,162,147, 80, 40, 76, 45,175,251,230,250,138, 52, 57, 56,222,150,209,254,107, 11,128,
-128,255, 39,154,109, 57, 77, 78,147,211,228, 52, 57, 77, 78,147,211,252,251, 52, 63,182,133,225, 44, 38, 7, 7, 7, 7, 7, 7,
- 7,199,135,133, 0, 8,120, 71,100,235,177,209, 34,132, 4, 84, 35,114,246,248, 31,164,105, 87,129,230,217, 74, 52,219, 86, 35,
-157,156, 38,167,201,105,114,154,156, 38,167,249,175,212,172, 76,251,163,233,157,200, 85, 17,114, 97, 94, 78,147,211,228, 52, 57,
- 77, 78,147,211,228,170, 8,185, 42, 66, 14, 14, 14, 14, 14, 14, 14,142,127, 52,239, 28,166,161, 87,221,146,238,195,127, 62,226,
- 58, 76,112, 0, 60, 30,111,113,139, 22, 45,198, 92,189,122,245, 39,157, 78, 55,191, 58, 26,132, 16, 39,123,123,251,239, 41,165,
- 77, 8, 33, 98, 62,159,255, 36, 61, 61,125,145, 78,167,187, 82,221,116, 17, 66, 92, 29, 28, 28,190,103, 89,182, 49, 0, 33,159,
-207,143, 72, 73, 73, 89, 72, 41,189,249, 30,154,102, 14, 14, 14,173, 88,150,117, 41, 57,117, 94, 70,106,106,234, 21, 74,105, 50,
-151, 19, 56, 56, 56, 56, 56,170,109,176,122,215, 33, 96, 0,212, 9,131,227,188,145,132, 63,103, 3, 77, 44,123,241,160,100, 48,
- 54, 95, 0, 81, 0,238, 82, 74, 11,222, 39, 1,255, 95, 52,255,233, 16, 66, 24, 11, 11,139,246, 50,153,108,124, 81, 81, 81, 3,
- 51, 51,179,136,210,233,113,142,150, 14, 74,248, 62,218,118, 3, 7, 14,156,190,113,227, 70,244,235,215,111, 22, 33,100, 57,165,
-180,168, 42, 26,214,214,214,221, 60, 60, 60, 54,172, 90,181,218,182, 89,179,102, 68, 42,149, 34, 42, 42,202,121,204,152,209, 65,
- 78, 78, 78,123, 83, 82, 82,190,170,106,186,108,109,109,251,214,170, 85,107,213,154, 53,107,108,155, 52,105, 66, 4, 2, 1,194,
-195,195, 93,198,143, 31, 31,226,232,232,184, 53, 53, 53,117,114, 85, 53,173,172,172,252,106,214,172,217,113,237,218,181,178,166,
- 77,155, 66, 44, 22,227,225,195,135,166, 35, 71,142,116,118,114,114,122,152,146,146,114,166, 42,122,129, 35,239, 9,132, 50, 45,
- 31, 0,180, 10,161, 62,124, 67, 67,157,177,235,184,226,137,131,131,131,227, 35, 50, 88,125,235, 16, 16, 0,254,205, 48,159,232,
-241, 45, 24,144, 9, 3,201,239,171,127,103,110,183,109,219,214,231,139, 47,190, 32,165, 83, 71,248,237,217,179,167, 55,143,199,
-139,102, 89,246, 22,128, 7,206,206,206,218,178,105, 9,222,164,131, 23,121, 53, 70,214,153,231, 16, 2,168,207, 48, 76, 72,101,
-154,237,106, 65, 75, 8,112,234,217,219, 35,105,237, 61, 9, 64,129, 51, 47,170,166,121, 58,246,227,136,204,153,154,154,122,217,
-218,218, 78,182,182,182,238, 20, 20, 20, 84, 48,106,212,168,248,200,200,200,167, 62, 62, 62,170, 77,155, 54, 45,210,233,116,107,
-107,215,174,125,166,176,176,112,217,123,140,139,229,174,211,233, 16, 29, 29, 13,134, 97, 4, 0, 60, 0, 60,170,130, 65,115,116,
-119,119, 95,127,225,218, 61,187, 2, 13, 15,207, 50, 41, 0, 5, 88,161, 3,214,109,222,107, 57,123,218,216,129,102,102,102, 87,
- 11, 10, 10,246, 86, 65,211,181, 86,173, 90,171, 30, 63,126,108, 39,145, 72,192,178, 44, 10, 11, 11,225,228,228,132, 77,155, 54,
- 89,126,243,205, 55,159,203,100,178,203, 10,133,226, 72, 85,140,121,205,154, 53, 59, 70, 70, 70,202,196, 98, 49,209,235,245, 68,
-173, 86,195,213,213,149,238,218,181, 75, 50,110,220,184,250, 98,177,248,165, 90,173,126,106,148,185,250,245,158,160, 32,235, 66,
- 40, 77, 84,206, 2, 0, 34,145, 46, 12,155,103,117,187, 32,235, 66,163,202,214, 5,254,138, 27,225, 95,114, 38,139,227,127,139,
-163,163, 99,160,165,165,229,254,188,188,188, 75,169,169,169,195, 75,103, 54,120,223,143, 63, 39, 62,159,239, 65, 41,181, 40,253,
-127,158, 94,175,143, 51,102,206,205,119, 97,227,217,170, 43,196,178, 97,160,108,125, 6, 0, 97,152, 7, 6,173, 98, 75, 86,204,
-133, 35,239,165, 41,146,126, 14,208,250, 12,192, 18,134,121,200,234, 21,191,101, 70, 93, 56,193,229, 12,142, 15, 22,193,170, 19,
- 2, 75, 2, 76,155, 49,234, 75,134,207,227,145, 69, 27,126, 29,112,231,250, 17,234, 88,163,254,171, 41, 55,154, 55,111,142,230,
-205,155,147,165, 75,151,250,158, 63,127,222,119,215,174, 93,186,235,215,175,135, 3,216,250, 54, 77, 74,129,150, 29,165, 47,245,
- 58,165,107,211,118, 82,149,123,227,181,187,154, 52,105,206,138,197, 98, 84,164,121,230,250,245,240,118,181,222,174, 89, 34, 12,
-212,106,192, 63,227,220,208,149,132,117,153,157, 96,172,230,187,210,249,255,204, 92, 93, 50, 53, 53,245, 28, 57,114,228,179,209,
-163, 71, 95,150,203,229, 20, 0, 20, 10,133,184,107,215,174,185, 61,122,244,200, 86, 40, 20, 88,183,110,157,235,170, 85,171,206,
-152,153,153, 37, 23, 20, 20, 52,170, 74, 84, 12,192,156,110,221,186,205,250,250,235,175, 81,163, 70, 13,140, 27, 55, 14, 58,157,
- 46,156, 16, 50, 27,192, 18, 99, 6,221,179,179,179,155,179, 98,197, 10,187, 98,157, 0,223,109,143, 69, 78, 81,201,128,162, 50,
- 17,131,175,218, 74, 48,118,236, 56,243,219,183,111, 47,197, 27, 35, 72, 87,132,131,131,195,247,107,214,172,177,149, 72, 36,160,
-148,162,168,168, 8,133,133,133, 40, 42, 42, 66,113,113, 49, 70,143, 30,109, 30, 17, 17,177, 2,192,145, 42,104,182, 90,187,118,
-173, 76, 44, 22,227,204,153, 51,222,106,181,154,167,209,104, 96, 48, 24, 12,181,106,213,138,254,250,235,175,197,143, 31, 63,238,
- 0,192, 40,131,229,152, 6, 65,190, 82,185,230,151, 31,190,177, 5,128,175,167,253,184, 6, 80,134, 80, 35,214, 57,166, 33, 24,
- 0,103,176, 42,206,159, 60, 0, 61, 5, 2, 65, 47, 79, 79,207,160,103,207,158,221,215,235,245,127, 2,248,179,116,122,162,247,
-209,110,227,228,228,244,125, 74, 74,202, 47,148,210, 29,255,150,107,106,103,103,247,231,129, 3, 7, 92,183,111,223,254,217,111,
-191,253,118, 28,239, 49, 74, 62, 33, 68, 0, 32,180, 81,163, 70, 54,189,122,245, 18, 56, 56, 56, 64,161, 80, 32, 54, 54, 86,118,
-246,236, 89, 91,137, 68,146,173, 86,171,111, 84,229, 94,217,120, 55, 53, 1,223,108, 79,104,171,182,205,250,245,238,105,106,111,
-109, 14,165,198,128,103, 9,169, 53, 78, 30, 63,220,210, 41,224,147,235, 90,109,254,128,172,152,107, 69, 85,213,108,213,177, 75,
-179,182,109,218,152,154, 91,152, 35,191, 88,139,231,241,201,110, 23,206, 28,105,238, 24,240,201,101,150,232, 6,167, 63, 58,173,
-224,158, 58,142,170,240,151, 70,238,251, 34,233,219, 30, 20,200, 77,228,111, 21, 48, 55, 55, 71, 88, 88, 24, 22, 45, 90, 36, 0,
-208,248,117, 83,245,159, 97, 19, 24, 0, 6,131,198,113,214, 87, 99, 33,226, 83,241, 39,157, 58, 16, 51, 51, 51,163, 52,121,239,
-208, 4, 0,202, 8, 97,111,165,111, 27,226,173,108,153,254, 96,220,160, 7,151,190, 15,208,168,242, 4,111,106,202,100, 50,120,
-121,121, 97,230,204,153,111, 75,231, 7,239, 18,250,191,208,164,148, 58,249,249,249, 21,174, 88,177,194,123,238,220,185,150, 42,
-149, 74, 14,192,213,179, 78, 35, 23,134, 97, 92, 85, 42,149,217,156, 57,115,108,151, 46, 93,234,109,107,107,155, 71, 41,181,173,
- 98, 58, 23,172, 89,179,102,246,161, 67,135,152,230,205,155,195,210,210, 18,173, 90,181,194,241,227,199,249, 63,253,244,211, 34,
- 0,179,140, 73, 39,195, 48,205,155, 53,107, 70, 88,150, 34,183, 72,135, 11,139, 3,113,237,199, 96, 40, 52, 44,114,243, 10,160,
- 82,169, 32,147,201,164,132, 16, 19, 99,207,157,101,217,198, 77,154, 52, 33, 64,201,200,239, 37, 75, 49, 10, 11, 75,254,106, 52,
- 90, 8, 4, 2, 83, 66,136,184, 10,154, 46, 77,155, 54, 5, 0, 40,149, 74,126,155, 54,109, 72,235,214,173, 73, 97, 97, 33,191,
-108, 26, 31,129, 64, 32, 34,132,240,141,209,212,200, 4,132,165,172,189, 92, 38,181,145,203,164, 54, 44,101,237, 1,192,152,117,
- 26,153,128,252,157,249,147, 16, 98,203,227,241, 54,123,122,122, 62,225,241,120,219, 8, 33, 14,239,163, 73, 8, 9, 38,132, 44,
-146,201,100,103,253,252,252, 18,229,114,249,121, 66,200, 18, 66, 72,104,117, 52, 9, 33, 34,153, 76,118,126,209,162, 69,251,238,
-223,191,223,239,220,185,115, 30,143, 30, 61,234,189,116,233,210, 61, 38, 38, 38, 87, 8, 33,178,247,121, 54, 61, 60, 60, 54,221,
-186,117, 43,184, 73,147, 38, 27, 43,202, 67, 85,209, 36,132,240, 8, 33, 13, 72,217,252, 56,255,128, 50,164, 60, 46, 46, 46, 78,
-254,254,254,174, 98,177, 24,205,154, 53, 3,165, 52,236, 61, 53, 67, 71,141, 26,229, 48,105,210, 36,193,131, 7, 15,176,113,227,
- 70, 28, 58,116, 8, 25, 25, 25,232,210,165,139,176,117,235,214, 14, 98,177, 56,180, 74,154,124,179, 61,227, 39, 76,236,248,205,
-184, 17,166, 15, 95,106,177,229,236, 75, 28,188,145,138, 12,133, 8, 93,123, 15, 53,239,208,189,127, 7,145,216,124, 79, 85, 53,
-167, 79,155,214,241,203,207, 63, 53,141, 76,101,113,248,102, 26,110, 70,231, 67, 47,176, 64,231,222,195, 45,235, 55,237,248, 9,
- 31,130,173,255,132,123,244,177,107,254, 43, 34, 88,115, 54,210,220,249,163,201, 15,139,214,253, 58,139, 33,132,186,212,238, 16,
-233,225,213,184,152,101, 89, 40,149,202,178, 23, 13,148, 74, 37, 18, 18, 18,112,235,214, 45,152,155,155, 87,120,160,147,177, 20,
- 11,191,250,207,225,242,242,243,225,236,226, 1,153, 76, 86,169,230,137, 10,170,243,248,180, 36, 26, 50,162, 79, 15,254,203,212,
- 84,254,245,123, 23, 2,247,174,220, 21,232, 90,171, 93, 84,253,176,169,143, 77,204,107, 40, 31, 60,120,128, 27, 55,110, 32, 55,
- 55, 23,141, 26, 53,250,104,110, 30, 33, 68,183,108,217,178,123, 41, 41, 41,228,234,213,171,245,231,175,216,229,241,168,160, 38,
- 47,179,136, 10,108, 77, 94,122,248,201,158, 26,242,243,243,227, 38, 79,158,124,193,193,193, 65, 61,118,236,216,150, 70,234, 74,
- 0,248,244,233,211,103,250,152, 49, 99, 16, 27, 27,139, 17, 35, 70, 40,111,223,190,157,221,164, 73, 19,235,223,126,251, 77, 58,
-105,210, 36, 92,186,116,105, 14, 33,228, 0,128, 56, 74,233, 59,231, 82, 99, 89, 86, 36,149, 74,129,130,146, 15, 85,173,190,108,
-110, 90,160,184,184, 24,124,228, 65, 36, 18, 49, 0,108, 1, 24,251,229, 41, 20,139,197,175,204, 85, 82, 70, 33, 18, 50,138, 80,
- 88,164,134, 82,169,131, 70, 5,136,205,236,121, 64,162, 53, 0, 99, 27,167,243,196, 98, 49,244,122, 61,180, 90, 45, 84, 42, 21,
- 84, 42, 21,212,106, 53,242,243,243, 81, 88, 88, 8, 62,159, 47, 3, 96, 6, 32,167, 82, 49,145, 84,207, 99,132,139,190, 93,184,
-102, 46, 0,240, 24,225, 34, 19,168, 88, 99,214,241, 68, 82,253,223,152,175,196,182,182,182, 23,246,237,219,231,231,229,229,133,
-184,184, 56,223,190,125,251,134, 16, 66, 26, 80, 74, 21, 85,212,146, 49, 12,243,195,176, 97,195,198, 12, 28, 56,144,212,174, 93,
- 27,124, 62, 31,122,189,222, 37, 54, 54,182,213,239,191,255, 62,141,207,231,255,102, 48, 24, 38, 27,219,174,143, 16,194,136, 68,
-162,189, 27, 54,108,104, 17, 18, 18,130,109,219,182,225,246,237,219,108,112,112, 48, 51,100,200, 16,184,185,185,133, 12, 25, 50,
-228, 32, 33,164,115,117, 34, 89,132, 16,183, 65,131, 6,185,242,120, 60, 52,105,210, 68,120,253,250,245,134, 0,174,191,231, 53,
- 53,113,113,113,185, 20, 22, 22,214,224,236,217,179,247, 8, 33, 97, 85,105,199,232,228,228,212,221,222,222,126,169,169,169,169,
-165,177,251, 20, 21, 21, 41,210,211,211,167, 36, 39, 39, 27, 53, 31, 41,165,180,113, 64, 64, 0,146,147,147,225,233,233, 9,161,
- 80, 24,234,236,236, 60,146, 82,218,145,101,217,153, 85,105, 98, 64, 8,113, 10, 13, 13,181, 9, 11, 11, 35, 75,150, 44, 1, 0,
- 8, 4, 2, 24, 12, 6, 48, 12, 3,129, 64, 0, 95, 95, 95,242,226,197, 11, 43, 66,136,147, 49,213,133, 54,158,173,186, 54,105,
-211,177, 89,139,144,122,204, 79,251,159,193,192, 26,192, 35,122,240, 9, 11, 86, 39,134, 88,200, 67,109,255, 32, 94,116,196,195,
- 16, 27,239,118, 93,179, 98,206, 28, 49, 70,179, 99,215,110,205,253,124,106, 51, 43, 15, 62, 71, 94,242, 19, 67,114,212,229, 44,
-134,199,192, 47,176,181, 77,237, 58, 13,120, 13, 66,194, 4, 41,113, 17,173,172,188, 90,182,205,121,118,137, 51, 21, 28, 85, 55,
- 88,132, 16, 74, 41,125,245,101, 53,123, 29,157,109, 99, 73,220, 35, 31, 63,100, 18,211, 52,197, 15, 31, 62,132,181,181, 53,236,
-236,236, 96,102,102,134,232,232,104,156, 61,123, 22, 49, 49, 49,160,148,162, 65,131, 6, 85, 58,112,122, 90, 26,178,115, 10,223,
- 91,243, 68, 44,197,130,209, 37,201,174,225,232,136, 26,142,142,252,172,220, 60,220,120,248,200,239,200,111,109,125,210,153,145,
- 91,148, 74,229,171,237,117,186,143,175,214,197,222,222, 94,255,213, 87, 95,231,124,185, 54,174,214,128,214, 78,188,238,161, 14,
- 56,120, 61,149,183,231, 34,143,206,254,162, 94,230,179,103, 79,141, 62,105,145, 72,244,125,167, 78,157,190,161,148, 10,198,143,
- 31, 15, 0, 24, 58,116,104,193,205,155, 55,107, 83, 74, 51, 8, 33, 78, 95,124,241,197,211, 11, 23, 46,200, 38, 78,156,200,211,
-235,245,145,124, 62,159, 18, 66,230, 83, 74,231,190, 53,147,241,249,247, 31, 60,120,224, 14, 19, 55,216,152,242,208, 97,214, 61,
- 0,128,137, 24,200, 76, 75,194,173, 71, 23, 97,109,109,109,222,188,121,243, 40, 47, 47, 47,117,106,106,234,248,226,226,226,173,
- 21,102, 92, 62, 63, 34, 60, 60,220,197,197,197,165,196, 96,101, 41,177,229, 6, 3,133, 90, 10, 64, 10,194,202, 97,102,231,110,
- 90, 91, 91,240,192,214,214, 86,171,209,104,166, 23, 20, 20, 84, 88,213,195,227,241, 50, 30, 63,126,108,234,234,234, 10, 0,186,
-131, 7, 15,242, 53, 26, 13, 40,165,134, 99,199,142,117, 76, 76, 76,108,224,225,225,193,184,184,184, 76,247,242,242, 82, 38, 39,
- 39,143, 80, 42,149,239,172, 66, 57, 57,206, 83,219,114,238,197,181,121,113,137,191, 3,128,115,136, 95,206,209,185, 13, 53, 45,
-231, 22, 85,186,238,228, 56, 79, 45,198,254,109,237, 4,135,125,251,237,183,126, 86, 86, 86, 24, 53,106, 20,230,205,155,135,217,
-179,103,123,141, 26, 53,234, 75, 0,203,171,240,146,149, 58, 56, 56,220, 89,185,114,165,111,211,166, 77,113,252,248,113,236,222,
-189, 27, 47, 94,188,208,123,120,120,240, 67, 66, 66, 48,103,206, 28,116,232,208, 97,196,216,177, 99, 91, 18, 66, 26, 26,105, 58,
- 62,159, 51,103, 78,247,102,205,154,225,179,207, 62, 83, 95,188,120,177, 31,128,211,103,206,156,105,125,233,210,165,253, 59,119,
-238,148, 46, 90,180,168,237,164, 73,147, 70, 1, 88, 93,141,243,239,209,162, 69, 11, 0, 64,179,102,205,176,116,233,210, 14,239,
- 99,176, 8, 33, 34,107,107,235, 99,219,182,109,107,224,237,237,141,193,131, 7, 55,236,215,175,223, 49, 66, 72, 59, 74,169, 81,
-243, 70, 58, 58, 58,254,176, 97,195, 6, 79,169, 84,106,244,113, 53, 26,141,213,200,145, 35,151, 0, 48,202, 96,177, 44,219, 56,
- 32, 32, 0, 7, 15, 30,196,200,145, 35,225,231,231, 87,175, 65,131, 6,235, 7, 13, 26,132, 81,163, 70,181,177,181,181,181, 47,
-157, 92,188,242, 23, 11,159,239,209,165, 75, 23,193,159,127,254, 9, 0,104,209,162, 5,218,182,109,139,199,143, 31,227,234,213,
-171,224,241,120,144,203,229,104,218,180,169, 40, 37, 37,197, 3, 64,165, 6,139, 17,203,134,117,239,210,217,244,240,205, 84, 24,
- 88, 61,130, 60,205, 16,226,107,135,232,164, 2,132, 63, 73,130, 65, 35,132,153,149, 53, 66, 91,182,183, 74, 75,126, 49, 12,198,
- 52, 15, 16,203,134,245,234,254,137,201,225, 27, 41,200, 75,137,162,207,110, 31, 56,175, 83, 21,143, 0,128,187,231,246,172,119,
-176,150,182,171, 29, 24,196, 11,107,215,205,242,207,221,105,195, 0,112, 6,139,227,253, 34, 88,101,100,231, 65,105,237,224,135,
-196,180,251, 37,255,207,206, 70,118,118, 54,106,214,172,137, 85,171, 86,189,182,173, 74,165,170, 86, 2,254, 27,154, 54,150, 22,
-232,214,170, 37,239,113,244, 58,158,146, 85,126, 16,205,127, 42,165,147,150, 50, 9, 89, 58,139,204,124,173,176,127, 43, 87, 42,
-224, 49, 24,208,170, 6,249,229, 72,130, 48,163, 88, 96,193, 48, 76, 2,203, 86,222,145,144, 16, 34,232,222,189,251, 55,123,247,
-238, 21, 68, 69, 69,161, 86,173, 90,208,106,181,184,121,243,102, 18,165, 52,163,244,120, 41, 60, 30, 47,133,101, 89,175,250,245,
-235, 99,241,226,197,240,245,245, 37,157, 59,119,158, 86,106,178,254,114,160,148,148,148, 69, 95,127,253,117,139, 95,183,236,177,
- 30,220,152,160,176, 80, 13,133, 66,129,232,199,119, 80,156, 94,140,245,235, 55, 64, 38,147, 17, 0,194,180,180, 52,225,164, 73,
- 19, 55,186,184,184,116, 73, 74, 74,234,245,174,180,166,164,164, 44, 28, 59,118,108,200,246,237,219, 45, 75,218, 93, 41, 81,168,
- 20,227,214,207, 37, 17,202,144, 73,183,241,219,175, 27,153,186,238,114,235,194,194, 66,140, 24, 49, 98,165,163,163, 99,211,212,
-212,212,145,239,210, 76, 77, 77,189, 50, 98,196, 8,231,223,127,255, 93,226,229,229, 21,147,159,159,143,156,156, 28,102,231,206,
-157, 99, 29, 29, 29,205, 15, 30, 60, 68,228,114, 57, 0,240,226,227,227,133, 95,127,253,213, 94, 7, 7,135,157,105,105,105,159,
-189,235,222, 0, 80, 19,130, 84, 39,167,154,158,138, 27,204, 92, 39, 39,213,213,139,115,146,183, 19,130,212,146,109, 64, 29, 55,
- 56, 14,122,185, 77,220, 76,173,102, 87,164,165, 37,196, 80, 10,138, 57,127, 95, 39, 12, 27, 27,155,177,221,187,119,199,146, 37,
- 75,112,228,200,145, 73, 86, 86, 86, 63,207,155, 55, 15, 78, 78, 78, 95, 19, 66, 86, 84, 97,178,219, 31,151, 47, 95,238,235,235,
-235,139,161, 67,135,106,206,158, 61,251, 45,128,131, 0, 18,174, 92,185, 82, 99,235,214,173, 93,247,238,221,187,100,229,202,149,
-146,213,171, 87,123,246,238,221,123, 5,128, 47,140,248,160,152, 56,112,224, 64, 44, 91,182, 12, 23, 47, 94,236, 77, 41, 61, 94,
-246,189, 69, 8,233,186,104,209,162,115,179,102,205,194,242,229,203,199, 87,213, 96, 17, 66, 76,252,252,252,190,235,216,177, 35,
-174, 92,185,130,230,205,155, 35, 52, 52,116, 18, 33,100, 21,165, 52,171, 26,230,138, 49, 49, 49,217,187,101,203,150,230,238,238,
-238, 88,184,112, 33,190,249,230, 27,108,218,180,169,249,224,193,131,247, 18, 66,122, 25,211,203,215,196,196,196, 68, 42,149, 98,
-201,146, 37,244,229,203,151,185, 70, 24, 50,203,239,190,251,142,152, 87, 86,181,240,159, 8,153, 84, 44, 22, 55,241,241,241,193,
- 79, 63,253,132, 43, 87,174, 96,220,184,113,240,241,241, 65, 82, 82, 18,186,117,235, 38,123,250,244,105, 31, 0, 91,140, 44,151,
-204,173,173,173,145,145,145, 1,129, 64,128,166, 77,155,226,224,193,131, 80,171,213,176,179,179, 67, 94, 94,222,171,218, 4, 62,
-159,111,110,100,105, 23, 96, 99,101,142,140,136,100,240,161, 71, 96,109, 27, 92,120,156, 13,173,142,133,157,181, 5,210, 50,210,
-209, 56,192, 5, 26, 77, 13, 80,202, 26, 53, 19,136,136,199, 4,138, 37, 82,228, 20,102, 33,249,201,197,108,173, 65, 61, 50,239,
-197,213, 68, 0,176,170,213, 98,228,221,171,103,238,246,253,164,133, 93, 81,177, 43, 8,101, 27,129,131,163, 10, 84, 58,208,232,
-219, 94,204,229, 35, 66,101,104,181,218,247, 74,200,127, 67,243,109,252, 55, 52,255, 1, 38,139,117,182,228,231,203, 37,140,254,
- 76,120,134, 65,167, 55,224,212,221, 52,131, 76, 76,244,150, 98, 77, 1,203,178,148, 16, 66,141,208,209,157, 58,117,106,219,184,
-113,227,240,243,207, 63,227,233,211,167, 16, 10,133, 8, 8, 8,112, 44,107, 31, 69, 8, 49, 15, 12, 12,180, 99, 24, 6,209,209,
-209,248,233,167,159,240,249,231,159,211,235,215,175,111,122,215,139,130, 82,122, 63, 53, 53,117,195,148,241, 35,243, 24, 69, 34,
-228, 52, 11,218,156,167, 96,149,153,248,118,206, 34,196,101,179,184,247,162, 16,247, 94, 20, 34, 75, 35,199, 79,191,108,230,249,
-251,251,119, 21, 8, 4, 29, 42, 72,235,205,212,212,212,109, 19, 39, 78,204,203,200,200,120,101,156,181,122, 22, 90,253,235,201,
- 48, 53, 53,197,250,245,235, 45, 92, 93, 93,251, 8, 4,130, 86, 21,104, 38,167,164,164, 60, 26, 51,102,140, 58, 53, 53, 21,249,
-249,249, 56,125,250,116, 59, 23, 23, 23,243,185,139,150,147,184,108,250, 42,157, 69,196, 26,155,119,254,201,171, 93,187,246,167,
- 2,129, 32,180,226,151,151,179,167,159, 95,173,125, 55,111,222,252,204,211,211,115, 76,153,177,162, 20, 20, 0, 60, 60, 60, 70,
-133,135,135,127,222,160, 65,157,125,246,246, 14, 62,127,103, 94, 34,132,180,234,223,191,191, 15,203,178,216,183,111,223, 35, 74,
-233,242, 3, 7, 14,220, 81,171,213, 24, 48, 96,128, 7,128,142, 70,234, 4,127,250,233,167, 99,154, 55,111,142, 9, 19, 38,104,
-207,158, 61, 27, 72, 41,253,153, 82, 26, 79, 75, 72,160,148,174,186,116,233, 82,253,177, 99,199,170, 27, 53,106,132,207, 62,251,
-236,115, 66, 72,243, 74,116,155, 12, 28, 56,208,151,101, 89,236,217,179,231, 97, 57,115, 85,118, 15,207,239,223,191,255,166, 70,
-163,193,160, 65,131,106, 18, 66, 90, 87,225,220,133, 98,177,120,223,130, 5, 11, 44,146,147,147, 49,100,200, 16,117,116,116, 52,
-230,206,157, 43, 53, 55, 55, 63, 94, 81, 27,193,119, 6, 72,196,226, 95,215,173, 91,215,189,110,221,186, 24, 61,122,180,102,237,
-218,181,227,198,140, 25,163, 9, 12, 12,196,154, 53,107,186,139, 68,162, 95,171, 20,249, 79, 79,207,187,120,241,162,117,101, 75,
- 90, 90, 90,186,145,209,111,153,151,151,215,141,218,181,107, 23,248,249,249, 5,233,245,122, 60,125,250,244,249, 31,127,252,193,
-250,248,248, 96,235,214,173, 88,191,126, 61,218,180,105, 3,134, 97,250, 84, 37,173,197,197,197,144, 72, 36, 16, 10,133, 8, 15,
- 15,135, 90,173,134, 76, 38,131, 68, 34, 1,143,199,131,133,133, 5, 76, 77, 77, 1,128, 26,119,127, 64, 11, 20, 58, 8, 4, 12,
-248, 12,139,168,132,124,104,117, 44, 36, 66, 30, 4,124, 2, 80, 22, 22,114, 1, 36, 34, 30, 24, 66, 88, 35, 53,145, 95,172,133,
- 72,200, 64, 32, 20, 17, 70,111,120, 21, 34,100,248, 6,169, 84, 42, 34, 54,102, 98, 72,132,220,152,220, 28, 31, 56,130, 5, 0,
- 6,195, 95,123,233,190, 45, 10,164,209,104,222, 43, 33,255, 13,205,119,132,205, 63,170, 27, 88, 80, 80,192,191,113,227,134,169,
- 80, 40, 20,119,111, 16,146,181,244,247,167,182,243,118,198, 64,204, 7,233,228, 79,211, 79, 28, 63, 34, 42, 44, 44,180,241,241,
-241,201, 54,242, 62,140, 32,132, 44, 4, 80,135,207,231, 31,221,178,101, 11,217,177, 99,135,229,192,129, 3, 99, 9, 33,201,254,
-254,254,110, 91,182,108, 49, 3,128, 85,171, 86,209,189,123,247,118, 0, 16, 65, 41, 77,171, 72, 55, 53, 53,117,150, 88, 44,190,
- 30, 29, 29,189, 74, 32, 16, 88,152,153,153, 89, 94,186,116,137,164,231,107,241,221,246, 23,175,122, 22,202,197, 60,204,232,101,
-135, 97,195, 62,231, 71, 70, 70,254, 8,224,212,187, 52,147,147,147, 39,201,100,178, 75,143, 30, 61, 90,110,234, 92,207,202, 38,
-116,146, 89,235, 25, 37,213,143, 14,150, 34, 48,165,101, 98, 94, 94, 30,178,178,178, 48,105,210, 36,139,201,147, 39, 79, 5,112,
-161,130,116,158, 22,139,197, 9, 17, 17, 17,237,249,124,190,216,196,196,164,193,141, 27, 55,200,203, 60, 29,102,108,125,142, 66,
- 85, 73,109,171,169, 68,128,121, 3, 93, 48,118,236, 88,126,108,108,236, 15, 0,154,189, 77,207,217,217,217,203,207,207,111,223,
-174, 93,187,252, 86,172, 88,145,243,236,217,179, 98, 39, 39,167,121,111,108,166, 94,188,120,113,246,246,237,219,189,135, 12, 25,
-178,207,193,193,161,223,123, 12,169,241, 94,152,153,153, 45, 25, 57,114, 36,246,238,221,139,220,220,220, 21,165,121,108,249,174,
- 93,187,246,140, 24, 49, 2,219,183,111, 95, 66, 8, 57,105, 68, 20,171,211,128, 1, 3,112,226,196, 9,156, 59,119,238, 59, 74,
-105,228, 59, 76,237, 83, 66,200,180, 67,135, 14,173, 28, 56,112, 32, 54,111,222,220, 17, 64, 69, 3,207,182,235,208,161, 3,142,
- 31, 63,142,236,236,236, 53,111,219, 32, 47, 47,111,237,225,195,135, 27,119,232,208, 1,139, 23, 47,110, 7,224,188, 17,230,202,
-215,220,220,124,203,202,149, 43,131,235,214,173,139, 79, 63,253, 84,165,213,106, 59,126,243,205, 55, 71,118,239,222,109,186,109,
-219,182,160, 47,191,252,242, 22, 33,100,184,177,131,216,242,120,188, 69,171, 87,175,254, 34, 44, 44, 12,147, 38, 77,210,159, 58,
-117,170, 27,165,244, 52, 33, 36,118,234,212,169,199,126,250,233, 39,222,178,101,203,190,224,241,120,153, 6,131,225,219,191,229,
- 11,155, 97, 22,204,159, 63,191,113,139, 22, 45,144,144,144,128,123,247,238, 65,175,215,111,191,123,247,238,229, 22, 45, 90, 44,
-208,106,181, 71, 36, 18,201, 80, 19, 19, 19,127,127,127,255,214,246,246,246,178,244,244,116,133, 17,215, 51, 47, 54, 54, 86,110,
-103,103, 7,129, 64,128,135, 15, 31,194,206,174,100,202,215,140,140, 12, 4, 4, 4,128,199,227, 33, 47, 47, 15, 0,242,141, 51,
- 67,204,163,216,248,148,154, 86,166,114,192, 32,193,253,232, 36,216,218, 88,194, 64, 24,164,165,165,162,129,143, 11, 8, 33,200,
-203, 78, 3, 33,196,168,185,116, 13,148, 13,127,153,146,225,108,109, 42, 70,221,198,237,173,111,156,204,220, 97, 94,171,217,151,
-124, 30,225,137, 37,102, 27,190,248,236, 51, 27,150,165,200,203, 78, 7,159, 97,110,115,150,129,227,131, 26, 44,150,101, 33,149,
- 74, 95,139, 48,189, 25, 5,146, 74,165, 80,171,213, 85, 58,176, 84, 42,133, 86,143, 15,170,105,204, 49, 63,180,230,223,137, 94,
-175, 55,157, 60,121,114, 72, 72, 72, 72,114,155, 54,109,226,188,189,173, 18,187, 52,150,218,172,220,116,160, 65,231,150,117,239,
-229,229,100,100,189, 48, 51, 83,199,199,199,219,253,246,219,111, 33, 58,157, 78,102,100, 68,236, 37,128,151,132,144,181, 29, 59,
-118,252,170,111,223,190,136,140,140,180, 83, 40, 20,118, 50, 89,137,196,142, 29, 59,176,119,239,222,159, 41,165, 70, 15,188,169,
- 86,171, 79, 2,240, 36,132, 88,212,168, 81, 35,221,202,202, 74,152, 90, 84,252,170,103,161,144,207,160,233, 55,119,144,155, 87,
- 0, 27, 27, 27,152,154,154,122, 84,166, 89, 58,206,213, 17,175,118, 83,235, 41, 31,109,184,184,117,203, 22,115, 0,224, 49, 4,
-182,230, 66,228,229,229, 33, 51, 51, 19, 89, 89, 89, 96, 24, 6,122,189,222,207,136,116, 62, 5,240,148, 16,226,212,186,117,235,
- 5,166,166,166, 96,115,138,145, 91,164,125,173, 10,178,168, 72, 1,119,119,119,152,154,154,190,181, 58,194,202,202,202, 84, 44,
- 22,111,221,184,113,163,175,169,169, 41,111,196,136, 17, 22, 35, 70,140,104,246, 46, 51, 38,147,201,120,155, 55,111,174,221,160,
- 65,131, 45,238,238,238,237,226,227,227,243,255, 87,121,169,116,200,131, 81, 83,166, 76, 9,146, 72, 36,248,229,151, 95, 94, 0,
-216, 89,250,243,190,181,107,215,206, 30, 56,112,160,207,184,113,227,252,103,205,154, 53,169,180,170,240,157, 99, 36, 9,133,194,
- 64, 63, 63, 63, 28, 56,112, 0, 0, 14, 84,114,248,253,215,175, 95, 95,217,165, 75, 23, 72, 36,146,224, 74,182,245,112,117,117,
-197,161, 67,135, 0,224,254, 59,182,185, 31, 29, 29,141, 94,189,122,129, 16,226, 97,196,185,119,111,223,190,253,254,197,139, 23,
-243, 77, 77, 77,241,197, 23, 95,104,110,221,186,213,153, 82,122,153, 16,210,106,208,160, 65,151,118,238,220, 41,191,116,233,146,
-239,247,223,127,127,157,199,227, 45, 50, 24, 12,179, 42,209,252,124,225,194,133, 51,122,244,232,129,121,243,230,209,223,127,255,
-253, 83, 74,233,233,210,231,235, 20, 33,100,136,165,165,229,206,153, 51,103,146,252,252,252, 25,132,144, 36, 74,233,186, 10,242,
-121,190,193, 96,112, 80, 40, 20, 70,125, 33, 26,187,189,181,181,117,167, 22, 45, 90,224,199, 31,127,196,184,113,227,176,117,235,
- 86, 10,224,104,106,106,234, 67, 0, 45, 74, 34,176, 78,166,225,225,225,254,205,155, 55, 23, 62,122,244,232, 19, 0,191, 27, 81,
- 54,197, 95,184,112,193,174,115,231,206, 66,153, 76, 6,131,193,128,236,236,108,168, 84, 42, 4, 4, 4,160,113,227,198,200,200,
-200,192,209,163, 71,181,121,121,121,241, 70,149,119,154,226,109,103,142,253,217,170,235,128,145,230, 82, 33, 15, 6,157, 8,233,
-233,153, 40, 52,232, 17,232,231,134,230, 13,106, 32, 33, 93,137, 83, 71,255,204, 45, 44, 84,108, 51, 70, 83,167, 86,108, 57,123,
-242, 72,203,230,157, 6,153,203,125,252,225,225, 56,174,193,221,235,103,207, 72, 68, 2, 50,104, 96, 63,139,166, 13,189,240,240,
- 69, 1, 78, 28, 61,144,155, 95, 80,176, 5, 28, 28,213, 49, 88,229, 27,184,151, 35, 99,210,164, 73,118,147, 39, 79,134,153,153,
- 25,178,179,179,161,211,233, 94, 69,155,196, 98, 49, 44, 44, 44,144,157,157,141, 61,123,246, 0, 64, 70,197, 95,116,162,212,133,
-107, 86,187, 18,158, 92, 35,150,202,168,149,236,253, 53, 1, 64,163,227,103,172,219,243,135, 85,167, 22,161,252, 26,142,142,111,
- 11,211, 87, 89,243,255, 3, 90,173,246,116, 92, 92, 92,240,128, 1, 3, 50, 93, 93, 93,149, 42,149, 10, 74,165,178,240,232,238,
-149,181,156,205, 70,191, 96, 24,134,154,154,154,178,118,118,118,249,231,206,157,179,211,235,245, 23,171,120,136, 73,253,250,245,
- 99,206,158, 61, 59,106,204,152, 49,196,203,203, 11,225,225,225,248,229,151, 95,232,182,109,219, 86, 2,152, 94,205,164, 23,169,
-213,234,215, 34, 32,229,123, 22, 22, 21, 21, 65,163, 76,135,174, 10, 61, 18, 98,207,254, 24, 93,179,102, 77,157,191,219,127,134,
- 19,201,205,205, 69,102, 86,214, 43,131,149,153,153, 9, 0, 85, 9, 97, 22,252, 53,157,255,169,121, 40, 46, 46,134, 74,145, 6,
-131,193,240, 86,205,156,156,156, 66, 39, 39,167,213,171, 86,173,250,105,193,130, 5,118,203,151, 47,207,137,138,138, 42, 96, 24,
- 70,245,198, 71,140,196,211,211,211,116,217,178,101,246,171, 86,173,202, 97, 89,118,245,255,216, 92,245,168, 91,183,238,214, 78,
-157, 58,153,142, 25, 51, 6,171, 86,173, 66,106,106,234,116, 74,169,190,180,108, 96, 9, 33, 83,215,172, 89,115,116,218,180,105,
-208,106,181,203,142, 31, 63, 62,143, 16, 50,138, 82,186,243,109,154,182,182,182, 46,124, 62, 31,247,238,221, 43,160,148, 62,175,
-196,208,167,121,123,123,167, 19, 66,236, 29, 29, 29,107, 85,180,173,149,149,149,167,169,169, 41,146,147,147, 1, 32,238, 29,155,
-197,167,164,164, 80,145, 72, 68,156,156,156,188, 42, 59,127, 75, 75,203,169, 27, 55,110,228, 95,184,112, 1,115,230,204, 73, 74,
- 72, 72, 24, 68, 41,189, 82,154,182,123,132,144,230,173, 90,181,218, 61,109,218, 52,239, 31,126,248,129, 68, 71, 71,143,198, 59,
-134, 40, 41,195,205,205,109,212,231,159,127,142,213,171, 87, 99,195,134, 13,163, 41,165,251,222, 56,231,221,132, 16, 75,107,107,
-235,213, 35, 71,142,196,150, 45, 91, 6, 1, 88, 87, 65,180,118, 90,255,254,253,103,231,228,228, 44, 50,230,158, 26,179,189,179,
-179,115,171,214,173, 91,123,170, 84, 42,236,219,183,239,249,254,253,251,115, 13, 6,195,158, 82,115, 85, 62,127, 28, 60,121,242,
-228,236,169, 83,167,226,194,133, 11, 91,156,156,156,120, 41, 41, 41,187, 43,185,167, 41, 18,137, 36,235,225,195,135, 14,190,190,
-190,140,163,163, 35, 26, 53,106, 4, 11, 11, 11,240,120, 60,100,100,100,224,242,229,203,108,108,108,108,150,177, 3,142,102,197,
- 92, 56,226, 80,183,243,181,123,183, 46,183,247,111,216, 84,224,108, 99,133, 80,127,103, 88,152, 8, 65, 0, 36,100, 40,113,254,
-252, 25, 93, 92,220,243, 27,198,244, 32, 44,211,116,170,247,201,117, 11,187, 26,237,235, 52,104,202,175,229, 83, 27,237, 91,212,
-183,180,148, 11,193, 82,138,135, 47,242,113,230,244, 73, 93, 74, 82,226, 5,174, 7, 33,199,135,142, 96,205,221,176, 97, 67,211,
- 77,155, 54,117,153, 52,105,146,233,208,161, 67, 33,149, 74, 81, 92, 92, 12, 87, 87, 87,232,245,122, 28, 63,126, 28,247,238,221,
- 43,100, 89,246, 40,128,107,111, 60,152, 1,229,199,173,154,177, 74, 81,163,100,240,202,226,166,243, 54,212,251, 32,154, 0,112,
-253,133,222,217, 41, 53,107,110,118,238,241,137,110,206,142,194, 14,205, 26,243,109, 44, 75,122, 51, 27,169,217,246, 67,143,233,
-241,191,208,212,235,245, 95, 16, 66,252,167, 78,157,186,212,217,217,217,105,222,188,121, 47,235,212,169,163, 44, 40, 40,160, 26,
-141,134,205,202,202,146,237,219,183,207, 35, 59, 59,187, 80,167,211, 13,161,148, 62,172, 74, 58, 41,165, 90, 0, 99, 8, 33,135,
-243,243,243, 79,125,243,205, 55,248,254,251,239,113,228,200,145,230,148,210,107,213, 61,119, 74,169,222,195,195, 35,239,254,253,
-251,246, 34,235,218,176,183, 16,162,227,119, 37,193, 8, 83, 49,129,178,184, 16, 81,143, 31,162,160,160,224,110, 21, 52, 53,206,
-206,206,249,233,233,233, 54,246,246,246, 37,230, 42, 51,243,149,185,202,201,201, 65,118,118, 54, 45,127,239,141,208, 44,246,244,
-244, 84, 68, 69, 69,137,120, 50, 87, 56, 88,138, 81, 82, 5, 73, 97,107,202, 71,113,113, 33,158,220,188,129,252,252,252,139,239,
-210, 76, 73, 73,217,227,228,228, 4, 0, 63,205,158, 61,219,166, 99,199,142,207,110,223,190,221,178,252,113, 2, 3, 3, 15,206,
-155, 55,239,147,239,191,255, 62,107,235,214,173,211, 82, 83, 83,119,252, 47,243,146,181,181,245,228, 99,199,142,153,106,181, 90,
-172, 90,181, 10, 63,255,252,243, 38, 74,233, 31,111, 92,139, 99, 60, 30,111, 13,195, 48, 95,125,253,245,215, 24, 57,114,164, 44,
- 40, 40,104, 82,185, 40,215,107,154,201,201,201,179, 2, 3, 3,103,103,100,100, 24,101, 8,158, 62,125,250,101, 96, 96,224,172,
-140,140,140,165, 21,157,187, 92, 46,151, 27, 12, 6,196,197,197,229, 82, 74,243,223,113,223, 84,181,107,215, 78, 54, 24, 12, 46,
- 50,153,204,170,178,252,153,155,155,187, 40, 40, 40,104,110,122,122,250,105, 0, 11,223, 28,114,132, 82,250,128, 16,226, 63,126,
-252,248,177, 75,150, 44,233,149,150,150,182,167, 50,205,132,132,132, 69,173, 90,181,250, 46, 38, 38,102, 43,165,116,195, 59,210,
-249, 11, 33, 68,187, 99,199,142,209,113,113,113,139, 43,210, 76, 73, 73, 57, 10,224,168,177,247,247, 93,219,151,215,100, 24,102,
-234,140, 25, 51,152,157, 59,119, 2,192,178,164,164,164, 13,239, 48,107, 15,157,157,157,183, 5, 5, 5, 13, 93,183,110,157,164,
- 77,155, 54, 35, 1,236,174, 44,127,170,213,234,155,215,175, 95,111, 28, 31, 31,111,211,170, 85, 43, 33, 0, 20, 20, 20, 32, 47,
- 47, 15, 71,143, 30,213,198,198,198,102, 21, 23, 23,223,172, 74, 25,162,215, 20, 12,188,126,254,208,238,248,167,143, 67,195, 58,
-118,183,212,104, 93, 32,206,230, 33, 47, 59, 13, 39,143,254,153, 27, 23,247,252,134, 66,145, 55,176, 42,154, 90,117,254,128, 27,
- 23, 14,239, 73,138,139,106,220,162, 85,103, 75,149,198, 13, 98, 33,131,236,244,100,156, 60,118, 40, 39, 46,238,197, 21,149, 78,
-253,217,223, 85,206,255,155, 52, 63, 58,104, 89,107,219, 10, 22, 0, 34, 0,159,152,154,154,174,154, 51,103,206,134, 91,183,110,
-109,232,210,165,203, 6,145, 72,180, 10,192, 39, 0, 68,239,216, 47,224,127,169,217,177, 17, 76, 63,239,198,108, 94, 48,154,175,
- 61,184,220, 71, 55,127, 20,168,145,154,109,141,185, 14, 85, 89,254,215,154, 0,154, 9, 4,130, 27,117,235,214,189, 96,106,106,
-154,233,238,238,126, 69, 32, 16,220, 6,208,226,125,211, 9,192,166,127,255,254,108, 97, 97, 33,237,215,175, 31, 5, 96,254,190,
-154, 98,177,184,117, 88, 88,152,238,101,106, 46,189,242, 32,145, 30,189, 20, 73,119, 29,185, 65, 55,236, 62, 69,151,175,217, 76,
-235,213,171,167, 1,224, 86, 21, 77,145, 72,212, 49, 44, 44, 44, 47, 43, 43,139, 70, 71, 71,211,203,151, 47,211,253,251,247,211,
- 13, 27, 54,208,181,107,215, 82, 39, 39,167,108, 0, 78, 85,209,148, 74,165,221, 59,118,236,168, 79,206, 44,162, 55, 35,211,232,
-217, 91,207,233,193,115, 15,233,158,163, 55,232,166, 29,127, 80, 95, 95, 95, 21, 0,251,202, 52, 29, 29, 29,251,247,235,215,239,
-153,183,183,247,250, 55,127,243,242,242, 90,211,175, 95,191, 4, 39, 39,167, 33,127, 71, 94, 2,208,209,217,217, 57, 90, 40, 20,
- 30, 3, 48,164,146,253, 6,240,249,252, 35, 14, 14, 14,119, 0,244,252, 95,231,121, 0, 93,236,236,236,110, 2,232, 86,201,126,
-101,219,245,248, 24,159,247, 15,161,233,228,228,212,218,213,213,245,178,147,147,211,204,202,246,243,243,243, 19, 58, 56, 56, 44,
-112,118,118, 62,238,232,232,216,166, 42,233, 4,224,100, 98, 98,210,204,196,196,164,171,137,137, 73, 87, 11, 11,139,102,229,159,
-195,234,156,187,117,237,182, 93,107, 52,236,118,208,181,254, 39, 9, 53, 26,116, 73,240, 8,236,126,208,186,118,219,174,239,171,
-233, 22,216,253, 80,141, 6, 93, 94,214,104,208, 53,190,102,112,247,131, 54, 62,109, 59,125,108,247,253,159,172,249,177, 45, 70,
-111,216,167,164,229,138, 9,128, 1, 12,195,252, 2, 96, 0, 0,147, 74,110, 64,128, 17, 55,233,131,107,118,108, 9,231, 49,125,
-120,199,167,127, 38,200, 52, 82,243,163,201,208, 0,186,243,249,252,235, 0,186,127,200,116,154,153,153,109,236,219,183,175, 65,
- 32, 16,172,254, 80,154,214,214,214, 63,133,134,134,106, 87,174, 92, 73, 15, 28, 56, 64, 55,108,216, 64,199,142, 29, 75, 3, 2,
- 2,212, 86, 86, 86,159, 85, 71,211,193,193, 97, 97,221,186,117,115,118,236,216, 65,247,236,217, 67, 87,175, 94, 77,231,206,157,
-203,214,168, 81, 35,211,202,202,170, 91,117, 52,237,236,236,126,109,214,172,153,246,215, 95,127,165,103,206,156,161,187,118,237,
-162,147, 39, 79,166,126,126,126, 42,185, 92,222,219, 88,205, 90,181,106,137,222,245, 91,195,134, 13, 5, 92,129,203,105,114,154,
-156, 38,103,176, 62,158,133,111,108,164,107, 95, 36, 69,239, 58,164,136, 0,123,254,120,194,238,239,229, 7,253, 31,145,239, 63,
- 86, 79,205,154, 53,139, 8, 33,123,158, 63,127,190,223,205,205, 77, 31, 31, 31,255,222,154, 39, 46,210,228,246, 30,164,243,153,
-120, 3, 31,128,222,248, 97,123, 62,138,136,228, 33, 0,135, 62,180,110,126,126,254,112, 66,200, 56, 74,169,242, 67,105,102,101,
-101, 77, 38,132,236,120,254,252,249, 50,185, 92,222,192, 96, 48,232, 84, 42,213,213,204,204,204, 73,148,210,196,234,104,166,166,
-166,206, 34,132, 28,152, 62,125,250,116, 0,245, 8, 33, 26,157, 78,119, 61, 35, 35, 99, 62,165, 52,181, 58,154,233,233,233, 95,
- 10,133,194,205,177,177,177,139,165, 82,105, 61,150,101, 53, 10,133,226, 98, 86, 86,214, 68, 74,105,186,177, 58,177,177,177,239,
-108,255, 21, 30, 30,206,205, 59,200,193,193,193,241, 47,106,131,245, 26,127, 68, 82,244,170, 75,208, 51, 0,250, 63, 30,125, 24,
-211,242,252,249,171,246,175, 31,116,106,144,211,113,244,131,107,114,213,201, 31,206, 92,149,211,124, 8,160,205, 7,214,188, 15,
-160,239,135,212,212,106,181,183, 0,132,113,185,128,131,131,131,131,227,131, 27, 44, 0,248,243, 17,229,174, 26, 7, 7, 7, 7,
- 7, 7, 7, 71, 5, 16, 0, 1,239,136, 2, 60, 54, 90,132,144,128,170, 30,184, 50,253,255,177,166, 93, 5,154,103, 43,209,108,
- 91,141,116,114,154,156, 38,167,201,105,114,154,156,230,191, 82,179, 50,237,143,166,119,226,127,181, 5,189, 17, 13,210,255, 33,
-154, 92, 67, 69, 78,147,211,228, 52, 57, 77, 78,147,211,228, 26,185,127,176,133,155, 96,137,131,131,131,131,131,131,131,227, 3,
-195, 25, 44, 14, 14, 14, 14, 14, 14, 14, 14,206, 96,113,112,112,112,112,112,112,112,112, 6,139,131,131,131,131,131,131,131,131,
- 51, 88, 31, 16,187,255, 39,154, 28, 28, 28, 28, 28, 28, 28, 28, 31, 12,242,111, 26,229,156,131,131,131,131,131,131,131,227,127,
- 1, 87, 69,200,193,193,193,193,193,193,193,193, 25, 44, 14, 14, 14, 14, 14, 14, 14, 14,206, 96,113,112,112,112,112,112,112,112,
-112, 6,139,131,131,131,131,131,131,131,131,131, 51, 88, 28, 28, 28, 28, 28, 28, 28, 28,156,193,226,224,224,224,224,224,224,224,
-224, 12, 22, 7, 7, 7, 7, 7, 7, 7, 7,199,223,111,176, 8, 33,109, 57, 77, 78,147,211,228, 52, 57, 77, 78,147,211,228, 52,
- 57,131,197,193,193,193,193,193,193,193,193,193, 25, 44, 14, 14, 14, 14, 14, 14, 14, 14,206, 96,113,112,112,112,112,112,112,112,
-112, 6,139,131,131,131,131,131,131,131,131,131, 51, 88, 28, 28, 28, 28, 28, 28, 28, 28,127, 19, 4,192, 91,123, 2, 80, 74,207,
- 26, 45, 82,141,222, 4,149,233,115,154,156, 38,167,201,105,114,154,156, 38,167,249,241,105, 86,166, 93, 21,255,241,143,134, 82,
-250, 95, 91, 0,180,229, 52, 57, 77, 78,147,211,228, 52, 57, 77, 78,147,211,252,183, 45,124, 46,136,199,193,241,255,156,253,132,
-135, 92, 31, 15, 80,234, 4,158, 40, 21,169,143,158, 99, 14,101,223, 91, 51,189,142, 27,164, 58,123,232, 37,153, 72,127,248,226,
-189, 53, 57, 56, 56, 56,254, 69,112, 6,139,131,227,255, 59,153,190,222,224, 99, 49, 24, 56,130,106, 99, 97, 91,103, 49,128,199,
-239,173, 41,100, 23,194,192,184,128,106, 99, 96,231,179, 4, 64, 36,119,177, 57, 56, 56, 56,140,227,111,105,228, 30, 28, 28, 28,
- 30, 28, 28,188, 32, 44, 44, 76,204,221, 2,142,255, 22, 97, 97, 97,226,224,224,224, 5, 33, 33, 33,225, 31,237, 73,238,168, 43,
- 3, 99,232,164,209,177,206, 39, 31,229,217, 41,212, 6,111, 48,250,206,216,236,109,242, 94,154,124,210, 94,165,101,107,236,188,
-173,176, 47,214,232,253, 64,241,126,154,165, 4, 4, 4, 88, 52,106,212,232,100,131, 6, 13,108,184, 28,202,193,193,193, 25,172,
- 15, 12,203,178, 13,237,236,236, 38, 41,149,202,132,160,160,160,110,255,166, 11,222,184,113,227,235,161,161,161,233, 77,154, 52,
- 73,111,210,164,201,189,202,214,127,140, 56, 57, 57,121,215,173, 91, 55,193,223,223, 63,166,252,122,187,250,189,154,248,181, 24,
- 58,199,198,191, 71,203,247, 61, 70, 80, 80, 80, 55,149, 74,149, 80,163, 70,141,137,122,189,190,225, 71,123, 49, 85,172, 61, 24,
- 94,171,136, 84,133, 44,181, 64,103, 31, 30,175, 48, 5,120, 97,208,192,177,218,154,249,172, 61, 64, 91, 63, 72, 82,202,175,231,
-216,218, 95,121,174, 54, 3,195,180,130,138, 56,188,111,114, 69, 34,209,104, 74,105, 59,129, 64, 48,129, 43,126,255,221, 16, 66,
- 2, 8, 33,221, 8, 33,193, 31, 80,243, 7, 95, 95,223,100, 66,200,120,238, 10,115,252,191, 49, 88,125,107,146,166,159,214, 34,
-151,250,215, 36,133, 3,106,145,162, 33,181,200,213, 62, 53, 73,235,234, 30,248,143, 63,254,144,110,223,190,221,174, 78,157, 58,
-123, 66, 66, 66,174, 6, 5, 5,213,174,142, 78,112,112,240,201,224,224,224,190,111,174, 11, 10, 10,234, 95,126, 93,163, 70,141,
- 34, 26, 53,106,148, 31, 28, 28,252,220, 24,221,192,192,192,103, 65, 65, 65,197,193,193,193,207,222,120,113,247,111,212,168,209,
-201, 55,142,215,247,205,117,239,130,199,227,185, 28, 57,114,196,238,216,177, 99,118,124, 62,223,254,213,141, 96,152,183,174,175,
-198,245, 24, 17, 28, 28,124,253,141,115, 25,254,230,186, 74,204,201,245,192,192,192,225,111,232, 94, 15, 14, 14, 30,241, 33,204,
- 85,139, 22, 45,174,222,191,127,191,134,169,169,169, 69,249,223, 28,172, 45, 58, 92, 63,186,102,210,103,125,219,143,182,171,211,
-179,110, 53,141, 85,237,198,141, 27, 95,245,244,244,220,179,120,241, 98,187, 57,115,230,200, 62,218,167,119,127, 29, 33, 8,219,
-130,165,212,246, 73,178,202,246,147,110,125,249,247, 19,149,182, 58,131,193, 10,224,133, 97,171,187,184, 90,154,124, 93,115,150,
- 82,251,115,241, 2,219, 86,253,198,242,206,199,243,109,117, 6,131, 53, 24,180,172,150,230,127,242,161,128,199,227, 77, 26, 57,
-114, 36, 67, 8,249,218,211,211, 83,244,111, 42,108, 67,156,137,115, 27, 47,254,237, 64, 39,210,244, 3, 26, 10,127,185, 92,126,
-151, 16,226,253,255,204, 92, 53, 4, 32,163,148, 30, 6, 96, 79, 8,225,127, 0,205,229,243,231,207,159, 26, 17, 17,225, 84,179,
-102,205,121,132, 16, 30,247,138,231,248,199, 27,172, 1, 53,201, 92,123, 7,231,211, 51,151,239,106,177,241,210, 11,147,181, 71,
-239,203, 39, 78, 91,212,212,193,218,246,200,160, 90,228,135,119,237, 87, 81, 87, 75,145, 72,132, 23, 47, 94, 96,213,170, 85,146,
-185,115,231, 54, 49, 55, 55,127, 24, 18, 18,178,162, 78,157, 58,242,138,210,242,166, 38,165,180,169, 64, 32,216, 24, 18, 18,178,
-165,172,192, 38,132, 52, 21,139,197,191,134,132,132,236, 40,171,134, 12, 12, 12,172,121,251,246,109, 51, 66,136,189, 49,233,108,
-212,168,145,227,221,187,119,101, 64, 73, 36, 32, 44, 44, 76,220,168, 81,163,237,206,206,206, 27, 0, 52, 5, 0, 79, 79, 79, 81,
- 72, 72,200, 22, 87, 87,215,223, 8,121,189,208,124,215,185, 19, 66, 96, 97, 97,129, 93,187,118,129,199,227,253,101,253,142, 29,
- 59, 64, 8,169,242,245,172, 83,167,142, 60, 56, 56,248, 15, 71, 71,199, 21, 44,203,134, 2, 64,221,186,117,101,141, 26, 53,218,
-239,226,226,178,178,108,157, 49,154,148,210, 80,161, 80,184,162, 81,163, 70,251,235,214,173, 43, 3, 0,150,101, 67,249,124,254,
-242,224,224,224, 63,170,114,143, 26, 54,108, 56,178, 94,189,122, 41,245,234,213, 75,241,241,241,249,222,222,222,254,226,234,213,
-171,173,203,159,123, 89,228, 42, 61, 35, 59,247,250,157,136,232, 73, 35,251,132,213,112,181, 31,100, 81,191,135,185, 49,231, 94,
-118,254, 33, 33, 33, 43,204,205,205, 31,206,152, 49, 35,116,225,194,133, 18,173, 86, 11,161, 80,136,234,228,207,234,242, 63,213,
-204, 34,118,160,180,109,116,154, 82,226,238, 23, 36,183, 11,234, 13, 59, 51,129,248,198,243, 98, 83, 16,180,129, 86,102, 91, 45,
- 77,194,111, 19,145,172,148, 90,250,119,150, 5,135,182, 0, 99, 93, 91,124, 49,166,216, 12, 12, 83, 61,205,255,208, 39, 52, 52,
- 84,212,182,109, 91, 56, 57, 57,241,204,205,205, 7,253,163,174,231,127, 81, 51,196,153, 56,155,154,136,110,253, 52,103, 98,144,
-147,149,236,144, 49, 38,203,136,238,243,254,118,118,118, 23,214,172, 89, 19,104,106,106,122,217, 24,147,245, 79,184,158,165,230,
- 74, 72, 41,189, 89,186, 42, 18, 64,243,247,212, 92, 62,119,238,220, 9, 51,102,204, 64, 65, 65, 1,134, 13, 27,102, 6,224, 39,
- 99, 53, 77, 77, 77,189,234,213,171,183,195,223,223,255,101,131, 6, 13, 52,117,234,212, 81,249,248,248,196, 7, 4, 4,108,149,
- 72, 36, 30, 31,123,254,252,167,104,254,235, 12, 86,191, 90,164,137,141,131,243,212, 31, 14,222,145, 26, 34,239,226,238,103, 45,
- 17,245, 85,103, 72, 99,194, 49, 99,220,183, 82, 51, 51,203,175,251,214, 34,173,170,115,240,152,152, 24,236,221,187, 23, 54, 54,
- 54,100,243,230,205,226,190,125,251,142, 54, 51, 51, 75, 12, 14, 14, 30,100,172, 6,143,199, 51,108,217,178,197,164,123,247,238,
- 3,172,172,172, 34, 2, 3, 3,107, 50, 12, 99,216,182,109,155, 73,255,254,253,251,106, 52,154, 39, 65, 65, 65,181,239,221,187,
-103,184,115,231, 14, 24,198,184,160, 93,120,120,184,254,196,137, 19,175,162, 34,148,210, 39, 75,150, 44, 25,112,224,192, 1, 83,
-115,115,115, 54, 48, 48,176,166,171,171,107,196, 15, 63,252, 48,104,255,254,253,166,102,102,102,172,145, 5, 1, 84, 42, 21,164,
- 82,233,107, 70,138, 16, 2,165, 82, 9,137, 68,242,154,241, 50, 50, 50,224,111,109,109, 29,181,120,241,226,238, 7, 15, 30,148,
-154,154,154, 34, 56, 56,216,207,194,194, 34,122,233,210,165, 61,202,214, 25,139, 80, 40,196,174, 93,187,100,159,126,250,105, 55,
-177, 88, 28, 21, 28, 28,236, 39, 20, 10,177,123,247,110,217,160, 65,131,186,200,100,178, 39,129,129,129,254,198,104,233,116,186,
-217,119,238,220,113,188,116,233,146,163,155,155,219,184,181,107,215,218, 11, 4, 2, 0,128,193, 96,120, 45,114, 53,168, 87,187,
-144, 9,179,215, 92, 80,170,212,154,133,211, 63, 15, 19, 24,208,216,200,168,221, 32, 51, 51,179,196, 47,190,248, 98,204,174, 93,
-187,196, 14, 14, 14, 76,120,120, 56, 10, 11, 11,171,124, 45,255,255, 68,175, 8, 15,124, 67, 67, 0,158,225,241, 74,155,250,109,
- 7,243, 17,123, 4,141, 60, 76,248, 23, 98, 10,237, 40, 67,221, 0,218, 8,243,194,248, 85,210, 20,208,250, 96,216,218,167, 99,
-137, 77,147,206,131,248, 9, 9, 9,240,168, 31,198, 59, 22, 3,123, 74,168, 7, 88, 4, 85, 73,179, 28, 2,129, 96, 78,191,126,
-253,228, 9, 9, 9,104,218,180,169, 76, 36, 18,205,254, 32, 81,188,245, 62,110,216,232,211, 18,155,189, 29,113, 41,236, 31,215,
-113, 39,196,153, 56,155,153,136,110,238,222,189,215,169,110,199, 47,201,134,161,238, 86,182,102,130, 67,239, 19,201, 42, 53, 87,
-231,111,221,186,101,221,190,125,123,204,157, 59,215,214,204,204,236,242, 63, 61,146, 85,222, 92, 17, 66,164,165,213,131,201, 0,
- 92,222, 67,115,229,220,185,115, 39,204,156, 57, 19, 55,111,222,196,210,165, 75,209,177, 99, 71, 88, 90, 90, 86, 90,126, 12, 25,
- 50, 68,214,180,105,211,240,110,221,186, 61,152, 56,113,226,160,163, 71,143,186,110,217,178, 69,248,217,103,159,137,251,245,235,
-231, 54,113,226,196,161,157, 59,119,126,220,184,113,227, 91,125,251,246,149, 84, 49,105,124, 0,162,210, 69, 80,146, 84, 66, 8,
- 33,124, 66,136,128,139,176,113, 6, 11,124,138,249, 95, 78, 94, 32,137,219,250, 51,210,247,254, 2, 94, 94, 58, 4,133,217, 80,
- 95, 61, 6,221,213,195, 24, 18, 26, 42,149, 18,178,176, 58, 7, 55, 49, 49,129, 80, 40,196,179,103,207, 16, 25, 25,137,206,157,
- 59, 11, 87,175, 94,109,225,239,239,255,107,211,166, 77, 31, 4, 7, 7,215, 51,198,176,120,121,121, 97,192,128, 1,162,241,227,
-199,215,146, 72, 36,247, 40,165, 2, 15, 15, 15,244,239,223, 95, 56,109,218, 52,119,137, 68,114,135,101, 89,161, 76, 38,123,103,
-116,232,109,186, 82,169, 20, 0, 4,181,107,215,190,187,103,207, 30,143,166, 77,155,242,207,156, 57,131,130,130, 2,190,183,183,
-247,131,221,187,119,123, 54,105,210,132,127,237,218, 53, 20, 23, 23, 83, 99,117, 21, 10, 5, 36, 18,201, 95, 12,150, 66,161,128,
- 88, 44, 54, 58,141,165,230, 98,132,167,167,231,157, 61,123,246,184, 52,111,222,156,119,241,226, 69, 20, 22, 22,194,205,205,237,
-238,158, 61,123, 92,154, 54,109,202,187,113,227, 6, 10, 11, 11,141,214, 20,137, 68,112,119,119, 71,191,126,253, 4, 83,166, 76,
-113, 17, 8, 4,119, 68, 34, 17,220,220,220,208,175, 95, 63,225,228,201,147, 93, 68, 34,209, 45, 35,171, 12,121,165, 70, 11,253,
-250,245,147,203,100, 50, 36, 38, 38,130,101, 89,176,108,137, 39, 77,205,204,126,116,237,206,227,168, 73,163,250,182, 44, 86,171,
-213,167, 46,222,125, 82,167,182,155, 11, 33,212,189,146,115,175, 23, 18, 18,242, 32, 44, 44,236,183,195,135, 15, 91,180,107,215,
- 78,112,231,206, 29,188,124,249, 18, 98,177, 24, 38, 38, 38,224,243, 63,210,142,178, 5,117,172,193,162, 93, 66,166, 70, 44,182,
-112, 49, 53,113,244, 6, 94, 94, 70, 77, 91, 49,120, 12, 79,114,231,133, 66, 14,208,118,168,145,101, 93, 53, 77,182,221,139, 12,
-141, 88,103, 21, 96,226,228, 82, 3,217,217,217,112,173,229, 11,149,200, 86,116,253, 89,177, 9, 72, 21, 53, 75,105,208,160, 65,
-115, 87, 87, 87, 7,119,119,119,100,101,101,193,203,203, 11, 38, 38, 38,150,129,129,129,237,170,125, 13,182,186,139, 81,128,166,
- 0,179, 12, 6, 50, 15, 58,254, 98, 60,203,108,136, 95, 3, 5,255, 56,115,181,103,175,179,117, 13, 63,224,216,231,176,183, 16,
- 99,211,232,134, 86,182,230,226,106,153, 44, 66,136,191,189,189,253,249, 91,183,110,217, 72, 36, 18,220,187,119, 15,117,234,212,
-193,207, 63,255,108,107,105,105,249,143, 53, 89,111,152, 43, 43, 74,169, 18, 0, 11, 96, 32,170,209,235,181,212,172,252,178, 96,
-193,130,113,223,126,251, 45,174, 95,191, 14, 23, 23, 23,100,102,102,162,121,243,230, 9,185,185,185, 21,190,151,252,253,253, 93,
-158, 62,125,154, 60,105,210,164,134, 59,118,236,144,202,100, 50,228,229,229,225,183,223,126,195,140, 25, 51, 64, 8, 1,165, 20,
-155, 55,111,150, 13, 27, 54,172, 81,108,108,108,178,187,187,187, 49,205, 55, 8, 0, 9, 0, 89,233, 34, 7, 32,219,189,123,183,
-121,247,238,221,205, 74,215, 73, 1, 72, 9, 33, 92, 71,175,127,179,193,162, 64, 61, 7, 15, 31,228,159,217, 7, 41,159, 64,202,
- 43, 93,248, 4,204,243, 71,112,149, 8,160,163,212,191, 58, 7, 55, 49, 49,121,181, 48, 12,131,212,212, 84, 48, 12,131,217,179,
-103, 75,198,141, 27, 87, 87, 36, 18,221,104,209,162,197,226, 10, 79,160, 52, 34,117,231,206, 29,212,174, 93,155,204,156, 57,211,
- 44, 44,172,228, 43,246,209,163, 71,240,244,244, 36,139, 22, 45, 50,237,218,181, 43,145,203,229, 70, 71,176, 24,134,129, 84, 42,
- 69,171, 86,173,200,150, 45, 91, 76,196, 98, 49,142, 29, 59,134,204,204, 76,180,111,223,158,191,101,203, 22, 19,137, 68,130,203,
-151, 47, 35, 63, 63,223,104,221,202, 34, 88,165,166,206, 40,154, 52,105,178,201,193,193, 97,197,246,237,219,197, 82,169, 20, 23,
- 47, 94, 68, 94, 94, 30, 6, 12, 24,160,223,185,115,167,196,204,204, 12, 55,110,220, 64, 94, 94, 94,181, 50,199,157, 59,119,224,
-229,229, 69,102,205,154, 37, 13, 13, 13,213, 1,192,253,251,247,203,174,179,212,204,204,108,121,179,102,205, 54, 85,164,193,178,
- 44, 82, 83, 83, 17, 17, 17,129,231,207,159, 35, 51, 51, 19, 89, 89, 89, 40, 44, 44,132, 94,175, 7, 0,200, 10, 11,142,253,178,
-229,200, 3,185, 84, 42, 11,169, 91,187,198,173,123,145, 25,114,169, 84, 86,219,163,134, 55, 33,243,222,122, 97, 67, 67, 67, 23,
-243,120,188, 27, 11, 23, 46,172, 55,107,214, 44,113,116,116, 52,238,221,187,247,151,124,245, 81, 26, 44, 66, 8,136,166, 54, 8,
-105,120,243,121,177, 85,243, 46, 3,133,120,113, 18, 96,117, 0,195, 71, 88, 61, 23,254,161, 71,197,246,160,168, 7, 53,124, 1,
- 35, 28, 59, 33, 4,208,122, 1, 36,232,244, 83,189,117,211,158,163,133,201,201,201, 16, 10,133, 16,139,197,104,216,186, 55,127,
-247, 3,157, 3, 8,234, 67, 11, 31,163, 52,203, 33, 22,139,191,251,252,243,207,229,229, 53, 59,117,234, 36,151,201,100,115,170,
-109,174,138,101,161,208,211,241, 17,201, 10,247,239,143,165,249,197,102, 40,125, 64,233, 36, 64,215,224,125, 77,150,155,155, 91,
-152,183,183,247, 11, 15, 15,143,102,239,101,174, 76, 69, 55,246,236,217,235,108,229, 90, 98,174,160, 87, 1, 2, 41, 28,108, 45,
-176,105, 98, 43, 43, 91, 11,105,149, 76, 86,169,185, 58,119,243,230, 77, 27,137, 68,130,240,240,112, 8,133, 66, 72, 36, 18,212,
-173, 91, 23, 27, 54,108,176,181,178,178,250, 71,152, 44, 66,136, 37, 33,164, 3, 33,164, 15, 33,164,119, 57,115,229, 1,160, 53,
- 33,164, 29, 0, 7, 0,151, 40,165, 15,140,212,108,198,231,243,143,213,175, 95, 63,133,207,231, 71, 46, 90,180,232,171,105,211,
-166, 97,229,202,149, 8, 11, 11,123, 62,109,218, 52, 68, 69, 69,233, 21, 10, 69, 55, 74,233,209,138,180,138,138,138, 14,207,154,
- 53,203,188,103,207,158,101,255,199,213,171, 87,177,109,219, 54,200,229,175,183,130,232,214,173, 27, 70,140, 24, 97,169,209,104,
-254,168, 72,211,222,222,190,205,205,155, 55,235, 0, 16, 2, 16,151, 25,172,199,143, 31, 91, 20, 20, 20, 88,152,152,152, 88, 56,
- 58, 58,154,150,153,172,158, 61,123, 90, 8, 4,130,102,224,248,119, 26, 44, 0,208,230,164, 67, 12, 3,164, 60, 2, 25,175,156,
-201, 2, 11,126,126, 70, 21,139,218,183, 27, 44, 83, 83,211, 87, 70, 75,169, 84, 26, 29,113, 41, 51, 54,150,150,150, 40, 44, 44,
-132, 78,167,123,245,112, 88, 90, 90, 66,173, 86, 3, 0,228,114, 57,170, 25,193,194,245,235,215,113,237,218, 53,240,249,124, 88,
- 89, 89, 1, 0,238,222,189,139, 71,143, 30, 65, 40, 20,194,202,202,170, 74,186, 90,173,246,173, 17, 44,173, 86, 11,177, 88, 92,
- 37, 19,168, 82,169,232,221,187,119,241,248,241, 99,136,197, 98,216,218,218, 66, 36, 18, 33, 49, 49, 17, 81, 81, 81, 16,137, 68,
-176,181,181,173,214,253, 49, 51, 51, 67,110,110, 46, 12, 6,195,171,107, 97,110,110,142,226,226, 98, 48, 12, 99, 84, 58, 89,150,
- 69, 74, 74, 10, 50, 51, 51,145,152,152,136,172,172,172, 87, 38,171,172,138,176, 90, 25,151, 97, 64, 8,193,189,123,247,232,249,
-243,231, 81, 88, 88,248,151,188, 84, 22, 33,253,232, 88,235,111, 14,157,160,125, 86,145, 78,156,169, 21,154,219,251,183, 5, 94,
-156, 0, 24, 62, 32,177, 68,227,128,154, 72,200, 53,200,163,211, 53, 18, 16,116,192, 26,111, 75,163, 52, 13,130,118,153,133, 58,
-113,188,214,214,204,175, 94, 32,210,211,211, 33, 22,139, 33, 22,139, 17,212,180, 45, 94,100, 27,100,145,201, 74, 25, 40,218, 27,
-165, 89, 74,195,134, 13,107, 73,165,210,208,134, 13, 27,146,242,154,161,161,161, 96, 24,166,110,131, 6, 13,124,171,116,254,171,
- 61, 69,208,202, 26,131, 79,199, 71,166, 42,156, 14, 61, 86,121,119,237,209,219,106,229,217, 12,191, 39,105,106, 15, 80,221,100,
- 80,109, 96,117, 77,150,187,187,123, 75, 19, 19,147,163,223,125,247,157,135, 88, 44, 62,225,225,225,209,188, 90,229,155,148,183,
-254,187,175, 6, 58, 91,150,153, 43,157, 2,224, 75, 1,129, 20,224, 75,225, 96,103,131,133, 35,218, 89,201, 36,130, 63,141,213,
-148, 74,165,187,215,172, 89, 99,251,166,185, 42, 91, 26, 54,108,136,217,179,103,219, 90, 89, 89,237,250,155,205,149, 21, 74,218,
- 85, 61, 4,240, 7,128,115,229,204,149, 23,128, 63, 75,163, 86,247, 40,165, 9, 70,106, 54,233,216,177,227,133,231,207,159,119,
-126,240,224,129, 99, 90, 90,154,239,228,201,147,177,114,229, 74, 76,155, 54,109, 23,165,212,123,223,190,125, 13,110,223,190, 93,
-151, 82, 90,105, 68, 44, 45, 45,237,211,105,211,166,101,101,101,101, 1, 0,234,214,173,139,188,188, 60, 76,153, 50, 5, 19, 38,
- 76, 40,139,188,130, 82,138,244,244,116, 44, 91,182, 44, 61, 45, 45,237,179,138, 52, 13, 6, 67,226,190,125,251, 26,105,181, 90,
- 23,148, 84, 11,138,243,242,242,204,114,114,114, 76,181, 90,173,156,101, 89,185,133,133,133, 9, 0,217,144, 33, 67,248,145,145,
-145,126,122,189, 62,153,179, 34,255, 82,131,197, 35,120,248,242,238,101, 88,249, 7,190, 22,189,146,241, 8,164,102,230,120,145,
-152, 0, 33, 72, 68, 85, 15, 76, 41,125,205, 96,149,189, 24, 83, 83, 83, 49,125,250,116,197,142, 29, 59, 30,105, 52,154,208,203,
-151, 47,207,168,244,195, 27,128,173,173, 45, 18, 18, 18,232,143, 63,254, 88,112,226,196, 9, 61, 0,216,217,217, 33, 49, 49,145,
-206,154, 53,171,112,239,222,189,180, 42, 6,139, 97, 24, 72, 36, 18, 92,188,120,145,206,153, 51, 39, 63, 53, 53,149, 90, 91, 91,
-195,218,218, 26,103,207,158,213,207,152, 49, 35, 63, 54, 54,246,213,186,170, 24,172, 50,195, 82,222,160,188,203,120, 85,196,213,
-171, 87,191,200,207,207,159, 56,101,202, 20,229,147, 39, 79,168,173,173, 45,108,109,109,177,117,235, 86,254,208,161, 67,149, 15,
- 31, 62,124,181,174, 58, 88, 91, 91, 35, 38, 38,134, 46, 90,180, 72,121,238,220, 57, 1, 0,216,216,216, 32, 42, 42,138,206,159,
- 63, 95,153,151,151, 55,241,234,213,171, 95, 84, 82,224,224,249,243,231,175, 34, 86, 42,149, 10, 89, 89, 89, 72, 76, 76,124,101,
-176,148,114,179,142, 95, 15,235, 90,191, 88,169, 84,220,122,244,244,101, 72,195, 58,118,197, 74,165,226,105,220,203, 24, 74,231,
-188,181,109,219,181,107,215,102,232,245,250,208, 35, 71,142, 60,218,176, 97,131, 34, 39, 39,231,173,134,253,163, 52, 88, 12,235,
- 0, 66,155, 93,121, 90,100,209,174,107,127, 17, 73,187, 13,104,139, 0,177, 37, 32,182, 4, 95,110,141, 78,205, 27,240,182,222,
- 44,112, 0,101,155, 64, 40,174,188,125,139,128,218, 3,108,243, 51, 49, 42,203,102,125,198,138,114,114,114,192,227,241, 94,153,
- 33,153, 92,142, 54, 61,134, 48,155,111,171, 29, 0,218, 20,132,103,116,155, 25,161, 80, 56,117,216,176, 97,194,220,220, 92, 48,
- 12,243, 74, 83, 42,149,162,103,207,158, 98, 83, 83,211, 89, 70,159,251,254, 58, 66, 8,196,141, 1, 58, 33, 58, 77,229,116,248,
-145,210,103,242,146, 77, 82,255, 6,141, 48, 50,204, 78,186,228, 88,134,255,131, 68,101, 77,192, 48, 17,122, 77, 80, 85, 77,150,
-135,135, 71,115,185, 92,126,236,208,161, 67,178, 86,173, 90, 97,202,148, 41,114,137, 68,114,194,221,221,189, 69, 85,111, 83,113,
-145,225,235,249,171,182,167, 63, 92,222, 1,208, 22,151, 24,171,114, 75, 70, 17,139,217,155,206,231,235,116,116,160,177,154, 74,
-165,114,232,240,225,195,179,255,252,243,207,191,152, 43,137, 68,130,184,184, 56,124,255,253,247, 57, 57, 57, 57,159,253,205,185,
-180, 1,128,251, 0, 84, 0, 90, 2,144,149,246, 20, 12, 5,112,150, 82,106,160,148,166, 83, 74, 83,141, 21,228,241,120,211,214,
-174, 93,203, 87, 42,149, 24, 49, 98, 4, 18, 19, 19,145,146,146,130,111,191,253, 54,142,101,217,161,165,154, 15, 40,165, 81,198,
-232,105, 52,154,232,220,220,220, 46, 29, 58,116,200,203,205,205, 69,189,122,245,208,181,107, 87, 56, 56, 56,192,201,201, 9,221,
-187,119,135,183,183, 55,178,179,179, 49,112,224,192,156,204,204,204, 14,148,210, 10,123,161,103,103,103,199,238,218,181, 43,102,
-236,216,177, 13,147,146,146,252, 0, 88, 23, 22, 22,202, 11, 11, 11,197, 26,141, 70,106,105,105,105,217,160, 65, 3,155, 47,191,
-252,210,228,254,253,251,126, 73, 73, 73, 69, 0, 18,192,241,239, 52, 88, 90, 96,246,182,125, 91, 85,162, 26, 94, 48,247,169, 15,
-153, 68, 2,169, 72, 4,169,165, 53,212, 44,139,141,113,105,138, 98, 74,103, 85,245,192,148,210,215, 34, 13, 6,131, 1,235,215,
-175, 87, 45, 92,184, 48, 47, 45, 45,109,212,229,203,151,235,223,185,115,231,161, 49, 70,168,160,160, 0,251,246,237, 83,110,217,
-178,229,185, 82,169,108, 40, 20, 10,117, 26,141, 6,187,118,237, 82,173, 88,177, 34, 94,161, 80, 4, 11, 4, 2,109, 85,204, 75,
- 89, 4, 75, 32, 16,232, 84, 42, 85,195,221,187,119,199, 30, 61,122, 84,105,102,102, 6,129, 64,160, 83, 40, 20,117,183,111,223,
- 30,189,123,247,110,165,169,169,105,149,140, 27,203,178,111,173, 34,100, 89,182, 74, 6, 11, 0,238,220,185,243,155, 86,171, 13,
-217,181,107, 87,210,166, 77,155, 84,102,102,102, 0, 0,157, 78, 23,188,109,219,182,164,117,235,214,169,171,210,192,189,180,224,
-129,193, 96,192,246,237,219,213,187,119,239, 78,210,235,245,193,101,235, 54,111,222,172,218,190,125,123,146, 86,171, 13,185,115,
-231,206,111,149,105, 25, 12, 6, 67, 65, 65, 1,248,124, 62,158, 63,127,174, 46,139,208, 61,123,246,236,149,193,178,179,177,170,
-211, 52, 56,192,247,231,245,251, 46,201,197, 98,113,135,176, 32,191,200,167, 9, 73,148,146,248, 74,206,253,225,245,235,215,235,
-231,228,228,140,218,176, 97, 67,222,206,157, 59, 85, 6,131,225, 53,147, 37, 18,137, 62,198,167, 86, 6, 2,233,211, 12,181,169,
-132,209, 19,196, 28, 44, 49, 87, 18, 11, 64, 98, 9, 72, 44,225,236,236,130,219,113, 10, 83, 48, 16,193,160,179, 51,226,129,148,
-131, 64,246, 56, 29,166, 2,145,148,164,165,165,189, 50, 66,101,139,135,151, 31,238, 37, 20,153,128, 80, 49,120,176,175,194,179,
-222,197,212,212,148,159,154,154,250, 87, 77, 15, 15,158, 78,167,235, 96,244,185,167, 24, 28, 1,246,171,152, 52,149,227,129, 7,
-197, 62, 19, 23,111,150, 74, 13,121,192,221, 85,240,175,229,132,137,125, 26,136,102, 30,206,244,191, 19,175,168, 5, 30, 29, 9,
-182,200,232,175, 11, 15, 15,143,102, 50,153,236,196,193,131, 7,101, 50,153, 12,207,159, 63, 71,221,186,117, 49,127,254,124,153,
- 76, 38, 59,238,230,230, 22, 86,149,219,116, 51,141, 38, 20, 21, 26, 66,167,238,123,153,246, 48, 85,255,154,185,202, 44,166, 24,
-254,195,225,188,220, 2, 85,239, 27, 47,117,231,171,112, 45,239,231,229,229,181,159, 53,107, 86,118,102,102,230,107,230, 42, 33,
- 33,161,204, 8,132, 81, 74, 35,254,230, 92, 42, 71, 73,227,117, 31, 0,158, 0,234, 83, 74,245, 0, 10, 41,165,213, 10, 93,215,
-169, 83,167,161,155,155, 27,214,173, 91,135,141, 27, 55,230,254,252,243,207,160,148,162,118,237,218,102,213,213, 76, 79, 79,191,
- 29, 29, 29,221,161, 94,189,122, 79, 86,175, 94,157,228,232,232,200,126,249,229,151, 24, 62,124, 56,108,109,109, 13, 43, 86,172,
-120,217,188,121,243,199,177,177,177,109,139,139,139, 31, 25,113,127,104, 86, 86,214,245, 95,127,253,245,102,235,214,173,101, 67,
-135, 14,181, 61,116,232,144,181, 66,161,112, 18,139,197,118, 26,141, 70,244,228,201, 19,222,254,253,251, 29, 34, 35, 35,227,148,
- 74,229,109, 90, 58,177, 31,199,191,208, 96,253,254,156, 94, 47, 46,204, 91, 58,127,243, 6,229, 11, 61,129,190,102, 29,168,172,
-157,113, 39, 79,137, 41, 79,146, 20,122,150,174,217,247,156, 94,168,110, 4, 75, 38,147,225,220,185,115,134,175,190,250, 74,117,
-251,246,237, 95,243,243,243, 93,239,220,185,179,211, 88, 29,150,101,121,159,127,254,121,209,181,107,215,246,165,166,166,250,135,
-135,135,191, 96, 89,150, 55,104,208,160,162, 51,103,206,252, 73, 8,241,187,123,247,238,211,106,132,184, 33, 20, 10, 65, 8,193,
-157, 59,119,226,114,114,114,252,111,222,188,185,123,198,140, 25, 69,148, 82, 94,120,120,120, 98,113,113,113,189,235,215,175,239,
-248,250,235,175,139, 40,165, 60, 99,117,203,204, 91,121, 35, 85, 22,205,170,170,193, 2,128,240,240,240,136,188,188, 60,191,219,
-183,111,159,248,242,203, 47, 21,165,230,227, 73, 97, 97,161,239,205,155, 55,143, 13, 29, 58, 84, 81, 21, 61,173, 86,139, 30, 61,
-122, 40,110,220,184,113,172,176,176,208,247,206,157, 59, 79,202,214, 93,187,118,237, 68, 94, 94,158, 95,120,120,184,177, 5,248,
-252, 21, 43, 86,164, 46, 92,184, 48, 53, 51, 51,243,231,229,203,151,103,218,218,218, 66,171,213,190, 50, 88, 25, 89, 57,231,155,
-124, 50,246,135, 29,127,156,189,179, 98,254, 87,173,164, 18,177,104,214,146,205, 23,117, 60,220, 52,210,100,238, 44, 40, 40,112,
-125,240,224,193,175, 19, 39, 78, 84,157, 62,125,218, 32,149, 74, 97, 98, 98, 2,177,248, 99,108, 67,106, 40, 0, 75, 82,250, 6,
- 89, 38,175, 88,251,155,250,241,139,244, 87,198, 10, 98, 11,220,137,205,195,119,171,247,177,223,119,179,125, 1,138, 68, 48,136,
-174, 92,147, 95, 0,150,100, 12,111, 36, 76,250,253,167, 9,234, 23,209,143, 94, 51, 66, 81, 15,239, 96,249,156,177,236,162,174,
- 86, 47,192,146, 20, 16, 68, 25,155, 90,189, 94,223,103,241,226,197,197,177,177,177,175,105,198,199,199, 99,201,146, 37, 74,181,
- 90,221,219,232,135, 82,204,175,111,160,212,110,231,141,236,218,163,190, 28, 38,149,234,115,128, 91, 63, 2, 2, 25, 32, 54, 71,
- 3,223, 90,152, 61,226, 19,193,228,253,105,254, 0,235, 6, 70,232,103,108, 58,249,124,254,177,197,139, 23,203,164, 82, 41,158,
- 61,123, 6,137, 68, 2,169, 84,138,160,160, 32,172, 92,185, 82, 38, 18,137, 78,148,181,239,172,178,201,218,253, 44,237, 97,162,
- 10, 16, 72,144, 85, 12, 12,255,225, 72,110, 78,190,178, 79, 85,204,213,155, 38,107,194,132, 9,217,233,233,233,144, 72, 36, 72,
- 76, 76,196,128, 1, 3,178,255, 33,230, 10, 0,138, 1, 56, 3,136, 1, 16, 11,224, 1, 33, 68,132,247,152,158, 45, 50, 50,242,
- 94, 66, 66, 2,190,248,226, 11, 12, 30, 60,216,242,211, 79, 63,197,139, 23, 47, 16, 19, 19,115,255,125, 18,170, 84, 42,239, 36,
- 37, 37,213,157, 48, 97,194,108, 23, 23,151, 45,214,214,214, 23,173,172,172, 46,184,184,184,108,158, 49, 99,198,119,169,169,169,
-245,181, 90,237,131, 42,220, 31, 74, 41,125, 22, 27, 27,123,120,251,246,237,225, 19, 38, 76,136,251,244,211, 79,147,198,143, 31,
-159,250,235,175,191,166,220,191,127,255,105, 94, 94,222,169,202,162, 97, 28, 31, 1,198,206, 10,221,199, 3, 77,135,213, 34,151,
- 62,173,137,194,129, 53, 81,244,185, 39,185,218,219, 3,173,171, 51,219,118,195,134, 13,169, 94,175,167,167, 79,159,166,157, 58,
-117, 42,110,214,172,217,213,192,192,192,218,213,153,193, 59, 44, 44,236,100, 80, 80, 80,223, 55,215, 53,106,212,168,127,249,117,
- 45, 91,182,140,104,217,178,101,126,139, 22, 45,158, 27,147,206, 22, 45, 90, 68, 53,109,218,180,184, 69,139, 22, 81,229,215, 7,
- 7, 7,119,111,221,186,245,177,242,235, 26, 53,106,212,237,205,117,239, 58,247,182,109,219, 38,198,196,196,208,151, 47, 95,210,
-206,157, 59,167,148,173,111,211,166, 77,226,163, 71,143,232,211,167, 79,105,199,142, 29, 83,170, 59,123,121, 80, 80,208,136,230,
-205,155, 95,127, 35,205,195,223, 92, 87,145,102,243,230,205,175, 7, 7, 7, 15,127,115, 93, 80, 80,208,136,247,157,101,221,209,
-209,209,187, 65,131, 6, 25, 43, 86,172,160, 53,107,214,204, 40,255,155,127,216,231,223,229, 21, 20, 21, 76,153,191,238,119, 91,
-191, 30,117,171, 51,115,123, 96, 96, 96,237, 22, 45, 90, 92,253,228,147, 79,138,111,223,190, 77, 41,165,180, 97,195,134,244,163,
-154,181,126,159,159,144,110,240,107, 74,215,251, 29,139,154,227,246,228,179, 16,185, 58,252,167,206,148,158,159, 74,111,174, 27,
- 78, 67, 61, 68,134,107, 83, 92, 99,232, 6,223, 19,116,179,119, 11,186,170,150,200, 40,205,141,158,205,233, 6,223, 19,145,179,
-221,158,244, 12,180,213,236,222,186,129, 62,123,246,140, 30,222,191,139, 54,174, 41, 43,209, 92,239,119,154,174,243,107,101,148,
-230,235,207,124,211,208,208,208,162,223,127,255,157, 62,123,246,140,158, 57,115,134, 54,109,218, 84,209,160, 65,131, 86, 70,159,
- 59, 64,232,186, 58, 61,244,107,125,174,204,104,107,146, 55, 60, 68,162, 30,216, 64,164,233,238, 47,212,182,247, 18,234,155,184,
-241, 13,245, 29, 25,214,207, 22,180,189,143, 84, 77,215,251, 92,166,235,253, 58, 24,155,206,218,181,107,191,116,119,119,167,239,
- 90,188,189,189, 51, 91,182,108,201,175,206,125, 15,177,135, 91, 91,111,113,234,185,249,173,105,215,122,166,217,141, 93,249,173,
-223, 55, 47, 1,104, 96, 99, 99,147,181,101,203, 22,106,111,111,159, 9,192,255, 31,145, 63, 75,214, 89, 1,232, 14,192,182,244,
-255, 38, 0, 90, 1,168,249, 30,154, 77,218,183,111,175,187,119,239, 30,125,254,252, 57, 61,121,242, 36,109,218,180,169, 30, 64,
-216, 63,230,217,228, 52,185,165,220, 66,254,155,209, 73, 66, 72,219,183, 13, 70, 22, 24, 24, 72, 59,116,232,160,188,116,233, 82,
-145, 70,163, 25,121,247,238,221,195,239,171,249,223, 72,231,127, 67,179,117,235,214,215, 25,134,169, 89,218, 5, 56,229,236,217,
-179, 13, 1,160, 85,171, 86,215,121, 60, 94,205, 82,211,155,114,238,220,185,134, 31,219,185,151,225,228,228,228,205, 48,204, 41,
- 0,234,164,164,164, 87,189,157,236,252,187,135, 90, 89,154,183,202,203,203,191,159,246,248,208,137,247, 73,103, 80, 80, 80, 55,
-177, 88,188, 33, 52, 52, 84,126,254,252,121, 89,120,120, 56,249,168,174,231,106, 79, 17, 68,162, 32, 80, 76,127,156,172,240,248,
-238, 72, 86,173, 79,218, 52, 21,108, 61,120,137, 93,218,203, 46,182,137,167, 60, 14, 2,246, 7, 16,245,109,124, 22,175, 54, 90,
- 83, 74, 26,193, 32,152,254, 32, 81,225, 54,229,207, 92,175,182,189,135,243,142,236,217,192,254,216,195, 58,182, 73, 45,147,151,
-160,248, 1, 98,197, 13,163, 53, 95,127,238,155,138,197,226, 19, 3, 7, 14, 52,217,189,123,183, 82,165, 82,117,185,119,239,222,
-133, 42,157,251, 38,223, 26, 48,144,133,160,212,181,242,175, 71, 60,131, 1, 11,241, 85,212,203,127,194,125,111,236, 64,220,228,
-230,226,163, 10,165,126,130, 49,145, 43, 99, 52, 9, 33, 13, 44, 45, 45,119,228,230,230,246, 55, 38,114,245,191, 60,119, 66,136,
- 45,128,224,210,168, 21, 1, 16, 97,108,212,166, 2,205,102, 60, 30,111, 90,173, 90,181,234, 61,127,254,252,177,193, 96,248,145,
- 82,122,241,223,240,238,248, 55,104,126,108,252, 45,125,216,165, 82,233,189,139, 23, 47,158, 20, 10,133,223, 95,187,118, 77,253,
-111,186,224,231,207,159,111,242,182,245, 23, 46, 92,104,242,111,185, 6, 41, 41, 41, 49, 0,220,222, 92,159, 17,113,232, 6,128,
- 27, 31,226, 24,119,239,222, 61, 28, 22, 22,118,250,218,181,107, 51,229,114,121,199,143,238, 34,142,141,213, 96,181,231, 93,136,
- 68, 75, 2,156,101,211,191,235, 76,201,226, 83,215,221,150,246,178,123, 89,153,185,170, 68,243, 54,164,186, 37,245, 93,101,211,
- 23,117, 7,249,225,196, 86,183, 31,123, 88,191,172,204, 92, 25, 67,120,120,248,181,192,192,192, 78,123,246,236,217,166, 82,169,
- 70, 84,102,174,222,138, 41,147,134, 98,221, 28,232,120, 1,160, 16, 85, 16,154, 87,128,225, 61, 70, 6,210,255, 41,183,236,102,
- 26, 77, 0,224,255, 33, 53, 41,165,247, 1,248,253, 19,179, 40,165, 52, 19,192,177, 15,172,121, 21,192, 85,238,213,205,193, 25,
-172,119,112,229,202,149, 64,238,210,115,252,183,185,120,241,162, 26,192,119,165,203,199, 71, 57,147, 21, 88, 67, 58,246,207, 81,
- 82, 5, 40, 73,130,128, 93, 81,101,115,245, 22,147,213,200, 77, 58,225,192, 72,169, 2, 20,105,160, 88,254, 62,230,170,188,201,
- 2, 80,179,218, 2,125, 34,181, 0,226, 64, 72, 60,230,226,221,141, 21,231,226, 85, 61, 6, 7, 7, 7,199,191,198, 96,113,112,
-112,124, 64,147,181,191,206, 29,100,241,166,128, 65, 77, 64,159,128, 98,125, 26,198,198,107,222, 83,243, 22,178,200,120,240,224,
- 13,145, 62, 22, 69,154, 52,140,122, 15,205, 15, 77,137,121,122,183,129,154,195,101, 13, 14, 14, 14,206, 96,113,112,112,188, 15,
- 37, 81,157,164,210,229,159,171,201,193,193,193,241, 47,130, 0,104,251,142, 15, 68,163, 27,175, 17, 66,218, 86,227, 3,244, 44,
-167,201,105,114,154,156, 38,167,201,105,114,154,255, 46,205,202,180, 63,154,198,243,255,205, 46,138,224,186,176,114,154,156, 38,
-167,201,105,114,154,156, 38,167,249, 47, 92, 24,112,112,112,112,112,112,112,112,112,124, 80,254,214, 54, 88, 50, 27,111, 71,240,
-153,122,132,165,190, 0, 64, 25, 18, 5, 61,251, 80,145, 21,147,250,190,218,196,190,174,204, 68,192,219, 85,164, 51,124, 74,211,
- 31, 41, 62, 68,122, 9, 33,205, 80, 50,188, 64, 66,105,119, 97,227,246,179,241, 54,177, 55, 55,105,175,209,104,189, 68, 66,126,
-106,122,161,230, 15,154, 25, 89,204,101, 63, 14, 14, 14, 14, 14,142,127,153,193,242,110,210,243,138,137, 76,238, 5, 0, 6,150,
-194,192, 2, 5,185, 25, 55, 18, 30,158,233, 9, 0, 78,254,109, 14,136,229, 54,161, 6,150,130,165, 20, 6,150, 66,167, 86, 62,
-203,140, 60,102,212,204,243, 38,118, 62, 61,219,182,111,219,171, 75,151, 79,124,234, 6,212,245, 4,128, 71,143, 31,197, 30, 61,
-122, 44,218,196,206,231,207,162,140,232, 3,239,115, 98, 38, 2,193,119,193,141, 66, 58,220,185,115,107, 38,128,111, 63,208,245,
- 18,210,171,157,183,147,102,199,219, 84,101, 39,123,115,147,246, 61, 58,183,247,157, 50, 97, 20, 25,254,205, 98,151,194, 43, 23,
- 38,201, 29,235, 22, 82,170,190,174, 76,127,118,143, 82,202,114, 89,145,131,131,131,131,131,227, 95, 96,176, 76,100,114,175,115,
- 7, 55,217, 29,184,154, 8, 0,104,219,208, 1,243,126,218,210,131, 16, 18, 13, 0,189,191,254,201,251,187,137,195,112, 61, 34,
- 3,148, 82, 52,240,178, 70,247, 79,199, 24,117, 80,169, 67,157,224,254,253,250,125, 58,101,202,228,110,207,158, 61,139,223,189,
-123,247, 21, 0,104,222,162,133,215,162, 69,139,250, 45,179,180, 18, 75, 29,234, 36, 43,211, 34,239, 84,203, 92, 57,120,218,248,
-249, 7, 15,223,189,241, 71,126,171, 78, 3,190, 48,113,240, 92, 94,148, 22,155, 85, 29, 45,177,171,127, 77,115,129,112, 30, 97,
- 24,190,185,157,187, 29, 0,152, 57,250, 29,183,243,108,102, 48,177,176,123, 80,172, 84,110,203,120,114,114, 99, 69, 19,118,106,
- 52, 90,175, 9, 95,127, 78,238, 63,207, 70, 77,255,102,204,170,197, 51,193,234,245,102, 19,103,204,111,127,235, 22, 0,224, 46,
-151, 21, 57, 56, 56, 56, 56, 56,254, 5, 6, 11, 0, 76,164,124, 68,191, 72, 3, 0, 88, 72,129, 47,135,246, 65,122,122,154,183,
-214,192, 98, 72,255,158,184, 23,149,138,232,184, 76, 80, 74,225,237, 34, 51,250,160, 60,176, 65,159,127,241,121,203, 83,167, 79,
-223,254,110,214,119,219, 9, 41, 25,189,123,195,175,191,133,206,158, 51,123,196,224,161,131,219,237,223,191, 63, 2, 64,181, 12,
- 22, 35,176, 88,241,195,162,185, 38, 73,153, 42,213,132,201, 83,121,147, 38,142, 91, 6, 96,104,117,204,149,159,171,203,247, 87,
- 78,239,151,201,100, 50,108,220,184, 81, 12, 28,194,192,110, 45, 68,157, 63,249, 4,181,125, 3,154,252,184,102,119,189,211, 34,
-209, 23, 54,222,237,122,102,197,156,121,107,213,166, 72, 36,124, 54,119,201, 47,190,212,194,151,204, 28,217, 9,117,106, 57, 34,
- 57, 51, 31, 45,218,119,231,221,190,125,183, 9,103,176, 56, 56, 56, 56, 56, 56, 62, 46, 42,108,228,110, 48, 80, 68,199,165, 34,
- 58, 46, 21,183,163, 50,161,101,121,248,105,225,116,252, 48,119, 42,178, 21,192,129,235,137,136,137, 75, 67, 76, 92, 26,178,114,
-139,254,178,255,155, 93, 45,127, 90, 34,107,184, 98,133,249,143,237, 91,200,195,172, 44, 45, 45,159, 70,108, 47,158, 61, 41,221,
-111,222,132, 68,161, 64, 98,159,100,105, 95,163,201,190,253,251,235,216,219,218,201,205,204,204,167, 90,249,182,223,100,225, 30,
-102, 94,145,230, 95, 76,161,131,127,203,174, 93, 59,119,118,176,183, 99, 71,173, 8,143,170,227, 91, 91, 95,219,219, 55,204,196,
-193,167,229,187,246,121,155,166,216,213,191,166,167,163,253,247,151, 78,238,151,169, 84, 42, 60,126,252, 24,217,217,217,165,219,
- 3,246,246,142,112,115,113,194, 47,139,167,200,230, 78, 31, 19, 40,150,200, 14, 17, 66,200,219, 52,211,243,139, 78, 31, 59,113,
- 38,253,216,158, 95, 88, 0,200,204, 45,198,133, 59,207,112,247, 73, 98,149,110,214,127,163,235, 42,167,201,105,114,154,156, 38,
-167,201,105,254, 19, 52, 63, 54, 42,140, 96,197, 38,230, 32,250, 69, 26, 6,119, 9,130,139,179, 35,110,199,228, 34,191, 88,135,
-188, 98, 45,242,138,181, 96,249,166, 72, 43,200, 67, 65, 78, 58,158, 38,100,161,178,137, 41,120, 98, 65,255, 9, 19,242,167, 20,
- 45,172,157,122,241,196, 88, 56,219, 62,173, 51,109, 90, 94,187, 21, 43,204, 53,118, 14, 22,126,163,135, 15,233,112,232,192, 31,
- 68,163,214,192,195,221, 85,210,188, 93,247, 97,191,109,217,233, 0,160,147, 49, 39, 99,107, 91, 71, 46, 54, 49,217,254,253,119,
-147, 37,139,127,143,142, 47,214,160,248,207,235,233,207,167, 76,159,109, 54,242,179,126,191,218,218,214,105,144,105, 68,227,114,
-177,171,127, 77, 55,107,235,239,175,158,218, 47,211,106,213, 72, 77, 77,133, 70,163,129, 94,175, 47,249, 93, 34,129, 88, 34, 65,
-129, 82,143,172,124, 53, 90, 54,111,194,107,120,234,170,175, 86,171, 29, 9, 96,253, 95, 50, 98, 86, 76,145,169,115,128,252,248,
-161,189,204,158, 51,247, 97, 33,151,226,250,189,103,184,123,249,184,129, 82,245,245,178,237, 76,157,106,123, 3,146, 83, 32, 68,
-252,106,103,194, 38, 21, 38, 61, 10,226,178, 42, 7, 7, 7, 7, 7,199, 71, 96,176,138, 20,197,207,134,142,154, 12, 79, 59, 7,
-243,238, 97,126,162,240,216, 60,100,166, 38,224, 89,204, 99, 40, 84, 58, 8, 45,107, 2, 18, 7,184,123,184, 33, 42,233,154,102,
-253,186,219,249,172, 94,245,236, 93,122,221,187, 59,185, 56,218,202,153, 31,151,214,184, 25, 19,157, 27,184,107,214, 22,124,250,
-169,137,205,143, 75,107,220,140,127, 46,103,100, 98, 67,147,161, 3,186, 19,232, 20,152, 54,109, 10,186,119,233,136,207,135,245,
- 35, 59,119,255,222,216,216,147,209,136, 36, 75,102,127, 55,223, 52, 45, 79,171,189, 29, 83,164,150,201,165,210,107, 79,139,138,
-253, 61, 44,165,221,250,143, 42, 56,184,123,205,124, 0,147, 42, 51, 87,142,102,102,223, 95, 63,251,135,140, 82,138,228,228,100,
-104,181, 90,232,116,186, 87, 6,203,194,194, 2,121,197, 90,104, 50, 20,200,200, 83, 67,111, 96,209,169, 99, 39,217,221,123,145,
-131,222,102,176, 0,128,101, 9,171,215,107,113,224,244, 93, 36,222,217, 71, 9, 17,190,106,228, 94,102,174, 28, 28,106, 92,238,
-210,107,136,173, 72, 82, 82,221, 90, 88,172,198,182,245, 75,185, 92,202,193,193,193,193,193,241,177, 24,172,152,235, 7,154, 3,
- 64, 96,219, 33,233, 38, 18,190, 29,159, 33, 72, 79,138,197,182,101,227,193,178, 20,157, 71,252, 8, 83, 15, 7, 72,133, 60,168,
-139,115,242, 83,239,239,179,175,232, 64,132,232,218,173,217,144,236, 49,102,116, 45,179, 93,187,138, 4, 0,176,107, 87,145, 96,
-244, 40, 87,179,181, 27,226, 60,154,180,105, 9,106, 48,160, 75,247,222,232, 63,160, 63,226,211, 20,248,227,242, 75, 40,148, 90,
-163,230, 63,147,216,123,187, 59,185,122,245, 30, 63,184,141, 41,159, 71, 72,109, 55,115, 94, 98,166, 78,207,227, 9, 12, 71,238,
-228,167,244,234,218,195,230,204,145,157, 29, 37,246,222,171, 85,233, 49,241,239,210, 49, 23, 8,231, 93, 59,253,135,140,199,227,
- 33, 33, 33, 1, 90,173,246,213,162,211,233, 74,140,143, 82,135,212,108, 53,132, 58, 37, 50,242,212,200, 45,214,194,209,204, 2,
- 58,157, 46,224, 93,186, 6, 86,125,164,107,207,193, 93,193, 80,134,165,244,160, 42,237,209,171, 52,148,153,171,142,221, 63,181,
-189, 28, 30,139,103,119, 79,228, 82, 86, 95,114, 48,194,114, 83,149,112,112,112,112,112,112,252, 63,195,168,129, 70,147,211,115,
- 96,109,194,135,173,147, 7, 6,141,255,169,196, 48, 24,116,160, 20,208, 27, 88, 24, 51,103, 61,165,130, 51, 95,141,246,136,115,
-247, 32,249,131, 62,149, 41, 1, 96,208,167, 50,165,187, 7,201,255,106,180, 71,156, 66,107,169,213, 27, 12,184, 22,145,129, 31,
-247, 62,193,236,173,143,112,242,174,241,195, 97,241, 5,210, 9, 63, 44, 94, 36,227,243, 8,137, 72, 40, 42, 74,202,214, 23,241,
- 4, 2,173, 76, 38,162, 26,202, 87,199,103, 26,178, 59,246, 29, 29,207,227, 9,198, 84,158, 86, 22,148, 82,168,213,106,104, 52,
- 26,104,181, 90,104, 52,154, 87, 6, 43,191, 88,135,212, 28, 21, 18, 51,149,120,153,169, 68, 82,166, 18,233,185, 42,188,171, 35,
-161,169, 83,109,111,107, 11,171, 11,214,150,166,211,173,204,204,166, 90,152, 88, 92, 44,169, 14,124,221, 92,221,140, 72, 65,236,
-253,179,233, 6,173,162, 95, 97,242, 3,251,194,228, 7,246, 92,245, 32, 7, 7, 7, 7, 7,199, 71,104,176, 88, 0, 79, 19,178,
- 32,226,179,112,113,247, 4, 45, 55,129, 61, 5,160, 55, 84, 60,169,125, 25,135, 14,165, 36,213,242, 42,102,167, 78,125, 25, 26,
- 80,215,250,225,232, 81,174, 81, 1,117,173, 31, 78,157,250, 50,180,150, 87, 49,171, 51,136, 12,148, 82,176, 20,165, 11, 5, 53,
-198,185,149, 66, 8,175,113, 3, 95, 55,254,188, 93, 79, 95,142, 89, 27, 19, 45, 20, 10,117, 46, 54, 50,226,102, 47,227,213,176,
-149,138,212, 58, 70,237, 83,183,145,150, 0, 13, 43,210,201,215,105,231, 52,235,208, 87,161,213,234,225,234,234,250,154,185, 42,
-171, 34,204, 87,104,145,154,171,194,203, 76, 5, 18, 51, 21, 80,168,245,120, 28, 19, 7,194,240, 30,191, 77,211,204,212,234,212,
-177,131,251,106,212,247,171,101, 87,199,219,221,110,227,214,237, 53, 36, 18,139, 83,166, 78,181,189,107,120,248,132,223, 58,251,
-187,237,205,136, 20, 36, 68,223, 77,211,171, 11,118, 23,167, 71,157,227,178, 38, 7, 7, 7, 7, 7,199, 71,108,176, 0,192,205,
-197, 30,183, 30, 39,192,205, 86, 2,115, 51, 83, 68,197, 38,129,199, 8,192, 16, 64,167, 55,222, 4, 81,173,110,239,207, 63,155,
- 47, 75,136, 51,220, 90,187,238,249,179,132, 56,195,173,159,127, 54, 95, 70,181,186,189, 64, 73,239,188, 18,147, 85, 98,180, 12,
- 85, 24,126,147, 82,214,206,214, 66,194,191,251,188, 56,155, 97,120,106,107,115, 9,107,109, 46,102, 28, 45,196, 2, 23,107,161,
- 80, 36, 98,224, 96,107,163, 7,165, 21, 86,101,170, 19, 35, 94,164, 22, 20,204,108,222,190,183, 66, 32, 16,192,195,195, 3, 26,
-141,230,181, 70,238, 25,153,185,175, 34, 88,169, 57,106, 72, 69, 12,238, 95, 59,167, 48, 24,116,219,222,166,201, 19, 8,205,109,
-108,172,241,237,130,159, 49,117,206,207, 72, 46,224, 67, 40, 22, 59,184,123,248, 63, 24, 58,102,150,236,235, 13,207, 48,180,133,
- 57, 20, 89,177,201,138,116,201,116, 46, 91,114,112,112,112,112,112,252,255,166,242,169,114, 40, 96, 34,147,128,242, 36,184, 18,
- 30, 11,159, 58,245,176,245,240,109,120,213,109,140,212, 66, 61,170, 50,157,225,228,233,138,123, 0,238,117,239,238,228,210,179,
-167,115, 59, 74, 5,103,214,174,207, 79, 2,128, 77, 71,122,129, 2, 96, 89, 90, 98,180, 74, 71,136, 55, 22, 2,164, 36,164, 23,
-154,122, 56,200, 17,153,164, 85,203,197, 66,198, 82, 46,226,217,154,139,132, 66, 62, 31, 6, 74,212,217, 57, 25,133, 0, 73,169,
- 76, 75,157, 24,241, 66,236,234, 63,179, 69,167, 1,223, 95, 57,249,187,204,211,211, 19,247,239,223,127,101,176, 10,139,138,145,
- 83,160,132,204, 10,240,118,145,227, 73,248, 21, 67,118, 70,114,100,110,204,201,141,111,211, 99, 89,240, 84, 90, 3, 30, 60,207,
- 71, 94,177, 14,121, 69, 90, 52,109,213, 85,216,180,109, 55, 92,126,156,133,220,124, 5,230,110,249,179,192, 64,117,253, 41,141,
-212,113,217,146,131,131,131,131,131,227,255, 55, 70,185, 35, 3, 75, 97, 99,109, 5,137,220, 12,113,233, 90, 20, 18, 59,228, 42,
- 40, 12,134,138, 35, 88,132,144,182,111, 91,127,232, 80, 74,210,193,131,153,155, 14, 29, 74, 73, 42,239,228,216, 87, 85,132,165,
-127, 89,106,180, 38,165,134, 19, 71,206, 92,207,233, 22, 98,107,201,240,120, 74,161,128, 81,243,133, 60,173,144,207,232,132,124,
- 70, 99,111, 38,224,157, 63,188,147, 33,132,158, 55, 70, 83,157, 24,241, 34, 46, 35, 99,102,235, 46, 3, 21,118,246,246, 24, 60,
-120, 48, 92, 93, 93, 1, 0, 38, 18, 2, 27,145, 2, 60, 85, 10, 46, 29,222, 92, 28, 21,126, 33, 28, 6,117,207,242,163,185,191,
-166, 73, 41,155,149,167,134, 82,163, 71,110,145, 22,185,197, 90,232,109, 67,113,240,122, 10,178,242, 53,136,189,190, 93,161, 86,
-228, 78, 80,165, 63,141,171,208, 68,190,227,220,223, 7, 78,147,211,228, 52, 57, 77, 78,147,211,252, 39,104,126,108, 24, 49,217,
- 51, 69, 45, 71, 57,188,156,229, 80,105,237,160,210, 24, 80,172, 50,160, 64,161, 69,129, 66,135,184, 52, 5,158, 94,120,255,132,
- 80, 0,148, 5, 8, 74,170, 10, 65, 74,140, 29, 37,198,237, 95, 44, 40, 88,246,227,162,185, 3,246,236,251, 19,227, 62,113,116,
-125, 24,167, 73, 33,132, 81, 50, 60,190,206,202,148, 47,120, 30, 27,157,122,233,244,254,160, 98,145, 98,184,177,105, 42,139,100,
-249, 52,108, 61, 15, 20,124,141, 50, 95, 62,189,105, 29, 60,120,240, 80, 21, 21,155,166,231, 73, 44, 30,178, 6,237,142,220,152,
-138,167,202, 97,132,146, 39, 55,195, 31, 53,150, 90,187,161, 72,169, 67,161, 82, 7,133,186, 36, 26,246,242,254, 33, 77, 94,114,
-212,239,133,201, 15,182,114,217,145,131,131,131,131,131,227, 95, 98,176, 20, 74,197,179,118,189,134,191,154,208,217, 96,160, 96,
- 89, 10, 67,105,132,137,165, 20,122,173,242,217,251, 38,196,192,178,183,215,109,221,211,185,126,131,198,188, 58, 53, 76, 80,144,
-155,137, 59,183,110,232, 41,203,222, 48,202,160,197,199,171, 77,236,125,251,245,235,221,115,207, 23,163,198, 21,180,104,209, 74,
-108,109, 99,166, 77,207,204, 40,216,185,113,183,225,232,159,123,130,192,178, 67,104,124,188,186, 42,233, 82, 39, 70,188, 0, 48,
-168,212,177,183, 6,234,180, 84,102, 62,237,162,200,136, 57,111,172, 70, 86,114, 98,175,159,126, 88, 24,223,109,208, 87, 34, 75,
-123, 79,104,116, 60,164,167,167,227,249,237, 3,170,162,148,136,131, 69,201, 15,134,115, 89,145,131,131,131,131,131,227, 95,100,
-176,158,222, 40, 25, 15,235,191, 77, 78, 78,250,224, 29,187,255, 92,184,115,239,225,166,106,173,214,153, 5, 47,209,160,211, 93,
- 18, 23,102,207, 54, 86,163, 40, 61, 42,146,184,187, 7,253,246,203,178,137,191,174,249,185, 13, 88,131, 15, 8,137, 35,132,158,
- 47, 18, 42,190,172,170,185,122,155, 87, 34,205,142,183, 7, 80,165,137,163, 21, 89, 81,105, 38,246,181, 92,119,255,186,244, 71,
-134,225,181, 55, 24, 88, 1,107,208, 61, 51,104, 85, 63, 40, 51,163, 15,211,170,116,151,228,224,224,224,224,224,224,248,255,111,
-176,254, 87,228,196,222, 42, 4, 48,238,125,117, 74, 77,212,226,210,229,131, 66, 41,125, 12,224,113,117,246, 45, 74,127,158,137,
-106, 76, 56,205,193,193,193,193,193,193,241,255, 15,134,187, 4, 28, 28, 28, 28, 28, 28, 28, 28, 31, 22, 2,224, 29,189,242,140,
-159, 41,187, 58,189, 9, 42,211,231, 52, 57, 77, 78,147,211,228, 52, 57, 77, 78,243,227,211,172, 76,187, 42,254,227, 31, 13, 45,
- 29, 49,253,191,177, 0,104,203,105,114,154,156, 38,167,201,105,114,154,156, 38,167,249,111, 91,184, 42, 66, 14, 14, 14, 14,142,
-127, 29, 54,222,221, 76,108,188,187,153, 24,187,189,109,157,190,246,182,117,250,218,115, 87,142,195, 88,248,220, 37,120,127, 8,
- 33, 98, 0, 44,165, 84,251,119,165,193,210,178,166,153,222,212,230, 0,195,170,127,200, 79,124,120,230, 67,159, 95,157, 58,117,
- 26, 0, 64,100,100,228,125, 74,233,251,246,198,132,220,222,103,160,165,153,197, 72, 45,171, 49, 40,138, 21,235,138,210, 98,246,
-127,200, 52,219,218,214,145,107,196,210,165, 32,180, 19, 40, 24, 74,200,121, 94,161,110, 98, 94,222,131,252,138,246,171,209,125,
-177,239, 23,253, 62,153,181,233,247, 99, 11, 95, 30,154, 17,245,230,239, 86,157, 86,155,142, 29,210,126,218,154, 61,135,150,100,
- 29,158, 90,196,229,254,170, 83,163,217,167, 22,122,190, 3, 47,229,226,178,236,170,236,231,226, 19, 26, 33, 16, 8,108,181, 90,
-109, 70,114,204,205, 0, 99,246,113,245,109,114,143,199, 99,156, 12,122, 54, 41, 49,250, 58, 55,113,186, 17, 72,237,106,133, 66,
-175,255,150, 2, 4,132,255,147, 42,251,249,123,141,116,232,228,228, 36, 53, 55, 55,111, 97,102,102,230, 42,147,201, 36,185,185,
-185,202,220,220,220,151, 9, 9, 9,231, 41,165,250,191,227, 28,109,253,123,204,224,139,152, 57,165,255,158,151, 25,113,112,113,
-197,219,119, 95, 72, 24, 50,163,244,223,139, 51, 35, 14,205,250, 39,220, 43,251,186,189, 66, 64,217,137, 12,195,107, 98,160,250,
- 69, 25,143, 14,173,173,202,254,161,161,161, 61,116, 58,157,184,236,255, 2,129, 64,125,227,198,141,131,220, 83,240, 55, 25, 44,
-151, 58,125, 45,117,124, 58,151,207, 99,122,179,148,154,166,222,223, 39,255, 39,159,160, 91,200,144,187, 12,195,184,148, 95,199,
-178,108, 82,194,173,237, 31,164,176, 37,132,184,252, 52, 33,112, 90,122,182,178,128, 16,178,224, 93,230,195,190,193,192,235,132,
- 33, 53, 9, 33, 96, 24, 2, 94,201, 0,170, 41, 47,111,237,104,248, 22, 77, 71, 51, 57,223,187,160, 88,255,152, 82, 90,233, 75,
- 72,106, 93,219, 73,102,237,124, 41,172,199, 88,143,187,167,183,248,153,216,251,182, 41, 74,143,138,252, 0,231,102,235,233,233,
- 25,236,237,237,109, 61,118,236, 88, 33, 0, 44, 95,190,220,203,203,203, 43, 59, 54, 54,246, 14,165, 52,179, 90,230,202,206,119,
-240,202,101,243,183,119,234,212, 25, 41, 89,197, 88,250,243,154, 48, 19, 7,239,190, 31,202,100, 17,167, 64,169,133, 92, 30,241,
-245,196,217,206,157, 91, 5,243,115,139,181, 56,126,254,246,160,253,155,126,104,109, 97, 81, 63,160, 34,147,197, 42,242,103,217,
-155,208,142,172, 34, 31, 0, 6,190,249,187,179,137,174,173,173,212,208,209, 81,204,191, 15,224,207, 74, 95, 46,193, 67, 79, 9,
-132, 66, 55, 66, 24, 48, 4,224,241, 8, 24, 66,192, 16, 64,175,211, 36, 60,187,178,185,195, 63,162,160, 14, 28,156, 70, 8,177,
-102,152,146,244, 17, 2, 48, 12, 3,126,201,200,191, 5,207,175,111,177,254, 0,249,201, 60,192,203,194,255,147,166,205, 54, 95,
-122,145, 35,175,209,114,226, 49, 66,153,181, 9,151,127,122, 96,204,254, 18,137,196,242,200,145, 35,182, 29, 59,118, 52,183, 15,
-232,113,201,152,125, 76, 68,146, 58, 71,143, 30, 22,118,236,216,161, 10,249,211,167, 29, 24,102, 7, 1, 4, 44, 75,151,243, 88,
-250,123, 81,118, 76,108, 85,135, 83,177, 11,232, 49, 31, 4,126, 70,239, 64,241, 36,227,241,193,217,213,188,182, 60,169,157,207,
-103, 82,137,100, 74,109, 31, 63,239,184, 23,177, 49, 5, 5,249, 63, 43, 51, 98, 54, 81, 74,217, 42,137,233,244,223,156,189, 18,
-222,137, 47, 16,144,142,109, 66,120, 0,222,203, 96,217,219,219,247, 88,189,122,117,173,208,208, 80, 0,128, 94,175, 55,219,183,
-111,159,195,130, 5, 11,228,198, 60, 67,111,195,217,217,217,217,220,220,188,134, 84, 42,117, 6, 0,165, 82,153,156,159,159,255,
- 50, 57, 57, 57,185,178,125, 29, 26,244,181, 97, 24,204, 63,249,231,175,124, 0,232,208,107,228, 66,143,176,111, 44, 9, 79,160,
-124,219,246, 6,189, 70,206, 16, 50,241,220,145, 45, 4, 0,218,116, 27, 54,221,182, 78,223, 95, 50, 35,247,165,255, 45, 31,244,
-125,251,242,108,158,106,123, 16, 74, 38, 5, 6, 5, 55,238,221,189, 19,252, 60,157,208, 99,192,232, 41, 0,170,100,176,116, 58,
-157,120,255,254,253, 46, 12,195,240,244,122,189,170, 95,191,126, 25,239,147,182,218,205,134, 94, 7, 33,174, 90,189,254,183,132,
-155,158, 11, 41,157,195,190,153,118,199, 56,254, 76, 16,102, 4,101,217,196,212,123,187,155,112, 6,171, 20, 27,239,110, 38, 60,
-177,240,113,171,230,141,173,167,143,238, 41, 90,255,251, 21, 56, 53,232,151,156,114,255,119,231,127,234, 9, 50, 12,227,114,112,
-215,106, 59,153,136, 7, 0, 40, 82,233,209,107,112,229,163, 65, 56, 7, 15,186, 8, 2,159,178, 58, 84,131, 65, 47,225,243, 5,
- 42, 2, 0,164,164,119,128, 84, 42,186,185,105,102,104,254,176,174, 53,135, 76,251,229,222, 86, 0, 22, 0,210,222,250, 80, 48,
-140,203,158,205,203,237,156,173, 37,224,243, 8,138,148,122,244, 28, 50,201,240, 54,195,182,105,102,232,252,193,157,220,251,219,
-117,252,163, 23,128, 19, 21,190, 64, 28,234,248,154,218, 56,157,233, 61,114,190,147, 2,102,248,110,225,114,187,107,167,247, 93,
-105,219, 99,184,246,101, 82,146, 66,175,213, 69,103,231,164, 78, 46, 76,137,121,106,108, 65,109, 98, 98, 82,203,196,196,164,126,
-167, 78,157, 36, 83,166, 76, 17,132,133,133,189,250,253,203, 47,191, 20, 94,188,120,209,113,217,178,101,157,157,156,156, 84, 69,
- 69, 69, 15,138,138,138,158, 83, 74, 13,198,222, 19, 7, 7,219,175,123,247,236,138,214,189,190,130,129, 37,248,114,204, 68,156,
- 58,241,231, 40, 0, 31,196, 96,153,240,152,121, 35,198,126,235,220, 34,180, 33,127,241,190,167,176,144, 9,209, 62,164, 33, 95,
- 34,248,198, 97,247,111,203,126, 6,240,249,219, 34, 87,172, 34,127, 86,128,141,102, 64,183,208,154, 56,188, 91, 51,192,165,237,
- 52, 48, 50,243, 87,145, 44,207, 78,227, 76, 45,165,210,213, 78, 22, 60, 59,177, 33,115,181,103,167,113,103, 99, 79,172, 42,172,
- 40, 45, 2,161,208,109,211,234,239,107, 91,154, 10,193,103, 8,120, 60, 2, 62,143,129, 74, 99,192,144,209, 51, 62, 84,132,145,
- 39,181,171,221,153, 1,134, 1, 0, 11,108, 81,102, 60, 61, 94,149,123, 66, 24,158,245,190,205,203,248,118,230, 98,240,120, 4,
- 60, 6,224, 49, 4,241,233, 74,140,157, 50,215,252,125,141,122,167,166,118,193, 23,127,105,217,161,113,128, 85,189,189, 55,136,
-121,227, 78,253,173,179, 84,178,207,246, 28,186, 48,160, 70,139, 73,183, 40,101,127, 76,188,178,226,116, 69, 58,106,181, 58,189,
- 67,199, 78,102,132, 47,151,157, 61,184,181, 5,159, 33,208, 25, 40,244,134,146, 65,144, 89, 74, 81,242,221, 82,242, 17, 67, 89,
-138, 17, 35,190, 64,135,142,157, 20,172,158, 77,170, 66,161,177,227,228,217,107,182,106, 29,139,101,171, 55,205, 47,206,207,156,
-255, 34,202, 58, 94,102,239, 61, 81,145, 30,115,216,248, 19,135, 95,204,245,125, 61,119, 29,189,137,128, 58,126, 37, 3, 53,179,
- 20, 62, 46,114,236, 58,118, 19,190, 62,190, 37,233,102, 41,188, 93, 77,208,242,147, 33,213,188,190, 97,124,185,189,239,238,110,
-125,134,246,233,213,103, 32,172, 44,205,160,209,170,189,207,157, 58,254,235,186,213, 75,155, 18, 66, 62,171,146, 57,164,134, 87,
-239, 5,202,178,239, 93,203,225,228,228,100, 27, 28, 28,252,234,255,122,189, 30, 30, 30, 30, 72, 78, 78,246,169,134, 89,147, 57,
- 57, 57,125,178,116,233, 82,187, 86,173, 90, 9,108,109,109, 1, 0,153,153,153,206,151, 46, 93,106,216,176, 97,195,140,148,148,
-148, 99,233,233,233,138,119,154, 10, 86, 37,228, 81, 62, 79, 44,150,150,250, 90, 48, 83,198,126, 90,207,214,214,246,173, 31,199,
-217,217, 57,162, 57,115,102, 19, 62, 95, 80,178, 61,165, 12,101, 13,239,156, 99,164, 73,147, 38,221,180, 90,173,228,109,191,101,
-233,109, 59,171, 88, 81,255,146,183, 8,192,231,241,114, 83,238,239,183, 53,218,180,215,235,222,222,145, 17,172,235,218,189,187,
-123,143,206, 97,112,180, 53,199,249,155, 49, 24, 63,243, 39,232,244,134, 21,213,185, 63, 60, 30,143,159,145,145, 17,111,105,105,
-233,240, 1,222,183, 53, 15,237, 90,101,119,225,202,221,233,191,136,247,140,174,213,108,152,174,164, 61, 82,201,204, 44, 62, 18,
- 51, 65,203, 30,109,205,172,156,125, 37, 27, 87, 47, 22,112, 17,172,242, 55, 66,196, 91,208,172, 73,176,245,244, 9, 95,136, 22,
-108,186,132, 27,167,142, 41, 83,238,239,251, 32,230,202,212,206, 39,148,240,248, 35, 9,143, 39, 39, 12, 17,177, 6, 54, 81,175,
-209, 44, 84,100,197,164,190,175, 54,203, 82,252,113,189,138,198,156, 82,175, 95,127, 89,102,103,111, 33,134, 74,107,192,176,175,
-191,195,134, 21,243, 77,109,205, 69, 80,107, 13,216,122,248,110, 86, 93,197,114, 58,172, 99,205, 33,223,111,138,248,243,199, 29,
- 81,127,150, 60,171,239,204,120,176, 51, 23,227,251, 61, 49, 48,147, 10, 96,105, 42, 4,195,188,221, 92, 13,235, 90,162,153, 87,
-168,209, 19, 66, 68,148, 82,205, 91,141,132, 99, 64,115, 51, 91,151,253, 61, 71,204,183,141, 73, 39,160,208, 34,214, 76,130,222,
-131, 71, 91,212,114,144, 66, 46,225, 33, 62, 49,213,227,155,169, 83,131, 36,142,190,193,170,212,168,151,149,157,182,187,187,123,
-175, 46, 93,186,200, 38, 79,158, 44,112,117,117,197,142,125,167,220,218,245, 25,215, 53, 57, 45,219,149,165,128,189,157, 85,226,
- 23,253, 59, 31, 57,126,252,120, 66, 98, 98,162, 96,233,210,165, 33, 7, 14, 28,168, 83,149, 47, 81, 3,165, 80,169, 13, 48,148,
-190, 24, 51,243,213,213,120,169, 16,230,221, 95,230,180,123,135,176, 96,254,242,131,207, 81,168,208, 67, 38,226, 35, 54,181, 24,
-161, 33,193,252,189, 27, 73,171,183,237,241, 69,191, 79,102,217,155,208,142,221, 66,107,194,206, 82,134,205,191,124,143,195, 55,
- 94,116, 76, 47, 34,176,233,182,116,164,163,152,223,206, 86, 38, 92, 29, 22,228,233,208, 58,208, 13,119,130, 60, 29, 46,135, 71,
-199,212,237,247,243,216,228, 34,193,217,156, 19, 99,223,106,180, 24,194,192,202, 84,136, 77,167, 18, 32,147,240, 33,151,240, 33,
- 23,151,252,101, 24,242, 94,249, 90,234, 84,199,149,199, 26,190, 48,115,170,243,197,128,126,125,157, 62, 29,208,151,130,199, 96,
-223, 31, 71,186,239,220,185, 35,213,196,193,103,163,129,225,109, 82,166, 68, 38, 86,126, 61, 1, 59,115, 17,190,217,248, 24,102,
- 82, 1, 76,101, 2,152,201, 4,104, 93,207,182,218,233, 36,132, 88,142,234, 94,171,243,195,237,109, 91,249,212, 48,169,253, 32,
- 54, 63,242,139,133,119, 87, 92,204,107, 53,225,151,229,117,172,139,242, 52,252,217, 83, 70,240,147, 82, 82, 90,237, 59,114,169,
-181, 83,163, 47,162,245,218,226,111, 51, 30,252,126,232,109,122,137, 81,215, 27,186,132,246,149,104,139,116,143, 30, 68, 39,121,
-230,170,197,136,136, 47,128, 92,194,135, 73,217,181,149,240, 33,151, 8, 96, 34,225, 35, 37, 41, 14, 57,197,188,171,201,214, 76,
- 43,122,241,122,149,170,162, 84, 90, 3,238,191, 40,130,187, 79, 3, 56, 58, 58, 65,211,121,144,251,173,243,127, 28,146, 59,250,
- 45, 46, 78,125,242,173,177, 58,187,142,222,196,130,197,203,159,130,224, 73,233,219,220,111,242,164,177,181,127,250,121,245,107,
-235, 70,127, 53,166,118,117,205,181,204,222,103,103,203, 79, 6,247,169,219,184, 61,158,199,197,225,196,145,187,104,211,174, 19,
- 58,119,237, 5,141, 70, 61,100,211,134, 85,119, 0,172,249, 75,153,235,232,215,172,110,128,223, 78,103, 39, 39, 87,150, 45,153,
- 3,150, 82,160, 89,203,214,152, 58, 97, 4, 88, 74, 81,191, 97,163,214,157, 7,140,165,148,150, 24,193,172,236,172,226,232,168,
-200,182,202,244,168, 91, 70, 95, 75,149, 74,151,153,153,137,251,247,239, 35, 38, 38, 6, 17, 17, 17,200,206,206,134,185,185,121,
-149,170,216, 45, 45, 45,205,130,130,130, 62,253,253,247,223, 37,230,230,255,241,252, 26,141, 6, 50,153, 12,221,186,117, 19, 52,
-107,214,204,121,232,208,161, 67, 45, 45, 45,119,229,230,230, 22,188,213, 48, 61, 60,154,226, 80,183,199,250,206,125,190, 28, 13,
- 0, 66,177,201,139,149,191,253, 25, 81,209,177,133, 18, 51,183,182, 61, 62,247, 4,165, 32,132,172,204,138,250, 51,237, 93,219,
-106,181, 90,233,222,189,123,157, 9, 33,175,189, 95,231,173,220,211,244,241,179,180, 54,235,230, 78,227,155,153, 72,144,153,167,
-198,200,209, 99,109,140, 54, 87,117,187,143, 9,110,216,112,205,119, 83, 70, 64, 46,147,226,244,173,231,152, 56, 99,137, 62, 39,
- 43,125, 59, 8, 89,158, 25,113,224,125,107, 45, 62,200,128,215,181,157, 77, 96,218, 33, 84, 50,162, 95,152, 68,163, 51, 32,175,
- 88, 7,181,214, 0, 3, 75,145, 95,172, 67,228,203, 66,216,152,137,176, 17, 31, 63, 85, 50, 88,124,129,168,203,184,207, 58,139,
-150,237,186,133, 27,167,118, 41, 83,238,237,147,149,253,230, 26, 52,224, 69,226,221, 61, 53, 95,247, 40,149,119,181,148, 58,213,
-113,229, 19,222,207, 45,195, 90,180, 31, 61,102, 12,124,106,185, 8, 13, 6, 3,125, 28,243, 66,183,117,211,230,207,204, 93,235,
-174, 40, 72,122, 60,171,236,101, 90,213,238,155, 44,203, 38,189, 25,177, 98,217,215,191,102,223,166, 73, 8, 96, 97, 34,194,250,
- 19,113,160, 20, 32,160, 48,151, 11,176,231, 98, 18,242,179, 83,178,234, 41,150, 95,251,162,163, 77,183,133,155, 34, 15,173, 61,
-146, 30, 14, 32,130, 82,154,254, 46, 77, 66, 8,248, 60, 2, 51,153, 0,230, 50, 33, 44,228, 66, 48,132,188,211, 92,125,247,235,
-195,173, 0,162,203,155,171,242,154,114,123, 31,127, 51, 27,183,131,189, 70, 45,182,124,248, 82, 11, 62,143,160,166,131, 20, 86,
-166, 66,104,244, 4,241,153,218,210,125,204,240,213,228,121,182,211, 38,141, 62, 78, 72, 88, 61, 74, 47,234, 43, 58,119,133, 66,
- 33, 26, 60,120,176, 64,167,211,105,135,141, 95,216, 62, 45, 35,187,251,138, 69, 83,197,182, 54,214, 40, 86,233,112,239, 73,130,
-223,146,101,191,212, 60,118,238,230,193,111,191,234,121,168, 99,199,142,230,123,247,238,101,171,114,223, 51,211,179,126,217,188,
-115,255,246,229,203, 22, 33, 58, 33, 23,155, 54,172, 1, 53,232,215, 87,236,119, 95,215, 92,189,122,181,125, 72, 72, 8,115,251,
-246,237,172, 55, 13, 40, 33,144,103, 23,168, 97, 33, 23, 66, 38,230,195,222, 82, 2,107, 19, 17, 68, 2, 6, 12,243,159, 66,164,
-188,230,166,223,143, 45,100, 21,249, 56,188, 91, 51, 96,243, 47,223,227,243,175,103,226,113,150,232, 36, 35, 51, 95,248,213,128,
- 94,211,109,165,134,142, 78, 22,140, 93,235, 64,119,200, 37, 66,204, 24, 55, 24,141,194,227,237,146,243,216,153,153, 74, 94, 3,
- 0, 51,223,150, 78,166, 52, 98,101, 42, 19,224,226,209,221, 25,197,133,121,249,132, 87, 82, 69,168,211,104, 19,140,243,250,127,
-189,158,114,123,159,233,129, 13,234,125, 63,250,203, 47,152,166,161,141, 40,195, 8,144, 85,168, 33,148, 2, 19,198,142,194, 87,
-163, 70, 56, 36,166,100,204, 94,179,102,253, 44, 19, 59,191, 5, 69, 25, 79,230, 86,164,201, 35, 12, 24,134,192, 68,194,135,137,
-180,196,176,152, 72,248, 80,105, 12, 32, 4, 60,151,192, 1,249, 32, 0, 33, 36, 37,241,206,110, 63, 99,210,233, 84,183,211,185,
- 75, 25, 66, 95,197,113,213,141,103, 79,239, 45,188,253,240,229,109, 74,105, 78,141,150,147,134,106,245, 20, 69, 42, 61,226,210,
- 21,208,107, 41,249,188,147, 27, 60,250, 16,159, 69,155,239,109, 39,132,152,149, 69, 92,222,212, 76,186,177, 79,101, 83,183, 87,
-255,229,171, 54,220, 89,246,253, 76, 94, 86,190, 6, 44,165,144,136,120,144,138,248,165, 11, 15,202,226,124,172, 89,247, 91,154,
- 30,164, 23,189, 88,113,158,255,107,161, 65, 7,245,236,220, 98, 15, 1, 68,132, 17, 38, 57,185,185,187,181,233,250,153,164, 77,
-183,193, 48,232, 53,211,229,246,190, 23,138,211,163,206, 25,163, 25, 80,199, 15, 32,120,146,241,232, 96,175,146,151,100,143, 63,
-125,125,124,107,191,185,206,203,203,167,182, 49,247,189,236,227, 66,106, 91,251, 75, 47,223,186, 83, 71,127,183,193, 61, 46, 85,
- 1, 43,215,218,136,120,116, 31, 39,246,254,114, 79, 89,152,187,236,196,225, 63,167, 46,248, 97,101,253,174, 61,250,225,208,129,
-189,147, 9, 33,107,105, 9,103,203, 69,167, 6,109,221,248,171,171, 64, 36,134, 78,207, 66,103,160, 37,127,245, 6,228,228,228,
- 66,167,103, 33,145,153, 66,207, 18,232, 12, 44,116,122, 22,106,141, 94, 62,106,240, 39, 99, 0,220,122, 91, 58, 61, 66, 6,223,
- 5, 67, 92, 74,214,151,172, 19, 49,230, 10, 71, 71,199,237, 0, 32, 22,139, 33, 22,139,193,178, 44, 30,165,144, 9, 78,193,131,
-102,128,150,190,217, 89, 54, 41,245,222,238,160,119,157,187,171,171,107,215, 55,205,149, 74,165, 66, 81, 81, 17,174,221,121,104,
-190,109,223,217,142,241,137,105,181, 88,131,157, 90,234, 80,191, 3,128,174,239,186,158,105,143, 14,142,169, 17, 54,129,153, 60,
-122,176,215,202,223,246,223,126,122,114, 65,133,225,228,154,109,167,107,166,142, 25, 24,244,195,202,205, 79,147, 46,173,152, 88,
-217, 61, 18, 10,133,130,204,204,204, 87,207,247,252,213,127,116,122,153, 94,208,102,217,247,179,132,247, 94, 20,225, 81, 92, 26,
-134,182,173, 97,244,243,238,232,223,211,199,205,195,117,197,138, 5,227, 17,147,162,196,234, 63,110,227,210,177,237,225, 90, 85,
-225, 39, 25, 17,135, 51,170, 83,134,188,175,193,170, 72,243,194,195, 44, 20,169,244, 80,107,244,208,177, 20, 5, 10, 29, 50,242,
- 52, 40, 80,104, 81,164,212, 99,104,187, 26,248, 55, 80, 37,131,101,208,235, 92,156,156, 28,193,210,164,178, 8,103, 73,212, 35,
-100,128, 98,226,151,125,165, 78, 13,250, 20,167,220,223,111,116,155, 44, 83, 59,239, 38, 82,169,236,216, 79, 63,253,132, 1, 93,
-155, 75, 95,102,233,138, 30,190, 84,166, 23,107,160,183,179,245, 22, 45, 92,180,196,100,201,210, 31,191, 58,122,152,205, 3,240,
-227, 91,195,207,193, 3,239,242, 72,185, 54, 86,132,128,178,108, 82,210,157, 93, 65, 0,240, 62,109,173,138, 84, 58,240,152,146,
-182, 51,132, 0, 10,149, 30,197,185,105,217,229,205,213,173,100,135,231, 60, 94,166,150, 82, 90, 97, 21, 4, 67,128, 2,133, 14,
-230, 50, 1, 44, 76, 4, 48,151,255, 39,130,245, 14,115, 21, 81,145,166, 80,171, 77, 52,232, 53, 42,106, 48,160, 75,176, 45,236,
- 44, 68,112,180, 20, 67, 44,226, 67,167, 7,148, 26, 22, 42,141, 1,241, 25, 74, 20, 42, 69,168, 23,214,223, 43,197,241,166,194,
-198, 61,120,107, 86,252,157,145, 21,222,103,131, 1, 59,247,159,242, 74, 73,203,236,126,104,251,207,226,140, 2, 45, 30,196, 23,
- 33, 35, 79, 13, 16,115, 76,159, 57, 75, 60,123,246,156, 30, 59,255, 56,157,208, 50,196, 47,161,170,215,181, 56, 35,106, 71,189,
-166,159,252,210,165, 75, 15,211,136, 91,199,241,244,254,185,239,138,210,171,214,254,202,203,203, 75,255,203, 47,191,216,110,216,
-176,193,203,206,206,238,101, 70, 70,198,139,178,234, 40,143, 58,161, 41,103,207, 93,177,110,209,180, 57, 63, 41, 75, 5,107, 83,
- 33,220,237,229, 8,191,113, 65,195, 16,114,242,109,122,165,213,128, 3, 93,218, 78,195,225, 27, 47, 58, 70,100, 75, 46,142,248,
- 98,104,194,233,203,209,217,171,183,159,254,193,217, 68,119, 95,194,102,174,190, 27,228,233, 48,125,236, 96, 44, 94,181, 3,151,
-194,163, 51,138, 25,199,239, 83,213,250, 51,115,251, 79,125,123,212,151, 1,248, 60, 2, 83,169, 0,197,197,121,249,143,207,174,
-245,254, 64,207,238,208,211, 7,119, 48, 57,133, 58, 36,102,169, 72, 74, 78, 33, 12, 44,133,133, 76, 8, 61, 75,145,151,147, 69,
-118,238,216,142, 59,119,110, 48,224, 49,195, 1,204,173, 36, 18, 2, 30, 67, 96, 34, 17,148, 68,128,164, 37,127,117, 6, 22,181,
-107,186, 98,229,252,113,102, 54,118,246,104,223,107,164,241, 17, 54,185,101,253,109,235, 22,226,226,141,251, 97, 23,158,237, 14,
-182, 11,168,191,202,165, 78,223,101,140,149,179, 74,173, 53, 32, 63, 47, 23, 34, 77, 34, 26, 57,103,194, 74,102, 64,124,129, 35,
- 30,167, 61, 53,169,172, 58, 43,235,209,159,247,109, 3,122,206,218,127,228,252,226, 14,237,194,240, 56,190, 0, 82, 17, 31, 18,
- 17, 15, 18, 17, 15, 2, 98,192,207,235,214,235,114,243, 11,187,100, 61, 62,152, 85,141,252,121, 22,192,171, 54,103, 38,246,181,
-108,119,172,154,181,109,196,212,165, 29, 58,246,252,140, 60,190,115,225, 91, 0,231,140, 42, 51, 89,106,212, 58,150, 53,238,221,
- 70, 8, 97,236, 60,131,118,109,217,186,187,127,157,218,174, 72,207,211, 33, 37, 87,139, 43,247, 98,177,109,227,172,188,220,244,
-231,131,160, 45, 42, 98,137, 62,255,212,201, 35, 39,191, 30, 63, 21,254, 1,245,221, 11,146, 10,204, 0,228,191,118, 76, 30,217,
- 48,228,139,145,253,237,237,237, 77,255, 19,193,162,240,246,169,131,206,221,122,227,212,161, 3,136,140,120, 8,150,150, 12,231,
-195,178, 20,121,185,217,105,122,157,102,235, 59,211,199,227,185,108, 89,191,204,142, 97, 8,180, 58, 22, 26, 61,139,233,211,103,
-105,198,207, 94,221,172, 67,211,122, 17, 60,176, 5, 47, 83,243, 44,194,163,211,234, 18,129,169,227,160, 81,211,132, 42,181, 1,
-249, 10, 29,206,238, 91,249,238,106,198, 90,245, 67, 61,252,154,125,241,229,204,245, 98, 49,143,209,250,123,187,190,104,217,216,
- 63,177,134,147, 77,225,162,149, 59, 27, 93,191, 23,221,185, 87,175, 94,146,254,181,252,136,147,181,196,116,212,152,177,245, 28,
-106, 55, 27,146,246,244,234,246,119,190,252,248,226, 60, 87, 23,215, 87, 85,137,118, 1, 61, 30, 2,112,123, 99,179,132,140,199,
- 7,235, 1,128,157,189,131,138, 8,196,133, 85, 48, 32, 20, 0,230,173,218,223, 57, 41,179,168, 79,153,185,186,255, 60, 31, 98,
- 33, 3,173,206,248,166,113, 6, 66, 39, 76, 27,251,185, 32,167, 88,143,139, 15, 51, 17,113,247, 2,213,107, 11, 62,163,132, 63,
-204, 54,160,199, 16, 2,120, 80, 32,142, 33,248, 85,195, 96,107,222,131,131,249, 85,175,233, 41, 73,143, 93,157, 94, 77, 8, 15,
-157,121,124, 97, 48,192,250,234,117, 58, 59,134,199,203, 74,123,176,191,210, 30,148,229,207,168, 56, 61, 6, 75, 23,205,198,202,
-141, 7,144,146,173,130,185, 33, 17,135, 54, 45,196,228,197,187,160, 84, 27,240,111,192,104,131,101, 95,183,123, 35,128,225, 57,
- 88,153,192,171,166, 43, 76,250, 14,147,186, 4,246, 47,230,241, 24,102,235,138,111, 37,217, 74, 62,248, 60, 94,177,209,133,175,
-189,111,136,169,169,233,241, 63,255, 56,128, 90, 53,236,132, 59,175,228,196,221,123,161,124, 21,210, 45,200, 76, 16,121,152, 41,
-248,189,122,246,148,157, 59,127, 97,194,187, 12, 22,143, 48, 46, 43,127,254,193,206, 84, 42, 0, 33, 64,161, 82,143,241,147,166,
-189,247,133,161,160,188,175, 39,205, 1, 41, 53, 87,133,249, 57,248,126,229,214,162, 94,206,231,175,150,153,171,211, 79,164,207,
-122,246,108,157, 31, 31, 31,159, 91,105,193, 72, 13, 73,125,134,142, 23, 50, 76, 73,181, 17, 67, 8, 40, 12,233,213, 49, 87, 0,
-144,155,251,162, 64,234, 80,175,231,142,229, 99, 55,214,112,118,182, 52,149, 73,136,137, 92, 76,252,124, 60, 37,141, 27,135, 74,
-106,120,250,139, 46, 71, 22,225,101,166, 18, 47, 82,242, 33,178,241, 23,244,111,217, 22, 59, 86, 78,235,108,204,249,159,191,241,
-184,235,218,101,179,196,105,121, 26, 68,189, 44, 66, 90,174, 10,169,185,106,164,229,168, 96, 34, 21, 32,180,109, 47,241,137, 51,
-251,186,182, 12,241, 91, 85,157,235,251, 60,246,197,129,248,228,212,207,234, 53,108,132,157,219,182, 52, 38, 46, 46, 18,154,148,
-164, 50,118,255,141, 27, 55,230, 4, 7, 7,219, 46, 89,178,164,216,199,199,167,129,143,143, 79,205,152,152,152,139, 94, 94, 94,
-221,214,174, 92,112,105,252,204,101,110, 60,162, 51,111,210,180, 25, 79, 34, 36,184,113,249,148,122,235,198,245, 41,218,188,162,
-169, 21, 26, 97,153,249,194,244, 34, 2, 91,103,231, 8, 19,145,161, 29,159,201,139,201, 57, 49,118, 59,128, 63, 61, 59,141, 59,
-123,225,110,116, 76, 80,120,188,221,249,240,103, 25, 57, 10,173,119,236,137, 73, 21, 22,184, 60, 66, 32,224, 49, 48,149,242, 95,
- 69, 44,237,235,247,125, 70, 9,177, 45,139,148, 18,148, 68,180, 72,201,103, 75, 74, 82,248, 94, 35, 26, 70, 19,202, 82, 32, 58,
-169, 24, 69,170,146, 16,188,139,141, 12,153,233, 73, 88,187,106, 43,238,221,189,131,246,157,186, 97,205,111, 59, 49, 98, 72,223,
- 74,175, 43,195,160, 36,130, 85, 46,122,101, 34,229, 3, 32,200, 43,214,225,143,171,137,240,172,201,128, 84,161,182,208,212, 68,
-138,252, 66, 37, 24,129, 9,162,174,108,151,157,184,112,123,198,220, 31, 55,125, 83, 80,148,246, 50, 54,242, 6,124, 44,179, 81,
-211, 89,139,136, 52, 51,220,205,246,128,143, 87, 45, 48,194, 59, 70,105,103, 69,212, 93,122,136,249,163, 75, 80,131, 58,161,110,
-118, 22, 80,106, 12,165, 81, 44, 30,182,108,222,142,248,184,164, 47,178, 34, 14,222,251, 16,133,100, 81,250,243, 76,137,125,237,
-175, 30,221, 58,247,162,231,167, 95,193,209,185, 70,253,170, 52, 79, 48,102,157,193, 8,131, 69, 8, 97,172,220, 27,108,219,182,
- 99, 95,255,154, 53, 28,112,230, 86, 28,110,199,100,195,198,198, 26, 60,153, 3,106,183, 28,102,241,232,228,202,222,202,172,162,
-109, 2,161,108,120, 72,227,166,160,148, 34,250, 73, 68, 78,126,190,249, 95,202,102, 69, 74,212,125, 0,102,229,215,201,108,253,
-234,155,152, 91,221, 87,107, 13, 72, 78, 78,194,181,235, 23, 27,150,110,103, 52, 98, 33, 15,167,239,101, 64,171, 99,161,213,179,
- 8, 9,244,215, 8, 68,210,230, 63,108, 60,214, 56, 61, 61,147,145,154,152,177,230,118,181,132, 86,186, 52,245,131,231,249, 66,
-173,142, 69, 45,167,138,191,203,101, 86,181, 22, 77,154, 60,222,143, 39,148,162,176, 88,173, 73, 77, 73,118,248,117,247,133,162,
- 39,209,145,206, 30,238, 53,204, 22, 46,152, 43,204, 87, 2, 25,249,106,228, 20,106, 73,191, 79,191,112,218,190,105,205, 32, 0,
-219,171,144,244,186,123,183,175,215, 89,154, 8, 73,161, 82, 71, 51,243,213,134, 49, 95,141,175,251, 62,121,167,204, 92,253,248,
-253, 76,225,189, 23, 69,120,240, 60, 31, 18, 33, 15, 34, 33, 3,141,145, 6,203,182, 78, 95,185,173,173,197,160,144,250,181,113,
-234, 94, 38,120, 60, 6,138,226,124,141, 68,108,242,216,215,183, 54,211,160,126, 0,194,154, 53, 65,236,139,120,159, 83,103,206,
- 47,191,125,231,222,247,182, 1, 61,167,102, 62, 62,176,166, 42,105, 77, 76,205,150,165,235, 93,199,219, 57,216, 4,116,235,222,
- 85, 92,195,217,158,216, 90, 89,192, 64,132, 24, 53,250,107, 59,163,243, 60, 45,137, 94, 46, 89, 48, 3,106,181, 6,182, 22, 34,
- 80, 10,108, 94, 53, 23, 26,141, 6, 78,214, 98,228, 23,235, 56,131,245,234, 6,215,235,217, 84, 42,150,159, 94,179,120, 2,147,
- 87,172,131, 68,200, 67,173, 90, 53, 49,118,252, 4, 89,155,250,182, 80, 18, 51,252,177,123,107,129,222,160, 59,106,140,158,204,
-161,118,144,169,220,236,212,182, 29,123, 89, 27,107,107,102,237,233,204,231,217,133,250, 87, 67, 28,196,220, 58,204,222, 61,245,
-171, 35, 5, 57, 41,145, 72,188, 52, 26,141,101,101, 55,116,243,233,132,210,198,185,228,131, 92, 24,134, 97, 12,191,174, 90, 0,
- 27, 51, 17,212, 58, 22,243,151,111, 47,236, 98,123,242,124,121,115, 21, 24, 24,152, 95,191,126,253, 60,134,169,124, 56,177,151,
-183,119, 54,121, 75,129, 89, 45,115, 85,134, 50,237,225, 29, 0, 1,175,107, 6, 10,108, 60,246, 77, 30, 48,104,200, 12, 7,255,
- 79, 76,227, 82,243, 33, 36, 90, 4,251, 57,226,226,169, 63,217,196, 23, 79, 70, 25,163,157,145,157,239,106, 99, 99,141,123,207,
- 11,145,156,173, 68, 90,169,185, 74,205, 85,163, 80, 89,136,250,238,182,200,203, 47,114,173,182,129, 37,244,224,169, 83,167, 62,
-235,220,189, 63,198,126, 51,175,211,198,181,203, 30, 74,237,253,134, 40,211,159,220, 54,102,255,125,251,246, 25,220,221,221,159,
-103,102,102, 54,154, 50,101, 74, 65,173, 90,181, 28, 22, 44, 88,240,101,173, 90,181,156, 90,183,106,149,127,251, 66,227,109,227,
-191,153,219,106,250,184,141, 53, 25,134, 73,167, 44, 61,156, 82,172,155, 67, 51, 35,149, 21,222,167, 67, 51,162, 72,157,121,159,
-181,107,110,123,216, 74,198,248,139,169,102, 0,169, 51,111, 47,141,156,163,141, 61,177,170,176,110,191,159,199,166,228,177, 51,
- 85,140,221,247,149,153,171,146, 8, 22,129, 70,111,128,169, 84,240,159,188, 73,225,184,118,245,207, 50, 91,115, 17, 4, 60, 6,
-124, 30, 65,129, 66,135,172, 2, 45,190,153,250,141,177, 87,144,213, 27, 40,148, 26, 61, 20,165, 95,131,133, 5, 89,152,241,205,
- 36,116,234,218, 19,195, 71, 77, 66,174, 18,184,251,162, 16, 90,157,174,210,135,130, 71, 8, 20,106, 61, 62,111,239,134,156, 34,
- 45,138,149,122,104,244, 44,100, 34, 62,248,124, 6,114, 9, 31,102, 50, 1, 8,161, 66, 71, 71,199, 47, 1, 64, 32, 16,168, 94,
-190,124,185,163,130, 47,120,120,184,218, 67,169, 99,208,168,255, 50,180, 13,245,198,131,179,155,248,151,110, 62,170,249,205,220,
-229, 24, 51, 48, 20,251,163, 60, 97,101,231, 6, 19,185, 20, 58,202, 0, 48,110, 8, 16, 74,231,176,142,190,189, 6,174,255,109,
-115,244,252,217,211, 37,121,197, 4, 98, 33, 15,231,207,157,197,141, 91,119, 87,102, 70, 28,220,241, 33, 11, 74, 1,101,236,205,
-204,204, 32, 17,241,160,209,170, 53, 70, 71, 30, 88, 10, 80,248,217,213,237,241,103,233,189,247, 51,176,120,203, 58, 90,153,185,
- 34,230, 78, 1, 91,214,111,220, 57,200,201,193, 14, 7,206, 61,196,150,223, 86,163,102,131, 46,184,122,108, 11,204, 61, 26, 67,
- 94,163, 25, 68,166,251,190,100,120,252,186, 95, 79,248,182, 87, 96,112, 40,174, 93, 57,143,140,180,212,245,148, 70, 25,213, 6,
-141, 39, 32,227, 90,183,235, 10,149,198,128,230,109,186,224,228,145, 3, 99, 81,218,121,194, 88,222, 52,225, 44, 11,253,215,195,
- 7, 8, 50,242, 52,130,204, 2, 13,146, 50, 21,136, 75, 87,224,208,158, 77,212,216,183, 54,195,231, 5,183,168,231, 34,248,114,
-233,249, 68, 87, 23, 71,181, 64,173,148,198,196, 62,247, 29,254,217, 32, 65, 77, 47, 95, 38, 35, 95,141,204,124, 53,178,242,213,
- 40, 82,233,225,229, 88,131, 81,235,249,161, 85,189,207,182, 22, 18,193,154, 35, 47, 96, 38, 23,160,137,175,117,181, 27, 97,179,
- 44,251,154,185,186,255,162, 24, 15, 95,228, 67, 44,228, 65, 44,100, 32, 22,242,160, 55, 80, 35,223, 69,250, 1, 35,135,245,151,
-106,116, 20,217,249, 26,240,121, 4, 14, 54,214, 98, 87, 71,111,108, 94,246, 53, 0, 96,196,180,181, 24,254,249, 96,248,120,123,
- 33, 63,191, 80, 58,124,244,248,159,241,150,118,119,239, 74,235,206, 67,151,235,220,125,156, 48,249,179, 97, 67, 5,253,186, 54,
-103,238, 63, 47, 64,106,142, 26,207, 99, 21,208,234,170, 54, 26,141,222,192,130,130, 98,235,222,163,144,138,248,200,204,215,130,
- 82,138,133,171,127,135,169, 84,128,212,220,146,106,125,206, 96,149,153, 43,145,228,244,246,213,223, 74,207,199, 0, 43,207,220,
-197, 39, 33,142, 16,242, 25,136, 77, 28,240,224, 69, 46,206,158, 59, 84,120,245,198, 45, 21, 24, 93,165,221,162,100,142, 62, 13,
-229, 82,179,179,107,126,221,166,183,177,179,195,142, 43, 57, 73,185,197,122,221,127,170,167,116,228,238,169, 95,107,234, 89, 93,
- 71,101,218,211, 74, 63,103, 89, 74,133,139,215, 29, 2, 64,193,178, 44, 40,203,130, 39, 20,203,221, 26, 15, 78, 47,209, 99, 37,
-124, 30,163, 42,255,228, 83,214,144,148,112,107, 87,133, 85,135, 4,128,185, 76,128,189,151,146,145,159,147,146,213,197,246,228,
-171,106,193,147, 17,226,103,129,129, 13,242,131,131,131,243,164, 82, 41,120, 60, 94,149, 47,252,251,154,171,119,191,120,194,117,
- 0,150, 56,249,182,236,214, 73,230, 31, 34, 98,248, 8,244,113,196,197,211, 7,216, 27, 39, 54,245, 84,164,199, 28, 51, 50,188,
-141, 34,165, 14, 41,217, 42, 36,103,171,144,150,171, 66, 90,142, 26,105,185, 42, 16, 66,160,210,188,223,240, 53,138,244,152, 35,
- 38,206,254,235,213, 90,140,106,209,190, 39, 38,207, 93,227,181, 99,253, 15, 87,228,118,181,131,139, 51,158, 62, 50, 70, 35, 62,
- 62, 94,109,111,111, 31,158,151,151,215,126,249,242,229, 69,126,126,126, 34, 19, 19,147,108, 0,210,103, 49, 49,194,243,199,247,
-197,101,166,164,140,212,106,181,119,140, 77,151,123,216, 48,177,239,255,177,119,214,225, 81, 92,251, 27,127,103, 93,226,196, 29,
-136,144, 64,130, 4,151,160,193,221, 10, 20, 41,165, 69, 90, 42, 72, 91, 40, 45, 82, 10,133,150, 34, 53,104,161,197, 29,138, 21,
-119, 11, 30,136, 64, 8, 16,119,221,205,102,125,103,230,252,254,128,228,166,220,200,134,210,223,189,151,158,207,243,204,147, 77,
- 50,243,206, 57,179,103,230,188,243, 61,102, 95, 60,217,207,166, 67,239, 0, 15, 37,252,108, 52,189, 67,109,239,126,227,214,227,
-195,165,249,103, 86,231,231, 24,217, 83, 5,122, 97,139,172, 50,177, 85,125, 1, 89,179, 41,237,245, 41,115, 33,100, 24,152,141,
-166,180,242,194,229,230, 32,197,194,109, 15, 96, 43, 23,195, 78, 33,130,173, 66,140, 78, 77,234,161, 14,175, 7,196,194,241,208,
- 25, 57,232,141, 44, 12, 38, 22, 46,190, 78, 88,191,117, 15,210,243,245, 56,120,179, 16,137,105, 26, 4,251,216,128,144,218,227,
- 78, 60, 97,181,175, 77,158,103, 39, 20, 8, 32,100, 32, 8, 13,170,143,226, 50, 19, 36, 34, 1,164, 82, 41,108,100, 34,216, 43,
-196, 16,139,196,184,113,239, 30,140, 70, 35,218,182,109, 43,175,217, 2, 62,141, 98, 5, 55,244,130,217,194,226,232,197, 4, 44,
-153, 49, 12, 61, 59,183,194, 71, 66, 41, 30, 24, 35, 96, 87,207, 14,188, 64, 0, 51,203,195,100,230, 0, 8,170,141,182,249,249,
-249,117,183,177,177,177,209,233,116,154,180,180,180,243, 57, 15,246,167,187,133, 13,153,124,252,228,217,173, 3,250,246,196,157,
-123,241,216,251,251,161, 75,133,206,234,217,229,199,132,135,135,183,115,113,113,177, 45, 42, 42, 42,141,141,141,189,241, 34,101,
-149, 97, 24,198,198, 61,244,195,246,157,186,162, 76,149,143,188,140,148, 35,214, 30,219,216,223, 14, 51,103,188, 23, 28,210, 40,
- 36,152,123, 54,146,170,137,159, 29,166, 78,123, 39, 56, 48,184, 81,112,249, 64,143,198,126, 53,207,119,105,227, 30,242,206,146,
-149,107,199,251,249,250,226,216,149, 7,248,106,222,212, 59, 54, 74,187, 6, 62,238, 78,142,146,176, 86,136,137,185, 10, 55, 72,
- 97,239, 30,236, 51,122,208, 20,159,222,125, 7, 33,246,238, 45,172,254,122,113,180, 86,168, 88,106, 77, 90,109,221, 3, 92, 91,
-180,238,252,186, 93, 61,119,168,212, 26,216, 57,185,161,113,179,214,175,219,186, 7,124,242,108,177,250, 23, 51, 27,132,192,104,
- 38, 40, 41, 51, 35,163, 64,143,212,220,167, 6,139,231,235,208,231,135,128,177,149,139, 68,245, 44,143,252, 98, 79,159, 37,254,
-190,238,204,215,139, 63, 18,154,241,180,179,120,129,218,136,130, 82, 19, 10,212, 38,148, 25, 44,168,103, 35, 2, 79,248, 58,191,
-109,151,148,153, 97,247,172,159, 44,199,191,184, 9, 88,184,106, 71,135,204, 2, 93,143,111,190,156, 39,185,155, 82,201, 92,137,
-159, 70,175,100, 18, 33, 56,222,186, 8,150, 80, 36,120,175,127,143, 54,200, 40,212, 63, 29,133, 44, 96, 16, 20, 22, 1, 23, 5,
-143, 30,163,230, 0, 0, 6,246,123, 58, 13, 73,114,142, 22,135,175,229, 0,128,196,218,180, 22, 21,105,100,191,159,186,243,193,
-142,245,223, 72,141,188, 24, 63, 31, 75,131,206,200, 66, 46, 17, 66, 38, 17, 66, 33,169, 91,253,198,114, 79, 7, 75,164, 23, 90,
-160, 51, 24, 80,170,183,128, 0,184,241,168, 12,122, 19, 11,181,214,130,118,161, 78,212, 96,149,155,171,205,223,125,170, 56,243,
-144,224,220,221, 34,140,136,244, 65, 81,126, 38,214,255,180,134, 39, 4,144,201,165,185, 28,203, 31,211,243,236,199,170,187,135,
-213, 53, 62, 36, 92,155, 52, 83, 40,149,103,151,175,254,217,236,230,238,205,239,191,166,202, 87,235,184, 63,197, 10, 57,163, 81,
- 64,120, 34,177,198, 92, 61,139, 52,153, 23,188, 55, 20, 60, 33, 88,184,122, 15,150,206, 30, 5, 91,133, 72,201, 48,140, 82,107,
- 96, 49, 99,209, 6,124,251,249, 36, 59,165, 76, 4,134, 1, 12, 38, 14, 83,223,179, 46, 74,160, 51,114,208,170,114,139,154,150,
-173,124,206, 92,181, 84,183,109,219, 86,229,228,228,132, 23, 49, 88, 85,153, 43, 15, 15, 15, 47,165, 82, 89, 47, 56,248,105, 95,
- 87,161, 80, 8,142,227,180, 73, 73, 73, 47, 52,233, 91,169,170,224, 64, 78, 74,108,219, 14, 93,251,227,194,201, 3,124,244,209,
- 13, 67,235, 50,196,220,209,193, 62,227, 78, 66, 90, 99, 6,182, 79, 35, 88,207,204,149,201,194,195,223, 93,137,204,140,116, 56,
- 58,216,102, 88,171,167,244, 8,238, 35, 32,194, 41, 60,131,245,186,220, 7, 71, 1,160, 44, 43,126,154,210,173, 81,108,124,252,
-221,213, 3,198,188, 39,237, 53, 98,154,100,221, 87,239,206, 1, 48,218, 90,221,188,188, 60,157,171,171,107,180,167,167,231,128,
- 69,139, 22, 25, 1,200,140, 70,163, 96,226,196,137,202,180,180,180, 25,132, 16,171,210, 24,249,230, 94, 23, 70,166,233, 27, 24,
-220,122,140,191,157,166,103,183,200,246,104, 31,230,139,140,200,246, 0,240,126, 90,153,109, 72,167,105,191,238,106,232,234,115,
-116,221,198,195, 75,223, 30, 21, 53,195,107,224,162,149,217,135, 23,212, 24, 17, 75,188,248,107,239,170,236,187, 72, 40,128,157,
- 66, 12, 91,133, 8,118, 10, 49,236,228, 98, 88, 88, 82,151, 38, 56, 98, 97,249,167, 17, 44, 19,139, 50, 61,139,179, 49,121,200,
- 85,155,160,210,152,161, 55,115, 32, 32, 48, 91,248,242, 89, 69,106, 54,171, 87, 55, 57,150,127,246,105, 57, 90,189,230,139,247,
-236,247, 93,206,172, 24,161,231,160,148,194, 78, 41, 6, 64,112,241,226, 69, 56, 59,215, 62, 45, 22,207,243,216,123,252, 6, 86,
-110, 58,139,227,191,125, 12,185, 68,136,102,131, 23,225,141, 33,109,193,243, 4,143, 19,227,243,130,155, 52,119, 23, 8, 20, 16,
- 48, 12,140, 22, 30, 0,169,246,122,154, 76, 38,231,244,244,244,210,160,160, 32, 15,111,111,239, 17, 66,161,144,200, 0,227,129,
-157,197,186, 51, 71,182, 43,181,122, 35,167,100,213,191, 5,229,232,251, 7, 7, 7,131, 97, 24,226,226,226, 34, 57,123,246,108,
- 89,211,166, 77, 93, 95,228, 62, 98, 24, 70,160,112,107,180,230,173,105, 31,142, 8, 12, 8,192,158,237,191,129, 16,102,159,181,
-199,111, 59, 28,141,149,171,254, 60, 98,112,234,180,119,130,215,173,253,233, 79,127, 27, 63,105,114,112, 77, 6,207, 39,188,251,
-199,161,161, 77, 16, 29,159,137,175, 63,155,118,199,144,159, 60,198,100,235, 60,197, 92,150, 51,179, 69, 68, 43,120, 56,219, 35,
-187,216,136, 65, 99,135,160, 99,167, 72,196,222,189,133,197,159,127, 20, 13,157,169, 87,109, 81,219,127, 25, 33,241,212,110,189,
-135,136,245, 70, 51,190,251,122, 62,166,204, 94,130,118,221, 7,138,227, 98,174, 77, 5,240,133,181,121, 54,154, 57,116,107,234,
-242,212, 52, 91,120, 28, 74, 22,138,170, 42,129, 34, 33, 35,104, 17,224, 8,189,137, 69,169,206, 82, 75, 4,139,201, 85,105,180,
-245,127, 88,250,161, 80,107, 96, 81,160, 54, 33, 95,109, 68,161,234, 95,198,170, 80,109, 68,129,218, 4,177,136,193,195,148,108,
- 8,133, 76,157,251,223,149,148, 89,208,166,145,211,211,123,244, 5, 91, 67, 10, 89,215,190,119, 31,102,247,248,122,241, 92,201,
-221, 84, 45,238, 37,151, 62,139, 92, 9, 33, 19, 11, 32,125,246,153,179,194, 95,185, 53, 25,212, 97,252,232,193, 97,246, 54,114,
-100, 63,212, 64, 36,124, 58,213,139,131,155, 47, 28,100, 6, 76,159, 54, 25, 46,206,142, 72, 47, 52, 98,205,239, 15,113, 47,225,
- 17,120,125,221,178,253,195,246,227, 67, 39,140, 27, 37, 19, 74,100,216,114, 36, 5, 50,137, 16, 34, 98, 66,252,181,139,198,188,
-204, 20,179,166, 84,101, 35, 18,137,173, 18,101, 0, 82, 30,153, 91,186,112, 14,118,110,250, 9, 39,110,231, 87,116,159,191,188,
-239, 91,124, 56,247, 75, 20,150,154, 0, 48,175,124, 24, 75, 84,147,185,146, 75,165, 39, 55,173,153,171, 56,243, 16, 56,127,239,
-169,185,210,151, 21, 98,203,175, 63,151, 17,240, 81,121,113, 7,173,126, 35,180,113,107, 20, 46,179,177,185,240,217,151,107,140,
-238,222,245,217,163, 49,165, 69, 26, 3,247,111, 97, 16,137,210,134,179,113,112, 53, 56,250, 71,172, 20,235, 77,243, 11, 10, 18,
-180,181, 69,154,120, 66,112,228,122, 46, 8,121,250, 74,180,251, 98, 22,132,130,167,205,133, 28,255,180,249,228, 84, 76, 62, 68,
- 2,198,234, 33,231, 12, 3,236, 62, 25, 83, 24, 94,133,185,106,221,186,181,202,222,222, 30,142,142,142,176,181,181,173,235, 3,
-187,202,200,149, 82,169,172,119,226,196, 9,185,189,189, 61,132, 66, 33,140, 70, 35,122,246,236,249, 66, 95,170,141,123,200,232,
-118, 61,134,125,213,177, 91,127,156, 59,177,159,143, 62,186,113,152, 46,191, 14,243,247, 0,232,219,185,217,225,229,223,126,223,
-240,163, 57,159,201,236,228, 34,220, 47, 51, 65,192, 48,240,119, 87,194,217, 86,136,232,179, 71, 12, 35,122, 54, 61,108,173,158,
-159, 79,253, 45, 43,190, 91,231,188,114,217,162, 94, 78, 78, 13,221, 75, 74,146, 75, 1, 64,151,255,112,157,173, 71, 72,162,143,
-223,201, 11,205,187, 12,133,187,119, 80,191,186,230,183,160,160, 32, 47, 44, 44,236,126,147, 38, 77, 90,141, 24, 49,130,124,245,
-213, 87, 78,153,153,153,123,172, 53, 87, 0,208,163,103,216, 12, 91, 41,215,174,158, 82, 16, 22,224,161, 68,251,176,167,173,159,
-163,250,119,130,175,159, 31,158,228,234, 90, 20,235,120,113,153, 73, 24,240,227,207,247,110, 54,112, 17,190,205,234, 77, 9, 0,
- 14,214,185,210,198,191, 58,190,151, 71,175,236, 20, 98,240, 79,203, 71,157, 12,150,209,204, 65,111,228,160, 55,177,208,154, 56,
-232, 76, 28,120,242,244,158, 96, 24, 6,102,150, 47, 63,101,157, 18,104, 95,207, 5, 1, 13,158,142,122,181, 83, 60,157,178,225,
-105, 19, 33,224,236,236, 12, 55,183,218, 27,119, 8, 33, 48,153,159,222,226, 38, 11, 95,209, 68,106, 50,179, 32,132,224,225,195,
-196,143, 83,147,147, 7, 7, 5, 7,117,110,210,172,121, 61,165, 76, 0, 0,213,154, 1,157, 78,199,217,217,217,185,213,171, 87,
- 79,144,149,149, 85,209,239, 49,168, 69, 55,246,247,253,251, 48,108,216,208,178,251, 55,238, 86,140,168,210,235,245, 76,199,142,
- 29,237,125,125,125, 5, 70,163,177,180,206, 81, 43,215, 70, 67,124, 67, 59, 44, 25, 63,113, 74,163,110, 81,125,112,238,204, 73,
- 28,220,191, 99,179, 54, 63,241,164,181, 58, 33, 33,161,255, 54,138, 48, 48,184,209,191,141, 34,172,223, 48,184, 90,131,229,224,
-208,204,190, 89,235,174,190,169,133,102, 28, 59,118, 20, 90,117,238,231, 38, 83,153, 14, 98,178,225,200,142, 31, 39,189,245,225,
- 34,251,174, 93, 34,225,100,175,132, 72, 36,196,237,155,209, 88,246,197,167,209,208,153,122,213,246,252,172,200,111,147, 38,146,
- 32,191,250, 31,248, 5,134,227,246,181, 75,120,252, 48, 46,254,238,205,232,176,160,166,237,224,234,229,255, 1,211,164,201, 50,
-146,144, 80,235, 74, 21,132,227, 50, 39, 76,158,249,236,251,127,250,183,246, 45, 26, 74,153,231,111, 0, 0, 22,214,204,109, 89,
-183, 44,191,242, 40,194,234,116, 13, 26,213,222,139,215,238,205, 30,216, 43, 82, 80, 88,106,122, 26,177, 82,155,158,109, 70, 20,
-150,127, 46, 53, 34,216,203, 22,143,227,238,243, 22,173,122, 95,221,238, 76,146, 55,237,157,247, 20, 79,211,206,131,240,164, 70,
-195, 95,109, 90, 57,201,235,235,190,152,195,220, 75,213,226, 94, 74,233,211, 38, 65,177,240,169,177, 18, 11, 42,204,150, 85,173,
-100, 2,193,215,227, 71,246, 70, 97,169, 25, 60, 15,136,132,130,103,155, 4,233, 26, 6, 25, 26, 29, 10, 75, 10,144,156,154, 6,
- 85,238, 99, 8, 4, 2,184,120, 53,130, 46,221,186,180,106, 56,219, 70, 22, 14,129, 35,251, 71, 10,127,143,206,133, 82, 38, 66,
-105, 81, 6,174,156,216,165,231, 89,110,157,201, 98,218,233, 70,164,113, 9,177,123,204, 86, 62, 58, 10, 74,181, 70,119,153, 88,
-136, 61,155,126,192,200, 55,166,149, 71, 32, 1, 0, 31,207, 91, 12, 8, 24,148,168,180, 0,152, 23,142,138,254,207, 27, 44,177,
- 64,120,106,227,234, 79,229, 9, 5,114,220, 72,204,193,136, 72, 31,232, 52,133,248,249,135, 53,101, 6,139,177,111, 65,236,193,
-186,133,219, 5,130,222,163,222,156, 29, 31,208,168,137,241, 92, 92, 89,138, 74,107,169,182, 31, 67,251, 17,159,197,223,250,227,
-251,126,106,203,147,119,108,189,194, 56,158,101,191,214,229, 39, 46,170,250, 45,153, 72, 23,173,217, 83,209, 60,248,201,178, 45,
- 79, 63,115, 28, 56,194,131,240,192,244,207,215,130,229, 57,240, 28, 7,158, 35, 96, 44,156,178,214,112,185, 92,114, 50,188,108,
-165, 67, 85,230,202,209,209, 17,206,206,206,112,118,118, 70,185, 33,250,171,205,130,193,193,193,176,181,181,197,165, 75,151,160,
- 80, 40, 96, 99,243, 98, 19,228,219,186,135,190,214,182,251,208,109,221, 6,190, 41, 56,253,251,207,220,245,243, 71, 70,232,243,
- 31, 88,109, 2, 56,142, 99, 44, 22, 11,122,119,109,153, 22,147,152,126,252,139, 69, 11,251,180,238, 62, 92,214, 33,196, 13,122,
- 19,139,172,204, 76, 68,159, 61,104, 8,242,115, 62,209,165,109,227, 52,139,197, 2,142,227,106,173,192, 13, 70, 83,145, 80,172,
-112, 30, 53,250,117,217,205, 27, 55,182,217,184,135,236, 16, 8,249,187,132, 19, 54, 3,200,107,205,154, 53,134,217,194, 67,167,
-211, 20,191, 72,190, 19, 18, 18,110,172, 90,181,170,145, 88, 44,246,221,189,123,119, 97, 73, 73, 73,157,150, 11, 58,121, 49,113,
-181,136, 41, 73,146,242,230, 49,254,118,154,158,233,157,218, 99,244,128, 78,216,249,199,101,156,191, 20,141,180, 50,219,152, 50,
- 86,116, 32, 35, 45,219, 24, 86,175,116,223,160,246,245,133,123, 54,149,236,115,235, 54,247, 53, 66,100, 39, 11,206, 47,208, 90,
- 95,121, 3, 26,189, 5,246,202,167,243, 53,149, 71,178,132, 12, 99,181, 19, 98,128,228, 75,209,183,195, 91, 5, 55,193,157,100,
- 53,242, 85, 70,232,141, 44,120,158,128, 7,129,179,157, 20,114,137, 0,233,169,201,224,137, 57,165,110,245, 12, 10,250, 14,159,
- 34,122,122, 30, 94, 36, 22,139, 64,158,213,139, 10,185,180,204,205,205,205,170, 8,150,153,101, 49,172, 79, 91,180,107,221, 12,
-131,167,172, 0, 0,156,217, 60, 7, 78,182, 98,236,221,187, 23,233,151, 87,109, 13,232, 48,237,100, 92,108,252,240,248, 59, 87,
- 95,239,219, 82,209,194, 67,148, 93,109,211, 70, 89, 89,217, 62,134, 97,164, 18,137,164, 79,231,206,157,235,237,219,183, 79,229,
-226,226,194, 75, 37,146,130, 65, 3, 7,240, 98,137,164,162,236, 92,185,114, 69, 60,101,202, 20,187,146,146,146,244,188,188,188,
-104, 66,136,165,230, 23,192,208, 40, 8,176, 3, 12, 35,183, 85, 40,211,218, 71,141,246,106,221,174,173,195,144, 97, 35, 33,147,
-202,112,234,228,113,124,183,106,217,238,178,156,251,111,214,229, 82,190,140, 81,132,106,181,131, 54, 41,225,110, 73, 74,190,201,
- 73,236, 24, 12,177,204,110, 10,227,224,181, 70, 40,179, 93,224,218,124,136,253,222, 67, 71, 17, 27, 23,135,122, 10, 11,158, 60,
- 78,210,197,197,220,249, 73,199,136, 23,145,130, 4,157,213, 17,230, 34,110,120,251,113,125,156,140,102, 14, 23,207,254, 97,224,
- 89,190, 79,244,133,163,143,125, 26,181,150,135,183,238,225, 84,120,112,195, 48, 0, 59,107,211, 73,185,190,245,223,186, 94, 4,
-180,125, 45,251,232,201, 11,182,158,254, 65, 66, 6, 66, 24,244, 58, 20,164,197,178, 6,117,174, 46, 47,246,128,151, 53,233, 75,
- 99,179, 62,255,252,171,181,239,180,106, 30,102, 67,136,228, 79, 17,171,114, 99, 85, 88,106,130,139,157, 20, 70,109, 9, 30,223,
-187,100, 40, 16,231,125, 90,243,179,206,162, 44, 42, 42,150,150,255,174, 40,115,172,175,118, 80,203, 42, 76,160, 16,112, 80, 59,
- 26,255,213,148, 86, 44,229, 56,139,210,154,219,211,193, 86,142,216,148,156,138, 14,237, 50,241,211,190, 87, 82,177,176,162, 31,
-150,149,247,121, 75,145,212, 22, 89, 69, 6, 48, 32,224, 57, 22,172,197, 4, 77,105, 41,178,178,115,145,151,155, 7,141, 70, 5,
-165,173, 19,194, 91,180,129,157,173, 13, 30,220, 62, 15,128,177,234,229,215,192, 75,130, 91,183,106, 37,142, 79, 43,131,217,194,
- 67, 12, 51, 46, 31,219,105,176, 88, 76, 3,243, 98, 15,156,173,235,115,152,229,201,233,184,196,180, 48, 31, 87, 79, 38,230,177,
- 26, 91,215,127, 15,211,179, 72,166,197,194, 33, 46, 93,139,156, 98, 29, 50, 51,210, 8,120,238, 52, 94,113,170, 53, 88, 44,203,
-202,253,252, 27, 96,244,148,177,248,233,167,181,120,248, 36, 29,191,252,248,204, 92,221,251,253,138,149,134, 34,170,124,174, 12,
-109,238,131,175,223,252, 41, 37,243,208,157, 98,129,222, 84,243,250, 83,114, 87,127, 68,190,249,237, 9,189,166, 88,202, 25,117,
-162,195, 91,223,220, 81,149,230, 83,223,198,152,150,204, 26, 5, 91,133, 8, 12,195,160,188, 89,240,199,197,147,161,148, 9,193,
- 48, 12,244, 70, 22, 99,103,172,196,214,149, 51, 65, 0,188,245,206, 44, 93,117,233,172,100,132,152,137,125, 26, 14,250,242,215,
-132,131,151, 83,157,159,244,239,223, 69,221,178,101, 75,149, 66,161,128, 66,161,128,189,189, 61,156,156,156,224,232,232, 88,107,
-222,159,253,238, 94, 91,159, 43,129, 64, 0, 27, 27, 27,216,218,218,194,198,198,230,223,140,219,243,154,255,102,174, 60, 26,141,
-108,211,109,232,142,238,131, 38, 9, 78,255,254, 11,127,235,252,225,145,250,252,196, 3,214,126, 71,207,154,117,238, 14, 27, 54,
-172,233,148, 41, 83, 36,159,190, 51,236,196,137,243,183, 31,238, 63,181,111, 96,177, 74,227, 75, 8,129,163,131,109,198,136,158,
- 77, 15, 71,182, 14, 73, 59,115,230, 12,191, 99,199, 14, 35,195, 48,177,181,165,179,176, 48,127,227,153,211,103,151, 71,118,233,
-138,245,155,118,244,143, 79,184,223,255,241,227, 36,248,250, 7,160, 65,195, 96,232, 24, 39,156,189,112, 9,154,226,220,141,214,
-164,179, 50, 77,155, 54,245,110,222,188,185,143, 74,165, 50,204,159, 63, 63,132, 16,114, 32, 60, 60,188, 85,203,150, 45,115,239,
-220,185,147, 89,221,176,255,202,154, 87,215, 14, 41, 0,176,185,126,215,137,187,179,204,170, 15, 0, 44,243,243,247,195,249, 75,
-209,136,190,124,125,109,161,210,111,209,155, 99, 39, 78,174, 63, 72,248,214,160,246,245,133,110, 78, 74,108,255,229, 91,225,161,
-232,212,149,169, 69,220, 6, 0,139,173,249,142, 42, 30,214, 26, 51, 58, 54,174, 7, 11, 71,192,147,167,166,203, 78, 46,174,178,
-137,176, 42, 77,145, 73,246,230,212, 41, 83, 30,135, 55,107,241,225,216,137, 83, 37, 45, 2,124,113,227,145, 10, 96, 24,212,243,
-176, 65, 78, 78, 14, 46,238,253,133, 45,201,122,176, 86, 40,228,191,168,203,245,204,188,189, 51,168,252,179,167,167,231,228,152,
-184, 56,156, 63,127, 30,229,198,202,213,213,181, 74,131,245,188,102, 73,137,230,202,226, 21,235, 59,190, 61,110, 48, 6,116, 13,
-195,133,155,143, 97,122, 54,223, 82,249,144,240,228,232,117,210, 15, 70, 5,152,222, 25,214,168, 84,111,145,166,126,158,162,190,
- 88,121, 18,217,231, 53, 9, 33, 38,134, 97, 14, 37, 38, 38,118,106,222,188,121,253,163, 71,143, 22,199, 95, 63,241,167,137,238,
-102,205,154,101,251,211, 79, 63, 41, 9, 33, 87,140, 70,227, 19,171,242, 46,192,246,219,183,110, 57,155, 45, 60, 46, 93,191,219,
-184, 71,199, 22,224, 9,112,243,230, 77,108,248,117,131, 33,246, 94,204, 10,109,158,199, 23,213, 77,110, 91,221,245,228,254,194,
- 40,194,114, 77, 66,206,179,182,238,161,107,175, 92,186, 48, 79,230,213, 10,161,253, 62, 29,148,117,247,208, 32,143, 38,189,225,
- 18,208, 1,217,247, 14,225,202,137,109, 71,121,150,157, 35,231, 5,105,218,130, 7, 90,107,239,247,114,100, 10,229,123, 77, 90,
-118, 65,122, 90, 42, 82,146,226, 54,235,139,146,178,109, 61, 66, 55,103,103,166, 77,109, 24,214, 17,151, 79,236,124,191, 58,131,
- 85, 91,153,119,147,107,214,158,187,124,117,116,214,158, 67,238,154, 50,189, 66, 36, 18,232,100, 34, 38, 79,162,123,188,203,218,
-116,146,132, 4,179, 91, 96,135, 97, 99,166,124,246,199,202,175,230,137,221, 29,101,200, 45, 49,160, 84,111,134, 70,103,134,128,
- 97, 16,228,101, 3,189,182, 20,209, 71,183, 88, 56, 67,209, 40,242,232,207, 17,183,202,154,174, 97,131,191,100, 24, 76,255,236,
-179,185, 16, 74,237,189, 26,246,248,212, 44,104,232, 1, 39, 60, 55,153,121, 61,160, 97,143, 79, 97,212,228, 13,252,236,179,185,
- 33,132,144, 30,174, 97,131, 53,229,107, 17, 86,151,247, 34,141, 25,175,119,243,133,153,125, 58,127, 24,203, 3, 28,255,244,133,
-159, 16,128,212,208,110, 95, 89,147, 0,146, 93,127, 92, 65,118,158, 10,122,147, 5, 70, 19, 11,179,133,131, 64, 40,132,163,147,
- 35,130, 27, 68,192,209,209, 1,249,133,133,184, 25,125, 25,215, 18, 99,146, 9,240,101, 97, 61,245, 54,107,190, 35, 70,100, 19,
-228,238,230,194,228,149,154,160,144, 10,113,237,246,121, 11, 1, 54, 90, 99,174,170,210, 84,235, 84, 43,231, 44, 94, 51,230,167,
-111, 23,120, 52,109,104,143,204, 66, 61, 50, 11, 12,208, 24,158,190,223,176, 28, 15,147, 94,141,196,155,199,114, 89,232, 86,254,
-115, 35, 88, 98,177,241,230,189, 68,217,156, 69,223,224,254,163,100,108, 88,251,189,214,104, 49, 91,109,174,170,226,183,119, 26,
-236,172,219, 17,207,230, 45,253, 34,181,150, 23,238,231,154, 5, 9, 15,158, 16, 28,190,158, 91,209, 44,200, 63,235, 81,121,231,
-177,170,182, 66, 35,254,230,189, 22, 31,151, 27,161,239,126,207,186, 38,147, 21,242,233,233,233, 37,219,182,109,171, 48, 61, 66,
-161, 16,229,163, 7, 77, 38, 83,173,163,138,156,236,165, 97,227,250,214, 31, 85,157,185, 18, 10,133,224,121, 30,246,246,246, 80,
- 40, 20,117,110,122,180,113, 11,233,217,166,251,208,157,221, 7,191, 37, 56,115, 96, 61,127,235,252,161, 17,101,249,137,191,215,
-245, 59, 42, 41, 41,137,103, 24, 38,105,197,138, 21, 45, 54,108,216,208,112,246,236,217, 79,214,127, 53,245,187,167,111,112, 79,
-151, 69,188,115,231, 14,153, 54,109,154,209, 96, 48, 36,151,148,148,220,182,102,145,107, 93, 94,226,138,223,126, 90, 30,146,145,
-149,243, 70, 64,120, 27,184, 54,108, 3,143,160,182, 40,209,152,113,227, 81, 54,158,220, 63,131,132, 43,123,119,233, 11,220,151,
-214, 37,189, 45, 90,180,240, 19,139,197, 3, 1,132, 40, 20,138,250, 12,195, 72,197, 98,241,107, 12,195, 36, 49, 12,115, 63, 36,
- 36,228, 12,170, 89,190,168, 42, 82,207,111, 52,214,239, 58,113, 77,154,198,174,219,147, 92, 93, 68,154,198,238,142, 78,230, 48,
- 51,255,204,106,163,123,175, 21, 43,137,185, 48,126,207,166,210,125,219,127,249, 86, 56,118,242, 44, 46, 78,237,244,129, 72, 33,
- 61,245,213, 27,214,143,230, 22, 48, 76,206,236,217, 31,253,107,154,134,103,145,171,103, 83, 54,100, 91,163,241,108, 61,197, 79,
- 20, 94, 97, 63,196,125, 48,101,113,179,214, 29,199,117,238, 59, 74,192, 74,108,113,226,247,117, 36,249,222,217, 61, 34,194,205,
-211,229, 63, 78,254,171, 15, 9,147,201, 84,171,185,170,178,233,214, 89,221,245,143,147,231,223, 56,114,252,194, 87,125,123,118,
-114,254,241,243,215,240,205,207, 7, 96,163,144,129,240, 28, 70,117,247, 27,113,127, 71,239,129,190,238,114,239,125,231, 50, 47,
- 78, 95, 21,247,137, 78,103,126, 88,219,218,121,207, 12,243, 37, 59, 59,187,130, 78,157, 58,181,147,201,100, 76, 97, 97,161,200,
-205,205,141,117,112,112, 48,101,102,102,234,140, 70,227, 62, 66,136,182, 46,249, 52, 91,120,164,228, 25,112,112,255, 62,220,189,
-126, 6,247,239, 39,106,238, 39,220,255,158, 17,145, 85,101,185, 15, 95, 40,178,202, 87, 57,138,144,212,121, 20,161, 86,168, 88,
-122,231,200, 55, 93,131,187,191,223,222, 57,176, 35,156,252,159, 6,138,212,153,113,200,184,185,231,160, 38, 91, 50,146,144,184,
- 23, 30,251,238,229,211, 48,152, 8,165,184,122,254, 15, 16,158, 95, 11, 0,132,231,215,222,185,124,116,106,219,126,111,161,158,
- 91,253,230, 12,195, 48,117, 93,143, 17, 0,100, 2,179,250,143, 77, 75,247,164,164,164,224,193,131, 7,120,244,232, 17,138,139,
-139,177, 61,229,162,186, 46, 58,249,143,175,158,114,111,212,185,247,152, 55,103, 28, 30, 58,124,168,220,175, 65,144, 32,196,199,
- 30, 46,182, 34, 36, 38,103,225,113, 92, 18,255,232,222, 69, 3,209,231, 15, 41,124,116,165, 90,195,231,218,100,164,187, 64,200,
-204, 57,115,232,233,218,130, 81,131,223, 12,249,120,250,236,118,245,156,157,170,124,142, 23, 23,149, 72, 23, 46,156, 31, 82,190,
-127,109,107, 17, 10,132, 66,205,228,169,239,217, 8, 24, 1,202, 47, 23, 41,111, 35,171,248,241,244,131, 68, 44,170,181,140, 78,
- 28, 26, 9,150,231,161,213, 91,160,209,155,160,214, 24,145, 83,168, 66,252,253, 71,184,126,233, 56, 82, 30, 39,105, 88,150, 61,
- 7,130,253, 5,206,234, 93,207, 79,172, 91, 99,249,132,208,175,158,147, 61, 82, 85, 6,200,165, 34,100,167, 63,102,205,172,225,
-133, 39, 89, 47,140, 57,148,227, 30, 62,184,215,196,119, 62, 61,222,185,115,164, 67,179,136, 86, 74, 23,123,123, 72, 68,192,227,
-244,124,220,187,125, 67,155,246, 48,166,148,179,232,251, 20,198, 29,250,203,171,180,252,207, 26, 44, 51,199, 70,205,250,116,217,
- 73,142,227, 20, 34,161, 80,111, 33,124,159,191, 98,174,254, 46, 8,225, 51,223,121,255,163,138,168, 46, 0, 88, 56, 94,241,214,
- 59,179,245,149,223, 16, 24, 11,167, 44,143, 92,213, 50, 82, 79, 88,160, 50,106,230,254,116,119,243,242,205, 9,123, 1, 36,252,
-213,145,125, 0, 80, 82,106,186,235,220,115,247, 96,141,142,101, 0,220,175, 66, 83,219,189,123,247, 10,179,245,172,185,206,234,
- 10, 66, 42, 87, 78,237, 54,240, 77,193,153,131, 27,248,155,231, 14,142,124, 17,115, 85,169, 2, 51, 3,184,206, 48, 76,220,188,
-121,243, 90,187,187,187,187,207,159, 63, 95, 94, 90, 90, 42,254,241,199, 31, 13,133,133,133,185,165,165,165,209,132, 88,223, 63,
-225, 89,165, 57, 81,225,222,120, 29,179,119, 67, 47, 39, 55,239,222,142, 46,190,141, 74, 10, 50, 31,151, 22,101, 30,103,120,156,
-210,228, 39, 70,215, 53,173, 49, 49, 49,233, 77,155, 54, 61, 32, 20, 10,111, 3,112, 1, 96, 71, 8, 41,102, 89,182, 68, 44, 22,
-231, 38, 38, 38,214,121, 65,214,212,243, 27,141,157,223,249,117, 71,177,142,151,152, 4,146, 29,169,231, 55, 26, 1, 32,239,228,
-108, 29,128,131,238,221,230, 12, 59, 20,157,250, 93,124,137,195,251,249,231,150, 30,170,171,126,214,157, 93, 65, 47,171,252,235,
-179,227, 51, 1,188, 97,227, 30,242,109,236,157,232, 5, 12,129,152, 3,251,165, 46, 47,233,214,203,208, 23,139,197,134, 86,173,
- 90, 85, 57, 90, 80, 38,147,213, 56,191,214,179, 7,253, 6,166,107,215, 77,199,207, 92,122,227,216,169,203, 95,181,107,223,201,
- 89,238,227, 13,127, 39, 51, 54,125,212,242,253, 51,119, 10,110, 12,250,232,226, 79, 79,178, 13,247, 8, 33,134,186,164, 77,163,
-209, 60,100, 24,166,164,172,172,108, 48, 33, 36,131, 97, 24,223,146,146,146, 24,139,197, 18, 91,103, 35,192,227,245,246,237,219,
-108,103, 24, 70, 68, 88,254,235,104,177,112,135, 33,231,126,230,139, 24,138, 63, 69, 87, 27,216, 99,242,212,105,193,129, 65,141,
-130,203,215, 34, 12,171,111,135,177, 19,223, 14,174,223, 48, 56,248, 95,235, 19,214,252, 66, 69,178,111,235, 25,247,166, 61, 19,
- 79,174,248,220,249,241,149,119, 20,245,124,108,181,133,169,197, 37,169,183, 86,232,242,221, 87, 60,191, 66, 67, 93, 73,121, 20,
-191,106,195,138, 79,102,231,100, 37,111,208,230, 63,140, 3, 0,109,254,195, 56,165,123,163,207, 11,115, 51,103, 23,229, 63, 89,
-241,162,215, 66,171,213,102,111,219,182,205,177, 99,199,142, 2,119,119,119, 20, 20, 20,224,220,185,115, 60,207,243, 89,117,213,
-202,123,120,241, 28, 19, 24, 88,111,199, 38,245,215, 34,133, 93, 63,150,131, 23, 33,128, 72,128, 28,179, 81,125,188,192, 81,255,
- 17,185, 23, 93,115,185,228, 57,134, 8,136,160,124,109, 65,158,231,153,111,126,216,146, 42, 20, 75,171,108, 82,229, 44, 38, 37,
-207,243, 86,175, 69,152, 39, 76,115, 14,183,132, 90, 53,138, 47,142,121, 80,203,203, 41, 57,209,161,239,248,222, 44,203, 89, 0,
- 24, 42,109,249,132, 48,103,193,112, 39, 11,235,105,162,235, 98,170,254, 84,207,155,205,142, 16, 74, 96,167,176,128, 1,131, 82,
-181, 74,230,202, 73,239,255,149,178,148, 23,119, 48,158,233,218,213,223,116,250,236,132, 11,151,174,142, 36, 60,215,128, 35, 0,
- 8,147, 98, 50, 27,246,228,219, 23,110,126,209,244,254,175,193,144,191,113, 62, 10,107,155, 75,254,219, 52, 25,134,145, 60,171,
-172,185,202,203,223,188,140,116,214,180,182,224, 95,201,187,157,103,227, 78, 50,185,242, 35,157, 78,179, 65,151,247,240,240,203,
-188,158, 12,195, 56,200,100,178, 8, 91, 91, 91,113, 97, 97,225,117, 66,136,250, 85,252,222, 43, 19,249,230, 94,151, 30, 61,195,
-102,156,188,152,184,250, 89,243, 97, 5, 62, 35, 87,201,199,245,235, 54,107,243,254,131,255, 54,138,240, 85,200,251,223,165,201,
-116,237, 42,114, 43,177,127,131,227,248, 47,187, 7,107,116,185,201,137,211, 46,197, 22, 92, 39,132,104,254, 74, 58,165, 82,233,
- 88,179,217,172,144, 72, 36,122,147,201,180,237,191, 37,239,110,225, 67,190, 0,131,198, 86,139, 16,220,207,143, 59, 48,191,214,
-103, 72,147, 38, 18,101, 1,156,116,133, 46, 69,117, 53, 86,255,145,239,157, 97,132, 77,155, 54,141,148, 72, 36,126, 28,199, 41,
- 77, 38,147, 78,175,215,167,164,166,166, 94,173,110, 65,242,191, 59,157,238, 77,135,172, 18,139,197, 31, 0,128,197, 98, 89,147,
- 23,123, 96, 70, 77,199, 86,183,255,255, 75,125, 52,114,164,144,236,217,195,253, 29,223,145,119,196, 8,149,197,194, 58,148,255,
- 46, 17,139,212,153,119,246, 58,254,167,202,210, 43, 7,121,182, 60,194,223,177, 1,136,162,154, 84,147,106, 82,205, 42,246, 21,
-208,235, 73, 53,255,147,154,158,141, 7,248,122, 54, 30,224,107,237,241, 85,237, 79,175, 39, 1,221,170,223, 68,212, 98, 82, 40,
-148,255,192,139, 29, 79,175, 2,229, 63, 73,118,194,225,140,191,115,127, 10,133, 1, 16, 85,205, 3,208,234,208, 31,195, 48, 81,
- 47,240,128, 61, 77, 53,169, 38,213,164,154, 84,147,106, 82,205,127,150,102,109,218,175, 76,211, 35,109, 34,164,154, 84,147,106,
- 82, 77,170, 73, 53,169, 38,109, 34,124,185,155, 0, 20, 10,133, 66,161, 80, 40,148,151, 10, 53, 88, 20, 10,133, 66,161, 80, 40,
-212, 96, 81, 40, 20, 10,133, 66,161, 80,131, 69,161, 80, 40, 20, 10,133, 66, 13, 22,133, 66,161, 80, 40, 20, 10,229,197,249, 91,
-103,114,167, 80, 40, 20, 10,133, 66,249, 39, 66, 35, 88, 20, 10,133, 66,161, 80, 40,212, 96, 81, 40, 20, 10,133, 66,161, 80,131,
- 69,161, 80, 40, 20, 10,133, 66, 13, 22,133, 66,161, 80, 40, 20, 10,133, 26, 44, 10,133, 66,161, 80, 40, 20,106,176, 40, 20, 10,
-133, 66,161, 80,168,193,162, 80, 40, 20, 10,133, 66,161,252,231, 13, 22,195, 48, 81, 84,147,106, 82, 77,170, 73, 53,169, 38,213,
-164,154,212, 96, 81, 40, 20, 10,133, 66,161, 80,168,193,162, 80, 40, 20, 10,133, 66,161, 6,139, 66,161, 80, 40, 20, 10,133, 26,
- 44, 10,133, 66,161, 80, 40, 20, 10, 53, 88, 20, 10,133, 66,161, 80, 40,255, 33, 24, 0, 85,142, 4, 32,132,156,182, 90,228, 5,
- 70, 19,212,166, 79, 53,169, 38,213,164,154, 84,147,106, 82,205, 87, 79,179, 54,237,186,248,143,255,106, 8, 33,127,219, 6, 32,
-138,106, 82, 77,170, 73, 53,169, 38,213,164,154, 84,243,159,182,209, 38, 66, 10,133, 66,161, 80, 40,148,151, 12, 53, 88, 20, 10,
-133, 66,161, 80, 40,212, 96, 81, 40, 20, 10,133, 66,161, 80,131, 69,161, 80, 40, 20, 10,133, 66, 13, 22,133, 66,161, 80, 40, 20,
- 10,229,197, 97,158,141, 6,160, 80, 40, 20, 10,133, 66,161,188, 36,104, 4,139, 66,161, 80, 40, 20, 10,133, 26, 44, 10,133, 66,
-161, 80, 40, 20,106,176, 40, 20, 10,133, 66,161, 80,168,193,162, 80, 40, 20, 10,133, 66,161, 80,131, 69,161, 80, 40, 20, 10,133,
- 66, 13, 22,133, 66,161, 80, 40, 20, 10, 53, 88, 20, 10,133, 66,161, 80, 40,148,255,188,193, 98, 24, 38,138,106, 82, 77,170, 73,
- 53,169, 38,213,164,154, 84,147, 26, 44, 10,133, 66,161, 80, 40, 20, 10, 53, 88, 20, 10,133, 66,161, 80, 40,212, 96, 81, 40, 20,
- 10,133, 66,161, 80,131, 69,161, 80, 40, 20, 10,133, 66,161, 6,139, 66,161, 80, 40, 20, 10,229, 63, 4, 3,160,202,145, 0,132,
-144,211, 86,139,188,192,104,130,218,244,169, 38,213,164,154, 84,147,106, 82, 77,170,249,234,105,214,166, 93, 23,255,241, 95, 13,
- 33,228,111,219, 0, 68, 81, 77,170, 73, 53,169, 38,213,164,154, 84,147,106,254,211, 54,218, 68, 72,161, 80, 40, 20, 10,133,242,
-146,161, 6,139, 66,161, 80, 40, 20, 10,133, 26, 44, 10,133, 66,161, 80, 40, 20,106,176, 40, 20, 10,133, 66,161, 80,168,193,162,
- 80, 40, 20, 10,133, 66,161,188, 56,204,179,209, 0, 20, 10,133, 66,161, 80, 40,148,151, 4,141, 96, 81, 40, 20, 10,133, 66,161,
- 80,131, 69,161, 80, 40, 20, 10,133, 66, 13, 22,133, 66,161, 80, 40, 20, 10, 53, 88, 20, 10,133, 66,161, 80, 40, 20,106,176, 40,
- 20, 10,133, 66,161, 80,168,193,162, 80, 40, 20, 10,133, 66,161, 6,139, 66,161, 80, 40, 20, 10,133,242,159, 55, 88, 12,195, 68,
- 81, 77,170, 73, 53,169, 38,213,164,154, 84,147,106, 82,131, 69,161, 80, 40, 20, 10,133, 66,161, 6,139, 66,161, 80, 40, 20, 10,
-133, 26, 44, 10,133, 66,161, 80, 40, 20,106,176, 40, 20, 10,133, 66,161, 80, 40,212, 96, 81, 40, 20, 10,133, 66,161,252,135, 96,
- 0, 84, 57, 18,128, 16,114,218,106,145, 23, 24, 77, 80,155, 62,213,164,154, 84,147,106, 82, 77,170, 73, 53, 95, 61,205,218,180,
-235,226, 63,254,171, 33,132,252,109, 27,128, 40,170, 73, 53,169, 38,213,164,154, 84,147,106, 82,205,127,218, 70,155, 8, 41, 20,
- 10,133, 66,161, 80, 94, 50,212, 96, 81, 40, 20, 10,133, 66,161, 80,131, 69,161, 80, 40, 20, 10,133, 66, 13, 22,133, 66,161, 80,
- 40, 20, 10, 53, 88, 20, 10,133, 66,161, 80, 40,148, 23,135,121, 54, 26,128, 66,161, 80, 40, 20, 10,133,242,146,160, 17, 44, 10,
-133, 66,161, 80, 40, 20,106,176, 40, 20, 10,133, 66,161, 80,168,193,162, 80, 40, 20, 10,133, 66,161, 6,139, 66,161, 80, 40, 20,
- 10,133, 66, 13, 22,133, 66,161, 80, 40, 20, 10, 53, 88, 20, 10,133, 66,161, 80, 40,212, 96, 81, 40, 20, 10,133, 66,161, 80,254,
-243, 6,139, 97,152, 40,170, 73, 53,169, 38,213,164,154, 84,147,106, 82, 77,106,176, 40, 20, 10,133, 66,161, 80, 40,212, 96, 81,
- 40, 20, 10,133, 66,161, 80,131, 69,161, 80, 40, 20, 10,133, 66, 13, 22,133, 66,161, 80, 40, 20, 10,133, 26, 44, 10,133, 66,161,
- 80, 40,148,255, 16, 12,128, 42, 71, 2, 16, 66, 78, 91, 45,242, 2,163, 9,106,211,167,154, 84,147,106, 82, 77,170, 73, 53,169,
-230,171,167, 89,155,118, 93,252,199,127, 53,132,144,191,109, 3, 16, 69, 53,169, 38,213,164,154, 84,147,106, 82, 77,170,249, 79,
-219,104, 19, 33,133, 66,161, 80, 40, 20,202, 75, 70, 84,213, 31,197,109,151,228,177, 44,235, 6, 0, 34,145, 40,223,114,227, 51,
-207,154, 68,124, 61, 61,123,112,192,122, 0, 16, 2,111,103,100,103,159,170, 66,243, 20,203,178, 78,207, 52, 75, 44, 55, 62,235,
- 93,147,166,184,205,151, 39,254,180,255,245,121, 61,171,136, 47, 10,197,109,190,204,126, 46,173, 94,117, 8,223,113,255, 31,233,
-252, 95,209,252, 39, 35,105,183, 36,207, 98,121, 90,142,196, 98, 81,190,249,122,205,229, 72,210,246,203,236, 63,237,127,109,158,
-123, 77,154, 74,133,172, 40,208,219,117,101, 77,154, 79,178, 11,103,106,117, 6,231,154, 52,255,103,238, 77, 43,241,240,240,104,
- 37, 16, 8, 62, 99, 24,198,190,210,159,239,101,101,101,125, 72, 75, 37,133, 66,121,229, 12, 22,203,178,110,183,127, 95, 0,173,
- 17,232, 49,254, 75,183,128, 33, 63,111,255,183,125, 12, 37, 82,125,210,129,166, 82,104,157, 20, 98,214, 62, 41, 41,137, 1, 0,
- 47, 47,175,245, 0,252,170,208,116,186,253,251, 2,232, 76, 64,231,209,139,156, 58,249,250,218,231, 10,133,179,100, 10, 69, 55,
-131,193, 16, 6, 0,114,185, 60,222,168,215,159,243,224,184,111,159,223,191,186, 12, 84, 78,107,247,113, 95,186,133, 14,249,249,
-125,142,231,165,250, 39,123, 58,243,154, 52,145,132, 51,253,248, 70, 78,206,177, 5, 0,103,205, 5,169,124,222, 46,163, 62,117,
-246,243,244,236, 46,149,203,155,219,217,219, 71,242,132, 52,230,121,158,225, 88, 54, 65, 91, 86,118,137,103,217,187,156, 69,231,
-124,251,192, 82,190,166,116, 62,159,151,145,128,232,154,135,199, 8,165,141, 77, 55,129, 72,212, 1, 0,120,150,189,170,211,106,
-207,181,203,205,221,107, 77,222,173,189, 62, 47,186,255, 63, 13,139,133,117, 75, 62,177, 0, 70, 11, 16, 49,252, 43,183,102,175,
-111,222, 14, 0,166,252,187,238,101, 73,135,218, 2,128, 77,224,128,235, 50,143,136, 60, 0, 16,165,229,184, 61, 60, 50, 15, 70,
- 11,208,120,192, 34,183,218, 52, 39,206,223,237,252,241,228, 97, 50, 0, 56,185,239,135, 70,103,247,175,237, 11, 0,221,135, 77,
- 59,214,107,248,244,135, 0,240,245, 47,251,157,119,126,245, 90,141,154,214,221,155,106,137, 58,233, 72,144,169, 52,199,209,215,
- 70,228,145,148,148, 36,168,203,189,233, 3, 56,228, 0,239, 10,132,194,200,192,160,160, 8, 0,228,201,227,199,119, 56,150,189,
-236, 9,252,248, 50,203,146, 80, 40,124, 63, 43, 43,107, 96,229,191,121,123,123,211, 2, 73,161, 80, 94, 77,131, 5, 0, 90, 35,
-112,225, 17,208,165, 93, 51, 76,126,189,159,109,229,255,237,255,117,177, 95,102,220,169,208,165, 27,191, 22,132,133,133,225,201,
-147, 39, 86,157, 76,103, 2,206, 39, 1, 50, 67,138, 93,190, 84,250,120,254,103,159,217, 71, 70, 70,138, 60, 61,159,190,132,231,
-231,231,183,187,124,249,114,171,133, 11, 23, 78,149, 25, 82, 74,116, 38,104,206, 39,213,174, 91,158,214,176, 70,245,241,217,244,
-215, 28, 0, 96,213,236,189,173,142, 94,189, 91, 47, 37, 37,165,199,210,165, 75,139,188,163,163,215,214,227,184,141,177,249,249,
- 25,214,164,115,215,137, 24,121,160,233, 84,192,136,137, 19,247,249,251,251,219,122,121,121, 49, 74,165, 18, 66,161, 16,165,165,
-165,126,137,137,137,125,239,222,189,171,189,116,237,160, 52,246,238,240, 39,153,194, 22, 6,107,242, 46, 97, 11,229,113,193,193,
-241, 35,250,246,245, 25, 48, 96,128,188, 65,131, 6, 0,128,148,148,148,224, 63,254,248, 99,244,209,163, 71,231, 75,216, 66, 86,
-103,130,161,182,188,151,107, 2,128, 28,232,224,232,230, 54, 86, 40, 22,135,177, 44,235,253, 44,186,144,197, 89, 44,241,170,252,
-252,109,207,239, 79,249,119,140, 22,224,126, 14, 16, 21, 25,129,113,195,162,108, 0,224,147, 81, 75,218,165,165, 60,146,152, 76,
- 38, 52, 10,105,220,113,241, 87, 43, 79, 64, 32,192,214,253,167, 43,246,183, 70,243,222,253,100, 44, 88,188, 10,217,177,123,219,
-113,234, 71,221, 52,165,106, 33, 0,216, 59, 56, 12,219,187,107,199, 57,175,166, 35,174, 61, 42, 52, 91,165, 89,211,189,121,124,
-215,247,158,153,113,231,154,252,116,242, 55,177,159,159, 31, 98, 99, 99,235,116,111, 66,157,104,199,123,122, 38,124,251,209, 71,
- 30,157, 59,119,134,173,173, 45, 68, 34, 17, 88,150,141,186,124,249,114,212,130, 5, 11,166, 65,157,168,181,246,222,180,130,111,
-189,188,188,186, 13, 30, 62,214,179, 91,239, 1, 24,214,167, 35, 45,136, 20, 10,229,213, 53, 88, 34,145, 40,191,231,132,165,110,
-145,109,195,113,243,238, 67,117,106,122, 78, 89,249,255, 84,247,247, 55, 26, 29, 21,216,100,221,209, 63, 96, 52, 26,113,229,202,
- 21,220,189,123, 23, 41, 41, 41,152, 55,111,158, 81, 8,188, 93,141,102, 73,231,209,139,156,100,198, 12,219,150,206, 25, 13,118,
-110, 63, 39,212,235,245, 56,127,254, 60, 74, 74, 74, 32,149, 74,225,227,227,131, 78,157, 58,137,206,159, 63, 95,111,212,152,177,
- 14,189,134, 76, 74, 54,202,124,203, 68, 34, 81, 73,181, 25, 16,137,242,123,140,255,210,173, 73,112,125, 60, 78,205, 86,127,246,
-213,175,101, 60, 79, 68,186,180, 76,243,133, 11, 23, 16, 17, 17,129, 93,187,118, 57,151,148,148,124,190,105,211,166,207, 60,191,
-223,184, 38, 39, 51,113,118, 13,122, 37,157, 71, 47,114,106,196,157,245,223,187,227, 55,201,221,187,119, 37,235,214,173, 67, 81,
- 81, 17,164, 82, 41, 28, 29, 29,225,225,225,129, 70,141, 26, 49,239,190,251,174,109,183,110,137,248,124,230, 36,255, 28,199,193,
-137,213,165,179, 92, 83, 98,202, 81, 6, 11,111, 5,174,223,188, 89,208,166, 77, 27,166,242, 62,126,126,126,232,218,181,171,124,
-232,208,161,129,211,222,125,143,143, 26, 58,229,177, 89,234,169,171, 77, 19,218, 12,133,179, 46,218, 43,106,244,232, 67,139, 22,
- 45,114,244,240,240,128,141,141, 13, 0, 64,173, 86,251,164,166,166,182,155, 63,127,254,240,235,247,118,137, 58, 15,200,200,134,
-141,175,190,166,235,249, 79, 69, 44, 22,229,151, 71,141,236,108, 20, 37, 25,153,121, 90, 0, 48,153, 76, 48,153, 76, 48, 26,141,
-120,103,218, 20,225,219,195,219, 4,249, 71,190, 31,147,146,149, 87,220,248,244,181,122,229,199,214,166, 41,210,165,168, 84,233,
-103,222, 94,240,209, 71, 30,238,238,255,106,249,219,186,101,139,176,184,184, 56,106,193,130, 5, 77,136,178,171,170,241,128, 69,
-142, 53,105,214,120,111, 62,252,163,193,226,233,189,155,255,252,213, 17,112, 28,135,232,232,104, 92,188,120, 17, 43, 87,174, 36,
-199,142, 29, 83,219,219,216,212,120,111, 66,157,104,215,201, 51, 55, 96,249,242,125,140, 76, 38,195,193,131, 7,241,224,193, 3,
- 8, 4, 2, 52,107,214, 12,227,198,141, 67, 84, 84,148,199,228,201, 83, 72,231, 62,163,158,192, 33, 68,243, 87,202, 18,195, 48,
- 2, 79, 79,207,247,223,249,240, 83,207, 97,163,223,192,247,223,124, 65, 13, 22,133, 66,121,117,168,178,247, 59, 32,104, 56,228,
-231,157,123,110,241,127, 52, 28,242,243, 78, 2, 8, 8, 32,176, 7,234, 71, 70, 70, 90, 84, 42, 21,185,113,227, 6,121,231,157,
-119,180,107,214,172, 57,247,199, 31,127,236,101,205,230, 13, 17,205,155,175, 32,128,160, 58,205,102, 14, 14, 14, 1, 1, 1, 5,
- 25, 25, 25,228,232,209,163,100,225,194,133,100,219,182,109,228,216,177, 99,228,244,233,211,228,216,177, 99,100,231,206,157,228,
-222,189,123,228,209,163, 71, 36, 48, 48,176,160,153,131,131, 67, 13,154, 66, 2, 8, 27, 13, 89, 55,123,223, 77,203,162,144, 33,
- 63,207, 32,128,176,177,187,123,104,207,158, 61,185,189,123,247,146,173, 91,183,146,205,155, 55,147,123,247,238,145,194,194, 66,
-226,237, 31, 80, 80,126, 92,117,233, 36,128, 32, 34, 34,162, 64,165, 82, 17, 95, 95, 95, 34,149, 74,137,187,187, 59,105,212,168,
- 17,105,215,174, 29,233,219,183, 47,121,253,245,215,201,231,159,127, 78, 84, 42, 21,241,247,247,207, 43, 63,174, 58,205, 1,158,
-158,138,192,192,192,244,216,216, 88, 82, 29,122,189,158, 20, 22, 22,146,179,103,207,146,192,192,192,244, 1,158,158,138,154, 52,
- 21, 64,203,166, 77,155, 22, 20, 22, 22, 18,179,217, 76,210,211,211, 73, 92, 92, 28,121,240,224, 1, 73, 79, 79, 39,122,189,190,
- 66,251,225,195,135, 36, 32, 32,160, 64, 1,180,172, 86,243,159,188,149,151,137,231, 54, 63,119,247,190, 30, 30, 30,250,125,251,
-246,145,172,172, 44,178,105,211, 38, 34, 0,150,252,219,190, 53,104, 74,129, 94,157, 58,117,226,162,163,163, 73, 76, 76, 12,153,
- 51,103, 14,233,221,187, 55,233,211,167, 15, 89,176, 96, 1,201,204,204, 36,153,153,153,164,111,223,190,156, 20,232, 85, 91,249,
-172,234,222,116, 0,252, 6, 12, 24,160, 55,155,205,228,201,147, 39, 36, 44, 44, 44, 83, 8,140,181, 1,154,116, 1,100,181,149,
- 79,111,192,201,211,211, 51, 39, 58, 58,154,236,223,191,159,248,251,251, 23, 8,129,137,246, 64, 67,123,160,161, 16,152,216,176,
- 97,195,130,232,232,104, 82, 84, 84, 68,252,252,252,114,188, 1,167, 23, 45, 75, 0, 4,158,158,158,191,125,249,245, 15, 36, 49,
- 83, 75,190,252,250, 7,226,233,233,153, 78, 8, 33,158,158,158,167,104,153,164, 27,221,232,246,191,190,137,234,100,198,108,108,
-150, 46, 94,188, 88,100, 48, 24,240,235,175,191,106,198,140, 26,181,223,209,209,145, 21,139,197, 96, 4,181, 15, 72,212, 56, 56,
-124, 48,111,238, 92, 71,163,209,136, 91,183,110,161, 85,171, 86,144,201,100,144, 72, 36, 16,139,197, 16,139,197,240,244,244, 68,
-126,126, 62,194,194,194, 48,117,234, 84,135, 31,191,255,254, 3,168,213,139,107,210,229,121, 34, 2, 0,142,231,165,245,189,188,
- 38,135, 54,109,186, 98,218,180,105, 2, 27, 27, 27, 24, 12, 6, 24,141, 70, 60,120,240, 0,206,206,206, 80, 42, 20, 86,229, 89,
- 32, 16, 8,108,109,109,113,246,236, 89,252,242,203, 47, 72, 73, 73, 65, 78, 78, 14,236,236,236, 16, 22, 22,134,198,141, 27,163,
- 75,151, 46,120,242,228, 9, 24,134, 97,106,211, 75, 16,139,223, 29, 55,122,180, 91,120,120,120,149,255, 55, 24, 12, 80,169, 84,
- 80,171,213,112,119,119, 71,223,190,125,221, 14, 31, 60,248, 46,128,111,171,218,223, 25,240,240, 9, 14, 62,116,227,198, 13, 23,
- 66, 8,182,110,221,138,178,178, 50,152, 76, 38, 8, 4, 2,200,229,114, 56, 57, 57,161,123,247,238,112,117,117, 69,112,112, 48,
-118,239,222,237,210,183,111,223, 35,206,249,249, 45,139,128,108,250,122, 81, 59,105,121,121, 39,123, 1, 46, 99, 95,127,253,216,
-221,123,247, 34,199,142, 29,139,188,188,188, 79,197,115,230,168, 44,192,170,218,142, 15, 1, 28,234,121,122,110, 92,190,124,185,
- 32, 55, 55, 23,179,102,205, 42,204, 78, 75,155,227, 0, 92, 2,128, 51,199,143, 71,110,219,182,109,217,214,173, 91, 93,182,108,
-217, 34,136,136,136,216, 24,146,158, 30,150, 8,168,235,146, 78, 13,240,254,234,213,171,229, 6,131, 1, 61,123,246,124, 34, 79,
- 73,105,206, 2,122,107,143,207, 1,222, 93,249,241,199, 30, 50,153, 12,179,102,205, 42,212,165,165,133,179, 64, 65,165, 93, 82,
- 93,147,147,143,143, 31, 63, 62,238,222,189,123, 46,171, 86,173,242, 24, 62,116,232,187, 0,150, 88,123,142,202, 29,218, 61, 61,
- 61,131, 7, 15, 31,235,222,168, 73, 83,236,223,185, 9, 63,173, 94,186,145,227,184,159,189,189,189,167, 11, 4,130,111,104,201,
-163, 80, 40,175,100, 19, 97,117, 56,187,186,182, 10, 13, 13,197,133, 11, 23,208,180,105,211, 27,142,142,142,172, 68, 38,131, 88,
- 44, 6,225,249, 90,143, 87,216,216,244,232,220,185,179,232,234,213,171, 8, 8, 8,128, 66,161,168, 48, 86,229,155, 68, 34,129,
-167,167, 39, 74, 75, 75, 17, 25, 25, 41,222,184,113, 99, 15, 0,139,107,211,206, 78, 77,180, 69,242,198,215,151,125,187,162, 97,
-155, 54,109,160, 86,151,130,231,121, 40,149, 74,152, 76, 38,136, 68, 34,152, 76, 38, 24, 76,164,212,154,188,114, 28,199, 9,133,
- 66, 4, 4, 4, 96,233,210,165, 48, 24, 12,144, 72, 36, 0,128,210,210, 82,168, 84, 42,196,197,197, 33, 53, 53, 21,228,217, 43,
-121, 77,216,216,218,246, 27, 52,104,144,180,170,255, 25,141, 70,168,213,106,168,213,106,168, 84, 42, 24, 12, 6, 52,107,214, 76,
-122,238,236,217,126,213, 25, 44,163, 92, 62,124,203,150, 45,110, 82,169, 20,122,189, 30, 26,141, 6, 25, 25, 25, 72, 75, 75, 51,
-228,231,231,179,118,118,118, 2,127,127,127,129, 76, 38,147, 13, 25, 50,132, 41, 45, 45, 5,195, 48, 24, 48, 96,128,243,246,173,
- 91, 95, 3,176,146, 22,127,235, 56, 9, 24, 91,154, 76, 3,219,182,105,115,246,198,205,155, 17, 31,124,240, 1,238,221,187,183,
- 92,185,107,215, 5, 29,112,183,166, 99,159, 0,239,174,168,100, 92, 72, 90, 90, 83,243,115,198,197,255,169,113,137, 45, 55, 46,
- 35,235,104, 92, 0,192,206,193,161,181,167,167, 39,142, 29, 59,134,244,148,148, 79,234, 98,174, 0, 64, 32, 20,118,234,220,185,
- 51, 14, 30, 60,136,204,180,180, 79,158, 51, 87, 0,128, 2,160, 64,244,228,201, 39, 27, 55,110,252,237,205, 55,223,132, 80, 36,
-234, 4,150,181,250, 28, 85,117,104,127,247,131, 79,112,112,223,182,141, 57, 57, 57,111, 17, 66,120, 0, 55,104,137,163, 80, 40,
-175, 2,117,154, 7,203,195,195,195,219,198,198, 6,217,217,217,104, 28, 26,154, 47,147,201, 32, 21,139, 33,151, 74,173, 58,222,
- 96, 48, 52,245,240,240,128, 90,173,134,139,139, 11, 36, 18, 73,197, 38,149, 74, 43, 62,219,217,217, 65, 32, 16,192,219,219, 27,
- 6,131,161,105,109,186,172, 42,201,237,248,166, 57,239, 28,222,183,165, 97,223,190,253,224,228, 84, 15,190,190, 62,112,115,115,
-131, 66,161,128,175,175, 47,130,130,130,200,250,245,235, 33,176, 15,178,234, 1, 94,217, 52,137, 68, 34,112, 28,135,188,188, 60,
- 36, 38, 38,226,222,189,123,136,142,142, 70, 76, 76, 12, 52, 26, 13,172,240, 87,208,234,116,205,171, 10,116, 25,141, 70,168, 84,
-170,138,232,149, 74,165, 66, 65, 65, 1,158, 60,121,130, 82,141,166, 69,117,122, 78,206,206,195,194,195,195,133, 0,160, 80, 40,
-208,162, 69, 11,252,252,243,207,236,225, 3, 7, 70, 53,137,142,174,231,123,226,132,227,250,117,235, 70,141, 24, 49,130,187,118,
-237, 26, 74, 75, 75,113,255,254,125,184,186,186,138,164,114,249,107,180,232,215,141,219,128,214, 69,163,233,211,161, 67,135,100,
-181, 90,141,111,190,249, 70, 32,182,179,251,101, 17, 32,172,197, 85,116,236,220,185, 51, 14, 29, 58,132,236,180,180, 57,105, 85,
- 24,151, 52,160, 32,253,201,147, 57, 27, 55,110, 68,175, 94,189,192,136, 68,117,238,136,212,174, 93,187,112,158,231, 17, 27, 27,
- 11, 71,224,122, 93,143, 15, 12, 10,138,176,181,181,197,131, 7, 15, 96,243, 44,186, 86,229,139, 2,112,233,206,157, 59, 80, 40,
- 20,104,220,164, 73,203, 58,158,230, 91, 47, 47,175,156,119, 63,248, 4,251,143, 95, 1, 0, 28,220,183, 45,175,146,185,162, 80,
- 40,148,127,166,193, 42, 71, 44, 22, 67, 42,147, 65, 42,149, 62, 53, 70, 50,153,213,199, 50, 12, 3,185, 92, 94, 97,168, 42, 27,
-171,202,159,149, 74,165, 85,198, 5, 0, 44,185, 87, 34, 95, 27, 57, 66, 42,145, 72, 96, 50, 25, 65, 8,129, 76, 38,135,163,163,
- 35, 2, 2, 2,160,211,105, 49,104,240, 48, 99,134, 74,114, 68,226,211,227,222,139,228,153,101, 89,104,181, 90,148,148,148,160,
-184,184, 24,165,165,165,208,235,245,176,162,117,176,162,170, 77, 79, 79,199,142, 29, 59, 80, 84, 84, 4,224,105, 7,234,114, 83,
- 85,254, 51, 57, 57, 25, 91,183,110, 69, 74, 74, 10,132, 66,161,213,223, 79,100,100, 36,142, 28, 57, 34,236,218,163,199,134, 83,
-254,254,217,167,252,253,179,187,246,232,177,225,208,161, 67, 66,111,111,111,164,166,166,226,214,173, 91, 40, 41, 41, 1, 33,132,
-161, 69,191,238, 60, 6, 74,116,197,197,111,126,250,233,167,196,214,214, 22,223,172, 88,209,124, 9, 48,198, 90,227,226, 80,131,
-113,113,248,107,198, 5,132, 16,240, 60, 15,142,227, 94, 40,111, 12,195, 48, 98,177,184, 46,229, 25,120,186,212,150,181,250, 2,
- 66,200,251,239,124,248,169,231,123, 31,205,199,185, 19, 71,202,255,158, 68,205, 21,133, 66,121, 21,169, 83, 19, 97,118,118,118,
-150, 86,171,109,232,239,239,143,204,204, 76, 55, 63, 63,191, 52,169, 88, 12,137, 84,106, 85, 31, 44,185, 92, 30,155,151,151,215,
-209,219,219, 27, 44,203, 86,152,169,231,155, 8,203,163, 50,247,239,223,135, 92, 46,175,117,156,185,128, 43,171, 31, 22, 22, 86,
- 17, 9,114,116,116,132,163,163, 3,100, 50, 57,150, 45, 91,198,111,248,229,151, 31,229, 97,239,170, 63,156,244, 49,185,189,100,
-195, 75,189,128,214, 86, 72, 74,165, 50,182, 65,131, 6,237,149, 74, 37,246,239,223,143,212,212, 84,148,148,148, 64,167,211,193,
-104, 52, 66,167,211,193,100, 50, 65, 46,151,163, 73,147, 38,168, 87,175, 30,226,227,227,171,205,123, 73, 81,209,254,216,216,216,
-246,109,218,180,169,136,160,116,235,214,141,233,214,173,155, 75,249,239, 58,157, 14,133,133,133,184,113,227, 6, 78,159, 62, 13,
-134, 97,144,148,148,196, 25,245,250,157,180,232,191, 24, 6,224,170,112,227,198,223,166, 78,157, 58,169, 99,199,142,224,128,190,
- 0,182,254,167,140, 75, 57,209,209,209,113, 28,199,117,108,212,168, 17, 84, 64, 91, 0, 7,235,100, 30, 31, 61,186,195,178,108,
-143,230,205,155, 99,255,158, 61,145, 0, 82,171,218, 79, 11, 68, 70, 68, 68, 64,175,215,227,126, 66,194,109,107,205,149,167,167,
-231,134,119, 62,252,116,226,176,209,111, 96,255,206, 77, 56,184,111, 91,198,143,107,150,251, 18, 66,204,180, 84, 81, 40,148,127,
-188,193, 42, 41, 42,186, 29, 23, 23,215,176,101,203,150,216,176, 97, 67,155, 14,237,219,103, 73,164, 82, 86, 42,145, 64, 96, 69,
- 5,162,215,106,207, 92,190,124,185,109,175, 94,189, 68,215,174, 93,131,135,135, 71,133,193, 42,255, 41, 18,137, 64, 8,129, 82,
-169,196,177, 99,199,204,122,173,246, 76,109,186, 28,203,113,130,103, 6,143, 16, 2,149, 74, 5,137, 68,130,245,235, 55, 96,211,
- 47,191,188,158,153,147,179, 55,184,149,211, 71, 0,228,255,177,138, 89,167, 59,123,230,204,153, 86, 51,103,206, 20,251,248,248,
- 64,165, 82,161,164,164, 4, 69, 69, 69, 40, 45, 45, 69,105,105, 41, 74, 74, 74,160, 82,169, 32,151,203,241,232,209, 35,139, 65,
-167, 59, 91,157,158,204, 96,216, 55, 97,194,132,143,239,220,185,227, 41, 18,137, 96,177, 88,192,243, 60,120,158,135,217,108,198,
-163, 71,143, 16, 31, 31,143, 7, 15, 30,160,184,184, 24, 98,177, 24, 66,161, 16, 49, 49, 49, 37, 54, 22,203, 30, 90,244, 95, 28,
- 49,176,255,242,229,203,147,198,141, 27, 7, 47, 31,159, 46,200,204,180,202,184, 28,168,193,184,168, 95,192,184,252,201,248,104,
- 52, 55,147,147,147, 59,118,237,218, 21,158, 62, 62,203,155,100,102,158, 74,168, 67, 63, 44,142,101, 47, 93,190,124,185,199,248,
-241,227,177, 97,195,134,229,174,201,201,199, 11,158,107,206,116, 5, 92, 27, 4, 6, 46,159, 56,113, 34, 78,158, 60, 9,142,101,
-171,141,200, 61,215,161,189,254,224,225, 99,125,105,135,118, 10,133,242, 79,162, 78, 77,132,140, 86, 59,119,222,188,121, 22,161,
- 80,136, 97,195,134,217, 29, 60,116,104, 68,204,221,187, 1,249,249,249,142, 28,199,213,170,101,167, 86,175, 89,188,120,177,202,
- 98,177, 32, 36, 36, 4,197,197,197,224, 56, 14, 34,145, 8, 34,145, 8, 12,195, 64, 32, 16,192,214,214, 22,241,241,241,216,181,
-107, 87,169,157, 90,189,166, 54, 93,158,231, 99,127,255,253,119,136, 68, 34, 34,151,203,193, 48, 12, 68, 34, 17,214,175, 95,159,
- 63, 55, 39,103, 63, 0, 8, 5, 2, 19, 0, 8, 4,140, 85,189,114, 25,134,169,181,125, 82, 42,149,130,127,218,185,191,214,125,
- 93, 45,150,213,235,214,173,211, 36, 37, 37, 65,171,213, 86, 68,219,202,202,202, 42, 58,205,171, 84, 42, 48, 12, 3,131,193,128,
-139, 23, 47,106, 92, 45,150,213,213,233, 21, 1,185,153, 73, 73,131,218,180,105, 83,148,156,156, 12,181, 90,141,216,216, 88,156,
- 62,125, 26,187,119,239,198,201,147, 39,241,232,209, 35,176, 44, 11,111,111,111, 16, 66,112,224,192, 1, 53,171,209,244, 45, 2,
-114,105,209,175,158,250, 30, 30, 61,220,221,220,210, 93, 93, 92, 50,235,123,120,244,120,254,255, 14,192,195,135, 15, 31,130,101,
- 89, 4, 4, 4,212,171,169, 31, 22, 97,217,203,151, 47, 95,198,248,241,227,225,219,176,225, 50,127,192,245,249,125,252, 1, 87,
-255,192,192,101,229,198,133,176,236,229,186,166,217, 14,248,238,163,143, 62,210, 75, 36, 18,236,218,181, 43,192, 18, 20,244, 64,
- 4,140,177, 5, 66,187, 2,146,218,142,247, 4,126,252,252,243,207,115, 25,134,193,182,109,219, 92, 28, 2, 3,227, 68,192, 4,
- 7,160,190, 3, 80, 95, 4, 76,112, 8, 12,140,219,181,107,151, 11,203,178,152, 49, 99, 70,174, 39,240, 99,117,122, 66,161,240,
-253,236,236,236,129, 89, 89, 89,157,179,179,179,125,127, 92,179, 28,231, 78, 28,193, 79,171,151,110,204,201,201,121, 43, 47, 47,
-239, 70, 86, 86,214,184,204,204,204, 56, 90,226, 40, 20,202,171, 8, 83, 85, 63, 39,113,219, 37,121, 0,113,235,210,174, 25,110,
-222, 77, 84,187, 56,217,159, 40,255,159,234,254,254, 70, 3,218,121, 52,251,230,155,111, 32, 18,137,144,145,145,129,132,132, 4,
-216,219,219,227,131, 15, 62, 48, 90,140,198, 65,229,235,157, 49, 12, 19, 69, 8, 57,253, 76,243, 20,203,178, 78, 50, 99,134,109,
-132, 83,114,195,173,155, 55, 10,237,236,236, 80, 86, 86, 86, 49,173,128, 82,169,132, 66,161,192,189,123,247, 48,254,141, 55,185,
-199,108,243,138,137, 70,203,215, 59,171,172, 9,134, 17, 2, 64, 95, 39, 39,229,125,153,108,150,179,187,251,236,247,222,123, 79,
-209,165, 75, 23, 72, 36, 18,180,106, 27,153,107,211, 98,246,119, 2, 1,195,102, 22,149,206, 11,172,239,229,144,144,148, 10,128,
-121,186,102,225,179,181, 8,171, 74,103, 83,249,189,128,173, 63,125, 97, 31, 22, 22,246, 52,223, 42, 21,242,242,242,144,159,159,
- 15,149, 74, 5,173, 86, 11, 0, 56,125,250, 52,206,222, 72, 46,205,177,237,249,164,186,116,254, 43,239,169,118,141, 21, 15, 27,
-124,183,122,165,208,209,209, 17,121,121,121, 40, 40, 40,128, 74,165,130, 94,175, 7,199,113, 40, 45, 45,197,161, 35, 71,185, 39,
- 92,211, 20,163,172,190,166, 54, 77,104, 51, 20,245,202,174,120, 71, 52,241, 39,147, 38, 77,178,179,183,183, 7,207,243, 40, 41,
- 41, 65,122,122, 58,146,147,147,113,241,226, 69,109,190,202, 4,173, 75,207,204,242,137, 70,171,188,158, 47,171, 80,253, 47,106,
- 62, 43, 75, 0,224,229,233,153,157,150,150,230,198,113, 28,188,189,189, 89, 85,113,241, 50, 41,112,210, 14,200, 1, 64, 10,129,
-207, 86,127,247,221,155,131, 7, 15, 70,235,214,173, 51,114,243,242, 26, 84, 85,150,192, 48,194, 16,192, 65,231,227, 19,127,227,
-198, 13,143,244,244,116,140, 31, 63,190, 48,237,241,227,138,105, 26,212, 64,164,127, 96,224,178, 93,187,118,185, 52,108,216, 16,
- 77,155, 54,205,149,151, 79,211, 80,117,249,172,254,222,124,248, 71,131,105, 67,195, 91,191,243,206, 59, 96, 89, 22, 23, 47, 94,
-196,245,235,215,145,150,150,134, 43, 87,174,168,236,109,108, 70,213,116,111, 66,157,104,215, 55, 88, 27,176,109,219, 86, 70, 34,
-145, 96,227,198,141,184,115,231, 14, 0, 32, 34, 34, 2, 19, 39, 78, 4,203,178, 24, 59,118, 28,249, 35, 81, 81, 49,209,104, 85,
-101,201,199,199, 39,156,231,249, 21, 12,195, 72, 8, 33,173,179,179,179,229,222,222,222,217,217,217,217,190,117,233,115, 69,203,
- 39,213,164,154,255, 28,205, 87,141, 90,215, 34,252,114, 45, 28,254,188, 28,199,219,217,191,255,186, 68,212,187, 79,223,208,121,
-159,206, 21, 68, 68, 68,192,215,215, 23, 17, 17, 17,184,115,231,142,172,113,227,198,181,173,119, 86,214,107,200,164,228, 94,189,
-122, 57,190,251,238,187, 14, 93,186,116, 17,123,121, 61, 93, 87, 55, 62, 62, 30,199,142, 29, 51,239,216,177,163, 52, 75, 26,169,
-186,114,236,215, 50,107,214, 59, 59, 86, 82,162, 3,240, 69, 51,147,233,151,207,231,205, 91, 16,214,180,233,164, 15, 63,252, 80,
- 96,107,163, 20, 47,153,247,150, 28, 0,190,252, 97,183,195,224, 17,175, 99,117, 16,208,101, 76,213,235,188, 85, 78,103,102, 78,
-126,218,152,137, 35,130,222,125,107, 12, 55,112,224, 64, 27, 91, 91, 91,248,250,250,194,201,201, 9, 41, 41, 41,136,141,141, 37,
-167, 78,157, 42,187, 29,159, 34,222,180,251,100,154,212,214,205,154,117, 3, 53,189, 6, 79, 72,153, 48, 97,130,211,208,161, 67,
-237,194,194,194,196, 98,177, 24,114,185, 28, 69, 69, 69,200,200,200, 48,159, 63,127,190, 44, 75,210,190,228,202,241, 77, 26, 43,
-215, 34,212,119, 30,189,232,209,165, 83, 11,103,196,199,198,142,227,129,230,102,179,217,155,227, 56, 70, 32, 16,228,240, 60, 31,
-107,214,104,126, 51, 70, 44, 92, 69,215, 34,180, 14,142,227, 36, 28,199, 65,165, 82,225,212,169, 83,162,199,143, 31,127,118,247,
-238,221,207,178,179,179, 97,177, 88, 48,124,248,112, 68, 68, 68,224,220,185,115, 40,200,203, 59, 92,147, 86, 34,160,150,101,102,
- 78,124,251,237,183,143,109,221,186, 85,112,247,238, 93,151,141, 27, 55,254, 90,149,113, 25, 55,110, 28,159,151,158, 62,209, 88,
-195, 28, 88,181,220,155,133,199,119,125,127,119,200,176, 17, 77, 22,206,255, 76,220,161, 67, 7,184,184,184, 32, 50, 50, 18,102,
-179,217,209,138,123, 83,211,185,207,168, 39,205,155, 55,183, 89,181,106,149,199,155,111,190,137,233,211,167, 3, 0,244,122, 61,
- 78,158, 60,137, 25, 51,102,228,166,139,218,106,111,159,219, 85, 99,249,124, 22,153,234, 9, 0,222,222,222, 23, 0,116, 6,240,
-132,118,104,167, 80, 40,255,104,131, 5,252,107,189,179, 75,215,227, 80,121, 57,142,167,184, 38,176, 46,195, 31, 79,157,189,188,
-169, 20, 90, 39, 49, 99,180,143,185,115,135, 73, 78, 78,174,241,100,229,235,157, 25,101,190,101,202,236,194, 54,223,173, 94,253,
-193,134, 13, 27,122,148, 79,197, 32,151,203, 99,245, 90,237, 25, 59,181,122,141,177,161,239,153,186,174,157,119,175,184, 56, 15,
-192,180, 80,142,251,238,141, 73, 83,190, 22,216,250,136, 63, 93,178,193, 32, 20, 8, 76,143,178, 11,176, 58, 8,176,177, 98,192,
-163,206, 4,196, 22,185,177, 9,232,154,184,124,209,162, 89,171,191,253,182,141,210,214,182,139,133,101,131,121,158, 7,225,184,
- 36,189, 94,127, 1,102,243,141, 76,175,201,223, 74,109,221,136,181,235, 6, 26,229, 13, 52,238,218, 11,109,246,237,217,243,254,
-177, 99,199,254, 45,239,158, 60,255,221, 19,251, 6,167,173,201,123,229,125, 12,192, 85,228,231, 95,173,246,109, 3,116, 45, 66,
-171,111, 10,158,159,236,228,228,180,165, 71,143, 30,242,168,168, 40,244,239,223, 31, 29, 58,116, 0,207,243, 32,132, 64,163,209,
- 96,247,238,221,248,250,235,175,147, 26, 0, 95,212,166,103, 4,206,200,142, 30,237,219,188,121,243,141, 53, 25,151,103,230,170,
-214, 62,135, 53,223,155,178, 36,214, 97, 80,234,232,119,151, 6,153, 74,115, 28,157,149,172, 71,124, 92,172,192,218,123, 19, 14,
- 33, 26,238,206,238,182,195,135, 14,125, 87, 40, 18, 69, 62, 27,209, 72,238, 39, 36,220, 46, 95,236, 25, 17, 19, 79,213,165, 44,
- 17,242,116,238, 57,218,161,157, 66,161,252,227, 13,150, 72, 36,202, 47,143,242,136, 68,162,252, 39, 7,166,188, 94,147,136,175,
-167,103,143,103,111,199,168,109, 45,194,242,207,119,213,106,205,179, 25,218,171,156, 68, 84,252,220,254,117,201,212,131,252,252,
- 68, 0, 3,128, 52, 32,241,105,119, 22,113,155, 47, 63,169,156,167,106, 47,200,159,206, 43, 41, 78,205,203,187,132,167,205, 57,
- 85,118,198, 21,251, 73,138,107, 75,231,243,121,191,156,145, 81,250, 44,223, 85,231,221,163,246,188,139,234,120,125, 68,127,225,
-122,254,211,200, 42, 44, 60, 0,192,214,231,200, 17,247,227, 71,142,188, 54,107,230,204,225,158, 94, 94,129, 46, 46, 46, 78,118,
-118,118,130,107,215,174, 37,179, 6,195,119, 45,128, 77,215, 1,157, 53,154, 70,224, 76, 72,122,122,216,200,161, 67,223,101, 68,
-162, 78,149,141, 11, 97,217, 43, 1,192,143, 70, 43,102,111,175,243,189, 41,171,251,189,153,249, 52, 29, 75,192,178, 75,112,239,
-222, 95,190, 55,121,158,255,210,219,219, 91, 67, 59,180, 83, 40,148,127, 20,127,231, 58, 60, 0,162,168, 38,213,124, 85, 52,159,
-122, 20,216,211,235, 73, 53,169, 38,213,164,154, 47, 95,243, 31,189, 22, 33,133,242, 15,127, 25,225, 0,148,210, 43, 65,161, 80,
- 40,148,218, 96, 0, 68, 85, 83,153, 88, 61, 58,128, 97,152,168, 23,168,172, 78, 83, 77,170, 73, 53,169, 38,213,164,154, 84,243,
-159,165, 89,155,246, 43, 51, 58,145, 54, 17, 82, 77,170, 73, 53,169, 38,213,164,154, 84,147, 54, 17,190,220, 77, 0, 10,133, 66,
-161, 96,209, 34, 70, 0, 48, 12,176, 72, 0,236, 21, 2, 35,133, 79,127,127,113, 70,142,100,170,156,132,246,253,247, 25, 59,122,
-197, 41,148, 87, 27,218, 7,235, 63,136,167,167,167,159,187,187,251,207,132, 16, 38, 63, 63,127,114, 78, 78, 78, 58,189, 42,255,
-125, 56, 59, 59,247, 96, 89, 22,106,181,250,204,171,152,191,176, 32,102, 40, 17,160,241,191,194,218, 72, 79, 72, 34, 91,170,218,
-183, 73, 48, 51, 30,204,191,230,210, 98,120,220,143,127, 68,126,183,246, 92, 12,195, 8,134,244,117, 93, 1, 0, 7,142, 21,204,
-254, 59,230,197,242,242,242,106,228,236,236,124, 66, 40, 20,138, 56,142,155, 22, 27, 27,123,164,122, 3, 52, 82, 8, 0,174,138,
-253,115, 29,235,185,204,249,124, 22, 35, 54, 25,191, 81, 25, 13, 6,181, 64, 36, 74,145, 74,148,151, 89,129,205,177,204,188,190,
- 9, 85, 29,191,103,207,158,106, 87,215, 14, 15,102,250,134, 54,105, 50,176,101, 83,197,147, 21,107,218,172,238, 18,224, 34, 78,
-206,136,177, 93,187, 37,253,103, 87, 39,239,129, 31,188, 37, 58, 34, 35,220,184,229,191,146, 50,122,151, 89,207, 87, 12, 83,207,
- 12, 52, 21,203,100,190, 28,203,186, 51, 0, 17,138, 68,121, 22,163, 49, 67, 2,220,155, 67,136,234, 85,215,148,200,100, 62, 28,
-203,186, 3,192,127, 99, 58, 41,181, 24,172,192,192,192, 91, 2,129,192,167,124,141,191,202,139,213,150,127,126,254, 39,199,113,
-153, 15, 30, 60,104,101,237,201, 27, 54,108,104,111, 48, 24, 94, 99, 24,230,117, 0, 32,132,108,151,203,229,187,147,147,147, 95,
-168, 35,113,195,134, 13,237, 9, 33,179, 21, 10, 69,119,131,193, 16, 6, 0,114,185, 60, 94,175,215,159,101, 24,102,197,139,232,
- 50, 12, 35,242,244,244, 28,105, 99, 99,211,141,101,217,110,132, 16, 70, 36, 18,157,211,233,116,103,115,114,114,246, 16, 66,216,
-186,106,122,121,121, 41,156,157,157,151, 4, 5, 5,141,121,247,221,119,139,234,213,171, 23,178,104,209,162,155,225,225,225, 59,
-138,139,139,231,101,103,103,235,255, 27, 10, 7,195, 48,129, 30, 30, 30,219,197, 98,177, 48, 35, 35,163, 27, 0,248,250,250,158,
- 51,153, 76, 92,126,126,254,235,132,144,199,117,209,115,117,117,181, 17,139,197,237,108,108,108, 90,217,216,216,116,230, 56,174,
-241,179,245, 19,239,107,181,218,139, 22,139,229,150,197, 98,185, 86, 80, 80,160,253,111,185, 65, 24,134,177,115,115,115,219,202,
- 48, 12, 24,134, 9, 38,132,104, 94,181,135, 0, 17,160,113, 66,252,131,144, 10, 19, 21, 22, 90,195, 5,129, 95, 21,251, 90,109,
-176,250,245,112,236, 51,112, 96,115, 1, 0,152,205, 55,251, 0, 56,250,178,205, 85,191,126,253,174,126,247,221,119, 78, 6,131,
- 1, 31,125,244,209,246,224,224,224, 31,147,146,146,230,214,116,156,157,157,221,140, 47, 22,255,160,124,246, 44,115,227,121,222,
- 45, 39, 39, 35, 56,241, 65,108,159,196,196,184,165,102,237,239,215,204, 68, 56, 69,165, 27,244,192,154,116, 52, 9,100, 6, 12,
- 30, 57,180,255, 23, 95, 44,196,152, 81, 99,234,199,199, 27, 20,222,246, 79,164,165,102,155, 32, 23, 23,159, 65,159,124,186,156,
-185, 22,125,126,208,158,221, 27,206,126, 50,137,233, 78, 77,150, 85,247, 34,243,165, 72,212,206, 41, 52,180,243,168, 3, 7, 96,
-235,235, 43, 18,201,100, 2, 0, 96,141, 70,223,178,140, 12,207, 93,131, 6,181, 93,196, 48,231, 23, 16,114,157,106,254,255,107,
- 82,172, 52, 88, 2,129,192,231,206,157, 59,110, 54, 54, 54,120,102,126,192,113, 28, 56,142,171, 88, 84,152, 16, 82,241,147,101,
- 89,116,237,218,213,170, 55, 88, 79, 79,207,238, 0,222, 8, 15, 15, 31, 62,123,246,108, 73,199,142, 29,193,113, 28,206,158, 61,
- 27,185,122,245,234,239,189,188,188,246, 3,216,148,147,147,115,198,218, 55, 92, 79, 79,207,222, 54, 54, 54,219, 62,251,236, 51,
-251,200,200, 72,145,167,167, 39, 0, 32, 63, 63,191,221,229,203,151, 91, 45, 92,184,112,154,167,167,231,216,156,156,156, 19,214,
- 94, 28, 31, 31,159,240,224,224,224,189,125,251,246,245,105,213,170,149,188, 81,163, 70, 32,132, 32, 38, 38,230,205,196,196,196,
-209, 71,143, 30, 93,224,227,227, 51,194,218,245,212, 24,134, 97, 2, 3, 3, 39,120,120,120, 44,153, 57,115,102,189, 33, 67,134,
- 72,227,226,226, 74, 2, 2, 2,152,253,251,247,187, 30, 62,124,120,218, 79, 63,253, 52, 50, 40, 40,104,222,227,199,143, 55,147,
-170,214, 49,122,142,224,224,224, 91, 2,129,192,199, 26, 3,204, 48, 12, 88,150,181,202, 4, 51, 12,211,162, 65,131, 6,187, 47,
- 93,186,212, 32, 53, 53,149, 27, 50,100,200, 22, 0, 56,123,246,108, 83,139,197,194,244,234,213,235, 24,195, 48,175, 17, 66, 98,
-172,201,187,183,183,119, 51, 87, 87,215,131, 67,134, 12,169,231,231,231,167,244,241,241, 97,228,114, 57,132, 66, 33,202,202,202,
-188, 18, 19, 19,163, 98, 98, 98,244, 87,174, 92, 41,246,246,246, 30,148,149,149,117,175, 14, 15,222, 14,110,110,110,227,196, 98,
-113, 56,203,178,222, 0, 32, 18,137,178, 44, 22, 75, 92,126,126,254, 86, 66,200,213, 23,189, 65,220,221,221,191, 95,178,100,137,
- 75,126,126, 62, 89,182,108,217,247, 0, 38,188,170, 15,131,237, 59,246,224,214,205,235, 0, 32, 97, 24,134,121,190,252, 49, 12,
-195, 52, 14,134,228,195, 15,103,162, 85,235,182,120,125,204,200, 90, 53,135,244,119,249, 66, 42, 20, 57,235, 76,198,235,133,106,
-193, 65, 63, 55,233,208,177, 35, 91, 61, 1,128,227,199, 98,135,182,109, 91,239,178,139, 3, 63, 88, 41,149,181, 53,113,108,209,
-129, 63, 10,231,215,197, 76,121,120,120,156,176,179,179, 83,150,148,148,228, 22, 21, 21,173,237,215,175,223,151,171, 86,173,114,
-122,242,228, 9, 50, 50, 50,240,198, 27,111,216,102,101,101,189,235,231,231, 23,157,158,158, 94,109, 36, 75,163,209,172, 89,178,
-120,230,124, 59,123, 39,161, 82, 97, 3, 91, 59,123, 52,104, 16,140,214,109, 34, 17,213,115, 16,158, 60, 73,108,183,123,231,134,
- 59,194,156,189, 95,113,210,136, 47, 85,170, 6,213, 62,151,194, 66,152, 46,229,230,106,254,252,133,120,248,224,129, 38, 53, 69,
-240,222, 31, 7, 68,202,190, 61, 66,101, 38,115, 89,234,181,232,243, 13,218,181,239, 10, 0,173,246,236,222,112,118,209, 88,166,
-199,130,109,175,158,121,127,153,230,234, 11,177,120, 66,239, 85,171,220, 34,166, 77,147,148,165,164,152,159,172, 91,167,203,187,
-120,145, 19,201,100,196,183, 79, 31,198,181, 91, 55,249,180,251,247, 37, 87,150, 45,235,188, 84, 42, 13,248,212,100,218, 70, 53,
-255,255, 52, 41,117, 51, 88,176,177,177,193,174, 93,187, 32, 22,139, 33, 18,137, 32, 22,139,171,253,236,231,231,103,141, 9, 26,
- 22, 22, 22,246,195,204,153, 51,221, 7, 14, 28, 8, 39,167, 63,175,178, 49, 96,192, 0,244,235,215, 79,146,156,156, 60,122,207,
-158, 61,163,183,108,217,146,235,233,233,249, 94,206,179, 5,155,107,168,188,187, 5, 4, 4,236,223,177, 99,135, 66,175,215,227,
-252,249,243, 40, 41, 41,129, 84, 42,133,143,143, 15, 58,117,234, 36, 58,127,254,124,189,209,163, 71,239,247,246,246, 30,144,149,
-149,117,174,182,180,122,120,120,180,114,117,117,189,240,203, 47,191,200, 67, 67, 67,153, 71,143, 30,161,121,243,230, 0,128,162,
-162, 34, 12, 24, 48, 64, 62,116,232,208,192,119,222,121,231,154,135,135, 71,151,220,220,220, 91,181,228,189,101,243,230,205, 55,
-247,233,211,199,107,206,156, 57,246,182,182,182, 72, 77, 77,205,241,240,240, 8, 46, 55, 63,131, 7, 15,150,246,236,217,211,115,
-237,218,181,107,142, 30, 61,250,145,167,167,231,132,156,156,156,219, 53,233, 10, 4, 2,159,219,183,111,187, 41,149, 74,228,229,
-229, 97,251,246,237,120,247,221,119, 33, 20, 10,145,159,159,143,221,187,119,227,189,247,222,131, 80, 40,132, 90,173,182,202, 4,
-219,216,216, 68, 53,111,222,252,215,179,103,207,250, 56, 58, 58,194,203,203, 75,240,249,231,159,135, 7, 4, 4, 40,234,215,175,
- 47,204,201,201,193,254,253,251, 3,198,141, 27,119, 80, 46,151,191,105, 48, 24,106,109, 58,115,118,118,254,109,243,230,205,126,
-119,239,222,197,186,117,235, 80, 92, 92, 12,169, 84, 10, 71, 71, 71,120,120,120, 32, 56, 56,152,153, 54,109,154,178,123,247,238,
-202,133, 11, 23,254, 6,160,133, 21, 15,221,230,110,110,110, 63,143, 30, 61, 58, 96,209,162, 69,142, 30, 30, 30, 40,127, 33, 80,
-171,213, 62,169,169,169,237,230,207,159, 63,194,221,221, 61, 57, 63, 63,127, 10, 33,228,110, 29, 31,234, 45,122,244,232, 49, 96,
-200,144, 33,194,156,156, 28,108,221,186,117, 0,195, 48, 45,172, 53,149,255,107,220,186,121, 29,147,223,249,160,204,203,215, 87,
-114,248,208,206,193,101,101,191, 92,182, 21, 56,138, 0,160,140, 87,177, 29,219,217,118, 26, 56,104,180,164, 95,255, 33,101,191,
-252,180,198,214, 26,131, 37, 21,138,156,119,109,155,154,113,241, 74, 82,227, 19,167, 83,163,134, 12,138, 18,136, 36, 33,129, 0,
- 48,107,230,219,210, 3,135, 78,255,216, 59,170,126, 78,231,142,193, 25,163,198,174,243,173,139,185, 10, 8, 8, 56,127,226,196,
- 9,119,169, 84,138,146,146, 18,231,141, 27, 55,174,108,219,182,173,224,241,227,199,120,240,224, 1, 82, 82, 82,160, 86,171,209,
-166, 77, 27,219,132,132,132,181, 0,170, 53, 88, 5,250, 97, 75, 2,220, 10,191,243,118,118,106, 96, 48,171,221, 56,182,168,201,
-217,211,119,155,237,219,163,139,112,243,240, 9, 30, 61,122, 50, 62,153,187, 92,252,251,190,205,243, 47, 92, 60, 9,160, 65,245,
- 51,248, 19,116,248,116,222, 92,148,106,140, 24, 59,230,109,140, 27,243,182, 51,129,201,147,112, 6, 27,147,190,196,209, 65, 18,
-127,100,243,206, 61, 67, 1,248, 84, 50, 89,103,168,201,170,158, 47, 68,162,182, 3,126,248,193, 53,252,173,183,100,119, 23, 45,
-210, 22, 94,188,168, 15,234,215,175, 36, 98,234, 84, 35, 0,104, 82, 82, 36, 15, 23, 44, 80,186,118,238,172,104, 63,123,182, 19,
-103, 50,121, 44,102,152, 54,159, 19,114,163,174,154, 13,198,140,225, 86,236,223,223,250,218,178,101, 93,177,120,177,176, 91, 68,
- 68,204,188,159,126,202,250, 43,154, 47, 51,157,217, 23, 46, 24,181,141, 27,163,233,240,225, 69,222,206,206,198,151,153,247,191,
-146, 78, 74, 21,117, 72,117, 65,146,144,144,144,188,196,196, 68,183,253,251,247,215,106,174,196, 98, 49, 60, 61, 61, 17, 25, 25,
-153, 31, 27, 27,235, 94,195, 67, 49, 35, 35, 35,195,135,101, 89, 72,165,210, 26, 19,166,209,104, 16, 27, 27,139, 81,163, 70,101,
-102,103,103, 87,251,224,173, 87,175,158,157,147,147,211,147,115,231,206,185,196,199,199,227,214,173, 91, 8, 8, 8,128,147,147,
- 19,196, 98, 49, 44, 22, 11, 74, 75, 75, 17, 18, 18, 2,133, 66,129,126,253,250, 21, 22, 23, 23, 7, 20, 23, 23, 87,251, 32,171,
- 95,191,190, 76, 44, 22, 39,237,219,183,207, 55, 60, 60, 28, 55,110,220,128,175,175, 47, 60, 60, 60, 0, 0, 41, 41, 41,184,124,
-249, 50,250,245,235,135,184,184, 56, 76,157, 58, 53,195, 98,177, 4,167,166,166, 26,171,109, 50,104,210, 36,103,207,158, 61,153,
-161,161,161, 6,173, 86, 43,200,203,203, 19, 95,188,120,145,213,104, 52,182,106,181, 90,172, 82,169,196,165,165,165, 34,173, 86,
- 43, 22, 8, 4, 18,163,209, 40,190,118,237,154,176,168,168,200,190,166,235, 20, 26, 26,154,247,224,193, 3,183, 67,135, 14,161,
-105,211,166,216,191,127, 63,102,205,154,133, 43, 87,174,192,215,215, 23,123,246,236,193,236,217,179,145,152,152, 8, 23, 23, 23,
-116,239,222,189,198,239, 8, 0,130,130,130, 30,197,198,198, 6, 74, 36, 18, 60,121,242, 4,153,153,153,229,235,217,161,160,160,
- 0,143, 31, 63, 70, 86, 86, 22,130,130,130, 48,102,204,152,199,153,153,153, 65,181, 21,180,150, 45, 91, 22,156, 57,115,198,165,
- 89,179,102,200,203,203,131,163,163, 35, 28, 28, 28,224,232,232, 88,241, 57, 32, 32, 0, 51,103,206, 68,179,102,205,242, 83, 83,
- 83,221,107, 51, 63, 77,155, 54, 61,113,230,204, 25, 23,123,123,123,228,230,230,162,180,180, 20, 34,145, 8, 74,165, 18, 46, 46,
- 46,144,203,229, 0,128,164,164, 36,244,239,223,191,240,201,147, 39,189,173, 53, 71, 12,195, 8,220,221,221, 31,220,187,119, 47,
-152, 16,130,244,244,116, 36, 38, 38,226,157,119,222, 73, 50, 24, 12,161,175,210,154,122,149,250, 85, 73, 38, 76,156, 44, 25, 50,
-104,176, 46,230,214,113, 94,129, 11,104,211, 66,161, 2,128, 27, 49,122, 71, 61,186,160, 69,171, 62,130, 3,135, 14, 42, 55,111,
-250, 69, 12, 30,238, 96,144,152,240,144, 44,174, 78,123, 64,111,199,241,179, 63,232,211,184,115,199,206,162,210, 82,226,241,235,
-150,245,109,210,146,159,184, 3,128,127,195,128,188, 73,227,223,190, 97,111,207,228, 94,188,114,145, 93,177,230,248,253, 35, 39,
- 84, 91,172,136, 44, 7,248,249,249, 69,255,246,219,111, 46,174,174,174,112,112,112,128, 86,171,133,217,108, 70, 66, 66,130, 97,
-215,174, 93, 22,123,123,123,187,220,220, 92,168, 84, 42,136, 68, 34, 68, 71, 71,167,231,230,230,250, 63,175, 85,222, 7, 11, 0,
-222,233,219, 88,220,164,123,176,147, 68,198, 42, 20,226,135,158, 96, 56, 25, 67,108,221,207,158,141,110,118,238,194,165,215,251,
- 13, 24,229,218,190,125, 55, 44, 95,250,137, 37, 61, 55, 47, 66,165, 27,244,160,170, 62, 88,141,131,153,238, 67,134, 15, 29,249,
-197, 23, 11,177,112,254, 34, 28, 57,116, 64,109,107, 35, 48,218, 59,138, 29, 58,183,235,104,152,249,238,224, 12, 93, 89,166,239,
-202, 31,215,143,233,217,123,164, 79,187,246, 93,113, 45,250, 60,246,236,222,112, 75,194, 89,104,115,225,115, 44, 98, 24, 39,199,
-128,128, 41,239, 39, 37, 73,238, 46, 92, 88,198,102,103,151,180,154, 49,163,176,170,125, 51, 79,157,178,145,122,121,217, 59, 13,
- 26, 84,111,141,191, 63,177,228,231,255, 92, 85, 31,162,170, 52,111,120,122, 58,254,126,238, 92, 15, 94, 36,234,242,238,244,233,
-138,168,168, 40,148,150,150,226,200,145, 35,216,177,125,187,209,195,221, 61,214,241,230,205, 59, 1, 57, 57,159, 89,171,217,106,
-198,140, 66,142,227,152,169, 75,151,246,124,152,145,209, 61,191,168,168, 62, 0,184, 57, 56,100,132,251,248,220, 90,181,109, 91,
-226,247, 13, 26,240,214,166,115,215,149, 43,238,199, 10, 10,222,114,116,116, 84, 20, 20, 22,138,100, 82,105, 81, 68, 80,208,158,
-175,166, 79, 63,111,186,115, 71, 34,247,241,177,119, 24, 48,160,206,121,111, 53, 99, 70,161, 90,167, 19,205,251,238,187,142,217,
- 69, 69,245,181, 38, 83,144,186,172,204,131, 53,155, 5,118, 10, 69,145,127, 80, 80,190,230,204,153, 28,255,178,178, 15, 86,107,
-181,249,180, 84,254,197, 8, 22,195, 48, 32,132, 88, 21,189, 18,139,197,127,234,163, 85, 3, 18,161, 80,136, 27, 55,110, 32, 63,
- 63, 31, 77,155, 54, 69,131, 6, 13,254,180,195,147, 39, 79,112,244,232, 81,168, 84, 42,180,108,217, 18, 0, 36, 53, 9,218,217,
-217,125, 56,119,238, 92, 71,163,209,136, 91,183,110,161, 85,171, 86,144,201,100,144, 72, 36,127, 50,127,249,249,249, 8, 11, 11,
-195,212,169, 83, 29,190,255,254,251, 15, 81,195, 26,114,132,144,233,163, 71,143,118, 11, 15, 15, 7, 0,100,100,100,148,167, 5,
- 0,224,234,234,138,152,152, 24,180,106,213, 10,238,238,238,232,219,183,175,219,193,131, 7,167, 3, 88, 81,109,198, 37, 18, 65,
-104,104,104,235,103, 17, 34, 8, 4,130,135,246,246,246,174,238,238,238, 54,246,246,246,255,150,199,141, 27, 55,170,164, 82,169,
-197,154,139,154,155,155,139,240,240,112,168,213,106, 0,128, 86,171, 69, 80, 80, 16, 74, 75,159,118, 57, 51, 26,141,240,242,242,
-130, 94, 95,115,215,174,230,205,155, 47, 12, 13, 13,237,213,181,107, 87,153, 88, 44,198,221,187,119, 17, 17, 17,129, 93,187,118,
-193,207,207, 15, 74,165, 18, 73, 73, 73,104,218,180, 41, 46, 92,184, 0, 87, 87, 87,132,133,133,201, 90,182,108,121,169,184,184,
-248, 92,106,106,234,194, 26, 34,109, 2, 91, 91, 91, 92,184,112, 1,191,253,246, 27, 82, 82, 82,144,157,157, 13, 59, 59, 59,180,
-104,209, 2, 77,154, 52, 65,135, 14, 29,144,148,148, 4,166,150,194,196, 48,140, 71,112,112,240,145, 27, 55,110,184, 16, 66,176,
-117,235, 86,148,149,149,193,100, 50, 65, 32, 16, 64, 46,151,195,201,201, 9,221,187,119,135,171,171, 43,130,131,131,177,123,247,
-110,151,190,125,251, 30,125, 22,129,202,173,237,154, 58, 57, 57,125,176, 96,193, 2, 95, 55, 55, 55,164,166,166, 66,173, 86,195,
-221,221, 29, 93,187,118,245, 62,125,250,244, 7, 0, 86,189, 42, 15,129,242, 14,237, 12,195, 48,135, 15,237, 28,236,231, 41,109,
-220, 38, 66,227, 31,123, 91, 20,120,244,244,163,102, 79,175,135,255,189, 54, 45, 53,143,111,220, 58,158,118,248,208,206,235,247,
- 31,226,160, 53, 77,216,133,106,193,193, 19,167, 83,163,154,133, 69, 10,191,251,113,193,224,201,147,122,203,234, 57, 69, 50,165,
-249,187,113,229,122,172,255,231, 11,231,184, 45, 94,184,236,240,137,211,169, 92,161, 90,176,196,154,244, 6, 6,212,251,126,223,
-122,145,139,198,244, 35, 98,174, 59, 0,226,246,104, 24,208, 8,165,165,165,144,203,229,242, 49, 99,198,112,115,231,206,213,217,
-219,219, 43, 69, 34, 17, 98, 98, 98,242, 5, 2, 65,239,218,116, 13,110, 78,132, 51, 91, 88, 34, 21,242,132,177,211, 51, 92,177,
- 52, 46, 33, 25, 93,186,244,205,107,221, 42, 98,233,178,111, 86,125, 26, 16, 16,226, 58,102,236, 20,241,138, 21,159,173, 3, 16,
- 89,149,206,253, 36,114,182, 73, 32,163, 0,208,255,139,197, 11,241,228, 73,146,211,228, 55, 84,139, 68, 50,133, 87,168,127, 71,
-187,117,191,157,235, 19, 20,212,160,254,228,137,111,254,241,203,198,223,250, 87,142,100,237,220,241,203, 65,134, 97,122, 88,115,
-109,255, 65, 52, 27,119,228, 8,202,210,211, 45,197,151, 46, 25,122,252,240, 67, 97,203,241,227, 87, 89, 88,214,165,188,174, 42,
-255,201, 48, 12,192,243,140,104,197, 10, 1,241,242,130,197,209,241,141, 57, 64,163,218, 52,151, 89, 44,195,134,180,104,209,255,
-215,109,219,224,239,239, 95,161,233,224,224,128,233,211,167, 99,218,180,105,178,123,247,238,181, 57,122,244,104,155, 45, 63,254,
-232, 62, 7, 24,102, 77, 58, 47,222,189,235,244,241,154, 53,243, 26,135,135,251,173,254,225, 7, 89,121,125,151,154,154, 26,252,
-195,247,223,251,119,143,138,202,251,228,227,143, 55,221,153, 53, 43, 12, 79,151,100,171, 86, 51,247,226, 69,211,177,226,226,183,
-246,236,221,235, 24, 18,242,180, 27,228,227,199,143,221,126,253,245,215,183,187,191,251,238,216, 89,163, 71,127,214,253,209, 35,
-149,125, 65,129,108,192,247,223,139,118,142, 28, 89,171,102,121, 58, 1, 96,248,236,217, 31,182,237,216,177, 73,223, 49, 99,234,
-121,121,121, 49, 10,133, 2,102,179, 25,121,121,121, 78,137,137,137,129,167, 85,170,210,147, 49, 49, 91,241,108, 17,119,202, 95,
- 48, 88, 0,192,113,156, 85,230, 74, 36, 18,253,171,112, 91,115, 82,145, 8, 94, 94, 94, 40, 44, 44, 68, 92, 92, 28,252,253,253,
- 97,177, 88,112,226,196, 9,168,213,106,136,197, 98, 72, 36, 18,152,205,181,175, 13,107, 99, 99, 19,213,185,115,103,209,213,171,
- 87, 17, 16, 16, 0,133, 66, 81,145,174,242, 77, 34,145,192,211,211, 19,165,165,165,136,140,140, 20,111,220,184, 49,170, 38,131,
-101,107,107,219,111,240,224,193, 21, 33,182,178,178, 50, 8,133,194, 10,179, 82, 86, 86,134,226,226, 98,168, 84, 42, 24, 12, 6,
- 52,107,214, 76,122,246,236,217,126, 53, 25,172,202,232,116,186,178,252,252,124,199,200,200, 72,167, 77,155, 54, 37,182,111,223,
- 62,164,242,255,207,159, 63,111, 48, 24, 12, 98,169, 84, 90,235, 58,119, 12,195, 96,219,182,109, 21,215, 62, 43, 43, 11,235,214,
-173,171,248,127, 82, 82, 18,190,251,238,187,138,121, 57,106,250,142, 66, 67, 67,251,110,221,186,181,213,150, 45, 91, 74,132, 66,
- 33, 18, 19, 19,177,125,251,118, 16, 66,224,234,234, 10,157, 78,135,188,188, 60,156, 59,119, 14, 44,203,194,214,214, 22,222,222,
-222,242,233,211,167,119, 90,180,104,145, 24,192,194, 26,202, 18, 39, 20, 10,225,239,239,143,249,243,231,195, 96, 48, 64, 34,121,
-234, 43, 75, 75, 75,161, 82,169,112,231,206, 29,164,166,166,162,182,202, 69, 46,151,143,216,178,101,139,155, 84, 42,133, 94,175,
-135, 70,163, 65, 70, 70, 6,210,210,210, 12,249,249,249,172,157,157,157,192,223,223, 95, 32,147,201,100, 67,134, 12, 97,202,141,
-230,128, 1, 3,156,183,110,221, 58,170, 54,115,196, 48,140,107,227,198,141, 63,125,251,237,183,229,149, 76, 55,114,115,115, 49,
-108,216, 48,229,213,171, 87,231, 50, 12,179,157, 16, 82,240, 42, 61, 12, 8, 33,164,172,236,151,203, 23, 15,254,208, 56,246,182,
- 40,208,100, 42,105,223,179,223, 7, 34, 0,184,122, 97, 99,251,216,219,113, 80, 48,108,218,177,147, 43, 46,219,218, 78, 38,181,
- 69, 0,251,245,112,236,227,231, 38, 29, 58,100, 80,148,224,215, 45,235,219, 76,158,212, 91,230,214,112, 61, 3, 0, 78, 18, 31,
-116,224,102, 9, 12, 70,173,252,215, 45,235,219, 12, 25,212,239,122, 74,114,218,170,254, 81, 78,191, 31, 61,163, 58, 94, 83,132,
-208,211, 77,228,237,100, 87, 8, 39,187, 8,248, 7,216,225, 78,204, 61, 28,220,127, 9,193,161,157, 96, 52, 26,193,178,172,205,
-192,129, 3,117,123,246,236, 49, 20, 21, 21,105,204,102,115,151,236,236,236,135,181,229, 63, 51, 51,129, 15,241,104,103,150, 40,
-100,172, 70, 45,209,205,249,108,239,200,150,109,123,181,114,242,244, 22,187,218,240,135,187,117,137,220,190, 99,219,207, 51,102,
-125,180, 24, 45, 90,180,111,127,255,209,177, 38, 0, 98,171, 52,173,143,201,145,240, 96,134,125,242,232, 81,255,180,212,212,204,
- 70,238, 30,166,199, 42, 98,249, 96,206,250,158,145, 93, 70, 52, 11,108,220, 89, 26,159,112,129,153,249,238,219, 59, 86,254,184,
-126, 76,185,201,186,120,241, 68,151,133, 11, 83,165, 0,140,180,122,122,246,114, 42,147,249,216,250,251,139, 82, 54,109,210, 7,
- 12, 28, 88, 2, 0, 22,150,117,137,190,118,205, 65,169, 84,130, 16, 2,139,197,242,167, 62,194,229,253,130,163,186,118,117,183,
- 70, 51,227,167,159,154,189,251,238,187,200,205,205, 5,203,178, 16,139,197,207, 63,179,161,209,104, 48,124,248,112,108, 92,187,
-182,157, 53,154, 28,199, 49, 31,175, 89, 51,111,250, 7, 31, 4,142, 29, 59, 86, 80,249,217,235,232,232,136, 95,214,175,151,110,
-218,180,201,103,249,111,191,189,209, 83, 38,123, 82,155,166, 38, 44, 12,142,177,177,138,114,115, 5, 0,129,129,129, 88,182,108,
-153,108,244,232,209,210, 9, 19, 38,124, 27, 31, 18,178,102, 97, 90,218, 35,231, 70,141,236,165, 50,153,143,181,215, 19, 0,202,
- 76,166,240, 5, 95,124,225,116,253,250,117,100,103,103,151,207,117, 5,134, 97,208,180,105, 83,102,228,200,145, 14,237, 90,181,
-106, 67, 75,228, 75,138, 96,113, 28,247, 39,163, 82,155,193,170,115,251, 36,195,192,211,211, 19,102,179, 25, 27, 54,108,128, 68,
- 34,169,168,116, 1,192,100, 50,213,170, 97, 48, 24,154,122,120,120, 64,173, 86,163, 81,163, 70,127,138, 92, 73, 36, 18,136, 68,
- 34, 72, 36, 18,200,100, 50, 24,141, 70,120,123,123,195, 96, 48, 52,173,197, 0,181,176,183,183,175,168, 88,141, 70, 99,133,185,
- 82,169, 84, 80,169, 84, 48,153, 76, 40, 41, 41, 65, 89, 89, 25, 84, 42, 21, 52, 26, 77,132, 53,121,230,121, 30,113,113,113,143,
- 67, 66, 66, 90, 8,133, 66,216,218,218,218,104,181,218,138,190, 67,197,197,197,216,188,121,179,118,252,248,241, 46,215,175, 95,
-183,106, 33,225,247,222,123, 15, 50,153, 12, 58,157, 14,107,215,174,197,251,239,191, 15,137, 68, 2,141, 70,131,117,235,214, 97,
-230,204,153, 16,137, 68, 48,153, 76,216,181,107, 87,245,145,140,132,132,148,107,215,174, 69,180,108,217,210,233,247,223,127, 47,
-232,217,179,167,107,239,222,189,161, 80, 40,160,215,235, 97,177, 88,208,174, 93, 59,132,134,134, 34, 63, 63, 31,199,142, 29, 43,
- 12, 14, 14,118,185,126,253, 58,159,155,155,155, 86, 91,229, 93,217, 96,115, 28,135,188,188, 60,168, 84, 42, 20, 20, 20, 32, 59,
- 59, 27,153,153,153, 16,137, 68,168,237,229,221,217,217,121,120,120,120,184, 16, 0, 20, 10, 5, 90,180,104,129,121,243,230,177,
-122,189,254, 53, 0,199,158,237,214,119,253,250,245,191, 95,190,124, 89,228,229,229,133, 7, 15, 30,192,213,213, 85, 36,151,203,
-107, 53, 88, 30, 30, 30, 27, 15, 31, 62, 92,175,220, 84,151,151, 85,157,238,233,215, 49,108,216,176,122, 91,182,108,217, 8,160,
-223,171,246, 64,176, 21, 56,138,218,180, 80,168,142,158,126,212,172,103,191, 15, 68,158,129, 11, 0, 0, 29, 0,209,169,163,107,
-154,245,139, 10,218, 83,222, 47,171, 38,134,244,117, 93, 49,112, 96,115,193,216,145,173,158,136, 36, 33,129,219,182,172,113,175,
-231, 20,249,175,135,132,176, 30,108, 20, 64,104, 32, 39,136,222,249,196,125,230, 7, 33,166,237,155,222,122,178,109,207,173, 40,
-137,228,110,119, 0, 51,171,211,142, 79,180, 28, 82,107,235, 53,118,144,156,103, 32, 31,132,136, 22,193,112,117, 85, 97,237, 47,
- 91,224,237,215, 17, 70,163, 17,246,246,246, 74, 0,102,179,217,188,205, 26,115, 5, 0,103,206,168,248,176, 48,149, 73,168,225,
-217,119,223, 95, 49,180,103,223, 65, 77,186,119,143,226, 79,158, 58,105,238, 24, 97,206,233,222,189,125,222,185,243, 23,147,114,
-115,179,130, 67, 67,155,225, 97, 98, 76, 31,128,137, 3,170, 46,176,113, 73,228,120, 96, 32,115,110,215,174,201,188,158,191,163,
-248,114, 73,108,223,254,253, 39,132,119,142,236,204,159, 58,125,214, 36, 69,225,125,219, 78, 29,178, 38,140,126,237,247, 93,251,
-127,239,117,238,236,145, 32,117,105,222,145,111,126, 36,212, 92, 85,126, 57, 99, 89,119,145, 76, 38, 40, 56,119,142,109, 58,105,
- 82,197,181, 81, 42,149, 56,120,240, 32,164, 82,105,197, 38,145, 72, 42, 62,187,187,187,131, 33, 68, 80, 23,205,156,156, 28,228,
-230,230,194,193,193, 1,174,174,174,200,205,205,197,213,171, 87,241,240,225, 67,136,197, 98,244,233,211, 7,130,106,234,205,231,
- 53,167, 46, 93,218,179, 81,227,198,126,207,155, 43, 60, 45,152, 40, 46, 46, 70, 84, 84,148,224,204,153, 51, 30,209,143, 30, 13,
- 2,176,173, 70,205, 65,131,138, 10,206,156,169,242,220,225,225,225,204,193,131, 7,101, 99, 70,143,158,177,232,251,239,127, 92,
-242,195, 15, 25, 28,203,122,212, 37,239, 12,195, 8, 24,134,129,175,175, 47,138,139,139, 81, 86, 86, 86, 30,112,128,147,147, 19,
- 44, 22, 11,120,158, 23,211, 18,105, 61,130,218,204,128, 53,230, 74, 44, 22, 67, 32, 16,188,144,201,170, 28, 33,120, 30,107, 12,
- 86,121,229, 39,151,203,255,116,131,149,155,181,202,159,203,223,118,172, 64, 88, 90, 90,138,125,251,246, 85, 20, 52,147,201, 4,
-181, 90, 13,149, 74, 5,181, 90, 13,131,193,128,148,148, 20,236,220,185, 19,217,217,217, 16, 10,133, 86, 77,218,250,228,201,147,
- 91, 13, 26, 52,104, 81, 94,121,119,235,214,205,231,226,197,139,217,229,215,224,179,207, 62, 43,108,215,174,157, 75,229,202,189,
-214,196, 10,133,184,122,245, 42,244,122, 61, 8, 33,144, 72, 36, 72, 76, 76, 4,203,178,224,121, 30, 34,145, 8, 5, 5, 5,181,
- 70,176,226,226,226, 38,190,249,230,155,171, 39, 77,154,116,238,227,143, 63, 62,213,173, 91,183, 12,134, 97, 96, 54,155, 97,111,
-111, 15, 15, 15, 15, 36, 38, 38,194, 96, 48,224,195, 15, 63, 76,223,178,101,203,233,181,107,215,158,219,176, 97,195,234,204,204,
-204, 55,235,242,125,179, 44, 11,173, 86,139,146,146, 18, 20, 23, 23,163,180,180, 20, 6,131,225,133,202, 80,100,100, 36,142, 28,
- 57, 34,236,209,163,199,175,254,254,254,185,254,254,254,185, 61,122,244,248,245,208,161, 67, 66,111,111,111,164,166,166,226,214,
-173, 91, 40, 41, 41, 1, 33,164,198, 19,136,197,226,110,227,199,143,239,228,231,231,199,152,205,102, 24,141, 70, 24,141, 70,152,
-205,102,240, 60,143,212,212, 84, 52,110,220, 88,224,239,239,223,158, 97,152,110,244, 17, 98, 61,165,249,187, 65,116, 63,128, 24,
-119,130, 47,253, 17,218, 23,156,140,164,164,164,100,201, 59,115,212,249,156, 49, 6, 9,177,231,161,209,121,195,167,225, 68,188,
-253,102, 55,220,184,118, 18,197,197,197, 72, 72, 72, 64,151, 46, 93, 36, 12,195,212,169, 92,158, 58,117,141,123,109,220,251, 35,
-186,245, 26,212, 42, 42,170, 31,123,226,196,105,211,237,155, 39,110, 5, 5, 58,229, 19,190, 44,207,209, 81,121,231,209,163,251,
- 8,110,212, 4,102,139, 37, 18, 88, 88, 99,121,122,252,152,152,254,248,195,147,123,109, 82,220,184,222,125,222,104,222,163, 71,
-111,203,137, 83,135,185, 75,231,246,222,233,221, 59,240,194, 87,107,118,251, 22,155, 66,195,228,246, 30, 71,219,119, 82, 70, 78,
-125,221,111, 50, 45, 41,213, 68, 3,228,114, 30,207,158,139,229, 93, 88, 42,155,171,231, 55,107,234,164,202,154,149,235, 34,149,
- 74,133,164,164, 36,124,243,205, 55,136,137,137, 1,199, 61,237,106, 87, 91, 55,139,202,154,137,233,233,221,223,127,255,125, 89,
- 85,230,170,168,168, 8,133,133,133,200,202,202,194,128, 1, 3, 36,197, 78, 78, 45,107,211,244,118,115, 51, 42,229,242,188,135,
- 15, 31,254, 91,122, 75, 75, 75, 33,149, 74,241,253, 15, 63, 72, 78, 60,120,240,206,137,179,103, 93,234,114, 61, 43,215,165,110,
-110,110, 8, 12, 12, 68, 68, 68, 4,154, 54,109, 10,185, 92,142,248,248,120,252,252,243,207, 16, 50, 12, 75, 75,226, 75,138, 96,
-213,197, 96,213,197, 16, 88,139, 53, 77,132,114,185, 60, 54, 47, 47,175,163,183,183, 55, 88,150,173, 48, 83,207, 55, 17,150, 71,
- 59,238,223,191, 15,185, 92, 30, 91,147,166, 82,169,140, 21, 10,133,237,219,180,105,131,253,251,247,227,220,185,115, 72, 78, 78,
-134, 78,167,131,209,104,132, 94,175, 71,124,124, 60,120,158, 71,120,120, 56, 28, 28, 28,160, 84, 42, 99,107, 75,171, 86,171,205,
- 17,139,197, 33, 10,133,226, 95,205, 29,158,158, 40, 42, 42,226, 45, 22, 11, 54,111,222, 92,234,225,225, 97,163, 80, 40, 80, 62,
-255,152, 53,230, 50, 63, 63, 31, 62, 62, 62, 21,125,176, 52, 26, 13,220,220,220, 96, 54,155, 43, 34,112,118,118,118,181,154, 75,
- 66,136, 1,192,172, 74,218,173, 71,142, 28,185, 99,215,174, 93, 13, 79,159, 62,141,235,215,175,195,213,213, 21, 75,151, 46, 77,
- 78, 77, 77, 29, 67, 8,185,249,178,191,115,107, 12, 86, 81, 81,209,190,216,216,216,246,109,218,180,169, 40,116,221,186,117, 99,
-186,117,235,230, 82, 57,164, 95, 80, 80,128, 27, 55,110,224,244,233,211, 96, 24, 6, 73, 73, 73,156, 94,175,223, 81,195,185, 37,
-254,254,254,155,230,205,155,103,203,178,108, 69,217, 86, 40, 20,144,203,229,144, 72, 36, 16, 10,133, 72, 77, 77,197,224,193,131,
- 29,126,248,225,135,141, 12,195, 4, 18, 66,204,175,202, 3,161,140, 87,177, 55, 98,244,142, 78, 78,254,247,174, 94,216,216,190,
-195,179,103,196,213, 11, 27, 89, 39, 39,255,123, 55, 98,244,142,157,125, 85,172,109, 45, 58, 7,142, 21,204, 54,155,111,246, 57,
-126, 44,118,232,172,153,111, 75,253, 27, 6,228, 93,185, 30,235,223,129,155, 37,176, 81, 0, 90, 61, 80,172, 2, 30, 60, 22,242,
-254, 13, 3,242,110,222, 78,148,126,187,114, 67,128, 78,111,250,253,232, 25,213,241,154,180, 51, 51, 51, 13,222,222,222, 67,102,
- 45, 82, 94, 24, 61,198, 77, 42,145,251, 66, 83,114, 27,245,253,157,241,218,240, 16,252,248,203,109,216,219,215,123, 26,193, 96,
- 24, 27,107,243, 94, 88, 88,200,236,219,121,105,210,248, 55,222,110,215,187, 87,127,246,248,137, 63, 68,231, 78, 30,186,186,241,
-151, 79,127, 39, 66,173,146, 33, 26,133,175,159,207,189,148,228,135, 99, 58,119,238, 5,133, 84, 25, 4,132, 86, 89, 96, 43, 6,
- 14, 16,164, 11, 4,144,143,127, 99,114,135,222,189, 7,177, 39, 78, 28,192,137,163, 91,174, 45, 88, 80,255,104,114,214,118, 73,
-244,205, 76,249,144, 17,211, 74,142, 28,187,111, 26, 62,176,193, 67, 47,155, 22,122, 90, 45, 61,247, 2, 41, 18,229,177, 70,163,
-175, 79,239,222, 66, 93, 90,154,216,214,221,157, 5, 0,139,197,242,111,166,170,114, 4, 75, 32, 16, 0, 2, 1,111,141,166,181,
-105,209,233,116,224, 1,214, 26,205,130,226,226,250,207,247, 49,182, 88, 44, 40, 42, 42,170,216, 84, 42, 21,228,114, 57, 74,158,
- 77, 26, 90,155,102,231,102,205, 54,175,252,246,219,217,191,172, 95, 47,169,108,174,202, 55,129, 64,128,185,159,126, 42,153,255,
-213, 87,211,134,137, 68, 31,212,229,122,150,191,172, 11,133, 66,136, 68, 34,164,165,165, 33, 61, 61, 29,105,105,105, 72, 75, 75,
-131, 66,161, 0, 97, 24,158,150,200,151, 96,176,202,191, 60,107, 59,185, 91,107, 8,202,223, 4, 94,150,193,210,106,181,167, 47,
- 95,190,220,182, 87,175, 94,162,107,215,174,193,195,195,163,194, 96,149,255, 44,111,118, 82, 42,149, 56,118,236,152, 89,171,213,
-214,184,144,164, 94,175, 63,115,230,204,153, 86, 51,103,206, 20, 79,156, 56, 17, 9, 9, 9,152, 50,101, 10, 84, 42, 21, 74, 75,
- 75, 81, 84, 84, 4,157, 78,135,182,109,219, 66, 46,151,227,209,163, 71, 22,189, 94, 95,219, 84, 5, 36, 63, 63,191,204,213,213,
-213,243,249,127,140, 24, 49,194,253,167,159,126,210, 61,120,240,192,210,177, 99, 71,123,107,141, 70, 57, 59,119,238,172, 48, 79,
- 15, 31, 62,196, 79, 63,253, 84,209,231,234,246,237,219, 88,177, 98, 69,197,220,101,117,140, 42,222, 12, 11, 11, 99, 45, 22, 11,
-130,130,130,202,155, 87,177,122,245,106,246,239, 48, 87,214, 98, 48, 24,246, 78,152, 48,225,147, 59,119,238,120,138, 68,162,242,
-208, 53,120,158,135,217,108,198,163, 71,143, 16, 31, 31,143, 7, 15, 30,160,184,184,184,226, 5, 32, 38, 38,166,196, 98,177,236,
-174, 78,215,213,213,245,179,223,126,251,205, 67,169, 84,254,169, 60, 11, 4,130,138,135,142, 68, 34, 65, 65, 65, 1, 28, 29, 29,
-209,163, 71, 15,183, 51,103,206,124, 6, 96,254,171,240, 48, 96, 24,134,233,216,206,182,211,123,211,222, 64,155,150,154,199,177,
-183,227,112,234,232,154,102,192,211, 78,238, 77, 91,134, 63,190,113,199, 14,125,123,205,238,116,229,218,148, 26, 59,185, 63,235,
- 67,117,180,109,219,122,151, 15, 28, 58,253,227,156,153,111,223,248,124,225, 28, 55,131, 81, 43, 15, 13,228, 4,192, 83,115, 21,
-125,199,198,176,120,225,219, 55,150,173,220,204,167,231,155,103, 92,191, 94, 82,237,232,222,202,166,197,201, 22,114, 15,223, 25,
-217,245, 3,186, 55,136,189,189, 1, 46, 14, 37,176, 11,234,136,190,189,219,226,244,153, 88,164,101, 25,144,159,159, 15, 0, 53,
- 78,123,240,224,222,239,227, 8, 67,252, 24,194,164, 51, 2, 34, 31, 55,225,173,200,254,253, 7,145, 35, 71, 14,177, 7,126,223,
-118,121,247,214,239,246, 10, 36, 98,145,222,228, 96, 98, 24,131,154, 23,216, 37,104,181, 69, 79, 31,158, 18, 73,245,203,221, 60,
-155,144,181, 73, 88,168,199,184, 9, 83, 28,250,245, 29, 76,142, 30, 61,192,239,222,181,249,220,238, 13, 77,183,241,130, 82, 73,
- 78,134, 78,166, 46,181,168, 9, 35,117, 44, 43,229,117,121, 79, 2, 13, 94,253, 71,152,105,181,244, 92, 61, 96, 52,102,150,101,
-100,120,214,235,210, 69,246,104,225, 66,165,123,219,182,134,242, 46, 44, 53, 25, 44,161, 80, 8, 2,240,214,104, 90,155, 22,189,
- 94, 15,194, 48,150, 23,209,100, 89,246, 79,230,170,220, 96, 61,123,214, 91,149,206,111, 62,252,240, 90,235, 55,222, 40,142,142,
-142,118,111,223,190, 61,163,209,104,160,209,104,254,100,178, 92, 93, 93,153,134, 1, 1,202, 19, 57, 57, 1,243,173,188,158,214,
-228, 93, 32, 16, 84,123, 61, 41, 47, 96,176,202, 35, 88,214, 24, 44,161, 80,104,141, 41,176, 88, 44, 22,184,185,185,161,176,176,
-176,218, 10, 95, 32, 16, 64,161, 80, 64,171,213, 2, 64,141, 35,233, 52, 26,205,234,197,139, 23, 79,239,214,173,155, 75, 72, 72,
- 8, 10, 10, 10,224,238,238, 14,185, 92, 94,209, 55,172, 92, 47, 46, 46, 14,187,118,237, 42,213,104, 52,171,107,201,247,170,117,
-235,214,189,219,175, 95,191,122, 46, 46, 46,112,114,114,194,189,123,247,224,228,228,132,210,210, 82, 36, 38, 38,194,206,206, 14,
- 12,195,192, 96, 48,224,226,197,139, 26,158,231, 87,213,114, 99,146, 43, 87,174,152,149, 74,229,189,130,130, 2, 97,113,113,177,
-168,164,164, 68, 84, 90, 90, 42, 86,171,213,226,227,199,143,187, 56, 56, 56,232,206,158, 61, 91,224,231,231, 39, 76, 73, 73, 17,
-154, 76, 38,129, 21,149, 34, 62,248,224, 3, 72, 36, 18, 24,141, 70,172, 94,189, 26,179,103,207,174,232,115,245,245,215, 95, 99,
-222,188,121, 21, 33,245,195,135, 15,215,213,100,193,108, 54,195, 98,177,192, 98,177, 88,101,122,255, 10,214, 24,117, 66, 72, 46,
-195, 48, 3,218,180,105,115,114,207,158, 61,206,118,118,118, 72, 77, 77, 69, 94, 94, 30,242,242,242, 80, 80, 80,128,178,178, 50,
-176, 44, 11,111,111,111,228,229,229,225,192,129, 3,106,141, 70,211,187,166, 17,132, 66,161,112, 66,100,100,164,232,249, 52,148,
-191,213,149,155,118,153, 76,134,236,236,108,116,235,214, 77,122,254,252,249, 9,255,235, 6,171,220,184, 52, 14,134,100,224,160,
-209,146, 22,173,250,232,110,220, 58,158,166, 96,216,180,126, 81, 65,123,128,167,211, 52,220,184, 99,135, 22,173,250, 8, 6,230,
-152,218,170, 74,126,105,209,164, 17, 99,174,105, 89, 29, 0,112,113,224, 7,247,142,170,159, 99,111,207,136, 22, 47, 92,118,248,
-215, 45,235,219, 68,239,252,215, 52, 13,139, 23, 62,157,166,161,119, 84,125, 54,225,193,195,193, 0,182, 88,107, 90, 6, 12,232,
-125,231,183,141,187,144,149,114,216,107,213, 23, 10, 41, 12, 37,128, 56, 4,145,237,236,113,243,199, 76,100,101,101,229,242, 60,
- 95, 99, 51, 46, 97,136, 95,124, 66, 92,163,166, 97, 77, 60,198, 77,152,108, 63, 96,192, 96, 28, 57,114, 16, 91, 55,111,184, 56,
-124,244,176, 95,179, 74, 74,133,110, 98,165, 68, 73,120,169, 80,226, 32,146, 43,149,249,230,236,236,167, 15, 79,145,216, 30, 24,
-201, 3,213, 71,134,167, 78, 30,235,208, 61,106, 48,254, 56,122, 16, 91, 55,255,114,225,243,176, 17, 27, 26, 68, 52,102,218,182,
-252,102, 90,131,134, 13,252,181,101,121,165, 2, 70,106, 54, 24,120,187,111, 54,167,174,124, 50,111,194,147, 59,113, 35,191,165,
-163, 8,255,196,189,173,253,250,181,121,255,241, 99,137,107,167, 78,138,236,115,231,148,214, 24, 44,145, 72, 4, 8, 4,172, 53,
-154,204,169, 83, 2, 0, 53, 14,174,146, 72, 36,208,233,116, 96, 25,198,108,141,166, 91, 76, 76, 70,106,106,106,176,163,163,227,
-159,204, 85,113,113,113,197,103,131,193, 0,147,201, 4,133, 92, 30,111,141,102,222,197,139,134,121, 19, 39,206,127,247,157,119,
-190,219,185,107,151,220,193,193, 1,106,181,250, 79, 6,203,100, 50,161, 77,219,182,146,141, 15, 30,140, 3,176,192,154,235,233,
-222,173, 91,173,253,125,159, 25, 86,218, 68, 88,151,250,172,182,166, 26,107, 71, 17, 86, 85, 49, 50, 12, 19,245,220,239,243,250,
-246,237,107, 72, 78, 78,134,159,159, 95,133, 73,169,124, 78,123,123,123, 56, 58, 58,226,193,131, 7,216,176, 97,131,158, 97,152,
-121, 53,105, 22, 23, 23,107, 12, 6,195,168,209,163, 71,235, 37, 18, 9, 66, 67, 67, 43,230,191,226,121, 30, 82,169, 20, 54, 54,
- 54,136,139,139,195,132, 9, 19,116, 6,131, 97,212,243,115, 96, 61,175,153,154,154,170,214,106,181,175,191,254,250,235,186,135,
- 15, 31, 34, 50, 50, 18,119,239,222, 69, 89, 89, 25,202,202,202,144,146,146,130, 38, 77,154,192,100, 50, 97,239,222,189,122,173,
- 86,251,122,106,106,170,186, 38, 77,141, 70, 51,112,249,242,229,194,163, 71,143, 54,240,241,241, 9,107,221,186,117, 72,143, 30,
- 61, 2,135, 14, 29,234,223,175, 95, 63,207,224,224, 96, 67,239,222,189, 93,251,246,237,235, 42, 20, 10,197,143, 31, 63,206, 33,
-132,244,173, 73,179,178, 41,121,248,240, 97, 69,147,160, 72, 36, 66, 97, 97, 97,197, 76,251,229, 15,163,170, 12,112,117,154,149,
- 77,118,185,177, 42, 55, 90,181, 61,251,171,210,100, 24,166,214, 10, 67, 42,149,150, 71, 56, 73,109,154,132,144,152,251,247,239,
-247,236,210,165, 75,204,164, 73,147, 52,185,185,185,176,179,179, 67, 64, 64, 0, 26, 53,106, 4, 23, 23, 23,152,205,102,252,254,
-251,239,218, 3, 7, 14,196,170,213,234,110,207,207,129,245,188,166, 64, 32, 72,169,234,225, 90, 30,189, 42, 55, 88,114,185, 28,
-222,222,222,229,215, 54,165, 46,215,243, 5, 35, 75,127,175,230, 51,227,210,163,123,239,134,253,250, 15,113, 56,112,232,160,242,
-251,181,155,238,119, 30, 60,125,157,139,255,172,253, 46,254,179,246,119, 30, 60,125,221,247,107, 55,221, 63,112,232,160,178, 95,
-255, 33, 14, 61,186,247,110,152, 16,255, 32,228, 79,235, 18, 86,145, 78,165, 84,214,182,115,199, 96,213,197, 43, 23,217,101, 43,
- 55,115, 29, 59,244,187,254,221,119,235,118,127,247,221,186,221, 29, 59,244,187,190,108,229,102,238,226,149,139,108,231,142,193,
- 42,165, 84,214,214,154,188, 79,157, 60,214,161,127,191,193, 56,114,228,119,118,199,214,213, 95, 31, 60, 97,234, 50, 98,178, 33,
- 47, 45,229, 54,129,110, 19, 92,237, 99,145,158,158,174,102, 89,182, 91, 85, 29,220,171,210,156,242,246,216,202,230,234,146,179,
- 71,228,250,251,247,193,157, 58,117,216,114,230,204, 29,253,165,152,124,245,173,132,194,226,162, 82, 67,178, 86, 83,106,226,121,
- 30,132,231,132,139, 22,129,169,233, 59,234,216,177, 43,206,158,222,142,205,155,126, 86,243, 60, 12, 35,246,236,225, 70,142, 92,
- 72,252,235,215,247,223,182,115, 59, 51, 96,208, 16, 7, 2,240, 3,135, 13,118,220,177,107, 7,211, 48,168, 97,253,128,128,167,
- 83,211,252, 79,150,165,191, 65,115, 1, 33, 37,165,105,105, 23,110,255,240,131,209,125,212,168,122, 82,119,119,123,240, 60, 83,
-254,124,175,110, 19,137, 68,127,138,184,212,164,233, 94,175, 94,214,137, 19, 39, 16, 18, 18, 2,111,111,239, 63,117,121, 41,159,
- 72,219,197,197, 5,167, 78,157, 2, 1,110, 89,163,217,196,203,235,246,143, 63,252, 96,226,121, 30, 37, 37, 37,255, 22,189, 42,
- 41, 41, 1,207,243,184,120,225,130, 73, 93, 86,182,217,218,188,183, 53,153,202,134,180,106,245,213,248,241,227,205, 41, 41, 41,
-224,121, 30,149, 35, 89,249,249,249, 80, 42,149,208,233,245,190,238,238,238, 74,107, 52,243,143, 31,183, 65, 45,207,117,129, 64,
-240,167, 38,194,191,227,123,255, 71, 69,176, 88,150,133,175,175,239,159,230, 25, 17, 8, 4,127,218,234, 50,130, 48, 43, 43,107,
-139,187,187,251,137,113,227,198,205,111,209,162,197,212, 25, 51,102, 8, 27, 54,108, 8,181, 90, 13, 39, 39, 39,184,185,185, 33,
- 37, 37, 5, 23, 46, 92,224, 84, 42,213, 58,142,227,190,200,203,203, 43,176, 66,247,156,183,183,247,128, 94,189,122,237,122,247,
-221,119, 29,186,116,233, 34,246,242,242, 2, 0,196,199,199,227,216,177, 99,230, 29, 59,118,148, 26, 12,134, 81,214,204,226, 14,
- 0, 57, 57, 57, 39, 61, 61, 61,135, 79,152, 48, 97,219,208,161, 67,237, 12, 6,131, 56, 37, 37, 5, 38,147, 9, 44,203,162,184,
-184,216,124,225,194,133, 50,157, 78, 55, 54, 39, 39,231,164, 21,122,183, 25,134,105, 98, 54,155, 39,220,185,115,103,201,240,225,
-195,157, 59,116,232, 32, 97, 89, 22,151, 47, 95, 46,136,136,136,112, 43, 45, 45, 53, 95,185,114,165,200, 96, 48,204,203,206,206,
-182,106,169, 28,134, 97, 80, 90, 90, 10, 23, 23, 23, 24,141, 70,240, 60, 15,147,201, 4, 91, 91,219,138,229,141, 8, 33, 47,220,
- 71,142,101, 89,161,217,108,198,232,209,163,193,243, 60, 86,175, 94, 13,150,101,235, 44,102,107,107,123, 43, 62, 62,126, 64, 88,
- 88, 88,133,105, 41, 47, 67, 50,153, 12, 46, 46, 46,112,118,118,198,233,211,167, 33, 20, 10,111, 89, 25, 93,187, 11, 32,130, 97,
-152, 14,177,177,177,227, 1,180, 48,155,205,222, 28,199, 49, 2,129, 32,135, 16,114,175,180,180,244, 87,107,151,202,201,207,207,
- 95,242,198, 27,111, 68,108,223,190,221, 86, 36,250,215,173, 33, 18,137, 32,147,201,224,230,230, 6, 7, 7, 7, 16, 66, 96, 50,
-153,240,217,103,159,149,106,181,218, 37,175,202,195,160, 85,235,182,248,229,167, 53,182,103,206,158, 40,184,159,132,131,149,167,
- 98,176, 5,112,229,218,148,131,170,146, 95, 90,100,103,100,216,182,106,221,214, 42, 77, 19,199, 22,141, 26,187,206,247,217, 82,
- 57, 75, 82,146,211, 86,109,223,244,214, 19, 0,248,118,229,134,128,244,124,243,140,132, 7, 15, 7,175, 93,119,190,173,137, 99,
-139,172,209,252,151,105,217,166, 6,129, 33, 43, 43,235,186,143,143, 79,131,200,193,230,121, 33,129,204,160,188, 66, 62,139, 97,
-152,247,178,178,178,158, 88,155,247, 78, 29,187,224,236,201, 29,216,186,121, 91, 41,225,133, 6, 23, 23, 23, 2, 0,247,239,187,
-144,251,247, 85, 4, 40,159,175,209, 81,235,170, 44,248, 98,222,220,169, 51, 53, 26,205,170, 31,191,169,121,194,217,102,205,219,
-161, 89,243,118,152,254,222,167, 14, 77,194, 66,253, 0, 96,207, 30,194,133, 7, 51,135,231,127,190,112,208, 23, 95, 44, 68,169,
-198,136, 47,190,120,186,172, 78, 98, 92,194, 31,143, 31, 19, 19,173,154,254,204,124,150,189,142,153, 51,131,117,197,197,174,157,
- 62,249,196, 69,244,205, 55,130,170, 58,185,151, 71,176, 42,223,191,214,104, 30, 63,115,230,143,143,102,206,204, 90,241,205, 55,
-189,151, 45, 95,174,104,220,184, 49,114,115,115, 17, 26, 26, 10,111,111,111, 92,185,114, 5, 39,142, 30,213,150,233,245,243, 60,
- 60, 60,214, 90,163,249,253,142, 29,137,157,187,119, 47,220,178,101,139, 87,247,238,221, 25,173, 86, 11,181, 90, 13,181, 90, 13,
-163,209, 8,137, 68,130,172,172, 44,146,158,145,113, 63, 51, 51,115,157,181,121,231, 10, 10,228,179,210,211, 51, 69,155, 54, 45,
-159, 50,121,242,236,153,179,102,201,124,124,124, 24,163,209, 88, 17,197, 50,155,205, 80, 42,149,102,141, 70,227, 12, 64,103,141,
-166,236,240, 97,182,168,168, 8,206,206,206, 21,211, 46, 85,158, 87, 80,171,213,130, 16, 58, 9,110,157, 94, 20,170,171,195, 67,
- 67, 67,111,137, 68, 34,159,202,209,172,234,126, 86,170,140, 51,227,226,226, 90, 85,118,184,132,144, 42,251, 59,249,248,248, 4,
-240, 60,191,180, 67,135, 14,195,223,126,251,109,230,194,133, 11, 56,123,246, 44,201,204,204,220, 43, 16, 8,230,101,102,102, 62,
-169,238,205,166, 58,205,122,245,234,217,217,217,217,125,104, 99, 99, 19, 85, 62, 21,131, 92, 46,143,213,106,181,167, 53, 26,205,
-234,234,102,111,175, 73,179, 97,195,134,246, 60,207,127, 96, 99, 99,211,179,176,176,176, 5, 0,184,184,184,196,104,181,218, 83,
- 2,129, 96, 77,117, 11, 72,215,164,233,229,229,165,176,181,181, 93, 82,175, 94,189,215,223,126,251,109,231, 11, 23, 46,228,196,
-196,196, 72, 74, 75, 75,183,179, 44, 91,237, 98,207, 85,105, 54,105,210,228, 79,107, 17,190,204,239, 8, 0,154, 55,111,126,100,
-224,192,129,253,199,142, 29, 11,139,197,130,181,107,215,226,212,169, 83,127, 36, 37, 37, 13,168,233,237,243,121, 77, 15, 15, 15,
- 23,111,111,239,243,227,198,141,243, 31, 50,100,136,210,222,222, 30, 66,161, 16, 90,173, 22,201,201,201,184,119,239, 30, 57,117,
-234, 84, 89,124,124,124,166, 94,175,239,154,155,155, 91,104,237,245,252, 43,111,201,207,107,138,197,226, 46,190,190,190, 59, 23,
- 44, 88, 96,215,179,103, 79,133,179,179, 51,132, 66, 33, 44, 22, 11,114,114,114, 16, 23, 23,135, 19, 39, 78,104,247,238,221,171,
- 45, 42, 42, 26, 77, 8,185,240,159, 72,231,203,212,108,210,136,249,252,185, 5,156,171,157,157,189,166,125,173, 73,103,255, 40,
-167,126,195,135,183,142, 2,128,125,251,110,158,254,227,116,201,209, 23, 77,103,109,105,181, 70,179,113,176,112, 65,124, 66,220,
-159, 38,162, 12,107, 18,254,176,113,211, 97, 95, 90,163, 85, 62,147,251,243,121,175, 52, 59,126,165, 55,130, 63, 55,167,150, 47,
- 8,253,233,188,185, 88,186,228, 43, 28,220,243,251, 31, 9,143,201,145,255,229,178,244,119,106,150, 47, 78,172,244,244,236,188,
-195,197,101,238,201,211,167,109, 43,191,168,149, 71,154, 43,191, 76,182,104,209, 34, 63, 38, 38,198,221, 26,205, 1,223,127,111,
- 54,216,217,201,150,173, 91,215, 69,103, 50,117,153, 53,107,150,232,246,237,219,216,177,109, 27,171,207,200,216,150,203,113, 31,
- 84,213,250, 81,147,102,224, 71, 31,201,151,110,223, 62,177,126,195,134,110,131, 7, 15, 22, 11,133, 66,104, 52, 26,100,103,103,
-227,234,149, 43,166,228,148,148, 4,157, 78, 55, 40, 51, 51, 51,219, 90,205, 1,223,127,111,118, 12, 8,128,210,213,149, 92,137,
-142,118,248,120,193,130,169, 30,158,158, 14,157, 34, 35,197, 74,165, 18, 37, 37, 37, 72, 79, 79,199,165, 75,151,242,159, 60,121,
-226, 69, 8,225,172,209, 60, 20, 27,219,236,236,245,235, 35, 62,254,248, 99,105, 72, 72, 8,236,236,236,160,209,104,144,144,144,
-128,171, 87,175, 26,119,238,220,169,214,106,181, 83, 51, 50, 50, 14,253, 93,223,251, 63,198, 96,253,127,221,120, 30, 30, 30,173,
- 4, 2,193,231,207,154,163, 22,215,182,166,223,171,244,208,241,244,244,244,115,114,114,250, 69,175,215, 19,163,209, 56, 37, 39,
- 39, 39,253,191, 45,157, 12,195,136, 90,181,106,245, 83,126,126,126, 7, 66, 8, 28, 28, 28,174,198,199,199,191, 67, 8, 97,235,
-170,201, 48,140,208,195,195,163,131,141,141, 77, 91, 27, 27,155, 46,102,179,185,241,179,126,120,247,117, 58,221, 5,139,197,114,
- 61, 55, 55,247, 42, 33,132,251, 79,230,157, 97, 24, 33,128,158, 94, 94, 94,111,241, 60, 31,196, 48,140, 35,199,113,176, 88, 44,
- 42,158,231, 31,169,213,234, 13, 0, 78,253,167,211,249,178, 52,195,130,152,161, 68,128,198,213, 25,129, 63, 25,154,231,140, 3,
-195,227,126,252, 35,242,187,181,233,100, 24, 70, 48,164,175,235, 10,224,233, 72,195,218,150, 28,250,147,193,178,194,180,212,217,
- 92, 6,137,222, 32, 12,241,251,243, 67,145, 73, 15,109, 54,116,235, 95, 49, 88,214, 18, 22,194,116, 1, 65, 7,158,224,250,253,
- 36,114,246, 85,125,214,189, 76,205,175, 24,166,222,158, 70,141,174, 10, 68, 34, 15,134, 97, 4, 0,192, 8, 4, 60, 15,112, 16,
- 8,216,202,205,130,149, 95, 40,107,211, 52, 3, 77,197, 50,153, 47,199,178,238,197, 18,137,237, 21, 27,155,150, 70,160,204,131,
-227, 62, 63, 93, 84,148,248, 34,233, 52, 3, 77,133, 50,153,223, 21, 59,187,193, 42, 39,167,102, 37,102,179, 43, 0,162, 80, 40,
-238,151,233,116,155, 83, 83, 83,127,172, 98, 81,245, 90, 53, 37, 50,153, 15,247,108,228,161, 64, 36,202, 63, 33,147,249, 22,184,
-186,142,215,233,245,254,114,185,220, 66, 8, 41, 53,155,205, 99,211,211,211,207,212, 37,239,233, 66, 97,147,123,118,118,145,156,
-189,189,179,133, 97,108, 76, 28,103, 54, 91, 44, 25, 70,163, 49, 86, 40, 20,174,204,204,204,124,252,119,126,239,175, 28,229,163,
-205,254,142, 13, 64, 20,213,164,154, 84,147,106, 82, 77,170, 73, 53,255,126, 77, 55, 55, 55,165,135,135,135, 31, 0,225,255, 98,
-222, 95,181, 77, 68, 45, 38,133, 66,161, 80, 40,255,251,228,229,229,233, 80, 69,159, 43,202,127,168,137, 16, 64, 84, 53,145, 45,
-171, 67,127, 47, 50,154,192,138,166, 4,170, 73, 53,169, 38,213,164,154, 84,147,106,190, 98,154,181,105,191, 50, 77,143,180,137,
-144,106, 82, 77,170, 73, 53,169, 38,213,164,154,180,137,240,229,110, 2, 80,170,115,214,238, 12,195,184,191,236,125, 41,175,118,
- 89,168,226, 88,111,134, 97,188,235,184,191, 39,189,234, 20, 10,133,242,191,205,255,123, 31,172,242,138,138, 16,146,247, 50,246,
-123,217,199, 62, 59,254, 43,134,193,199,207, 62,127, 77, 8,153,251, 50,246,173, 13, 47, 47, 47,223,122,245,234,189,225,226,226,
-210,177,168,168,232, 98, 78, 78,206,198,194,194,194,156, 58, 28, 31, 44,151,203,223, 17, 8, 4,225, 0,192,243,124,156,193, 96,
-248, 41, 59, 59, 59,233, 37,124,111, 12,128,201, 50,153,236, 53, 39, 39,167,160,226,226,226, 71, 38,147,105, 15,128,159, 95,100,
-214,105, 79, 79,207,150, 28,199,189,143,167, 35, 89,127, 46, 40, 40,184, 98,237,177,238,225, 67,118, 19, 32, 24,128,128,103,248,
- 17, 2, 34,216, 11,128,103,128,164,188,184, 3,175,189,228,242,250,194,223,111, 93,143,101, 24,102, 37, 3,124, 8, 6,228,175,
-150, 37, 10,133, 66,161,252, 15, 25, 44,111,111,239, 9, 0,102,227,233, 76,219,223,102,101,101,109,254, 59, 42,171,151, 88,169,
-173, 38,132,204,170,123,180, 2, 31,243, 60, 17, 0,128, 64,192,124,226,238,238, 30, 46, 18,137,140,207,239,203,178,172,140, 97,
-208,135,231, 9,243,108,223,143, 25,134, 89,243, 34,198,206,217,217,217,107,204,152, 49,219,190,248,226, 11,133, 82,169, 68,122,
-122,250,144,185,115,231, 70,121,121,121,141,207,206,206,206,168,237,248,134, 13, 27,142,105,218,172,197,204,185,159,126,110,235,
-234,230,102,195,178,156, 57, 35, 43, 83,249,205, 87,139,219, 54,108,216,112, 77,114,114,242,142,186, 24, 41,145, 72,244,154, 92,
- 46, 15, 52, 24, 12,143, 89,150,221, 43, 20, 10,123, 47, 89,178, 36,188, 95,191,126,242,210,210, 82, 41,203,178, 65, 91,183,110,
-157,249,219,111,191,245,101, 24,102,112, 77,195,237,203, 35, 56,132,144,172, 74,215,238,157,219,183,111,119, 23,139,197,204,179,
- 69,155,175,212,180,127,101, 8, 16, 28,127,121, 79, 83, 0, 8,235, 52,242, 97,252,229, 61,120,246,249,165,191, 12, 60, 95, 22,
-156,156,156,182,151,148,148, 36,212,102,228,171, 58,150, 97,152,239, 8, 33,185, 94, 94, 94, 29, 1,188,243,108,215,159,178,179,
-179,175, 48, 12,227, 33,151,201, 62,212, 27, 12, 12, 0,230,175,148, 37, 10,133, 66,161,252,239, 69,176,230, 62,124,248,208,142,
- 16,130,144,144,144, 57, 0,172, 54, 88,207, 87, 56, 66,161, 96, 78,207,158, 61, 39,202,100,178, 63, 85,204, 70,163, 81, 32, 16,
- 48,110, 28,247,244,207,117,169,104,202,207, 97, 50, 25, 5, 98,177, 20, 66,161, 96,102,139, 22, 45,250,230,229,229, 29,147,201,
-100, 95,167,164,164,228,191, 72,228,102,243,230,205, 17,206,206,206,255,102, 32,138,138,138, 4,125,251,246, 97,234,162, 55,145,
- 97,100, 70,153,172,173,132, 97, 60, 57,150,117, 4, 0,145, 72, 84, 18,228,238,222,229,179,185,115, 21,207,116, 81, 86, 86,134,
- 55,222,120, 67,249,232,209,163,177, 0,150,214, 18,185,106,212, 60,162,213,140, 29,219,183, 53, 46, 45, 46, 49,172, 95,245,243,
-109,189, 72,162,107,208, 36, 84,178,248,171,149, 78,159,125, 50,243, 61, 47, 47,175,152,170,150, 13,121, 46,175, 2, 0,191,127,
-248,225,135, 97, 3, 6, 12,144,106, 52, 26,185, 94,175,175,191,109,219,182,207, 90,181,106,101,219,162, 69, 11,233,206,157, 59,
- 25,181, 90, 13, 66,136, 50, 52, 52,148,188,246,218,107,134, 93,187,118, 77, 7,240, 93, 93,204, 50,207,243,194,170,202,161, 53,
-230,154, 1,146,194, 58,141, 4, 24, 4,197, 95,222, 35, 15,139, 28,105, 0,193, 35, 6, 72,122,246, 34,240, 5, 80,105, 94,167,
- 63,115, 63, 43, 43,235,133,214, 14,236,223,127, 0, 67, 8,249,221,203,203,235, 76, 97, 97,161, 29,195, 96,116, 29,162, 83,140,
-171,171,235,123, 0, 62, 37,132,124,120,238,220,185,246, 0,208,173, 91, 55, 9,128, 43, 14, 14, 14, 61, 76, 70, 35, 67, 31, 73,
- 20, 10,133,242, 15, 52, 88,132, 16, 25, 0, 92,186,116, 9,132, 16,249,139, 4, 5, 42,255, 50,107,214, 44, 56, 59, 59, 63,111,
- 90,112,246,236,153,106,143,169,235, 57,190,250,234, 43,199,252,252,252,209,191,254,250,235, 16, 15, 15,143,119,115,115,115,143,
-215,146,199, 60,134, 97,190,126, 22,113, 96,228,114, 69,201,164, 73,147,174, 62,251, 95,227,195,135, 15,219, 13, 28, 56, 80,195,
- 48,204,125, 0,144,203, 21, 93,132, 66,129, 19, 33,132, 16,130,175,107, 50,130, 35, 25, 38, 64, 42,149,118,159,242,253,247,108,
-203,129, 3, 69, 54,174,174, 12, 0,164, 61,120,224,242,221, 15, 63,116, 86,101,100,200, 68,118,118,101,121, 37, 37,166,135, 15,
- 31, 66, 46,151, 51, 2,129,160, 99,109, 25, 86, 42,149,239,207,154, 61,199,166,180, 88,165, 55,148,106, 76, 66,214, 98,180, 83,
- 40,185,188,220,252, 34, 91,133,141,110,242,187,239, 75, 23,124, 58,251,253, 74, 81,147,234,152, 62,115,230,204,198,109,218,180,
-241,222,189,123, 55,163, 86,171, 33, 18,137,108, 91,180,104,129, 86,173, 90,113,103,207,158,101, 26, 52,104,128,240,240,112, 92,
-190,124, 25, 87,175, 94,101, 34, 34, 34,148,251,247,239, 31, 87,149,193,170,202, 84,143, 25, 51,102,162, 84, 42,229,187,116,233,
-130,183,222,122, 11,132, 16, 68, 68, 68,116, 28, 55,110, 92,142, 94,175,183,202, 92,151, 55, 3,186,133, 15,185, 7,160, 41, 8,
- 30,229,199, 29,104, 86,105,151,198,137,137,137,237, 74, 74, 74, 42, 58, 27,150, 47, 44,222,185,115,231,186,148,247, 60,134, 97,
-190, 30, 56,112,192, 28,128, 65, 84, 84, 84,217,244,233,211, 73, 98, 98, 98,175, 33, 67, 6, 55, 72, 74,122, 84,109, 58,159, 47,
- 71, 83,167, 78,211,138,197,226, 55,188,188,188, 18, 24,134, 17,139,197,226,242,107, 36,170, 95,191,190,123,211,166, 77,231,122,
-122,122,234,132, 2,129,146,160,246,178, 68,161, 80, 40,148, 87,200, 96, 49, 12,147,125,247,238,221,250, 58,157, 14, 12,195,100,
- 91, 81, 65,157,174, 92,225,136, 68,162, 95,132, 66,193, 20, 0,104,221,186,141,118,249,242,229, 85, 53, 43,241,173, 91,183,209,
- 10,133, 2,155,167,149,151,240,103,150,101,243,170,210,172,166, 66,252, 70, 42,149,125, 4,128,241,241,241, 45, 59,120,240, 32,
- 63,124,248,112,124,243,205, 55,178, 57,115,230,252, 88,191,126,253,110,169,169,169,105,213,165,243,217,239,115,221,221,221,195,
- 55,111,222, 28, 49,105,210,164,171, 89, 89, 89,195,158, 69, 70,246, 3,104,199, 48,204,253,202,127,219,191,127,127,135, 9, 19,
- 38,220,201,203,203,155, 91,157,230,112,134, 9,244, 15, 13,237,254,197,197,139, 68, 96, 52, 50,133,151, 46,149, 22, 23, 20,152,
- 31, 23, 22,218,108,143,141, 29,253,241,162, 69, 18, 15,111,111, 92, 57,121,210, 46, 87,165,210,168,116, 58, 83, 74, 74, 10,207,
-113,220, 25, 43,242, 30,230,234,226,162,252,121,229,218,155,118, 98, 33,239,230,227,205,136,235,213, 19, 9,148,246, 82,161, 72,
- 96,108, 80, 63, 64, 10, 32,172,182,239, 72, 34,145,140,235,213,171,151,114,215,174, 93, 76,120,120, 56, 28, 29, 29,113,233,210,
- 37,196,196,196,160,164,164, 68, 96,177, 88,208,186,117,107, 44, 95,190, 28,126,126,126, 80,169, 84, 72, 79, 79,119,145, 74,165,
-174, 53, 92, 79,166, 82,249,193, 39,159,124, 2, 87, 87, 87, 88, 44, 22, 20, 23, 23,131,227, 56,216,216,216, 0, 0,114,115,115,
-113,240,224,129, 90,203,146,149,230, 8,237,219,183,175, 48,194,149, 35, 88,117,209,244,246,246,190, 84, 80, 80, 56,178,123,247,
-238, 40, 46, 46,102, 23, 46, 92,136,230,205,155,163, 81,163, 70,214,148,249,185, 50,153,236, 55,127,127,255, 77, 83,167, 78,173,
-239,228,228, 4,163,209,184,162,168,168, 8, 31,127,252, 49, 0,160, 77,155, 54,173, 9, 33, 49,147, 38, 77, 66,253,250,245, 53,
-185,185,185,133,247,238,221, 27,162, 82,169,238,189,104,222,173,188, 62, 84,147,106, 82, 77,170,249, 95,165,249,143, 54, 88, 0,
-242,188,189,189,235, 43, 20, 10, 0,168,243,219, 53,203,178, 83,221,220,220, 4,159,125,246,217,192,134, 13, 27,242,211,167, 79,
-191,146,146,146,242,167,142, 51, 13, 26, 52,216,243,195, 15, 63,116, 76, 78, 78,214,125,249,229,151,135,243,243,243,167,213,241,
- 75,255,132, 97,152, 85, 0,144,145,145, 81,116,224,192,129,200,139, 23, 47,126,181,106,213, 42,159,233,211,167,203,166, 79,159,
-254, 9,128, 90, 53, 69, 34,145,177,170,102,193,170,112,118,118,230,171,234,163, 85,206, 64,134, 81,216, 75,165,221,190,184,120,
-145,152, 82, 83,117,187,126,252, 81,177,238,230,205,249, 22, 66, 60,221,221,221,133, 93, 58,117, 50,218, 73,165,154,188,236,108,
-222,201,199,135, 73,126,252,216,214, 34, 20,154,143, 31, 63, 94, 86, 80, 80,176,205,138, 36,148,242,132,152,108,125,252, 44, 35,
-134,244, 12,191,121, 61,230,129,157,155,139, 32,162, 69,120,179, 7, 15, 83,111,131,231,204, 0, 74,107, 19,113,112,112,104, 84,
- 84, 84,132,210,210, 82,184,186,186, 98,245,234,213,240,240,240,128, 78,167, 67,124,124, 60,241,241,241, 97, 46, 94,188, 8, 31,
- 31, 31, 20, 20, 20,192,100, 50, 65,163,209,228, 27,141, 70,125,117,134, 87, 36, 18,253, 38, 16, 48,147, 24,134, 65, 72, 72,168,
-118,213,170, 85, 60, 33, 4,141, 27, 55,198,176, 97,195,176,111,223, 62,196,199,199,151, 71,154,248,192,192, 32,173, 64,192,216,
- 0,224,255, 74, 20,135,231,121, 84, 54,194,117,197,203,203, 75, 1,224,227,224,224,224, 81,175,191,254, 58, 43,145, 72,160,213,
-106,161,215,235, 17, 23, 23,199,246,239, 63,160,108,224,192, 1,182,127,252,241, 71,141,233, 52, 26,141,143,253,253,253,135,207,
-152, 49,227,228,207, 63,255,236, 60,111,222, 60,240, 60, 95,177,177, 44, 91,177, 40,247,129, 3, 7,240,232,209,163,185,149,205,
- 21,133, 66,161, 80,254, 25, 6,235, 47, 35, 22,139,191,248,227,143, 63,122, 45, 93,186, 84,220,163, 71,143,142, 94, 94, 94, 29,
-178,179,179,175, 62,171,212, 58,244,235,215,175,163,155,155, 27,214,172, 89, 99, 18,139,197, 95,188,160,179,174, 92,217,157,243,
-240,240,152,190,127,255,254, 67, 83,166, 76,129,167,167,103,219,255,239, 60,219,203,100, 17,147, 86,175,102,197, 22,139, 96,231,
-207, 63,203,150,158, 57,179,122,215,238,221,226, 54,173, 91,131, 0, 72,136,143,151,125,253,253,247,178,145, 3, 6,228,199, 63,
-122,132,227,167, 79,155, 84,197,197,217, 5,165,165,179,243,242,242, 10,172, 48,174,209,201, 41,201, 94,145, 93,218,123, 95,184,
- 17, 23, 51, 98, 72,191,238, 98,145,128,121,148,154,121,203,211,195,197,225,234,229,203,122,150,101,163,107,211,209,106,181, 41,
- 44,203,214, 35,132,184,158, 63,127, 30,174,174,174, 40, 41, 41,129,197, 98,129,201,100, 50,233,116, 58,121, 81, 81, 17, 12, 6,
- 3,140, 70, 35,236,237,237, 17, 27, 27,155,199,178,236,217, 26,210,246, 22,195, 48, 11, 9, 33, 72, 72, 72,200, 2, 0, 95, 95,
-223, 38,142,142,142,167,202, 23, 80,190,120,241, 98,175,204,204,204,248, 74,145,174, 26, 59,185, 91, 27,193,122, 81, 60, 61, 61,
- 91,202,229,242,175,231,204,249,196,171,121,243,230, 40, 40, 40, 4,207,243,176,181,181,133, 94,175,135,157,157, 29, 58,118,236,
-152,187,112,225,194,100, 66,208,151, 16,146, 91,147, 94, 90, 90, 90,174,159,159,223,232, 41, 83,166,124, 31, 28, 28,220,136, 16,
-130,224,224, 96,244,234,213, 11,199,142, 29,195,195,135, 15, 81, 86, 86,198,222,184,113, 99,125,118,118,246, 46,250, 88,162, 80,
- 40, 20,106,176,234, 76, 86, 86, 86,150,183,183,247,150, 59,119,238, 76,122,237,181,215,112,238,220,185,121, 0,250, 2,128, 92,
- 46,159,247,218,107,175,225,206,157, 59,184,127,255,254,150,172,172,172,172,151,113, 78,169, 84,170, 53,153, 76,120,118, 14,101,
- 29, 43,234,198,207,154, 6, 65, 8,105, 92,221,223,106, 66, 32, 18,121, 54,237,211, 71, 84, 18, 19, 83,186,234,242,229,197, 59,
-118,238, 20,183,109,211, 6,102,139, 5, 60,199,193,215,207, 15,221,163,162,100, 91,118,239,182, 97,181,218, 43,159,127,240,193,
-177,181,111,188, 81,118,173,172,236,145, 53,105,212,106,181,223,125,254,233, 39, 81,187,118,239,243,110, 18, 26, 88,239,248,201,
-115,119,156,157, 29,148,141,130,130,108, 84, 42, 53,183,114,197, 82, 81, 89, 89,217,247,181,233,232,245,250,223, 79,159, 62, 61,
-196,215,215,215, 53, 46, 46, 14, 38,147, 9, 28,199,161, 71,143, 30,229,253,239,120,145, 72,132, 7, 15, 30,192,108, 54,231, 39,
- 37, 37,101, 63,122,244, 72, 6, 96, 89, 45,215,240,249,239,113, 82,255,254,253, 97,177, 88,208,171, 87, 47, 28, 56,112,224, 77,
- 0, 51,106,216,255,133, 12, 86,229,239, 9, 86,118,110,247,242,242,234, 25, 20, 20,180,102,249,242,229, 2, 31, 31, 31,240, 60,
- 15, 39, 39, 39,232,116, 58, 20, 22, 22,161, 73,147, 38,240,245,245,197,178,101,203, 0, 96,103,109,230,170,156,244,244,244,251,
- 0,186, 5, 6, 6, 74, 13, 6, 67,199,168,168,168,173, 61,122,244,192,157, 59,119,112,245,234,213,238, 12,195,228, 26, 12, 6,
-139,183,183,247, 44, 0,142,132,144, 95,172, 25, 61, 74,161, 80, 40,148,255,113,131, 21, 24, 24,104, 39, 22,139,186, 78,155, 54,
-213,150,227,120,136,197,162,110,245,235,215,119, 72, 77, 77, 85,191, 64,229,183,102,219,182,109,175,175, 92,185, 82,214,191,127,
-255,102,158,158,158,189, 0, 96,228,200,145,205,236,237,237,177,109,219, 54, 35, 33,100,205,203,202, 36,203,178, 67, 90,181,106,
-133,226,226, 98,164,166,166, 94,173,203,177,135, 15, 31,182, 3,208,174,182,191,213,120,126,147,201,201,209,219, 91,144,117,238,
-156,185,184,180,212,171,220, 92, 9, 4, 2, 20, 23, 23, 35, 45, 53, 21,246,118,118, 72, 72, 76,148,173,125,255,253, 93,254,225,
-225, 98,206,100,114,182, 86,191,160,160, 64,235,225,225, 49,113,254,231,159,253,254,253, 15, 63,184,170, 74, 75, 31, 43, 20, 74,
-163, 76, 38,241,152, 63,127, 30,167, 86,171, 39, 20, 22, 22,150, 89, 33,181,108,251,246,237,125,250,244,233,115,207,207,207,207,
-173,160,160,192, 67,173, 86,147,226,226, 98, 6, 79,251, 82, 49, 0,112,239,222, 61,164,166,166,178, 28,199, 93, 4,240, 5, 33,
-196,100,109, 90,189,188,188,156,219,183,111, 63,212,205,205,173,162, 41,178, 69,139, 22, 67,189,188,188,150,100,103,103, 23,189,
-204,194,125,234,212, 41, 59, 66, 72, 59, 66, 8,250,244,233, 99,237, 97,239, 12, 24, 48, 64,192, 48, 12,244,122, 61,100, 50, 25,
-108,108,108, 97,103,103,143, 70,141, 66,144,149,149,133, 94,189,122,113,143, 31, 63,222, 33,145, 72,190,171,107,154,244,122,253,
-152,142, 29, 59, 46,154, 54,109, 26,120,158,199,224,193,131,145,145,145,177, 41, 57, 57,121,131,143,143,207,180, 73,147, 38,185,
- 59, 59, 59, 99,214,172, 89,202,202,166,147, 66,161, 80, 40,175,160,193,242,242,242,138,114,114,114, 90,225,232,232,110,123,226,
-196, 73, 17, 0,116,233,210,217,198, 98, 97,163,189,188,188,230,100,103,103, 31,174,203, 73,179,179,179,139,188,188,188,126,190,
-122,245,234, 7,195,134, 13,195,169, 83,167, 62, 5,128, 97,195,134,225,234,213,171, 72, 78, 78,254,249,101, 85,182,222,222,222,
- 19,186,116,233,242,110,155, 54,109,112,228,200, 17,112, 28,119,180, 46,199, 87, 30, 49, 88,213, 40,194,242,191, 89, 37, 38, 20,
-130, 97, 24,112, 28, 7,194,243, 40, 44, 42,194,131,196, 68,148,148,148,128,227, 56,232,117, 58, 75,112,195,134, 90,181,201,100,
-207, 60,157,107,204,106,114,115,115,211, 2, 3, 3,211,117, 6,189,155,179, 83, 61,189, 82, 41,131, 70, 83, 38,137,189, 23, 83,
-150,153,153,249,216, 74,227,107, 98, 24,166,203,177, 99,199,230, 11,133,194,215,188,189,189, 49,114,228, 72,166, 71,143, 30,144,
- 74,165, 48, 24, 12, 40, 41, 41,193,225,195,135,193,178,108, 67, 0,112,117,117,117,175, 95,191,254, 62,129, 64,144,151,156,156,
- 60,169,182,115, 48, 12, 51,126,224,192,129, 98,147,201,132,197,139, 23, 99,193,130, 5,232,219,183,175,248,246,237,219,227, 1,
-172,124, 89, 5,155,231,121,244,236,217,179,114, 39,247,251,181, 29,211,181,107, 87,145, 80, 40, 12, 9, 12, 12, 68, 65, 65, 1,
- 10, 10, 10,224,234,234, 10, 47, 47, 47,184,185,185, 97,229,202,149, 88,189,122,245, 13, 66,200,178,220,220,220, 7,117, 77,147,
-175,175,239,172, 55,222,120, 99,214,168, 81,163,160,209,104,112,245,234, 85,116,236,216, 17,203,151, 47,247,185,116,233,210,162,
- 86,173, 90, 65, 34,145,224,252,249,243, 96, 89, 54,133, 62,158, 40, 20, 10,229, 21, 53, 88,222,222,222,245,120,158, 95, 50, 96,
-192,128,129, 67,135, 14,197,242,229,203, 42,121, 5, 17, 54,110,220,228,176,127,255,254,117,190,190,190, 67,133, 66,225,156,212,
-212, 84,171, 59, 36, 43, 20,138,181,219,183,111,159,216,190,125,123,187,168,168,168, 96, 0,144,201,100,252,246,237,219, 53, 10,
-133, 98,109, 93, 51,242,252,164,143,158,158,158,157,164, 82,233,244,129, 3, 7,118,154, 56,113, 34,226,227,227,177,117,235,214,
-187, 94, 94, 94,135,234,168,123,191,182, 81,132,181, 69,179,132, 82,105,145, 42, 55,215,209,214,207, 79,236,236,224,144,125,238,
-220, 57,255,182,109,219, 34, 45, 61, 29,170,146, 18,232,245,122,196,199,199, 19,137, 72,148, 44,114,114, 98,210,162,163, 25,161,
- 84, 90,103,131,105, 35,103,130, 63,255,120,114,125,131,193, 16,166, 86,171, 89,177, 68, 34, 86, 72, 73,157,154,153, 8, 33, 70,
- 63, 63,191,193, 28,199,185,152, 76, 38,139,187,187,187,248,244,233,211,144, 74,165, 96, 24, 6, 77,155, 54,133, 84, 42, 53,249,
-248,248,104, 0,192,217,217, 89,176,108,217, 50,241,135, 31,126, 24, 95,155,118,203,150, 45,197,254,254,254,147, 66, 66, 66,112,
-245,234, 85, 36, 36, 36, 36, 94,187,118, 45, 36, 34, 34, 2,222,222,222,147, 90,182,108,249,253,237,219,183, 45, 47,163, 96, 19,
- 66,234,220,201,253,194,133, 11,196,203,203, 11, 2,129, 0, 2,129, 0, 60,207,163,160,160, 0, 13, 27, 54,196,218,181,107,177,
-122,245,234,159,114,114,114, 94, 40,178, 26, 24, 24, 40,109,222,188,249,187,163, 70,141,194,227,199,143,177,116,233,210,252,188,
-188,188,163, 39, 79,158, 28, 63,109,218, 52, 81,199,142, 29, 81, 84, 84,132,141, 27, 55, 90,238,220,185,243, 93, 78, 78,206, 90,
-250,120,162, 80, 40,148, 87,208, 96,249,250,250, 78,148,203,229,139, 70,141, 26, 37, 10, 9, 9, 65, 94, 94, 30, 52,154, 50,174,
-105,211,112, 14, 96,136,173,173, 13,163, 84, 42, 49,101,202, 20, 52,107,214,172,231, 39,159,124,210,195,203,203,235,171,236,236,
-236, 31,173, 57,241,227,199,143, 53, 94, 94, 94,223,205,156, 57,115,121,116,244, 85, 27, 0,136,137,137,209,102,103,103,127,153,
-157,157,173,169,163, 9, 42,159,156,146,177,177,177, 73, 10, 10, 10,178,244,239,223,223,121,232,208,161,112,113,113,193,157, 59,
-119,176,108,217,178, 59, 90,173,118, 76,106,106,170,229,255,251, 34,179, 70, 99,238,173, 3, 7,236,186,190,254,186,253,199, 67,
-134, 44,125,251,237,183,127, 92,176,112,161, 56, 48, 32, 0, 38,179, 25, 9, 9, 9,100,231,142, 29,230, 29,203,151,127, 11, 27,
- 27,113,244,190,125, 82,147,201,148, 86,151,115,248,248,248,116,233,215,167, 75,200,138,149,223,193,160, 47,195,245,171,127,160,
-164,164, 0, 63,255,178, 63,196,199,199,167, 75,102,102,230, 5,171,211,203,178, 1,123,247,238, 5, 0, 72,165, 82,124,241,197,
- 23,240,242,242,130,189,189, 61, 52, 26, 13, 38, 79,158, 44,253,240,195, 15, 1, 0,241,241,241,176,181,181,181, 54,202,214,111,
-242,228,201,142, 22,139, 5,199,142, 29, 51, 72, 36,146,215, 79,158, 60,121,181, 89,179,102,242,206,157, 59, 59,110,221,186,181,
- 63,128, 3, 47,203, 96,189,192, 49,156,183,183,119,242,201,147, 39, 27,142, 28, 57, 18, 18,137, 4, 37, 37, 37,176,183,183,199,
- 15, 63,252,192, 43,149,202,141,127, 33, 73, 82,165, 82, 41,227, 56, 14,187,119,239, 70, 94, 94,222,128,242,254,136,179,103,207,
-254, 50, 52, 52, 52,240,193,131, 7, 79, 12, 6,195,188,172,172,172, 71,244,209, 68,161, 80, 40,175,168,193,226,121,254,227, 19,
- 39, 78,136, 56,142,195,250,245,235,113,243,230, 77,146,151,151,247,173,217,108,254, 74,169, 84,178,197,197,197,179,223,126,251,
-237,169, 11, 22, 44, 16, 68, 70, 70, 34, 58, 58, 90,208,176, 97,195,233, 0,126,172,100,124,162,106,154, 43,163,164,164,228,104,
-110,110,206,143, 60,255,180, 50, 20, 8, 24, 27,169, 84,118,180, 22, 51,245, 39,205, 42, 38,179,108,244,213, 87, 95,229, 59, 59,
- 59,243,241,241,241, 88,187,118, 45,119,235,214,173,125, 60,207,127, 86, 88, 88,168,179, 70,243,101, 80, 89, 83,202,178,183,183,
-206,158,221,184,229,224,193,252,176,183,222, 50, 10, 68,162,119,150,174, 90,245,105,137, 74,229, 5,134, 33, 46, 78, 78,105, 27,
-150, 44, 89,220,161, 91, 55, 67,252,133, 11,242,152, 83,167,196,174, 22,203,221,186,164, 51, 51, 51,243, 66,112,160, 31, 54,173,
- 95, 9,179,217,136,156,172,167,254,172,176, 72,141,154,204, 85, 85,154, 2,129, 64,245,198, 27,111, 40, 77, 38, 19, 51,122,244,
-104,113,126,126, 62, 2, 3, 3, 1, 0,165,165,165,248,227,143, 63, 16, 26, 26, 10, 0,136,141,141,173,248, 92, 91, 58, 21, 10,
-197,164,142, 29, 59, 34, 45, 45, 13, 9, 9, 9,123,179,179,179,243,188,188,188,246,166,165,165,141,111,221,186, 53,246,237,219,
-247,102,117, 6,171,174,223,145, 53, 6,171,154,188,191,181,127,255,254,143,162,163,163,251,204,154, 53,139,233,214,173, 27, 0,
-160,172,172,140,207,201,201,209,188,136,102,229, 52,177, 44, 11, 0,144,203,229, 26, 0,120,102,166, 70,190,168,230,203, 40,159,
- 84,147,106, 82, 77,170,249,223,160,249,143, 49, 88, 0,204, 28,199,225,194,133, 11,216,191,127, 63,107, 48, 24,134,229,230,230,
-222,170,244,255, 47,125,124,124, 14, 13, 31, 62,252,104, 98, 98,162, 40, 33, 33, 1, 0,216,186,156,220,104, 52,154, 24, 6, 4,
-255,154,140,146, 24,141, 70,211,139,124,215,149,127,249,245,215, 95,145,147,147, 99, 76, 75, 75,219, 73, 8, 89,151,147,147,147,
-249, 23, 34, 33,127,121, 20,225, 70, 66,140,175, 51,204,233, 5,157, 58,245,156,127,234,148,236,181, 25, 51,204,195, 70,141,154,
-205,153, 76, 22,161, 68,194, 75,109,108, 4,156, 76, 38,142,191,112, 65,190,102,218,180,122,122,163,241,248,214, 58,116, 28,175,
- 20,193,194, 27,111,205,128,190, 82, 4, 43,250,230, 67,212, 53,130, 37, 18,137,252, 44, 22,139,140,101,217, 44,158,231, 49,126,
-252,120,240, 60, 15,189, 94, 15,141, 70,131,226,226, 98,195,123,239,189, 39, 0, 0,165, 82,137, 94,189,122, 73,173,209, 13, 8,
- 8,104, 32, 22,139,113,252,248,113,136,197,226,205, 0, 32, 22,139, 55,159, 58,117,106,252,152, 49, 99,224,231,231,215,132, 97,
- 24,166,182,197,163, 43, 22,123,102, 16,244,236,219, 15,114, 11, 31,114,175,210, 98,207,247, 35, 34, 34, 0, 43,250, 93, 61, 79,
- 70, 70, 70, 14,128, 25, 62, 62, 62, 27, 63,250,232,163,143,219,182,109,219,106,225,194,133, 96, 24, 70,248, 87,111, 54,158,231,
- 97,177, 88,254,210, 20, 18, 20, 10,133, 66,249,223, 55, 88, 43,187,117,235, 54,147, 16, 34, 98, 24,230,155,231,204, 85,121,212,
- 36,222,219,219,251,243,134, 13, 27, 86, 44, 0, 93, 71,243,146,199, 48,204,114,129,128,249,248,233,239,117,159, 88,178,146,198,
- 39, 79,205,129,120,215,173, 91,183, 62, 77, 75, 75,203, 34,132,176,127,245, 2,189,140, 81,132, 0,176,157,144,148,209, 12,115,
- 98, 86,120,120, 84,159,105,211,208,172, 79, 31,123, 47,127,127, 78,111, 54,243,177,151, 47, 51, 87,247,238,149,196,156, 58, 37,
-214, 27,141,199,247, 19,146, 94,215,116,102,102,102, 94, 8, 12,240, 57, 57, 98, 88,191, 94, 1, 13,188, 0, 0, 79, 82,178, 81,
- 88,172, 62, 89, 23,115, 5, 0,169,169,169, 70, 0, 70, 79, 79,207, 97,187,119,239,222,251,204,244, 84, 44, 59, 3,192, 40, 18,
-137,130, 1, 64,163,209,248,255,254,251,239,219, 69, 34, 81,173, 38,246,254,253,251, 27, 22, 44, 88, 48,229,201,147, 39, 59, 51,
- 51, 51, 19, 1, 32, 45, 45, 45,209,219,219,251,235,156,156,156,169, 25, 25, 25,107,137, 21,238,227,185,197,158, 17,127,121,143,
- 28, 64,211,242,197,158, 95,116,173,193,231,174,103, 28,128,177,222,222,222,221,122,247,238, 61, 29, 64,238, 95,209, 51, 26,141,
- 22,163,209,104,225,121, 94,108, 54,155,137,209,104,180,208,199, 15,133, 66,161,252, 3, 13, 86, 86, 86,214,102, 88,177,152,179,
-181,251,213, 96,144,230, 50, 12,179,166,220, 44,253, 85, 13,179,217,252,178,214,111,187, 63,104,208,160, 58,237, 95,219, 14, 59,
- 9, 73,123,159, 97,182, 28,249,254,251, 22,199,215,173,243,230, 88,214,153, 1,136, 80, 42, 45, 50,153, 76,169,174, 22,203,221,
-186, 70,174, 42,243,248, 73,102,111, 0, 8, 14, 14, 38,143, 30, 61, 2, 33,228, 47, 45, 30,156,147,147,115,210,199,199,199, 77,
- 36, 18, 73, 25,230, 79, 82,198,103, 38, 12, 0,238, 49, 12,211, 4, 64,173, 17,158,140,140,140, 85, 0, 86, 85, 81,134, 86, 3,
- 88,109,109,186, 42, 22,123, 6, 4, 60,195,143, 8,235, 52,114, 47, 0,190,124,177,231,151, 73, 86, 86,214, 57, 0,231, 94,130,
- 97, 51,212,175, 95,127,221,242,229,203,167,222,189,123,247,215,204,204, 76, 3,125,252, 80, 40, 20,202, 63,208, 96,253,127,242,
- 50, 22,181,125,217, 11,227,190,140, 40, 72, 85,124,247,212, 64, 93,251, 59,175,103, 82, 82, 18,243,178,180,158, 25, 1, 67, 45,
-215,158,160,142,205,195,127,133,242,197,158, 43, 17,254,191,112,179,165,166,166,126,213,178,101,203, 21,153,153,153, 52,122, 69,
-161, 80, 40,175, 56, 2,122, 9, 40,148,255, 63, 94,214, 52, 20, 20, 10,133, 66,249,239,134, 1, 16, 85,213, 63,234, 50, 58,128,
- 97,152,168,186,158,184, 54,125,170, 73, 53,169, 38,213,164,154, 84,147,106,190,122,154,181,105,191, 50,163, 19, 43,119, 94,126,
-217, 27,128, 40,170, 73, 53,169, 38,213,164,154, 84,147,106, 82,205,127,218, 70,155, 8, 41, 20, 10,133, 66,161, 80, 94, 50, 34,
-122, 9,170,166,133,167,112,177,159,143, 91,171,138, 40, 31,207, 3, 0,248,103,179, 8, 84, 76, 39,192,243, 32,132, 32, 59, 95,
-117,251, 94, 30,249,252, 69,207, 23,226,205,212,115,147,203, 87,243,132,116,122,246,167, 11,234, 34,227,140, 56, 53, 81, 89,171,
-209,216,131,105, 44, 23,224, 35,158,160, 25, 0, 8, 24,220, 51,240,248,230,126, 46,185,255, 87,175, 7,195, 48, 76,152, 43, 38,
- 75, 21,202, 81, 14,142, 78, 65, 37, 37,133, 73,102,131,113, 79, 66, 1,126, 38, 47, 48,177, 83, 96, 61,166, 29, 79,240, 41, 0,
-129, 88,128,111, 31, 22,145,115,180,212, 81, 40,148,255, 39,254,234,188,118, 92, 85,143,201,191,168, 73, 39,200,251, 39, 27,172,
- 48, 55,102, 26, 24, 44, 4, 64, 64,176, 40, 62,159,212,105,189,180, 48, 47, 38, 74, 46, 20,110, 0, 32, 52,152,185, 89,132,199,
-197, 42, 43,115, 1, 58,203, 37,194,111, 1,240, 6,142,155, 20,159,109,125,123,108,184, 15,211, 71,196, 11,182,242,132,136, 57,
-158,108, 6,193, 17, 91, 9,174, 68,103,146, 58, 13,139,247,243,113,107,117,224, 70, 78,175,115,107, 63, 64,219,102,129, 32, 28,
- 11,240, 22, 40, 35, 63,194,153, 85,227,209,182,177, 31, 8,111, 1,120, 22,182,125, 87,160,111,184,195, 11,223, 28, 33,222, 76,
- 61,127, 23,183,184,245,235, 55,120,120, 5, 52, 97,120,214,140,196, 27, 39,199,126,248,241,252,238,225, 14, 76,184, 53, 38,171,
-185, 23,243, 86, 96,195,144,143,102, 44, 92, 41,244,244,242,181,225, 45, 70, 54, 55,229,126,196,119, 95,207,223,215,220,139,249,
-246,110, 54,217, 96,173,145,106,226,138, 41, 34,153,116,164, 66,110, 19,164,211,105, 30,113,102,203,158,112, 47, 81,159,111, 86,
-172,110,209,181,103, 63, 91, 78,147, 43,176,240,104,178,123,215, 78,255,239,127,252,169, 31,195, 48,131, 8, 33,124, 93,242,204,
- 19,124,252,112,203,228,126, 98,145,144,105,252,230,122, 33, 94,112, 42,132, 38,238,204, 24,134, 32,178,214, 39, 23,131, 75, 9,
-121,100,199,139,156,163,177, 59,243, 43, 67,208, 8, 12,246, 50, 4, 59,227,243, 73, 62,125,116, 80, 40,175, 22, 62, 62, 62,231,
- 50, 51, 51,187,189, 76, 77, 47, 47,175,118,217,217,217,215,232,213,165, 6,203,138,218, 23, 95,198, 63,206,112, 2,103, 70, 88,
-163,128,197, 0,234,100,176,228, 66,225,230,155, 73,121, 30, 96,205, 88,191,228,157, 93, 38, 11,192, 90,204,224, 88, 11, 56,214,
- 2,150, 53,131,179, 88, 64, 44, 70,204,255,237, 28, 96,210,160, 85,120,240,102, 0,158,214,158, 67, 76, 4, 91,111, 95, 62, 89,
-143, 49,169,177, 99,237, 87,239,101, 20,148,189,119,250, 94,118, 97,152, 59, 51, 55, 33, 31, 27,235, 98, 4,206,173,251, 0,219,
-126,255, 35,115,205,175,218, 7, 60, 33,168,103,175, 8, 25, 59, 32,222,119,203,193,115, 25,171, 55, 27, 30, 0,128,131,141, 52,
-100,194,189, 36,191,191,242, 37,184,201,229,171,127,254,233,123, 15, 79,103, 5,195, 94, 93, 6,150,227,224,235,223, 95, 56,119,
-250, 88,207, 47, 87,109, 88, 5,224,141,154,142, 15,117,103,154, 52, 10,108, 60,107,243, 31, 87,253,180,165,249,166,147,219, 63,
-125, 12, 35, 44, 30,222,141,197,139,191, 90, 41,156,247,201, 7, 51, 67,221,153,235, 15,242, 72, 66, 45,230, 74,208,216, 13, 7,
-191, 90,182,162, 89,247,190, 3,108,249,178, 2,161, 65, 91,214,104,253,111, 27, 22,134, 54,107,163,140, 12,247,145,228,239,153,
-202,232, 53,197, 48, 11,228,178,238, 97, 81,246,250,113,163, 45,235, 55,109,155, 14,224,187, 58,189,254,145,127,149, 61,158,127,
-241,183, 73,134, 32, 50,230,218,185, 41, 92,246, 77, 16,206, 2,112,230,138,159,224, 44, 32,252,211,159,109,167,254, 6, 0, 47,
-100,176, 4, 4,189, 78, 95,190,233,153,151,155,211,122,213,138,165,115,155,184, 49,199,192, 97,235,253, 98, 92,168,171,177,164,
- 80, 40,255,189,120,121,121,177,217,217,217, 47,181,101,199,219,219,187, 95, 86, 86,214,209,191,152,174,143, 0,188,245,236,215,
- 13,217,217,217,223,252,213,116,181,110,221,218,135, 16,226,241,236,217,159,123,243,230,205, 76, 90, 2,254,147, 6, 11,144,131,
-240,192,222, 33, 0,160,168,235,201, 8, 32, 7, 35, 4, 44, 90, 12,238,219, 19, 46,110, 30,128, 69, 7,152,117,128, 69, 15, 88,
-180,128, 69,143,194,156, 52,192,172, 5,158, 28, 3, 75,136,172,206,185, 50,170,129,135,123,208, 35,194, 15,174, 14,114,124, 48,
-184,137,203, 47,199, 31,110,216,112, 50, 49, 10,192, 40,171,210, 74, 8,218, 54, 13,194,154, 13,218, 7,135,110,231,247, 6,128,
-254, 45, 92,142,183,109,226,239,187,122,179,225,193, 31,247,138,251, 0, 64,223,112,135, 99,109, 66, 60,253,248,191, 16,221,229,
- 9,137,244,170, 31,196,112, 49, 63,131, 47,205, 68,105,169, 30,153, 41, 91,224,228,221, 82,192,241,232, 82,219,241, 10, 33,230,
-188, 63,111,185, 88, 87,154,103,226,205, 5,156,171,176, 68, 40,146,242, 12,178, 46, 24,203,120, 21, 55, 99,242,120,118,214,231,
- 75,230, 0, 24, 91, 99, 52,200, 13,211,191,253,118,117,211,142,173, 66,221,114,247,125,192,148,149,228,129, 21, 42,101,131,219,
-119,132, 99,112, 19, 62,239,252,183,140, 52, 32, 10,142,206, 1,200,186,186, 29,169,215,246, 51,157, 34,134,201, 54,238,144,140,
-171,206, 96, 5,187, 50,157,122,119,110,179, 43,192,207,203,147, 16, 30, 60, 79, 64,120, 14,111,142,232,133,185,187,159,128,227,
- 56, 12,239,221,169,199,242, 41,221, 9,207,243, 32,132, 71, 70,110,145,238,236,245, 7, 61, 30, 23,147,235,214, 68,166,154,183,
-235,214,233,222,237,107,161,150,135,135,209,106,236, 87, 15, 24,224,114,165, 50,215,233,206,137,141,161,192,111, 47,102,224, 24,
-134,105,236, 6, 46,245,248, 50,248,117,158, 44,252,121,199,113, 87,117, 65,214,132,125, 91,126, 26,177,246,231,159,183, 1,152,
- 74, 31, 35, 20,202,171, 65,118,118,246, 75, 55, 89, 87,175, 94,205,254, 43, 38,171,117,235,214,157, 1,124,157,157,157, 93,110,
-182,190,110,219,182,237,252,202,117, 85, 37,212,132,144,177, 55,111,222,188, 88,147,230,204,153, 51,189, 0, 52,184,117,235, 86,
-249, 57, 26,180,110,221,186, 65, 85,251, 42,149, 74,174,121,243,230,169, 43, 87,174,204,166, 37,228,239, 53, 88, 15,210,247,124,
- 16, 97,204, 41, 3,128, 7, 86,152,148, 63, 53,237, 25, 44,220,178, 77, 11,199, 47, 11,171, 95, 15, 26,173, 9, 39,111,165,130,
-227, 44,224, 88,246, 89, 36,139, 5,199, 90,208,187,185, 11, 58, 24,166,226,187, 35,137, 96, 57,254,171,154, 52,159,199, 76,248,
- 49, 45,162, 94,219,205,243, 68, 42, 19, 11,212,141,124,157,221,102, 13,111, 46,248, 96,112, 24,244,102,246,181, 38,238,204,217,
-132, 60,178,222, 42, 77,254,223,231,206, 36, 85,253,141, 99,107,205,123, 13,209,167,182,163, 7,244,180, 39, 70, 53, 44,133, 79,
-160,209, 89,240,164,200,130, 92,131, 10, 50, 38,199, 42, 77,158,160,153,143,183,167,242,202,174, 79, 82,156,133,165, 34, 55, 33,
- 43,145, 10, 88,112, 60, 17, 18, 85,130,177, 94,104, 79,113,121,191,172,154,210,169, 80,218,141,239,220,171,191, 67,250,246,201,
-140,162, 81,111,184, 69,248, 34,229,226, 38,228,223, 58,130,162,236, 84,198,222,160,130,187,115, 32,250,142, 29,133,111, 70,181,
-134,166, 84, 3, 97,206, 99, 7,169, 88,230, 88,157, 38,225, 48,246,219,229, 75, 60, 69, 66,193,211,235, 89,190,113, 22,232,141,
- 70,128, 99, 33, 23,241, 96, 72,249,255, 44,224, 44,102,101,179, 97,159,188, 3,224,122,109,121, 79,200, 35, 59,194,220,152, 72,
-240,150, 80, 98,209,131, 1, 46,199,231,147, 10,211,211,196,157, 25,211,178,247,196, 72,194,224,210,139,124, 71,225,206, 24,208,
-170,129,173,141, 77,233, 3,100,238,125, 15,143, 33, 39,238, 29,223,194,152, 55,167, 43,127,249,229,151,129, 12,195, 76,171,220,
- 7,237,239, 24, 94, 76, 53,169,230,255,170,166,131,131, 67,195,250,245,235,207,183, 88, 44,157, 37, 18,137,187,217,108, 6,207,
-243,185, 82,169,244, 82,106,106,234, 23,106,181, 58,249,191, 45,239,199,142, 29,179,218,100, 89,163, 41, 22,139,113,230,204,153,
- 71,214,154,172, 42, 22,160,223,186,119,239, 94,236,222,189, 27, 0,112,238,220, 57, 4, 7, 7,219, 84,117,108, 70, 70,134,205,
-240,225,195,183, 2,240,173, 73, 51, 41, 41,169,225,146, 37, 75,176,119,239, 94, 0,192,150, 45, 91,208,168, 81,163, 42,211,115,
-247,238, 93,225,103,159,125,214, 16, 64,246,223,253, 29,253,211, 13,214, 19, 63, 39,105, 4, 12, 28, 0, 60,169,235,201, 18,114,
-201,242,230,158,226, 62,103,246,254,216, 89, 46, 17, 96,193,250, 89, 25, 5,197,154,118, 34, 6, 60, 0,176, 4, 2, 39, 91,105,
-244, 87, 19,154,251,149,148, 25,112,232, 70,214,197,248, 60, 82,167, 80,104,124, 54, 57, 5,192,241, 95, 21, 36,211,104,194, 55,
-167,118,238,156,211,167,217,140,193,205,112,240,106,234, 12, 0,235,107, 45,228, 60, 15,194,179, 21,157,218,159, 58, 25, 30,224,
-217, 63,189, 49,240, 32, 79,255,198,215, 45,130,213,149, 97, 68, 37,110,232, 91, 79, 41,253, 97,202,148,183,237, 45, 5, 73, 40,
- 54, 73,144, 81, 98, 64,174, 94,140, 50,145, 27,178, 30,196,114, 2, 6,167,106,143,178,160,148,176, 6, 71, 39,169,173, 32,188,
-231, 59,222,165,199, 63, 45,145, 50,172,208,126,232,151,142,133,103, 86,166,178,218, 2, 45,195,160,214, 9, 46, 29, 28, 28,131,
- 13, 69,169, 66,117, 73, 33, 28, 61,194,208,231,181, 1, 88,212,191, 9, 52,165, 90, 20, 20, 71,147, 32, 79,123, 38,237,210, 54,
-204,235,219, 24, 69,121, 57, 48, 90, 0, 70,107, 44, 54,152, 12,101,213, 94, 71, 1,126,254,112,246,199, 99,252, 61, 93,109,202,
- 7, 11, 16,158, 67,243,198, 1,232,217,185, 45, 78, 93,190,130,155,177, 15,193, 63, 27, 44, 64,120, 30,153,249, 37,121, 6, 51,
-183,169, 78, 23,148, 99, 65, 44,134, 42, 13, 24, 94,160,105,176,169, 59,163,228,128,207,219, 5,217, 77,154, 51,192,223,206, 70,
-198,192, 96,225, 96, 48, 89,160,185,242, 3,156,235, 55,133, 82, 46,103, 34,160, 23, 1,160,147,135, 82, 40,149, 24, 57,114,164,
- 60, 47, 47,239,124,255,254,253,155,244,236,217, 83, 25, 25, 25, 9,173, 86,139,147, 39, 79, 66,171,213,250,251,250,250,250,159,
- 60,121,114, 88,187,118,237, 18,124,124,124,186,238,217,179,167, 46,125,100, 69,248, 87, 39,117, 30, 0,251,108, 41, 47, 33,158,
-118, 52,231, 9, 33,220,139,166, 93, 42,149, 34, 58, 58,250,165, 71,178,110,220,184,241,232, 69, 34, 89, 90,173, 86,226,233,233,
- 9,103,103,103,112, 28, 7,173, 86,139, 3, 7, 14, 64,173, 86,131,231,121, 40, 20, 10,124,249,237,122, 60,184,115, 30,215,175,
- 95,135, 90,173,150,212,166, 89, 88, 88,200,132,132,132,192,104, 52,130,101, 89, 24, 12, 6,156, 62,125,186,226,119,145, 72,132,
-143, 23,175,194,195, 91,231, 17, 19, 19,131,194,194, 66,134,150,234,191,223, 96,253,101, 56,142,157,251,203,230,157,209,115,167,
-142,194,244,209, 81,190, 95,252,184, 63, 42,161,128,108, 6,128, 38,174,204,132,113,221,130,252, 28,149, 98, 44,218,126, 11, 32,
-100,238, 95, 61, 95, 92, 17,121, 24,230,193,204,248,253,250,255,177,119,222, 97, 81, 29,109, 27,191,231,108,103,119,233,125, 1,
- 65, 80, 17, 81, 81,192,174, 17, 21,187,198,104, 52, 70,141, 45,177, 27, 53, 26, 75,140, 70, 99,236, 38,182, 24,141,154,166,177,
-183, 24,123,199, 6, 54, 84, 80, 80, 20,145,186,244, 94,182,239,153,239, 15,202,171,134,178,160,249,222,188,230,252,174,107, 47,
-216,118,239,156, 57,101,238,243,204,204, 51, 9, 33,243,135,250,195,203,217,162, 81,131, 6, 68, 20, 27,107,194,154,127,172, 1,
-214,114,113,227,190, 45,237, 78,131,101, 97,101, 46,246,129,209, 0, 43,185,184,113,239,102,150,167, 0,192, 74, 42,244,169, 44,
-210, 85,101,184,183,158,112,188, 84,204, 31, 47, 11,112,174, 55,186,127,119,179, 62,253, 7,153,201, 5, 6,100,223, 60,139, 2,
-129, 43,244, 54,238,208,232,115,144, 28, 23,107,188,112, 35, 58, 37,171, 80, 51,171,198, 98, 82, 92, 73,137,123,108,239,233,215,
-221, 58,235,248,151, 25,158, 99,118,215,103,192, 50,133,187, 6,166,203, 28, 90,155,221,122, 22, 87,196,210,191, 70,112, 94,165,
- 32, 63, 63, 94,111,132,179,202,200, 55,143,189,244, 43,230,245,110,142,220,156, 12,168,117, 6,228,171, 12, 58, 39, 43,137, 88,
- 19,247, 0, 26,157, 1, 90, 61, 11,129,149, 11,206,134, 69,102,177,122,253,169,170, 52, 99,179,232, 61, 0,242, 23, 95,107, 96,
- 79, 90,204,181, 48,187, 7,189, 10, 9,201, 74,236, 56, 17,230, 95,246,185,186,223,157,178,134,210,110,230, 23, 34, 87,132,162,
- 83, 93, 6,183, 55,113, 36,173,205, 36,194,239, 87,127, 54,220,183,157,183,141,152, 77, 14, 3, 97,117,144, 25,249, 80,137,140,
-176,116,243, 2,171, 45,164, 37,106,117,222,195,255,199, 37,130, 56, 56,254, 23,240,241,241,113,178,180,180,124,248,249,231,159,
-219, 12, 28, 56, 16, 71,142, 28, 65, 65, 65, 1,126,251,237, 55,172, 95,191, 30,139, 23, 47,134, 94,175,199,182,109,219,164,135,
- 14, 29,106,189,121,243,230,100,119,119,247,166, 9, 9, 9, 53, 45,168, 78, 0,136, 1, 8,202,218, 46, 2,128, 61,121,242, 36,
-250,244,233,131,147, 39, 79,178,101,175, 25, 9, 33,122, 74,169,166,174, 6, 75, 36, 18,225,209,163, 71,111,196,100, 9, 4, 2,
-200,229,114,136, 68, 34, 60,126,252,184,214, 38,203, 96, 48,240,146,147,147,145,159,159,143,238,253,251, 99,221,138, 21,232,210,
-165, 11,186,119,239, 14, 74, 41,206,159, 63,143,224, 14,205, 48,244,221, 32, 68, 71, 71, 67,175,215,155, 84,222,180,180, 52,164,
-167,167,163, 87,255,254,216,190,121, 51,218,180,105,131,198,141, 27,195, 96, 48, 32, 36, 36, 4,131,123,118,128,228,189, 96,196,
-196,196,112, 7,245,255,138,193,122,144, 65,111,248,218,147,227, 31,246,108,221,175,127, 71, 95,108,223,119, 97,153,175, 47,217,
- 11, 0,182,230,226,165, 35,187,120, 33, 42, 49, 23, 23,238, 41,143, 71,101,210, 55, 50,251,130, 53,194,206,214, 66, 10,240, 68,
- 80,233, 88,131,197, 51,212, 56, 48,153,165, 20,210,119,230,226,163,254, 81,110,109,124,221,220,202,103, 17,202,251,172,197,168,
-200,167,245, 90, 53,118,170, 7,163, 30, 48,234, 97, 49,116, 55,240,141,172,198,114,116,244, 20,159,155, 59,235,179,246,189,223,
-251,192, 76, 36,181,132,177, 32, 9,250,180, 72,100, 63,185,130, 98,105, 35,164, 37, 60,195,254, 51, 55,243,159, 36,103, 23, 48,
- 12,206,166,231,107,102,199,230,208,162,154,116,213,122,172,248,234,203, 89,125,247,239,221,103, 46,246,234, 72, 98, 55,245,201,
- 23,241, 13, 98,251,250, 1, 76,137,196,142, 46,255,109,159, 69,177, 22, 43,107,210, 41, 41, 46, 56,124,254,236,233,161, 13, 61,
- 59,154, 63,191,125, 2, 42,181, 6, 26, 61,208,180,117, 16,140, 70, 42, 34, 12, 97, 45,120, 60,146,145,157, 11,162, 55,166, 95,
-189,255, 60,245,218,253,103, 60,141,121,205,218, 47, 29,116,132, 55,173,127, 80, 75, 64,175,194,187,239, 52,199,186, 93, 23, 62,
- 5, 48,230,245,118,114,105, 4,139, 2, 29,155, 58,144, 31, 1,116,188,243,199,122,159,192,247,102,160, 54, 17,172,102,246,164,
-119,179, 6,138, 95,215, 45,157,107, 99,235,218,136, 71, 88, 61,168,147, 31, 80,144, 76, 73,114, 24, 44, 93,218,192,168,232,128,
-109, 27,191, 45, 98, 89,186,183, 46, 41, 42, 56, 56,222,102,212,106,245,225, 85,171, 86,217,244,235,215, 15, 0, 80, 84, 84,132,
-176,176, 48,252,244,211, 79,144,201, 94,190, 78,246,233,211, 7,148, 82,155, 69,139, 22, 29, 6,208,174, 42,205, 14, 29, 58,244,
-223,184,113,163,178,101,203,150,207,202, 76,150, 16, 0,243,224,193, 3, 38, 41, 41,137, 88, 91, 91, 83,133, 66,161, 87, 42,149,
- 44, 0,227,216,177, 99,121,114,185,188, 97, 81, 81,209,229,186, 26, 44,145, 72,244, 70,198,100, 9, 4, 2, 16, 66, 32, 18,137,
- 32, 20, 10,145,146,146, 82, 43,147,101, 48, 24,248, 39, 79,158,196,157, 59,119,176,184,101, 75,124,230,226, 2, 27, 27, 27,132,
-132,132,128, 82, 10,153, 76,134,156,156, 28,236,221,187, 23, 93,187,118,133,193, 96, 16,154,162,123,240,224, 65,132,135,135,227,
-155,192, 64,124,102,105, 9,185, 92,142,243,231, 75,123,253,196, 98, 49, 18, 18, 18,112,254,252,121, 4, 5, 5,113, 7,245,223,
-109,176,130, 8,225, 19, 71, 56,233,180, 42, 80, 3, 5, 8, 20,190,190, 68, 24, 21, 69,117,181,253, 81,134,193,151, 27,119, 28,
-239,187,118, 70,127, 50,126,128,191, 98,201,175,151, 38, 1,192,199,239,123,187, 72,197,124,108, 56, 26, 69, 25, 6, 95,190,137,
- 13,244,245, 37, 66,134,193,164,238,109, 26, 67,153,167, 69,172, 50,239, 98, 20,165, 38,117,233, 92, 88,251, 17,118,254, 25,146,
-180,126,167,250, 17,165, 20, 86,114,113,227, 81, 17,177,245,126, 61, 25,158,248,221,126,245, 35,202, 82, 88, 73, 5, 62, 99,162,
- 59,212, 56,139,176, 85, 61,225,248, 47,230,206,238, 48, 96,204,231, 18,195,163, 3,208,198,158, 1,171, 83,161, 64, 39, 68, 30,
-207, 9,201,137,137, 88,190,237,120, 82, 65,177,118,232,131,140,218, 25,203,152, 44, 90,228,107, 79, 6, 46,255,122,254,185, 21,
- 75, 23,201, 85,207, 66,138,120,196,160,226,121,116,230, 47, 93,188,150, 20,106,180, 31,196,230,208,194,154,116, 52,230, 88,185,
-234,187,141,125,199,141, 24,244,200,187, 81,103, 91,163, 50,206, 86, 93, 80,144,177,251,116,184, 83,217,157, 33, 1,128,216,228,
-108,100,230, 23, 27,140, 6,253,101,115, 1,150, 60, 52, 37, 26, 88,134,151, 35,177, 31,216,201,111,184,189,185, 16,170,162, 60,
- 56,152, 11,208,179, 77,131,225, 94,142,100,238,179,116,154, 89,119,131,165, 7,213,171,112, 99,101, 87, 31,106,212,251,192,168,
-135, 46,226,247,218, 71,194, 8, 62,155,250,142,220,194, 90,251,156, 65,177, 12, 48,179, 3,177,112, 7, 44,235, 19, 65,147, 15,
-160,124,246,208,240,233,240, 17,217,113,241,201, 63,219,153, 97, 13,119, 9,225,224,120,153,132,132,132,145, 95,124,241,197,181,
- 54,109,218, 56,218,217,217,161,121,243,230,248,243,207, 63,241,249,231,159, 87,124,166,101,203,150,160,148, 34, 39, 39, 7,171,
- 86,173, 74, 83, 42,149, 35,171,211,124,248,240,225,163,157, 59,119,190,227,235,235,171, 19, 10,133,121, 0,196,121,121,121,146,
-156,156, 28,162, 86,171,193,178, 44,107,105,105,105, 84, 42,149,250,161, 67,135,106, 66, 67, 67, 27, 20, 23, 23, 39,188, 78, 4,
-171, 85,171, 86, 15,242,242,242,242, 25,134,121,237, 20, 14,229,230,170, 89,179,102,246,197,197,197, 44,128,220,186,164,112, 48,
- 24, 12, 8, 12, 12,196,153, 43,119,113,242, 66, 40, 10,148,143, 49,105,220, 72, 52,111,222, 28,103,206,156,169,243, 62,107,209,
-162, 5, 78,159,191,134,107,119,238, 35, 33, 38, 2,159, 78, 26,135,166, 77,155,226,244,233,211,220, 1,253,119, 27,172, 38,246,
-164,133,162,161,232,247, 69,189, 27, 52, 17,116, 95, 4, 34, 48,195,129, 70,167, 59,124,185,124,211,163,230,142,100, 68,100,122,
-205,179,189, 94,138, 98,165,211,135, 77, 29,200,158,251,209, 62,195,223,109,227,134,237,127, 74, 23, 2,192, 7,157, 60,113,235,
- 73, 38,110,198,100,236,121,152, 65, 31,190,238,198, 53,119, 36, 82, 80,236, 89, 53,109, 64,144,187,171, 19,126, 58,114, 13,132,
-224,176, 73, 13, 45,165,180,141,175, 59,214,239,124,117,198,160, 83,189,239,246,171, 31,157,121, 80,208, 27, 0,122, 52,145,157,
-106,213,192,186, 94, 77,145, 12, 51, 17,127, 66,239, 65, 31, 73, 12, 49,127, 2,241,231, 65, 12, 26,168,116, 44, 82,179, 10, 81,
- 98,233,134,144,176,251,170,124,181,118,198,195,140,186, 69,237,162, 50,233,179,150,206, 36,177,168, 88,229, 44,181,111,160,230,
- 49, 44, 91,164,161,184, 21, 21, 95,240, 48,149, 62, 54, 69, 35, 54,150,106,219,185,146, 78, 63,238,216,255,149, 64, 40,250,128,
- 71, 64, 28,172,100,246, 63,174,253, 6,230,230,114,176,218, 34,160, 56, 19, 3,167, 44,207,140, 76,209,121, 2,128,183, 29,145,
-191,227, 37,220,193,103, 72,242,197,167,218, 5, 53,253, 6,209, 99,226,136,158, 45, 5,172,182, 24,211, 86,237,195,214,185, 3,
-240, 81,183, 38,130, 19,215, 99, 38, 2, 88, 82,215,125, 77,141, 6, 80,189, 10,237,230, 95,121, 68,128,107, 20,232,120,103,255,
- 82, 31,224,174,201, 26, 1,132, 8,248,206,164,137, 95, 61,153,144, 77,190, 14, 54,249, 58,229,185,117, 0,169,247, 14, 33, 78,
-129,244,251,213,139,139,183,111,255,233, 44,203,224,235,154, 82, 94,112,112,252, 91,161,148, 62,179,178,178,234,213,167, 79,159,
- 11,103,206,156,177,105,214,172, 25, 0,160,124,198, 90, 96, 96, 32,188,189,189,145,158,158,142, 15, 63,252, 48, 43, 53, 53,181,
- 23,165,180,218, 49,189,133,133,133,113, 7, 15, 30,116, 44, 46, 46,110,185, 96,193,130, 12,119,119,247, 2,181, 90, 77,242,242,
-242, 88,131,193, 0,107,107,107, 81,203,150, 45,209,190,125,251,162,176,176, 48,143,164,164,164, 66, 0,241,117, 41,255, 39,159,
-124,130,195,135, 75,155,137, 55,145, 23, 75, 40, 20, 34, 56, 56,216, 37, 52, 52, 52, 5, 0,234,146, 23,235,197,230,229,254,253,
-251,184,124, 55, 25,124,173, 10,162, 76, 37,110, 28, 57,136,254, 19, 38,195, 96,168,251,104,133,251,247,239,227,143,243, 55, 32,
- 19,243,241,248,241, 67, 28, 60,120, 16,147, 38, 77,122, 45, 77,142, 26, 12, 86,131, 6, 68, 36, 46,194,162,158,129, 46,115, 62,
-232,216,128,167, 47, 80,130, 53,178,224, 9, 0, 7, 59, 11,252,254,251, 30,207, 61,251,246,133,181,112, 17,108,100, 13,134, 47,
- 35,211,105, 73, 45,126,123,209,218,125,215, 62,248,125, 86, 16,127, 82,111, 31, 27, 0, 16,242, 25,108,248,243,161, 1,192,162,
-215,217,168,118,174, 68, 82,164,199,120, 39, 91,203,133, 95,124,210,215, 38, 40,208, 27,151,111, 62,192,198,131, 97, 87, 68, 25,
-216,105,242, 65,205,234, 95,157, 2, 91,233, 44, 66,176, 53,143,167, 52, 26,169,147, 80,102, 13, 93,252, 37, 64,167,134, 90,163,
- 67, 82,182, 17, 73, 57,106,240,165, 66,220,137, 73, 86,217,166,225,120, 93,183,153, 16, 66, 58,122, 73, 20, 95, 45,251,206, 85,
-173, 42, 50, 20,228,102, 25,132,162, 27, 2,169,153, 56,181, 54, 58, 97,201, 84,221,217, 83, 24, 0,176, 60,145,132,150,204,159,
- 57, 90,150, 18,117, 6, 13, 25, 37, 8,165, 48,107,210, 23,230,102, 60, 97,167,250,194, 68, 0,168,239,100, 41, 90,245,245,231,
-150, 51,230,126, 93,227, 24, 47, 95, 66,132,205, 91, 57,205,104,230,110,141, 43,225,143,112, 37, 50,225,225,149, 59,143,155,118,
-105,174,128,183,171,213,116, 95, 66, 86, 70,209,218, 71, 68, 75,119,140, 1,208,171, 43,102, 17,250, 58,146, 97,173, 62, 88, 80,
-233,236,193,170,168, 15,176, 49, 70, 10,194,227, 1,132, 41,157,209,152,116, 29,124, 43, 47,186,103,255, 31, 37, 63,253,180,243,
-155,168, 76,202, 69,173, 56, 56,106, 32, 47, 47, 47, 66, 42,149,246,244,243,243,251,109,218,180,105,230, 35, 70,140, 80,140, 27,
- 55,142, 1,128,244,244,116,118,253,250,245,202,239,191,255, 62, 63, 43, 43,107,140, 78,167,139, 52,229,134,151, 16, 18,250,243,
-207, 63,103, 94,189,122,181,105,235,214,173,197, 1, 1, 1,172,181,181, 53, 95, 44, 22, 27,181, 90,173, 58, 38, 38,198,248,236,
-217, 51,231,188,188,188,167, 0, 98,235,210,125,175, 80, 40,192, 48,204, 18, 87, 87,215,175,148, 74,101,179, 55, 49, 6,171, 97,
-195,134, 10, 0, 79, 93, 92, 92, 26,214,182,123,240, 47, 13, 54,159,143,220,220, 92,148,164, 61,132, 36,249, 9,252,100, 12,124,
-173,229,176,176,176,120, 45, 51,148,159,159, 15, 20,167,224,218,181,251,128,193, 0, 75, 75, 75, 88, 90, 90,114, 6,235,239, 50,
- 88, 77, 29,200, 36,107, 17,214, 79,232,219, 64, 88,191,158, 43, 52,201,119,112, 63,169, 8, 95,182,109, 29,197, 19,155,171, 39,
-140, 28, 16, 56,104,176, 7,130,218,183, 34,245,157, 45,167,175, 92,187,101, 74, 83, 71,242,249,195,116,186,193,148, 31,126,152,
- 65,227,154, 56,144,159, 46, 69, 36, 79,116,149,170,192,178, 20,151, 34, 83, 17, 25,159,251, 83,116, 6,141,171,205, 70, 52, 85,
-144, 96, 62,152,125,148, 82,137,165, 76, 86,216,178,133,143, 93,112,187, 22, 76,175,206,129, 16,242,128,107,183,238,227,179,181,
-135,111,176, 44,237, 27,110, 98,247, 96,233,140,193,151,141, 83,233,140, 65,253, 75, 51, 6, 41,165,180,116, 22, 97,245,195,186,
-120, 60,146, 86,146,112,219, 73, 96,219, 8,170,216, 75,136,207,101,145,144, 81,136, 2,190, 19, 52, 41, 41, 0,101, 19, 67, 40,
-173,243,209,108,103,103,231,224,233,235,221, 96,211,142,131,208,149,228, 35, 46,228, 55, 20,229,166, 98,233,143,127, 54,112,117,
-117,237,156,156,156,124,185, 22,102,205,251,194,241, 61, 14,160, 0, 79, 32,198,137,205,251,145,101,107, 6, 59,169, 16,172, 42,
- 19, 19,102,140,176,236,221,125,132, 37, 0, 36, 60,190, 7,119,169,202, 36, 93,157, 45, 6,125,208,165,177, 21,244, 42,236, 56,
-125, 79,205, 0,189,118,158,125, 24,219,197,199, 74,242, 65, 71,119,235, 37,202,188,247, 81,199,100,160,229, 17,172,138,136, 94,
- 29,102, 15, 30,160,212,216,196,158,196,238, 11,205,144, 13,238, 30, 32, 21,242, 9,161, 69, 41,160,102,118,216,178,227, 64,145,
- 72,143,109,220, 37,131,131,195, 52, 74, 74, 74,194, 9, 33,205,103,207,158, 61,108,254,252,249,239,200,100, 50, 79, 0, 40, 46,
- 46,142,211,235,245, 87, 0,236,169,205,108,191, 50,195,244,148, 16, 18, 23, 27, 27,235,184,107,215, 46, 43, 0,146,178,183,213,
- 0,242, 0,164,191,206, 12,194,114, 51,165, 80, 40,190,122, 83,245, 80,110,166, 92, 92, 92, 26,214,229,251, 60, 30,207, 72, 8,
- 1, 33, 4, 98,177, 24, 87,175, 94,197,144,190,221, 17,125, 34, 15,205,172,228,104, 61,102, 2,246,157, 59, 7, 30,143, 7, 66,
- 8,120, 60, 94,173,218, 17, 62,159,143,107,215,174,225,163, 15, 7, 67,204, 7, 44, 45, 45, 49,123,246,108, 28, 61,122, 20,124,
- 62,183,154,222,223, 19,193, 34, 88,114,238,183,229, 66, 24,245, 56,246,219,183, 56,254,160, 72,251, 56, 19, 95, 54,206,196,250,
-131, 40,100, 51,215,238,156,120,238,218,131, 53, 99,135,246,147,118,237,210, 29, 93,131,186,240,155,182,234,188, 16,192,134, 23,
- 26,234,224,234,114,101, 24, 89,124,179,237,244,163, 9,251, 66, 98, 8,116,133, 24,218,163, 21, 53,178,248,166,134,198,255, 47,
-154,150,102,242,125,215,194,194,172,161, 43, 66,252,189,139, 18, 15,207, 6,128, 81,135,167, 79,159,224,251, 29, 71,216,144, 91,
-143,127,215, 26, 48, 45, 54,135, 22,155,170, 89,234,168, 12,176,148,137, 26,247,110,102,121,138, 5,133,149, 84,232, 67, 89, 35,
-172,164, 2,159, 30, 77,100,167, 40,165,212,220, 76,224, 67,141,250, 26, 53, 85, 90,195,214, 29,191,252,244,221,199, 31,127, 44,
-203, 74, 78,131,178,224, 1,138, 68, 46,208, 75,221, 16,123,239,138,170, 68, 99,168,177,241,174,174, 62,179,178,178, 50,194,111,
-230, 96,223,143, 43,160,215,106,144,145, 92,234, 81,149, 89, 5,176,176,115, 9,171,141,166,206,192,230, 15, 26, 49, 94,104,102,
- 14,179,143, 6,245, 19,197,102,107,224,175, 48, 47,189,200, 21,101, 34,250,252, 53, 4, 21,151,250,181,103, 73, 12,220, 91, 40,
- 76, 42,167,185, 68, 56,173,119,128, 11,226, 18, 83,113,245, 97,202,142,103,217, 84,233,101, 75,118,196, 42,243, 38, 14,104, 91,
- 15,235,142, 70,125, 90,149, 41,170, 74,211,215,145, 12, 3,208,177,116,144,187, 10, 20,232,232,235, 72,134,153, 50,115,176, 50,
- 77,190, 16,195,191, 59,149,176,224,192,237,172, 1,115,134,119,178,104,223,190,143, 8, 6, 45, 10, 85, 26,125, 84, 46, 45,120,
-157,125,244, 26,209, 73, 78,147,211,252,159,212, 44, 51, 59,191,151, 61,222,164,166, 18,175,228,101,122,221,109,127,177, 59, 80,
-169, 84,242,203,162, 87,213, 14,114,175, 73,243,197,238,192,148,148,148,147,101,209,171,106,163, 88,149,104, 42,219,180,105, 99,
-211,191,127,127, 24,141, 70, 60,121,242, 4, 9, 73, 73, 8,158,248, 41,172,172,172,112, 37, 34, 2,143, 31, 63,198, 87, 95,125,
- 5,150,101,113,227,198,141,228,154, 52, 5, 2,129,174, 69,139, 22,194,247,222,123, 15, 6,131, 1,207,158, 61, 67, 74, 74, 10,
- 62,251,236, 51, 88, 90, 90, 34, 60, 60,188, 66, 83,163,209, 32, 46, 46, 78,247,255,113, 44,253,123, 12, 22, 96,132, 81,143,252,
-115,139,176,225, 42,116, 58, 61,124, 30,102,208,231, 47,188,191,197,207,150, 28,139,120,240, 40, 46,252,122, 87, 17, 50, 34, 75,
-191, 83, 11, 98,178,104,106, 43, 55,126, 33,116,133, 22,120,118, 10,207,211, 11,139, 98,178,104,106,109, 55,130,178, 70, 2, 93,
- 9,144,122, 7,161, 87, 46, 35,228,198,125,220,142,124,100, 12, 13,143,217,199,176,248, 38, 42,139, 62,169,181, 38,165,144,247,
- 93,135,209,145, 79,235,181,242,118,172, 7,163, 1,148,213,195,114,232, 30,140,137,106, 95,175,149,151, 85,189,210,200,149, 30,
-214,159, 92, 4,190,147, 84,171,119, 59, 81,183,173,163,167,248,253,194,188,236,182,221, 58,183,147, 89, 54,233,141,172,167, 49,
-120,114,255,154, 42,252, 65,108,232,237, 68,221,107, 69, 71, 92, 92, 92,222,233,214,185, 49,134, 78,248, 2,186,146,124, 60, 11,
-249, 5, 69, 57,105,184, 26, 38,199,163,130,130,118, 0, 76,142, 96,133, 38,232,155, 2, 64,199,250,194, 68,115,104,156, 70,246,
-235, 15, 49, 81,131,213, 20,128,148,100, 33, 54, 69,155,255,254,143, 73, 70, 0,144,138, 9, 95, 70,243, 45, 76,209,245,117,183,
-109, 36,229,233,177,243,220, 67,176,108,233, 50, 75, 44,139, 45, 59, 47,198, 78,252,230, 35,127,248,214,179,110, 65, 8, 33,181,
- 9,237, 19,138, 78,183,247,125,237,163,190,176, 16, 96,117,184, 54,221,198,167,211,134,156, 78,117,141,132, 69,166,208, 20, 0,
- 19,155, 40,200,214,233, 27, 78, 47, 12, 60, 23,213,113,214, 39, 3, 44, 64,185,133,209, 57, 56, 56,254, 43,145,192, 9,115,231,
-206,221,202,227,241,236, 1, 16, 74, 41, 52, 26, 13,255,199, 31,127, 20, 24, 12, 6,134,199,227, 25, 37, 18,137, 33, 60, 60, 92,
-207,178,108,166, 78,167,155, 80,147,166, 86,171,141,221,180,105, 83, 3,189, 94, 95, 49,227, 80,163,209,224,151, 95,126,129, 70,
-163,129, 88, 44,134, 92, 46,199,179,103,207, 64, 8,209, 25,141,198, 88,110, 79,188, 73,131, 69,241,117,135,143, 22, 45, 2, 64,
- 64,177,248, 21,115, 5, 0,136,200,166,202,166, 14,228,179,166,173, 58, 47, 42,255, 78,109, 11,160, 54, 26, 7,183,106,238,189,
- 23, 0, 52,212,248, 81, 93, 54,162, 64,163,250,160,101,171,118,251, 88, 74,249, 6, 74,127, 98, 88, 28, 82, 27, 16,109,202,204,
-185, 42,239, 60, 50,242,194,203, 23,112,102, 65,255,211, 45, 88,150,142,129, 82, 74, 43,186, 5,191,149, 32, 43, 95, 83, 99, 30,
-167,107,113,154,238,173,234, 9,199,159,189,126,111,130,209, 72,157,120, 60,146,166,210, 26,182,190,174,185, 42,187,251,186,236,
-235, 64,206, 70,180,112,236, 97, 39, 45,139,106,149, 0, 89, 37, 56,155,156, 81,120,185, 46,154,185,197,250, 1,243,215, 31,253,
- 83, 36,224,241, 65,105,105, 34, 80, 74,161,214, 25,115,202, 77,152,159, 45, 81,204,254,195,176,151,199, 35, 9, 53,233,221,124,
-156,186,110,232,202,243,159, 63,140,207,253,233,121, 46,125, 0, 0,207,115,233,131,134,182,100, 97,108, 90,225,231, 15, 18,114,
-191,173,237,184, 9, 74,112,181,213,208, 69,127,121,237,117,235, 51, 90, 73,239, 3, 24,216,212,129,116, 31, 58,235,251, 89,132,
-128, 91, 38,130,131,227, 95, 68,121, 20,139, 97,152, 37,111, 74,179, 60,138, 5,224,105, 45,190,115, 19, 64,243, 55,185,109,225,
-225,225,217, 0,178,185,189,252, 95, 50, 88, 15, 51,232, 22,152,176,152,179,169,159,171,242,251, 74,122, 30,128,237,235,108, 68,
-153,134,205,155,172,152,136,116,186,240,239,168,240, 50, 51,245,183,140,229,137,202,160, 61, 1,160, 81,163, 70,244,233,211,167,
-160,148,190, 86,246,221,232, 76,122, 31,175, 44,185, 80,153,201, 6,208,201, 20,189,152, 44,250, 13,240,215, 46,224,167,217,116,
- 41,128,165,117,218,230, 58,102,106, 55,249,216,202,160,231,128,154,179,233,115,112,112,188,157, 38,235, 77,107,190,238,194,207,
- 28,111,129,193,226,248,223,229,201,147, 39,220,178, 6, 28, 28, 28, 28, 85, 99,252, 27, 52,185,164,195, 28, 47,193,112, 85,192,
-193,193,193,193,193,193,193,241,102, 33, 0,130, 43,181,226,181,152, 29, 64, 8, 9,174,181,213,175, 65,159,211,228, 52, 57, 77,
- 78,147,211,228, 52, 57,205,183, 79,179, 38,237,183,102,118, 34,125, 97,240,242,155,126, 0, 8,230, 52, 57, 77, 78,147,211,228,
- 52, 57, 77, 78,147,211,252,183, 61,184, 46, 66, 14, 14, 14, 14, 14, 14, 14,142, 55, 12,103,176, 56, 56, 56, 56, 56, 56, 56, 56,
- 56,131,197,193,193,193,193,193,193,193,193, 25, 44, 14, 14, 14, 14, 14, 14, 14, 14,206, 96,113,112,112,112,112,112,112,112,112,
-212, 29, 82,203,149, 73, 56, 56, 56, 56, 56, 56, 56, 56, 56,106,128,139, 96,113,112,112,112,112,112,112,112,112, 6,139,131,131,
-131,131,131,131,131,131, 51, 88, 28, 28, 28, 28, 28, 28, 28, 28,156,193,226,224,224,224,224,224,224,224,224,224, 12, 22, 7, 7,
- 7, 7, 7, 7, 7, 7,103,176, 56, 56, 56, 56, 56, 56, 56, 56, 56,131,197,193,193,193,193,193,193,193,193,241,223, 55, 88,132,
-144, 96, 78,147,211,228, 52, 57, 77, 78,147,211,228, 52, 57, 77,206, 96,113,112,112,112,112,112,112,112,112,112, 6,139,131,131,
-131,131,131,131,131,131, 51, 88, 28, 28, 28, 28, 28, 28, 28, 28,156,193,226,224,224,224,224,224,224,224,224,224, 12, 22, 7, 7,
- 7, 7, 7, 7, 7,199,127, 9, 2,160,210,153, 0,148,210,243, 38,139,212, 97, 54, 65, 77,250,156, 38,167,201,105,114,154,156,
- 38,167,201,105,190,125,154, 53,105,215,198,127,252,163,161,148,254,109, 15, 0,193,156, 38,167,201,105,114,154,156, 38,167,201,
-105,114,154,255,182, 7,215, 69,200, 97,106,148,210,145, 16,226,200,213, 4, 7, 7, 7, 7, 7, 71,205,240,223,164,152, 15, 33,
-109,214,188, 83,111, 81,159,203, 9,189, 76,104,176, 25,252,103, 12, 24, 91, 26, 76, 43,181,197,175, 97, 2,222,184, 38, 7, 64,
- 8, 89, 65, 8,230,148,253,191,154, 82,250,197,219,184,157,115,230,204, 25,236,239,223, 10,214,146,116,180,242,122, 2,228,238,
- 1,172, 63,192,130, 51, 93,208,202,191, 3,174,220, 77,194,149, 27, 15, 17,182,185, 63, 62,153,177, 8,106,181, 14, 89, 89, 74,
-220,191,118,250,224, 91,180,175,219, 10, 4,130, 15,172,173,173,205, 51, 50, 50, 46, 0,248, 19,192,187, 14, 14, 14,221,114,115,
-115, 11,245,122,253,126, 74,233,141,186,104,191,211,146,204, 21, 9, 5, 99,213, 58,253,170,107,247,232, 47, 65, 1,196,214,192,
- 98,165, 68,200,239,164,209, 26, 86, 95,189, 79,127,170,101, 89,201, 43,209,248, 90,159,235, 7, 9,225,153,250,217, 63,172,173,
-189, 45,228,242, 11, 18, 30,239,121, 74, 73,201,136,193, 25, 25, 73,131, 41, 53,190, 77,231, 64,215,174, 93, 71,243,120,188,101,
- 0, 96, 52, 26,191,188,120,241,226,111,111, 66, 87,161, 80, 12,163,148,202,202,246, 91,177, 82,169,220, 99,234,119, 3, 2, 2,
- 18, 0,212, 43,123,154, 24, 30, 30,238,110,202,123, 28,181,227,206,157, 59,212,221,221, 29,205,155, 55,127,156,150,150,246, 61,
-165,116, 11, 87, 43,255, 16,131,213,152,144,134, 19,251,180, 63,215,227,253,158, 50, 83,140,144,139,139,203, 74,123,123,251, 73,
- 37, 37, 37,106, 0,148,199,227,209, 38, 77,154,128, 16,130,242,235,166,209,104,204,124,244,232, 81, 51, 83,205,213,155,210,244,
-246,246,190,195, 48,140,235,139,215,239,154,254,103, 89, 54, 57, 42, 42, 42,176,166,114, 58, 59, 59,247,100, 24,102, 94, 77,159,
- 99, 89,118,101,106,106,234,153,234, 62,211,188,121,243,187, 50,153,204,145, 97, 24, 82,213,103, 94,108,115, 12, 6, 3, 45, 41,
- 41, 73,127,248,240,161,127, 45, 26, 49, 71, 66, 48,135,101, 41, 3, 0, 12, 67,230, 90, 91, 91,239,206,205,205,141, 42,127,191,
-236,119,210,107,115,188,184,184,184,140, 2,240, 57, 0, 10,224,187,148,148,148, 29,181,249,126,163, 70,141,238, 8,133, 66, 87,
- 30,143, 71, 94,221, 39,149, 61,103, 89,150,106,181,218,228,199,143, 31, 87,185,143, 66, 66, 46, 31, 88,189,122,245,221,109, 63,
-255,228,223,162,229, 96, 48,210, 46,208, 81, 11,220,141,215,160, 85, 11, 2,202,178, 80, 23,100,128,101, 89,148,168, 53,184,112,
-228,151,187,245,234, 55,240, 71,233, 88,198,183,193, 92,245, 26, 53,106,212,242, 85,171, 86,217,137, 68, 34,102,255,254,253,237,
- 62,251,236,179,177,235,214,173,115,249,224,131, 15,204,181, 90, 45, 59,119,238,220,119, 8, 33, 95, 83, 74,143,214, 70,187,125,
- 75,210,182,113,125,231,175,166,142,232,138,207, 87,236,157,218,177, 57,201, 50,147, 9,183,188,223,169,129, 85, 83, 79,107,124,
-189, 53,116, 26,128,159,106, 81, 86,226,230,230,214,210,209,209,177,190, 74,165, 50, 2, 64,211,166, 77, 41,143,247,178, 95,210,
-233,116,186, 71,143, 30,157,124,221,186,249, 92, 34,105,211, 73, 38, 61,247,197,196,113,102,185, 89, 89,142, 91, 15, 30,142, 56,
-232,224,224, 55, 24,136,127,155, 26, 4, 30,143,183,236,244,233,211,206,148, 82,244,236,217,115, 25,128, 55, 98,176, 40,165,178,
-212,212,212,242,107,160,172,150, 95,175, 23, 30, 30, 94,110,168,234,213,226, 61,147,105,215,174,157,196,160,211, 77,230, 49, 76,
- 15, 10, 52, 71,233, 73, 29,105, 4,206,241,249,252, 31,194,194,194,212,111,187, 25, 56,119,238, 28,198,143, 31,143,200,200,200,
-198, 39, 79,158,220,172, 80, 40,166,164,166,166,118,161,148,102,114, 86,233,191,104,176,154, 18,226,208, 47,160,241,213,201, 31,
- 13,150,178, 7,215, 19,140, 94, 80,173, 17,114,118,118, 94,213,169, 83,167,177,187,118,237,146,253,241,199, 31, 50, 15, 15, 15,
- 8,133, 66,240,120, 60,240,120, 60, 48, 12, 3, 62,159,143,119,223,125,215,164,134,235, 85,205, 11, 23, 46,200,188,189,189,255,
-210,200, 50, 12,131,222,189,123,215,168,201, 48,140,235,221,187,119, 29, 36, 18, 73,133, 73, 97, 89,246,165,199, 11,253,208, 48,
- 24, 12,232,212,169,147, 73,117,197, 48,204,188,232,232,232,119,138,139,139,171,237,187, 45,211, 59, 83,131,150,226,250,213, 11,
- 14, 68, 23, 7, 24,114, 64,121, 54,128,200, 19, 96,196,149,126, 62, 39, 39, 7, 93,186,116,225,189,206,190,238,219,183, 31,161,
-148, 30, 81, 40, 20, 23,178,178,178,204, 9,193,135,117,140,108,125, 17, 19, 19, 99, 78, 41, 69,227,198,141,231, 1,168,149,193,
-226,241,120,174,103,207,158,117, 16,139,197, 21,251,185,170,191, 70,163, 17, 58,157, 14,189,122,245, 50,212, 96,106,241,195,214,
- 95,252,213, 26, 61,212,212, 3, 15,163,139,113,234,212, 17,212, 47,214, 35,246,129, 26, 44,171,128,186, 48, 3,148, 82,168,212,
- 90,180, 8,122,223,159,101,223,158, 0,169,165,165,229,224,117,235,214,217,255,244,211, 79, 5,143, 31, 63,214,253,248,227,143,
-246, 19, 38, 76,240,209,233,116,152, 56,113, 98,102,227,198,141,133,235,214,173,179, 63,114,228, 72, 79, 0,181, 50, 88,124,130,
-111, 62, 28,208, 3,106, 61, 3,189,222, 96,239,108,111,254,251,244, 81, 65, 2, 74,181,216,121, 52, 28,122, 3,251, 75,109,205,
- 85,239,222,189,221,183,108,217,194,143,142,142,230, 55,105,210, 4, 70,163,177,226,193,178, 44,140, 70,163,201,231,101,117,140,
- 5,188,157,172,173,207,181,233,211,215,204, 73, 38,133,248,249, 83,244,183,150,153,159, 76,205,218, 5,160,253,219,214, 40,240,
-120, 60, 36, 37, 37,193,210,210,210, 44, 40, 40, 40,149, 16,178,248,210,165, 75,219,254,142,223,122,157,200,214,155, 34, 32, 32,
-160, 53,159, 97, 14, 45,156, 63,213,201,175,101, 75,158,131,163, 61, 98,158, 36, 66,200, 99,131,159, 62,138, 9, 90,254,237,150,
-233, 1, 1, 1,239,135,135,135,223,122,219,246,181,251,160,159, 54,179, 6,221,164,210,103, 86, 0,182,161,176,176, 16,159,124,
-242, 9,142, 30, 61,218,164,109,219,182, 43, 75, 79, 1,142,255,138,193,242, 37, 68,214,194,195, 41,228,155,207, 39, 88,211, 83,
-191, 50, 37,217, 25, 16, 86, 99,132,156,156,156,150,118,234,212,233,163, 93,187,118, 89, 19, 66,112,110,234, 88, 88,235,212, 80,
-124,181, 26,214,118,246,208,206, 27, 15,115,163, 1,126,151, 34, 76,189,216,254, 69,243,241,227,199,200,205,205,133,157,157, 29,
-164, 82, 41, 36, 18, 9,132, 66, 33, 68, 34,145,169,154,144, 72, 36, 56,127,254, 60,248,124, 62,120, 60, 30,248,124,126,197,227,
-197,231, 60, 30, 15,142,142,166, 15, 77, 98, 89,118,165,143,143,143, 95, 76, 76,140, 69, 94, 94, 30,218,182,109, 91, 64, 8,137,
-120,225, 78,207, 47, 34, 34,194,194,228,198, 70, 23,135,162,196, 31, 65,115, 15, 1, 86,131, 96,180, 24, 10, 53, 60, 43, 26,152,
- 23,255,178, 44, 91,151, 59,207,116, 66,200,234,254,253,251,205, 3, 8,130,131,131,139,166, 78,157, 74, 31, 63,126,220,227,189,
-247, 6,212,127,242,228,105,153,217, 35,115, 8, 33, 27, 76,141,100, 81, 74,197, 0,112,245,234, 85, 80, 74, 37,117, 57,246,196,
- 98, 49,194,194,194, 42, 34,148, 12,195,128, 97, 24,240,120, 60, 28,123,106,135, 98, 45,131,146,244, 7,248,180, 95, 61,120,122,
-122,254,197,112,255,101,223, 80,138, 41, 19,198,222, 93,178,106,189,191,209,104,196,169, 83,167,176,118,237, 90,104, 52, 26, 4,
-117,235,129,231,180, 5,154,121,218,129,101, 89,168,212, 90, 68, 92, 62,116, 87, 81,207,211,255,109,185, 24,228,231,231,255,238,
-237,237,205,203,204,204,188, 8, 32, 78,175,215,111,250,253,247,223, 29, 62,254,248,227,140, 93,187,118, 77, 5,224,182,102,205,
-154,158, 69, 69, 69,251,106,163,219,169, 5,233, 19,216,178, 89,219,122,110,110,184, 28,122, 11, 66,145,192,106,242,232,126,144,
-203,249,248,246,167, 19,108, 66,114,206,212,171,247,233, 14, 19,207, 77,226,236,236,236,215,163, 71, 15,183, 45, 91,182, 8, 1,
-224,193,131, 7,200,200,200,128,173,173, 45, 36, 18, 9, 4, 2, 65,197, 13,219, 27, 49, 87,118,118, 55, 15, 30, 60,104, 6,189,
- 30,155,190, 93,141,126,170,124,152, 17, 64, 11, 82,255,109,106, 12, 2, 2, 2,188,187,116,233, 34, 49, 26,141, 40, 46, 46,198,
-150, 45, 91, 44,205,204,204, 44,123,247,238,189, 8,128,201, 6,171,125,251,246,233, 90,173,214, 1, 0, 68, 34, 81, 70,104,104,
-168, 35,128,146,250,245,235,155,149,125, 68, 85,203,200, 86,226, 11,209,169,196, 90,188, 87, 35,129,129,129,173,154,120,215, 63,
-191, 98,197, 98,121, 94, 65, 26, 44, 45,211,193, 32, 15,219,182,253, 0, 51, 51, 11, 44, 90, 52,159, 31,216,166,141,203,244,207,
-230,159, 15, 8, 8, 8,126,219, 76, 22,107,208, 77,106, 17,248,159,123,132, 29,231, 54, 66, 99,233,143,148,197,139,177,126,253,
-122, 52,106,212,168, 53,103,147,254, 75, 6, 43,136, 16,190,171,141,252,216,230, 69,211,235, 51, 97,199, 5,170,196,167, 80,170,
-141,176,250,207,201,115,254,197, 11, 35, 0,198,209,209,113,242,158, 61,123, 44,202, 27,187,198,196, 8, 43,232, 80,191,105, 83,
- 72, 45,173,144,102,208,129,234,117, 16, 10, 4,149, 54,136,166,104,150, 71,192,132, 66, 33,132, 66, 97,197, 5, 87, 40, 20,214,
-168,249, 82,229,240,249, 96, 24, 6,231,206,157,131,193, 96,192,224,193,131,255, 98,174,248,124,254, 75, 93,144, 53,105,166,166,
-166,158,113,113,113,137,160,148,190, 99, 52, 26, 65, 8,137, 72, 73, 73,233, 92,254,190,179,179,115,207, 22, 45, 90,204, 99, 89,
-118,165, 73,229, 52,100,131,230,236,129,121,187, 44, 20,132,217,129,200,130,193, 18, 15, 68, 62, 73,197,197,219,241,200,204, 45,
- 70,128,183, 61,122,182,111, 0,163,209,104,242,182,191,136,139,139,203,213,204,204,172, 33, 93,187,118, 69, 78, 78,142, 97,241,
-226,197,104,209,162, 5,188,189,189,171, 50, 79, 53,106, 18, 66,148, 17, 17, 17, 30, 42,149, 10,132, 16,165, 9,134,236,124,101,
- 70,248,247,223,127,135, 90,253,215,232,189,117,231,229,248,124,144, 59,198,124,186, 3,171, 31,239,199,230,205,155,241,234, 16,
-157, 87, 53, 89,150,197,146,149,235,253, 85, 26,109, 69, 93,105, 52, 26,132,133,133, 65, 83, 82,136, 75,187,198, 85, 68, 47, 85,
-106, 45, 92,253,186,251,215,164,249, 38,248,255,210,164,148,134, 0, 8,121,161,126, 23,236,218,181,107, 8,128,195,148,210, 80,
- 0,161, 0,246,214,186,156, 4, 99, 62, 24,244, 30,248, 66,115, 60,122,154,140,206,237,252,225,232,224,128,136,232, 88, 36,164,
-228,164, 19,130,209,189, 58,136, 87,170, 84,218, 5, 87,238,209,159,107,210,116,118,118,246,220,182,109,155,224,197,136, 11,143,
-199,123,233, 92, 47,127,173, 50,147,101,106,125,142, 5,188, 93,172,173,111, 30,253,242, 75, 89,218,175,191, 34,191, 99, 71, 8,
- 90,183,197,246,115,167,145,153,171, 82,107,141,108,183,183, 97,191,151,155,171,160,160,160,208,165, 75,151, 90, 37, 37, 37,225,
-250,245,235,240,240,240, 64, 73, 73, 9,106, 26,218,246,170,166, 86,171,117,120,161,219,206, 1, 0,210,210,210,246,226, 63, 93,
-233,180, 54,229,172,110, 92, 85,109,198, 92,189, 90,206, 6, 13, 26,136,236,172,173, 15,172, 92,181, 68, 30, 21,125, 5, 45, 91,
-180,133,220,210, 23,172, 49, 13,217, 57, 69,200,125,170,196,210,165,171,177,104,241,151, 88,189,106,169,124,232,176, 49,135,218,
-181,107,215,240,197,238,194,255,245,253,206,240,133, 91,238,223, 9,157, 4, 0, 5,209,135, 49,125, 88,123, 20, 22, 62,197,196,
-137, 11,145,146,146,130, 39, 79,158,132,255,127,150,147, 51, 88, 47,152,155, 64,177, 96,247,222, 69, 83, 91,139,227, 35, 69,154,
- 7, 97, 80,106, 88,250, 91,146, 33,229,219,106,190, 87, 82, 82,162, 61,122,244, 40,206, 78, 25,139,134,196, 0,155,175,214,192,
-209,197, 5,121, 99,222, 69,161, 94,135, 6,167,110, 65, 44,151, 67, 36,147,215, 24,113,120, 81,243,210,165, 75,120,248,240, 33,
-248,124, 62,228,114, 57,228,114, 57,196, 98, 49, 68, 34, 81,133,185,170,202, 96, 85,113,240,128,199,227,225,193,131, 7, 72, 72,
- 72,128,149,149, 21,174, 95,191,142,110,221,186,253, 37,138, 85,199, 3,190,210,136, 82,217,184,171, 51,166,106, 64, 96, 7,216,
-124,132,194, 27, 10,192,122, 4,244,176,130,209,104,196,189,167,217, 24,255, 81, 95, 0,192,228, 5, 63, 34,184, 77,253, 10,115,
- 80,139,240,189, 25,128, 57,141, 26, 53, 26, 58,124,248,112,131, 80, 40, 68,113,113, 49, 84, 42, 21, 30, 60,120, 96,232,219,183,
- 95, 81,255,254,253,228, 39, 78,156, 96, 41,197,234, 90,142,195, 74, 87, 40, 20, 30,101,221,176,233,117, 56,254, 64, 8,193,254,
-253,251, 43,125,127,244,218, 40,240, 75,135,103, 97,203,150, 45, 48, 26,141,160,148,146,154,234,243,171,121, 51,238, 78,159,187,
-196,159,101, 89,116,235,214, 13,179,102,205,194,179,103,207, 48,100,200,144,138,104, 32,165, 20, 42,141, 6, 41,145,231,239, 58,
-187,213,247,127, 91, 47, 14,148,210,147, 0, 78,190,190, 16, 92, 28,156,220,192, 80, 61,148, 25,217,120,175,111, 15,240,132,114,
- 60, 79,202, 66, 11, 95, 47,231,225,239,118,112,230, 17, 3,230,172,220, 51, 25,192,207, 38,156,239,198,232,232,104,193,253,251,
-247,193,227,241, 96, 97, 97, 1,169, 84, 90,113,142,191,104,184, 94, 39,114,229, 98,109,125,243,207, 69,139,100, 13,175, 95, 71,
-195,131, 7,177,236,202, 21,168,122,247,198,190, 71, 79,212, 40, 41, 9,254, 86,173,142,249, 95,222,191,221,187,119,159, 0, 96,
- 17,165, 52, 47, 40, 40,200,113,217,178,101,214, 41, 41, 41,136,138,138,194,254,253,251, 51, 13, 6,131, 1, 0,161,148,126,253,
- 6,142, 37,246,197,200, 86,251,246,237, 51, 66, 67, 67, 29, 9, 33,197,229,145, 43, 66, 72,113, 29,162,110,130,130,188,212, 79,
-173,101,116, 0,159, 49,175,111, 40, 40,122,158,107, 96,142, 90,216, 59,126, 31, 30, 30,174,175,238,187,150,150,150,159, 44, 91,
- 50, 83, 97,103,199, 34,168,115, 87,164,166,235,176,124,230, 40,100,103, 23,226,231,237, 43, 0,136,160, 51,240,240, 78,208,251,
-112,112,112, 65,167,142,157,156, 46, 95,187, 58, 5,192,183,111,203, 57,158,112,248,147,201,132,144,111,234,213,171,119,249,199,
- 21, 43, 26,118,235, 86,122,207,112,225,194, 5,252, 50,108, 24, 22, 3, 35, 55, 18,146, 58,237, 45,157,216,244,143, 53, 88,245,
-197,242,203,219, 62, 27,210,214,214, 88, 34,208, 94, 59,134, 20, 13,107,248,246,169,174,228,118, 30, 29,246,109,229, 39, 24, 37,
-132,176,132, 16,214,211,211, 19, 22,122, 53,172,168, 22,142, 10, 5,204,109,108,145,163, 47,141, 92,137,100, 50,136,100,114,147,
- 46,142, 47,106,250,250,250, 34, 61, 61, 29, 34,145, 8,114,185, 28,230,230,230,127, 49, 87,166, 94,112, 9, 33, 96, 89, 22,124,
- 62, 31, 17, 17, 17,232,216,177, 35,220,220,220,176,127,255,126,244,236,217,243, 47, 93,134,166,154,182, 87, 27,243, 23, 35, 74,
-229,131,223, 77, 25,220,254, 18,162, 6, 48,152,127, 0, 70,218, 13,122, 88, 66,205, 58,149,118, 7, 82,138,147,183,210,241, 56,
- 33, 27,172,145,173,117, 23,161,179,179,115,128, 68, 34, 89, 61,111,222, 92, 69,139, 22, 45,144,153,153, 5,150,101, 33,151,203,
-161, 82,169, 96,110,110,142, 14, 29, 58,164, 45, 94,188, 56,142, 82,244,166,148,166,253, 55, 14,224,179,103,207,190,212, 61, 88,
-254, 40, 78, 77,198,152,105,187, 32,226, 3, 17, 17, 17,240,241,241,169, 57, 92,206, 82, 76,155,251,181,191, 90,163,133, 72, 36,
- 66,251,246,237,209,182,109,219,138,113,113,229, 6, 85,167,211,193,104,100,225,228,219,213,159,188,133, 23, 5, 66, 72, 43, 0,
- 31, 91, 90, 90,122,148,148,148,164,233,245,250,253,101,166,191,167, 64, 32,248, 64, 42,149, 58,229,231,231,199, 3,248,153, 82,
-122,187, 38, 61, 51,137,196, 86, 44,177, 0,107,208,128,207,231,195,205,173, 62,168, 81,139,220, 2, 21, 70, 15,237,143,187, 17,
-209, 56,125,233,134, 65,175,103, 55,154, 90, 70,111,111,111,100,103,103,131,199,227, 65, 42,149, 66, 38,147,161,113,227,198, 72,
- 74, 74,170, 48, 87,117,237, 34, 44, 51, 87, 55,202,205, 21, 61,120, 16, 49, 50, 25, 60, 37, 18,124,249,235,175,197,185, 5, 5,
-109,126, 1, 98,222,130, 93,253,245,169, 83,167, 28,248,124,190,147,209,104, 68, 98, 98, 34, 30, 62,124,136, 13, 27, 54,164, 23,
- 22, 22, 6,133,135,135,215,105, 27, 69, 34, 81, 70,121,228, 74, 36, 18,101, 84, 23,217,122,157, 49, 87,174,174,174, 94, 46, 14,
-226,115,191,109,152, 90,207,175,101,107,198,140, 39,207, 45,126,150,222,241,214,141, 27,237, 23,252,124,112,138,171,171,107,143,
-228,228,228,103, 85, 54,126, 12,211,187,133,127, 75, 62,104, 26,248,162,142, 88,189,106, 40, 50,179, 10,144,155, 83, 8,161, 80,
- 6,173,158, 7, 35, 75,208,190, 99, 39,252,186, 99, 31,154, 54,109,198,227, 1,221,223, 38,131, 85, 22, 1, 94,249,199, 31,127,
- 52,148, 72, 36, 88,182,108, 25,204,205,205,113,227,155,111,240,139, 80, 8, 51, 0, 91,116,186,121, 0, 56,131,245,255,101,176,
-100,142,141,135,237,253,168,123, 7, 95, 79, 23, 70,191,127, 3,146, 75, 12,234, 69,143,117,234, 71,133,244,221, 40, 74,175, 87,
-231, 43, 8, 33, 84, 40, 20,194,113,238, 55,112,111,214, 28,197,227, 7, 33, 71,175,131,215,137, 27, 16,203,229,120,212,221, 31,
- 84,171,197, 59,143, 50, 76, 53, 46,148, 16, 66, 1,192,222,222, 30, 66,161, 16, 18,137, 4, 98,177, 24, 98,177,184,194, 88,137,
- 68, 34,136, 68, 34,147,205, 16,203,178, 40, 44, 44,196,243,231,207, 49,126,252,120, 72,165, 82,148,133,186,225,238,238, 14, 62,
-159,143,148,148, 20, 92,188,120, 17,158,158,158, 16,137, 68,181,106,107, 95,104,176,253, 92, 92, 92, 46, 19, 66,252,238,220,185,
- 99, 17, 24, 24, 8, 83, 35, 88,165,173,161, 16, 26,184,131, 37,110, 47,141,181,210,235, 13, 47,109, 75,121,244,197,196,200, 85,
-247,134, 13, 27,110, 88,181,106, 21,227,234,234, 10,150,101, 97,109,109,141,146,146, 18,100,101,101,195,215,215, 23,110,110,110,
- 88,181,106, 21, 0,236,253,111,153, 43,160,180, 59,184,220, 96,189,104,180,166,189, 91, 15, 57, 57,114,240,120, 76,133, 97,174,
-113,159, 83,138,141,171, 22,221, 29, 62,126,150,255,140, 5,171,161,214,232,160,210,104,161,214,104,161,214,232,202,254,106, 81,
- 62,176, 61, 45,234,226, 91, 23,193, 34,132,244, 11, 14, 14,222,180,118,237, 90, 39, 39, 39, 39, 65,102,102,166,225,135, 31,126,
-232,249,195, 15, 63, 68, 77,153, 50,197,119,202,148, 41,214,246,246,246,252,180,180, 52,253,204,153, 51,123, 18, 66,230, 81, 74,
-247, 86,123,189,144,153,219,240,132, 50, 16,194,135,149,165, 53,248, 34, 25, 88, 3, 31, 70, 22,176,176,180, 71,232,221,131,184,
- 30, 89, 56, 33, 35, 27, 7, 76,185,169,106,214,172, 25,229,241,120,176,181,181,125,169,107, 16, 0, 28, 29, 29, 81, 80, 80, 0,
- 30,143, 87,241, 90, 93,204,213,177, 69,139,228, 13,202,205,149, 84,138, 8, 79, 79, 44, 75, 72,200,203, 42, 40,232,248,150,152,
-171,138, 27,135,184,184, 56,148,148,148, 32, 52, 52, 20,135, 14, 29,202,124,213, 92, 5, 7, 7,143,147,203,229,139, 85, 42,213,
-234, 51,103,206,108,168, 73,183,108,204,213, 27,163,178, 84, 12, 1, 1, 1, 2, 39, 91,222,153,179,135,215,185,155,179,247, 8,
-226, 63, 1,158, 20, 60,148,223,116,120,167, 91,171,190, 76,243,111,166,123,244,158,255,221,153,128,128,128,198, 85, 69,178, 40,
-165,254,102, 50, 57,128,116,132,223, 9,169, 48, 87,217, 57,249,208,232,120,208,104, 9,212, 58, 6, 93,131,123, 97,211,143,191,
- 35, 37, 61, 27,229, 51, 12,223, 38, 26, 53,106, 20,224,226,226,130, 25, 51,102, 64,189,103, 15,138, 0,244, 3,240,135, 78, 7,
- 0, 48, 7,102,113, 86,233,255,201, 96, 89, 57, 53,238,188, 96,238,244,245, 29,223,239,197,164,143,107,135,188, 34,141,102, 78,
-148,129, 77, 46,169,209, 92,129, 82, 74,125,124,124,192, 48, 12,228,150, 86, 48,179,176,128,250,133,200,149, 88,110, 14,170,213,
-130,213,105, 33, 52,241,226, 88,174, 73, 41,133,153,153, 25,132, 66,225, 75, 93,131,229,198,170, 54, 17, 44, 0,200,203,203,195,
-129, 3, 7,208,186,117,107, 72,165, 82,240,249,124,248,249,249, 33, 58, 58, 26, 94, 94, 94, 32,132,224,143, 63,254,192,192,129,
- 3,241,236,217, 51,248,250,250,202,235, 98,176,206,157, 59,103, 65, 41,125,135, 82,138,172,172,172, 58,237, 68,150,101, 81, 84,
- 84,132,179,103,207, 34, 53, 53, 21,142,142,142,200,205,147,194, 82,209,164,244,183, 94, 48, 89, 38, 50,185, 95,191,126, 12, 33,
- 4, 42,149, 10, 98,177, 24, 50,153, 28,230,230, 22,240,246,110,140,148,148, 20,244,232,209,195, 24, 27, 27,187, 71, 40, 20,110,
-172,109,121, 27, 52,104, 96,158,151,151,215,183,126,253,250, 66, 0, 48, 51, 51,235,231,225,225, 97, 25, 31, 31,159, 95, 75, 51,
- 80, 97,172, 8, 33, 21, 51, 80, 25,134, 1,159, 97,224,236,228, 80,241,188,108,219, 73, 77,245, 56,108,220, 44,127,214,168,197,
-206,181, 35, 65, 12,217, 48,192, 18, 26,184,192, 96,228, 85, 24, 88,153, 76,134,166,157, 63,120, 43, 35, 88, 66,161,112,212,246,
-237,219, 93,126,251,237,183,188,163, 71,143,230,183,105,211, 70,182,126,253,122,135, 77,155, 54,117,209,106,181,152, 49, 99, 70,
-198,205,155, 55,139, 7, 12, 24, 96,185,109,219, 54,151,134, 13, 27,190,139, 74,198,101, 17, 66,100, 0,134, 2,248, 40,168,181,
- 37, 63,175, 80, 5,214,160, 69, 92,252,115,228, 23,105,193, 26,117, 72, 76, 86,162, 72,109, 68,118, 78, 33,252,252,123,124, 31,
- 18, 18,242, 37, 33,100, 62,165,244,120, 77,229, 52, 26,141,184,113,227, 6,174, 95,191,142, 43, 87,174, 32, 33, 33,161,226, 61,
- 11, 11, 11,156, 59,119, 14, 93,186,116,121,163,230, 42,241, 45, 50, 87,101,215,160, 69, 61,122,244, 88,100,107,107, 43,217,184,
-113,163,165,187,187, 59, 12, 6,131,246,213,200, 85, 96, 96,224,130, 5, 11, 22, 56,191,247,222,123, 83, 1,108,168,235,239, 85,
- 21,217, 50,129,191,164, 98,200,204, 76, 27,247,253,246, 81,118, 50, 97,130, 18, 79,190,115, 41,139,197, 0, 37, 5, 64,200,110,
-144, 14, 11,159,143, 14,158,108,189,234,232,166,113, 0, 54, 87, 37, 28,251, 44, 9, 91,182,108,194,103, 51, 70,227,215,159, 87,
-131,101,249,208,232,121,168, 87,191, 45, 52, 58, 22,132,225,163,133,127, 32, 46,133, 92,133,128, 1,166, 79,184,249,214,153,128,
- 39, 79,158,220, 74, 72, 72,240, 89,184,112, 33,126,117,113,129,185,185, 57,102, 46, 90, 20,102, 48, 24,222,186, 25,178,255, 88,
-131, 21,224,237,245,141,165,141,245,216,246,173,154,216,206,156, 58, 78,240, 44, 77,141,139, 29,191,200, 59,184,106,174, 60,137,
-202,167, 36,208,188,235,181,137, 58, 24,150,204, 68,182, 81,139,250,199, 66, 33,150,203, 17,211, 51, 16, 84,171, 69,135,187, 9,
- 16,203,229,224, 75,204,234,114, 2,191,212, 29,248,234,115,134, 49, 45,113,189, 78,167,179,234,222,189, 59,186,117,235,134,247,
-223,127,191, 98,204, 85,203,150, 45,177,119,239, 94, 12, 26, 52, 8,247,238,221,131,179,179, 51,124,124,124,224,227,227,131,139,
- 23, 47,214,250,238,209,104, 52,162,103,207,158, 5,132,144, 8, 74,169,223,173, 91,183, 44,106,171, 81,222,216,156, 61,123, 22,
-125,251,246,133,151,151, 23,194,195,195,113,246,235,111, 33,181,169, 7,192, 10,172,209, 8,173, 86, 11,134, 97,106, 28,131, 21,
- 20, 20,196,231,241,120,141, 27, 52,104,128,204,204, 76,100,102,102,194,222,222, 30, 10,133, 2, 14, 14, 14, 88,187,118, 45,214,
-175, 95,127,139, 82,186, 50, 45, 45,237, 81,109,247,145, 66,161, 8,182,182,182,254, 86,165, 82, 9,203,203, 66, 8, 17, 56, 59,
- 59,135, 41, 20,138,121, 74,165,242, 88,109, 12,150, 78,167, 3, 33, 4, 39,226, 20, 40,214, 18, 20, 36,135, 99,250,187,238, 47,
- 25, 46,129, 64,240, 82, 90,141,170, 13, 22,197,158,237,223,221,157,247,197,199,254,200,217, 5, 67,246, 46, 16,235, 97, 56,244,
-176, 23,126,191,105, 11, 0,240,118, 98,240,221, 88,249, 91, 27,193,210,233,116,219, 26, 53,106, 4,173, 86,123, 1,192,246,136,
-136,136,129,169,169,169,235,254,252,243, 79,197,144, 33, 67,148,199,142, 29,251, 12,192,145,136,136,136, 49,203,150, 45,235,166,
-215,235,183, 85,209,237,240,235,204,153, 51,131,134, 12, 25, 66,132,140, 94,123,246,204, 14,190,193,160, 39,179,231,255,100, 12,
-185,118,153, 49, 24,244,228,253, 15,103,178, 39, 47, 70, 50, 19,166,173, 49,182,108,219, 23, 15, 30, 60,112,234,215,175,223, 82,
- 0, 38, 25, 44,129, 64, 80, 97,160, 43,249,253, 90,117, 17,126, 12,120,185, 90, 91,223, 56,182,120,177,220,235,218,181,151,205,
- 85, 98,226, 91,103,174, 0,224,194,133, 11, 91, 1,108, 13, 10, 10, 74,151,201,100, 40, 42, 42,250,203, 57,210,174, 93, 59,137,
- 66,161,144, 8, 4, 2,180,110,221,218,166,103,207,158, 49, 12,195,108, 56,117,234, 84,173,147, 80, 86, 22,217,170,107,154, 6,
-115,107,182, 95,203,182, 77,205, 31,155, 47, 54,151,240,213,247, 60, 98, 36, 22, 4, 64,190,198, 49, 46, 52, 97,104, 1,201, 16,
-183,108, 22,236, 1, 41, 35,233, 87,149,193, 34,132,220, 45,200,203,239, 93, 80,168,197,181,235, 15,240,225,208,134,208,232, 8,
- 88,150, 65, 81,177, 6,224, 9,192, 0, 24, 54,124, 20, 40,225, 35, 55, 43, 13, 4,136,124,219, 76,128,209,104,156, 55, 96,192,
-128, 86,203,150, 45,107, 50,115,230,204,242,253,210, 78,161, 80, 68,113,121,176,254, 31, 12, 86, 35, 47,215, 94,157, 91, 5, 78,
-251,114,254,151,230, 79,110, 93,193,151, 75,191,103, 27, 6,246,204, 95,185,231,143,194,124,121,189,110, 37,202, 71,247,106, 27,
-117, 16, 24,244,160, 6, 29,196,114,249, 75,145, 43,145, 76, 6,129,153,180, 86, 27, 65, 8, 1,165,244, 47,221,129, 47,154,171,
-218, 92,108, 69, 34, 81,222,213,171, 87, 29,146,147,147, 95, 26,208, 94,191,126,125, 16, 66,112,243,230, 77,220,184,113, 3, 31,
-126,248, 33,248,124, 62, 4, 2, 1, 34, 34, 34, 10,235, 18,193, 42,159, 69,232,236,236,220,179, 77,155, 54,149,206, 30, 52, 37,
-130,149,152,152, 8, 47, 47, 47,104, 52, 26, 88, 91, 91, 35, 39, 45, 14,207,158, 60, 66,137, 70, 15, 15, 7, 17,178,178,178, 80,
-158,215,171, 58, 46, 95,190, 76, 21, 10,197, 75,145,159,204,204, 76,120,122,122, 98,203,150, 45, 88,191,126,253,230,212,212,212,
- 90,223,197,186,184,184,216,176, 44,187,172, 95,191,126,253, 7, 14, 28,136,158, 61,123,190,244,254,174, 93,187, 44, 15, 31, 62,
-252,163,155,155,219, 64, 30,143, 55, 47, 62, 62, 62,189,166,125, 14, 0,191,252, 82,154, 62, 73,218,118, 17,230, 13,241,192, 71,
-147,119,224,187,239, 14, 67, 44, 22,191,212,216, 46, 89,178,164,230,122,164, 20,221,223,255,196,191,139,159, 22,198,236, 63, 96,
-209, 62, 23, 5,161,214,200, 47,244,199,205,181,125, 0, 0,205, 63, 62, 14, 74, 61, 0,224,173,140, 96, 81, 74,207, 1, 56,247,
-194, 75, 7, 9, 33,122, 66,200,112, 0,251, 40,165,135,203, 94,255, 9,213, 36, 6,109,219,182,109,203,249,243,231, 11,202,211,
-102, 40,234, 45, 51,232,116, 58, 22, 0, 26,251,189,243, 82, 95,245,211,167, 79,241,221,119,223,161,184,184, 24,194, 90,132,153,
-131,131,131, 43,198, 68, 10,133, 66,216,217,217, 65,167,211,193, 96, 48,212,122,252,149,157,171,235,247,119,174, 95, 55,138,126,
-216,160,162, 7, 15,154,197,152,153,189,213,230,234, 21, 22,245,233,211,103, 17,165,148,178, 44,187,240,133,155, 45,177,181,181,
-245,213,239,191,255,222,214, 96, 48, 96,214,172, 89, 86,217,217,217, 86, 19, 39, 78,156, 7,160, 74,131, 85, 69,154,134,170,142,
-183, 58,165,105, 96, 89,120,203,229, 22,200, 70, 50, 52,118,250,150,121,182,134,156,115,169,227,238, 41, 18,252,125,101, 70,189,
- 39, 83,160,133,165,196, 28,148, 82,239,170,126,219,192,178,167, 30, 69, 69,245,168,231,214,144,247,231,241, 43, 24, 48,112, 8,
- 52, 26, 6,106, 61, 1,225, 9, 64,120, 66, 52,247,243,135, 79, 83, 63, 80, 0, 49, 15, 35, 12,198,151,207,141,255,121,220, 7,
-253,180,217,181,255, 15,147, 0, 96,214,134, 11,248,242,155,117, 24,241,126, 79,140, 25, 51,134,203,131,245,255, 97,176,234,213,
-171,103,229, 32,151,254, 50,229,227,177,230, 9,247,195,144, 28, 17,134,235,215, 98,114,119, 31, 58,154, 82,144,159,249,113,109,
-204,213,139, 17, 44,175, 93, 39,224,226,236, 92, 17,185,106, 31, 30, 15,177, 92,142,144,230, 46, 96, 53, 26,244,120, 94, 80,235,
-141,169, 44,106, 37, 20, 10,235, 52,211,175,220, 84,189, 58,160,125,194,132, 9,216,190,125, 59, 58,116,232,128, 70,141, 26,213,
-250, 78,249, 69, 83,244,226,152,168,218,204, 30,172, 76,171, 94,189,122,136,140,140,132,165,165, 37,118,238,220, 9, 87, 87, 23,
-140,233,229, 5, 30,175,180,107,139, 97, 24,147,198, 96, 81, 74,141, 46, 46, 46,113,103,207,158,245, 28, 50,100, 8,132, 66, 33,
-114,115,115, 97, 97, 97,129, 77,155, 54,177, 82,169,244,215,218,150,207,205,205,109,140, 68, 34,249,122,232,208,161,252,198,141,
- 27, 35, 61, 61, 29,150,150,150,108,217,210, 70,176,177,177,102,165, 82, 41, 38, 76,152, 0, 63, 63,191,238,115,231,206,237,166,
- 80, 40, 86, 40,149,202, 31,106, 50, 89,123,247,150,246, 78,125,188,225, 17,180,218,210,161, 22,155, 55,111,134,179,179,243,203,
- 93, 1,177,177, 53,207, 34,100, 89,156, 59,244,211,221,201, 83,135,250, 19,235, 97, 40, 8,181, 6,181,252, 16,233, 69,230,216,
-117, 57, 3,151,239, 38, 84, 36, 26,125,219, 34, 88,132,144, 1, 40, 29,122,113,146, 82,122,132, 16, 50, 24, 64,207,242,231,168,
-101, 98, 81,131,193, 64, 25,134, 33, 73, 73, 73, 58,169, 84, 74,108,108,108,248, 98,177, 24, 26,141,166,194,104, 61,125,250, 20,
-199,143, 31, 71,114,114, 50,108,108,108, 24, 75, 75, 75,232,116,186, 92, 19,239,186,255,146,158,161,236,119,107,125, 62,142, 6,
-154,109, 94, 60,223, 67,197,207,181,204, 26,211, 21,236,189,235,170,200, 76,141,217,191,196, 92, 33, 36, 36,100, 43,128,173,229,
-207,187,118,237, 58,134,207,231,127, 9,192,114,219,182,109, 86, 86, 86, 86,228,216,177, 99,250,109,219,182,229,241,120,188, 92,
- 0,235,170,211,171,108, 48,251,235, 80, 89, 42, 6, 74, 17,149,147, 31,231, 46,176, 82,176,247,213, 52,116, 70,210, 60,159, 92,
- 65, 67,123,210,180, 25, 6,102, 68, 95, 27, 99,136,109,159,153,150,193, 80,208,168,170,116,243,243,243,127,250,117,199,129,217,
-251,247,253, 82, 79, 44, 23, 99,194,196,249, 56,113,250, 18, 8, 35,192,213,208,155,208,234,140,200,202,201,199,208, 97, 35,224,
-234,108, 7, 20,165,100, 10, 68,162, 31,222,166,125,255, 82, 30,172,192,246,184,126,120, 13,246,198,212, 67,202, 55,223,112,121,
-176,254, 78,131,229,225,225, 33,150, 9, 48,222,198, 76, 56,103,202,240,247,236, 51, 98, 31, 34, 57,250, 46, 0, 64,163, 81,233,
- 83, 99, 46,183, 48,225,162, 29,252,106,174,140,242,174, 27, 27,123,135,138,200,213,139,179, 7, 89,141, 6,172, 78, 11, 84,209,
-157, 83,149, 38,195, 48,127, 49, 86, 47, 94,120,107, 83,206,242,232, 72,101, 9, 70,221,220,220,176, 98,197,138,191,228,193, 50,
-165,156,101,119,105, 61, 9, 33,126,229,198,136, 82,234,231,236,236,220,211,148,153,131, 85,105,150,103,172, 62,117,234, 20,162,
-162,162, 64, 41, 69,191,126,253, 32, 16, 8, 96,110,110, 94, 97,178, 42, 27,131, 85,153, 38,195, 48,159, 28, 62,124,120,118, 88,
- 88, 88,175, 89,179,102,145,242,177, 44, 69, 69, 69,108,106,106,106, 97,109,203,201,178,236,156, 51,103,206,240,141, 70, 35,182,
-111,223,142,219,183,111, 83,169, 84,186, 82, 32, 16,172,144, 74,165, 6,189, 94,255,249,184,113,227, 38, 46, 94,188,152,233,212,
-169, 19,194,194,194, 24, 79, 79,207,169, 0,126,168,105,219,111,222,188, 89,218,229,156,147,136,201,243,246, 65,102,198,199,163,
- 71,143,144,147,147,243,151,228,163, 53,151,147,194,191,203, 16,127,150,234,160,147, 15, 1, 99,214,181,116,169,156,231, 26,180,
-242, 43,141, 58,170, 10, 50, 43,234,177,178, 8, 86, 85,229,124, 77,243,243,183,106, 18, 66,250, 55,105,210,228,139,168,168, 40,
-215,230,205,155,251, 18, 66,130,154, 53,107,214, 42, 50, 50,178,252,185,128, 82,186,191, 54,154,183,111,223, 62,184,105,211,166,
-137,163, 71,143, 22,178, 44,107, 76, 72, 72,208, 3, 32, 78, 78, 78,188,219,183,111,179,127,254,249, 39, 84, 42, 21, 92, 93, 93,
- 25, 23, 23, 23,114,238,220, 57, 54, 58, 58,250, 38,165,116,190,169,219, 94, 30,153, 22, 8, 4,224,241,120, 80,169, 84, 38,153,
-171, 87, 53,221, 27,121, 45,239,220,222,195, 45, 75, 25,129,132,132,120, 36, 6, 54,212,111,222,124,188, 86,230,234,127,113,191,
- 87,115,115,185,228,208,161, 67, 46, 26,141, 6, 66,161, 16, 7, 14, 28,208,237,216,177, 35, 42, 63, 63,191, 99,120,120,184,170,
-174,229,172, 77, 2,210,154, 52,139,242,120, 39, 78,159,121,208,138,215,235, 39, 76, 86,102,118,172, 48, 94,132,216, 28,118,244,
-237, 40,109,221, 60,197,252,202, 26,166, 4,234, 19, 85,105,198,198,198,106, 3, 3, 3,135,204,157,179,232,194,215, 75,191,150,
- 47, 92,180, 8,215,111, 70, 34, 59,175, 8, 44,229,129, 37, 4, 95,126,185, 16, 78,118, 54,176, 17,233, 75,178,139,201,192, 87,
-151,204,249, 95,223,239,175,147, 7,235,239, 40,231,191,198, 96,153,243,241,160,163,175,151, 75, 39,255,166, 18,190, 81,133,228,
-232, 88,228, 20,171,113,238, 97, 66, 30, 67,153, 95, 95,231, 71,121, 60, 30, 44, 45, 45, 33, 20, 10,209, 46, 50, 5, 34,161, 16,
- 98,185, 57, 0,148, 70,174, 40, 5, 35, 18,215,246, 0,170,212, 96,213, 21,163,209, 8, 71, 71,199,151,150, 93,121,177,193, 46,
- 55,138,181, 77,209,192, 48,204,188,176,176, 48,139,196,196, 68, 80, 74,113,228,200, 17,139, 65,131, 6,205,171, 75,244,138, 82,
-138,236,236,108,176, 44, 11,177, 88,140, 94,189,122,161, 83,167, 78,208,149,205,254, 40,111,128,106,155,201, 61, 41, 41, 41, 21,
-192,103,174,174,174,191,206,158, 61,123, 78,155, 54,109, 2, 23, 47, 94, 12, 82,139,133,113, 95, 65,103, 52, 26,113,249,242,101,
- 28, 62,124,216,160, 86,171, 7,165,165,165,221,121,225,253,165,174,174,174,127, 14, 26, 52,232,228,227,199,143,249, 81, 81, 81,
- 0, 96,168, 73, 84,165, 82,161, 81,163, 70, 48, 24, 12, 88, 53,217, 13,133,133,205, 97, 48, 24, 96, 52, 26, 33,147,201, 94,202,
-251,101,202,126, 98, 41,139,187,151, 14,220,117,111,217,211,191,166,165,114,222,178, 8, 86,175,168,168, 40,215,225,195,135,103,
- 68, 70, 70,186, 30, 63,126,220,170, 95,191,126,178, 97,195,134,101, 68, 70, 70,186, 18, 66,222, 1,176,191,150,231,207, 23,132,
-144,211,203,151, 47,159, 55,109,218,180, 54,163, 71,143, 22, 8, 4, 2, 54, 37, 37,197,176,103,207, 30,210,168, 81, 35, 70, 40,
- 20,146, 51,103,206,176,183,110,221,186, 97, 48, 24, 86, 81, 74,175,214,246, 58, 82,110,174,234, 26, 73, 94, 7,140,106,156,152,
-220,113,255,146, 53,140,160,137,179,238,216,169,155, 73,119,239, 60,127, 6,157,113,198, 47,192,179,127,105,187,176,127,200,144,
- 33, 99, 6, 13, 26,100,214,186,117,107,241, 79, 63,253,148, 95, 82, 82, 82,169,185,170,140,218,164,105,168,109, 2,210,114,148,
- 74,229,207, 43,150, 92,153,241,145,207, 48,175, 79,236, 60,112,190, 56, 3,185,124, 30, 99, 97,197,192,223,157, 7, 85,222,115,
-251, 11, 55, 15, 61, 79, 85, 42,171,205,171,118,231,206,157,219, 1, 1, 1,193, 31,125, 52,230,208,132,143,199, 57, 44,252, 98,
-174,224,224,159, 39, 1,131, 14,183,174, 94,133,149,148, 80, 67,113,106,122,182,150,188,247, 54, 46,149,147,112,248,147,201, 0,
- 38, 19, 66, 62, 92,180,104,209,158,201,147, 39,131,101, 89,132,132,132,224,135,185,115,177,216,104, 28,185,145,144,146,105,148,
- 78,230,236,210, 27, 52, 88, 96, 72,225,141, 39, 9, 69, 55,159, 36, 20,129,165,148,165, 84,195, 48, 72, 42,214,233,150,199, 60,
- 75, 62,243, 58,251,180, 87,175, 94,204,171,198,165,138,110, 6, 83, 7,215, 37, 4, 7, 7,191, 49, 77,150,101,147, 59,118,236,
-248,151,134,185,170,255,203,116,147, 77, 10,201,178,236,202,118,237,218,253,229,181, 58,133,119, 89, 54,174, 91,183,110,186, 87,
- 77, 87,117,207,141, 70, 99,178,169,250,201,201,201, 15, 0,140,112,113,113,233,210,179,103,207,169, 0,234,154,142, 97,109,151,
- 46, 93,102, 82, 74,249,132,144, 53,175,152,171,242,223,122,232,226,226,178,208,211,211,179, 98, 1,232,154,182, 61, 56, 56, 88,
- 87,211, 34,207, 47, 14,128,102, 89, 54,185,122, 77,138,122, 45,122,248,235,244,165, 38,173,186,165,114,170,138, 96,253,143,178,
-143, 16, 34, 0,144, 27, 21, 21,245, 78, 89,228, 42,249,193,131, 7,231,247,238,221,235, 8,212,156, 62,161,138, 27,128,171, 0,
-174, 18, 66, 58,109,222,188,249,139, 9, 19, 38,180,254,240,195, 15,249, 65, 65, 65, 56,113,226,132, 49, 36, 36,228,166, 74,165,
- 90, 89, 91, 99, 69, 8, 41,122,245, 28,170,166, 12,213, 46,210,235,205, 48,155, 86, 8,132,146,113, 7, 46, 23, 93, 22,146, 80,
-163,202, 48,255, 55,224,193,191,185, 81, 56,119,238,220,231,237,218,181, 91,120,224,192, 1,165,151,151,151, 88, 32, 16,104, 77,
- 53, 87, 64,237,210, 52, 80, 74,217, 58, 30, 91, 6, 71, 71,199, 62,187,134, 79, 62,218, 98,202,232,250,189, 58, 4, 74, 93, 60,
- 28, 92, 30, 63,207, 66,114,228,249,226,103, 33,155,226,141,234,156, 1,148,210, 26,111,212,194,195,195,111,181,107,215,174,225,
-230,109, 63, 78,230, 49, 76, 15,131,209,232, 55,115,242, 8, 74,128, 72, 22, 56, 39, 20,139,222,250,197,158,197, 66,225,200, 41,
- 83,166,224,247,223,127,199,145,245,235,209, 51, 57, 25,123,133, 66,152, 9,133,216,162,211, 77, 2,192, 25,172, 55,105,176, 34,
-159, 60, 15,248, 59,126, 48, 42, 42,170,221, 63, 93, 51, 42, 42, 42,240,239,170,240,215, 25,107, 85, 73, 57,255, 95,166,209,166,
-164,164, 92, 2,112,233, 53,190,191, 3, 38, 44,230,108,234,231, 0,224,209,163, 71,111,124,219,169,216,114, 72,226,253,179,121,
- 78, 77,186, 90, 25, 12, 6, 16, 66,160, 86,171,113,227,198, 13,104, 74, 10, 17,178,123,124, 69, 38,119, 80, 32, 45,250, 98,158,
- 83,253,102, 86,255,235, 23, 1, 74,233, 21, 0, 87,202,204,203, 64, 66, 72, 31, 0,103, 40,165, 7,223,144,126,133,209,218,182,
-109,219, 12, 74, 41, 10, 10, 10,214,215,214, 88, 85, 92,155, 34, 35, 47,190,169,109,143,103,217,139, 11, 75, 74,186,102,179,236,
-140,159, 13,181, 91,112,252,109, 38, 44, 44, 76,221,173, 91,183, 95,151, 45, 91,214,150,101,217,223,222,132,230,107,164,105,168,
-148,244,244,244,231,132,144, 22,236, 55, 27,198,134, 91,153,247,165,122,166, 49,209,243,143, 17,109,246,137,180,180,180, 95, 40,
-165,198,218,108,111,217, 77,221,119,255,198,253,125, 63, 50,178, 39, 0,244,238,221, 27,170, 89,165,105,175,118,252, 39, 15,214,
- 22,238,140,120,211, 17, 44, 14,142,127, 25, 41, 49,225, 7, 1, 32, 45,186,180,253,254,254,251,239, 1, 0, 61,123,246,252,203,
-172,199,242,207,164, 61,127,187,130, 29,101, 3,218,143,252, 77,218, 87, 1, 92,253, 39,109,111, 8,165,253,184, 35,191,114, 46,
- 92,184,240, 70, 19, 76,190,233, 4,164,101,199,148, 17,192,246,178, 7, 71, 29,241,246,246, 38, 0, 96,103,103,135, 5,181, 88,
- 78,141,163,122, 24,174, 10, 56, 56, 56, 56, 56, 56, 56, 56,222, 44, 4, 64,112, 21,119, 6, 38,207, 14, 32,132, 4,215,225,206,
-227, 60,167,201,105,114,154,156, 38,167,201,105,114,154,255, 46,205,154,180,223,154,217,137,229, 25,174,255,142, 7,128, 96, 78,
-147,211,228, 52, 57, 77, 78,147,211,228, 52, 57,205,127,219,163,154, 49, 88, 7,121, 41, 41,176, 16,137,164, 66, 0,208,106, 75,
-116, 46, 46, 40, 0, 6, 27,193,193, 81,155, 48, 41, 33,142,101,102, 62,253, 77,126,150,131,131,131,131,131,227,159, 10,191, 42,
-115,149,149, 37,181,227,243,115,189,141, 70,181, 15, 0,240,249,204,163,172, 44,235, 24, 59,187,131, 89,111,218,100,245,238,221,
-123, 62,165,212, 81, 32, 16,156,112,114,114, 10,217,186,117,171,254,223,108, 52, 94,199,100,252,127, 24, 20, 91, 91, 91,133,163,
-163,227,112, 43, 43,171,160,252,252,252,171,105,105,105, 59,179,179,179,149, 85,148,103, 5, 33,152, 83,246,255,106, 74,233, 23,
-213,148,221,228,207,190,138, 66,161,104, 36,145, 72, 38, 51, 12,211, 12, 0, 88,150,125,160, 86,171, 55, 43,149,202, 39,255,182,
-147, 90,161, 80,152, 81, 74,223, 19, 8, 4,163,108,108,108, 90,103,102,102, 46, 78, 73, 73, 89, 87,199, 99,150, 15, 96,150,149,
-149,213,135, 86, 86, 86,158, 57, 57, 57,207, 10, 10, 10,246, 3,248,142, 82, 90,227,121,250,245,116, 69,187,160,158, 65, 11, 66,
-206,132, 44, 93,180, 65, 25,246,151,247, 63, 87,216,246,232,222, 97, 97,200,177,208, 37, 95,108, 74,201,169,101,217, 24,252,103,
- 28, 41, 91,122,216,255,115, 71,232, 58, 56, 56,180, 45, 75,164,202, 48, 12,243, 93,122,122,250,165,127,242,113,100,111,111, 47,
-115,114,114, 90, 69, 8,233,207,227,241,162,210,211,211,199, 43,149,202,228, 55,116, 45,100,220,221,221,205, 19, 18, 18, 10,235,
-154,170,225,223, 72,187,118,237,210,117, 58, 93,181,217,241,133, 66, 97, 70, 88, 88,152, 35, 87, 91,255, 80,131,149,146, 2, 11,
- 62, 63,215, 59, 35, 45,114,168, 50, 53,226, 3, 0, 80, 56,251,237,119,112,106,190, 47, 37, 69,164,107,213,125,144, 92, 32,229,
-111,230,241, 4, 45,213, 90,141,157,128, 47,200,210, 25,244,247, 24, 45,157,156,250,232,112,162, 41, 63,220,191,127,127,111, 0,
-150,254,254,254,183,181, 90,109,235,117,235,214, 57, 31, 58,116,200, 47, 60, 60,124,216,187,239,190,123,140, 82,122,230,216,177,
- 99,170, 90,157,180, 65, 65,124,135, 60,155,145, 60, 62,191, 63, 0, 63, 74, 1, 16, 94, 4,171,211,158,204, 16,218,252, 70,195,
-235,110,220,218, 53,178,245, 38, 84, 55, 91, 64,104, 39, 61, 37, 87, 41, 17,174, 9,123,146, 29, 83,139, 11,138, 73,230,225,117,
- 76,198, 43,223, 93, 79, 41,157,245,166, 15, 24, 39, 39, 39,187,193,131, 7,239, 90,186,116,169,204,220,220,156,196,199,199, 15,
-252,226,139, 47,122, 42, 20,138,143,148, 74,101,210,171,102,143, 16,204, 97, 89,202, 0, 0,195,144,185,142,142,142,205,248,124,
-190,230, 85, 93,131,193, 32, 38, 4,189, 88,182,116, 57, 27,134, 33,115, 8, 33, 27, 76, 49,138,158,158,158,195,154,251,181,156,
-249,197,252,133,114,123, 7, 7,153,193, 96,212, 37,165, 36, 75,215,172,248,166,141,167,167,231,134,184,184,184, 61,181,221, 78,
- 66, 8,113,117,117, 29, 42, 16, 8,250, 1,104, 82,246,114,180, 94,175, 63,158,156,156,188,207,212,134,188, 69,139, 22, 87, 24,
-134,241,168,205,111, 27,141,198,196,136,136,136,142,117,217, 63, 46, 46, 46, 67, 92, 92, 92,126,105,219,182,173,180,101,203,150,
- 16, 10,133, 88,189,122,245, 44,212,176,188, 73,185,145,146, 74,165, 67,101, 50,153, 87, 81, 81, 81,172, 74,165, 58, 36, 18,137,
-130, 55,108,216,224,214,161, 67, 7,243,244,244,116,194,227,241, 28,143, 31, 63, 62,114,227,198,141, 61, 9, 33,221,106,202, 51,
-148, 31, 75, 23,136,251, 55,233,148, 31,123,105, 1,128,222,127,217,239,106,201, 40,202,115,235,167,162,119,147, 80,139, 41,242,
-132, 16,198,213,213,117,131,163,163,227, 24,149, 74,165, 38,132, 80, 66, 8,109,222,188,121,249,251, 0, 0,173, 86,155,251,248,
-241,227,198,213,105,213,111,103,115,135,199,240, 92,171,220, 31,172, 49,249,121, 88,206,107,167,110, 49, 26,141,115,162,162,162,
-250, 8, 4, 2,210,162, 69, 11, 30,106,145,250, 68,161, 80,120, 19, 66,190,164,148,222, 78, 77, 77,221, 92,182,164, 85, 23, 74,
-105,197,181,162, 44,157, 10, 92, 92, 92, 54, 55,108,216,240,221,167, 79,159,110, 73, 73, 73, 89,250, 26, 70,125,235,242,229,203,
- 63,232,217,179, 39, 47, 59, 59,219,165, 71,143, 30,187, 1,116,122,157, 58, 8, 8, 8, 16,164,165,165,205,106,209,162,197,167,
-173, 90,181,114,126,248,240, 97,154, 66,161,216,232,228,228,244, 93,120,120,120,141,215,103, 63, 63, 63, 5,159,207, 31, 3, 96,
- 36, 0, 30,165,116, 47,128,223,238,222,189,251,175, 72, 10,171,211,233, 28,206, 47, 93, 8,194,231, 67,210,177, 27, 88,150, 69,
-214,154, 69, 48,228,100,193,110,233, 70, 24, 12, 6, 4, 7, 7, 59,128,227,159,107,176, 68, 34,169,208,104, 84,251, 40, 83, 35,
- 62,120,167,243,247,150, 0,112,229,242,167, 31, 56, 56, 53,125, 32, 18, 73, 99,196, 22,146,195,131,250, 7,183, 28,220,175, 51,
-113,117,118, 64,114,106,134,227,207,123,207,244, 58,126,230,210, 97, 0, 38,229,207, 42, 40, 40, 88,230,238,238,110,127,225,194,
-133,120,145, 72,100, 38,145, 72,200,144, 33, 67,204,134, 13, 27,230,123,241,226, 69,175,211,167, 79, 15, 30, 48, 96,192,105,161,
- 80,120,226,192,129, 3, 53,174, 79,230,216,124,160,175, 19,223,233,224,128,247,122,123,244,237,238, 32,114,119,178, 7,101, 37,
-120, 20,167,171,119,238,234,221, 94, 39, 78,157,153,227,224, 59,240,253,140,168, 35, 38,175,134,222,172,153,165,149,153,138,206,
- 52, 19,210, 15,123,181,241,173,223,191,123,123,226,233,233,137,152,199, 49, 94,151,174,223, 30,211,197,199,252,185, 74, 71,246,
-170,204,200,218, 7, 15,242,243,170,139, 42,189,104, 52,120, 60,102, 94,247,238,221,199,136,197,226,151,238,220, 52, 26, 13,195,
- 48,196,193,104, 44,125,185, 54, 38,163,252, 55,180, 90, 13, 35, 16,136,192,227, 49, 51, 91,182,108,217, 59, 61, 61,253,148, 88,
- 44, 94,253,252,249,243, 90,229,157,153, 70,136, 40,151,207, 15, 96,196, 98,103,163, 86,107, 11, 0, 68, 36,202,173,103,107,219,
-246,171,175,190,146,243,120, 60,100,103,103, 67,173, 86,147, 79, 62,249,196, 44, 54, 54,118, 52,128, 37, 53,153,150, 29, 59,118,
-248,219,218,218,254,229,142, 53, 59, 59,155,233,221,187, 87,173,243,118, 42, 20, 10,239, 22,254,129,159,237,217,189,171, 73, 65,
- 78,174,122,251,186,173,225,122,137, 84,227,217,164,177,224,155, 21,107, 45, 23,204,157,249,169, 66,161,184,167, 84, 42, 77, 54,
-195,206,206,206,245, 60, 60, 60, 14,207,159, 63,191, 89,199,142, 29, 5, 14, 14, 14, 72, 79, 79,199,227,199,143,155, 93,191,126,
-253,189, 63,254,248, 99,150,179,179,243,160,212,212,212, 26,111, 38, 40,165,141,142,174, 89,225, 32,182,177, 5,171,215,195,198,
-207,191, 34,249,107,234,165,179, 48,234,116, 96,245,122,184,245,125, 15,101,145, 55,116,237,218,181, 78, 25,243, 93, 93, 93, 21,
-222,222,222,191,207,155, 55, 79,168,213,106,113,247,238, 93,132,133,133,177, 25, 25, 25, 43,107, 50, 87,132,144,179,139, 22, 45,
-114,237,216,177,163,121, 86, 86, 22,140, 70,163,221, 31,127,252, 49,217,223,223,223,194,205,205, 77,180,115,231, 78, 20, 21, 21,
-193, 96, 48,216,120,121,121,217, 12, 27, 54, 76,187,115,231,206, 89, 0, 86, 85, 21,185, 42,136,165, 11,210,136, 87,175,198, 1,
-163,144, 70, 78,247,154,217,219,249,148, 69, 3, 82, 17,201,234,221,160,129,185,151,143,108,174,220,162,185, 77, 65,202,249,185,
-189, 27, 52,216,126, 42, 54,214,148,165,152, 24, 23, 23,151, 13,125,250,244, 25,190,101,203, 22,105,116,116,180,180, 73,147, 38,
- 96, 89,182, 34,147,127,249,202, 5,157, 58,213,236, 7,120, 12,207,245,250,225,135, 14,102,102,102, 21,107,132,150,255, 45, 46,
- 46, 70,207, 81,109,255,142,235,109,109,247,241,215,161,161,161, 67, 78,157, 58, 53, 98,233,210,165,141, 0, 76,101, 89,118, 97,
-116,116,116,103, 0,104,210,164,137, 8,192, 37,133, 66, 49,118,210,164, 73,147,166, 78,157,138,145, 35, 71, 46, 36,132, 44,171,
- 75, 84,143, 16,194,107,218,180,105,159,158, 61,123,242,244,122, 61,204,204,204,160,211,233, 26,188,206,198,251,250,250, 10, 75,
- 74, 74, 14, 45, 89,178,164,223,128, 1, 3,192,231,243,193,178,172,211,149, 43, 87, 86,204,154, 53,171,125, 64, 64,192,192,170,
- 76, 86, 64, 64, 64, 75, 0, 75, 26, 54,108,216,115,212,168, 81,188, 14, 29, 58,160,168,168, 8,103,207,158,253,242,240,225,195,
- 95, 6, 4, 4,132, 2, 88, 24, 30, 30, 30,242,182, 55,218, 60,185, 57, 30, 15,234, 2,175,232,108, 0, 64,218,230, 53, 0, 0,
-139,175,190,229, 28,205,255,130,193,170,137,146,146, 18,255, 47,166,141, 4,195,148,182,135, 13, 61,235, 97,197,252,241,228,232,
-241, 51,254, 53,132, 55,215, 26,141,198, 70, 54, 54, 54,179,213,106,181,100,253,250,245, 18,165, 82,233,115,240,224, 65,122,255,
-254,125, 8,133, 66, 88, 90, 90,162, 91,183,110,226, 94,189,122, 53, 8, 13, 13,173,119,248,240,225, 1,125,251,246,253,237,196,
-137, 19,199,170, 51, 87,118,246,246,151,191, 93, 58,206,166,153,167, 23,116,122, 61,146, 50, 82, 64,137, 8,206, 14, 50,124, 52,
-176,165,176, 99,160,200,235,219, 31,206,135, 56, 54, 27,240, 78,250,131,163, 15,107,218,198, 78, 13,101,183, 6, 6, 52, 8,232,
- 31,220,158,105,212,216, 23, 66,137,180,226,189,230, 45,253,209,188,165, 63, 25, 63,166,208,243,254,253,251, 11, 78, 95,190, 57,
-191, 83, 67, 89,248,213,167,197,213, 45,140,249,146,121,152, 53,107, 22,108,109,109, 95, 53, 25,184,120,241, 66,149,223, 49,229,
-186,248,226,147, 21, 43, 86, 88,101,100,100,124,248,243,207, 63,191,231,228,228, 52, 37, 45, 45,237,180, 41, 34, 35, 9,241,128,
- 88,220,109,204,119,223,177, 45,223,125,151,103,229,228,196,176, 70, 35, 73,142,141,181,251,110,253,250,224,194,164, 36,169,202,
-220,188, 40, 51, 63, 95, 27, 19, 19, 3, 51, 51, 51,194,227,241, 58, 84, 98, 46,210, 9, 33,171, 25,134,204, 37,132, 16,137,196,
- 44,247,227,143, 63, 14, 45,123,175,201,177, 99,199,204,251,247,239, 95, 72, 8,137, 6, 0,137,196,172, 51,143,199, 88,211,210,
-142,158,213,166, 24, 75,169, 84, 58,109,214,231,243,100, 5, 57,121, 42, 93,113,177,222,222, 66, 78,136,220,156, 87,144, 95, 88,
-152,146,154,169,153,244,233, 12,222,130,121, 51,167,193,196, 76,196,206,206,206,245,124,124,124,110,109,223,190,221,193,214,214,
- 22,121,121,121,200,206,206,198,173, 91,183,192,178, 44,122,247,238, 45,246,247,243,243,255,110,237,218, 48,103,103,231,118,166,
-152, 44,137,173, 29, 14,190,211, 18, 0, 48,228, 89,118, 69,132,229,212,208,255,164, 96, 26,150,144, 95,250, 89,137,164,214,203,
- 47,189, 80,223,237, 58,116,232, 32, 4,128,153, 51,103, 22, 20, 23, 23,175, 32,132,236, 86, 42,149, 41, 53,124,117,214,130, 5,
- 11, 92, 60, 61, 61,221,119,239,222,141,162,162, 34, 0,112,240,244,244, 68,227,198,141,141, 33, 33, 33,240,246,246,134,185,185,
- 57,174, 92,185,130, 27, 55,110, 32, 32, 32,192, 92, 40, 20,126, 80,149,193, 10,234, 25,180, 64,220,191, 73,167,198, 1,163, 32,
-183,112,198,246, 61,251,240, 56,124, 71, 39,141, 46,122,193,138,169, 46, 31,169,168,120,180,107, 35,243,121, 30,129,157,109, 27,
- 54,125, 23,238, 1,119,237,212,198,171,113, 11,167,120,173,228, 75,212, 59, 22,125,171,204,174,202, 92, 57, 57, 57,173,233,221,
-187,247,144, 45, 91,182, 88, 1, 64,100,100, 36,210,211,211, 97,111,111, 15,137, 68, 2,129, 64, 80,177,126,168,169,152,153,153,
- 33, 53, 53,181, 98,153, 41,163,209,136,194,194, 66, 56, 57, 57,149,186,155,175, 9,179,104,145,105, 93, 89,206,206,206, 29,253,
-253,253,119,185,186,186,186,189,248,122,207,158, 61, 49,126,252,120, 80, 74,209,161, 67,135,110,227,199,143,167,148, 82,176, 44,
-139,244,244,244,162,200,200,200,238, 41, 41, 41, 55,171,216,110, 85, 90, 90, 26, 38, 77,154,132,196,196,196, 41, 10,133, 34,129,
- 97, 24, 73,249,114, 96,132, 16,145, 66,161,240,246,246,246,222, 48,126,252,120,196,199,199, 35, 38, 38,230, 86, 93,187, 76, 41,
-165,198,182,109,219, 62,213,235,245,129, 6,131, 1, 42,149, 10,189,122,245,146,248,248,248,164, 11, 4,130, 71,121,121,121, 35,
-202,150,212, 50,197,172,241,157,157,157,157, 4, 2,193,150,113,227,198,245,105,223,190, 61, 30, 61,122,132, 83,167, 78, 97,192,
-128, 1, 8, 10, 10,194,130, 5, 11,250, 46, 88,176, 96, 22,128,170,110, 6, 14, 30, 58,116,168,190,171,171,107,197,146, 72, 22,
- 22, 22,248,248,227,143, 49,114,228, 72,156, 60,121,178,253,242,229,203, 15, 5, 5, 5, 57,132,132,132, 24,222,230, 70, 91, 28,
-216, 30, 94,209,217,120,214,164,180,253, 40, 55, 90,229,207,225,226, 15,142,127,176,193,210,106, 75,116,124, 62,243, 72,225,236,
-183,255,202,229, 79, 43,186, 8, 1,230,145, 86, 91,162, 43, 13,155, 83, 20,148, 24, 96, 38,102, 16,159, 86,136,135,207,178, 42,
- 59, 73,207,191, 98,204, 62,219,184,113, 35, 86,175, 94,221, 91,165, 82, 21,197,197,197,165, 22, 21, 21, 21,127,244,209, 71,132,
-207,231,227,250,245,235,120,254,252, 57,154, 55,111, 14,107,107,107,116,236,216, 81,216,163, 71, 15,183,177, 99,199,126, 4,224,
- 88,101,154, 36, 40,136,239, 44,182, 63,188,102,233, 80, 27, 48, 49,136, 73,204, 67, 3,215,214,176,179,114, 67, 74,102, 17,110,
- 71,157,196,147,216, 19,104,224,226,142,241,195, 27, 90,173,219,122,253, 56, 9,152,208,224,197,238,194,202,166,132, 74,120,198,
- 86,139,247,220,135, 49, 39, 22, 52, 63, 17,180,248,175,171,196, 72,237,220,224,211,206, 17, 82, 43,123, 38,242,209,186, 86, 85,
-109, 59,165, 52,157,207,231,111,227,241,152, 9, 0,208,170, 85,235,226, 85,171, 86, 85,118,177,102, 91,181,106, 93,204,227, 49,
-178,210, 8, 22,111,171,193, 96, 72,175,174,156,175,152,153, 53, 34,145,120, 54, 0,226,234,234, 86,116,244,232, 81,246,253,247,
-223,199,154, 53,107,196,243,230,205,251,193,195,195,163, 75,124,124,124, 66,117,251,104, 16, 33,245, 92, 26, 52,232,177,236,250,
-117, 42,208,235, 73,206,173, 91, 5,133,233,233,250,148,194, 66,201,111,119,239, 14,158, 50,103,142,196,201,203, 11,161,231,207,
-155,167,229,230, 22,230,149,148,104,227,226,226,168,209,104,188, 90,197,182,127,225,232,232,216,108,199,142, 29,254, 31,127,252,
-113,104, 74, 74,202,160,178,110,140,195, 0,218, 18, 66,162, 95,124,237,240,225,195,237, 71,141, 26,117, 55, 61, 61,253,139,234,
-202,249, 2, 77,237,237,236,164,123,182,238,140,176, 49, 55, 99,236, 93, 21,140,192,202,138,111, 16,153, 9, 89, 64, 85,207,173,
-190, 12, 64,211, 42,234,236,213, 69,195,137,135,135,199,225, 95,127,253,213, 65, 32, 16,192,104, 52,194,222,222, 30,207,159, 63,
- 71, 94, 94, 30, 10, 11, 11, 17,247, 40, 26,245,221,220, 48,125,252, 39,206, 95,127,187,246, 48, 33, 36,240,197, 70,172,210,197,
-184,117,186, 87, 27,156,170, 22, 8,135, 41,229,172, 10,150,101,159, 43,149, 74, 72,165, 82, 52,105,210, 68,126,251,246,237,171,
- 41, 41, 41, 41, 53,105, 74, 36,146, 15, 58,116,232, 96,190,103,207, 30, 4, 4, 4,192,210,210, 18, 33, 33, 33,136,140,140,132,
- 78,167, 99,138,138,138, 96,110,110,142,149, 43, 87,194,221,221, 29, 5, 5, 5, 72, 76, 76,180, 21, 8, 4,118, 85,105,134,156,
- 9, 89,154, 31,123,105, 65, 26, 57,221,107,251,158,125, 24, 55,108, 40,156,232,179,171,150, 13,200,210, 30,253, 59,124, 69,121,
-110,253,100,230,126,214,141,154,245,135, 80, 36,199,212, 57, 75, 16,243,224,152,117, 73, 97,196, 20, 98, 76,114, 3, 48,253, 85,
- 77, 82, 90, 65,140, 66,161,248,100,235,214,173,230, 21,119,244,101,107, 18,190,104,172,202, 31,149,213,105, 85, 11,166,235,116,
- 58,232,116, 58, 24,141, 70,100,101,101,161,176,176, 16, 86, 86,101,137,250, 23, 1, 4,132,208, 42, 86,161,127, 81,147, 97,152,
- 17,251,246,237,115,147, 74,165,175,126, 6,101,209, 65, 72,165, 82,176, 44, 11,157, 78, 7,131,193, 0,141, 70, 35, 15, 10, 10,
-154, 12,224,102,101,154, 60, 30,111,230,164, 73,147, 58, 28, 63,126,220,107,233,210,165,208,233,116,107, 50, 51, 51, 49,126,252,
-120,176, 44,139,142, 29, 59,182,165,148, 62,158, 62,125, 58, 0, 96,241,226,197,250,162,162,162,137,117, 61,150, 28, 29, 29,125,
-251,247,239,239,117,225,194, 5,116,234,212, 9, 26,141, 6, 95,125,245,149,197,234,213,171, 45,246,239,223,111,191, 98,197,138,
- 95, 0,244,172, 78, 51, 32, 32, 64,144,158,158, 62,119,196,136, 17,179,130,131,131, 45, 19, 19, 19, 97,102,102,134,163, 71,143,
- 98,235,214,173,167,116, 58,221,130, 67,135, 14, 45,219,182,109, 91,175, 1, 3, 6, 96,235,214,173,211,202,134, 69,176,149,104,
- 42,220,220,220, 16, 17, 17, 1,107,107,107,216,217,217, 33, 63, 63, 31, 55,110,220,192,173, 91,183,224,227,227, 3, 66,136,117,
- 89,155,102,120,157,243,168,150, 70,244,255, 93,179,124,134, 26,251,194,177, 75, 41, 45,221,104, 90,247,114, 18, 66,248, 10,133,
- 98,128,149,149,213, 20, 74, 41, 63, 55, 55,119,171, 84, 42, 61, 24, 27, 27,171,253,255,218,246,127,133,193,114,113, 65, 65, 86,
-150,117,140,131, 83,243,125, 14, 78, 77,203, 82, 85, 51,143,120, 60,235, 24, 71,199,146, 2, 0,208, 25, 40, 66, 31,229, 33,226,
-105, 26, 34,159,166, 65, 38,174,249,174,219,214,214, 22,237,219,183,199,209,163, 71,145,148,148, 36, 95,185,114,101, 35,157, 78,
-167,235,223,191,191,210,195,195, 35,183, 99,199,142, 16, 8, 4,184,125,251, 54, 10, 10, 10,192, 48, 12,196, 98, 49, 88,150,173,
-242, 86,212, 33,215,122,212,168,241,205, 61,237,172, 24, 28,187,118, 26,109,125, 6, 66, 42, 22, 32, 51, 79, 5, 2,130,103,207,
-207,131, 53,200,113, 63, 58, 30,237,253,164,120,167,181,149,107,209,133,156,241, 0,126, 48,165,130,116,113, 33, 16,249, 14, 2,
-216,166,160,185,177, 96, 11, 82, 64,165, 14, 40,102,205,144,165, 76,192,163,171, 7, 64,117, 53, 15, 21, 51, 24, 12, 19, 29, 28,
- 28,152, 5, 11, 22,244,247,244,244,100,167, 78,157,122,253,249,243,231, 67, 94,252, 76,253,250,245, 15,108,218,180,169, 67, 92,
- 92, 92,201,210,165, 75,143,101,100,100, 76,170,229,137, 57,151, 16,178, 14, 0,146,146,146,178,255,248,227,143, 78, 87,174, 92,
- 89,177,110,221, 58,215,169, 83,167,138,167, 78,157, 58, 23,192,164,234,186, 5,101, 98,113,240,178, 43, 87,168, 33, 57, 89,115,
-100,235, 86,222,250,176,176,121, 58,150,173,103,239,224,192, 15,234,212, 73,109,103,101, 85,156,158,150,198, 90, 41, 20,228,121,
-108,172,156, 21, 8,116,167, 79,159, 46,204,201,201,169,114,153, 17, 62,159,175,169,172, 91,176,138, 99,132,173,108,140, 86, 53,
- 20,176,148,234,172, 60, 61,105,143,110,237, 26, 62,125,252,236,153,196,202,138,215,168, 97,253,198, 15, 31, 61,191, 69,141, 6,
- 53,128, 2, 19,187,216,134, 46, 90,180,168,185,133,133, 5, 88,150,133,165,165, 37, 50, 51, 51,161,213,106, 81, 80, 80, 0,109,
- 97, 62,180,249,249,136, 76,120,142, 14, 65, 65,232,209,174,109,147, 19,122,253, 80, 0,123,171,211,181,241,243,175,136, 92, 29,
-240,250, 79,212,242,195,248,188, 10,179,117,178,117, 3,136,228, 50, 52,159,241, 69,157, 79,230,212,212,212,187,238,238,238, 39,
-123,247,238,221,103,194,132, 9, 76, 90, 90,218,105, 71, 71,199, 14,233,233,233, 81,213,125, 79, 46,151, 55, 40, 55, 20,150,150,
-150, 88,191,126, 61, 28, 29, 29, 81, 82, 82,130,219,183,111, 83, 87, 87, 87,114,233,210, 37,184,186,186, 34, 43, 43, 11, 58,157,
- 14,197,197,197,105, 90,173,182,202, 3,191,172, 27,176,247,204,222,206,167, 30,135,239,232,228, 66,226,110,127, 48,171,243,211,
-199,145,143, 18,207,158,187,254,141, 65, 45, 73,202, 75, 62, 63,215,179,213, 93,187, 41,179,191,198,166, 53,139,240,248,230,149,
- 28,199,122, 5, 63,152, 17,205,111,109,186, 87, 27, 65, 87, 63,122,244,200,252,254,253,251, 32,132,192,210,210, 18, 82,169,180,
- 82,147,101, 42, 70,163,177,226,111, 86, 86, 22, 50, 51, 51, 17,155, 16,131, 67, 23,119, 64,111,208,219,253,218,198, 34,205, 75,
- 40,140,176,203, 39,243,179, 30,208,187, 53,156,135, 91, 63,252,240,195,161, 46, 46, 46,230, 47,190,222,162, 69, 11,140, 24, 49,
- 2, 59,119,238,196,157, 59,119, 42,186, 49, 41,165,200,204,204, 76, 53, 26,141,191, 85,165,153,152,152,152,231,234,234,218,235,
-147, 79, 62, 9, 63,114,228,136,197,183,223,126, 11,163,209, 8,131,193, 80,209, 45, 90,254,119,247,238,221, 8, 15, 15, 95,152,
-150,150,246,168, 46,199,145,147,147,147, 79,255,254,253,175,252,240,195, 15, 86, 25, 25, 25,200,202,202, 66, 81, 81, 17,138,139,
-139, 97, 52, 26, 81,191,126,125, 98, 48, 24, 26,215,212, 29,200, 48,204,209,139, 23, 47,246,106,212,168, 17, 0, 64,175,215, 35,
- 52, 52, 20,227,199,143,207,150, 74,165, 31,196,199,199, 23, 43, 20,138, 47, 79,156, 56,209,171,101,203,150,240,243,243,115,202,
-200,200, 48, 7,144, 95,197, 13, 4,140, 70, 35, 50, 51, 51,145,153,153,137,159,127,254,207, 58,206, 26,141,166, 44, 56,160, 37,
-173, 90,181,170,127,251,246,237,231,111,107,163, 29,255,251,118,196,207,255, 20, 30, 87, 31, 3, 0,194,125, 75,135, 92,185, 95,
-142, 46, 29,126, 48,106, 84,173,244, 20, 10,133, 45,165,116, 92,112,112,240,140, 94,189,122,217, 43, 20, 10,216,216,216, 32, 50,
- 50,178,195,153, 51,103,190,119,117,117,253,209,104, 52,254,104, 74,180,158,195,164, 46,194,193, 70, 59,187,131, 89, 41, 41, 34,
-157, 72, 36,141, 41,143,106,149,154,171,193, 70, 96, 15, 12, 58,125,217, 5,130,150, 61, 76,235,214, 80,167,190, 15, 86,245, 39,
- 28,164, 3,176,109,219, 17,100,100,100, 8,215,175, 95,239,113,228,200, 17,215, 17, 35, 70, 36, 54,108,216, 48, 63, 40, 40, 8,
- 59,118,236,128,147,147, 19, 52, 26, 13,216,106,196,205,109,140,131,219, 54,111,200,123,146,240, 0,129,222,131, 81, 95,209, 17,
-207, 82,242,145, 83,168, 65,118,190, 10,141,189,103, 35, 61,187, 4,249,197,106, 68, 62,222, 13, 23, 39, 79,134, 39,136,237,101,
-170,193, 82,223,223, 5, 77,228, 62, 8,189,186, 64,212,116, 40, 4,174,237,144, 20, 25,130,123, 39,191, 67,242,195,107,160,172,
- 17,142, 30, 77, 76,218,118,129, 64,176,228,196,137, 19, 61,150, 47, 95, 46,232,214,173, 91, 7,133, 66,209, 94,169, 84,134,150,
- 29,228,237,251,244,233,211,193,193,193, 1, 27, 54,108,208, 10, 4,130, 37,117,188,251,121,177, 91,237,146,147,147,211,212,195,
-135, 15,255, 57, 97,194, 4, 56, 59, 59,183,169,238,187,153, 2, 65,139,209,203,151, 83, 1,143, 71, 79,252,242, 11,153,127,242,
-228,198,157,191,255, 46,234,208,161, 3, 8,128,136,200, 72,201,202,245,235,205,134, 14, 24,144, 17,243,252, 57,206, 94,188,168,
-201, 72, 75,203,202, 44, 46,158,243,166,102, 23,213, 22,131,193, 16,150,152,148,232, 18,216,166,165,253,221,232,184,135, 61,187,
-182,111,207, 48, 12,243,248, 89, 66,168,189,189,133,244,234,213, 43, 58,131,193, 16,102,226,254,233,215,177, 99, 71,126,110,110,
- 46, 20, 10, 5, 50, 51, 51,145,146,146, 2,189, 94, 15,117,126, 46,116,249,249,208, 23,228,193, 88, 92,132,184,219,183,224,235,
-230, 34, 62, 91, 58, 8,126,111, 77,119,156,149, 69,168, 94,140,100,137,205,229, 16,203,229, 47, 45, 78,109,226,197,113,128,133,
-133,197,220,194,194,194,147, 41, 41, 41, 75,181, 90,237,212,229,203,151,183, 90,178,100,137,221,188,121,243, 44,230,204,153,115,
-192,195,195,163,101,124,124,124,149,166,181,168,168, 40,214, 96, 48,216, 1,112,184,112,225, 2, 28, 28, 28,144,159,159, 95,186,
-221,106,181,182,164,164, 68,146,157,157, 13,141, 70, 3,173, 86, 11, 11, 11, 11,220,185,115, 39,215, 96, 48,252, 89, 83,249, 44,
- 26,144,165, 26, 93,244, 2,219, 38, 50,165,206, 96,221, 57, 35,135,205, 93,244,173,114, 9,128,239,122, 55,104,176, 93,199, 94,
-137,123,242,224,152,245,243,219, 33, 57,202, 39,197, 94,219, 79, 60, 43,172,166, 30, 41, 33,132, 37,132, 80,111,111,111,100,102,
-102,130,199,227, 65, 42,149, 66, 46,151,195,199,199, 7, 73, 73, 73,117, 54, 88, 6,131,161,194, 92,157, 11, 59,142,236,162, 84,
-108, 95,179, 7, 46, 78,110, 12, 0,251,148,180,164,238, 99,103, 13,105,227,217,209,122, 69,220,181,220, 42,199,181, 41,149,202,
-123, 0, 44, 94,190,105,117,233, 98, 99, 99,115, 81,171,213, 34, 62, 62, 30,103,207,158, 13, 74, 78, 78,190, 92,155,125,157,156,
-156,252,204,197,197,165,215,123,239,189,183,163,121,243,230, 13, 40,165,240,241,241,193,128, 1, 3,112,232,208, 33, 68, 69, 69,
-161,160,160,128,189,122,245,234,175,169,169,169,181, 26,144, 67, 8, 33,148, 82,234,236,236,220,184, 95,191,126,215, 54,109,218,
-100,157,149,149, 5,149, 74,133,226,226, 98, 28, 60,120, 16,157, 58,117,130,141,141, 13,254,248,227, 15, 67,121,143, 66, 85,230,
-138, 82,122,244,200,145, 35,189,188,188,188,240,232,209, 35,156, 59,119, 14,158,158,158, 16, 8, 4,232,215,175,159,237,190,125,
-251,166,250,250,250,174, 21, 8, 4,223,244,233,211, 7, 70,163, 17,119,238,220, 73, 77, 72, 72, 40,172,201, 4, 87,134, 74,165,
- 2,165, 20,122,189,126, 61,195, 48, 31, 4, 4, 4,244, 8, 15, 15,191,245,182, 52,212,174,174,174, 77, 5, 2,193,116,107,107,
-107,100,103,101, 33,159, 5,114,114,114, 64, 41, 69, 62, 91, 26,184,146,101,255,167, 87,189, 81,163, 70, 39, 84, 42,213,252,228,
-228,228, 42,215,242,114,113,113,241,147, 74,165, 51,250,247,239, 63,162,111,223,190, 60,189, 94,143, 99,199,142, 97,211,166, 77,
-232,213,171, 23, 26, 54,108,136, 57,115,230, 88,170,213,234,121,167, 79,159,158,219,164, 73,147,211,133,133,133, 95, 84,167,201,
- 97,146,193, 42, 53, 89, 46, 46,200, 45,187,163,177,179,177,177,217,100, 52, 26,187, 0, 95,193,156,111,137, 71,119,111, 35, 39,
-155, 7,141,202, 8,150,150,154, 44,147,186, 49, 84,127,194,194,155,162, 32,134, 64,175,215,195,209,209, 17, 43, 87,174, 68,126,
-126, 62,127,236,216,177,245,191,254,250,235,123, 90,173, 22,197,197,197, 80,169, 84, 80,169, 84, 48, 26,141, 85, 26, 44,161, 88,
-211,188,158, 99, 35, 20,170, 90, 67, 42, 22, 33,167, 64, 83,106,174,242,212, 56,244,231,135,208,148,168, 96,212,233, 96,208,234,
- 33,119, 28,136, 6,190, 93, 0, 60,109,102,162, 89, 41,253,203, 26,160,125,122, 14,218,167,231, 32,235,178, 0, 71,151,143,120,
-229,196, 55,109,114, 98, 74, 74, 74,138,139,139,203,206,187,119,239,126,252,193, 7, 31,224,210,165, 75, 95,162,108,102,149, 68,
- 34,249,242,131, 15, 62,192,221,187,119, 17, 29, 29,189,179,170,174,157,218, 34, 18,137,138,181, 90,109,121, 87,144,180,134,207,
-186,180, 26, 52,136,201,191,123,183, 96,249,197,139,139,126,251,237, 55,209, 59,157, 58, 65,175, 47, 53,211,245,235,215, 71,143,
-158, 61,197,187,246,239,151,171,242,242,110,207,159, 58,245,207,205,163, 70, 21,220, 42, 42,122, 96, 98,125, 54, 41,235, 26, 4,
-165,180, 73, 85,175,213,134,226,226,226,141,243,231,205, 10, 62,120,232,168, 91, 61, 55, 23,139, 51,231, 46,223, 23,155,137, 24,
-175,250, 13,120,133,133,121,252, 77,235,191, 51, 43, 42, 42,250,222, 68,185, 38,118,118,118, 72, 75, 75,195,211,167, 79,161,209,
-104, 74,183,189,164, 24,218,220, 60,104,243,115, 64,212, 42,136,141, 70,168,179,210,225,225,229, 9,252,103,134, 97, 77, 13, 88,
-165, 6,171,252,175,153,133, 5,132, 50, 25,120, 2,129,201, 99,176,156,157,157, 3,252,253,253,247,111,219,182, 77, 56,115,230,
-204, 54, 30, 30, 30,155,210,210,210, 18, 92, 93, 93,187,173, 89,179,230,214,178,101,203,196, 35, 70,140,104,188,117,235,214, 81,
- 0,182, 86,121, 19,161, 86,239, 63,113,226,196,112,119,119,119,135,200,200, 72,168,213,234,242,241,102, 0, 32, 41,255,220,227,
-199,143, 85,106,181, 58,227,193,131, 7, 5, 9, 9, 9, 90,152, 48,235,111,209, 6,101,216,204, 33,174,131, 28,157, 92,110, 72,
-204, 60,234,211,162,187, 3,103, 14,113, 93,179,246, 64,178,250, 84,108,108,225,194, 41, 94, 43,139, 11, 35,166, 88,185, 22,253,
-112,234,216,179, 66, 83, 14,163,178, 25,131,176,181,181, 5,159,207,135, 64, 32, 64,249, 88, 36, 71, 71, 71,228,231,231, 87,219,
- 69, 88, 85,227, 93, 80, 80,128,252,252,124, 60,121,254, 8,217, 69,169, 56,187, 39, 12, 70,163, 17,106,181,186,212,204, 58,186,
-226,252,222, 91,230, 65,131, 91,205,183,245, 35,151,178, 35,232,109, 83,143, 83,134, 97,102, 12, 26, 52, 8, 58,157, 14, 3, 6,
- 12,192,158, 61,123,102, 0,184, 92,219,227, 61, 37, 37,229, 6, 33,164,209,211,167, 79, 45,244,122,253,187,253,251,247,255,173,
- 79,159, 62, 8, 11, 11,195,133, 11, 23,130,180, 90,109,140,209,104, 84, 57, 59, 59,175,112,118,118,118, 32,132,172,168,110,130,
- 71, 89, 42,134,205, 77,155, 54,125,183, 75,151, 46,247,251,244,233,211,108,211,166, 77, 86, 25, 25, 25,229,147, 26,144,156,156,
-140,147, 39, 79,166, 30, 59,118,172,128,101, 89, 91,134, 97, 78,100,101,101,125, 81, 85,183,160, 78,167, 59,114,236,216,177, 94,
- 94, 94, 94,184,124,249, 50,150, 47, 95,142,230,205,155,227,196,137, 19,240,240,240,128,143,143, 15,108,108,108,166, 23, 20, 20,
-180, 91,189,122,117, 31,127,127,127, 28, 57,114, 4,233,233,233,223, 87,151,178,193, 96, 48,212,104,176,186,118,237, 58,126,230,
-204,153,232,223,191,255,217,192,192,192,214,119,238,220,249,159, 79,211,162, 80, 40, 86, 6, 7, 7,207,109,209,162, 5,126,255,
-253,119,168, 3, 58, 64,246,235, 49, 60,232,215, 1, 20,128,226,215,163,160,148,226,225,128,119, 64, 1,212,239, 54, 24,115,231,
-206,237, 51,112,224,192,122,168, 98,120,132, 66,161,248,246,163,143, 62,154, 53,114,228, 72,132,135,135, 99,235,214,173,184,119,
-239, 94, 69,155,167,215,235, 17, 29, 29,141,232,232,104, 56, 59, 59,163, 95,191,126,100,194,132, 9,189,123,247,238,109, 15, 32,
- 16, 28,175,107,176, 42,194,197,118,214,214,214, 15,127,248,225, 7,219,214,173, 91,243, 12, 6, 3, 46,133,132, 96,241, 87,179,
-208,187,231,199,208,177,150, 48,104,133, 96,133, 18,211,126, 81,220, 15, 5, 49, 4,172,176, 15,180, 90, 45,198,237, 22,192,138,
-100, 96,253,104, 71, 0, 32,106,181,186,194, 88,149,223, 61, 85, 23,193, 42,204,151,233,244,122, 10,101, 70, 2,146, 83, 31,194,
- 66,238, 6,202,115, 67, 70, 78, 9, 8, 28, 97,208,196,192,168, 47, 53, 64, 26, 85, 50, 74,180,228,181, 42,204,152,243,215,217,
-192, 70,131,233, 99, 42, 41,165, 27,118,237,218, 53,124,237,218,181,226,190,125,251,250, 57, 59, 59,247, 0,128, 33, 67,134,248,
- 89, 88, 88, 96,215,174, 93, 26, 74,233,134, 55, 24,225,121, 47, 48, 48, 16, 57, 57, 57,136,143,143, 15,173,118,219,180, 90, 91,
-185,131, 3, 47,227,210, 37,125, 78, 97, 97,189, 78,101,230,138, 97, 24,228,230,230,226,249,243,231,144,203,100,120, 16, 21, 37,
-254,110,210,164, 93, 62,126,126, 76,249, 12, 67, 83, 56,118,236,152, 57,128,182, 53,189, 86, 27, 50, 51, 51,139,157,156,156,198,
-124, 57,127,254,145,239,191,255,222, 50, 61, 35, 61, 70, 44, 18, 25,228,114,137, 98,250,244,201,252,130,130,130,225, 89, 89, 89,
- 69,166,234,229,230,230, 34, 46, 46, 14,102,102,102, 16, 10, 4, 96, 85, 37, 48, 22, 23, 65,157,147, 9,158, 78, 11,145,209, 8,
- 27,169, 24,110,142,142,168,103,111,103, 90,215,221,165,179, 21, 3,218, 95,236, 22, 60,221,190, 49,196,114, 25,196,114, 57, 58,
-252, 81, 58,132, 77, 40, 20, 2,235,183,153,210,141, 99,167, 80, 40,254,220,180,105,147, 48, 59, 59, 27, 15, 31, 62,188, 31, 31,
- 31,159,111, 99, 99, 99, 46, 16, 8,216, 39, 79,158,156,127,244,232, 81, 63, 79, 79, 79, 80, 74,107,154,253,245,221,225,195,135,
-187,119,236,216,209, 80,191,126,125, 89, 70, 70, 70,189,252,252,124,146,154,250,242, 24,230,219,183,111, 75, 18, 19, 19,139, 89,
-150, 61,130,210, 60, 88, 53, 30,248, 51,135,184, 74, 66,239, 98, 90,231,158, 30,205, 45,236,252,144, 99,184,219,252,198,253,212,
-105, 51,135,184,110, 92,123, 32, 89,109, 70, 52,191, 17, 99,146, 27, 95,162,222, 97,226,249, 67,125,125,125, 65, 41,197,173, 91,
-183,112,237,218, 53, 92,185,114, 5, 9, 9, 9, 21,159,177,180,180,196,185,115,231,208,165, 75, 23,147,143,163,146,146, 18, 56,
- 59, 59,195,218,218, 26,135, 47,237,196,246, 53,123, 42, 6,186,151,147,149,149, 5,169, 84,138,101,159,175,149,143,157, 51,248,
- 27, 0, 61, 76,209,118,115,115,243,236,208,161, 67, 95, 71, 71, 71,228,230,230,194,193,193, 1,173, 90,181,234,239,232,232, 88,
- 63, 61, 61,189, 78, 93, 89, 90,173,118,114,151, 46, 93,150,126,254,249,231, 48, 24, 12,248,240,195, 15, 17, 23, 23,183,255,217,
-179,103,235,221,221,221,167, 77,153, 50,197,209,206,206, 14,147, 39, 79,150, 1, 24, 84,141,193, 90,177,122,245,234,225,193,193,
-193,140, 94,175,127,231,194,133, 11,136,143,143,135, 86,171,133,193, 96, 64,124,124, 60, 22, 45, 90,148, 90, 80, 80,208, 57, 57,
- 57, 57,182,166,114,165,165,165,205,250,227,143, 63,250,120,123,123,227,204,153, 51,152, 56,113,226, 9, 11, 11,139,166,126,126,
-126,245,234,213,171,135, 63,255,252, 19,102,102,102,112,118,118,118,156, 55,111, 94,191,158, 61,123,226,252,249,243, 88,178,100,
-201,113, 39, 39,167,239,106, 50,193,124, 62, 31,122,253,203, 55,180, 60, 30, 15,247,238,221, 67,215,174, 93, 49,119,238, 92, 0,
-192,249,243,231, 45,122,244,232,241, 32, 40, 40,200, 34, 36, 36, 68,131,255, 97,100, 50,217,152, 95,127,253, 21, 79,159, 62,197,
-213,171, 87,145,149,149, 5,173, 86,139,188, 50, 43, 42, 46,139,100, 81, 23,119,180,159, 53, 31,195,250, 13, 66,106,106, 42, 24,
-134,177,171,230,134,111,196,252,249,243,113,234,212, 41,172, 90,181, 10,249,249,249,149,126,206,204,204, 12,173, 90,181, 66,203,
-150, 45, 17, 23, 23, 7, 0,118,224,120,115, 6,203,218,218,122,253,230,205,155,109, 59,116,232,192, 43, 51, 59,104,221,170, 21,
- 70,141, 25,131,115,135,143,195,193,187, 23,136, 86, 14,131, 84,100, 90, 4,203, 98, 7,178,245,217,144, 8, 37, 16,107,181, 96,
- 89, 51, 68, 36,171, 43, 92,179, 74,165, 66,185,201, 42, 46, 46,134, 76, 38,171,222, 64,104, 69,225,209,113, 6,183,252,194,123,
-184,113,119, 39,244, 90, 61, 26,120,207,135, 74,111, 11,153,253,199, 80,107,255,132, 49,175,116,230,174,200, 34, 8,105,105, 89,
- 0,136,169, 17,151,191,158,228,133,127, 29,236,206, 26, 77,207,187,170, 84, 42,179, 21, 10,197,214,208,208,208,233,131, 6, 13,
-194,185,115,231,230, 3,192,160, 65,131, 16, 26, 26,138,184,184,184,173, 74,101,229, 51,168,106,139,139,139,203,168,206,157, 59,
- 79,105,221,186, 53,142, 31, 63, 14,163,209,120,210,148,239,241, 4, 2, 74, 8, 65,249, 12,167,156,220, 92, 60,126,252, 24, 57,
-217,217, 48, 26,141, 40, 81,169, 12, 77, 27, 55, 46,160, 44,107, 94,155,242,188, 56, 99,176,178, 89,132,229,175,213,118, 59,211,
-210,210, 18, 26, 52,104,144, 88, 82, 82,108,111,109,101, 93, 40, 18,137,140, 5,133,133,249, 79, 99, 30,105, 77,105, 20, 94, 32,
- 58, 42, 42,170, 89,114,114, 50, 18, 19, 19, 97, 40, 46, 4, 79,163, 5,163, 41, 65,183,246,237, 96, 6, 10, 9, 88, 8, 88, 61,
- 4, 60, 1, 10, 75,103,219, 69,215,120,204,191,208, 32,148,155, 43, 66, 8, 36,114, 57, 68,114, 25,196,230,242,151, 34, 90,166,
- 76,252, 50, 51, 51,219,189,117,235, 86,103, 39, 39, 39,172, 93,187, 22,206,206,206, 62,193,193,193, 37,157, 59,119, 54,179,179,
-179,131,183,183, 55, 2, 3, 3,113,233,210, 37, 16, 66, 98,107, 56,206, 13,132,144, 30, 87,175, 94,157,117,253,250,245, 33, 10,
-133,130,140, 28, 57, 18,189,122,245,130, 68, 34, 65, 73, 73, 9,114,115,115,113,226,196, 9, 98, 52, 26,253,203, 12,158,187,135,
-135,199, 30, 66, 72,242,243,231,207, 63,120, 85,115,231, 58, 63, 69, 70, 14,251,177,163,147,203,192,206, 61, 61,154,119,237, 25,
- 12,207, 70, 93,209,181,103, 34, 0,172,180,225,199,127,184,102, 65,179, 35,118,110, 54,191,156, 61,125,110, 81,199,206, 93,191,
-156, 55,193,122,233,202,173,185, 53,142,151, 35,132, 84, 52,182, 12,195, 84, 26,165,226,243,249, 21,179,205,106,188,105, 98,141,
-201,189, 70,183,171,120,174, 55,232,237, 92,156,220,152,242,200, 21, 0,228,231,231, 35, 41, 41, 9,122,189, 30,182,182,182,208,
-235,117,126,181,232,126,156, 54,116,232, 80,162, 86,171, 49,107,214, 44,124,251,237,183, 24, 48, 96, 0,185,121,243,230, 52, 0,
- 51,234, 16,209, 88, 51,101,202,148, 89, 99,198,140, 65, 94, 94, 30, 46, 94,188,136, 46, 93,186, 96,203,150, 45,246, 23, 47, 94,
- 92,222,190,125,123,240,120, 60,156, 59,119, 14, 58,157,238,113,181, 13, 0,159,255,110,112,112, 48,147,148,148, 4,161, 80,136,
-192,192, 64, 36, 39, 39,163,164,164, 4, 25, 25, 25,248,250,235,175,211,242,243,243,131, 82, 82, 82, 98, 77,216, 47, 76,135, 14,
- 29,166, 55,108,216, 16, 23, 47, 94,196,164, 73,147, 78,201,100,178, 65,217,217,217, 19,212,106,245,198,161, 67,135,194,199,199,
- 7, 49, 49, 49,232,219,183, 47, 90,181,106,133,139, 23, 47, 98,206,156, 57, 39,164, 82,233,251, 53,228,193,122, 18, 18, 18,210,
- 44, 48, 48, 16, 37, 37, 37, 40, 40, 40,128, 64, 32,128,149,149, 21,162,163,163,209,168, 81, 35,204,157, 59, 23,107,215,174,197,
-204,153, 51,217, 30, 61,122, 24,116, 58,157, 80, 36, 18,253,207, 55,210,197,197,197, 52, 53, 53, 21, 22, 22, 22, 56,112,224, 0,
- 34,207,159,193,201, 79, 63,134,100,193, 26, 80, 74,145,180,116, 30,186,205, 89,128,182,247,159, 33, 53, 53, 21, 59,118,236, 0,
-195, 48, 21, 51, 98,171,106,219,242,243,243,209,178,101, 75,220,186,117, 11, 59,118,236,192,186,117,235, 42,162,181, 2,129, 0,
- 65, 65, 65,232,222,189, 59,158, 60,121,130,173, 91,183,194,194,194,130,115, 76,111,218, 96,177, 44,219,181, 85,171, 86,188,162,
-162, 34,168,213,106,164,165,165, 33, 62, 62, 30,102, 82, 51, 36,101,165,160,133,191, 14,105,108, 1,162,239, 63, 52, 18,158,224,
- 94, 77,119, 32, 90,173, 22, 90,173, 22, 17, 17, 17,165, 83,223, 27,173,168, 24,232,169,215,235,161,209,104,160, 82,169,112,241,
-226, 69, 42, 22,139, 33,147,201, 72,117,125,239,172, 65,115,234,226,181,251,125, 70, 12,236, 34, 58, 23,178, 29,122, 45,139, 2,
-181, 5,138, 84, 26, 20,169, 5,208,136,123,130,144,171, 96,120, 98,180,111,217, 16, 23,175,197,168,141,122,157, 73,233, 10,192,
- 26,193,119,246,131, 33, 53,226, 63, 47,189, 50,155, 80, 40,149,131, 53,214,110, 86,176,153,153,217,150,221,187,119,143,105,215,
-174,157,121,112,112,112, 35, 0, 16,139,197,236,238,221,187, 11,205,204,204,182,212,118, 39,190,154,189,221,217,217,185,163, 72,
- 36,154,218,191,127,255,142, 99,198,140,193,195,135, 15,241,251,239,191,223, 87, 40, 20,213,142,153,225,137, 68,217, 69, 25, 25,
- 86,242,250,245,249, 86,230,230,202, 51,103,206,120,188,211,185, 51, 18,226,227,145,147,147, 3,149, 74,133,168,232,104, 42,100,
-152, 68, 98, 97,193, 60,190,123,151,225,137, 68,217,181, 40,103,116, 77,179, 8,235, 26,205,146,153,145, 6, 11,230, 78,240, 84,
-171,213,205, 10, 10, 10, 12, 2,129, 64, 32, 21,209,132,218,104,232,245,250,227, 87,175, 94,125,175, 67,135, 14,226,152,136,123,
- 48,228,231, 67,155,159, 11, 33,107,132,141,127, 11,240,116, 26, 64,171,135, 75, 19, 10,117,158, 20,215,239, 61,211,235,245,250,
-227,166, 26, 44,134,199,123,121,220,149,133, 28, 98,115,115,136,228,242,151, 94, 39, 53,244,107, 57, 58, 58, 74,123,247,238,221,
-205,223,191, 52,167,214,154, 53,107,160,211,233, 68,122,189,190, 98, 38, 92, 81, 81, 17, 14, 30, 60,136,157, 59,119, 94,183,180,
-180,252,213,132,155, 9,131,171,171,235, 84,150,101, 29, 12, 6,131,206,222,222, 94,184,127,255,126, 72, 36, 18, 48, 12,131,150,
- 45, 91, 66, 34,145,104, 20, 10,133,174,172, 12,250,181,107,215,242, 63,254,248, 99, 97,101,122,141,155,251,204,246, 52, 88,119,
-150,152,121,212,183,176,243,131,103,163,174, 0,128,238,253,198,194,179, 97, 61, 20,100, 69,212, 87,171,226, 7, 10,249,185,214,
- 15, 55,166, 68,153,245,109, 54,166, 56, 35,228, 9,128,159, 76, 58, 53, 89, 22,193,193,193,232,217,179,103, 69,119,160,131,131,
- 3,180, 90, 45,140, 70, 99,173,198,178,149, 39, 17,253,250,107,194, 96, 17,240,107, 27,139, 52, 0,246, 47,154,171,196,196, 68,
- 36, 38, 38, 86,220, 8,178,212,180, 20, 42, 10,133,194,204,211,211,115,116,179,102,205,112,225,194, 5, 68, 68, 68,164,132,132,
-132,184,180,110,221, 26,174,174,174, 99, 20, 10,197,124,165, 82,105,114, 66,101,123,123,123, 89,167, 78,157, 62, 29, 51,102, 12,
- 30, 61,122,132,121,243,230,101,167,166,166, 30, 57,118,236,216, 39,159,125,246, 25,211,185,115,103,100,100,100, 96,203,150, 45,
-198, 91,183,110,125,107,109,109,189,164,134,253,254, 72,169, 84,186,170,213,106,228,228,228,192, 96, 48,160,164,164, 4,167, 79,
-159,198,153, 51,103,210,243,242,242,130,148, 74,229, 83, 83,202,230,238,238,110, 30, 24, 24,232,248,228,201, 19,236,217,179, 7,
- 58,157,110, 65,124,124,188,206,210,210,114,215,242,229,203, 23, 89, 90, 90,218, 4, 7, 7,163,252,184,253,243,207, 63,177,120,
-241,226, 19,102,102,102,131,162,162,162,116, 53,200, 15,252,230,155,111,190,177,179,179,251, 96,248,240,225, 76, 96, 96, 32,238,
-220,185, 3,163,209,136,110,221,186, 85,152,171,211,167, 79,239, 62,125,250,244, 96, 0, 66,185, 92, 46,249, 95,143, 94,149,163,
- 86,171, 17, 19, 19, 3, 71, 71, 71, 52,108,221, 14,115, 31, 60,199,213,208, 48, 80, 74,209,241,225,115, 20, 21, 21,227,215, 95,
-127, 69,120,120, 56,120, 60, 30,188,188,188,106,212,212,233,116,120,250,244, 41, 50, 51, 51, 49, 96,192, 0,140, 24, 49, 2,171,
- 87,175,134, 78,167,195,151, 95,126,137,156,156, 28,108,219,182, 13, 79,159, 62, 5,159,207,135, 92, 46,231, 28,211,155, 54, 88,
-101,221, 76, 96, 89, 22, 41, 41, 41,184,115,231, 14,158, 63,127, 14,153, 76, 6,149,193,200,110, 57,127,141, 37, 68,152,204, 82,
-122,157, 26, 74,179,136, 87,231,196,245,122, 61,225,243,249, 8, 13, 13,197,179,103,207, 96,222,144, 86,152,171,242, 8, 86, 73,
- 73, 9, 4, 2, 65, 81, 88, 88, 88,124,120,120,184, 39,159,207,215, 86,165,153, 97,157,187,227,220,133,243,179, 3, 90,250, 54,
-234,222,121, 49,142, 31, 95,132,220,252, 2,148,104, 5, 40, 84,233, 80,172,162,112,177,104,132,214,126,126,200,204,209,226,201,
-195,240,228, 44,161, 77,141,125, 48,122,202,228,239, 94, 57,209,242,221, 17,147, 96,230,241, 14, 52, 15, 15,128, 45, 76, 3, 91,
- 88,218,109, 34,146, 89,192,220,206, 13, 69, 37,106, 92,123,240, 12,122,202,228,155, 90,233,177,177,177,133, 10,133, 98,227,204,
-153, 51, 87,133,133,133,202, 0,224,222,189,123,197, 74,165,114,169, 82,169, 44,172,205, 14,124, 33,123, 59,145,201,100, 79, 26,
- 54,108,168,239,219,183,175,237,192,129, 3, 97,103,103,135,187,119,239, 98,229,202,149,119,139,139,139,135,197,199,199,235,107,
-232,118, 72, 9,255,227, 15,139,160,145, 35,173,230, 13, 24,176,114,242,228,201,223, 47, 89,178, 68,216,160, 97, 67,176, 70, 35,
-162,162,162,232,174, 93,187, 12, 63, 45, 92,184, 70, 36,147,241,111, 29, 61, 42, 48,104, 52, 41,255,237,131,216,213,213,181,115,
-159, 94,157,155,124,187,118, 35,212,170, 34,220, 12, 61,129,220,220, 76,108,221,118,184,137,171,171,107,103, 83, 7, 19, 39, 39,
- 39,239, 59,116,232,208, 44, 63,223, 38,254, 94,110,110,136, 76,120, 14, 17,107,132,208, 96, 0, 79,167, 1, 99, 80,195,173, 25,
- 5, 97,204,145,150, 86,136, 45,103, 46, 62, 72, 78, 78,222, 87, 99, 36,177,247,187, 24,150,144, 15, 66, 8,206,118,242,133,196,
- 92, 14,145, 76,134,246,135, 46, 87,152,170,132, 21,159, 67, 32,147,195,186,245, 59, 53,150, 51, 61, 61,189,164, 97,195,134,119,
- 30, 61,122,212,170,113,227,198,248,250,235,175,145,148,148, 4, 74, 41, 50, 50, 50,212,153,153,153, 41,217,217,217,241,132,144,
- 35, 74,165,114,187,169, 75,145,176, 44,235,112,236,216, 49, 0, 16, 2,192,133, 11, 23,160, 80, 40, 96,105,105,137,130,130, 2,
-140, 28, 57, 82,252,213, 87, 95, 1, 0,238,220,185, 35, 48, 51, 51,171, 82, 43, 50, 60,250,219,188, 66,154, 75,139,238, 14,204,
- 49,220,109,222,181,103, 18,186,247, 27,131,115,199,127,197,197, 51,231, 97,195,143,127, 14, 89,225,169,172,231, 89, 5,201,197,
-141,126,108, 18,240, 9, 47,181,248,204,143,211, 6, 88,243,156,157,217, 3,243, 54, 87,157,184,183,252, 14,156,199,227, 85,140,
-193, 42, 31,208, 94, 91,115,245, 34,139, 22, 81,150,128, 16, 47,161, 48, 34, 37, 45,169,187,194,209, 21,233,233,233, 72, 74, 74,
- 66, 98, 98, 34,146,146,146,208,176, 97, 67, 60, 79,120, 6,145, 72,120,207,196, 40,248,240,254,253,251,155,107,181, 90,252,241,
-199, 31, 6, 66, 72,191, 99,199,142,221,105,209,162, 5,191, 75,151, 46,230,191,254,250,235,112, 0,219,107,115, 47, 33,151,203,
-133, 58,157, 14,191,253,246, 27,146,147,147, 59,167,165,165, 69, 43, 20,138, 31, 39, 78,156,184,185, 73,147, 38, 13,163,163,163,
-159,168, 84,170,201, 74,165, 50,162, 38,177,188,188,188,177,189,122,245, 58,192,178,172,123,199,142, 29,101,139, 22, 45,178,120,
-252,248, 49, 60, 60, 60, 64, 41,141,172,205, 82, 83, 9, 9, 9,133,215,174, 93, 75,111,218,180,169,163,179,179, 51,132, 66,225,
- 74,103,103,231,165,114,185,252,219, 46, 93,186,216,236,218,181, 11,103,206,156,129, 64, 32,192,179,103,207,148,143, 30, 61, 90,
-239,228,228,180,193,148, 12,238,225,225,225,113, 0,134,181,110,221,122,241,186,117,235, 22, 48, 12,243,209,217,179,103, 33, 16,
- 8, 0,160,194, 92,213,175, 95,127,212,129, 3, 7, 70,188,101,237,180, 94,171,213,194,214,214, 22,153,153,153,200,200,200, 64,
-189,122,245,208,174, 93, 59,232,245,122, 28, 61,126, 2, 87,175, 94, 5,165, 20,118,118,118,176,180,180,196,253,251,247, 1,160,
-186,217,195,122,157, 78, 7, 27, 27, 27,228,229,229,225,254,253,251,112,112,112,192,204,153, 51,161,213,106,177,127,255,126,220,
-187,119, 15, 12,195,192,193,193, 1,230,230,230,166,104,114,212,214, 96,241,120,188, 75,151, 46, 93, 26,236,231,231,199,127,250,
-244, 41,158, 62, 45,189,153, 81,169, 84, 6, 62, 15, 7,211, 35,254, 24, 86, 77,227, 31,252, 98,174, 12,145, 72,180,101,240,224,
-193,147,199,142, 29,139,169, 83,167,130, 16,130, 95,238,105,145,152,200, 66,175,215, 35, 61, 61, 29,145,145,145,180, 85,171, 86,
-132,101, 89, 93, 80, 80,208,184,240,240,240,214, 60, 30,175,160, 42, 77, 26, 18, 98,112,108, 62,240,253, 31,182,108,191, 60,122,
-244,104,155,254, 3,126,192,189,232, 40,228,151,216, 3,148,194,197, 94,142,214,222,159, 35, 35, 91,141, 51,167,142,231,178, 6,
-245,251,244,193, 94,125,117,229, 4,128, 76,190,202,225,199,157,135,214,236, 61,112,120,220,248, 49,195, 37, 65,193, 35, 33,204,
-138,132, 65, 25, 14, 23,223,142,160,124, 51,220, 10,191,139,136,167, 73,234, 18, 29,111,123,129, 80, 53,187, 38,205, 23,201,205,
-205, 61,153,150,150,250, 67,249,228, 0,134, 33, 50,145, 72,124,178, 6, 51, 21,252, 74, 94,160, 87, 51,196,123,175, 88,177, 34,
-195,214,214,150,125,248,240, 33,182,108,217, 98,188,115,231,206, 33,150,101, 23,100,101,101,149,212,164,105,175,215,223,223, 61,
-111,158,111,235, 65,131,232,192,113,227,212,140, 68, 50,121,229,218,181,243,179,243,243, 93, 0,192,198,202, 42,105,235,226,197,
- 75,122,247,233, 83,248,240,218, 53,179,208, 63,254, 48, 19, 25, 12,225, 53,149,243, 77, 80,157,102,114,114,242,229, 70, 13,234,
-225,183,237,107,161,211,105,144,154, 82, 26,184,202,202,206, 71,117,230,234, 47,199, 82,233, 44,170, 65,235,214,111,184, 49,105,
-228, 71, 78,239,116, 11, 70,226,253,123,208,229,100,130,232, 13, 16, 16, 62,138, 51,164,200, 72, 47,194,138,147,231, 51, 84,106,
-245,160, 87, 19, 57, 86, 85,206,138,110, 65, 11,115,136,100,165,227,174, 94,140, 90, 9,205, 45, 32,144,201,193, 19, 10, 43, 27,
- 12, 31, 92, 73, 78,185,247,199,143, 31, 31,113,242,228, 73,235, 97,195,134,225,221,119,223,189,155,151,151,215, 37, 39, 39,167,
-176,174,245,201, 48, 76, 70,159, 62,125, 28,180, 90,173, 97,232,208,161,252,172,172, 44,148, 79,177, 47, 42, 42,194,169, 83,167,
-208,184,113,233,236,252,135, 15, 31,162,105,211,166, 85,106,126, 50, 39, 50, 5,192,146,153, 67, 92,215,220,184,159, 58, 13,192,
- 74,207,134,110,184,120,230, 60,174, 94, 12,157,215,182, 25,187,177,207,136, 86,223, 72,187,124, 48,187, 73,192, 39, 60,185,133,
- 51,118, 28, 62,196,139, 14,255,105, 89, 73, 73,100, 3, 0,159, 87, 85,206,242,238,235, 87, 83, 50,168, 84, 42,147,204, 85,117,
-199, 18, 5,165,118,249,100,254,216, 89, 67,218,156,219,115,211, 92, 46,151, 67,167,211,129, 82,138, 6, 13, 26,128, 47,224,227,
-231, 35,223, 23,231,229,101, 45, 52, 69, 83, 38,147, 77, 13, 10, 10, 66,108,108, 44, 34, 34, 34, 14, 41,149,202, 8,133, 66,113,
- 40, 46, 46,110,104,155, 54,109,176,111,223,190,169, 85, 25,172,170, 52,203, 51,214, 83, 74, 97, 52, 26,115, 0, 64,169, 84,222,
- 55, 37,250,251,170,102, 89,178,208, 14, 0,208,164, 73,147, 36, 71, 71, 71,139,251,247,239,195,217,217, 25, 58,157,174, 77,109,
-142, 37, 74, 41,171, 80, 40, 54,220,186,117,107, 69,203,150, 45,241,225,135, 31,118,191,115,231, 78,247, 22, 45, 90,192,203,203,
- 11,215,175, 95,199,217,179,103,127,103, 89,118, 98,106,106,170,186,186, 36,168, 85,109,251,173, 91,183,158, 2, 24, 25, 16, 16,
-240, 1,159,207,135,133,133, 5, 47, 37, 37,133,119,246,236, 89, 0, 24,127,224,192, 1, 99, 93,246,251,223,113, 93,122, 83,154,
-132,144, 47, 71,141, 26,245,227,132, 9, 19, 36,109,218,180,121, 41,162,122,242,228, 73,176, 44, 11, 91, 91, 91,216,218,218,226,
-233,211,167, 56,114,228,136, 54, 63, 63,127,189, 80, 40, 92, 89,157,230,200,145, 35,127,156, 48, 97,130,164,117,235,214,200,207,
-207,175, 48,111,199,143, 31, 7, 33, 4,118,118,118,176,181,181,197,147, 39, 79,112,228,200, 17,117,110,110,238, 90,173, 86,187,
-250,239,220,246,127,157,193,202,201,201,153,254,197, 23, 95,116, 25, 55,110,156,109,113,113, 49,207,214,214, 22,105,105,105,134,
-211,167, 79,231, 20, 22, 22, 78,175,205,143,133,134,134, 78,233,215,175,223,250, 95,126,249,101,219,246,237,219, 59, 15, 29, 58,
- 20, 35,251,246,197,164,182, 82,104, 52, 26, 16, 66,112,230,204,153,199,151, 46, 93,242, 20, 10,133,154, 69,139, 22,177, 0,110,
-212,120, 71, 31,121, 36,202,177,249,192,206, 27,191,223,124,208, 63,176,173,187, 71,125, 15,113,123, 87, 75,232,244, 70,164,103,
-100,227,114,232, 67, 77, 76,212,189, 20,170,211,189,159, 17, 85,115, 22,119, 0,136,138,162, 58, 0,211,125,125, 45,190, 94,253,
-227,174, 45, 59,247, 28, 28, 56,126,196, 32,190,127,139,110,136, 11, 61,130, 43, 55, 46, 26,114,213,244, 72,161,128, 55, 41,234,
-105, 65,110,109, 43, 94,163,209,104, 9, 1,197,127,178,175, 83,141, 70,163,173,203,249,248,226,147,159,127,254, 25,169,169,169,
-154,132,132,132,189,148,210, 31, 83, 83, 83, 77, 78,159,176,145, 82,237, 32, 66,206, 47,232,216,177,215,130, 51,103, 36, 67, 62,
-253, 84, 59,240,253,247,103, 67,163,209, 65, 36,162,124,153,140,129, 88, 44,120,120,237,154,217,134, 73,147,108,136, 86,123,238,
- 87, 74, 77, 14,193,255, 29,179, 8, 95,136, 96, 97,244, 39,159, 65,245, 66, 4, 43,236,118, 12,106, 19,193, 2,128,212,212,212,
- 68,103,103,231,182, 75, 55,108, 60,220,187,109,235, 38,141, 20,206, 98,219,250, 30,144, 59, 57, 33, 39, 43, 11, 55,239,197,234,
-191, 63,127,249,129, 74,173, 30,100,106, 94, 24,150,101, 43,102,185,249,126, 58, 23, 12,143, 87, 97, 4,202,147, 6, 90, 4,118,
- 4,225,243, 97,164, 20, 58,157,174,198, 65, 88, 74,165, 50,217,197,197,229,253, 79, 63,253,244,194,111,191,253,198, 4, 5, 5,
-181,252,243,207, 63, 95,107,209,220,228,228,100,215,178,110,173, 2, 11, 11, 11,254,152, 49, 99,160,215,235, 81, 82, 82,130,252,
-252,124,100,103,103,107,102,204,152, 33, 6, 0,161, 80,168,239,213,171, 87,141,215,143,181, 7,146,213, 51,135,184,110,180,225,
-199,127, 88,144, 21, 81,223,134, 31,255,188,109, 51,118,227,218, 3,201,234,175, 63,179, 90,154, 21,127, 57, 38,181,248,204,143,
- 59, 14, 31,226,141, 26,248,190,209, 85,254,100,158,196,129, 30,236,218,191,198, 70,232, 47, 73, 69,235, 26,185,122,149,172, 7,
-244,174,103, 71,235, 21, 93,134,180,158,191,116,214, 90,185,131,131, 61, 12, 70, 3,158, 39,198,225,151,195,155,138, 11, 53,185,
-203,178,163,232, 29, 83,180, 60, 61, 61,235,243,120, 60, 28, 61,122, 20, 0, 54,149,189,188,233,244,233,211, 67,135, 13, 27, 6,
-119,119,119, 95, 15, 15, 15,113,117,105, 52, 42,139,222,233,245,122,188,233,117,173, 9, 33,207,182,108,217,226, 98, 99, 99, 67,
-174, 94,189,106, 96, 24,230, 88,109, 53,156,156,156,190, 59,113,226, 68, 39, 74,105, 47,127,127,127,184,187,187,151, 93, 79,163,
-112,245,234,213, 61, 41, 41, 41,163,223,208,226,206,148, 16,130,130,130,130,242,129,118, 58,185, 92,254, 86, 46, 26,157,146,146,
-178,211,209,209,241,204,226,197,139,191,106,208,160,193,196,241,227,199,243,188,189,189,145,159,159, 15, 11, 11, 11, 40, 20, 10,
-164,164,164, 96,231,206,157,198,140,140,140, 95, 24,134,249, 90,169, 84, 42,235,170,105,109,109, 13,103,103,103, 36, 39, 39,151,
-107,110,211,235,245, 75, 50, 51, 51,211,193,241,102, 13, 86, 90, 90, 90,150,147,147, 83,211,159,127,254,121, 67,105,154,134,210,
-168, 86, 97, 97,225,244,180,210, 17,227,181,226,248,241,227,177, 0,130,250,245,235,215,224,224,193,131,219,118,239,222,221,121,
-192,128, 1, 24, 58,116, 40, 12, 6, 3,122,247,238, 61,250,213,168,149, 41,164, 71, 30,137, 34, 65, 65, 77,239,220,188, 50,242,
-238,157, 27,253, 40,165,126, 0, 8, 97,152,255, 44,246, 28, 85,251,197,158,163,162, 10,114, 1,124,224,239,106,225,181,108,211,
-174,237,102,124,182,163,202,192, 92, 83,105,152,113,119,147, 11,234,188,192,104, 89,230,245, 85, 12, 67,230,148, 62, 55,109,105,
-152, 42, 52,230, 2, 0,159, 47,216,119,231,206,157,249, 9, 9, 9, 41,166,204,240,170,140,195,148, 38,142, 36,228,236,108, 63,
-191,110,253,102,204, 16, 4,244,232, 97,110,227,230,198, 82, 74,141,207,111,222, 36, 97, 71,143, 10,194,142, 30,149,232, 53,154,
- 11, 7, 40,173,213, 12,168,191, 99, 22, 97,121, 4,171,129,151,235,217,193,131,250,244,240,170,175, 0, 0, 60,123,174, 68, 86,
- 78,254,217,218,230, 26, 42, 55, 89,132,144,192, 63, 13,134,161, 2,129,160, 31, 41, 75,197, 64,235,176,216,179,209,104, 76,110,
-219,182,138,205, 91,180,178, 42, 67,150,110,226,133, 55, 68,161, 80,124,212,190,125,251,149, 74,165,242,112,102,102,102,241, 27,
-186, 46,244,222,189,123,247, 73,150,101,205, 94,137,112, 21, 40,149, 74,243,178,134,212,253,244,233,211,123, 8, 33, 53, 26,248,
-181, 7,146,213,107, 22, 52, 59,162, 86,197, 15, 36,242,146, 35,107, 55,148,206,106, 89,180, 46, 47, 31,192, 79,211, 6,218,176,
-209,225, 63,173,118,177,120, 50,103,195,145,156, 95,106,210, 99, 24,230, 73,155, 54,109, 42,140, 86, 13,245,175,172, 75, 5,196,
- 93,203, 93,105,235, 71, 46,125, 60,119,240, 55, 90,157,174, 5, 67, 64, 5, 66,225,253,188,188,172,133,166,154,171, 50, 99,241,
-195,172, 89,179,166,199,198,198,238, 41,207,121,167, 84, 42, 67, 21, 10,197,119,137,137,137, 83,146,146,146, 54, 37, 37, 37,153,
-108,174,228,114,185, 90,165, 82,177, 6,131,129,209,104, 52, 16,137, 68,186, 55,213, 24, 20, 23, 23, 15,223,188,121,243,207,122,
-189,190, 9, 33,228, 88, 94, 94, 94,173,179,222,134,135,135,235,125,125,125, 7,156, 56,113, 98,250,131, 7, 15,102, 58, 58, 58,
- 58,166,167,167, 39, 36, 38, 38,174, 72, 75, 75,251,233, 13,153, 43,132,135,135,139, 3, 2, 2, 52, 47,212,139,197,219, 50,222,
-170,210,246, 45, 61, 61, 19,192, 84, 87, 87,215,245,179,103,207, 94,214,162, 69,139,193, 99,199,142, 37, 82,169, 20,251,247,239,
- 71,124,124,252, 17, 74,233,252,218,116,233, 86,165,105,102,102,134,253,251,247,211,248,248,248, 3, 12,195, 44, 80, 42,149,255,
-138,133,180,255, 14,200,155,190, 11,170,109,248,180, 95,191,126, 13,178,178,178,182,105, 52,154,119, 0, 20, 71, 68, 68,152,255,
-183, 67,178,213, 17,228,107, 47, 11,137,170,185, 33, 51, 85,243,213, 1,234,117,209,172,141,134,169,154, 85, 45,246,204,106, 52,
- 74, 91,131,225,206, 70, 74,181,166,106,186,184,184, 44,129,137,249,162,202,136, 78, 73, 73,249,170, 46,245,217,168, 81, 35,250,
-244,233, 83, 80, 74,201,155,220,239,127,199,177,244,111,210,220,185,206, 79,209,184,185,207,236,200,240,232,111,203,186, 15, 43,
-248,122,154,141,121,199,174, 65, 11,175, 93, 12,249,102,209,198,151,187, 56,223,134,109, 39,132, 48,149, 25,139,242,228,158,181,
-213,172, 87,175,222,143,254,254,254,227,238,222,189,251,115, 98, 98,226,248,127,234,182, 19, 66,136,187,187,187,168, 54,209, 57,
-238, 60, 50, 77,211,201,201, 41,144, 97,152,133,101, 55, 28,203,146,147,147,111,189, 65, 77, 35,165,116,105,106,106,234,221,255,
-239,109,255,215, 69,176,254,110,202, 35, 90,239,190,251,174, 3,143,199,251,199, 47,210,105,138,185,170,109, 20,234,159,160,241,
- 42,101, 6, 42,244, 77,104,189,106,150,254, 78,158, 60,121, 66,184,211,250,159,199,200,207, 34,148, 0,102, 4, 86,146,154,170,
-204, 84,205,238,242,238,219,185,237, 85, 69,109,234,186, 16,115, 98, 98,226, 68,133, 66, 49,179, 54,179, 15,255, 75,219, 77, 1,
-104,184,163,255,205,147,150,150,118, 7, 64,255,127,186, 38,103,176,254, 33,252,249,231,159, 25,220,238,224,224,224,224,168,153,
-127,186,185,226,224,224, 40, 29, 32, 29, 92,197,221,135,201,161, 63, 66, 72,112, 29,238,110,206,115,154,156, 38,167,201,105,114,
-154,156, 38,167,249,239,210,252,215, 80, 62,139,233,239,120, 0, 8,230, 52, 57, 77, 78,147,211,228, 52, 57, 77, 78,147,211,252,
-183, 61, 24,206, 98,114,252,221,124, 63,136,184,124, 63,136,184,252, 93,159,231,224,224,224,224,224,248,167,193,127,219, 54, 40,
- 48, 48,208,151, 82, 58,156, 16, 50,184, 44, 66,119,144, 16,178,251,206,157, 59, 38,101,160, 53, 51, 51, 75, 87,171,213, 14, 0,
- 32,145, 72, 50,212,106,181,211,139,209, 82,224, 47, 75,100,208,210,159,169,122,192,170,167,167,103,186, 70,163,113, 48, 33,154,
-120,153, 16,114,133, 97,152,203,117, 73, 47,208,181,107,215,209, 60, 30,111, 25, 0, 24,141,198, 47, 47, 94,188,248,219,223, 85,
-207,132,144, 54,110, 10,167, 95,117,122,157, 33, 61, 51,103, 33,165,244,104,101,159,219,220,159,172,224, 19,204, 46,251,127,205,
-228, 99,180,218,169,223,181,253,124, 53,229, 11, 20, 8, 4, 83, 29, 29, 29,123, 39, 39, 39,223, 1, 48,135, 82, 90,227, 49, 96,
-229,226, 59, 82, 32, 16,140,208, 27,141, 94, 2, 30,239,153, 94,175,223,149,151, 18,181,147,187, 84,112,112,112,112,112,252,109,
- 6,171, 93, 35, 91,111, 66,117,179, 5,132,118,210, 83,114,149, 18,225,154,176, 39,217, 49,175, 83, 0,133, 66,225, 70, 8, 9,
-162,148, 54, 97, 24, 38,146,101,217,179,181, 93,236, 56, 32, 32,192, 13,192,135, 0,134,181,109,219,182,217,164, 73,147,208,176,
- 97, 67,168,213,106,220,186,117,107,222,174, 93,187,230, 5, 4, 4, 60, 0,176, 7,192,222,240,240,240,164,170,180,212,106,181,
- 67,185, 87, 34,132, 56, 12, 30, 60,248,214,139,166,170,108,113, 89, 66, 41, 13, 35,132,132, 26,141,198, 27, 7, 14, 28, 72,242,
- 33,164,205,132,250,194,131,211,227,180,174,175,106,106, 52, 26,135,227, 51,167,128, 82, 22,234,236, 44,116, 88,185,161,226,189,
- 83,189,218,130, 49,234, 33, 18, 11, 47, 7, 29, 11,187, 2,224,114,217,163,214,240,120,188,101,167, 79,159,118,166,148,162,103,
-207,158,203, 0,252, 45, 6,139, 16, 34,110, 27,216,226,210,177, 67,123, 36, 69, 57,233,232, 53, 96,232, 46, 66,200,104, 74,233,
-161,151,204, 82, 31,226, 72,248,152, 61,105,249,110, 30, 0,108,158, 63,124,206,250,158,100,227,140, 51, 52,205,197,197,165, 11,
-165,116, 78,153,222,234,148,148,148, 75,155,251, 16, 71,240, 48,119,210,242,221, 4, 0,182,204, 31, 62,123,115, 31,178, 97,242,
-201,218,205,146, 36,132, 76, 30, 61,122,244,198,101,203,150,241,156,157,157,145,146,146,210,203,215,215,215,155, 16,226, 75, 41,
-173,114,112,176, 77, 61,191,125,189,122,245,246,252,112,200, 32,169,189,157, 53,146, 83,179, 44,126,223,181,123,130, 77, 61,191,
-222, 57,137, 17, 67,185,203, 5, 7, 7, 7, 7,199, 27, 51, 88,205,154, 89, 90,153,169,232, 76, 51, 33,253,176, 87, 27,223,250,
-253,187,183, 39,158,158,158,136,121, 28,227,117,233,250,237, 49, 93,124,204,159,171,116,100,175,202,140,172,125,240,160,250,245,
-195, 70,251, 19,189,222, 88,250,155, 66, 62,140, 23, 51, 93,143, 4, 7, 7,215, 31, 59,118, 44,252,253,253,113,231,206,157, 46,
- 7, 14, 28,152,238,230,230,118, 91,175,215,159, 20,139,197, 33, 53,229, 80, 9, 8, 8, 88,233,226,226, 50,103,214,172, 89, 36,
- 48, 48, 16, 98,177,184,226, 61,185, 92,142,110,221,186,161, 91,183,110, 72, 79, 79,111,118,233,210,165,102,187,119,239, 94, 17,
- 16, 16,176, 58, 60, 60,124,158, 41, 21,180,112,225,194,192, 74, 94, 62, 77, 8,137, 53, 24, 12,247,252,252,252,146, 26, 19,210,
-112, 98,159,246,231, 38,119,104, 36,171, 38, 58,133,219,203, 74, 87,215,120,209, 96,209,146, 66, 8, 44,204, 47, 11,228,242,191,
-152,171, 38,132,180,104,107,205,252,250, 83,142,209,175, 22, 38, 11, 73, 73, 73,176,180,180, 52, 11, 10, 10, 74, 37,132, 44,190,
-116,233,210,182, 55,124,220,180, 89, 60,123,178, 48, 55, 62, 2,105,143,194, 48,115, 72, 71,233,140,239,255,252, 6,192,161,234,
-141, 15,195,252,246,204,110,222, 12, 96, 58,203,178, 11,163,163,163, 59, 3, 64,147, 38, 77, 68, 0, 46,237,120,106,221,103,116,
-147,252, 58,167, 89, 32,132, 8,121, 60,222, 15, 59,118,236,248,100,228,200,145, 72, 72, 72,192,181,107,215, 32,151,203,177,100,
-201, 18,143, 89,179,102,173, 0, 48,189,170,200, 85,207, 94,125, 60,183,124,187,192,183, 48, 39, 95,179,245,135,253,183, 21,205,
- 26, 51, 51,166, 77, 49,215, 26,116, 78, 86, 46,190, 35,185, 72, 22, 7, 7, 7, 7,199, 27, 49, 88,157, 26,202,110, 13, 12,104,
- 16,208, 63,184, 61,211,168,177, 47,132, 18,105,197,123,205, 91,250,163,121, 75,127, 50,126, 76,161,231,253,251,247, 23,156,190,
-124,115,126,167,134,178,240,171, 79,139, 91, 87,165,167, 55,130,191,123,247,110, 0,192,119,159, 15,231,253,112, 53,166,254,139,
- 11,198,118,238,220, 25,157, 59,119,102, 86,172, 88,209,230,210,165, 75,109,246,238,221,171,115,113,113, 89,159,146,146,114,160,
-154, 98,206, 57,112,224, 0,225,241,120,224,241,120, 85,126,200,209,209, 17,221,187,119,135,179,179, 51,249,252,243,207,231, 0,
-168,212, 96, 73, 36,146, 12, 66,136, 3, 0,216,216,216, 24, 23, 47, 94,124,143,210,138, 30, 64, 74, 41, 13, 99, 24,230, 6,203,
-178, 55,143, 30, 61,154,220,148, 16,135,126, 1,141,175, 78,254,104,176,148, 30, 92, 95,165, 57,208,228,229, 84,250,186, 72, 38,
-189, 44,146,201,174,136,205,204, 94, 50, 87, 77, 9,113,109,219,184,254,217,205,159, 13, 55, 55, 49,138,231,221,165, 75, 23,137,
-209,104, 68,113,113, 49,182,108,217, 98,105,102,102,102,217,187,119,239, 69, 0, 42, 12,150, 47, 33,205,223, 87,240,198, 47, 78,
- 49, 76,169,131,129,177,234,212, 46, 48,254,251,149,139, 44, 2,219,118,194,147, 75,191, 35, 39,167, 16,249,121, 69,120, 53,235,
- 55, 0, 76, 62, 73,211, 55,247, 39,107, 54,127, 49,124, 46, 97, 24,210, 98,224, 28,244,244,166,211, 20, 10,197, 67, 66,136,160,
-124,249, 24, 66, 8,223,213,213, 85,225,237,221,114, 77,163,158, 62,216,242,229, 71,160,165,139, 52,174, 49, 53,122, 69, 8,113,
- 48, 55, 55, 63,122,246,236,217, 54,173, 90,181,194,141, 27, 55, 16, 23, 23,135,201,147, 39,107,167, 76,153, 34, 28, 53,106, 20,
-153, 57,115,230,167,132,144,131,148,210,235,175,126, 95, 32, 16,140,248, 96,208,123,162,162,188, 2,181, 86,163,211,218,216, 89,
-177,154, 98,117, 73, 86,110,129,250,163,225, 35,180,247,238,132,143, 0,240, 23,131,245, 58,245,201,193,193,193,193,241, 47, 53,
- 88, 18,158,177,213,226, 61,247, 97,204,137, 5,205, 79, 4, 45, 78,251,203,103,164,118,110,240,105,231, 8,169,149, 61, 19,249,
-104, 93,171, 87,162, 54,213, 78,213, 44, 55, 87, 91,135, 43,154, 22,231,166, 10, 1, 64,102,237,172, 27,191, 43,229, 97,171, 86,
-173, 96,111,111, 47, 12, 13, 13,157, 9,224, 64, 53,154, 68, 27, 25,142, 71,253,218,163,193,163, 28, 72,165, 82,136, 68,162,151,
- 62, 16, 19, 19,131, 43, 87,174, 32, 49, 49, 17, 94, 94, 94,192, 43,227,168, 94,212, 84,169, 84,142,189,122,245, 10, 89,189,122,
-117,231,239,190,251,238,193,142, 29, 59, 58, 87,213,173,228, 75,136,172,133,135, 83,200, 55,159, 79,176,166,167,126,101, 74,178,
- 51, 32,172,162,156,237,151,173, 69,251,101,107, 1, 0,251,125,157, 33,177, 48,135, 68, 46,191, 28,124,230,206, 95, 34, 87, 1,
-132, 88,120, 57,219, 94,220,180,120,186, 12, 23,247,137, 48,110, 73,181,245, 25, 16, 16,224, 29, 20, 20, 20,186,116,233, 82,171,
-164,164, 36, 92,191,126, 29, 30, 30, 30, 40, 41, 41,121,105,189, 50, 95, 66, 28, 91, 55,118, 63, 59,127,214, 24, 75, 0, 83, 76,
-217, 71, 47,153, 16, 30,239,155,111, 23,207,177,176, 20, 83,196, 94, 63,130,184,216,231,184, 21,245, 92,191,243, 92,132, 81,171,
- 55,142,173,172, 62, 39, 31,163, 95,204,234, 38,254,245, 78,161,215,177,126, 93,166, 52, 90, 58,204, 17, 58,157,110,123,102,102,
- 38,198,143, 31, 15,150,101,209,177, 99,199, 14,148,210,148,105,211,166,193,203,203, 11,219,206,196,148,240,115,110, 6,237, 10,
- 45,184, 99,202,177, 68, 8,105,230,238,238,126,246,210,165, 75,142, 46, 46, 46, 8, 9, 9, 65, 90, 90, 26,156,156,156, 48,101,
-202, 20,209,202,149, 43,119, 20, 20, 20, 12, 89,182,108,153,228,193,131, 7,123, 9, 33,110,101,166,185, 66,211,200, 26, 21,158,
- 30, 10,249,161,189,103,238, 91,155, 75, 81,207,203, 77,200,147, 91, 24, 41, 72, 73, 61,103,123,161,145, 53, 42, 42,217,255,175,
- 85,159,166,194,105,114,154,156, 38,167,249,111,208,252, 87, 25,172,114,116,113, 33, 16,249, 14, 2,216,166,160,185,177, 96, 11,
- 82, 64,165, 14, 40,102,205,144,165, 76,192,163,171, 7, 64,117, 53,231,189, 19,240, 96, 88, 48,101, 56,223, 74, 2,136,204,237,
-117,133,133,133,144,201,100, 40,206, 77, 21,206,250,182, 34,178, 37,188,116,233, 18,194,195,195,161, 80, 40, 76, 42, 35,213,150,
-246, 34,106,181, 90,104,181, 90,164,245,105, 13, 89,219,119,144,251,209, 20, 92,184,112, 1, 25, 25, 25, 16, 10,133, 16,137, 68,
- 48, 24,106, 78, 22,207,148,173, 26, 91, 30,181,170,236, 51, 65,132,240, 93,109,228,199, 54, 47,154, 94,159, 9, 59, 46, 80, 37,
- 62,133, 82,109,132,149, 9,245, 41,150,203, 32,146,154, 93, 22,201,101,149,153, 43,129, 76, 46, 57,246,235,210,153, 78,188,187,
- 23, 36,170,167, 17, 21,166,237, 69,186,119,239, 62, 1,192, 34, 74,105, 94, 80, 80,144,227,178,101,203,172, 83, 82, 82, 16, 21,
- 21,133,253,251,247,103, 26, 74, 55,148, 80, 74,191, 6,128,118,132, 72,234,217, 91,157,217,244,213,116,115, 92,218, 39,194,199,
-181, 79,174,110,217,164,255,137,247, 71, 77,154,178,113,122,127, 20, 23,170,176,251,220, 93,156, 14,143,125, 23,192, 53, 74,105,
-149, 25,238,191,187,160,121,234,226,226,210,109,220,184,113,247, 14, 31, 62,108,247,237,183,223,194,104, 52,194, 96, 48,192, 96,
- 48, 84,252,111, 52, 26,177,103,207, 30, 92,187, 19, 53, 77,169, 44, 48,105,189, 55, 66,136,162,126,253,250,231,111,222,188,105,
- 47,149, 74,113,238,220, 57,228,229,229, 85, 68,174, 70,143, 30, 77,242,242,242, 62,220,178,101,203,251,241,241,241,223, 94,189,
-122, 53, 27, 0, 15,128,225,229,125,206,143, 53, 24,244, 62,206, 77, 26,242,135,244,239,212,169, 40, 59, 2,114, 91, 63,132,221,
-143, 61,150,155,155,167, 98, 24,126,236,139,159,127, 19,245,201,193,193,193,193,241, 47, 55, 88,234,251,187,160,137,220, 7,161,
- 87, 23,136,154, 14,133,192,181, 29,146, 34, 67,112,239,228,119, 72,126,120, 13,148, 53,194,209,163,230,165,230,126,187, 75, 5,
- 10,133, 34, 92,169, 84,226,238,221,187,136,141,141,133, 68, 34,249,203,231, 46, 92,184, 0, 0,112,114,114, 50,105, 35, 68,129,
-237,225,118, 63, 21, 73, 45,156, 1, 0,110,247, 83, 1, 0, 43,230,207,135, 80, 40,132, 80, 40,172, 88, 20,214, 20,131, 69,202,
- 62,204,150,118, 83,209,202,222, 15, 20, 11,118,239, 93, 52,181,181, 56, 62, 82,164,121, 16, 6,165,134,165,199,210,141, 39,124,
- 77, 49, 88, 82,233,101,145, 92,126, 69, 40,147,189,100,174, 0,128, 10, 4, 59,127,255,122,170,159, 44,253,153, 76,125,251, 2,
- 82,213,172,206,162,114,153,175, 79,157, 58,229,192,231,243,157,140, 70, 35, 18, 19, 19,241,240,225, 67,108,216,176, 33,189,176,
-176, 48, 40, 60, 60, 60,230,133,242, 50,173,204, 68,251,119, 46,153,238,201,143,184, 44,209,196, 62,168,212,180, 85,135,125,243,
-129, 61,223, 13,106,113, 98,194, 71, 95,226,189, 62, 61, 48, 42,200,151, 62, 87,230,168, 1,156,163,148, 26,107,250,126, 74, 74,
- 74,138,139,139, 75,247, 65,131, 6,237,106,218,180,105, 19, 74, 41,124,124,124, 48, 96,192, 0, 28, 58,116, 8, 81, 81, 81, 40,
- 44, 44,212, 93,189,122,117,189, 82,169,252,197,148, 50, 17, 66,164,214,214,214,167, 47, 94,188,104, 47,149, 74,113,246,236, 89,
-168, 84, 42, 56, 59, 59,191, 20,185, 90,177, 98,133,228,249,243,231,155,206,156, 57,227, 1,128,169,108, 33,108,157, 65,179,237,
-151, 29,123, 55,206,252,116,156,203,197, 27, 81, 23, 52, 69,133,150,238,238, 73, 5,246,214,114,243,101, 43, 86,213,211, 25,180,
- 19, 42,175,207,144, 58,213, 39, 7, 7, 7, 7,199,191,220, 96,149,119, 49, 81,214, 0,237,211,115,208, 62, 61, 7, 89,151, 5,
- 56,186,124,196, 75,159, 51, 26,245,117, 42,128, 90,173,134, 80,110,171,251,238,243,225, 66, 0, 96, 5,178,138,213,225, 89,214,
-180,133,215,107,179,164, 87,109, 12, 86,153,238, 95,204, 67,125,177,252,242,182,207,134,180,181, 53,150, 8,180,215,142, 33, 69,
-195, 26,190,125,170, 43,185,157, 71, 87,207,175, 66,243,120,247,214,208,231,102, 65, 98, 46,187,220,235,210,131, 74,103, 11,214,
-151, 88, 92,216, 63,115, 88, 71, 39, 33,132,218, 19, 7,160,212,176,154, 31,227,245,191,108,168, 98,155, 41,165,136,139,139, 67,
- 73, 73, 9, 66, 67, 67,113,232,208,161,204, 87,205, 85, 89,121, 67,126,158, 51,162,141, 69, 97,154, 80,123,251, 60,148, 26, 86,
-227,109,138,169,242, 27,216, 65,200,144,179,132,225,153,245,233,228,139, 25,227, 6, 98,221,207,127, 26,180, 14,157,250,109, 60,
-122,242,131, 34,141,110,190, 41,230,234, 5,147, 21, 1,192,215,195,195, 67,108, 48, 24,186,244,239,223,255,100,159, 62,125, 16,
- 22, 22,134,243,231,207, 55,210,233,116,169, 0,160, 80, 40,150, 0,112,100, 24,102,117,114,114,242,179, 42,246, 17, 35, 20, 10,
-247,158, 63,127,190,169, 66,161,192,249,243,231,161, 82,169, 48,105,210, 36,237,212,169, 83,133,163, 71,143, 38,249,249,249, 21,
-145,171,208,208,208,236,170,204, 21, 0, 20, 36, 63, 58,101,237,214,180,125,151,206,237, 6, 54,106,212,208,226, 89, 97, 65,134,
- 84, 42, 49,187,116,249,170,240,230,141,155,155, 10,146,163,111, 85, 94,159, 23, 76,174, 79, 14, 14, 14, 14, 14,206, 96, 85,139,
- 49,231,175,109,158,209, 80,247,117,154,219,205, 61,243,208,204,204, 12, 91,182,108,129, 84, 42,173,181,113, 42, 57,117, 4, 73,
-147,135, 87, 68,174,202, 35, 89,232, 53,250,181, 12, 22,203,178,161, 0, 94,114,121, 50,199,198,195,246,126,212,189,131,175,167,
- 11,163,223,191, 1,201, 37, 6,245,162,199, 58,245,163, 66,250,110, 84, 37,131,167, 43,208,107, 33,145,149, 70,174, 42, 51, 87,
-114, 39,239,247,119, 12,235, 18,212,162,113, 3,198,176,111, 45, 82, 74,244, 69,243,162,117,186,103,197,244,112, 21,166,114, 81,
-143, 30, 61, 22,217,218,218, 74, 54,110,220,104,233,238,238, 14,131,193,160,125,213, 92,201, 28, 27, 15,219, 55,186, 87, 7,111,
- 39,107, 70,127,240,123, 36,169,140, 37, 27,158,233,119,252,104,130,185,178,179,148,159,249,113,249,100, 51,169, 88, 0,181, 90,
-141,149,155, 15,226,236,245, 7,253, 50, 35,143,156, 1,112,166,174,251, 91,167,211,125, 18, 28, 28,188,110,246,236,217, 48, 24,
- 12,248,240,195, 15, 17, 31, 31,127,246,233,211,167, 27, 92, 93, 93, 63,159, 60,121,178,194,222,222, 30, 19, 39, 78, 20, 2, 24,
- 93,133,204,170,221,187,119,247,107,209,162, 5, 46, 95,190,140,188,188, 60, 56, 59, 59, 99,234,212,169,162, 21, 43, 86,236, 40,
- 40, 40, 24,178,124,249,114, 73, 92, 92, 92,181,145,171, 23,201,163,249, 75,127, 90, 55,241,243,214,109, 59, 48, 79,159,198, 24,
- 18, 91,119,102, 46,156, 63,121, 37,215, 65,188,227,165,250, 28,211,187,214,245,201,193,193,193,193,193, 25,172, 26,163, 67,198,
-194,191, 14,118,103,141, 38, 7, 50, 76, 54, 78, 70, 19, 53, 89,141,186, 38,195, 84, 43,131, 85, 54, 6,235, 52,165,244, 37,131,
-101,229,212,184,243,130,185,211,215,119,124,191, 23,147, 62,174, 29,242,138, 52,154, 57, 81, 6, 54,185,164, 6,115, 5,128, 49,
-234, 46, 11, 44, 44,174, 8, 95,153, 45, 8, 0,102,142, 13, 91,207,251,236,211,205, 93,135,245, 39,153,147, 58, 34, 55, 79,165,
-249,252,161,129,164,168,232,144, 40, 74, 47, 85,166,119,225,194,133,173, 0,182, 6, 5, 5,165,203,100, 50, 20, 21, 21,253,165,
- 94,203,203,219,225,253, 94, 76,250, 39,109,144, 83,172,211,204,121,104,128, 82,197,238,173,201, 92,217, 91,153,159,249,113,217,
-100,169, 50, 57, 30, 66,161, 16,114,185, 28,231,174, 69, 34,243,193, 31,103, 94,231,128,115,117,117, 93, 60,109,218,180, 69,163,
- 71,143, 70,110,110, 46,206,157, 59,135,174, 93,187,226,135, 31,126,112,191,120,241,226,186,246,237,219,131,199,227,225,220,185,
-115,208,235,245, 79,170,216,159, 3,199,143, 31,255,249,251,239,191,143, 91,183,110, 33, 53, 53,245,165,200, 85, 94, 94,222,135,
-155, 55,111,126,255,249,243,231, 53, 70,174, 94,196, 5,104,237,217,160,165,240,139,133,223, 65, 83,146,193,207, 76,185,113,249,
-194, 57, 26,230,158,147, 35, 5,144, 95,215,250,228,224,224,224,224,224, 12, 86, 37,238,197, 8,190,179, 31, 12,169, 17,255,121,
-233,149,217,132, 66,169, 28,172,177,102,227, 50,218,159,232,199, 52, 0,127,109,111, 6, 66,185,173,174,221,220, 51, 15,171,250,
-172, 92, 46, 55,181,139,208, 40,236,243, 62,175, 65,207,247,240,172,185, 19,168, 94, 87, 17,201,194,252,249, 47,153, 44,161, 80,
- 8,173, 86, 11, 84,210,237,247, 10, 55, 9, 33,241, 0,194, 40,165, 52,192,219,235, 27,137, 76, 54, 38,208,175,129,221,140,201,
-159, 8,158,103,104,112,177,227, 23,121, 7, 87,205,149, 39, 81,249,148, 4,154,119,189, 6, 67,121,185,207,213, 71,127,137, 92,
-249,123,123,125, 41,145, 74,198,181,109,230,237, 52,111,230,100,193,243,116, 13,185,216,122, 78,193,161,213,115,164,113, 48,255,
- 60,137,230, 94, 50, 97,251, 23,245,233,211,103, 17,165,148,178, 44,187, 16, 0, 94, 44,239,204,169,227, 4,207,210,212,184,208,
-241,203,220, 67,171,230,154, 39,161,250,242,218,251, 13,236,224,104,109,113,230,199,229, 83,164,169, 41, 9, 16,139,197, 48, 55,
- 55, 71, 82,122, 62, 4,124,158,234,117, 14, 54, 15, 15, 15,113,155, 54,109,230,142, 26, 53, 10,209,209,209,152, 55,111, 94,170,
- 82,169, 60,124,244,232,209, 73, 51,103,206,228,119,238,220, 25, 25, 25, 25,216,178,101,139,254,214,173, 91,203,211,210,210,214,
- 84,122,208,242,249,159,124,243,205, 55, 84,169, 84,146,184,184, 56, 56, 59, 59,227,211, 79, 63, 21, 45, 95,190,188, 98,204, 85,
-109, 34, 87,229, 36, 39, 39, 95,110,212,160, 30,222, 61,181, 30, 6,189,230,114, 94,118,226,149, 71,207,114, 47,219,136, 68,179,
- 58, 6,248,213,169, 62, 57, 56, 56, 56, 56, 56,131,245, 23,244,148,201,223,189,114,162,229,187, 35, 38,193,204,227, 29,104, 30,
- 30, 0, 91,152, 6,182,176,212,192,136,100, 22, 48,183,115, 67, 81,137, 26,215, 30, 60,131,158, 50,249,213,234, 25,193, 95,250,
-195,127,102, 11, 90, 89, 89, 33, 63, 63,255,165,200,139, 84, 42,133, 66,161, 64, 65, 65, 1, 14, 30, 60, 8, 90, 67,100,136, 82,
-250,205,168, 81,163,190,154, 60,121, 50,211, 96,216, 88, 20,221,184,250,106, 52, 10,102,102,102,144, 72, 36, 72, 78, 78,198,227,
-199,143, 89, 74,233, 55, 53, 68,188,110, 26, 12,134,251,123,247,238, 77,110,228,229,218, 43,168, 85,235,105,243,191,152,103, 30,
-117,245, 44, 22, 46,223,196, 54, 12,236,153,191,114,207, 31,133,249,242,122,221, 74,148,143,238,213, 84,201,132,144,191, 38, 17,
-245,172,215,181,157,127,203,217, 11, 23,126,105,241,240,234, 57,124,181,250, 71,218,168, 69,112,254,234, 67, 71, 11,178,164, 30,
- 61, 84,233,255, 25,243, 83, 29, 33, 33, 33, 91, 1,108, 45,127,254,106,121,231, 45,217,192,122,183,234,149,187,114,207,161,226,
- 2,243,122,193,213,149,215,193,119, 80,123, 55,103,155, 51,223, 47,157, 40, 77, 75, 73,132, 88, 44,134, 92, 46, 71, 98,106, 30,
- 22,173,223, 95,172, 99,217, 94,175,121,188,137,101, 50,153, 88,167,211,225,183,223,126, 67, 74, 74, 74,187,212,212,212, 68, 39,
- 39,167, 31, 39, 78,156,184,177, 73,147, 38, 62,143, 31, 63,126, 82, 84, 84, 52, 37, 45, 45,237, 81, 85, 34, 86, 86, 86,237,236,
-237,237, 73, 88, 88, 24, 38, 78,156,168,253,244,211, 79,133,163, 70,141, 34,185,185,185,117,138, 92,189, 16, 93,235, 60,160,111,
-123,116,232, 62,233,178, 86,157,119,229,249,163, 29,151, 25,122, 93, 18,208,210,175, 78,245,201,193,193,193,193,193, 25,172, 74,
-201,228,171, 28,126,220,121,104,205,222, 3,135,199,141, 31, 51, 92, 18, 20, 60, 18,194,172, 72, 24,148,225,112,241,237, 8,202,
- 55,195,173, 59,119, 17, 17,155,164, 46,209,241,182, 23, 8, 85,179, 95, 49, 22,193,213,229,202,200,207,207,135,135,135, 7,246,
- 76,106,220, 84, 83,144, 33,172, 7,128, 73,177,212, 93,140,233,243,240,202,149, 43, 69, 0,182, 55,106,212,232, 64,117,154,119,
-239,222,253,186,101,203,150, 71,191,248,226,139, 21,141, 26, 53,234, 53,126,201, 15, 16,206, 24, 5, 85, 84, 4,164, 65, 67, 96,
- 99, 99,131,236,236,108,220,186,117, 11,133,133,133,167, 41,165, 95,220,187,119, 47,178, 58, 77, 74,233, 13, 63, 63,191,228,122,
-245,234, 89, 57,200,205,126,153,244,241, 40,243,132,136, 27, 72,143,185,143,235,215, 98,114,119, 31, 58,154, 82,144,159,249,113,
-117,141,235,139,154, 12,195,188,100,174,188,189,237,228, 50,177,245,206, 41,227,199, 90, 36, 70,222, 66, 70,204, 61, 92,189,254,
- 36,119,207,222, 35,153,217,217,233, 99,170, 50, 87, 53,213,103,101,229,189,113,245,113,238,222, 3, 71,146, 11,139,115, 63,169,
-172,188, 47,106,202,101,130,217, 71,127, 91, 42, 85, 38, 39, 84,152,171,132,212, 92,124,181,126,111,177, 74,171,239,149, 25,113,
-196,164, 72, 77,117,229,100, 89, 22, 6,131, 1,148, 82,136, 68,162, 2, 0, 40, 51, 83,221, 76,213,204,202,202, 10,137,143,143,
- 31, 32,151,203, 43, 34, 87,249,249,249, 67, 86,174, 92, 89,171,200,213,171,229, 76, 78, 78,190,220,192,211,117, 85,234,208, 33,
- 26,103,103,251,203,199, 78,221,142,116,144,155, 61,170,107,125,190, 41, 56, 77, 78,147,211,228, 52,255, 13,154,255, 42,131, 21,
- 21, 69,117, 0,166,251,250, 90,124,189,250,199, 93, 91,118,238, 57, 56,112,252,136, 65,124,255, 22,221, 16, 23,122, 4, 87,110,
- 92, 52,228,170,233,145, 66, 1,111, 82,212,211,130,220,154,126, 76,192,131, 97,248,240,225,124, 0, 16,241, 97, 88,219,175, 95,
- 72,211,166, 77, 59,182,213,103, 8, 23,109, 44,141,108,125, 61,109,184, 48,228, 86,200, 1,177, 88,188, 53, 46, 46,174,192,148,
-141, 40, 51, 76,189, 91,181,106,245,206,231,159,127,190,170, 79,125,215,214, 3,219,119,129, 64, 32,192,173, 91,183,144,157,157,
-125,139, 97,152,185,119,239,222,189, 98,138, 94,100,100,100, 86,211,134, 30,211,109,204,132,179,167, 12, 31,104,159, 25, 27,133,
-228,232,187, 0, 0,141, 70,165, 79,141,185,220,162, 54,149, 92,190,112,179,175,175,175,208,168, 41, 26, 45,225, 91, 44,156,244,
-225, 0,135,236,231,143,144,244,176, 52,221,147, 70, 93,162, 75,138,185,232, 83,151,157,232,225,225, 33,150, 9, 48,161,210,242,
-106,213,250,180, 39,209, 45, 77,209, 41,209,104,151,127,189,110,103,143,165,179,199,136, 45, 44, 44, 16,254,224, 41, 22,174,221,
- 83, 43,115, 85, 19,148, 82,232,245,250, 90,205,252,172,132,185, 45, 90,180,104,188,108,217,178, 70,101, 99,185, 94, 43,114,245,
- 34,177,113,201,243,130,130,130,124,159, 62, 14,239, 98, 99, 38,220,245, 58,245,201,193,193,193,193,193, 25, 44, 84,111,180, 10,
-114, 1,124,224,239,106,225,181,108,211,174,237,102,124,182,163,202,192, 92, 83,105,152,113,119,147, 11,158,153,250, 99,191,221,
-165,130, 87, 95,243,245,245,149, 61,229,163,168,252,249,211, 28, 64,169, 84,174,174,203,198,220,190,125,251, 10,128, 54,254,254,
-254, 3, 79, 18, 50, 31,120, 6, 74,233,242,187,119,239, 30,169,141,142, 57, 31, 15, 58,250,122,185,116,242,111, 42,225, 25, 85,
- 72,142,142, 69, 78,177, 26,231, 30, 38,228, 49,148,249,181,174,149,205,232, 74,238,119,242,109, 80,239,157,128,166, 82, 1,209,
- 34, 57, 42, 28,249, 42, 45,206, 62, 76,200, 7, 33,117, 30, 40,253,166,202,155, 22,241,199,109,123,191,129,193,132,144,243,243,
-167, 14, 19, 47, 90,187,247,141,154, 43, 27, 27,155,146,180,180,180,108,181, 90,109,155,158,158,174,181,177,177, 41,169,163, 73,
-123, 74, 8,105, 62, 99,198,140, 37,159,127,254,249,236, 85,171, 86, 9,235, 50,230,170, 42,114, 83, 18,142,188,211,244,205,239,
-127, 14, 14, 14, 14, 14,206, 96, 85, 74,153,153, 10, 10,242,181,151, 93,123,156, 89,252, 38, 10, 16, 21, 21, 85, 60,218,159, 84,
- 68,182, 4, 60, 24, 94, 87,179,204, 80, 29,169,179, 0, 67, 10,111, 60, 73, 40,186,249, 36,161, 8, 44,165, 44,165, 26,134, 65,
- 82,177, 78,183, 60,230, 89,114,221,103,209, 17, 98,188,253, 52, 81,117, 39, 54, 73, 77, 89,150,178,148,106, 9, 65,154, 94,207,
- 46,127,240, 44,254,232, 63,161,188,153, 17, 71,174, 59,249, 14,234,116,253,230,131,153,197,197,186, 77,153, 81, 71, 66,223,212,
-193, 22, 30, 30,174,119,118,118, 30,209,191,127,255,177, 44,203,254,152,146,146,162,175,171, 22,165, 84, 11, 96, 46, 33,228,112,
-100,100,228,254,208,208,208,212, 55, 97,174,254,214,253,207,193,193,193,193,193, 25,172,234, 8,137,122, 51,230,170,156,202, 34,
- 91,255, 77, 34,159, 60, 15,248, 59,116, 31, 60,121,222,236,127,161,188,105, 81,135,239, 0,248,240,239, 40,107,106,106,234, 89,
- 0,103,223,148, 30,165,244, 54, 33,164, 62, 0,222, 27, 49, 87,127,227,254,231,224,224,224,224,224, 12, 22, 7,199,255, 12,180,
-116, 64,151,129,171, 9, 14, 14, 14, 14,142,127, 10, 4, 64,112, 21,141,150,201,179, 3, 8, 33,193,117,104, 20,207,115,154,156,
- 38,167,201,105,190, 37,154, 25,213,104, 62,168, 65,179,170,200,182,195,255, 80,125,182,172, 66,115, 85, 13,154,115,171,121,251,
- 30,119,124,190,157,154,255,166,187,255,191,237, 1, 32,152,211,228, 52, 57, 77, 78,243, 95,160,217,140,171,207, 55,170, 57,151,
-171,207,127,159,230,219,246, 96, 56,139,201,193,193,193,193,241,183,117,147, 16, 34, 38,132,136,235,250, 62, 7,199,255, 42,181,
- 30,131,213,186,117,235,134, 0,112,235,214,173,167,127,227, 9, 57,213,217,217,121,188,159,159, 95, 19,161, 80,200, 20, 22, 22,
-126,125,241,226,197,197,175,126,238,157,166,130, 59, 60, 6,174, 47,124, 19, 32, 60,128, 97, 96,164, 72,190,114,191, 36,144,219,
-197,255, 93,156,157,157,207, 72, 36, 18,119,150,101, 97, 96, 41,140, 6, 99,233, 95, 35, 11,189,145, 66,167, 85, 39,104,138,243,
-123,214, 73,187,229,160,122, 6, 35, 93, 9,176,155, 9,152, 73, 20,236, 22, 66,153, 73,148,193,102,194, 98, 34,248,250, 53, 48,
- 8, 62,231, 11,249, 95, 42,195, 15, 36,189, 13,245,121,240,224, 65,222,235,124,127,240,224,193,149, 46, 19,229,239,239,127, 92,
- 34,145, 52,168,234,123, 37, 37, 37,169,247,239,223,239,242, 54, 31,171, 78, 78, 78,239, 48, 12,243, 61,128,166,175,188,245, 8,
-192,116,165, 82,121,225,117,127,163,181, 84,202,183,227,241, 38, 8, 8,153, 3, 0,122, 74, 87,103, 25,141, 91,111,149,148,252,
- 99,198, 16, 58, 56, 56, 92,225,241,248,141,138, 75,138,139, 11, 11, 10,188,204,205, 45,158,153, 73,165, 50,163,193,248, 36, 43,
- 43,227,157, 90, 94,203, 39, 3, 88, 83,246,255,108, 74,233,230,218,188,207,193,241, 86, 27,172,128,128, 0,111, 0,157, 9, 33,
-157, 41,165,239,248,248,248, 56,150,148,148, 32, 32, 32, 32,157, 16,114,133, 82,122, 25,192,229,240,240,240,152, 55, 81, 32, 30,
-143,247,237,134, 13, 27,102,125,250,233,167, 21,139, 52, 71, 68, 68, 84,254, 89, 6,174,151,142,157,119,184, 29, 25,131, 86,193,
-131,203, 12, 22, 3, 20,167,162, 75,247,214,117,250,125, 27, 27, 27,115, 7, 7,135,175, 9, 33, 67, 24,134,169,177, 49, 99, 89,
-214, 72, 41, 61,144,145,145,177, 40, 39, 39,167,176, 54,191,213, 42,208, 79, 95,234, 8, 43,131, 26,111,223,137,168,118,118,165,
-143,143,207, 29, 30,143,231, 90,118,113,122,245,194, 86,233,255, 70,163, 49,249,225,195,135,129,166,214,133, 68, 42,157, 77, 24,
-126, 48, 40, 91,154, 4,149, 48,143, 40,107, 56,175, 46, 41, 89, 99,202,246,138,197, 98,247,240,187,247, 26, 69,197, 60,131, 87,
-253,122,208,234, 12,208,234, 12, 56,122,254, 22, 90,248,212, 71,255, 62,221,235,124,172, 24, 41,249,122,225,244, 17, 93,150,109,
-216,221,234,203,233,195,101,203, 54,236,110,245,229,140,225,242,101, 27,119, 7,126, 57, 99,132,124,233,198, 93,129, 11,102,140,
-176, 88,182,113,183, 14,192,199,117,249,141,143,155,187, 23, 51, 70, 67,165,119,215, 44,143,175,249, 57, 50, 65,246,223, 56,113,
-199,142, 29,235, 93, 92, 92, 28, 53,182, 95,235,111,154,120, 56, 86, 58,254, 39, 47, 59,221,225,201,131, 91, 11,249, 18,153,239,
-123,179,127,169,246,252, 20, 10,133,158, 87,174, 92,105,196,178, 44,140, 70, 35, 12, 6, 67,197, 95,173, 86,139,247,223,127,255,
-141, 76,136, 9, 12, 12, 28, 75, 41, 93, 86,122, 88,146,165,119,238,220,217,244, 26, 55, 98,114, 62,159,255,153, 72, 36,234,108,
- 48, 24,154, 0,128, 64, 32,136,214,104, 52,151, 13, 6,195, 58, 74,105, 81,109,244, 24,134, 89,127,251,246,109, 95,185, 92, 14,
-157, 78, 87,177, 48, 60,143,199,243,105,211,166,205, 15, 0, 26,189,238,246,219,241,120, 19,218,119,236,184, 97,236,140, 25,188,
-220,219,183,241,253,246,237,235,145,155, 11, 0, 63,212,244, 93, 87, 87,215, 59,132, 16,215,218,252, 30,165, 52, 57, 57, 57, 57,
-176,118,215, 96,126,163,132, 36,165,131,187,155, 2, 0, 32,149, 74,101,183, 31, 60,119, 8,104, 90,191,214,145, 43, 0,107, 40,
-165,102,101,245,187,161,125,251,246,237, 8, 33, 6, 0,148,101, 89,134, 16, 50,140,101, 89,126,217,231,215, 16, 66,126,161,148,
-106,184,166,153,227,173, 54, 88, 1, 1, 1, 39, 1,116,246,241,241, 49,235,222,189, 59,252,253,253,225,238,238, 14,137, 68, 2,
- 0,200,201,201,113,140,138,138,250,224,222,189,123, 31,132,133,133, 33, 32, 32, 64, 5,224, 90,120,120,120,165,209,136,224,254,
-157, 62,149,200,197, 27, 1, 32, 51, 57, 59, 53, 57, 46, 99, 99,106,106,234, 26, 74, 41,251,194, 9,233, 53,106,212,168,153,211,
-166, 77,195,241,227,199,177,103,207, 30,104, 52, 26, 20, 22, 22,226,226,197,139, 85,220, 90,103, 32,247,226, 74, 64,246, 28, 72,
-188, 12, 72, 29, 0,153,227,235,220,189,125, 61,116,232,208, 25,255,199,222,117,135, 69,113,181,223,115,103,182, 23,122, 95, 80,
- 81, 16, 21, 84,164, 40,246, 30,187, 81, 99,139,189,151, 88,163,137, 49,198,196,154,216, 75,140, 93, 99,141,189,247, 22,123, 23,
-176, 34,130,130, 74, 89,122,103,217, 58, 59,243,251,131, 18, 36,148,133,248,125,201,247,203,158,231,153,103,119,103,102,207,220,
-185,115,231,222,115,223,251,222,247,250,248,248, 20, 69, 29, 55, 24, 12, 96, 24, 6, 6,131, 1, 25, 25, 25,152, 49, 99, 70, 97,
-229, 5,150,101,113,245,234,213, 41,179,102,205, 2,128, 47, 75,227,252,164,141,103, 48,143, 16, 55,246, 15, 81, 22,119,249,102,
- 84, 32, 64,232, 71,193, 79, 72,233,226,171, 17, 93,113, 69, 72,187,133,134,134, 58, 10, 4, 2,147,238,141,101, 89,248,251,251,
-155,116,174,171,171,107, 59,153,220,114,255,103,131,198,216,248,249,251,241, 93, 93, 92, 96, 96, 24, 68,191,141,105,242,228,113,
-136,223,165,211, 7,199,186,186,186, 14,138,143,143, 47,119, 65,106,163,145,197,147,176, 72, 92,185,253, 24, 61,249, 98,168, 52,
- 58,168,212, 58,236, 57,117, 23,113,201, 89, 85,126, 78, 65, 65, 65,174, 82,218,161,201,148, 81,189,101,203,127,217, 45,155, 50,
-170, 55, 86,172,223, 83,240,185, 91, 54,101, 84, 47,172, 88,191, 75, 62,101, 84, 47,252,188,113, 71,211,160,160, 32,215, 7, 15,
- 30,196,151,197, 87,214, 51,162,140,140,104, 91, 88, 60, 13, 0, 41,155, 55,195,144,156, 12,197,188,121, 0,128,177, 62,174, 38,
- 15,107, 52,104,208, 32,152,199,227, 85,216, 56, 50, 12, 19,247,252,249,243, 64, 83,196, 21,195, 48, 28,143,199,251,254,246,111,
-139,142,180,240,171,243, 65,102, 70, 68, 68, 88,253,240,195,247,253, 14,133,228,112, 3, 2, 44,194, 78,172, 24, 85,174,200, 98,
- 89,150,210,106,181,136,140,140, 44, 53,202, 62, 69, 81,198,170, 60,167,182,109,219,138, 84, 42,213, 62,185, 92,238,171, 82,169,
- 70,113, 28,247,195,245,235,215,157, 40,138, 66,199,142, 29,127, 8, 12, 12,124, 43, 22,139, 55,170,213,234,199,114,185,124,208,
-245,235,215, 77,106, 92, 9, 33,173, 45, 45, 45,247, 28, 63,126,220,198,223,223,159, 74, 77, 77, 69,205,154, 53,145,158,158,222,
-228,230,205,155, 1,163, 71,143, 30, 77, 8, 25,198,113,220,205, 74, 36,183,174, 84, 42,229,134, 15, 31, 78,140,198, 63,110,247,
-215, 95,127, 69,128, 75,146,231,132, 46,178, 60,141,142,203,250, 61,210,106,130, 64, 32,184,253,238,221,187, 74, 23, 96, 62, 33,
-179, 70, 77,159, 78, 11, 18, 18, 32,139,136, 64, 15, 66,120, 91,243,173, 89, 27, 76,184,103,183,213,235, 86, 56, 10,133, 66, 48,
- 12, 83, 36, 2, 11,235, 40,131,193, 0,189, 94, 15,131,193, 0,163,209, 8,131,222,128,109,155,119, 84,249, 29,147,202,164, 82,
-103, 23,151, 36,137, 84, 38,253, 24,141,141, 72, 36,226,237,222,189,123,144, 80, 40, 4, 0,232,116, 58, 52,104,208,128,152,155,
- 97, 51,254,141, 22,172,174,215,175, 95, 7,195, 48,176,176,176, 0, 77,211, 37,173, 27,104,221,186, 53,130,130,130,208,177, 99,
- 71,188,122,245, 74,178,108,217,178, 50,205, 17,131,103,246, 64, 53,175,124,225, 99, 48,176, 46,119,206, 62, 94,250,235,162, 35,
- 14, 0,102, 22, 55, 24,140, 31, 63,158,164,165,165,161,127,255,254, 55,181, 90,237,167, 28,199,149,185, 92,142,145, 69, 92,187,
-207,135,128,229,136,100,205,131,109, 68,167, 81,115, 20, 69,169, 11,135, 8,171,216, 43,238,175, 80, 40,112,224,192, 1,232,116,
-186, 63, 29,183,180,180,196,139, 23, 47,138,139, 28,248,249,249,209,132,144,254,101, 9, 44,138, 16,183,243,215, 95, 23,205, 8,
- 26,248,169,159,160, 83, 27,207, 36, 30, 37,228, 0,144,239,190,251,174, 72,176, 1,192,130, 5, 11, 76, 78,175, 64, 32,192,171,
- 87,175, 64,211, 52,222,180,200,239, 96, 55, 8,141, 5, 77,211,120,226,155,223, 3,109,254, 58, 19, 52, 77, 67, 46,151,155, 42,
-174,218, 58,185,184,157,248,118,222, 18, 11,141,129,195,217,171, 15, 17,163,188, 12,142,227,224,226,104,139,230, 1,254,252,250,
- 13, 27, 57,254,186, 97,249, 9, 87, 87,215, 94,241,241,241,215,203,226, 50, 48, 70,120,123,213,194,238,227, 55,177,120,227, 81,
-164,101,171,145,147,151,159,175, 29,154,250, 96,123,213, 45,157, 43,234,186,187, 87,219,121,232, 2,154, 53,109,140, 93,135, 46,
-162, 89, 80, 99,228,255, 14,194,174, 67, 23,208,188, 89,254,103,125,111,207,234,233,239,178, 86,160,156,216, 94,127,122, 70,189,
-242,159, 81, 77, 90, 80,212, 0,188,155, 56, 17, 0,138, 4, 86,165, 94, 52, 30,207,237,241,227,199,142, 21,157,231,231,231,103,
-146,229,138, 97, 24, 36, 39, 39,147,204,204, 76,206,218,218,186, 95,113,145, 85, 40,174, 14, 6,103, 67,125,127, 61,249,237,212,
- 13,118,200,167,109,194, 78,172, 24,229,211,175, 95,191,151,165,241,234,245,250,183,157, 58,117,226, 10, 26, 62, 87,161, 80, 40,
- 40, 33,192, 20, 45, 90,180,248,147, 64,171,104,232, 80,165, 82,237,219,186,117,107, 31, 79, 79, 79,124,246,217,103,151,124,124,
-124,132, 82,169, 20, 23, 46, 92, 64,181,106,213,236, 45, 44, 44,206, 45, 89,178, 4,171, 87,175,174,126,233,210,165,253, 0,250,
-152,240,142,118,108,215,174,221,129, 51,103,206,136, 5, 2, 1,212,106, 53, 94,188,120, 1, 43, 43, 43, 8,133, 66,244,234,213,
-139,110,209,162,133, 93,219,182,109,143, 18, 66, 6, 85,102, 70,147, 70,163,225,230,204,153, 3,169, 84, 10,169, 84, 10,153, 76,
- 6,153, 76, 6,137,128, 37,155,167,213,148, 76,221,154, 41,249,114,222,230,165,123, 54,206,191, 86,189,122,245, 31, 98, 98, 98,
- 50, 43, 91, 22, 50, 30, 61,130, 44, 34, 2,154,224,224, 74,151, 35, 43,153, 45,102,207,158, 93, 81, 89,131, 64, 32, 64,243,230,
-205, 43,228,243,246,246,222, 76,211,180,195,135, 98,154,208,223,127,247, 45,243,252, 69,132, 76,111,228,100, 26, 45,131,197, 11,
-191,103,104,138,162, 27, 52,104,112,156,227,184,148, 23, 47, 94, 76, 48,193,122,166, 37,132,124, 77, 81,212,207, 34,145,136,231,
-238,238,254,254,251,239,191,191,151, 63,212, 0,112, 28, 71,185,187,187, 55,145, 72, 36, 53,180, 90, 45, 3,224,107,179,245,202,
-140,127,139,192,130, 92, 46,199,163, 71,143, 64, 8,129,133,133, 5, 44, 45, 45, 97,101,101,133,236,236,108,132,133,133, 33, 60,
- 60, 28,239,222,189, 3, 33, 4, 30, 30, 30, 40,124,113,138,189, 96, 69, 21,219,190, 85,103, 32,150,139, 64, 8,224,223,222, 23,
-190,173, 27,160,241,195,168,105, 10,133, 98,171, 82,169,140, 36,132,240, 26, 52,104, 48,186,105,211,166, 88,189,122, 53,180, 90,
-237,234,210,196, 85,113,206,155, 47, 12,129, 0,160, 80, 40,190,218,123,225,141,116,104, 23,207, 60,165, 82,185,178,178,153, 80,
-178, 2, 78, 77, 77, 5,203,178, 38, 91,133, 50, 51, 51,203,229, 44,105, 17, 88,188,116,141,117, 78, 86, 18, 22, 45,219, 11,131,
-193,128,153, 51,103,130,101,217,162,173, 52,190,210,210, 89, 56,244, 71,211,244, 7, 2,184,162,223,229,113, 58, 56, 56,200, 68,
- 98,233,254,175,190, 91,100,241, 52, 34, 14,103,174, 62, 4,199,113, 56,185,245, 7, 0, 64,175,113, 11, 17,159,152,138, 22, 1,
-245, 48, 98,194, 12,139, 53, 63,205,217,239,224,224,224,153,146,242, 71,240,217,226,156, 6,134,197,209, 11,247,160, 76,203,197,
-240,207, 58, 64,163,213, 35, 37, 57, 17, 59, 54, 44,199, 23, 35,142,194, 70, 46,113,246,240,240,136, 40,158, 71, 28,199, 17,129,
- 64,112, 59, 34, 34, 98, 76, 89,233, 52, 24, 12, 93,191,157, 49, 22, 63,111, 59,138, 6,181,157,113,250,242, 93, 4,214,175,129,
-243, 87, 31,162,105,195,154,184,120, 35, 4, 77,125,107,225,198,253, 23,152, 62, 97, 24,190,158,118,187,107,101,158,209,143, 75,
-214, 88,231,100, 39,225,204,143,187,145,188, 97, 3,222, 79,158,140, 38, 5,231, 60, 36, 4, 2, 55, 55,192,162,226,252, 44,137,
-151, 47, 95, 66,171,213,150,214,187,135,183,183,119,133,207,168,208,114,149,148,148, 68,146,146,146, 32,147,201,200,203, 23,207,
-141,222,245, 27,244,227,194,143,108, 3,128,124,203, 85, 54,242,238,174,131,250,222, 47, 16,212,124, 74,109, 91, 56, 65, 55,246,
-135,205, 97,197, 26,183, 15,210,249,228,201,147,162,252,105,218,180,105,248,237,219,183,235, 22,150,175,130,161, 66, 1,195, 48,
- 94,133,195,134, 12,195, 64,171,213, 98,208,160, 65,116,121,247, 46,145, 72,124, 61, 60, 60, 16, 18, 18,130, 9, 19, 38, 8,219,
-181,107,135,215,175, 95,131, 16,130,145, 35, 71,194,199,199, 7, 41, 41, 41,104,220,184, 49,110,221,186,229,103, 66,153,183,144,
-201,100, 59, 78,159, 62, 45,166, 40, 10, 57, 57, 57, 96, 89, 22, 45, 90,180, 0, 69, 81,120,254,252, 57,190,251,238, 59, 28, 59,
-118, 12, 39, 78,156,144, 4, 4, 4,236, 32,132,120,115, 28,151, 99,194, 51,226, 52, 26, 13, 39, 18,137, 32, 18,137, 32, 22,139,
- 33, 22,139, 33, 20, 10,161,214, 83, 24,183,230,189,150, 22,219,179,245,253, 90,122,142,156,250, 19,181,242,251, 81, 87, 1,156,
- 44,224,124,110, 74,125, 97,224,184,229,235,183,111, 95,215, 29,249, 19,140, 14,231,228,176, 6,142, 91,110,202,187, 9, 0,185,
-154, 44,212,240,112,195,209,131, 39,208,119, 96,239, 82,197, 21,159, 47,128,128,207,135,165,173,172, 66, 78, 62,159,111, 31, 26,
- 26,106, 93,188,126, 96, 24,230,229,148, 41, 83, 60,122,247,234,238,116,232,216, 25,122,232,192, 94, 70,103, 39,135,212,216,216,
-247,175, 1, 88, 7, 4, 4,112,166,150,121,142,227, 54,250,249,249,249, 31, 63,126,124,212,236,217,179,131,191,250,234,171, 69,
-197,143,175, 88,177, 98,225,185,115,231,106,244,233,211,103,207,227,199,143, 55, 22,251,223,178,143,221,216,253, 39, 66, 7,152,
- 57,205,168,178,192, 42,222,248,100,103,103, 35, 59, 59, 27,177,177,177,216,188,121,115,193,139,204, 7,143,199, 3,143,199, 43,
-242, 87, 40, 11, 87, 78,223,250, 5,192, 47, 1, 1, 1,252,103,247, 14,159,159,181,117,106,135,192,142,254,116,200,239,207,250,
- 1, 88, 12,160,235,240,225,195,237, 1, 96,247,238,221,169, 0,206,255, 29, 25,194,113,220,225,200,200,200,233, 46, 46, 46, 69,
- 62, 40,197,135, 9, 25,134,129, 88, 44, 70,161,175,138, 86,171,197,190,125,251, 24,142,227, 14,151,151,127, 17, 47,174, 34,242,
-197,181,252,255,177, 44, 88, 99,254,255, 53, 26, 13,230,207,159, 95,124,234, 43, 38, 78,156, 8, 84, 98, 45,228,178, 44, 87,205,
- 34, 51,192,227,241,112,171, 86,190, 18,232,150,194,253,201, 87,235, 79, 67, 24, 66,241,204,110,159, 13,177,101, 56,186, 72, 92,
-229,223, 67,190,224, 20, 10,120,144,136, 4,136,136,138,129,187,107, 0, 58,116,235,109,115,229,204,209,153, 0, 74, 53,187,233,
-141, 44,186,182, 13,192,134,131,215,145,157,171, 70, 86, 70, 58, 82, 98, 94,226,229,211, 71,224,241,120, 8, 14, 14,182,176,180,
-180,178,168, 85,171, 38,140, 44,139, 59,247,130,193,129,224,244,169,227, 30, 53,106,214,194,251,183,209, 99,202, 16,182,188, 22,
-129, 62,200, 77,139, 3, 77,211,104,238,231, 9,154,166,209, 42,176, 14,104,154, 70,203,198,117,193,227,241,208,182,169, 15,106,
-215,174,141, 66, 63,143,242,159,209,239,136,124,113,189,152,216,229,192, 1,208, 39, 36,252,185,161, 76, 72, 0,103,225, 88,217,
-178,133,111,190,249, 38, 51, 33, 33, 65, 95, 82,208, 41, 20, 10,193,177, 99,199,172, 43, 90, 4, 91, 38,147,249,240,120,188,176,
-244,244,116, 86, 42,149, 82, 44,107,100,189,235, 55,160,111,255,182,232, 72,225, 57, 11, 23, 46, 58, 50, 32,192,178,223,222,195,
-103, 56,129,123, 75, 66,248, 34,102,236, 15,155,133, 60,177,204,199,196, 78, 3,165,213,106,241,234,213,171, 10, 23,229,230, 56,
-174,220, 2,165, 82,169, 70,244,237,219,247,210,196,137, 19,197,132, 16,220,186,117,171, 72,240,211, 52,141,168,168, 40, 80, 20,
-133,173, 91,183, 66,171,213, 78, 52,193, 18, 56,253,232,209,163, 86, 66,161, 16, 57, 57, 57, 69,239, 13, 77,211, 8, 15, 15,199,
-202,149, 43, 49,124,248,112,196,196,196, 64,161, 80, 96,230,204,153,242,165, 75,151, 78, 7,176,208,132, 91,127,170,211,233, 2,
-165, 82, 41,196, 98, 49, 10,133, 22, 0,132, 36, 56, 61,143,142,142,110,104,111,111,239,236,112,227,204,169,230,237, 62,109,100,
-231,224,210,172, 80, 96,153,138, 24,131, 97,171, 82,165,154,219,127,199, 14,199,155,167, 78,177,207, 79,157,138,227, 25,141, 91,
- 76, 46, 67, 6, 10,239,163,226, 16, 16, 16,128,144,144, 16, 4, 4, 4,124, 96,205, 22, 10,133, 16, 8, 4, 16, 8, 4,176,183,
- 49,201, 85,130,163,105, 26,137,137,137, 31,236, 27, 55,110,220,251, 33, 67,134, 56, 2, 64,130, 50,142,251,114,250,148,248,212,
-212, 84,206,201,169,124,206, 70,141, 26,221,164, 40,202,189,132, 40,182, 25, 63,126, 60, 50, 51, 51,187, 77,156, 56,177,101,190,
-149,140,138,223,176, 97,195, 80, 0, 16, 10,133, 85, 30,130, 54,195,140,255,121,129,101, 10, 42, 18, 88,133, 8, 9, 9, 49,184,
-186,186,110,139,124,252,174,131,167,175, 7, 36, 50, 81, 39, 66,200, 47, 34,145,104,198,176, 97,195,112,255,254,125, 60,127,254,
-252,215,191,186,236, 73,195,134, 13, 47,138, 68,162, 26,165, 29,211,106,181,239,159, 61,123, 86,170,175, 88,114,114,242,188,135,
- 15, 31,162, 60, 39,247, 1, 3, 6, 20,111,140,138,156,220,203,172,193, 88, 14, 6,189, 1,170, 60,245, 31,141,119,129,192, 82,
-169, 84, 24, 56,112,224, 7, 22,172,228,228,228, 42,221,115,101, 44, 87,101,129,162,233,206,190,141,252,249, 87,239, 62,253,160,
-113,237, 61,126, 49, 68, 2, 30,164, 34, 1,196, 34, 62, 36, 34, 1, 98,227,147, 80,175, 94, 3,193,141,139,103, 58,151, 37,176,
- 12, 12,139,229,191,158, 5, 0, 28, 62,125, 21,129, 53,165, 88, 48,247, 27,244,239,223, 31, 66,161, 24, 71,143, 30,198,202, 13,
-187, 49,161, 70,254,163,106,210,216, 15, 43, 54, 29,192,162,133, 11,168,195,135, 14,183, 52,161,193, 5,143,199, 3, 77,211,127,
-250, 44,252,110,138, 53,146, 99, 57,232, 75, 62, 35,150, 3, 56, 14,110, 63,254, 8,183, 31,127,196,195, 2,113,234,163, 82, 65,
-173, 86, 3,109,125, 43, 37,174,116, 58, 29,148, 74,165,254,201,147, 39, 78,165, 52, 76, 73, 58,157,174, 66, 65,179, 99,199,142,
-136, 81,163, 70,249,216,218,218,134, 61,125,242,196,224,219,168, 17,191,164, 15, 86,157, 58,117,178, 22, 46, 92,116,100,104,255,
- 30,253, 54,127,251, 57, 51, 97,225, 30,158, 41,142,238, 69,162, 88,175,127,219,177, 99, 71,147, 36,190, 90,173, 78, 44,235, 88,
- 96, 96,224, 40, 66,200,143,117,234,212, 17,181,107,215, 14, 55,111,222,196,143, 63,254,200, 50, 12,147, 10, 0,205,155, 55,119,
- 88,180,104, 17, 9, 11, 11,131,181,181, 53,146,147,147,119, 5, 6, 6, 46, 42,207,241, 93, 40, 20,182,109,220,184, 49,165,213,
-106,255, 36,174,150, 46, 93,138, 65,131, 6,161, 78,157, 58, 96, 89, 22,185,185,185,104,215,174, 29,127,221,186,117,109, 77, 17,
- 88, 20, 69, 77,235,208,161,195, 74,228,207, 34, 44, 46, 28, 95, 2,248,186,192,186,157,216,163,239,240, 23,173, 58,126, 22,232,
- 94,187,129, 75, 69,156, 78, 78, 78,223, 82, 20, 53, 0, 0, 13, 32,150,178,181,173,237,224,224,224,212,186, 71, 15,228, 18, 66,
-111,185,112,129,240, 36, 18, 57, 0,147,134, 26, 53, 6, 21,106,120,228,187,242,245, 29,216, 27, 33, 33, 33,232,247,121, 31, 8,
- 4, 2,240,120,124, 8,248,124,240, 5,249, 22, 44,107,123,203, 42,213, 35, 5,157, 71, 98,101,101, 5,112,128,165,149, 85,161,
- 37,147, 0,224, 40,138,226,202, 41,231, 94,123, 39,143,115, 20, 88, 90,129,101, 12,168,254,105,191,162, 50, 29,185, 99,163, 4,
- 44, 43,201,141,121,139,105,215, 30,242, 97,134, 25,102,129,101, 26,138, 59,133,150,134,246,237,219, 79,177,176,176, 88, 87, 80,
-241, 34,246,126, 60, 98,239,199,195,187,110,253, 22,254,141, 2,179, 6, 13, 26, 4, 59, 59, 59,124,245,213, 87, 28,128, 95, 43,
-123,253,168,136, 23,114, 0,156, 66,161,248,170,192, 34,208,232,225,195,135, 14,143, 30, 61, 66,227,198,141,139, 55, 30,104,217,
-178,236,118,187, 96,102,220,151, 40,195,159,170,138, 86, 49,232,245,122,228,229,169,161,211,233,193, 24, 88, 48, 12,131,128,250,
- 22,216,179,117,118,254, 62,166,208, 90,150,111, 37, 19, 9,180,104,211,180,154, 1,132, 82,223,184,247,190,220,154,178, 52,203,
- 21, 77,211,184,237,145,255,183, 78, 9, 6,147,133, 22,199, 26,235, 58, 59, 57, 33,230,194, 3, 0,128, 92, 42,198,197,221,139,
- 32,147,230, 79,110,232, 54,124, 14, 36, 34, 1, 36, 34, 62,244,122, 61,156, 28,107,130, 49, 26,234,150, 41,188, 13, 58, 93, 13,
- 39, 43,184,116,107,138, 39,143,238,225,203, 41, 99, 49,106,212,104, 8,196, 22,184,113,227, 26, 98,148,201,120, 29,151,129, 41,
-243, 54,194,192,176,208, 51, 70,232, 13, 70,172,221,117, 22,122, 35, 87, 97, 35, 47, 16, 8, 48,115,230, 76, 73, 89,199, 15, 28,
- 56,160, 54,253, 25, 25,160, 82,169,161,213,106,161,215, 49,208, 27, 24, 24,107, 9,176,104,238, 96, 48,122, 6,121,159, 55,131,
-222,192,128,157,222, 7,122,157, 1,177, 82, 30,213,178,177,194, 0, 80,234,219,143,226, 44, 43,226, 47, 20, 5,229, 9, 48, 83,
- 80, 40,178,124, 27, 53, 10, 27,209,189,201,210, 59,247, 30,165,220,185,247,232, 79,231,121,212,111, 18, 61, 97,201,129,217,149,
- 17, 87,192,135,195,133,127,177,220,255,112,253,250,117, 39,185, 92,142,136,136, 8,208, 52, 13, 66, 72, 90, 72, 72,136, 19, 0,
-204,159, 63, 63,149,207,231,219,209, 52,141,233,211,167,131,199,227, 57,124,241,197, 23,223, 3, 88, 95, 78, 71,206,219,194,194,
-226, 3,235,149, 64, 32,192,236,217,179, 49,116,232,208, 34,113, 37, 16, 8,176,107,215, 46, 4, 6, 6, 66,167,211,121,155,146,
-222,184,184,184, 71, 0, 90,153, 32, 64, 72,129, 40,175,176,124, 82, 20, 53,226,201,196,137,181, 53, 15, 31,226, 11,150,245,169,
- 91,183, 46, 52, 26, 77,209,113, 79, 79,207,234,113,113,113,137, 10,133,226, 55, 0, 27,149, 74,229,227,242,248, 12, 26, 22,239,
-163,226, 10, 59,171,104,210,164, 73,145,197,170,184,245, 74, 32, 16, 64, 34,148, 87,250,153,177, 44,139,236,236,108,122,215,174,
- 93,181,124,124,234, 19, 0,240,246,174, 79,206,158, 61, 87, 93, 46,151, 71,219,218,218,234, 43,124, 39, 45,173,112,101,244, 64,
- 0, 64,255,246, 93, 10,173, 88, 8, 94, 52, 7, 60, 62, 31,141,102,204, 1,240,176,232,124,157, 78, 7,150,101,105,152, 97,134,
- 89, 96,149,241,226, 27, 12,229, 30, 95,189,122, 53, 26, 54,108, 88,110, 3,180,110,221, 58,236,221,187,119, 53,199,113, 81,149,
-189,126,143, 14,254,245,177,230,248, 11,143, 58,249,149,194,194,233, 61, 41,149, 74,133, 59,119,238,192,202,202, 10,175, 95,155,
- 22,182,235, 63, 17,166,129,227, 0,189,129,129, 42, 79, 3,157, 78,135,233,179, 76,154,153, 78,244,186, 28, 94,247, 46,173,203,
- 20, 15,133,195,125, 20, 69, 85,232,131, 85,209,208,224, 7, 22, 12,131, 1,133, 77, 71,110,158, 6,237, 7,127,139,135, 39,215,
- 2, 64,190,184, 18,243, 33, 17, 10, 32, 17,242, 64, 17,128,160,108,110,131, 58,251,211, 53,139,102,221,218,244,235, 30,183,222,
-173,199, 98,202,228, 41,224, 9,165,176,177,115, 0,195,114,168,174,112,196,155,248, 12, 28,253,101, 86,193,168, 40,135,214, 67,
-230, 99,245,220,177, 88, 49,175, 98, 35, 38,143,199,195,250,245,235,213, 37,173, 86,197, 63,185,138,219,193, 63, 4, 86,158, 26,
-106,141, 22, 95,125,187,209,244,103,212,185,149,196,148,147,203, 19, 80, 21, 9,176,210, 68,150, 41,239,111,163,222,152,251,119,
- 86, 48, 44,203,226,236,217,179, 69,207,163,172,103,104,170,181,149,101, 89,188,127,255, 30, 47, 94,188, 64,211,166, 77,145,149,
-149, 5, 62, 69, 97,230,179,103,240, 25, 54, 12, 58,129, 0, 44,203, 66, 40, 20, 98,252,248,241, 38,231,103, 37,149, 99,129, 31,
-155,177, 92,114, 23, 23,151, 85,245,234,213,171, 29,149,145,129,144, 39, 79,208,100,220, 56, 0,192,237,219,183,139, 91, 0, 49,
-120,240, 96, 97,116,116,244,232,240,240,240,209, 46, 46, 46,171, 19, 18, 18,102,150,249, 62,113,218, 34, 31,172, 1,131,251,162,
-118,189, 90,216,187,115,127,209,241, 25, 95, 79, 3,159, 47, 0, 95,192,135,181,149,117,165,111, 45, 59, 59,155,183,106,213,106,
-223,160,160,166,146, 33,195, 70, 82,122,134,195,162,101,107,233, 67,251,247,216,237,222,179, 87, 34, 22,139, 95, 86,248,140, 12,
-250, 63,213, 83,132, 16,240,248,124,240,132, 2,128,101,193,113,156,108,197,138, 21, 11, 95,188,120,209,184, 94,189,122,208,106,
-181,195, 8, 33,161,230, 56, 88,102,252,171, 4, 22, 77,211, 21, 90,167, 40,138,170,112,136,112,198,140, 25,176,176,176, 40,171,
-225,225,158, 61,123, 22,150,144,144,176,149,227,184, 42,197,197, 57,243,123,232,139, 5, 95,246,201, 1,160, 6, 0,107,107,235,
-212,246,237,219,231, 2,208, 31, 58,116,232,131,115,181, 90,237,251,178,120, 28, 29, 29, 23, 44, 95,190,124,106,215,174, 93, 41,
-138,162,254, 84,185,151,220, 12, 6, 3, 78,159, 62, 61,117,201,146, 37, 40,203,234, 85,216,120,231,169,212, 80, 23, 56, 56,191,
-121,126,196,212,202,188,194, 83,158, 54,114, 45,213,114,245,137, 82, 15,154,166,113,222, 49,255, 62,186,165, 84,204, 69, 40, 58,
-226,237,251,216, 38,206,246,214,200,200,202,133, 72,200,135, 68,244,135, 53, 95, 34,206,183, 94, 73, 68,124,216, 88, 91, 32, 45,
- 45, 9,124, 62, 63,162, 28,225,240,158, 16,210,106, 96,159,110,151, 40,154, 39, 46,126,140, 47,177,148, 94,190,243,204, 38, 41,
- 93,133,226,198, 0,150,229, 48,117,209, 78,211, 10, 48,143,135, 73,147, 38,149, 41,112, 78,157, 58, 85,105, 11,150, 90, 83,201,
-103,100, 34,127,121, 67,128, 21, 29,175, 8,133,179, 11,101, 50,153, 79,129,248, 50, 25,141, 26, 53, 58, 47,149, 74, 77, 14,114,
-100,106,208, 81, 66,200,194,246,237,219,255,232,230,230,230, 56,113,226, 68, 66,211, 52, 2, 3, 3,237,127,248,225,135,172,124,
-203,136,183, 69, 97, 29,179,102,205, 26,188,124,249, 50,133, 16,178,168, 60, 78,161, 80, 24,110,101,101, 21,216,174, 93, 59,100,
-101,101, 33, 54, 54, 22, 50,153, 12, 62,171, 86,225,217, 23, 95,160,209,230,205,160,218,183, 7, 33, 4, 66,161, 16,207,158, 61,
-131, 68, 34, 9, 47,139,207,213,213, 53,136,203,119, 50,111,129, 63,134, 5, 57, 0,119, 8, 33,179,226,227,227, 31,148, 82,223,
- 81, 0, 96,100, 89,174,130,251, 31,252,237,183,223,130,146, 72,224,210,172, 25,212, 81, 81,208,235,245,104,218,180,105,145, 85,
-189,105,211,166,160,105, 26,181,107,215,134,173,173, 45,142, 29, 59, 54, 24, 31,206,172,254, 0,154, 92, 61,222, 71,197,161, 89,
-179,102, 69,150,170,238,221,187, 23, 89,176,248,124,126,145, 37,139, 24, 43, 22,172,132, 16,174, 68, 93, 76,132, 66,129,104,248,
-200,209,212,172,175,190,100, 13,140,129,165,105, 62,245,213,220, 37,212,235, 87,207, 69, 42,149,138, 34, 21,244,214,170,247,234,
-143,254, 29,242,141,160, 71,107, 59,128, 46, 16, 86,189,158,199, 21, 61, 23,203, 51,191, 11,151, 46, 93,218,175, 94,189,122,249,
-195,237, 0,207, 28, 7,203,140,127,147,192,138,124,242,228,137, 87,253,250,245, 17, 19, 19,243,167,153,109,133,239,152, 76, 38,
-131, 68, 34, 41,180, 16, 69,150, 69,118,245,234,213, 95, 0,252, 82,248, 91,161, 80, 52,107, 55,160,237,221, 38, 93, 26, 99,223,
-146,253, 89, 9, 9, 9,190,133, 49,177, 8, 33, 68,161, 80, 12,229, 11,121, 3, 61, 26, 84,111, 3,150, 93,126,229,212,237,249,
-229,221,136, 71,157,250,185, 0,212,197,102, 17,174,172, 74,134, 16, 66,250,119,237,218,149, 10, 11, 11,195,192,129, 3,177,119,
-239,222, 50,207, 29, 58,116, 40, 14, 28, 56,128,206,157, 59, 83, 75,151, 46,237, 95,145,192,202,183,142,232,254, 99, 15,179, 52,
-203, 85, 73,145, 88,161, 16, 96,153, 43,207, 30,135,248,249, 6, 54,231,191,139, 75,130, 88,200,131, 88,244,199,140,125, 73,129,
-255,149, 68,196,135,179,131, 13, 30,222,189,174,103, 24,195,149, 10,196,197,123,148, 18,164, 81,100, 97, 31,241, 73,139,134, 54,
-165,253,103,213,183,195,208,240,224,170, 10,211,203,231,243,177, 99,199, 14,117, 89,214, 43, 83,243, 32,223,202,104, 64, 94,158,
- 26,121,106,205, 71,123, 38, 78, 78, 78, 14,142,142,142,155,172,173,173,197,165, 9,168,146,199,255,138,184, 42,136,139, 21, 54,
-106,212,168, 74,137, 44,161, 80, 88,243,206,157, 59, 69, 65, 70,203,251,212,233,116, 24, 48, 96,128, 73,150,239,224,224,224, 29,
-254,254,254,111, 28, 28, 28, 46,251,248,248,136,222,188,121,131,197,139, 23, 19, 62,159,111, 89, 88,127,228,228,228,128,166,105,
-100,100,100,128, 16, 50, 34, 56, 56,248, 66,121,156, 90,173,246,198,141, 27, 55,252,122,246,236, 73,135,135,135,131,166,233,252,
-116, 53,107,134, 70,155, 55,227,249,151, 95,162,205,187,119,208,232,245, 16,139,197,184,120,241,162, 62, 47, 47,239, 70, 57,247,
-190,245,222,189,123,245,197, 98, 49,244,122, 61, 88,150, 5, 69, 81,132,199,227,181,244,241,241, 89, 7,160,113,137, 14,152,227,
-248, 25,203,234, 26, 25,198,152, 16,243, 38,197, 4,139, 16,246,238,221,139,166, 77,155,162, 77,155, 54,136,143,143, 71, 84, 84,
- 20,186,117,235, 86,116,206,147, 39, 79, 16, 26, 26, 10, 79, 79,207,138, 45,120,148, 1,158,117,107, 66, 32, 16,128,207,231, 67,
-192,207,255,204,223,242, 45, 87, 2,190, 0,124, 30, 31, 98,137,216, 68,237,255, 97,153,180, 42,176,124, 73,165, 18,182,118,237,
-218, 97,175,223, 68,249,128, 3,101,105,105,101,146,175,109, 33, 31, 33,164, 72, 92,241,133,130, 34, 75, 22, 0,100,101,101,105,
-122,247,238,253,155, 86,171, 29,137,143, 56,146, 98,134, 25,255, 43, 2,171,219,152, 49, 99, 54,119,234,212,169,195,204,153, 51,
- 33,151,203,145,144,144, 80,244,130, 9,133, 66, 84,171, 86, 13,121,121,121,184,121,243, 38, 50, 51, 51,175, 2, 24,111,234,133,
- 19, 18, 18,238,191,126, 28,153,214,174, 95,115,187,250,205,235, 90,199, 70,198, 53, 5,112,183, 64, 92,253, 58,104, 70,183,145,
-237, 62,107, 2,129,144,143,216,215,137,255,181, 12,161, 40,138, 38,132, 96,224,192,129, 38,157,255,249,231,159,227,198,141, 27,
- 40,111, 56,177,200,130,149,167,129, 74,253,241, 58,103,132, 16, 24,141, 70, 52,141, 72,255, 96,102, 86,161,229,170, 80, 88,152,
- 98,185, 42,234, 33,231,229,173,184,117,229,228,184,122, 13, 26, 57, 52,245,243,194,235,232, 56, 44,159, 51,182,232,248, 87, 19,
- 6, 97,215,193, 83,112,117,182,135, 38, 47, 7, 23,206,157,206,202,206,206, 94, 81,213,123,216,125, 34, 63, 14,100,171,193, 31,
-206, 17, 24,248,229,207, 38,253,159,207,231, 99,228,200,145,101, 90,176, 46, 95,190,172, 54,101,120,148,227, 56,232,117, 6,228,
-170,212, 80,231,125, 28,129,165, 80, 40, 26, 53,109,218,244,242,150, 45, 91,236,236,237,237,161, 84, 42, 63, 16, 88, 10,133,162,
- 81, 80, 80,208,229, 45, 91,182,216, 57, 56, 56, 32, 54, 54,214,228,240, 32,165,136, 43,164,164,164,144,140,140, 12,214,198,198,
-166, 82, 34,139,162, 40,104,181, 90,188,124,249,210,212,119,196,228, 25, 95,114,185,124,231,146, 37, 75, 68,201,201,201,160,105,
- 26, 47, 95,190,252,160,172, 22,110,223,126,251, 45,230,204,153,179, 9, 64,141,242,248, 24,134, 89, 61,116,232,208,209,241,241,
-241, 54,142,142,142, 72, 72, 72,128, 80, 40, 4,199,113, 32,237,218,161, 85,116, 52,244, 70, 35, 36, 18, 9, 34, 34, 34,176,117,
-235, 86,149, 86,171, 93, 93, 26,151,167,167,167,144,162, 40, 47,129, 64,128, 33, 67,134,124, 88, 46,119,239, 70,179, 26, 25,129,
-227, 62, 17,229, 50, 16,107,147, 36, 93,207,211, 52, 77,198,127,181,188, 78, 80,235,238, 13, 94, 61,127,240, 38, 37, 41,238, 78,
- 5,183,111,208,233,116,168, 87,175, 30, 30, 61,122,132, 43, 87,174,160,125,251,246,104,221,186, 53,174, 95,191,142,224,224, 96,
-132,134,134,130, 16, 2, 59, 59,187, 66, 55,139,114,125, 45,116,121, 12,146,149,105,127,178, 86,149,252, 45, 16, 8,160, 85,235,
- 77,122, 70,197, 69, 19, 33, 4,182,182,182,218,181,107, 86,136,228,114,185, 17, 0,228, 50,169,241,208,238, 13,176,183,179,213,
-114, 38,154, 88,139,134, 5, 11,196, 21,205,231,127,224,166,192,113, 92,206,211,167, 79,199, 17, 66,158, 18, 66, 10,235, 15,115,
- 28, 44, 51,254, 29, 2, 43, 36, 36, 36, 26, 64, 71,127,127,255,193, 55,111,222, 92, 61, 99,198, 12,135,150, 45, 91, 34, 61, 61,
- 29, 53,106,212,128, 66,161,192,163, 71,143,240,228,201,147, 84,142,227,102, 6, 7, 7,239, 45,229, 37,235, 88, 86,172, 12,142,
-227, 56,133, 66,113, 88,155,155,251, 69, 64, 27,111, 92, 61,116,107,137,139,139,203,120, 87, 87,215,233, 35,230,244, 26,217,182,
-119, 99, 68,132,190,197,253, 75,207,144, 20,147,138, 17,173,102,149,203, 89,210,201,221,218,218,122,180, 84, 42, 21, 2,208,151,
-210, 11,254, 96, 22, 97,113, 78,150,101,141, 58,157, 14, 7, 15, 30, 52, 73,100,237,223,191, 31, 26,141, 6, 44,203, 26,203,186,
-119, 35,203, 18, 30, 95, 4, 69,181,122,208,235, 85, 96, 89,211, 39, 72,114, 21,228, 39,195, 48, 88,176, 96, 1,190,254,250,107,
- 44, 90, 84,246,232, 10,143,199,195,134, 13, 27, 80,209, 51, 74, 79, 79,207, 81, 40, 20, 67, 15,108,255,249,200,144,177, 83, 45,
-220,154,251, 98,231,161,243, 48,232,245, 16,137,248,176,177,148,161,118, 77, 55,232, 52, 42,108, 94,191, 38, 91,163, 86, 15, 45,
-233,123, 86,222,115, 47,137,225,189, 91, 99,233,214,147,184,181,239,143, 73,136,173, 6,207,195,111, 43, 38,195,223,127, 71,185,
-156, 70,163, 17, 60, 30, 15, 7, 14, 28, 80,151, 54,123,144,166,105,240,249,252, 50, 45, 88, 31, 62, 35, 35,225, 11,196,168, 86,
-195, 7, 58,109,238, 71,121, 70,118,118,118, 95,111,223,190,221, 78,163,209,224,213,171, 87,120,249,242, 37, 8, 33, 69, 42,166,
-240,120, 94, 94, 30,158, 63,127, 94, 40,112, 94, 86,230, 61, 42,180, 92,165,164,164,144,132,132, 4, 72,165, 82,234,233,211,167,
- 26, 95, 95,223,176,242,222,239,226,156, 90,173,246, 93,135, 14, 29,202,178, 24,185,138, 68,162, 15,102,124, 21, 6, 29, 45, 57,
- 84, 88, 90, 58,243,242,242,158,173, 94,189,186, 86,227,198,141,177,101,203, 22,157,133,133,133,112,198,140, 25, 28, 77,211,100,
-237,218,181,200,200,200,208,205,158, 61, 91,120,235,214, 45,168, 84,170,199, 21,221, 59,199,113, 57,132,144,113,205,155, 55,223,
-125,225,194, 5,169,151,151, 23,178,179,179,193,113, 28,118,237,218,133,201,147, 39, 67, 44, 22, 35, 34, 34, 2,159,126,250,105,
- 94, 94, 94,222,184,226, 49,176,138,115, 50, 12, 67,248,124, 62,199,178, 44,190,255,254,251,162,160,162,133, 65, 70, 37, 2, 35,
-182,206,240,144, 77,219,150, 37, 27,252,195,182, 97, 0, 96,100, 24,227,171,231, 15,222,236, 90,255,195, 53,129, 64,112,179, 24,
-103,131,146,177,176, 8, 33,223,253,244,211, 79,155, 90,180,104, 33,145,203,229,240,242,242,194,157, 59,119,112,231,206, 29,220,
-186,117,171,176, 12,192,214,214, 22,153,153,153,136,141,141, 85, 19, 66,190, 43, 47, 63,133, 82, 62, 60,234,212,204,159, 45, 88,
- 96,177,226, 23,155, 61, 88,220,154, 37,224,243, 43,124,223, 75,186,119,216,218,218, 50, 1, 1,254, 97,106,181,154, 46,212, 82,
-246,246,246,207, 11,206,229,170, 85,171,166, 43, 81,228,255,196, 25,185,125, 3,130, 23,127,151, 63, 44,248, 44,182, 72,108, 93,
-251,196, 31, 60,129, 0,213,122,244, 45,222, 14,108, 36,132,236, 40,248,174, 45,198,249,205,199,142,133, 85,153,122,201,204,249,
-247,112,254,155, 44, 88, 0,128,208,208,208,125, 13, 26, 52, 56,191,116,233,210,165,199,143, 31, 31, 59,117,234, 84, 98,105,105,
-137,195,135, 15,115,105,105,105, 59,133, 66,225,215,247,238,221,203,168,202,197, 57,142,219,121,253,216,221,137,195,103,247, 38,
- 51,214,142,104, 25,252,251,243,240,134,205,189,208,176,185, 23,130,175,134, 97,253,156,253,123,141, 6,227,247, 9, 9, 9, 49,
- 21, 80,105, 59,182,168, 91,210,201,221,238,198,181,223,237, 42, 59,139,144,227,184,195,199,143, 31,159,218,173, 91, 55,234,225,
-195,135,127,242,185, 42, 92, 30,135,101, 89, 92,190,124, 25,122,189, 30,135, 15, 31,102,203,139,131,197,130, 59,185,121,227,138,
-225,155,183, 31, 19, 10, 5, 4,247,110, 30, 69, 86, 70,249, 86, 57,129,128,143,223,246,159,212,243,120,244,171,114,210,250, 62,
- 52, 52,212,110,249,242,229, 52, 33, 4, 27, 55,110, 4, 69, 81,101, 58,180, 63,127,254,156, 53, 24, 12, 21, 62, 43,165, 82,121,
-217,217,217,249,243,141,171, 23,236,106,215,185,151,181,119, 61, 31,158,163, 99,117,240,104,130,140,180, 84, 4,223,191,197, 92,
- 56,123, 50, 83,171,213,142, 80, 42,149,151,255, 74, 1, 92,178,229, 68,169,251,251, 78, 93, 93,145, 21,133, 49, 24, 12, 60,153,
- 76, 6,134, 97, 74, 13,213,208,190,125,123,201,157, 59,119,212,122,189, 30, 52, 77,151,171,152, 88,224,163, 63, 35,163,209,232,
-157,145,145, 1,149, 74,133,144,144, 16,110,253,250,245, 41,153,153,153,115,138, 31, 79, 79, 79, 71, 78, 78, 14,130,131,131,185,
- 45, 91,182,164,100,103,103,207,169, 76,254, 21,198,197,202,200,200, 96,165, 82, 41,101, 48, 24, 12,190,190,190, 98,153,204,180,
-152, 87, 0,240,248,241,227, 46,101, 29,107,209,162, 69,228,157, 59,119,106, 27,141,198,226,107, 20, 10, 52, 26,141, 87,175, 94,
-189,120, 38,164,111,240,165, 75,151,246,221,186,117,171,161, 86,171, 29,157,156,156,188, 27, 64,117, 30,143,135,215,175, 95,167,
-232,116,186,190,223,125,247,221, 78,149, 74,245, 76, 46,151, 15, 54,177,222,184, 64, 8, 25,226,237,237,189, 99,193,130, 5,242,
- 54,109,218,240, 20, 10, 5, 26, 55,110,140,136,136, 8,156, 61,123,214,176,113,227, 70, 85, 94, 94,222, 40,142,227, 46,151,211,
-233,224, 0, 16,134, 97, 32, 20, 10,139, 54,145, 72, 4,129, 64,128, 60, 29,133, 49,171,162,212, 12, 36,234,213,243,199,157,229,
- 0,146, 24, 27,149,154,156, 24,251,128, 16,114, 83,169, 84,102,149,101, 25,211,104, 52,126, 28,199,241,178,179,179,215,106,181,
-218, 17, 51,102,204,112, 89,190,124, 57,124,125,125,145,154,154, 10, 91, 91, 91,184,184,184, 32, 55, 55, 23,209,209,209, 70,189,
- 94,191,217,104, 52, 46, 76, 74, 74, 42,119,216, 49, 51, 53, 27,110,206,213, 63,176,116,114, 28, 7,206, 8, 24,180, 70, 24,245,
- 28,116,196, 0, 62,223, 0, 19,151,208,226, 24,134, 65,143, 30, 61,112,230,204, 25,244,238,221,155, 3, 80,166, 21,233,204,153,
- 51, 21, 15,185,179, 44,248, 34, 33,120,130, 63,134, 5,243,173, 89,249,251, 40,242,167,231,105,182, 90,153,241,239, 20, 88, 5,
- 13,115, 38,128,241,141, 27, 55,222, 61,101,202,148, 51, 44,203,242, 89,150,237,254,248,241,227, 91,127,229,226, 9, 9, 9, 33,
- 10,133,226, 91, 39, 55,155,165, 93,135,182, 68, 93,191, 26, 48, 50, 70,220, 57,247, 24, 59,127, 58,113, 32, 62, 54,126, 68,241,
-181, 10,203,126,159,217,107, 45, 2,235, 82, 0, 4,197,134, 95,216,170,204, 34, 76, 78, 78,158,183,120,241, 98,252,248,227,143,
-149,158, 69, 88,214, 57,119, 31,197,143,111, 22,232,226,246,121,223,246,157, 41, 66,113, 90,157,182,156, 94, 1,184, 66,175, 8,
- 30,143,126,117,227,126,172,111, 89,231, 38, 38, 38,118,152, 56,113,226,239, 20, 69,213, 40,110,154, 47, 11, 70,163, 49, 33, 45,
- 45,173,147, 41,249,144,152,152,120,222,205,205,173,206,141, 11, 39,191,189,125,229, 92, 91,163, 81,239, 73, 64, 32, 16, 8,222,
- 24,140,204,117,131, 78,183, 36, 46, 46, 46,227,175, 22,192,111,199,247,198,123,101, 42,120, 60, 58, 63,176,103,193,227, 62,186,
-110, 6,252,253,127, 43,243,127, 34,145,232,252,142, 29, 59,122, 12, 31, 62,156, 20,250,157,113, 28,247, 65,133,254,224,193, 3,
-181, 78,167,195,206,157, 59, 57,137, 68, 82,110,224,218, 15,159, 17,225,180,229,248, 67,153,250,140,114,115,115, 71,245,234,213,
-107, 23, 0, 17,128,215, 89, 89, 89, 19,148, 74,101, 92,241,227,189,123,247,222, 5, 64, 68, 8,249,211,113, 83, 80, 24,178,193,
-198,198, 38,172,192,114, 37,174,138,163,123, 57,229,155, 46,107,248,208,148,161,194,130,181, 5, 63, 43,252, 29, 24, 24,184,112,
-226,196,137, 69,139, 61,135,134,134,222, 6,224, 81,133,206,217,101, 66, 72,253,239,191,255,254, 75,177, 88,220, 46, 47, 47,175,
- 78,129,160,139,208,106,181,215,212,106,245, 26,142,227,202,141, 45,245,230,205, 27, 93,173, 90,181, 34, 24,134,105,224,224,224,
- 0, 30,143, 87, 36,178, 0,224,126,140,109,112,124,124,124,227,202,166,237,220,185,115,238, 54, 54, 54,157, 8, 33,253, 56,142,
-171,155,147,147,163,253,225,135, 31,238,222,184,113, 35, 59, 60, 60,188, 75,171, 86,173,136,179,179, 51,222,190,125,203,229,230,
-230, 30,161, 40,234, 59,165, 82, 25,101,194, 61,199,237,220,185,179,178,249, 84,110,121,210,233,116, 41,247,238,221,179,189,114,
-229, 10,109, 52, 26,113,225,194,133,162,142,100,105,163,129, 81, 81, 81,208,233,116,229,142,161,235,179, 50,224, 59,237, 27,112,
- 5,179, 57, 11, 81,189,123, 95, 16,112,224,116,102, 61,101,198,191, 3,228, 63, 50,141,185,146, 38, 68,133, 66, 49, 80, 44, 19,
- 77,170, 81,199,197, 87, 25,149, 28,150,147,149,183, 55, 33, 33, 97, 11,199,113,198,170,114, 86, 38,208,168,217,204,251,247,112,
- 10,165,150, 23, 9, 45,168, 81,102,227, 96,212,191,215,229,101,119, 46,141, 51, 40, 40,200, 85, 32, 16,172,208,106,181, 93,203,
-139,210, 78,211, 52, 35,145, 72,206,107, 52,154,175, 75, 46,246,252,191,152,159, 71,142, 28, 41, 85,244,155, 58,139,176, 95,191,
-126,198,202,164,179, 81,163, 70,215,164, 82,105,169, 1, 53,243,242,242, 98,158, 60,121,210,233,159,144,159,133, 51,219, 76,241,
- 17, 42,206, 89,149, 89,132,101,112, 22, 13, 17,186,187,187,139,244,122,189, 63,128, 58, 0,172, 1,164, 27, 12,134, 11, 41, 41,
- 41, 73,206,206,206,129, 20, 69,125, 95, 32, 94, 23, 37, 38, 38, 6,255,157,239,166,155,155,155,216,210,210,114, 5, 69, 81, 46,
-166,252,159,101, 89, 93,114,114,242,140,212,212,212,196,210, 56,235,215,175, 31, 76,211,116,133,139,154, 27,141,198,184, 23, 47,
- 94, 4,150,147, 78,243, 16,225,191,144,243, 95,105,193,250, 79, 67,169, 84, 30, 4,112,240, 99,114,150, 21,169,221,140,127, 14,
- 10,197, 83, 85, 80, 32,150, 62,255,183,229, 89,161, 64, 42,101,255, 75, 0,228, 99, 95,207,148,112, 12,255, 4,112, 85,236, 41,
- 22, 8,168, 86, 31, 51, 45,239,222,189,211, 2,184, 91,176,125,128, 2, 65,213,243,159,146,111,113,113,113, 26, 0,147, 63, 22,
- 95,121,162,201, 12, 51,254,109,160,204, 89, 96,134, 25,102,152, 97,134, 25,102,152,241,113, 65, 0,116, 44,163, 71,104,178,233,
-143, 16,210,177, 10, 61,206, 43,102, 78, 51,167,153,211,204,249,255,132, 51,185, 28,206,231, 21,112, 54, 40,227,144,227,255, 80,
-126,250,149,193,185,172, 2,206,111,202, 57,252,216, 92, 62,255,127,114,254,107, 80,232,204,248,159,216, 0,116, 52,115,154, 57,
-205,156,102, 78, 51,167,153,211,204,105,230,252,183,109,230, 33, 66, 51,204, 48,195, 12, 51,204, 48,195,140,143, 12,147, 5,150,
-220,217,219,219,193,189,209, 46,219,106,190, 79,109,171,249, 62,117,112,111,180, 75,238,236,237,253,111,204, 52,133, 66, 33,113,
-113,113, 25, 92,189,122,245,203,126,126,126,217,174,174,174, 95,154,139, 82,229,209,150, 16,222,231,132, 76, 26, 78, 72,204,112,
- 66, 98, 62, 39,100, 82, 91, 66,254,223, 45,155,177, 96,154,162,217,173, 11, 67,206, 47,152,166,104, 86,234,241,175, 20,118, 15,
- 46, 15,248,121,201,100, 87,219,143,113, 61, 66,136,133,147,147,211, 86,103,103,231,119, 78, 78, 78,239,157,156,156,118, 16, 66,
-172,204, 37,206, 12, 51,204, 48,227,191, 7,147, 26, 51,219, 26, 13,199,120,215,171,251,245,226,249,115,136,179,163,189,148, 49,
-178,250,183,239, 98,125,230, 45, 94,122,196,182, 70,195,213,233,239,159,109,175, 66, 35, 64,220,220,220, 6,242,249,252, 30, 0,
- 10,133,218, 75,131,193,112, 38, 46, 46,238,160,169,179,130,124,125,125,111,211, 52, 93,189, 50,215,102, 89,246,221,147, 39, 79,
- 90, 87, 37,195, 92, 93, 93,251,187,186,186,238,104,218,180,169,212,207,207, 15, 2,129, 0,203,151, 47,159, 9, 96,141,201,247,
-222,182, 45,207, 49,211,118, 24,205,227,245, 4,224,203,113, 0, 8,253,148,213,235,206, 37, 11,108,119,113, 33, 91, 12,166,240,
-184,184,184,204, 33,132,140, 64,254,180,242,237, 74,165,114,197,127,162,144, 40, 20,138,106,132,144,118, 28,199,213,163, 40,234,
- 25,203,178,151,148, 74,101,218, 95,229,117, 2,198, 55,111,217,242,231,225, 51,103,210,234,155, 55,241,243,142, 29,107,145,157,
- 13, 0, 27, 42, 91,150,130,130,252,250, 89, 88,160, 7, 1,252, 65, 64, 40,112,143,211, 51,169,115,143, 30,133, 30, 52, 37,150,
- 90, 89, 8, 8, 8, 56, 11,160,112,225,184,115, 33, 33, 33,221, 43,203,145,245,134,155, 43,234,233,221, 42,235,205,181,185, 0,
-186,150, 60,206,104,196,195, 57,186, 90, 15, 53, 23, 26, 11, 96,213, 95,201, 83, 66,136,212,193,193,225,233,201,147, 39,221,154,
- 52,105,194, 3,128,224,224,224, 97, 61,122,244,104, 95, 16, 74, 32,251,239,168,104,154, 53,107,102,195, 48,204,110,154,144,166,
- 44,203, 90, 3, 0, 69, 81,153, 70,142,187,207,227,241,134, 87, 53, 88,177, 25,102,152, 97,198,255,172,192,146, 59,213,243,169,
- 95,223,123,230,133,227,187,171,101,166,103,106,126, 89,185, 59, 68,197, 19,230,121,249,120, 9,126, 89,179,194,102,210,180, 25,
-211,229, 78,245, 30,228, 38,133,135,153,122, 81, 23, 23,151,234,238,238,238,199,230,204,153,211,160,101,203,150,124, 71, 71, 71,
- 36, 37, 37,225,213,171, 87, 13,238,220,185,211,251,196,137, 19, 51, 93, 92, 92, 62, 51, 33,130, 59,100, 66, 65,173,131,203,151,
- 56, 11,173,172,193, 25, 25,216, 52,240,203, 31,255,100, 89, 36,222,184, 2,163, 94, 15,142, 53,194,173,203,167,133,226, 10, 65,
- 65, 65,130,170,100,150,155,155,155,162, 78,157, 58,123,103,207,158, 45,208,233,116, 8, 13, 13,197,189,123,247,216,228,228,228,
-165, 38,139,138,134,125,124,156,121,206, 71,122,245,238,234,222,253, 19, 71, 97, 13,103, 7,112,172, 24,225,209,250,234,151,111,
-133,118, 57,123,254,226, 44, 71,159, 62,125,147,195,142, 63, 43,143,167, 65,131, 6, 77, 41,138,250, 49, 62, 62,190, 80, 4, 45,
- 15, 10, 10,250,161,248, 57, 37, 53, 42,203,178,224,241,120, 73,121,121,121, 3,159, 63,127, 30, 90, 26,239, 8,127, 98, 48, 24,
-243,203,133,128, 7,227,213, 20,183,227, 29, 59,118,172, 57,106,212, 40,248,251,251, 35, 56, 56,184,221,225,195,135,167, 85,171,
- 86,237,145,193, 96, 56, 39, 18,137,174, 23, 76, 75,175, 52, 4,192,172,225, 51,103,210,242,119,239, 32,127,242, 4, 67,178,179,
-121,203,128, 89,149, 17, 88, 1, 1, 1,181, 58,117,244, 63,210,251,179, 54,222,206,206, 62, 2, 62,223, 30, 28,199,193, 96, 72,
-175,147,146,242,178,159,149, 21,102, 55,105,210,164,239,195,135, 15, 77,138, 52,219,184,113, 99, 39,150,101, 55,115, 28, 39, 32,
-132, 76, 1,208,237,194,133, 11, 48, 26,141,232,222,189,123,183,128,128,128, 90, 28,199,253, 34,151,203, 57,181, 90, 61,250,209,
-163, 71, 73,229, 89,174,178,223,112,115, 19,137, 71,151,186, 1,195,145, 72, 46,116,153,209,213,229,188,165, 39, 89, 60,239,103,
-229, 61, 0,232,234,233,105,225, 81, 79,246,141,220,178,161,109,118,252,149,111,186,122,122,110, 59,255,230, 77, 78, 85, 58, 44,
- 5,229, 96,197,158, 61,123,170, 5, 5, 5, 21,197,203,242,243,243,163, 87,172, 88,225,250,229,151, 95,174, 5, 48,210, 68, 81,
- 93,199,206,206,238, 34,203,178,218, 23, 47, 94,212, 41,220,239,216,232,179,230,118, 22,178, 14, 41, 25, 57, 55, 83, 95,156,184,
- 97, 10, 87, 96, 96,224, 40, 1, 69,109, 93,243,253,100,186, 94,195, 70,144, 58, 56, 64, 31,167,132,202,104,176,189,255,228, 69,
-247,101,107,182,166, 4, 6, 6,142, 11, 14, 14,222, 97,174,146,205, 48,195,140,127,141,192, 18,137,132,179,231,125,247, 13,201,
- 76,203, 84,107,178,115,116, 6,141, 70, 67, 9, 56,205,179,176,232,100,138, 71,103,126, 57,109,170,197,236,111,191,155, 13, 96,
-136,169,226,170, 94,189,122, 15,183,109,219,230,104,107,107,139,172,172, 44,164,165,165,225,225,195,135,224, 56, 14, 93,187,118,
- 21, 53,106,216,192,127,245,154,181,247, 92, 92, 92,154, 85, 36,178,120,124, 30,225, 75,165, 56,218,198, 31,148, 64,128,190,225,
- 9,249,226,194,160,199,249,129, 61, 0, 0,180, 80,136, 1,145,249,147,124,196, 98,113,149, 51,139,227,184,102, 45, 90,180, 16,
- 0,192,140, 25, 51,178, 85, 42,213, 18, 66,200, 62,165, 82, 25,111,170,184,178,119,112,184,177,114,241, 88,219, 6,181, 60,160,
- 55, 24, 16,155, 28, 15,142, 8,225,226, 40,195,208, 62,126,130,150,129, 66,143,149, 27,174, 92,119,106,208,171,117,210,243,147,
- 47,202, 20,150, 50,217,238,181,107,215,226,208,161, 67, 0,128,107,215,174,193,203,203, 75, 86, 81, 26, 94,189,122,229, 49, 98,
-196,136, 3, 0,106,151,118,220, 96, 4,111,223,190,125, 0,128, 85, 95, 13,166, 55,220,138,168, 41,145,252,177,150,114,155, 54,
-109,208,166, 77, 27,106,201,146, 37, 65,215,174, 93, 11, 58,112,224,128,222,213,213,117,109,124,124,252,225,170,228,169,250,230,
- 77,200,159, 60, 1,110,220,168,244,127, 3, 2, 2,106,213,171,103,119,127,245,170, 31,236, 79,159,121,129,149, 43,119,224,205,
-155, 55, 0, 0, 15, 15, 15, 12, 30,212,159,191,239,183,205,245,103,207,158,127, 55, 32, 32,160,101, 72, 72, 72,133,209,205, 89,
-150,221,252,213, 87, 95,125,234,234,234,138,185,115,231, 70,212,170, 85, 11,150,150,150,216,178,101, 11,108,108,108, 96, 48, 24,
- 34,150, 47, 95,206, 83, 42,149, 88,183,110,221,175,197,172, 91,127, 66,219,206,109,231,138,122,122,183,170, 27, 48, 28,114, 75,
- 23,108,219,127, 16,175, 66,118,183,210,234, 95,206, 93, 50,217,117,168,154, 19,141,112,243,178,152,237, 30,216,198,174,118,253,
- 79, 81, 35, 32,212, 94, 99,188, 21,253,253, 36,143,165, 60,177,102,247,188,149,127,182, 18,146,254, 71,232, 6,217,225,182,207,
- 47, 35,141,227,230,177, 5,194,170, 40,254,149,145,195,167,173, 91,183, 46, 18, 87,239,222,189,131, 86,171,133,183,183, 55,165,
-211,233, 76,138,105,165, 80, 40,234,180,110,221,250,246,222,189,123,237, 90,181,106,245,193,210, 45,206,118,214,157,111, 28, 91,
- 59,245,199,159,127,171,231,232,211, 39,179,162,142, 64, 96, 96,224,168,134,117, 61,183,175, 93,254, 3,161,115, 98,193,179, 78,
- 1,140,169, 72, 56,248, 43,136,212, 22,221, 39,204, 64,227,160, 32,122,234,151,115,182, 55,110,220,152,123,244,232,209, 78,115,
-181,108,134, 25,102,252, 43, 4, 22,203,177,190, 78,142,118,146,181, 43,119, 61,162,245, 58,157,204,218, 74,199,183,178,100,137,
-133, 21,173,215, 25,114,107,120,212, 16,178, 28,235, 91,134, 32,185, 82,178,151,237,238,238,126,108,231,206,157,142,124, 62, 31,
- 44,203,194,193,193, 1,111,223,190, 69,102,102, 38,114,114,114,240,230,229, 75,212,172, 94, 13, 83,199,141,117, 89,180,114,213,
- 49, 66, 72, 96,241,225,194,146,156, 28,203,129,101,152,146,189,121,160,148, 37, 99,202, 90, 70,198,212, 41,165, 44,203,190, 85,
- 42,149,144, 74,165,240,246,246,150, 63,122,244,232, 86,124,161, 9,169,162,123,111,219,150,231, 34,114, 56,182, 98,241, 64, 91,
- 80, 17,136,136,201,132,167, 91, 19,216, 91, 87, 67,124, 74, 46, 30,133,157, 67,228,155,179,240,116,173,129,113,131,107, 91,175,
-217,114,231, 12, 9, 24,239, 89,124,184,176, 56,103, 78, 78,142,188, 70,141, 26,112,117,117, 5,203,178, 48, 26,141, 8, 11, 11,
-131,209,104, 44,250, 93,252,115,215,209,171, 96,178,223, 99,248,176, 97, 72, 79, 79,151,155,122,239,133,226,106,203, 96, 69,125,
- 85, 70,130, 0, 0,100, 54, 46,250,113,191,197,191,104,220,184, 49, 28, 28, 28, 4,119,239,222,157, 1,224,112,101,243, 83, 15,
- 44,255,121,231,206,117, 67,178,178, 40, 0,216, 78, 8,171,207,143,170,109, 82, 89,234,216,177,209,209,181,107,191,183, 39, 92,
- 24,108,173,150,225,225,195,247,208,235,243,139, 74, 90, 90, 50,166, 76,202, 6,143,103,129, 85,171,231,219, 13, 24, 48,225,104,
-193, 16, 25, 91, 94, 58, 57,142, 19, 92,189,122, 21,131, 6, 13,194,129, 3, 7,120, 52, 77,227,193,131, 7,144, 72, 36, 24, 57,
-114, 36,234,215,175,207,147, 72, 36,184,125,251, 54,178,179,179, 73,121,233,188,126,241,250,226,172, 55,215,230, 38,146, 11, 93,
-182,237, 63,136,177,131, 6,194,153,139,186,101,229, 73, 22,119,234,217,226, 7,142,174,214, 67,102,225,107,227,213,160, 39, 4,
- 66, 57, 38,207, 90,136,136,231,167,109,242,114,158, 78, 34,198,216,106, 0,166,149,228,228, 14,247, 51,174,219,127, 55,224,114,
-245, 71, 53, 20, 1,227, 31, 0,120,250,135,192,242,224, 17,202,104, 85,104,189,124,253,250, 53,222,188,121, 3, 30,143, 7,181,
- 90,253,193,162,190,197, 57,253,253,253,199, 27,141,198, 31, 0, 64,167,211,237,114,114,114, 26,245,203, 47,191,216, 21, 46, 65,
- 84,220,114,149,158,153,157,113,247,209,139, 87, 51,198,247,107,123,243,254,243, 88,235, 70,189, 99, 50,159,156,200, 42, 45, 63,
-155, 53,107,102, 35,164,233,173, 63,175,152, 71,140, 81, 87, 33,242,110, 11,158,220, 11, 70, 67, 60, 52, 25, 42,104,162, 19,160,
-219,178, 30, 30, 19,191,196,138,101, 63,146, 65, 67, 71,111,245,244,244, 60,246,166,152, 5,239, 63, 49,221,219,204,105,230, 52,
-115,254, 51, 57,255,117, 2,139, 16, 42,219,104,100, 69, 2, 7, 71,205,232, 1, 29, 26, 94,186, 18,252, 88,106,111,201,235,220,
-214,191,205,195,103,209,247, 8, 69, 12,132, 80, 38,249,117,184,185,185, 13,156, 55,111, 94, 67, 75, 75, 75,176, 44, 11, 43, 43,
- 43,164,164,164, 64,167,211, 33, 43, 43, 11,218,156,108,232,115,178,241, 36,246, 29, 90,180,105,139,142,205,154,122,159, 55, 24,
- 6, 2, 56, 80, 22,167,145,162, 57, 59,255, 38,232, 31,149, 6, 86,175,195, 97, 15,187, 34,171,213,231,239, 50, 65, 8, 1,171,
-215,225,124, 80,109, 8,229, 50, 52,250,122, 94,149, 51, 43, 33, 33, 33,180, 70,141, 26,231,187,118,237,218,117,252,248,241, 84,
- 98, 98,226, 5, 39, 39,167, 22, 73, 73, 73, 21, 14,143, 58,102,216, 12, 31, 62,174, 97, 45,123,107, 10,167,111, 95, 64,211,122,
-125, 32, 21,241,145,146,169, 6, 1, 65,212,219, 43, 96, 25, 57,158,188,124,135,230,190, 82,180,110, 98,237,150,251,123,250, 56,
-148, 61, 92, 70, 50, 50, 50,144,156,156, 12,131,193, 0,131,193,128,126,253,251, 99,207,238,221, 80,169, 84, 80,171,213,208,233,
-116, 48, 26,141,160, 40, 10,151,207, 28, 70,108,244, 75, 52,111,214, 12, 40, 39,226, 55,159, 6,179,234,171,193, 60, 0, 16, 90,
- 56,232,115,114,114, 32,147,201,160,202, 72, 16,204, 92, 89,100,217, 18, 92,187,118, 13, 33, 33, 33, 80, 40, 20, 38,149,163,210,
-240, 6,216,250,214,104,156,219,245,248,113,199, 59,199,143,179,247, 79,159,142, 19,229,228,108, 49,229,191, 65, 65,126,253,166,
- 78,233, 94, 87, 34,150, 32, 46,102, 45,234,213, 19, 96,230,151,118, 88,178, 44, 21, 0, 48,117,138, 27, 26, 7,218, 35, 59,243,
- 8,236, 29, 61, 49,115, 70,111,207,220, 92,110, 24,128, 93,229,151,119, 50,229,233,211,167, 17, 78, 78, 78,188,208,208, 80, 8,
-133, 66, 72, 36, 18, 72, 36, 18,136,197, 98, 36, 38, 38, 66,167,211,225,208,161, 67, 76,193, 16, 98,153, 40, 24, 6,236, 58,163,
-171,203,249, 87, 33,187, 91,185,210,209, 79,250, 78,110,249,238,233,253,208,156, 75,151,239, 44, 98, 52,226,216,204,184, 43,223,
-212,106, 28,106, 63,233,235, 5, 88,191, 98, 30, 94, 61,184,153,238, 84, 61,123,131,132,104,119, 5,125, 82,138, 85,172,237, 2,
-222,164,239, 7, 48,227, 71,244,181, 62,237,116,119,252, 57, 30, 73, 73, 76, 13, 89,137,183,161,106, 81,109,255,161,117, 60, 40,
-221,213,171, 87, 37,173, 91,183,134, 70,147,191,100, 28, 77,211,216,187,119, 47,203, 48,204,181, 82,173,150, 6,195, 15, 33, 33,
- 33, 46,106,181, 26,159,127,254,249,212,249,243,231,203,248,124,126,254,251,101, 52,126, 96,185, 90,188,102,207,197,233, 63,108,
-184,118,241,192, 50,197,226,217,163,218, 14,153,252,227, 53, 0, 23, 74,227,101, 24,102,247,218,101,223,210, 34,107, 3, 72,227,
- 78,208, 39,169,241,126,219, 88,232,178, 53,168,179,104, 1, 0, 33,116, 6, 10,103,123,245, 3,101,171,192,152, 86, 45,120, 91,
-110,222,222, 13,160,183,185,106, 54,195, 12, 51,254,255, 91,176, 88,246,230,235,232,119,221, 58,117, 12,114, 59,115,227,217,163,
-241, 35,187,119,166, 40,138, 60, 14,123,127,195,179,134,179,253,181,235, 55, 57,150,101,111,154,114, 49, 62,159,223,163,101,203,
-150,188,140,140, 12, 40, 20, 10,164,164,164, 32, 62, 62, 30, 6,131, 1,154,172, 76,232,114,178,161,203,206,130, 81,149,131, 55,
-193, 15, 81,175,186,155,232, 74,190, 19,252, 1, 83,248, 75, 90,168, 10, 23,253, 5, 33, 16, 89,200, 33,146,203, 43, 94, 9,190,
- 4, 20, 10, 69, 47, 75, 75,203,111,114,114,114,206,197,199,199, 47,214,233,116,147,126,250,233,167, 71, 11, 23, 46,180,159, 61,
-123,182,229,172, 89,179, 14,187,187,187,251, 85,228,135,100, 97,107,236,215,180, 97,109, 58,242,253,115, 4,214,233,135,154,138,
-150,136,138,207, 66,122,142, 22,105, 89,106,212,173,243, 53,146,210,242,144,165,210,224,217,171,125,112,117,174, 69,209,252, 55,
- 93,202, 17, 88, 72, 74, 74,250,224,158, 15,236,223,143,188,172, 44,120,122,122,194,219,219, 27, 14, 14, 14,120,255,254, 61,110,
-223,190,141, 33, 3, 62, 5,159,223, 23,201,201,201,229,222,239,174, 80,142,175, 80, 40, 66,148, 74, 37, 66, 67, 67,241,230,205,
-155, 82,135, 85,127,255,253,247,252,134,215,217,217,228,188,116,114,114,250,150,162,168, 1, 0,104, 0,177,148, 66, 81,219,193,
-193,193,169, 69,239,222,200,226,243,233, 95,174, 93, 35, 60, 43, 43, 57,128,204,138,184, 44, 45,209, 61, 48,176,165, 48, 51, 99,
- 7,128,124,163,212,168,145, 14,232,218,197, 9,132, 18, 65,225, 98, 1, 66,137, 64,136, 16,121,170,171,240,169,239, 43,176,176,
- 56,214,163, 60,129, 85,232,208, 94,191,126,125, 76,152, 48, 1, 39, 78,156,192,174, 93,127,156,222,183,111, 95,124,246,217,103,
-200,205,205,133,147,147, 19, 79,169, 84, 70, 5, 4, 4, 84,232,248,110,233, 73, 22,107,245, 47,231, 90,123,201, 82,140,176,111,
-158,107, 16,165,205, 91, 25, 53, 15,192,170,174,158,158,219,244,236,205,232,200,231,167,109,222, 62,186,158,174,140, 84,121,108,
- 59, 27, 85,166, 15,214,141, 27, 96,157,124,111,232, 63,237,210,134,215,187,103,187, 60, 87, 55,167, 58,191,108,208,237, 77,119,
-181, 91,236, 94,221,109,200,188,159,190,209, 15,237,211, 74,255,205,204, 41,252,250, 62,222, 36, 59, 59, 27, 7, 15, 30,100,206,
-159, 63,159,192,178,236,244, 50,104,233, 2,161,133, 1, 3, 6,200,164, 82, 41, 98, 99, 99, 81,175, 94, 61,176,108,126,222, 38,
-164,164, 61,187,243,232,121,248,140, 9,253,219,236, 59,117,237,229,197,235,193, 47,123,119,105,209,136, 16,206,189,172,180,210,
-132, 52,245,241,245, 5,199,197,131,230,215, 65,220,222, 81,208,164,229, 64,171,210,128,226,203,160, 51,208,208,179, 4, 34,223,
- 38,120,125,226, 20,106, 15,174, 15, 30, 33, 45,204,213,178, 25,102,152,241,255, 1, 21,170, 13, 90,163, 91,242,213, 55,115, 97,
- 99, 37,177,106,226,239,229,124,242,194,141,224,155,119,131, 95,186, 87,179,119,224, 12, 58,155,229,171,215,187,145, 60,181,169,
- 78,222,222,246,246,246,208,235,245,120,253,250, 53,226,226,226,160,215,235,193,168, 84,208,102,102, 66,147,145, 1,163, 42, 7,
- 2,163, 17,234,148,100,216,136,133,192, 31, 51, 12,203, 51, 85,254, 33,166, 74, 17, 92,132, 16, 72, 44, 45, 33,178,176, 0,197,
-163, 77,206, 28, 23, 23,151, 0, 63, 63,191, 67, 87,175, 94, 13,106,217,178,229, 34,119,119,119,171,196,196,196,247, 73, 73, 73,
- 29, 86,172, 88,161,117,112,112,192,144, 33, 67,234, 26, 12,134,225, 21,113, 9, 68,218,134,213,157,188, 80,205,233, 83, 40,236,
-155, 34, 61, 91,139,228, 76, 53,146,210,242,112,240,216, 64, 92, 58,247, 57, 30,223, 30,134,215, 15, 70, 33, 53,215, 18, 98,219,
-118, 0,184, 6,229,113,222,189,123, 23,155, 55,111,198,230,205,155,177,105,211, 38,172, 95,191, 30, 25, 25, 25,104,208,160, 1,
- 98, 98, 98,112,254,252,121, 36, 36, 36,192,222,222, 30,143, 31, 63,198,150, 45, 91,240,240,225,195, 74, 23, 18,141, 70, 3,129,
-220, 78,191,234,171,193, 88,245,213, 96,176,124,153,190,152, 0, 55,189,176, 81,212,136,132,222,189, 27, 38, 88, 91,251,248,250,
-250,118, 29, 48, 96,128, 71, 80, 80, 80,209,113, 79, 79,207,234, 60, 30, 47, 81,161, 80,108, 87, 40, 20,126,229, 43,127,206,223,
-198,214, 27, 58,109,120,193, 51,230,131, 16, 49,218,127,242, 18, 45, 90, 5, 67,111, 16,128, 34, 34, 80,148, 24, 12,147, 6, 75,
- 11, 39,112, 28,105, 80, 65, 18,187, 93,184,112, 1,155, 55,111,198,219,183,111,139,132,101,143, 30, 61,166, 12, 26, 52,232,152,
-209,104,196,153, 51,103,112,226,196, 9,212,172, 89, 19,141, 26, 53,130, 94,175,239, 86,209,125,207,251, 89,121,111,223,234,243,
-159,243, 13, 54,126, 98,137,123, 77,168,228,189, 38,181,117,144, 1,192,249, 55,111,114, 28,171,103, 47, 85,229, 60,141,177,118,
-203, 93, 86,145,131, 59,199,205, 99, 67, 34,195,239,239, 59,126, 33, 43, 57, 41,131,239,223,176,190,122,201,194,175, 5,238, 53,
-107, 47,159,247,205, 4,231,248,108,113,230, 39, 83,207,135, 31,187,240, 48,119,232,200,177,204,232,113,147, 53,231, 47, 92, 62,
-206,178,108,195,178,102, 16,178, 44,139,132,132, 4,188,120,241, 2, 81, 81, 81, 72, 73, 73, 65,106,106, 42,114,114,114,138,134,
- 21,165, 57,217,103,215,239, 60,253, 68, 38,145, 72,131, 26,122, 85,127, 16, 26,150, 44,147, 72,164, 94, 53,171,215, 33,100, 1,
- 85, 6,175,181, 88, 34, 6, 64,144,243,252, 38, 52,233,185, 80,103,230, 66,147,145, 11,173,158,134, 70, 75, 65,173,163, 96,223,
-170, 19,114, 85, 26,104,210, 50,192,114,156,141,185, 90, 54,195, 12, 51,254, 21, 22,172,212,212,136, 92, 75, 7,159,207,190,156,
-245,195,249,253,191,254,226,168,213,230,197,216,217,200,141,114,169,208,126,244,248, 31,145,147,155,209, 39, 55,221,244, 89, 79,
- 25, 25, 25,136,142,142,134, 68, 34,129,128,207,135, 81,173,134, 81,173,130, 58, 35, 13,148, 94, 11,129,209, 8, 91,169, 4, 53,
- 20,206,112,119,170,216, 58, 66,179, 70,162,188,124, 14, 23,135,246,249,211,176,224,133,230,117, 33,146,203, 32,182,182, 65,139,
- 19,183,242,133,142, 64, 0,204,171,120,145,118,103,103,103,123,133, 66,113,106,253,250,245,130,180,180, 52,188,120,241,226,201,
-187,119,239,178,108,109,109, 45,248,124, 62, 27, 25, 25,121, 37, 60, 60,188, 71,173, 90,181,192,113,156,103, 69,124, 57, 89, 50,
-189,193,192, 65,153,252, 30,113, 9, 47, 96, 41,175, 6,142,174,134,228,244, 60, 16, 56,129,209, 70,192,104,200,119,183,210,170,
-227,144,167, 51,109,221, 94,189, 94, 15,189, 94, 15,131,193, 0,173, 86,139,161, 67,135,226,206,221,187, 56,112,226,119, 68,191,
-137, 64,221,154,206, 24, 54,108, 40,252,252,252,240,232,209,163, 42, 23,148,102,223, 92,124, 33,145, 72,176,105,211, 38, 72,165,
-210, 15,196,173,137, 98,117, 85,135, 14, 29,106, 71,168, 84,120, 17, 30,142, 38,253,251, 3, 0,110,223,190, 93,116,142, 90,173,
-198,224,193,131,133,209,209,209,163,195,195,195, 71,187,184,184,172, 78, 72, 72,152, 89, 22,231,217,179,247, 48, 97, 66, 24, 82,
- 82,242,253,176, 15,238,175, 95,116,236,109,180, 30, 93,186,231,143, 92, 89, 91, 91, 99,245,234, 6, 38,165,211,104, 52, 98,235,
-214,173, 69,195,130, 0,192,227,241, 90,204,152, 49,227,179,210,206,247,241,241,169,144,115, 70,127, 55,241,227,247,146, 73, 86,
-181,221,235, 91,218,251, 34,205, 16,218, 32, 52, 62, 97,202,140,254,110,107, 87, 31,142,211, 72,136,118, 23, 49,198, 86,227,137,
- 53,187, 77, 73,227,155,243,235,116,214,238, 35,119, 39,166,100,127, 55,121,236, 96, 59, 75,107, 71,213,246,245, 75,108, 40,154,
-226, 78, 5,235, 51,235,123,216, 89,247,106,250,115,238,132, 47,191, 15,213, 49,177,147, 17,123, 42,162,188, 80, 21, 44,203, 66,
-169, 84, 34, 37, 37, 5, 49, 49, 49, 72, 77, 77, 45,120,247, 83,139,134, 8,171, 2, 66, 8,116, 49, 49, 72, 58,177, 29,206, 67,
-134,162,206,194,133, 48,178, 60,104,242,140, 56,210,186, 3,178, 51,213,208,177, 4,214, 1,205,209,233,204, 45, 16,214, 8,220,
-191,107,174,149,205, 48,195,140,127,135,192, 2,128,236,148,176, 40,187, 26,190, 74,149, 90, 37,117,114,116,208, 74,197, 34, 54,
- 43, 59,135, 14,125,246, 68,159,155,240,250, 85, 37,174,247, 50, 44, 44,172, 65, 92, 92, 28, 98,222,191, 7,163, 86,129,210,234,
-192,105,242,208,177,101,115,136, 1,136, 41, 2, 1,171, 7,143, 22, 34, 39, 55, 27, 0, 94, 86, 68,202, 26, 12, 31, 84,234,132,
- 16, 16,138,130, 88, 46,135,208, 66, 6,145,165,197, 7, 22, 45, 83, 32,145, 72,246,109,217,178,197,197,217,217, 25,171, 87,175,
-134,139,139, 75,189,142, 29, 59,230,181,105,211, 70, 98,111,111,143, 58,117,234, 32, 48, 48, 16,215,174, 93, 3, 33,228, 77, 69,
-124,140, 78, 24,242, 50,154,169,150,149,243, 24,247, 67,247,192,160, 51,192,179,206, 28,168, 13,118,144, 57,140,134, 70,119, 10,
-198,204,235, 0, 0,161,101, 91, 36, 38,166, 2, 32,207, 43,243, 48, 57,142,195,211,167, 79,177,255,228, 13,184,212,240, 70, 76,
-100, 56,194,175, 93,193, 29, 7, 59,184,251,212,135,193, 96, 48, 89, 16,153,122,158,169, 13, 48, 33,100,240,216,177, 99,145,201,
-227, 1,221,187, 67, 16, 21, 5,189, 94,143,166, 77,155,162,113,227,198, 0,128,166, 77,155,130,166,105,212,174, 93, 27,118,118,
-118, 56,122,244,232, 96, 0,165, 10, 44,142,144,199,172, 49,173,158,135,135, 71,145,192,218,189, 39, 5,161,193,159,128, 64,136,
-117,235,255,136,202, 80,189,122,117, 36, 38, 70,131, 16,174,162,252, 60,215,189,123,247,110, 54, 54, 54, 24, 53,106, 20,196, 98,
- 49,250,244,233, 3,141, 70, 51, 0, 0,150, 46, 93,138,111,191,253, 54,223, 42, 53,111, 30,230,207,159,143,188,188,188, 50,135,
-134,247,172,241, 85, 36,167,179,163,157,156, 93,251,180,179,119,111,216,190,115, 71,212,242,106,143,246,157, 99, 0,224, 39, 91,
-222,187, 1, 43,230, 54, 56,110, 95,205,118,199,165, 11,151,231,181,108,211,254,187,217,227,109, 22, 47,221,146, 81,161, 79, 99,
-214,251, 93, 57,175,132, 3,215,252,178,121,207,154, 31,190,157, 38,142, 73,209,101,196,103,112,185,114, 17, 79,238,233, 68,228,
- 83,102, 45,138, 86, 42,163,102, 34,246, 66,132, 41,207, 48, 42, 42,170,200,103, 79,163,209, 64,165, 82, 33, 54, 54,182,232,249,
-170,101,150, 93, 38,143,236,217, 72,165, 86,231, 61,120, 22, 25, 51,119,234,144,102, 42,181, 58, 47,242,109, 76, 4,199,253,204,
-150,241,204, 51,243, 84,121,182,218, 44, 13,178,158,188,130, 93,251, 26,208, 51, 4, 90,163, 17, 25,169, 57,208, 49,128,129,230,
-195,173,223, 48, 24,192, 67,118, 74, 34, 40, 66,204,241,176,204, 48,195,140,127,143,192, 34,132,144, 70, 13,107, 40, 86,204, 27,
-226,198, 50, 76,221,228,212, 36,134,199, 19,241,171, 89,169, 19, 42,115, 49,131,193,112,230,214,173, 91,189, 91,182,108, 41,138,
-124,246, 4,186,172, 44,232,178, 50,193,103, 25,216, 74, 2, 65,233,181, 32, 58, 29, 92,235,177,208,228, 72,112,247,225, 43,131,
-193, 96, 56, 83,174, 16, 0,199,177, 76,190,192, 34, 20,245,193, 80,161,200,202, 2, 34,185, 28, 34, 11,139, 82,135, 16,203,130,
-147,147,147,180,107,215,174, 29,252,253,253,193,113, 28, 86,172, 88, 1,189, 94, 47, 52, 24, 12, 69, 22,163,220,220, 92, 28, 57,
-114, 4,123,246,236,185, 99,101,101, 85,225,212,114,150,209,158,191,122,251, 73,183, 33,125,218, 9, 47, 95,223, 6,131,142, 69,
-182,198, 18,185,106, 45,114, 53,124,104, 69,157, 65,200, 45, 80,180, 8,205,253,106,227,234,237, 8,141,209,160,191, 80, 89, 33,
-164,209,104, 16, 27,243, 14,113,111, 34, 32,207, 78,132,131,165, 20,121, 81, 17,240, 27, 54, 28, 58,157,174,194,123, 31,225, 79,
- 12, 51, 26,128,183,186, 43, 5,129,220, 78,223,236,155,139,101,134,138,144,203,229,149, 26, 34, 76, 77, 77,197,233,211,167,209,
-180,105, 83,180,105,211, 6,241,241,241,136,138,138, 66,183,110,127,140,178, 61,121,242, 4,161,161,161,240,244, 44,223, 40,152,
-157,205,157, 75, 79,127,221,191, 87,175, 94,130,251,247,239,131,227, 56,120,121, 89,194,210, 66, 6, 66,137,224,237,237, 8, 32,
- 95,251,183,109,219, 22, 58, 93, 60,163, 82,225, 92,121,156, 33, 33, 33,221, 3, 2, 2,106, 25, 12,134,136, 54,109,218,240, 94,
-191,126,141,126,253,250,225,224,193,131, 0,128,217,179,103, 99,246,236,217, 31,252, 39, 55, 55, 87, 83, 22, 95,221,134,245,190,
-174,197,216,180, 17, 75,220,107, 90,218,251,162,150, 87,123, 0,192, 39, 61, 70,161, 86,237,234,200, 78,125, 90, 83,163,126,215,
- 71,192,203,176,121,186, 46, 62, 76,210,189,193, 72, 77,242,245, 72, 0,166, 4,238,229,212,145, 7,147, 98,248, 67, 15,157, 56,
-117,126,124,183, 30,159,242, 13, 70,134,105, 80,131,111,125,248,248,217,228,248,247, 49, 63, 35,230,194,243,162,215,164,124,129,
-101,204,206,206,134, 76, 38, 67, 84, 84,148,182,103,207,158, 34,181, 90,141,215,175, 95, 23, 9, 44, 71,123, 91,159, 22,141, 27,
-212, 91,188,102,207, 69,153, 72, 36,234,220, 54,208, 59, 44,242,125, 28,199,145,119,101,242,114,220,253,215, 47, 95,117,119,116,
-169, 13,229,141,251,144,182,236, 6,173,150,130, 70,199, 66,203, 0, 12, 45,128, 85,163, 32, 72, 60,188,193, 1,120,249,236, 9,
- 24,142,187, 99,174,150,205, 48,195,140,127,141,192,178,183,183,119,244,247, 15,244,220,246,235, 33,112, 28,135, 87,161, 43,145,
-145, 28,142,239,127,186,231,233,230,230,214, 38, 46, 46,238,134, 41, 60,113,113,113, 7,143, 30, 61, 58,211,215,199,199,191,166,
-155, 27,158,188,123, 11, 1,103,132,192,104, 4,165,215,130,103,212,193,173,129, 17, 20,145, 35, 33, 33, 27, 91, 46, 92,121, 30,
- 23, 23,119,176,220,198,129,208,168,214,179, 47, 6,125,210, 29,156, 65,143, 75,173,124, 32,182,144, 67,100,109,141,230, 71,174,
-131, 16, 2,142, 49,224,253,146,175,192,151,201, 97,219,172,226, 80, 64, 73, 73, 73,121,181,107,215, 14, 14, 15, 15,111, 92,183,
-110, 93, 44, 88,176, 0,177,177,177,224, 56, 14,201,201,201,154,148,148,148,248,180,180,180,119,132,144,227, 74,165,114,155, 41,
-145,194,147,109, 50,118, 95,254,253,202,215, 1,126, 62, 94,159,180,153,143, 51,103,230, 33, 35, 43, 27,121, 58, 62,114,212,122,
-168,212, 28, 92, 45,189,208,196,215, 23, 41,233, 58, 68,190, 8,137, 75, 21,216,110,173,140,245,138,162, 40, 60,121,242, 4, 30,
- 10, 11, 68,220,186, 1,123, 41, 31,141, 20,206, 80,180,104,137,168,168, 40,211, 68,176, 17,188,226,179, 5,173,173,173,145,149,
-149,245,129,144,147, 74,165, 80, 40, 20,200,206,206,198,145, 35, 71,192,153,214, 40, 26,116, 58, 29,234,213,171,135, 71,143, 30,
-225,202,149, 43,104,223,190, 61,218,180,105,131,167, 79,159,226,210,165, 75, 8, 13, 13, 5, 33, 4,118,118,118,133,190, 63,101,
- 70,180,127,248,240,201, 97,185,156,204, 25, 57,114, 98,253, 33, 67,134,224,232,209, 3, 24, 53,178,110,129, 99,187, 8,159,246,
-172,139,133,139, 30, 33, 40,168, 45, 28,236, 5,184,124,229, 69, 52,143,103,181,199,132,124,252,229,151, 95,126,225,169,213,106,
-228,230,230, 66, 46,151, 35, 45, 45, 63, 28, 85, 25, 22,172, 50, 3,171, 61, 11,121,185, 50, 51,135,203,224,114, 67,251,164, 51,
-161, 13,219,119,142,197, 39, 61, 70,226,242,153,157,184,122,241, 10,108,121,239,222, 66,150,115, 62,245,109,106,118,130,202,107,
-179,119,192, 24, 58, 78,117,113,243,212, 94, 54,180,139, 11,123,120,246,198,172,204,114,210,201, 17, 66, 72,122,216,222, 83,199,
- 57,124,218,188, 89, 80,237, 6,213, 93,132, 25,169,201,220,145,147,231,159,235,223, 30, 61, 93, 40,172, 76, 88, 21, 97,225,218,
-181,107,127, 0, 0,150,101,119,173, 89,179,102,204,215, 95,127,237,160, 84, 42,139, 4, 86,114,106,250,213,230,221,167, 24,211,
- 50,179,116, 59,214,204,234, 39, 17,139,132,115,151,238,184,110,160,113,191,204,202,133,199, 27, 62,103,211,111, 41, 71, 15,239,
-164,237,197, 2,220,153, 61, 15,111,174, 92,131,158, 18,160,243,165, 7,208,233,141,200, 78, 73,195,181,209,147, 96,237,108,131,
-115,169,145,198,172,156,236,225,230,106,217, 12, 51,204,248,255, 0,147,166,212,165,166,166, 38,223,188,249, 0,215,207, 44,198,
-141, 51,139,241, 34,244, 9,148,241, 58,196, 39,105, 96,105,105,121,175, 28,203, 87,199,146,141,130, 70,163,249,108,205,218,181,
-137, 82,153, 12,173, 59,116,128,179,131, 35,164, 2, 62,104,134, 5, 77,248,200, 77,177, 70,228, 51, 53,150, 28, 63,147,172,214,
-104, 62, 43,217, 56,148,228, 44,182, 31, 32, 4, 18, 75, 11, 8,229,114,136,139, 91,173, 8,129,192,194, 18, 2, 11, 75,208, 2,
- 97,133,233, 4,128,188,188,188,190,227,198,141,203,200,201,201,193,160, 65,131,112,255,254,253,208, 11, 23, 46, 88, 94,185,114,
- 69,242,236,217,179,218, 74,165,178, 83,124,124,252,150,178,196,213,159,238,253,250,117,134, 99,244,125, 55,108,218,150,174, 54,
- 56,161,103,175, 13,176, 20,166,193,192, 24, 1,142,131,171,131, 28, 77, 90,124,133,100,109,115,156, 57,125, 38,131,101, 52,125,
- 75, 46,153, 83,156,147,227, 56,206,206,206,238, 3,171, 28, 69, 81,184,126,253, 58,250,247,235,139,206,125,122,195,161,166, 7,
- 28, 59,118, 67,231, 49, 19,176,101,203, 22, 80, 20, 5, 91, 91,219, 15, 44, 26,101,229,103, 33,178,178,178,224,238,238,142, 7,
- 43,186,213, 63, 63,163,158,127,245, 55,191,248, 75, 31,175,170,127,245,234, 85,172, 90,181, 42, 55, 34, 34, 98,181,151,151,215,
- 87, 21,229, 39, 33,228,187,159,126,250, 73,253,254,253,123,200,229,114, 48, 12,131, 59,119,238, 96,227,198,141, 88,181,106, 21,
- 66, 67, 67, 97,103,103,135,218,181,107,131,162, 40,196,196,196,168, 9, 33,223,149, 83,150,216,156, 28, 94,223, 75,151,142,167,
-245,236,217, 26, 59,118,172,135,179,115,115,240,121,206,224,241, 29, 32,147,215,195,246,109,203,208,189, 91, 0, 94,134, 63, 78,
-207,205,229,245,189,126,253, 58, 99, 66, 58,245,207,158, 61,195,177, 99,199,176,112,225, 66,102,193,130, 5,200,202,202, 42,178,
- 96, 21,174,146, 62,127,254,124, 0,128, 86,171, 21,149,197, 57,102,214,179,248,175, 23, 63, 95,152,148, 24,223,244,198,181,123,
-131,175, 94,188,130,232,200,171,184,122,241, 10,110, 93,189, 59, 59, 41, 49,190,169,127,147, 58,130,207,198, 76,254,122,247,177,
-163,180,220,210, 5,187,143, 29,165, 7, 77,153,254, 99, 96,231,246,223,153,240,140, 56, 0, 92,110,114,210,183, 63,173,252, 37,
-151,209,107,168, 21, 63,111, 80,170, 83, 18,190, 67,225,212,202, 50,172, 87,197, 57,163,162,162,182,188,125,251, 86,241,246,237,
- 91,197,251,247,239,191,139,143,143,111,189,100,201,146,148, 2,193,149, 47,176, 94,156,188,247,242,214,206,159, 28,237,109, 36,
-205, 27,215,175,187,122,203,145,235, 49,177, 73,191, 21,198,192, 42, 45,157,247,238,221,203,208, 26,152,113, 95,205,154,207,101,
-102,234, 80,119,218,108, 48, 34, 57,180, 12,160,103,105,232,193, 67,232,226,213,176,176,179,192, 29, 46,131,211,210,212,216, 55,
- 37,156,252, 43, 42,159, 85,129,153,211,204,105,230,252,103,114,254, 43, 45, 88,174,174,174,173,123,125,218, 17,109,123,204, 5,
-199,113, 8, 15, 89,142,140,148, 87,112,117, 22, 33, 42, 38,187, 25,128, 27,166, 94, 48, 33, 33, 33,198,197,197,165,233,226,181,
-235,142,117, 14,106,226,237,229,234, 34,178,118,175, 1,153,163, 35, 82, 83, 83,112, 63, 56,194,176,233,210,213,231,106,141,198,
-164,165,114, 88,150,229, 88,150,133, 64, 32, 0, 71,211,240,153, 58, 27,132,162, 64,241,121, 69,150, 29, 16, 2,203,128, 22, 32,
-124, 62, 12, 38,250, 12, 41,149,202, 56, 87, 87,215,190, 83,166, 76,249,125,215,174, 93, 84,219,182,109,253, 78,157, 58,197,254,
-149,204, 78,122,118, 60,204,169, 97,159, 54,235,126,217,120,196, 63,176,105, 13,247,154,238,162,230,110, 86,208, 27,140, 72, 74,
- 78,195,141,187, 47,180, 17, 97,143,227, 57,189,190,111,114, 88,217, 81,220, 1,192, 96, 48,196,184,185,185, 57, 45, 88,176, 0,
- 12,195,128, 97, 24, 24,141, 70,164,166,166,226,222,189,123,104,216, 56, 8,222, 35, 71, 35, 37, 37, 5,235,214,173,131,155,155,
- 27,126,250,233, 39,228,228,228,224,230,205,155,101,230, 43,159, 6, 51,120,112, 65, 28, 44, 30,152,213, 61,122, 92,175, 95,191,
-126,203,166,134,100,193,188,117,249,150,173,105, 99, 7, 11,174,199, 92, 63, 44, 18,137,182, 68, 71, 71,151,235, 47,228,233,233,
- 41,212,104, 52,126, 28,199,209,217,217,217,107, 53, 26,205,136, 25, 51,102,184, 44, 93,186, 20, 94, 94, 94, 72, 77, 77,133, 76,
- 38,131,151,151, 23,114,114,114, 16, 29, 29,109,212,235,245,155,141, 70,227,194,164,164,164,148,242,184, 31, 62,124,248,218,223,
-223,191,105,114,210,166, 99, 19, 39,116,246, 50, 48,129, 66, 75,203, 86,224, 56, 3, 50, 51,226, 0, 60,213, 31, 63,113,229, 77,
-102, 38,253, 89,112,112,112,164, 73, 61, 14,138,154,176,102,205, 26, 20, 46,149, 19, 31, 31, 95,100,250, 43,205,130,101, 10, 86,
- 31,142,211, 0,216,191,226,203,230, 95,102,167, 62,245,178,229,189,123,219,180, 1,187,110,245,225, 56,205,130, 47,173, 23,167,
-190,187, 17,145,160,186,184,121,247,177,163,244,240, 62,125,141,110,242,200,217, 98, 71,238, 72,251,158, 21, 90,219, 56, 63, 63,
-191,106,132,164,215, 74, 78,123, 21, 60,106,204,248, 1, 86, 2,245,185, 70,110,105,158, 84,117,127,113,104,104,232, 91, 83,215,
-244, 44, 81,246, 35, 20, 10, 69,235,149, 43, 87, 94, 4,240,129,143, 89,114,106,250,213,102, 61, 38,115,153,153, 89,143,147,195,
- 78, 62,171,136, 43, 56, 56,120, 71, 96, 96, 32,134, 13, 29,181,117,236,232,177,116,131,169, 95, 35,254,250, 85,192,104, 64,226,
-173, 27,144,200,141, 56,147,250,206,152, 71, 83,227,130,131,131,205, 81,220,205, 48,195,140,127,151,192,138,139,139,187,225,233,
-225,118, 41, 34,162,117,167,234,110, 14,249,189,222,183, 74,196, 39,105, 47,153, 58, 60, 88, 82,100, 17, 66, 2,207, 50,204,192,
- 75,124,126, 15, 82, 16,138,129,171,194, 98,207,121,121,121, 73, 77,155, 54, 45, 35,246,194, 79,165,238, 53, 26,141,113,166,112,
-199,199,199, 95, 87, 40, 20, 67,155, 55,111,190, 84,169, 84, 30, 75, 73, 73, 81,253,213, 12, 79,122,118, 60,140,180,109, 91, 63,
-248,193,205, 97,161,193,247,123,112, 28,231, 11,128, 16,138,250, 99,177,231,176,138, 23,123, 86,171,213,227,231,206,157,187,133,
-199,227, 85, 71, 65,224,208,194, 44,211,235,245,244,142, 29, 59,196, 58,157,142, 6, 64, 4, 2, 1, 35,151,203, 53,119,238,220,
- 97,140, 70, 99,140,193, 96, 24, 95, 22,239,174, 80,142, 95,114,159,143,143,143,236, 53, 15,185,133,191,211,212,128, 82,169, 92,
-110,202,253,158, 59,119,206,221,198,198,166, 19, 33,164, 31,199,113,245,114,114,114,180, 63,252,240,195,221,107,215,174,101,191,
-122,245,170, 75,171, 86,173,136,179,179, 51,162,163,163,185,220,220,220, 35, 20, 69,125,167, 84, 42,163, 76,205,207,208,208,208,
- 40, 66, 72, 35, 85, 30,247,185,133,252, 66,119,150, 67, 35,128, 35,132,144,103,185,185,228,156,139,139,199,111,151, 47, 31, 54,
-121, 42, 92,193,218,130,189, 10,127, 7, 4, 4,156,123,245,234, 85,183, 66, 11, 86, 73, 31,172, 74, 65,154,123, 74,163,126,215,
-151,200,243,142,175,254, 57, 78, 3, 0,243,214,100,102, 1,216, 62,181,143, 45,251, 50,100,251,114, 87,203,200, 89, 63, 31, 79,
- 55,105, 77, 62,127,127,127, 15,138,162, 6, 2,104,224, 40,202,172,237, 32,204, 50, 18,194,181, 35,132,178, 7,240,212,199,199,
-231, 12,128,184,170, 36, 85,169, 84, 70, 0,168, 81,114,127,242,139,147,247, 0,220,171, 12, 87,112,112,240,142,102,205,154,157,
-220,176,117,243,110,154,144,166,196,104,180, 54, 78, 24,244,199, 98,207, 34,225,240, 96,243, 98,207,102,152, 97,198,191, 81, 96,
- 1,192,155,168,184,206, 0,224,229,229,197,189,126,253, 26, 28,199,145,191,114,225, 2, 1,117, 0, 38, 6, 17, 45, 11,207,159,
- 63,247,255, 79,102,144, 82,169,220, 15, 96,255,199,228,228,242,135,170,118, 20,108, 85, 66,124,124,252, 51, 0, 65,255,141, 66,
- 18, 22, 22,166, 26,225, 79,138, 44, 91,124, 26,140,169,255,237,212,169,211,123,189, 94,127, 5, 64, 44, 33,196, 26, 64,186, 94,
-175,191,152,146,146,146,228,236,236, 28,248,254,253,251,239, 11, 44,145,139, 18, 19, 19,131,171, 88,150, 88, 0,251, 10,182,143,
-138,144,144,144,238, 10,133, 34,212,206,206,206, 83,163,209, 8, 53, 26,141,160,184,246,151, 72, 36, 41,166,114, 89, 91,144, 93,
- 2, 94,134,157,181, 5,249,211,115,183,117,197, 81,181,234,121, 93, 91, 87, 28,173,140,184,244,243,243,219, 75, 81, 84, 77,142,
-227,156, 0,206,138,227,144,194,113, 92, 42,143,199,139, 15, 11, 11,139,255,167, 84, 52,247,242, 5, 84, 15,115,149,107,134, 25,
-102,152, 5, 86, 25,136,140,140, 36,230,108,251,247,161, 52,203,150, 41, 40,136,112,127,183, 96,251, 0, 5,130,170,231, 63,253,
-222,149, 74,229, 71, 17,241, 99,102, 61,139, 7, 48, 61,176,148,121, 22,243,214,165,231, 0,248,186,221,167,149,227,124,252,248,
-113, 12,128, 24,115, 9, 53,195, 12, 51,204,248,103,129, 50,103,129, 25,102,152, 97,134, 25,102,152, 97,198,199, 5, 1, 80,234,
- 76,128,202,172,148, 93,149,217, 4, 21,241,155, 57,205,156,102, 78, 51,167,153,211,204,105,230,252,255,199,249,175, 65,225,180,
-243,255,196, 6,160,163,153,211,204,105,230, 52,115,154, 57,205,156,102, 78, 51,231,191,109, 51, 15, 17,154, 97,134, 25,102,152,
- 97,134, 25,102,124,100,148,233,228,238,225, 81,205,135, 50,178, 45, 56,142,162, 57,138, 51,144,108,245,193, 55,233,233, 31, 4,
- 1,172, 94,189,186, 53,159, 66, 79,194,113, 50, 66, 88, 35, 75, 83,119,162,162, 98,195, 76,185,176,143,143,143, 0,192, 8, 62,
-159,223,210, 96, 48,184,240,120,188, 4,141, 70,115,155,207,231,239, 10, 11, 11,211,255,147, 50,169,101,203,150,131,142, 28, 57,
- 98,221,163, 71, 15,173, 94,175,103, 68, 34, 17,111,223,190,125,162,145, 35, 71,102,222,190,125,187, 74, 51, 12,253,252,252,218,
-175, 88,177,162, 86,251,246,237,209,178,101, 75, 85,183,110,221, 4,129,129,129,130,175,191,254, 58,250,241,227,199, 87, 43,195,
-229,228,228,228,195,227,241,246, 16, 66,104,142,227,134, 21,204, 48,252,143,128, 16, 50, 8, 64,127, 0, 46, 0, 18, 1, 28,226,
- 56,110,127, 21,185,186, 32,223,201,221,183, 96,215, 83, 0,167, 57,142,187,240, 23,210,215, 5, 64, 79,154,166,253, 0,192,104,
- 52, 62,254, 88,156,124, 62,191, 17, 0, 24, 12,134, 39, 31,139,147, 16,210,168,192,146, 92, 37,206,128,128,128, 31,132, 66,225,
- 88, 0,208,233,116, 59,228,114,249,146,210,206,187,113,227,134,174,172,208, 39, 62,181, 8, 23, 54,171, 94,254,247,229,225, 0,
-128, 10,127, 71, 87,113, 22,241, 22,111,174, 52, 94,140,127, 89,229,201, 51, 10,133,226,139,110,221,186,125,115,225,194,133, 31,
-227,226,226,182, 86,246,255, 71,142, 28,161, 77, 57,239,243, 89,219,123,200,229, 54,223,231,102,103, 45, 61,176,114,212,241,194,
-253,253,250,245, 51,194, 12, 51,204, 48,195, 20,129,229,225, 81,205,167, 95,239,207,126,154, 48,126, 34,161,105, 10, 47,195,195,
-121,147,166,126,217,201,219,219,219, 85,166,209,120,115, 0,171,150, 72,158,211, 52, 21,191,105,195, 47, 22,117,235,212, 49, 26,
-141, 44, 54,111,217,212,213,195,163,218,156,138, 68,150,163,163, 99, 45, 23, 23,151,181, 83,167, 78,117,236,212,169, 19,229,228,
-228,132,184,184, 56,203,227,199,143,215,254,245,215, 95,123, 56, 58, 58, 78, 79, 78, 78,142,174,202, 13,185,184,184,180,114,180,
- 70, 39,185,152,235,128,108,130, 92, 35,126, 79,214,226, 82, 66, 66,194,173,170,102,146, 78,167,155,146,151,151, 23,228,237,237,
-205,109,222,188,153,140, 29, 59,150, 35,132, 16,181, 90,189, 11, 85, 12,225, 32,149, 74, 55,180,111,223,222,171, 69,139, 22, 81,
-119,239,222,237,198,113,220,185,126,253,250,121, 72,165,210, 72, 0,117, 42,195, 69,211,244,206,176,176,176, 70, 26,141, 6, 1,
- 1, 1,191, 2, 8,248, 15,137,171, 95,237,236,236,216, 77,155, 54,109,105,216,176,161,167, 74,165,202, 27, 51,102, 76,103, 66,
- 72,123,142,227, 70, 87,130, 71, 6, 96,157,149,149,149, 96,241,226,197,247,219,182,109, 27, 35, 20, 10,165, 17, 17, 17,220,212,
-169, 83, 71, 17, 66,250, 1,152,202,113,156,170,178,156, 10,133,194,114,217,178,101,175,252,253,253,239, 10,133, 66,193,219,183,
-111, 49,109,218,180, 9,127,133,179, 94,189,122,210,101,203,150, 61,241,246,246, 78, 19,139,197,130,247,239,223, 99,198,140, 25,
- 99,104,154,238,199,178,108,149, 56, 29, 29, 29,101, 75,150, 44,121, 22, 24, 24,152, 41, 22,139, 5,111,222,188,225,190,252,242,
-203,177,149, 73,103,155, 54,109, 62,167, 40,106,193,205,155, 55, 1, 0,205,154, 53,251, 65,167,211,205, 45,121, 30,199,113,104,
-217,178,165,166, 77,155, 54, 99,111,220,184, 81,106, 88,148,221,162, 89,131, 0,224,235, 31, 10,126, 23,236, 47,237,247,112,237,
-242, 74,151,121,159, 90,132, 3,128, 73, 95,109, 28,154,255,153,191,127, 83, 65,232,222, 13,181, 8, 87, 25,209,230,234,234, 58,
-190, 73,147, 38,223, 62,120,240, 96,119, 96, 96,224,180,173, 91,183,242,123,244,232,177, 88,161, 80,120,118,233,210,165,223,189,
-123,247, 86,132,135,135,111,248,152,229,223,217,185,218,250, 85, 63,111, 85, 76,159, 60,122, 41,128,227,230,230,195, 12, 51,204,
-168,180,192,162,140,108,139, 9,227, 39,146,129,131, 62, 79, 76, 72, 74,102,229, 22, 86,131, 14, 29, 62, 44,173, 83,167, 14,165,
-249,229, 23, 48, 41, 41, 48,206,156,217,252,198,141, 27,134,201,211,103,170,181,154,188,157, 46, 78,142,210,131,251, 15, 56, 31,
- 59,122,164, 5,128,176,242, 44, 87, 46, 46, 46,107,143, 30, 61,234, 92,171, 86, 45,232,116, 58,164,165,165,193, 96, 48,160, 79,
-159, 62,116,211,166, 77,157, 71,141, 26,181,214,199,199,231,179,202, 88,178, 28, 28, 28,156,188,170,243,207,204,155,222,181, 78,
-251, 54, 1, 50,103,215,154, 64, 28,139,248,232,215,141,175, 60, 8,153,218,210,211, 45, 34, 50, 91,215, 35, 37, 37, 37,169,178,
-153,148,150,150, 54,107,252,248,241, 71,125,125,125, 29, 68, 34, 17,156,157,157,201,152, 49, 99,146, 19, 18, 18, 22,252, 5,177,
-146,159,215, 20,101, 44,254,105,234,130,212, 37,224,102,101,101, 5, 43, 43, 43, 0,112,253, 43, 5,162,127,255,254,116, 76, 76,
-204, 88,150,101,189,139,239, 79, 72, 72,240,112,112,112, 72,122,251,246, 93, 35,181, 78, 31, 56,113,242,156,249, 3,251,117,180,
-190,123,247, 46,186,119,239, 78, 17, 66, 6, 85,194,146,181, 46, 40, 40, 40,114,233,210,165,130,200,168,183,245,239, 63,122, 12,
-153, 88, 96,116,115,115, 21, 61,125,250, 84,184,108,217,178,164, 31,127,252,113, 29,128, 81,149, 72,250,186,254,253,251,103, 76,
-159, 62, 61, 47,226,205,219,154, 15, 66,159,113,114,145,192,224,228,228, 64,223,189,123,151,191, 97,195, 6,242,221,119,223, 85,
-154,115,204,152, 49, 9,211,167, 79,231,165,164,101,214, 78, 76, 74,229,132, 2, 90,111,109,109,205,187,124,249, 50,181,115,231,
- 78,253,212,169, 83, 43,205,217,189,123,247,164,217,179,103,243,195, 35,163, 60,238,135, 60,131, 92,196, 55, 56, 59, 59,210,247,
-239,223,167,215,173, 91,199,204,155, 55,207, 36, 78,142,227, 54,175, 92,185, 18, 39, 79,158, 4, 0,236,223,191, 31, 30, 30, 30,
- 31, 12,251,171, 53, 90, 80, 4,120,251,246,173,116,194,132, 9,155, 81, 74,220,185,176, 89,245,176, 27,192,240,225,195, 19, 77,
-179, 66, 45,175, 92,161,218,226,205, 21, 10,171,137, 19, 39,150, 21,155,107,168, 79, 37, 68, 86,139, 22, 45,190, 57,120,240,160,
-253,225,195,135,191, 58,126,252,120, 97,167, 69,186,126,253,250, 47,122,245,234,133,209,163, 71,127, 3,224,163, 10, 44,161, 64,
- 36, 34, 20,129, 68, 44,181, 52, 55, 29,102,152, 97, 70,149, 4, 22,199, 81, 52, 77, 83, 72, 78, 74, 53,124,210,177,211,168,245,
- 27, 55,138,132, 66, 33,116, 58, 29, 84, 87,175,130,211,104, 96, 45,149,162, 91,183,110,252, 6, 13, 26, 88,142, 31, 51,102, 76,
- 82,162,114, 11, 77, 83,206, 28, 71, 85,100,110, 31, 49,117,234, 84,199, 90,181,106,125,176,211,104, 52, 34, 61, 61, 29, 22, 22,
- 22, 24, 48, 96,128,253,222,189,123, 71, 0, 48,201,220,239,228,228,228, 94,199,195,233,206,145,237, 51, 93, 28,173, 41, 32,229,
- 8,240,254, 53,176, 79, 12, 47,199,234,240,106,215, 86,214,171, 73, 67,255, 1, 43,118,132, 58, 57, 57,181, 72, 74, 74,122, 87,
-153, 76,122,251,246,237,109,133, 66, 49, 70,173, 86,159, 4, 64,221,185,115,135,139,137,137, 25,159,152,152,248,190,170, 25,207,
-178, 44, 50, 51, 51,193,178, 44, 93,240,187,240,243,111, 43, 12,253,251,247,167, 99, 99, 99,199,123,123,123,215,222,182,109, 27,
-146,147,147, 33,145, 72, 96, 52, 26,209,188,121,243,234, 29, 58,116,120,147,146,150,105, 99, 96, 12,186,132,184, 55, 77, 14,108,
-125,151,215,200,203,235,238,161, 67,135, 26,218,217,217, 13, 48,197,154, 71, 8,233, 98, 97, 97,193,251,233,167,159, 40, 11,107,
-231,238, 77,130, 20,252,103, 97,175,222, 9, 68, 60, 54, 43, 43, 59,237,201,147, 39,225,243,230,205,107,117,234,212,169, 68, 66,
- 72, 23, 83,134,204, 8, 33, 93,156,157,157, 45,166, 77,155,166,146, 88,216,183,108, 28,228,200,123, 30,246, 58,158, 47,160, 12,
- 45, 90,180,104,119,239,222,189,157, 51,103,206,244, 61,123,246,108, 86,101, 56,107,215,174, 45,153, 62,125, 58,109,101,109,223,
-209,193, 89, 65, 59,216, 90,123, 2, 64, 84, 84,212,222,164,164,164,200,137, 19, 39, 54, 62,123,246,108, 78,101, 56,237,237,237,
-165,179,103,207,230,213,244,168,219,215,195,171, 46,117,229,250,131,103, 66, 33,101, 80,171,213,233, 47, 95,190,124,253,205, 55,
-223, 4,158, 61,123, 54,219, 20,206,188,188, 60, 11, 87, 87, 87, 56, 57, 57,129, 85,171,145,149,149,133, 99,199,142, 33, 39, 39,
- 7, 70,163, 17, 18,137, 4, 63,174,222,130, 55,207,239,227,214,173, 91, 80,171,213, 22, 31,163,156,248, 44, 15, 71,216,120,211,
-197,213, 38,118,242,208,114,132, 21,138, 9,175,161,216,226,205,149, 55, 92, 88,204,114, 21,119,248,240, 97, 71, 79, 79, 79,180,
-109,219, 22, 0, 48,106,212, 40,116,236,216, 17, 39, 79,158,196,165, 75,151, 98,154, 53,107,246, 58, 54, 54,118, 85,124,124,252,
-150,143,113,223, 70,206,168, 7, 0,145, 88, 36, 10, 15, 15, 39,245,234,213,227,204, 77,136, 25,102,152, 81, 22, 74,117,114,231,
- 8, 81,189,120,249,146, 47,183,182, 30,186,126,227, 70, 17,159,207,199,251,247,239, 17, 22, 22,134,188,223,127,135,250,238, 93,
- 36, 37, 37, 33, 55, 55, 23, 14, 14, 14, 88,178,124,185, 76, 32,145,141,138,124,253,154,230, 40,206, 80,172,135,253,167,169,154,
- 66,161,176,101,183,110,221,202,116,174, 79, 76, 76, 68,167, 78,157,120, 60, 30,175,101, 25,189,246, 43, 37, 26, 45,162,112, 32,
-167, 15,111,157,230,226,200,123, 6,188,158, 1,228,132, 2,156, 22, 96,116, 64, 76, 56,112, 98, 53, 92,211, 34,201,254, 41, 3,
-156, 93, 37,130,211,164,132,153,168,162, 41,165,110,110,110, 30, 30, 30, 30,219,251,245,235, 71, 1, 64,203,150, 45,137,135,135,
-199, 86, 55, 55, 55,143,114,172, 11,229,114,106, 52,154,251, 25, 25, 25,232,209,163,135, 93,243,230,205,175,244,232,209,195,174,
-112,127, 85, 57, 11, 96,215,190,125,251, 52, 15, 15,143,253,238,238,238, 34, 19,172, 32, 69,156, 49, 49, 49, 99,235,213,171, 87,
-123,219,182,109, 52, 77,211,216,182,109, 27, 14, 30, 60,136,219,183,111, 35, 57, 57, 89, 58, 99,198, 12,235, 51, 87,238, 95,184,
-115,251,225,169,149,115,191,178,235,211,161,173,135, 77, 86, 74,182,173,173,109, 55, 0,206, 38,166,179,231,220,185,115,111, 60,
-126, 25,229, 72,241,248, 2,145,128, 47,113,176,183,174,225,236, 96, 83,219,213,206,166,182,133,144,111,157,157,157, 29,125,226,
-196, 9, 6,197,130,144, 86,196,185, 98,197,138,151,225, 81,177,118, 20,205,227,243,105,190,208,218, 74,110,247,105,143, 78,237,
- 0, 64, 66, 19, 81,118,118,118,236,222,189,123, 43,197,185,116,233,210,144,132,148, 12, 71,190, 64,200, 19, 9,248,226,194, 3,
- 54,150,114, 39,153, 72, 36,201,203,203,123,191,125,251,118, 93, 37, 57,159,188,136,124,111, 79, 40,208, 20, 8,223,198,198,194,
-209,193,218,194,217,209, 82,238, 44,166, 32,206,206,206,126,183,127,255,126,189,169,156,201,201,201, 8, 15, 15, 71,181,198,141,
-113,229,202, 21, 84,175, 94, 29, 3, 6, 12,192,231,159,127, 14,137, 68,130,246,205, 26, 98,206,156, 57,120,243,230, 77,153,207,
-189,208, 31,170, 60, 40, 20,138,235,149, 41, 75, 64,254,176, 96,121,226,170, 36,103,105,231,149,228,108,209,162,197, 55,199,142,
- 29,179, 95,179,102,141,223,151, 95,126, 25,117,236,216, 49,248,250,250,226,229,203,151,112,117,117,197,129, 3, 7, 48,121,242,
-228,168,249,243,231,251, 93,190,124, 89,161, 80, 40,102,153,250, 30, 13, 27, 54,172,101,255,254,253,111,245,239,223,255,241,192,
-129, 3,183,142, 31, 63, 94,241,129, 21, 87, 25, 23,172,211,233,208,200,191,177,116,209,175, 15,134, 84,225,221,172, 20,204,156,
-102,206,127, 27,231,191, 66, 96, 25, 88,156,158, 50,109, 70,222,238,221,187,165, 66,161, 16,239,223,191, 71, 98, 98, 34,142, 31,
- 61,106, 28,220,176, 97,206, 48, 63,191,236,227, 71,143,114,122,189, 30, 28,199,161,118,237,218,232,214,173,155,100,204,184,137,
-201, 36, 91,125,176,130,135,226,232,224,224, 80,180,104,238, 7,166,173, 17, 35,192, 48, 12, 44, 44, 44, 64, 8,113, 52,229, 6,
- 92, 92, 92,250,143,250,186,131,155,101, 13,203, 36, 46,113,119, 58,104, 49,192,179, 0,120,150,128,196, 18, 16,203, 0,129, 24,
-218, 71,183,211, 57,180,120,215,217,191,191,171,139,139, 75,255,202,100,146,189,189,253,247, 71,142, 28,113,120,250,244, 41,151,
-147,147,131,164,164, 36,238,155,111,190,113,176,183,183,255,190,170, 25,175, 84, 42, 23,141, 26, 53, 42,169,111,223,190, 86,187,
-119,239,174,214,183,111, 95,171, 81,163, 70, 37, 41,149,202, 69,127,229,129,242,249,124,250,234,213,171,182, 95,125,245,213,231,
- 6,131, 33,184, 67,135, 14,105,254,254,254,193,206,206,206, 53, 76,176,170,121, 23,138, 43, 0,160, 40, 10, 66,161, 16, 66,161,
- 16, 86, 86, 86,153, 81, 81, 81, 70,119, 39,137, 80,204,228, 26,109,120, 20,191,166,139,179,157,181,179, 75, 91,149, 74,117, 27,
- 64,130,137, 73,244,109,219,182,173,152, 97,105,227,196, 17,237,107, 79, 30,217,190,230,182,165, 19,125, 55,252, 52,177,254,202,
-133, 19, 90, 45,253, 97,244, 48,194, 48, 57, 53,107,214,244,192, 31,206,239, 21, 89,134, 26,249,250,250,138, 56,240,241,228, 69,
- 84,220,219,152,248,236, 46,237, 91,212, 45,186, 96,147,166,159, 59, 58, 58,126,234,225,225,209, 17, 64,103,147, 76,187, 60, 94,
-163,134, 13, 27, 74,120,124, 17, 28,237,173, 60, 44,228,178,162,161, 87, 27,123,199,142,206,110,110,163,121, 64,154,139,139,139,
- 27,143,199,107,100,106, 58, 3, 3, 3,197, 44, 4,112,118,176,181,117,176,183,177,236,214,161,165, 79,139, 86,205, 27,250, 55,
-111,217,206,191, 89,139,145,148,209,152,225,238,238,238, 90,232,252, 94, 17, 78,156, 56,129,117,235,214,161,101,253,250,112,119,
-119,135,131,131, 3,126,255,253,119,252,254,251,239,144,203,229,200,204,204,196,166, 77,155,112,241,226,197,191, 92, 89, 20, 10,
-162, 34,199,244,143,128,146, 34,171, 34,177,119,251,246,237, 99,135, 15, 31,134,167,167, 39, 70,142, 28,233,177,115,231,206,168,
-168,168, 40,200,229,114, 60,121,242, 4, 95,127,253,117,212,252,249,243, 61, 70,140, 24,129, 3, 7, 14, 32, 62, 62,254, 55, 83,
-210, 49,112,224,192, 73,126,126,126, 87, 19, 19, 19,155,165,167,167, 55, 56,118,236,216,168, 62,125,250, 68, 15, 26, 52,168, 67,
-145, 5,203, 96,216,119,246,212, 81,116,255,244, 51,212,173,223, 96,243,136, 57,123, 27,154,155, 16, 51,204, 48,163,204,118,164,
-180,157, 49, 49, 49,153,222,222,222,174,158,158,158,148, 78,167, 67, 86, 86, 22, 46,158, 63,111, 60,112,232,208, 89,157, 78, 55,
-149,162, 40,193,174, 61,123, 54, 59,187,184,180,251,172,111, 95, 98, 48, 24,208,177, 99, 71,225,213,171, 87,237,158,198,196,228,
-148,119, 65,154,166,139,172, 71, 95,124,241, 5,214,172, 89, 83,216,123,252, 67,224, 25, 12, 38,251, 34, 73,228,108,183, 54, 29,
- 27, 88,198,202,126,177,212, 55, 55,228,186,191,177,184, 47,203,149, 4,130, 18,242, 32, 17,131,213,137,153,200,204,142,193,111,
-222,214,244,145,104,146,107,182,168, 27,132,131,247,143,119, 3,112,200,212, 76,146, 72, 36, 77,164, 82, 41,194,195,195,211, 3,
- 2, 2, 50, 45, 45, 45,173,188,188,188,236, 37, 18, 73,147,170,102,124, 82, 82,210, 91, 87, 87,215,214,159,125,246,217,100,138,
-162, 58,178, 44,123, 37, 45, 45,109,125, 82, 82,210, 91, 83,254,239,234,234, 58,145,227,184,121, 0,142, 20,238,211,233,116,160,
- 40, 10, 28,199,161,103,207,158, 88,186,116,169,207,149, 43, 87,112,243,230, 77,219,193,131, 7,223, 87, 40, 20,153,132,144,209,
-241,241,241,101, 90,201,210,210,210,176,121,243,102,240,120, 60, 88, 91, 91,195,194,194, 2, 98,177, 24,109,219,182, 77, 90,185,
-114,165,215,254,253,251, 13,153,201,201, 68,146,147,165, 37,118,118, 98, 40,170,119, 25, 58, 96,224,125, 0,135, 77,189,119,185,
- 92, 46, 17, 66,155, 67, 25, 53,212,138,249, 27,120, 82,129,128,136, 5, 60,136,216, 60,122,206,210,197,156,152,112,252,194, 33,
- 83, 83, 33, 22,139,133, 50, 33,167,229,139, 40,131,148,226, 62,202, 56, 43,143,199, 19,137,248, 80,151,117, 92, 64, 17,154, 16,
- 34, 1,160,173, 76, 58,229, 66, 99,153,231,139, 41,208, 20, 69,137,203,226,236, 95,159,112,135, 39, 23, 10,156, 34,163, 26, 24,
-134, 65,147, 38, 77,112,224,228, 53,156,251,253, 46, 82,223, 63,197,212,137,163,224,229,229, 85,161,184, 42,244,193, 50,161, 83,
- 0,133, 66,113, 93,249,131, 85,197, 39, 23,248, 93, 85, 52, 52, 88,156,211,103,121,120,185,179, 19,221,220,220,198,249,249,249,
- 13, 63,126,252, 56,218,181,107,135, 30, 61,122,160,110,221,186, 30,131, 7, 15, 6, 0,180,110,221, 26,223,127,255,189,199,231,
-159,127,142, 19, 39, 78,224,220,185,115, 8, 12, 12,156,166, 80, 40,146,149, 74,229,198,114,196,213,252, 49, 99,198,204, 93,191,
-126, 61,248,252,252, 21,161,122,247,238, 93, 88, 63,238,232,223,191,127, 90,225,185,135,183,199,221,173,229,225,213,124,210,212,
-175,132,147, 39, 12,155, 13,224,115,115, 51, 98,134, 25,102,152, 44,176, 0, 64,164,215,215,213,110,222, 12,213,149, 43, 16, 94,
-186,132, 51,141, 26,229, 50, 12, 51, 83,169, 84,198, 2,128,147,147,211,244, 67,135, 15,223,233,248,251,239,150,186,240,112,184,
- 61,123, 6, 94,157, 58,126,166, 94,120,201,146, 37, 69,162, 0, 0,246,236,217,131,172,172, 44,100,101,101,129, 97, 76, 94, 75,
- 24,124, 33, 90, 58,218, 85, 71, 2, 34,193,242, 40,249,187,186,121, 77,229, 26, 11,165,107,140,147, 42, 75, 80, 7,225,113,245,
-101,234, 76,109, 83, 66,235,160, 73,205,131, 91, 75, 47,240, 80,250,240, 99,153,102, 62,138, 42,108, 28,211, 67, 66, 66,122,182,
-108,217,242, 52, 0,251,194,253, 85, 69,124,124,252,107, 0, 83,171,242, 95,154,166,231,221,186,117,203,241,208,161, 67,147,127,
-254,249,103,174,184,192, 42,252,206,227,241,192,113, 28,100, 50, 25,120, 60,158,211,137, 19, 39,156, 62,253,244,211, 13, 0,202,
-124, 78, 82,169, 20,142,142,142, 16, 10,133,176,176,176,128, 42, 59, 67,182,233,167,185,109,165, 54, 78,182, 83,167,205,164,198,
-141, 27, 23,182,118,237,218,106,206,117,235,122, 63,127,254,252,109,159,129,159,223, 61,121,242,164,186, 18, 14,238, 79,195,195,
-195,105, 47, 79,119, 1,107, 80,179, 50, 1, 32,126,242, 51, 43,180,112,134,152,166,193, 35,224, 36, 82,153, 99,108, 66, 66,140,
-169, 86, 49,142,227,158,188,123,247,142,184, 41,156,120, 57, 42, 77,166,140,199, 10,163, 31, 61,124, 89,171,113, 19,111, 0,208,
- 60,186,123, 92, 84,183,190,133, 50, 59, 71,226,234,234, 26,101, 10, 39,195, 48, 79,226,226,226,136,173,173, 45, 63, 50,242,245,
-111,118,150, 22, 10, 91, 39,167,182, 0,160, 75, 79,185, 73,212, 26, 37,159,207,119, 77, 73, 75, 75, 96, 24, 38,198,212,116, 70,
- 71, 71, 19, 55,133, 19,239,244,217,115, 7,156,101, 82, 23,107,137,200, 74, 76,129,136, 57, 54, 75,200, 48,137, 18,169, 76, 17,
- 23, 31,159,196,113, 92,153,126,130,155,216,201, 67,243,191,253,186,183,132,117, 7,215,130,163, 97, 69, 27,193, 55,168,112,255,
-216, 33,124, 54,229, 75,147,222,167, 21, 11, 71,236, 95,177,112, 68,153,225, 25, 74, 8, 34, 40,199,255,197,154,103,139,247,245,
- 63,113, 42,203,119,112,239,210,165,203,119, 91,183,110,149, 22,254,126,249,242, 37, 90,182,204,127,149, 23, 44, 88,128,206,157,
- 59,163, 81,163, 70,120,249,242, 37,106,212,168,129, 99,199,142,129,166,105,254,184,113,227,190, 1,176,177, 28,203,109,207, 45,
- 91, 62,116,211,210,235,245, 96, 24, 6, 6,131,193,133, 97, 24,151,194, 78,223,207, 63,175, 75,189,116,241, 12,190,153,179, 0,
-142, 14,206,126,230, 38,196, 12, 51,204, 40, 83, 59,148, 89,233,112, 28,203,164,167,131,211,230,119,164, 5, 2, 1,199,113, 92,
- 81,229,198,231,243,165, 86, 86, 86,132,239,230, 6, 34, 42,112,245, 33,228, 47,199,131,225,241,120, 48, 26, 77,167, 49, 26, 65,
-131,232,193,225, 15,127, 83,149,152,224, 71,251, 14,152, 42,251, 18,137, 66,171,226, 45, 28, 56,134,133, 17,149,179,142, 16, 66,
- 56,149, 74, 5,173, 86,107,227,233,233,121, 86,163,209,216, 20, 52,152,127,155,147, 43,195, 48, 81, 60, 30, 15, 35, 70,140, 0,
-242,151, 60,130, 78,167,195,227,199,143,161,213,106,161,211,233,112,231,206, 29,100,101,101, 65,167,211,225,242,229,203,168, 81,
-163, 6,120, 60,158, 75,121,188, 44,203,194,193,193, 1, 78, 78, 78,208,170,178,101, 71,183,174,237,190,124,254,183,246,131, 60,
- 57,234,215,117,171, 88, 79, 79,207,140, 6, 13, 26,216, 74, 36,146,140,128,128,128,204, 19, 39, 78,156,170, 76,136, 6, 0,167,
-103,207,158,237, 27, 20, 20,228,110, 45,151,233, 69, 66, 26, 34, 70,197,137,180,105, 28, 79,157,202,213,112,115,215, 67, 38,111,
-210,183,111, 95, 35,128,211,166,114, 78,157, 58,181,186,183,183,183,189,181,165, 44,155, 71, 33, 94, 96, 52,198,103, 4,223,189,
- 12, 0, 2,123, 71, 53,100,242, 38,131, 7, 15, 54, 84,134,115,230,204,153,158,174,174,174,118, 20, 69, 50, 25,189,254,125, 81,
-121,208,168,147,104,145, 88, 5,145,184,213,232,209,163,153, 74,166,211,195,215,215,215,206,198,202, 50,147, 79,145, 24,129,145,
-137,149,112,198, 56,161, 65,159, 34,114,116,202,133, 76,222, 98,208,160, 65,101,166,179,208,122, 85,210, 50,196,227,241, 16, 31,
- 31,143, 60,229, 83, 8,226,195,209, 72,206, 71, 83,103,123,200,100,178,138, 5,214,248,151, 36, 44,154, 35, 97,209, 28,193,248,
-151,164,180,223,165,136,172,114,203,126,185, 67,125, 91,188,175, 87,133,243,220,185,115,203,122,245,234,101, 24, 56,112, 32, 46,
- 95,190, 12, 66, 8,110,223,190,141,248,248,120,116,238,220, 25, 28,199,225,241,227,199, 69,226,171, 95,191,126,232,209,163, 71,
-222,133, 11, 23,126, 52,181,112,110,221,186, 21, 12,195,128,207,231, 67, 34,145,192,210,210, 18,182,182,182,112,114,114,122,227,
-232,232,248,124,201,230, 19,175, 59,117,238,129,244,180, 84, 36,167, 36, 62, 54, 55, 33,102,152, 97, 70,165, 5,150, 65, 36,122,
-193, 78,153, 2,235, 83,167,192,143,140, 68,191,207, 62,179, 20,137, 68,235, 92, 92, 92, 2, 20, 10, 69, 11,137, 68,178, 97,230,
-140, 25, 22,246, 75,150, 64,113,243, 38, 18,175, 92,129,129,207,127, 84,153,139,171,213,234, 66, 1, 3,109,129,144,179,182,182,
-174,148,192, 98, 25,220, 75, 72,137,132, 16,238, 96,193,229, 94,200,110,253, 96, 80,212, 92,199, 51,217,181,188, 94,171, 4, 94,
- 11, 29,154, 58,174,171,209,242,129,138,240,114,133,214, 98, 40,227,149, 48,130,189, 87,153,116,106, 52,154, 44,149, 74,133,218,
-181,107,219,133,132,132,120,122,121,121,217, 22, 8,154,135,127, 37,243, 21, 10, 69, 51,127,127,255,195, 1, 1, 1,111,253,253,
-253, 15, 43, 20,138,102,149,248,251,175,143, 30, 61, 2, 77,211, 24, 55,110, 28,114,114,114,160,215,235,145,150,150,134,152,152,
- 24,232,116, 58,196,197,197,225,213,171, 87,208,233,116,120,247,238, 93, 81, 30,151, 7,131,193, 0, 11, 11, 11,100,166, 37,203,
- 14,110, 90,213,125,241,252,239, 36, 89,111, 66, 16,167, 76, 2,107, 84, 43,191,255,254,251, 40, 79, 79,207,219, 90,173,182, 30,
-195, 48,221, 56,142, 59, 88, 9,161, 74, 1,120,236,229,229,213,105,229,202,149, 45,191, 95,186, 93,100, 65,231,112, 66, 11, 17,
- 43,180, 16,114,194,122, 77, 49,102,222,122,241,234,213, 43,238, 5, 7, 7,103,153, 56, 51,143, 2,240, 56, 32, 32,160, 89, 98,
- 98, 98,203, 70,141, 26,249, 57,215,174, 35, 22,185, 42, 82,133,138, 26,105,156, 58,239, 10, 85,189,102,207,157, 59,119,222,186,
-121,243,102, 82,101, 56,157,156,156, 90,110,222,188,217,191,122,245,234,141,197, 86, 86,146,220,204,204,173,218,204,244,237,124,
-123,103, 9,101,103,223,255,232,209,163,191,159, 61,123, 54,173, 50,156,117,235,214,109,177,100,201,146, 70,254,254,254, 1, 46,
-117,234,138, 37,174,110, 41, 2,215, 26,201, 18,223, 64, 49, 85,195,163,223,246,237,219,175,221,185,115, 39,213,212,128,163, 20,
- 69,129,207,231, 67, 38,147,225,198,141, 27, 24,244, 89, 23, 56, 59, 90,162, 78,221,186,104, 59,126, 10,206,158, 61, 11,161, 80,
-136,191,106,109, 45, 9, 83, 4, 81,101,197, 87, 69,156, 74,165,114, 99,112,112,240,207, 3, 6, 12, 64,199,142, 29,241,228,201,
- 19,204,154, 53, 43,234,236,217,179, 0,128, 39, 79,158, 96,241,226,197, 81,247,238,221,195,200,145, 35,209,178,101, 75, 60,126,
-252,120,119,101,130,143,142, 26, 53, 10, 6,131, 1,185,185,185, 72, 79, 79,199,153, 51,103,208,168, 81, 35, 78, 42,149,126, 70,
- 87,235,244, 99,255, 49,115,154, 55,240,245,195,134,117, 43,117, 66, 30,127,169,185, 9, 49,195, 12, 51, 42, 37,176, 60,109,109,
- 45, 52,154,188,184,155, 55,111,234, 41,138,130, 84, 42, 69,255,129, 3,169,159,126,250,169, 85,239, 70,141,174, 14,110,214,236,
-252,161,131, 7,253,253,252,253,243,215,219,161, 40,156, 60,121, 82,157,149,149,153, 86,189,122,117,107, 83, 47,158,146,146, 82,
-212,251, 86,171,213,224, 56, 14, 22, 22, 22,149, 18, 88,234, 92,234,202,173, 27, 97, 25,156,241,139,152,110,175,215,232,151, 38,
-246, 14,202,100,141,188, 44,163, 1, 89,106, 14, 57, 26,240, 30, 80,182, 65, 35,188,250,232,163, 59, 6,189,122,240, 54, 52, 77,
-199,233, 42, 53,251, 33, 35, 35,227,187,137, 19, 39,166, 57, 57, 57, 17, 11, 11, 11, 56, 57, 57, 81, 99,198,140, 73,141,141,141,
- 93, 88,213,140,247,241,241,249,188, 89,179,102,167, 67, 67, 67,251, 29, 58,116,200,253,240,225,195,253,154, 53,107,118,218,199,
-199,199, 84,159,142, 67,203,150, 45, 83, 9,133, 66, 52,109,218, 20, 57, 57, 57,208,233,116, 21,110, 21, 10, 86,150,133, 88, 44,
-198,225,237,107, 59, 45,158,255,157, 36, 61,252, 1,158,222,190,140, 11,111,181,121,243,150,254,124, 95, 44, 22, 87,233,126,189,
- 28,101, 13, 27, 42, 44, 94,126, 57,106,160,114,246, 55,223, 88, 61,123,246, 76, 58,227,203,233,156, 50, 37,147, 19,119, 95, 77,
- 83,109,191,167, 94,104,236, 73,175, 30,237,241,227,130, 89,157, 96,194,208,169,143,163,172, 97, 3,133, 69,216, 87,227, 6, 69,
- 77,157, 58, 85,186,108,217,178,188,150, 45, 91,102,102,101,101, 73,172,156, 92,252, 69,142, 78, 65,202,140, 76, 89,243, 22, 45,
- 30,143, 26, 53, 74, 85, 89,206,239,191,255, 94,118,235,214, 45, 81,151, 46, 93,114,178,179,179,101, 98,185, 60, 72, 96,105,221,
- 58, 37, 43,203,178,107,215,174,161, 3, 6, 12, 48, 84,133,243,213,171, 87,162,230,205,155,231,100,101,101,201, 44,157, 92,154,
-136, 29,157, 91,197,167,103, 88, 52,109,214, 44,116,236,216,177,186,242, 56,251,175,255, 67,156, 72,165,210,116,111,111,111,204,
-157, 59, 23, 11, 22, 44, 64,255,254,253, 17,253, 54, 26,109, 70,142, 67,173, 17, 19,112,250,222, 3,196,199,199, 99,206,156, 57,
-240,242,242, 2, 69, 81, 9, 31,179,242, 40, 79, 16,149,229, 8,239, 83,139, 92, 47,207,207,170, 34,145,213,169, 83,167,145,189,
-122,245,194,201,147, 39, 49,107,214,172,168,249,243,231,123, 12, 25,146, 63,161,207,207,207, 15, 51,103,206,244, 88,185,114,101,
-212,234,213,171,209,172, 89, 51,184,185,185,125, 90, 9,171, 48,118,236,216, 1,134, 97, 32,151,203, 97,107,107,139, 30, 61,122,
-224,249,243,231, 19,118,238,220, 25, 78,243,249,131,187,127,218, 23,103, 79, 29,195,171, 23,207, 39,236,250,105,232, 51,115, 19,
- 98,134, 25,102,148,133,210,227, 96, 89, 74, 6,110,221,184,193,106,242,244,153, 42,111,111,111, 27,103,103,103, 16, 66,208,165,
- 75, 23,210,236,194, 5, 11,190, 66, 1,187,134, 13,139, 22, 52,188,117,243, 38,174, 94,189,170,218,187,227, 87,215, 81, 99,198,
-244, 4,202,246,153, 45, 62,172,150,150,150, 6,103,103,231,162,217,106, 74,165, 18,206,206,206, 16, 8, 4,160,105,154, 87,176,
-244, 75,185,106,203,217,217,121,207,210,197, 47,102,199,249,206,172, 21, 36,165,200,121, 85, 34,140, 28, 7, 62, 49, 2,106, 14,
- 6, 35,160, 53,112, 8,172, 73,219,254,174,131,205,131, 23,151,162,157,157,157,247, 84, 38,147,162,162,162,174,185,184,184,140,
-207,203,203, 59, 2,128,186,127,255, 62,251,246,237,219, 73,166, 58,164,151, 6,137, 68, 50,235,200,145, 35,182, 11, 23, 46,204,
-184,122,245,106, 86,251,246,237,173,150, 46, 93,106,251,249,231,159,207, 66, 41,193, 32, 75,105,136,212, 10,133, 98,119, 66, 66,
-194,164,198,141, 27, 35, 61, 61, 29,122,189, 30, 33, 33, 33,240,242,242, 66,112,112, 48,234,212,169,131, 71,143, 30,161,110,221,
-186, 48, 26,141,208,104, 52, 48,154,160, 94,149,177,239,229, 82,109,134,165,242,193,121, 68, 60, 11,193,185, 40,109,222,138, 29,
- 7,207, 53,244, 11, 84, 21,206, 48,172, 12,234, 58,201,234,187, 58,218, 93, 90,186,224, 7,199,119,215, 14,226,216,142,245,236,
-181,115,231, 26, 72, 44, 49,188,197,192,105,159,235, 13,112, 7,129,168,117,139,230,232,105, 27, 97, 20, 84, 67,210,239, 47,202,
-143,100, 94,215, 73, 86, 95,225, 96,119,113,197,146,133, 22,111, 46,236,194,161, 45,171,185, 35,123,246,251,107,128,250,158,158,
-158, 61,105,154,118, 2,160, 54, 26,141,111, 96,226, 18, 52,165,113,254,126,230, 76,128, 6,168,239,230,230,214,147,207,231, 87,
- 3,160, 53, 24, 12,239, 63, 6,103,237,218,181,123, 18, 66, 92, 1,104, 10,124,174, 42,181, 84, 78,199,142, 29, 87,108,223,190,
-125,134, 86,171,181, 45,102,109, 37, 39, 79,158,132, 94,175, 39, 2,129,128,149,201,100,136,137,137,225, 0, 36,112, 28, 55,225,
- 99, 85, 28,125,251,246,197,253,251,247, 23, 0,152, 87,222,121,233,233,233, 60, 91, 91, 91,166, 34,225,101, 42,231,131, 7, 15,
-150,141, 29, 59,246,235, 11, 23, 46,196,205,159, 63,223,111,196,136, 17, 56,113,226, 4,170, 87,175,142, 87,175, 94, 97,198,140,
- 25, 32,132,120,172, 92,185,242,241,129, 3, 7, 92, 18, 19, 19, 87,153,114, 63, 70,163, 17, 12,195, 96,208,160, 65, 48, 24, 12,
- 72, 73, 73, 65, 68, 68, 4,110,221,186,133, 9, 19, 38,136, 1,192, 69,225, 22, 40, 20, 10,241, 36,244, 81,222,247,163,131,126,
- 51, 55, 31,102,152, 97, 70,165, 45, 88,132, 37,124,175,218,181,141,186,188,220,157, 99, 70,142,204,123,241,226, 69, 81, 5,164,
-121,248, 16,170, 11, 23, 96, 52, 26,193,113, 28, 30,220,191,143,169, 83,166,228,106,242,114,183,215,172,233,206, 17,142,147, 21,
-241, 16,210,177, 36,183,174,152, 25, 69,173, 86, 67,173, 86,131,199,227,193,194,194, 2,201,201,201, 16, 10,133,144, 72, 36,104,
-212,168, 17,229,230,230,214,227, 79,105, 43,193, 25, 18, 18, 98, 64,182,182,223,201, 17,211, 18,220,242, 24,110,188,117, 77,212,
- 16, 72,138,102, 33, 58, 91, 18,124,218,136, 15, 39, 65, 42,247,116,215, 32, 37, 97,178,250,133,132,132, 24,202,227, 44, 9,133,
- 66, 81,199,199,199,103, 99,223,190,125, 41, 0,104,213,170, 21, 85,191,126,253, 95, 20, 10, 69,153, 75,218, 84,196, 41, 22,139,
- 69, 0,112,229,202,149,244, 91,183,110,117,185,114,229, 74,122,241,253,166,112, 82, 20,181,117,211,166, 77,144, 74,165, 96, 24,
- 6, 58,157,174,200,255,170,248,167, 94,175,135,189,189, 61,126,255,253,119,176, 44,123,182,162,116,122, 55,240,205,205,226, 89,
- 39,237, 62,125, 21,231,223,233,115, 43, 43,174,138,115,214,118,145,215,117,182,183,187,188,226,167, 69, 14, 25,175, 67, 16, 23,
- 23,199, 93,188,112,246,158,154,227,226,211,178,184, 31,211,115, 56,159, 92, 13, 39, 13,172,137,216,179,191,204,224,190,106, 6,
- 6, 4, 92,121,156,245, 93,228,117, 93, 29,236, 46,174, 90,241,147, 69,230,235, 16, 36, 36, 38,226,220,217,211,143,213, 28, 23,
-207,113,220, 5,142,227, 38, 50, 12,211,132, 97,152, 38, 28,199, 77, 44, 75,180, 84,150, 83,175,215, 7,233,245,250,160,143,201,
-201,178,108, 16,203,178, 38,115,254, 49,131, 16,152, 59,119,238,195,155, 55,111, 14,120,248,240, 97,135,194,237,249,243,231,237,
-163,163,163,219,199,197,197,181,139,158, 37,162,159, 61,123,198,123,244,232, 17,255,209,163, 71,213,131,131,131, 47,152, 90, 62,
-203,121, 23,138,139,252,249, 74,165,146,148,202, 57,254, 37,217,176,242,139,189,135, 15, 31,118,250,104,156, 0,194,195,195, 55,
-108,223,190,189,134,171,171,171,203,231,159,127,142, 93,187,118, 97,251,246,237, 0,242, 35,217, 23,179, 92, 57, 6, 7, 7,215,
- 42, 45,200,104,105,247,110, 48, 24,192, 48, 12,246,239,223, 15,134, 97,224,224,224, 0, 31, 31, 31, 76,154, 52,233,218,152, 49,
- 99, 54, 2, 0, 77,104, 1, 0,104, 53, 90,109,201, 32,163, 85,205, 79, 83,223, 35, 51,167,153,243,223,192,249,239, 16, 88,132,
- 53, 26,141, 44, 28,157, 28, 45, 82,146,147,215, 79,156, 56, 33,109,225,194,133,154, 27, 55,110, 64, 23, 30, 14, 77,104, 40, 46,
- 95,190,140,105,211,166,229,141, 27, 63, 62, 65,147,151,187,214,217,201,209,222,104,100, 65, 8, 91,174,133,132,162,168,168,200,
-200,200,194,222, 54,214,175, 95,207,232,245,122, 88, 88,228, 7,153,222,182,109, 27,203,113, 28, 58,116,232, 32,227,243,249, 38,
- 45, 65, 18, 31, 31,255, 52, 59, 70,217,249,232,192, 9,111, 94, 30, 60,149,225,155,166,199, 16,137, 2, 3, 3, 0, 31,139, 24,
-196, 63,248, 53,227,238,198,222,111,242,210, 99,187,196,199,199, 63,173,108, 38, 57, 57, 57,205,219,183,111,159, 99, 72, 72, 8,
-167,213,106, 17, 31, 31,207,205,154, 53,203,209,201,201,105, 94, 85, 51,158,227, 56,146,153,153, 9, 66, 8, 91, 80, 88,217,194,
-253,166,114,196,197,197, 61, 63,124,248,240,201,107,215,174,193,205,205,173, 72,100,149, 20, 88, 60, 30, 15,132, 16,108,218,180,
- 41,147, 16,242,109, 69,188, 34,145, 8,219,142, 92, 56,255,213,166, 99,135, 14, 93,121,120,172,170,150, 43, 0, 16, 82,212,252,
-101,139,126,112, 76,125,121,159, 60,191,119,149, 61,248, 36, 33,137, 49,114,147, 75, 61, 57, 71,201, 21, 20,202,242,125,123, 40,
-122,254,178,159, 22, 90, 21, 14, 95,238, 11, 81,102, 19, 35, 55,229,175,189, 9,255, 35,156,127, 35,242,103,250, 41,137, 66,161,
-192,209,163, 71, 43,237,131,229, 83,139,252,201,185,189,170,156, 74,165,114,249, 39,159,124,162,156, 63,127,254, 70,141, 70,163,
- 42,232,188,233, 87,173, 90,181,114,242,228,201, 73,241,241,241,171, 76,126, 76, 20,181,167, 83,167, 78,220,205,155, 55,209,187,
-119,111, 24, 12, 6,196,198,198, 98,219,182,109, 96, 24, 38,187, 67,135, 14, 44, 0,168, 53,121,217, 28,203, 65,167,215,106, 97,
-134, 25,102,152, 81, 1, 74, 29, 34,100,105,234,206,230, 45,155,186, 30,220,127,192,153,166, 41,231,232,232,183,143,134,141, 30,
- 29,127,243,230, 77, 91,126,237,218, 77, 40,138, 98,117,179,103,223,203,205,206, 74,223,179,115, 71,141,154, 53,221, 27, 21, 44,
-246,204,177, 52,117,167,188, 11,166,167,167,239,154, 62,125,122,147,221,187,119, 11,150, 47, 95,174,138,143,143,191,116,255,254,
-253,174, 27, 55,110, 20,111,219,182, 45, 47, 39, 39,231,212,185,115,231,122,181,107,215,142,209,233,116,121,166,222, 72, 82, 82,
- 82, 24, 33,196,155, 90,181,125,240,171, 77,251, 62,225,104,210, 2, 90, 1, 8,199,220,161, 24,213,229, 36,165,114, 31,199,113,
- 76, 85, 50, 73, 34,145, 52,146, 72, 36,120,253,250,117, 70,147, 38, 77,116, 66,161, 80,224,238,238,110, 39,145, 72, 26, 85, 53,
-227, 57,142,227, 50, 50, 50,192,113, 28, 15, 0, 97, 89,150, 87,176,191, 82, 49,156, 4, 2,193,231,163, 70,141, 58,185,113,227,
-198, 78, 29, 59,118,132,135,135, 7, 12, 6, 3,234,212,169, 3,157, 78, 7, 47, 47, 47,104,181, 90,172, 93,187, 22,185,185,185,
- 51,226,227,227, 51, 42,226, 20,139,197, 16, 10,133,168,235,221, 32, 79, 44, 22,163,170,226, 10, 0,100,124,202,227,213,153, 29,
- 72, 78, 75,101, 15, 61, 73, 74,202,211, 27, 59, 71, 38,171, 94,148, 60, 47,207, 8, 85,187,145, 83,227, 1, 64,203, 34,183, 92,
- 78, 33, 60, 34,206,110, 67, 82,114, 42, 14,134, 38,100,170,244,108,151, 87,165,112, 86, 42,157,255, 35,156,253,215,135,163,237,
- 23,166,159,123,120,252,199,169, 40,138, 91,149, 76, 69, 88, 52, 71,176,197,155,195,150,245,165,198,184,170, 10,103,177, 78,213,
- 22, 0, 91, 0,192,205,205,237,205,212,169, 83,191,142,143,143, 95, 83, 16,239,170, 82, 29,159,131, 7, 15,174, 29, 53,106,212,
-133,158, 61,123,126,195,178,172,111,177, 30,122,180,163,163, 99, 81, 14,166, 36, 37,206, 30, 63,122,208,236,220,220,140, 69, 48,
-195, 12, 51,204,168,138,192,138,138,138, 13,243,240,168, 54,231,216,209, 35, 45, 56,142,162, 57, 66, 84, 0,117,250,197,139, 23,
-153,197,207,243,180,181,181, 24, 53,118,212, 64,194, 18, 62, 33,172,145,165,169, 59, 81, 81,177, 97, 21, 84,140,207,134, 15, 31,
-190,190, 93,187,118,163,141, 70,227,242,200,200,200, 75,117,235,214,125,220,165, 75,151,175, 24,134, 89,249,230,205,155, 75,245,
-234,213,187,124,240,224,193, 89, 70,163,241,135, 74,138, 22, 6,249,254, 95,187, 63,102, 38, 81, 20,181,144,227, 56, 43,137, 68,
-146, 21, 28, 28,188,191,117,235,214,131, 56,142,179,162, 40, 42,171,170,156, 58,157,110, 74, 78, 78,142,253,231,159,127,110, 32,
-132,212,237,211,167,207,236,200,200, 72,190, 74,165,138,170, 12,207,187,119,239,180,238,238,238,189,190,248,226,139,237, 2,129,
-160, 3,242, 67, 54,112,197,242, 4, 28,199,193,104, 52,158, 82, 42,149,229,230, 11,159,207,207,237,218,181,171,188, 66,171,148,
- 80,152,107,106,250,114,116,198,233,155,174,190, 88,162, 49,112, 28,195,114,227, 95, 37,169, 74,157, 66,246,240, 21, 87,223,100,
- 78, 13, 59,125,221,197,176, 37, 90, 3,203, 50, 44, 55,161, 44,206,202,224,127,133, 19, 0, 38, 82,235,247, 98,203,250, 34,135,
-247,194, 97,195,146,191,255, 83, 40,176, 56,113, 0, 42, 94,236,188,192, 98, 85,209,218,133,149,226, 44,129,130, 89,130, 91,255,
-202, 61,237,216,177, 35, 18, 21, 44,176,125, 96,229,168,227, 0,142,155,155, 13, 51,204, 48,195, 84, 81,242, 31,219, 0,116, 52,
-115,154, 57,205,156,102, 78, 51,167,153,211,204,105,230,252,183,109,148, 89, 98,154, 97,134, 25,102,152, 97,134, 25,102,124, 92,
- 16, 0, 29,203,176,108,153, 28, 43,170, 42,179, 9, 42,226, 55,115,154, 57,205,156,102, 78, 51,167,153,211,204,249,255,143,243,
- 95, 3,243, 16,161,153,211,204,105,230, 52,115,154, 57,205,156,102, 78,243, 16,161,121,136,208, 12, 51,204, 48,195, 12, 51,204,
- 48,227, 31, 13,179,192,170, 2, 8, 33,195, 8, 33, 23, 8, 33,207, 9, 33, 23, 9, 33,195,254, 2,151,132, 16, 50,187, 24,223,
-121, 66,200, 44, 66,136,200,156,211,255,232, 50, 64,155,115,193,140,170,162, 32,120,113, 72,121,193,138,205, 48,195,140,255,109,
-240,202, 58,224,233,233,121,151,162,168, 90,133,139,196, 22, 70, 70, 47,252, 94,242, 55, 0,112, 28, 23, 29, 22, 22,214,188, 44,
-206, 90,181,106, 21,113, 22,110,132, 16, 24, 12, 6, 11,154,166,115, 74,227, 52, 26,141,113,175, 94,189, 10,252, 7, 53,172,123,
-109,109,109,217,205,155, 55,111,240,245,245,173,157,147,147,147, 55,118,236,216,110,132,144,142, 28,199, 13,173, 36, 87, 3, 66,
-200,158,198,141, 27, 31,155, 60,121,242, 97, 31, 31, 31, 75,181, 90, 45,220,191,127,191,243,230,205,155,111, 17, 66, 70,113, 28,
- 23,102, 46,166,255, 28,184,184,184,248, 19, 66,214,123,121,121, 5, 42, 20,138, 71, 0, 38, 41,149,202, 39,230,156,249,175,190,
-131, 99,132, 66, 97, 23, 47, 47,175, 38, 90,173, 54, 35, 58, 58,250,161,209,104,252,129,227,184,196,143,196,111, 5,224, 7,145,
- 72, 20,228,233,233, 89, 45, 50, 50, 50, 86,175,215, 63, 0,176,144,227,184,172,143, 33,174,130,130,130,110,255,244,211, 79,118,
-223,126,251,237,109,133, 66,209, 82,169, 84, 70,152,159,172, 25,127, 7,170, 87,175,110,173, 82,169,182,243,120, 60,127,145, 72,
-228, 44,151,203, 33,151,203, 19, 69, 34,209, 99,169, 84, 58,250,236,217,179,153,230, 92,250,200, 2,139,166,105,183,135, 15, 31,
- 58, 22, 46,190,204,178, 44, 88,150, 5,199,113, 69,159,133, 40,136,179,132,118,237,218,233,203,189, 24,143, 87, 45, 36, 36,196,
- 81, 46,255, 35,212,146, 94,175,135,175,175, 47, 27, 26, 26,234, 88,114, 33, 97,157, 78,135,128,128, 0,238,159,146, 89,132,144,
- 33,118,118,118,170,247,239, 99, 90,107,180,250,160,177, 83,190,157, 51,164,223, 39, 54,119,238,220, 65,207,158, 61,105, 66,200,
- 48,142,227,246,152,200, 37, 33,132,252, 58,103,206,156,101,124,161,212,241,232,217,219,244,218,173,123,223,251,213,169, 73,166,
- 78,157, 36,159, 60,121,242, 35, 31, 31,159, 29,132,144, 86, 28,199,153, 35, 71,255, 51,158, 63,175, 90,181,106, 39,151, 44, 89,
-226,154,152,144,128,213,107,214, 52, 5,176, 17, 64, 83,115,238,252,215,158,193,236, 5, 11, 22, 44, 25, 60,120, 48,140, 70, 35,
-212,106,181,226,245,235,215,245,231,206,157,219,135, 16,210,132,227,184,168,191,200,239,224,229,229, 21, 62,125,250,116,219, 38,
- 77,154,128,162, 40,100,101,101, 41,110,221,186,213,244,215, 95,127, 29, 70, 8,169,199,113, 92,202, 95,185,134,141,141,205,111,
- 43, 87,174,180, 19,137, 68,216,185,115,167,221,128, 1, 3,110, 41, 20,138, 86, 85, 21, 89,132, 16,202,206,206,110, 42,128,246,
- 44,203, 10, 1, 60,200,200,200, 88,204,113,156,222, 92, 98,204, 40, 15,246,246,246, 99,114,114,114, 54, 72,165, 82,129,165,165,
- 37,164, 82, 41,248,124, 62,132, 66, 97,117, 27, 27,155,234,114,185,188,219,160, 65,131, 38,237,223,191,127,187, 57,183, 62,162,
-192,162, 40, 10, 18,137, 4,135, 14, 29, 2, 77,211,224,243,249,224,243,249, 16, 8, 4,165,126,175, 94,189,186, 41, 21, 1, 0,
-224,244,233,211,176,180,180,132,149,149, 21,234,213,171, 7, 66, 8, 68, 34, 17,126,255,253,119,240,249,124,240,120, 60,240,249,
-124, 4, 6, 6,126, 96, 41,251,111,160,127,125,194, 1,165, 7,111,236, 94, 95,142,158, 83,126,234,155,167,209,119, 0,160,202,
-204,200,200,120,116,236,152,210,175, 78, 29,193,161, 67,135, 26,217,218,218, 14, 2, 96,234, 66,210,211,154, 54,109,122,138, 19,
-200,156,134,143, 24, 57,124, 52,143,210, 15, 27,255,213,143,177, 9,169,170,113,227,198, 29, 59,117,234,212,240,117,235,214, 69,
- 78,154, 52,105, 42,128,229,166,166,223,221,221,253, 46, 77,211,133,150, 71,229,235,215,175,253,255, 33, 13,163, 2,192, 10, 0,
- 6, 0,203, 56,142, 11, 47,118,172,142, 64, 32, 88,174,215,235,211, 1,204,227, 56, 46,246,159,248,178,184,186,186,214, 27, 58,
-116,168,125,122,106, 42, 86,175, 89, 83,184, 59,208,148, 69,201, 63, 54, 2, 2, 2,106,137,197,226, 21, 0,252,181, 90,173, 43,
- 0, 72, 36,146,120,142,227,142,171,213,234,239, 66, 66, 66,212, 85,124, 78,213, 0,212, 71,254, 12,227,210,192, 45, 89,178, 36,
-114,246,236,217, 81,255,109, 78, 66,136,187,147,147,211, 79,253,251,247,199,217,179,103,113,238,220, 57,131, 68, 34,225,141, 24,
- 49,130, 76,154, 52,201,102,250,244,233,221, 0,252,252, 23,179,182,219,130, 5, 11,108,189,189,189,113,228,200, 17, 60,125,250,
- 84,237,229,229, 37,105,219,182, 45,120, 60,158,237,156, 57,115,186, 2,216,245, 87, 46,144,145,145,177,120,209,162, 69,187,215,
-175, 95,111, 17, 29, 29,141,133, 11, 23,218, 79,158, 60,249,134, 66,161,104, 99,170,200, 42,112, 33,152, 10,160, 29, 77,211,173,
- 70,140, 24,193, 76,153, 50,133, 79, 81,148, 97,205,154, 53, 14,191,254,250,235, 64,123,123,123,255,212,212,212, 92,152,129,114,
- 12, 9,122,150,101,249, 0,196, 28,199,105, 43,250,253,255,233,222,237,236,236, 38,102,100,100,108, 84, 40, 20,112,112,112, 40,
-106,107, 89,150,133, 74,165,130, 90,173, 70,173, 90,181, 4,222,222,222,219, 38, 79,158,204, 95,191,126,253, 38,115,137,249, 72,
- 2,139, 16, 2,150,101,193,231,243, 63, 16, 88,133,226,167,228,247, 82,107,205, 18, 83, 53, 41,138, 34,185,185,185, 69,226,202,
-210,210,178,200, 18,102, 48, 24,254,196,107, 52, 26, 65, 81, 20, 87, 30,103, 25,105,159, 8,224,119,142,227,222,152,146, 9,197,
- 57, 15, 79,174,135,221,162, 89,131, 10, 67,158,119,251, 42,255,115, 55,128, 43,175,199, 47, 95,222,162, 69,181,169,223,175,155,
-175, 78, 83,166,206, 25,218,211,221,203,217, 78, 34,203, 76,206,178,169, 91,183, 39,128,164, 74,164,179,229,184,113,227,142, 28,
-187,242, 66, 44, 22, 11, 4, 60,154,230,183,108, 88,199,174,154, 21,109,101, 1, 88,197, 70, 69,222, 29, 54,108,216,216, 73,147,
- 38,217, 22, 10, 44, 83,238,157,207,231,187, 61,120,240,192,145,199,227,161, 69,139, 22,198,202,220,251,199, 66, 25,156,115,147,
-146,146, 62,215,104, 52, 8, 12, 12,252,148, 16,210,142,227,184,199,132,144,134,189,122,245,186,117,248,240, 97,139,208,208, 80,
- 52,109,218, 84, 2, 96,192,223,152,206, 63, 65,161, 80, 92, 2,240, 9, 77,211,208,105, 52,186, 21,171, 62, 88,230, 46,184,184,
-184,250,111,164,211,207,207,175,158, 84, 42,189,187,106,213, 42, 75, 31, 31, 31,194,231,243,193, 48, 12, 34, 35, 35,171,237,221,
-187,119,252,163, 71,143,186, 6, 4, 4,248,148, 92,212,220,196,123,175,127,235,214, 45,149,135,135, 71,169,101, 39, 59, 59,155,
- 87,167, 78,157, 54, 0,162,254, 6,206,184,164,164,164,222,159,124,242,201,132,196,196,196,112,134, 97,190, 1,208,192,222,222,
- 62,244,179,207, 62,131, 68, 34,105,103,138,192, 42,239, 25, 57, 58, 58,246,106,222,188, 57,214,175, 95,143,101,203,150,117,228,
- 56,238,119, 66, 72,135,236,236,236, 43,159,126,250, 41,172,173,173,123,151, 38,176, 42, 81,150,234, 52,105,210,100,219,140, 25,
- 51, 44,206,158, 61, 11, 47, 47, 47,100,101,101, 97,228,200,145,142,235,214,173,187,174, 80, 40,218, 22,138,172,178, 56, 9, 33,
- 62, 34,145,104,215,254,253,251,229, 30, 30, 30, 30, 2,129,128,242,240,240, 64,122,122, 58, 52, 26,141,232,199, 31,127,108, 40,
-145, 72,158,252,252,243,207,187, 0,124,246,119,190, 71,132,144, 44, 0,150, 0,172, 43, 51,188, 90,206,189,103, 1, 16, 21,171,
-239, 32, 22,139, 33, 22,139, 33, 18,137, 16, 29, 29,125,148,166,233,145, 5, 29,185, 10, 57,201, 31, 61,248, 70,132,144,135, 52,
- 77,151,251,187,228, 82,102,127, 71,189, 68, 8,113, 35,132,172, 5,208, 14,249,126,212, 55, 28, 29, 29,167, 37, 38, 38,190, 55,
-149, 83,161, 80,216,229,230,230,254,172, 80, 40,224,232,232, 88, 40, 54, 17, 24, 24, 8,141, 70,131, 23, 47, 94,128,101, 89,188,
-121,243, 6,150,150,150,104,216,176,225,207, 11, 22, 44, 56, 50,111,222,188,180,255,228,189,255,107, 4, 86,161,146,229,241,120,
- 31, 8,172,146, 91,161, 24, 34,132, 84,184, 80, 49, 33,132,210,233,116, 69,226,202,202,202,170,232,191, 12,195,148, 42,176,170,
-168,204,125, 89,150,173, 69, 8,217, 98,170,200, 42,137,225,195,135,255,201,159, 99,246,236,217,113,169,169,169,108,223,206,141,
-100,225,231,149, 9,158, 54,114,137,131,133, 69, 77,177,141,173,117,110,110,238, 77, 0,242, 74, 92,194,213,219,219,219,106,195,
-238,243,202,177, 95, 46, 89, 20,232, 97,103,233,235,102,111,227,108, 37, 17,202, 41,162, 18, 51,134, 56,153, 76,230, 3, 32,173,
- 50,233,166, 40, 10,150,150,150, 56,117,234, 20, 10,253,231,254, 33,176, 81,171,213,200,200,200,192,230,205,155, 45, 39, 76,152,
-112,141, 16, 50,173,119,239,222,235, 15, 31, 62, 44,203,204,204,132, 94,175, 7, 0,245, 63,240, 61, 89,100, 99, 99,211,186, 93,
-187,118,194, 3,135, 14, 9, 57,142, 83, 33,127, 57,162, 92,142, 43, 99,225,234,255, 32,196, 98,241, 87,139, 23, 47,182,244,241,
-241, 33,105,105,105, 96, 89, 22, 20, 69,193,222,222, 30, 95,127,253,181,120,238,220,185,174,175, 94,189,154,131, 42, 44, 59, 3,
-128,148, 37,132, 0,192,210,210,146, 65,229, 39,199,148,202,201, 48, 12,105,209,162,197,215,169,169,169, 13,213,106,245,143, 38,
- 52, 60, 12,128, 83, 5, 91, 97,157,242, 36, 60, 60, 92, 61, 96,192, 0, 73,205,154, 53,131,254,106,222,214,169, 83,167, 25,159,
-207,199,131, 7, 15,180, 0,110, 20,236,190,241,244,233, 83,237,103,159,125, 38,170, 86,173, 90, 51, 83,185, 20, 10, 69, 29, 79,
- 79,207,203,246,246,246,146,194,105,219,221,187,119,231,175, 88,177,194, 34, 46, 46, 14,122,189, 30,179,103,207, 70,143, 30, 61,
- 96, 99, 99,131, 81,163, 70, 57,109,221,186,245, 55, 0, 1,229,212,161, 98,161, 80,184,231,245,235,215, 94, 46, 46, 46,146,251,
-247,239,195,215,215, 23,169,169,169, 72, 76, 76, 68,110,110, 46, 18, 19, 19, 49,122,244,104,199,213,171, 87, 43,254, 65,239, 80,
-166, 64, 32,128, 84, 42,181,206,204,204,204,250, 11, 60, 34, 0,194,226,226, 74, 36, 18, 65, 36, 18,161,164,139,201,255, 71, 16,
- 66, 92, 9, 33, 97, 2,129, 64, 36,149, 74, 5, 20, 69, 65, 38,147,117,174, 86,173,218,139, 97,195,134, 53,216,179,103,207, 59,
- 83,120, 52, 26,205, 30,137, 68,194,119,112,112, 0, 0,116,234,212, 9, 35, 70,140, 64, 74, 74, 10,171, 84, 42, 81,175, 94, 61,
-234,250,245,235, 72, 74, 74,194,147, 39, 79,208,164, 73, 19,190,173,173,237, 30, 0, 93,205,178,233, 35, 90,176,120, 60, 94,209,
- 86,154,229,170,112, 43,233,248, 94, 22,167,209,104,132,147,147, 19,164, 82, 41,164, 82,105,113,103,246, 63,241,115, 28, 87,165,
- 33, 66,153, 76,134,193,131, 7,115,155, 54,109,154, 80, 32,178, 94,155,250,223,254,235,195,139,172, 86, 37,225,235,235,123,231,
-187,239,190,235,114,241,226,197,140, 64,143,154, 60,153,242,125,174,216,210,218, 26,110,213,187, 15,235, 63,240, 46,128,253,149,
- 72,166, 82,171,213, 10, 60,221,164, 58,138,210,144,234, 34,158,133,139, 76, 32,114,182,177,113, 21,232,180,201,150, 54, 54,194,
-130, 33, 51,101, 69, 68,133,147, 7, 8, 33,176,182,182,230, 23,124,194,209,209, 81,212,160, 65,131, 36,138,162,192,113,156,242,
-217,179,103, 38, 15, 23,122,120,120, 4, 83, 20,229, 70, 8,249, 96, 66, 66,241,141,101,217,184, 23, 47, 94,152, 58, 1,225,187,
- 70,141, 26,181,217,184,113,163,131,151,151, 23, 54,111,222,108,121,228,200,145, 93,191,253,246, 27, 50, 51, 51,241,238,221, 59,
-140, 30, 61, 58, 27,249,195,136,255, 40,216,218,218,222,238,223,191, 63,182,109,219,198, 21,116, 34,100,132, 16, 95, 43, 43,171,
- 87, 97, 97, 97,255,117, 63, 23,138,162, 58,215,171, 87,143,100,101,101,129,101, 89,208, 52, 93,212, 17,162,105, 26, 95,125,245,
-149,100,244,232,209,115,155, 53,107,246, 53,159,207,207,102, 24,230, 64,110,110,238,143,207,159, 63,255, 71, 57,171,182,106,213,
-234,203,216,216,216, 30, 53,106,212, 56,253, 23,122,251, 92,227,198,141,117, 0, 36, 52, 77,243, 63, 66, 3, 70, 23,212, 71,154,
-194,197,225, 57,142, 99, 2, 2, 2, 52, 5,141, 59, 93,137,114,243,219,222,189,123,221,220,220,220, 96, 48, 24,192, 48, 12,114,
-115,115,113,253,250,117,104,181, 90, 48, 12,131,122,245,234, 97,217,178,101,154, 73,147, 38,137, 15, 30, 60,152,172, 86,171,135,
- 84, 64, 59,237,200,145, 35, 50, 23, 23, 23,137, 90,173, 70, 84, 84, 20, 2, 2, 2,144,147,147, 3,149, 74,133,188,188, 60,232,
-245,122,100,103,103, 91, 27,141, 70,221, 63,166,161,225,241, 32, 18,137, 32, 16, 8, 50,107,212,168, 1, 66,136,248,221,187,119,
- 85, 25,114,179, 4,144,205,231,243,133,197,133,149, 72, 36,194,179,103,207, 14,150,101,189, 42,175,252, 84,230,247, 63, 64, 96,
-173, 21, 8, 4, 34, 91, 91, 91, 65,225, 62,189, 94, 47,176,177,177, 65,205,154, 53,215, 3,232,102, 98, 29,226,103, 99, 99, 3,
- 66, 8, 4, 2, 1,198,142, 29,139,135, 15, 31, 30,143,139,139, 27,150,156,156,140,188,188,188, 61, 86, 86, 86,125,146,147,147,
- 97, 52, 26,241,246,237, 91,248,249,249,249,153, 37,211, 71,182, 96,149, 37,168, 74, 10, 46, 83,172, 37,122,189, 94,222,189,123,
-119,182,120, 35, 93,240, 63, 82,142,192,170, 82, 1,231,243,249, 22, 19, 39, 78,204,217,180,105,211,120, 66,200, 86,142,227, 34,
-171,154, 73,167,143,238,119, 90,246,195,236, 31,108, 21, 53, 61,191,249,230, 27,222,103,159,125,118,117,231,206,157,141,109,189,
-189, 63,185,118,105,175,211,250,111,230,156, 56,121,242,100,158,169, 14,238, 5,184,115,252,248,113,151, 25, 83, 39, 9,126,248,
-106,218, 5, 75, 47,123,161,156,216,202,196, 90, 85,138, 28,156, 90, 84,187, 94,143, 51, 23, 47,198, 2,184,109, 66,229,229,246,
-224,193, 3, 71,107,107,107, 0,249,147, 3,172,173,173,177,105,211, 38,155, 66, 75,161, 41,195,133, 37, 94, 64,183,208,208, 80,
- 71,185, 92, 14,149, 74, 85,212, 32,112, 28, 87, 84, 89,182,110,221,186, 50, 13, 97, 20, 33,164,245, 23, 95,124,113,115,227,198,
-141, 14,158,158,158, 88,180,104, 17,210,210,210, 16, 19, 19,131, 33, 67,134,100, 71, 69, 69,181, 43,238,155,245, 79, 64,195,134,
- 13,185, 59,119,238,224,194,133, 11,248,244,211, 79,201,201,147, 39,245, 70,163, 81, 16, 31, 31,255,236,239, 74, 19,195, 48, 22,
- 2,129,160,104, 88,189, 80, 88, 21,110,110,110,110,184,114,229, 10, 47, 47, 47,143,151,154,154, 42,253,245,215, 95,167, 4, 7,
- 7,187, 0, 24,244,119,230,229,166, 77,155,106,140, 29, 59, 54,134,199,227,113, 93,186,116, 25,250,254,253,251,222, 46, 46, 46,
-191, 95,187,118,109, 21,128, 74,135, 43,104,208,160, 65, 48,143,199,115,227, 56, 78,112,226,196, 9,131,209,104, 20, 52,108,216,
- 48,169, 68, 48, 68, 48, 12, 19, 23, 17, 17, 17,104, 10,159, 88, 44, 22,108,221,186,213,160,209,104, 4,190,190,190, 73,197,120,
- 4, 39, 79,158, 52, 24, 12, 6, 65,221,186,117,131, 77,153,217,156,158,158, 62,100,250,244,233,183, 14, 29, 58,100, 79,211, 52,
-222,191,127,143,180,180, 52, 88, 91, 91, 99,207,158, 61,168, 89,179, 38, 46, 95,190,156,206, 48,204,152,109,219,182,205, 85,171,
-213, 67, 76,240,193,106, 29, 20, 20, 84, 35, 51, 51, 19,214,214,214, 80,169, 84, 8, 14, 14,134,143,143, 15,148, 74, 37, 40,138,
-130,181,181, 53, 54,110,220,152, 71, 8, 73,255, 39,188, 67, 52, 77, 23, 89,153,138,137, 34, 77,179,102,205,112,251,246,237,125,
-149, 17, 69, 28,199,233,248,124,254, 7,194,170,240, 59, 77,211,149, 30,242, 48, 26,141, 2, 66,136, 31, 10,252, 3, 43,250,253,
- 15, 64, 27,169, 84, 42, 40,165,172, 9,234,212,169,211,202, 84, 18,161, 80,104, 39,145, 72,242, 9,219,180, 65,114,114,178,209,
-195,195, 99,224,128, 1, 3, 12, 0, 48,126,252,248,129,201,201,201, 26,134, 97,104,154,166,145,146,146,130,154, 53,107,218,153,
- 37,211,127,192,130, 85,158,229,170,184, 5,171,162, 66, 72, 81, 84,102, 72, 72,136, 76, 38,147, 21,237, 51, 24, 12,240,243,243,
- 99, 89,150, 37, 37,175, 83,152,142,170,130,207,231, 91,124,251,237,183,153, 27, 55,110, 28, 6,224, 59, 83,254,115,120,114, 61,
-236, 46, 33,174, 54, 47, 91,184,254,151,101,139,109,223, 92,216,137,237,235, 86, 26,249, 66,121,176,159,159, 95,235,172,172, 44,
-173,181, 76,139,196, 52, 28,231, 56,238,183, 74,244, 66, 40, 0, 7,239,221,187,247,184, 83,167, 78,247,119, 28, 60,102,171,140,
-138,186, 39,202, 78, 77,176,172,237,197, 19,184,214,232,163,210,233,248,125,250,244,145, 3, 88,103, 2, 31, 98, 98, 98,112,247,
-238, 93, 88, 90, 90,194,210,210, 18,214,214,214, 69,223,171,146,135,133,195,182,103,206,156,129, 76, 38, 67,193,212, 93,200,100,
- 50, 8,133, 66, 20,127,134,149, 16, 89, 17,132,144,105,199,142, 29, 59,176,100,201, 18,164,167,167, 67,165, 82, 97,222,188,121,
-136,138,138,154,206,113,220,227,127,210,203,225,235,235,203,221,187,119, 15,119,238,220,129, 74,165,194, 47,191,252, 2, 23, 23,
-151,246, 0,190,255, 59,211,197,178,172,160,208,162, 88, 92, 88, 21,183, 98,209, 52, 13,177, 88, 12,123,123,123,204,153, 51, 71,
-240,233,167,159,246,248, 59,211,188,124,249,242,218,107,215,174,253,117,247,238,221,231,135, 12, 25,114,232,249,243,231, 35,173,
-172,172,158, 93,189,122,117,177, 72, 36, 98,171,104, 21,113,123,252,248,177, 99,241, 87,158,101, 89, 41,195, 48, 96, 24, 6, 6,
-131, 1,121,121,121,232,216,177,163,201,124, 15, 31, 62,148, 2,192,247,223,127,207, 7, 32,101, 89, 22, 70,163, 17,133,156,121,
-121,121,252, 14, 29, 58,184,153,100,162, 86, 42, 35, 20, 10, 69,171, 1, 3, 6,220, 61,112,224,128, 77,141, 26, 53, 16, 31, 31,
-143,248,248,120,212,174, 93, 27,235,214,173, 83,113, 28,215,162, 64, 84,157, 52,241,182, 21, 54, 54, 54,252,152,152, 24, 48, 12,
- 3, 63, 63, 63,108,220,184, 17, 3, 7, 14, 68,131, 6, 13,144,157,157,141,176,176, 48,236,218,181,203, 70, 32, 16,244,253,187,
-223, 33,138,162,254, 36,174,138,111, 85,236, 96, 88,138,197,226,108,145, 72, 36, 44,244,191,122,248,240, 97,165,173, 87,197,234,
-165,199,149,249,253,119,194,194,194, 2,114,185, 28, 6,195,135,183, 41,147,201, 80,187,118,109,147,121,228,114, 57, 41, 52, 98,
- 24, 12, 6, 36, 36, 36, 24,159, 63,127,110,244,247,207, 31,228,112,113,113, 49, 62,120,240,192,168,209,104,104, 11, 11, 11, 20,
-140,138, 16,152,241,241, 44, 88,133,214,138,242, 44, 87,133,223, 11, 45, 81, 21,189,108, 52, 77,227,194,133, 11, 69, 5,165, 94,
-189,122, 69,215,250,216, 2,203,206,206, 78, 21, 20, 20,100, 25, 27, 27,187,191, 42,255, 47, 20, 87, 75, 22,205,179, 77,127,121,
- 31,113,202, 4,164, 39, 27, 66,110, 63,123,123, 9,192, 37, 0,192, 22,239,235, 24,255,210,100,113,229,237, 32,109,212, 80, 97,
-113,252,147,110, 61,170, 13, 24,247, 37, 53,105,210,164,166, 35, 71,142, 76, 27, 50,100,200, 36,137, 68,226,205, 48, 76,218,153,
-139, 23,223,244,233,211,199,153, 97,152, 17, 28,199,153,226,147, 20, 55,120,240, 96, 1, 33, 4,142,142,142,252,221,187,119,219,
- 88, 90, 90, 98,228,200,145, 25,111,223,190, 53, 20,244,196,146, 42,121,251,113, 45, 90,180,248,211,176, 96, 97,195, 94,104, 25,
-168,164,104,243,235,209,163,199,182, 67,135, 14, 33, 53, 53, 21, 42,149, 10,124, 62, 31, 43, 86,172, 64, 76, 76,204,207,132,144,
-231,255,148,202,172, 81,163, 70,220,131, 7, 15,240,236,217, 51,104,181, 90,140, 25, 51,166,184,143, 97,167,191,123,164, 32, 62,
- 62, 30,123,247,238, 5,203,178, 24, 50,100, 8,106,212,168, 81, 36,172, 18, 19, 19,177, 99,199, 14, 24,141, 70,140, 29, 59, 22,
-213,171, 87,135,193, 96, 16,183,109,219,150,119,253,250,117,230,239, 72,240,140, 25, 51,222, 28, 63,126,252,124,108,108,108,215,
-101,203,150,181, 33,132,176, 95,127,253,245, 82, 75, 75,203,191, 52,251, 50, 35, 43, 7,175, 94,191, 47, 18, 64, 37, 55, 7,123,
-219, 74,243, 69, 70,197, 22,253,223,104, 44,206,103,132,157,173, 77,165,248, 18, 18, 18,242,210,210,210, 84, 99,198,140,177,222,
-182,109, 27,169, 93,187, 54,162,163,163,193,231,243, 97, 97, 97,145, 23, 30, 30, 94,217,208, 12,241,233,233,233, 94, 52, 77, 11,
- 94,191,126, 13,119,119,119, 4, 5, 5,225,199, 31,127, 68,106,106, 42, 24,134,129,163,163, 35,107, 48, 24, 66,117, 58,221,205,
-191,251, 61, 42,110,101, 42,190,221,185,115,103, 31, 77,211, 20,128,211, 0, 42, 37,176, 57,142,211, 85,175, 94,253, 3,238,170,
- 88,175,254,131, 22,187,255,216,204,196, 58,117,234,220,144,201,100, 61, 94,189,122,245,129, 21,107,240,224,193,122, 79, 79,207,
- 91,166,242, 88, 90, 90,102, 8, 4, 2, 59,141, 70,131,123,247,238,193,219,219, 91,144,149,149,181,132, 16, 50,187,160,115,185,
- 36, 41, 41, 73,160, 80,228,187,241,213,173, 91, 23, 57, 57, 57, 25,102,201,244,145, 5, 86,105,150,171,210, 68, 22, 77, 87,236,
-154, 64, 8,129, 90,173,134, 76, 38, 43,218, 10,253,172, 74, 19, 88, 5,190, 63, 85, 26, 34, 44, 16, 87,146, 3, 7, 14,236, 91,
-183,110,221, 29, 83,255, 87,220, 7,107,203,170, 69,203, 10,197,213,211, 59,151,113, 50, 60, 43,117,214,146, 53,107,171,154,217,
- 62, 14, 50, 95,103, 39,251,235, 43,126, 90,104,249,230,194, 46, 28,218,178,154,123,250,240, 97,227, 9, 15, 31,246,157, 48, 97,
-130, 45,128, 4, 0,241, 0,238, 1,248,217, 68,113,133,136,136,136,162,224,174,254,254,254,177, 54, 54, 54, 54, 18,137, 4, 74,
-165, 82,251,248,241,227, 42, 57,186, 70, 70, 70,126,212,224,174,132,144, 58, 61,123,246,188,121,244,232, 81, 89,102,102, 38,222,
-191,127,143,175,191,254, 26, 27, 54,108,128,165,165, 37,206,158, 61,107,209,163, 71,143,235,132,144,230,127,119,112, 85, 63, 63,
- 63,238,209,163, 71,120,247,238, 29, 24,134, 65,175, 94,189, 42,156,192,241, 95,182, 96,113,211,167, 79,199,182,109,219, 64,211,
- 52,134, 13, 27,134,236,236,236,162,227,182,182,182,165, 29,163, 11,222,247,191, 69, 96,241,120, 60,238,198,141, 27,203,218,180,
-105,131,216,216,216,174, 1, 1, 1,191,140, 28, 57, 50,254,175,242,218, 88, 89,160,145,143, 7,180, 90, 45,180, 90, 45, 20, 10,
- 5,114,114,114,240,230,205, 27,104,181, 90, 56, 57, 90, 87,154,207,191, 65,237, 34, 62, 71, 71, 71,168, 84, 42,188,125,251, 22,
- 58,157, 14,246,246, 54,149, 41,243,213, 58,119,238,124,109,223,190,125,118,251,246,237,211,125,246,217,103,194,133, 11, 23, 18,
- 75, 75, 75, 36, 39, 39,163,138,238, 61, 55,110,223,190, 93,163, 99,199,142,117, 95,190,124,137, 27, 55,110, 64,167,211,193,223,
-223, 31,145,145,145,104,214,172, 25,114,115,115, 31, 60,122,244,232,212, 63,161,172, 22, 14,223, 21,110,193,193,193, 7, 5, 2,
- 1, 7,160, 74,214,166, 66,196,196,196,136,124,125,125,181, 98,177, 88, 88, 32,214,254, 18,223, 71,174,235,254,210,204,196,242,
-224,225,225, 49,221,205,205,173,163,191,191, 63, 94,190,124, 41, 16,137, 68, 24, 58,116,168,190, 91,183,110,122, 30,143,103,242,
-132, 27,137, 68,242, 82, 46,151,183,214,106,181,208,233,116,184,124,249, 50,236,236,236,102,245,236,217,115, 90, 66, 66, 2,148,
- 74,165, 80, 40, 20, 22,249,223,182,109,219, 22,105,105,105, 47,205,146,233, 35, 9,172,194, 50, 98,202,240,160,169, 62, 88, 20,
- 69, 65,167,211, 65, 38,147, 65, 42,149, 66, 38,147, 21, 93,135, 16, 82,170,192,170, 10,170, 85,171,134,160,160, 32,201,161, 67,
-135,126, 91,185,114,229,221,170,112, 28,217,183,215,197,138,205,171,166,124,112, 14, 17,207, 66,112, 60, 44, 51,117,214,146, 53,
- 83,123,246, 29,148, 84, 82,144, 29, 30,111, 66,207,195, 81,214,192,213,201,238,250,170,229, 75, 44,211, 95,222, 71, 66, 98, 34,
-206, 61,120, 20,162,205,247, 13,251,241, 35,190,220, 40, 28, 91,255, 39, 65, 36, 18, 77, 63,114,228,136, 44, 51, 51, 19, 81, 81,
- 81, 24, 50,100, 72,230,187,119,239,190,232,221,187,247,134, 75,151, 46,217, 88, 91, 91,227,210,165, 75, 22,213,170, 85, 91, 2,
-160,199,223, 88, 57,114, 70,163, 17,233,233,249,238, 43, 45, 90,180,248, 71,137, 43, 0, 8, 14, 14, 22,244,236,217,243,119, 0,
-237, 95,190,124, 9,150,101,239,134,132,132,180, 40, 60, 94,222, 49, 83,244, 91, 78, 78, 14,223,194,194,162,212,198, 74, 32, 16,
- 8, 42,107,113, 40,206,121,231,206,157,165,171, 86,173, 58, 62,115,230,204,215,127,145,179, 84, 11, 86,143, 30, 61,160,214,234,
- 17,151,148, 5,163,145,129, 90,159,252,151, 44, 88, 61,122,244, 64,158, 70,135,152,132,116, 48,140, 17, 57,106,198,212,114, 36,
-253,228,147, 79, 46, 30, 56,112,192,249,222,189,123,208,106,181,108,112,112,240,219,113,227,198, 89,142, 30, 61,218,174,172,208,
- 54, 38, 96,221,160, 65,131,250,221,185,115, 39,189,110,221,186,182, 15, 30, 60, 64,114,114, 50, 24,134, 65,251,246,237, 33, 20,
- 10, 99,150, 44, 89, 34,128, 9,174, 5,255, 45,129, 37, 18,137, 16, 22, 22, 86, 40,172,134,127, 44, 33, 36, 20, 10,171, 60,204,
-248,191,138,223,126,251, 45,126,231,206,157, 62,174,174,174,107,135, 15, 31,222, 78,161, 80, 80, 34,145,232, 6,143,199,155, 6,
-224,189,169, 60, 2,129, 96,164,181,181,245, 27,138,162,232,248,248,120,188,126,253, 26,209,209,209, 0, 32,204,203,203,131,163,
-163, 99,145,209,100,208,160, 65,168, 86,173,154, 49, 50, 50,114,164, 89, 50,125,100, 11,214,194,133, 11,177,101,203, 22,140, 31,
- 95,190,138, 56,125,250, 52, 80, 98,136,176, 96,249,152, 43,197, 27,127,163,209,136,121,243,230,125,240,191,194,225,167, 47,190,
-248,226, 3,206, 19, 39, 78,252,105,136,176, 36,103,105, 72, 78, 78,126,121,248,240,225, 71,203,151, 47,127, 96, 98,101, 88,196,
- 89,232,131,213,111,240,208,132,245, 75,127,120,190,251,244,213, 6, 9,106, 46, 97,214,146, 53, 51, 75,138, 43, 83, 57,189,157,
-229,222,110,142,118, 55, 86, 46, 95, 98, 85,104, 13, 59, 16,154,152, 5,134, 27, 95,153,135,101,202,189, 51, 12, 19,231,231,231,
- 39, 0, 76, 27, 22, 52,133,179, 10, 34,229, 79,156, 90,173, 22,247,239,223, 7, 0,140, 26, 53, 42,243,221,187,119,173, 57,142,
-123, 65, 8,121,217,185,115,231, 27, 23, 47, 94,180, 97, 89, 22, 40, 35, 44,197,127, 43,157, 5,249, 6, 30,143, 7, 47, 47,175,
- 74,139,171,255, 86, 58, 19, 18, 18,198, 79,152, 48, 97,139, 86,171,229,169, 84,170,241,166, 30,171, 40,157,135, 15, 31,126,237,
-229,229,213, 6,101,135, 98, 96, 11, 44,172, 85,230, 92,187,118, 45, 0,212,253, 43,156,101, 89,176, 14, 30, 60, 8,150,101, 81,
-205,217, 26, 90,173, 22, 82,169,180, 82,156, 37, 45, 88,135, 14, 29, 2,203,178,168,238, 98, 11,157, 78, 87,102,231,165, 36,167,
-157,157,221,234,221,187,119,187,133,135,135, 35, 46, 46, 14,107,214,172,121,159,146,146,210,141,199,227,137,126,249,229,151,235,
-221,187,119,119, 98, 24, 70, 91,217,231,206,113,156,150, 16, 50,178,121,243,230,123, 22, 47, 94, 28, 93,175, 94,189,234, 45, 90,
-180,176, 78, 75, 75, 75,121,252,248,241,219, 45, 91,182,200, 25,134, 25, 89,214,208,211,127,243, 61, 2,128,248,248,248, 83, 0,
-248,149, 21, 86,166,164,243,225,195,135,135, 10,184,207,153,194,253,223,186,247,191, 58, 51,177,162,116,142, 28, 57, 50, 14, 37,
-226,155, 85, 54,157,151, 46, 93,122, 55,120,240,224, 69, 13, 26, 52,152, 47,151,203, 17, 17, 17, 81, 20, 22,169,176,140, 19, 66,
-208,191,127,127,124,241,197, 23,184,120,241,226,162,126,253,250,189,251, 79,231,231,191, 70, 96, 25,141,198,216,119,239,222,185,
-236,222,189,155, 38,132,224,183,223,126, 67,241, 41,251, 52, 77,131,162, 40,240,120,249, 20,247,239,223,103, 42,138, 57,101, 52,
- 26, 99,131,131,131,157,118,237,218,197, 47, 52, 25,199,199,199,131,101, 89, 54, 41, 41,137,218,183,111, 95,145, 53,140,199,227,
-225,254,253,251,140, 94,175,143,169,236, 77, 69, 68, 68,124,148,222,219,205, 23,239,166, 93, 60,119,194,190,105, 80,171, 76, 75,
- 91,219, 82,187,174,133, 17,223,203, 45,220, 60,234,199,101, 63, 45,180, 46, 20, 87, 7, 67, 19, 51, 53, 90, 99,187,151, 41,121,
- 79, 63,246, 3,125,250,244,105,243,127,104, 89,155,215,166, 77, 27, 22,128, 61,128,185,133,179, 58, 11, 68, 86,211,218,181,107,
-207, 4, 32, 1, 48,239,239,180, 94, 21, 15, 13,242, 79,179, 92, 21, 71, 72, 72, 72, 52,128, 14,149, 61, 86, 17,250,245,235, 23,
-133, 82, 2,126,254, 21,252, 39, 56, 11,145,158,153,141,168,119,241,200,119, 70,103, 97,124,159, 84,228, 55,101, 48, 48, 72,207,
-174, 84, 24, 57,100,100,229,224,205,219,248,130,165,193,140, 48, 26,149, 5,124,249,142,238, 92, 70, 94,133, 28,124, 62,191,229,
-218,181,107,187, 81, 20, 69,221,191,127, 95,187,124,249,242,216,148,148,148, 94, 28,199,197, 0,128, 66,161,104,123,226,196,137,
-223, 76, 8,201, 80, 86,199, 55,140, 16,210,236,155,111,190,153, 10,160, 37,128,234, 0, 98,144, 63,227,120,221, 63, 44,226,248,
-240,255, 81,238, 42,227,127,101,102,226,190,125,251, 22,124,241,197, 23,188,160,160,160, 57,141, 27, 55,166,222,190,125,139,228,
-228,100,240,120, 60,212,169, 83, 7,157, 58,117,130,187,187, 59,123,246,236,217,159,250,244,233,179, 0,102,124, 60,129,149,154,
-154,218,121,248,240,225,151, 41,138,170, 89,124, 24,175,180, 79, 0, 96, 89,246, 93, 82, 82, 82,185, 65,200, 82, 83, 83, 59,207,
-155, 55,239, 50,143,199,171, 89, 44,254,149, 54, 45, 45,237,139,254,253,251,111,228,243,249,162,226,214, 46,150,101,223, 39, 36,
- 36,252, 87, 29,138, 75,198,193,234,220,173,119,234, 95,229,148, 11, 40,207,136,179,219,144,148,156,138,131,161,137, 25, 57, 58,
- 99,219,136, 20,213,243,127, 83, 65,227, 56, 46, 25,192, 23,101, 28,123, 13, 96,252, 63, 32,141,164, 64,100,153,103,203,252, 15,
-128, 97,152,184,142,237,219,162,100, 88,134,146,191,141, 70, 99,156,169,124, 29,218,181, 41,147,167,240,123, 69,124, 52, 77,207,
- 12, 10, 10,162,103,206,156,153,116,254,252,249,223, 51, 50, 50,102,112, 28, 87,164,204, 10,102, 13, 6,252,197,178,170, 69,254,
- 10, 15,203,205, 37,225, 31, 89,223,253, 79,204, 76,220,184,113,227,247,179,102,205,218,229,230,230,182,183,101,203,150,117, 61,
- 61, 61, 45, 45, 44, 44,144,157,157,157,147,145,145,241,234,204,153, 51, 67,134, 15, 31, 30,109,126,162, 31, 89, 96,165,164,164,
-168, 0, 52,251,152, 23,171,128,179,198, 63,166,203,165, 93,190, 31, 91,150,127,176, 14, 97,161,248, 42,245,119, 5,210, 32, 75,
-205, 76, 90,119,241,197, 74, 45,195,177,122,134, 29, 21,145,172, 10, 51, 23,189,127,108,197,104, 22, 87,255, 35,120,254,252,121,
-224, 63,145, 79,167,211, 77,107,222,188,249,207, 70,163,113,149,193, 96,184,109,126, 82,102,252,147,177,124,249,242,232,194,118,
-185,127,255,254, 52, 0, 28, 62,124,216,104,206,153,255,160,192,250,183,226,240,139, 63, 26,216,146,194,169,162,223,101,225, 85,
- 98,238,141,191,218, 99, 53,195, 12, 51,254,103, 68,122, 12,128, 94,230,156, 48,227,127,174,253, 51, 11,171,143, 10,202,156, 5,
-102,152, 97,134, 25,102,152, 97,134, 25, 31, 23, 4, 64,199, 50,122, 97, 38,207, 14, 32,132,116,172,236,133, 77, 88, 49,220,204,
-105,230, 52,115,154, 57,205,156,102, 78, 51,231,255, 51,206,127, 13,138, 59,114,126,236, 13, 64, 71, 51,167,153,211,204,105,230,
- 52,115,154, 57,205,156,102,206,127,219,102, 30, 34, 52,195, 12, 51,204, 48,195, 12, 51,204,248,200, 48, 59,185,155, 97,134, 25,
-102, 20,131, 66,161,232, 9, 96, 1,242, 93, 40,150, 40,149,202, 67,230, 92, 49,227,255, 19, 28, 28, 28,100,118,118,118,191, 83,
- 20, 85, 3,248, 48,228, 82, 41,193,189, 97, 52, 26, 19,210,211,211, 59, 37, 38, 38,166,254, 55, 57,255,117, 2,171,125,109,235,
- 86, 30,181,220,247,165, 36,167,134,230,106,178, 71,255,254, 42, 39,189, 42, 23, 38,132,216, 9,133,194,129, 50,153,172, 35,199,
-113, 30, 52, 77,135,103,101,101, 93, 49, 24, 12, 7, 56,142,203, 53,191, 2,102,252,221,240,243,243,107, 40, 20, 10,103, 17, 66,
-154, 50, 12,227,198,231,243,149, 0, 30,104,181,218, 21,161,161,161,161,230, 28,250,255, 1, 66, 8,229,226,226,242,179,181,181,
-117, 80,102,102,230, 16, 0,115, 34, 34, 34,124, 41,138,130,143,143,207, 28,133, 66,241,198,210,210,114,123,118,118,246,221,132,
-132,132,105,149, 89, 59,206,140,127, 46, 60, 61, 61,131, 41,138,114, 43, 92,146,173,164, 32, 40, 77, 32,112, 28, 23, 29, 22, 22,
- 86,102, 48,103, 55, 55, 55, 15, 75, 75,203,141, 0, 26,151, 20, 21, 37, 81, 48,204,246, 40, 59, 59,251,139,184,184,184, 82, 3,
-241,218,218,218, 90, 56, 58, 58, 46, 32,132,244,167, 40,170,194, 5,127, 89,150, 53,114, 28,119, 56, 57, 57,121, 94,122,122,122,
- 78, 89,231,217,217,217, 93,185,121,243,102, 99,123,123,251, 10,195,210, 48, 12,131,248,248,120,135,238,221,187,223, 4, 80,239,
-191,201,249,175, 19, 88,224,168,161, 43,190, 27,235,154, 18,251,198,117,206,218, 99,117, 90,213,179,111,123, 43, 60, 53,177, 50,
- 20, 18,137,100,160,175,175,239,186,159,127,254,217,206,221,221,157, 72,165, 82, 36, 36, 36,212,123,252,248,113,159,249,243,231,
-207,227,243,249, 35, 13, 6,195,229,191, 88,105, 90,219, 74,121,179,210, 84,134,111,205, 85,137, 25,149, 65,255,254,253,233,216,
-216,216,249,246,246,246, 95,205,158, 61, 91, 84,179,102, 77,200,229,114, 36, 39, 39, 87,127,253,250,117,181, 13, 27, 54,244,108,
-222,188,249, 47, 58,157,110,110, 72, 72,136,193,156, 99,255,219,112,113,113,249,249,228,201,147,147,235,214,173,139,214,173, 91,
-223,245,243,243,179,148, 74,165,184,112,225, 2, 60, 61, 61,235, 91, 90, 90, 62,216,188,121, 51,127,193,130, 5,141,142, 29, 59,
- 6, 0, 83,204,185,246,191, 15,138,162,220, 66, 67, 67, 29,165, 82, 41,140, 70, 99, 65,244,126, 22, 28,199, 21,125, 22, 23, 67,
- 70,163, 17,237,218,181,211,151,199, 41, 22,139, 55, 60,123,246,172, 99,225, 58,126,197,132, 84,169, 80, 42,149, 29,219,181,107,
-183, 1, 64,169, 1,181, 29, 29, 29, 23, 12, 24, 48, 96,122,131, 6, 13, 0,160, 40,157,133,159,169,169,169,152, 52,105, 82,209,
- 53, 88,150,197,205,155, 55,167,126,249,229,151, 0,240,101, 57,247, 94,195,222,222,158, 84,180, 4,222,252,249,243, 49,127,254,
-124,172, 91,183,142,240,120, 60,235, 10,242,243,163,115,254,235, 4, 22,161,200,185,245,155,119,141,158, 49,160, 41, 89, 62,174,
-149,215,119,219,175,223,235, 88,203,166,245,149,232,140, 88, 19,197,213,212, 9, 19, 38, 44, 93,184,112,161,248,213,171, 87, 8,
- 11, 11, 3,195, 48,176,176,176,128,175,175, 47,117,238,220, 57,151,105,211,166, 29, 17, 10,133,163,116, 58,221,177,170,222,152,
-179, 37,127,133, 76, 68, 13, 22,242,120, 15,116, 12,115,234,159,152,249,238,238,238,151, 12, 6,195,178,248,248,248,107,255, 43,
- 5, 70,161, 80,180, 16, 10,133,243,222,189,123,215,133,227, 56,230,255,227, 75, 17, 19, 19,179,176,101,203,150, 51,230,207,159,
- 47,122,251,246, 45, 34, 35, 35,161, 84, 42, 81,179,102, 77,184,187,187,147,117,235,214,137,127,249,229,151, 41, 79,158, 60,225,
- 3,152, 81, 25, 75,137,179,179,243,152, 14, 29, 58,244,181,183,183,183,138,143,143,207,186,115,231,206,201,132,132,132,173, 85,
-205, 75, 66, 8,101,111,111, 63,162, 71,143, 30,125,109,109,109,109, 19, 19, 19, 51,174, 92,185,114, 34, 57, 57,121,251, 95,177,
-180, 16, 66, 92, 0,248, 2,176, 43,216,149,224,238,238,254,226,237,219,183,201, 31,145, 83,233,238,238, 30, 86, 21, 78, 7, 7,
- 7, 25,143,199, 59, 68, 8, 81,148, 99, 33, 80, 50, 12, 51,160, 32,192,113,153,176,180,180,108,234,229,229,133,144,144, 16,204,
-157,251,127,236, 93,123, 92, 84, 85, 30,255,158,123,231,197,188, 96, 24, 64, 96, 24, 5,149, 55,152,138, 6,152,226,170,169,105,
-202, 90,138,149,181,165,105,166,100, 46,110, 9,169,176,226, 35,205, 30,102,143, 13,113, 85,220,245, 85,150, 86,102, 25,161,109,
-186,105,226, 11,197,215,240, 88, 69,112, 16, 70, 30, 34,143,153,185, 51,115,239,254, 1, 51,226,198, 99,134,220, 36,155,239,231,
-115, 62,115,239,157,225,203,185,231,156,251, 59,223,251, 59,191,115, 78,170,114,228,200,145, 40, 44, 44, 4, 33, 4,175,188,242,
- 10,137,136,136,224,151,151,151, 99,240,224,193,200,201,201,121, 8, 78, 56, 82,231,187, 0, 40, 0, 76,227, 56,238, 70,171,235,
-158, 0, 62, 7, 80,201,113,220,228,123,149, 63,177, 88,140,157, 59,119,130,207,231,131,207,231,163,166,166, 6,106,181,218,118,
- 46, 16, 8,108,199,189,122,245,234,148,143,101,217,104,154,166, 81, 95, 95, 15,139,197, 98, 75,181,181,181,224, 56, 14, 34,145,
- 8, 22, 75,243,182, 75,214,239, 88,150,141,238,160,252,166,170, 84, 42,236,216,177, 3, 70,163,177,173,182,139,252,252,219,155,
-130,208, 52,141, 1, 3, 6, 80,132,144,169, 29, 9, 44, 66, 8, 7, 0,179,103,207, 6, 77,211,182,173,239,172,199,214,100,177,
- 88,144,158,158,222, 28,176, 77, 81,157,213,245, 93,231,252,205,183,255,142,212,245,200, 64,247,196, 17,113,177,111,185,136,120,
- 98,214,108,130,197,108, 2,107, 54,130, 38, 44,226,194,123, 32,170,151, 11,170,107,110, 33,117,107, 94,157,182, 74, 31,147, 93,
- 80,165,233,164, 2, 2, 98, 98, 98, 78, 29, 60,120, 80,113,224,192, 1,104, 52, 26,188,254,250,235, 0, 0,169, 84,138,253,251,
-247,131,166,105,176, 44,139,113,227,198,233,180, 90,109, 24,199,113,213, 93,120,168,253,135,247, 83,159,220,189,104,184, 50,114,
-238,167, 37,215,111, 26,251,114, 28,215,237, 22, 80, 83,169, 84, 28,159,207,111, 52,155,205,241,191, 5,145,165, 82,169,134,242,
-249,252,253,102,179, 89,194,231,243,197, 87,174, 92, 49,220,111, 15,196,192,129, 3, 31, 80, 42,149, 63,237,217,179,199, 37, 55,
- 55, 23, 53, 53, 53,168,172,172,196,252,249,243,145,145,145,129,200,200, 72, 72,165, 82, 8,133, 66,188,244,210, 75, 77,183,110,
-221, 26,113,226,196,137,227,118,180, 73,122,248,240,225, 59,182,109,219, 22, 96, 54,155, 41, 0, 48, 26,141, 40, 45, 45,181, 44,
- 89,178,228,234,137, 19, 39,166, 57, 42,178, 8, 33,212, 67, 15, 61,180,117,219,182,109,129, 66,161,144, 98, 89, 22, 38,147, 9,
-133,133,133,150, 37, 75,150, 92, 57,121,242,228,211, 93,105,247,132,144,129, 18,137, 36, 34, 49, 49, 81, 55,105,210, 36, 6, 0,
-142, 31, 63, 78,157, 57,115,198,181, 79,159, 62, 37,105,105,105,167,186,192, 57, 72, 46,151,135,190,248,226,139, 55, 38, 78,156,
-104, 18, 8, 4,236,143, 63,254,200,211,104, 52,174, 1, 1, 1,197,139, 23, 47, 62,227, 96, 91,220,183,103,207,158, 17, 42,149,
-202, 2,128,179, 26,120,138,162,184,150, 79, 20, 23, 23,243, 18, 18, 18,254,165,213,106,255,216,225,203,152,143, 79,184,175,175,
-239,161,180,180, 52,165,181,147,106,157,172,117,149,158,158,206,148,151,151,199,106,181,218,211,112,194,222,122, 63, 6, 32, 26,
-192, 57, 0,163, 56,142,187,209, 34,174,190, 7, 16, 1,224, 71,142,227,134,221,139,188,133,134,134, 86,228,231,231,247,248,226,
-139, 47,192,231,243,241,221,119,223, 33, 35, 35, 3, 59,119,238,108, 83,100,249,250,250, 34, 46, 46,174,236,244,233,211, 61,219,
-227, 12, 12, 12,188, 89, 84, 84,228,122,243,230, 77, 88, 44, 22, 28, 59,118, 12, 27, 55,110, 68,143, 30, 61,224,233,233, 9, 47,
- 47, 47, 68, 71, 71, 67, 42,149,218, 68,214,212,169, 83,235,138,138,138,220,218,226, 11, 15, 15,215, 62,243,204, 51,190, 39, 79,
-158,132,201,100,106, 83, 96, 37, 37, 37,181,246, 34, 65, 42,149, 98,210,164, 73,229, 23, 46, 92,104,247,229, 35, 50, 50,178,252,
-220,185,115, 62,103,206,156,185,163,173,183, 37,136,104,154,134, 92, 46,199,144, 33, 67, 42, 78,159, 62,237,243,107,114,222,215,
- 30,172, 96,127,159, 37,139,230, 60, 38,134,133, 1,103,106, 2,152, 70,128,169, 7,107,108, 4, 17,136, 1, 83, 19,148,194,106,
-188,255, 92, 31,215,213, 95, 92,185, 48,170,175,215,132,131,197,186,253,237,241, 41, 20,138,244,245,235,215, 43,242,243,243,161,
-209,104,176,118,237, 90,172, 88,177, 2, 2,129, 0,213,213,213,136,143,143,199,145, 35, 71,192, 48, 12, 82, 83, 83,149, 41, 41,
- 41,243,208, 28,108,234,160,247,138,151,241,201,230,247,149, 74,186, 10,207,143, 58,225,241,183,236,203,137, 0, 62,232,142, 21,
-240,214, 91,111, 73,146,147,147,247,250,249,249,117,107,145,165, 82,169,134,138,197,226,253, 73, 73, 73,210, 55,222,120,227,174,
-136, 85,181, 90, 29,201,227,241, 62, 54, 26,141,175,148,151,151,127,219, 5,227,221, 59, 38, 38,230,141,243,231,207,127, 86, 95,
- 95,191,171,173,223,200,100,178,169,161,161,161,143,157, 56,113, 98, 9,199,113,151, 59,227, 20,137, 68,243, 23, 46, 92,232,114,
-237,218, 53,212,214,214, 66, 40, 20,218,118,153, 39,132, 64, 36, 18,129,162, 40, 8,133, 66, 60,251,236,179, 46,155, 54,109, 90,
- 0,224,169, 78,219,164,143,207,204,173, 91,183, 6, 48, 12, 67, 53, 52, 52, 64, 32, 16, 64, 32, 16,224,129, 7, 30,160, 23, 46,
- 92,216,115,254,252,249,115, 0,124,232,200,253,187,187,187, 63,183,117,235,214, 64,161, 80, 72,149,151,151, 99,232,208,161, 56,
-118,236, 24, 98, 98, 98,232,228,228,228, 94,243,230,205,155, 13, 32,195, 81, 47,147, 68, 34,233,247,253,247,223,151,246,236,217,
-211,246,246,213,187,119,111,203,132, 9, 19,170, 47, 94,188, 24,122,244,232,209,170, 33, 67,134, 92,117,128,211, 79, 34,145,132,
-125,253,245,215,229,203,151, 47,127, 56, 51, 51,115, 18, 0, 68, 71, 71,127,185, 98,197,138,131,213,213,213,145,135, 15, 31,174,
-142,139,139, 43,115, 32,171, 30,222,222,222,230,196,196, 68,121,123, 63,216,178,101, 75, 21,128, 30,157,180,235,120,138,162,150,
- 69, 70, 70,186,142, 28, 57, 18,135, 14, 29,194,203, 47,191,108, 48,153, 76, 5, 0, 48,122,244,232,144,244,244,116,225,201,147,
- 39,161, 80, 40,248,229,229,229,155, 85, 42,149, 51,240,221,126, 76, 2,240, 47, 0,145, 0, 14, 18, 66,158, 0,240, 41,128,112,
- 0, 26, 0, 9,247, 50,115, 22,139, 5, 60, 30, 15,101,101,101,216,180,105, 19, 86,173, 90,133,224,224, 96,152, 76, 38,155,192,
-226,241,120,224,243,249, 32,132,216,189,149,150,217,108,198,241,227,199,177,245,159,255, 68,234,146, 37,144,203,155,155, 41,195,
- 48,168,174,169,129,139,139,139,205,131,213, 17, 56,142,219, 85, 88, 88,152,164, 86,171,239, 24, 26,180,126,182,216, 56,176, 44,
- 11,179,217, 12,131,193,128,191,255,253,239,102,142,227,118,117,242, 76,218, 60, 94, 73, 73, 73, 48, 24,110,191, 43,247,239,223,
- 31, 0, 16, 16, 16,128, 1, 3, 6,216,206,173, 30, 42,123, 56,255,254, 80, 63, 52,181,250,117,104,250,219, 86,155,143,208,208,
- 80,248,250,250,218,197,121, 95, 11,172,130,171,149,107,146,151,189,247,182, 84, 72,243,103,140, 15,135,202,149, 15,136,149, 16,
- 12, 79, 1, 81,248, 55, 55,128,234,255, 0,217, 41, 72, 29, 91, 69,189,214,196,124, 62, 62, 80,233,245, 77, 81,187,193,117,209,
- 61,123,246,196,225,195,135,209,167, 79, 31,164,165,165, 33, 44, 44, 12, 82,169, 20, 21, 21, 21,104,104,104,128, 84, 42, 69, 93,
- 93, 29,162,162,162,104,185, 92, 62,210, 81,129, 69, 8,137,154, 21, 31, 19,205,243, 14,199,208,135, 99,145,189,116,132,116,203,
- 15,215, 22, 17, 66, 54,183,222,112,181,187, 32, 33, 33, 1,215,175, 95,151,172, 91,183,174,203, 34, 43, 32, 32, 32,155, 97,152,
- 49,118,184,195,191, 47, 42, 42, 26,213, 85,113,181,119,239, 94,169, 92, 46,199, 27,111,188,113,183,196,213,191, 31,121,228, 17,
-215,111,191,253,118,143,175,175,239,227,142,136, 44, 66, 72,239,169, 83,167,126,181,113,227,198,144, 81,163, 70, 89, 0,180,105,
- 80, 34, 34, 34,166,100,103,103, 79,158, 53,107, 86, 63, 66,200,196,206, 68, 22, 33,228,161,222,189,123,163,180,180, 20, 21, 21,
- 21,208,235,245,168,168,168, 0, 0,148,149,149, 65,173, 86, 67,161, 80, 64,173, 86, 35, 36, 36,132, 80, 20, 21, 99, 79,126, 71,
-142, 28, 57, 9, 0, 85, 92, 92, 12,157, 78, 7, 55, 55, 55, 72,165, 82,168,213,106,140, 24, 49,130, 23, 24, 24,248,168,163, 2,
-107,252,248,241, 83, 36, 18, 9, 85, 90, 90,138,203,151, 47,195, 96, 48,160,160,160, 0,110,110,110,120,248,225,135,249,129,129,
-129, 19, 29, 21, 88, 0,250,205,158, 61,187,162,181,184,178, 66, 42,149,146,144,144,144,106, 15, 15,143, 65, 0,174, 58,194, 57,
-111,222,188,202,213,171, 87, 15,207,201,201, 73,177, 94,204,201,201, 73, 6,128,247,222,123,239,176,151,151,215, 32, 0,142, 8,
- 44,112, 28,199,206,154, 53,171, 80, 32, 16, 64, 40, 20,218,146, 72, 36, 2,159,207, 7, 77,211,110,118,208, 44,214,104, 52,253,
-101, 50, 25, 52, 26, 13,104,154, 6, 33,164, 80,171,213,246, 7,128,148,148,148,162,166,166,166,190,122,189, 30, 9, 9, 9, 36,
- 62, 62,254,129,181,107,215, 46, 1,208, 45, 4, 22, 33,228, 65, 0,107, 1, 24, 1, 44,225, 56,238, 88,119,178,111, 28,199, 85,
- 16, 66, 70,180, 18, 89,167, 1,136, 90,196,213, 8,142,227, 42,238, 97,217,129,101, 89,240,249,124,188,253,246,219, 96, 24, 6,
-219,182,109,195,167,159,126, 10,138,162,108,129,238,174,174,174,120,255,253,247,127, 22,248,222,153,112,219,178,101, 11, 82,146,
-147,109,226, 10, 0, 4, 2, 1,124,188,189,225,225,233,137,226,226,226, 78, 5, 86,101,101,229,210,220,220, 92,116, 20,228, 62,
-121,242,237, 17,214,214, 65,238,246,228,147,166,105, 24, 12, 6,140, 25,115,187,251,152, 55,111,158,237,184,186,186,218,250, 76,
-128,216,121,243, 52, 77,163,137, 3, 30,115,185,125,237,209, 87, 94,177, 29,223,184,113,195, 97,206,251, 82, 96, 13, 47,170,254,
-240, 8,193,128,228,231, 31,158,174,242,116, 5, 87, 95, 1,193,168,165, 56, 91, 45,193,186,245,205,125, 97, 82, 66, 20,250,141,
- 94, 9, 99,214, 88,204, 28,104, 17, 46, 40,199, 66, 0,105,109,241,121,122,122,122,152,205,102, 16, 66, 32,149, 74, 17, 30, 30,
- 14, 23, 23, 23,232,116, 58,188,252,242,203,216,191,127, 63, 24,134,129, 64, 32, 64,159, 62,125,192, 48, 76,223, 46,120,175, 54,
-190,251,214, 42, 69,213,169, 29, 56,249,159, 90, 72, 60,122, 98,201,180,104,247,244,109,185, 75, 1, 36,119,199, 74, 24, 48, 96,
- 0,150, 47, 95, 46, 89,186,116,105,151, 68, 22,195, 48, 43,248,124,254,208, 85,171, 86,137,167, 77,155,246,179,239,243,242,242,
-144,144,144,208,164,215,235, 95,239,170,184,250,242,203, 47,165, 74,165, 18,165,165,165,248,165,207,132, 85, 92,109,223,190,221,
-213,223,223, 31,145,145,145, 46,239,188,243,142,221, 34,139, 16,210,127,242,228,201,187, 55,110,220,232, 63, 99,198,140,146, 19,
- 39, 78, 84, 16, 66,218, 19,226,218,231,159,127,190, 36, 43, 43, 43,132, 16,242, 85,103, 34,203,108, 54,247,146, 72, 36,208,233,
-116,248,243,159,255,124, 71,128,170,117, 56, 27, 0, 52, 26, 13,212,106, 53,244,122,189,159, 61,247,172, 84, 42,221, 1,224,133,
- 23, 94, 64,105,233,237,112, 69, 63, 63, 63,148,150,150,194,108, 54, 43, 29, 45, 71,165, 82,169, 52,153, 76,136,139,139,131, 94,
-175, 7, 0, 60,241,196, 19,224,243,249,168,172,172, 4,195, 48, 30, 93,168, 30,207, 9, 19, 38,104,219,251,210,213,213,149,113,
-119,119, 15,119,144,211, 35, 62, 62,254,218,134, 13, 27,126, 54, 84,151,155,155,251, 71,165, 82,153,163, 84, 42, 67,186,144, 87,
-182,181,160,178, 30, 11,133, 66,171,199,193,174,183, 99,150,101,177,111,223, 62,208, 52, 13, 30,239,182, 73, 76, 75, 75,123, 81,
-161, 80,120, 31, 58,116, 8,215,175, 95, 71, 67, 67, 3,234,235,235, 17, 20, 20,212,103,244,232,209,121,215,175, 95,191,114,254,
-252,249,199,239,181, 19, 28,128, 53, 46, 44, 3,192,128,238,102,223, 90, 68,214, 84, 0, 39, 90,196,149, 17,192,148,123, 41,174,
- 90,215, 61,143,199,179, 61,231, 46, 46, 46,136,138,138,178,137, 41, 66, 8, 26, 27, 27,193,227,241,172,241, 66,118, 25,191,218,
-218, 90,248,250,248, 64, 46,151, 35, 40, 56, 24,133, 5, 5, 0, 96, 59, 22,137, 68, 32,132,192,108,238, 56, 42,160,101, 38,224,
- 2,116, 16, 79,213, 69,113,201, 89,197, 80, 39,246, 31, 44,203, 90,109, 62,119, 55, 56, 61, 61, 61, 81, 95, 95,111, 23,231,125,
- 43,176,150, 17, 66, 29, 9, 82,110, 74,158, 62, 98,122, 92,136, 59,244,186,203, 16,201, 61, 65, 20, 1, 88,183,254, 91, 92,184,
-210, 28, 26,181,238,211, 83,216,178,232, 17, 64,172, 68, 95,153, 6,158, 82,201,227,237, 9,172,234,234,234, 6,147,201,164, 20,
-139,197,224,241,120, 16, 10,133,168,170,170, 66, 90, 90, 26, 62,249,228, 19, 4, 4, 4,192, 98,177, 64, 36, 18,161,178,178, 18,
- 2,129,192,161,217,137, 60, 30,153,144,254,194,248,222, 82,159, 96, 84,125,183,162,249,162,247, 64,204,142,167,132,239,236, 62,
-251, 28, 33,228, 29,142,227, 42,187, 91, 37,200,100, 50, 68, 71, 71, 99,238,220,185,146,245,235,215,255, 3,128,218,145,191,215,
-106,181, 63,170, 84,170,177, 75,150, 44,201,190,118,237,154, 56, 54, 54, 22, 50,153, 12, 50,153, 12, 23, 47, 94, 68, 82, 82,146,
-222,104, 52, 78,236,138,119,140,207,231,103,141, 31, 63, 94, 42, 18,137, 80, 84, 84, 4,165, 82,249,139,238,213, 42,174,118,238,
-220,233, 26, 18, 18,130, 75,151, 46, 97,200,144, 33,240,245,245,117,121,245,213, 87, 59, 21, 89, 45,111, 60,239,125,252,241,199,
- 1, 60, 30,143,124,246,217,103,189, 1, 36,217,243,191,183,111,223, 30,186,107,215,174,181,132,144,199,184,118,130, 15, 5, 2,
- 65,153, 78,167, 11,236,217,179, 39, 54,109,218, 4,138,162, 80, 94, 94,142,197,139, 23, 99,245,234,213,136,137,137,129, 92, 46,
- 71,207,158, 61, 81, 84, 84, 4, 23, 23,151,114,123,254,247,181,107,215,170, 89,150,237,177,127,255,126,232,116, 58,219,117,127,
-127,127,212,212,212,192, 96, 48, 84, 57, 90,150,101,101,101, 85, 0,188,243,242,242,112,229,202, 21,140, 27, 55, 14,159,127,254,
- 57, 6, 15, 30,140,150,120,172,170, 46, 84,145,133,166,105,174,147,242,119,191,155,156, 45,157,150,163,156,224, 56,142,107, 45,
-168,172,199,214,196,227,241,236, 9,242, 95, 21, 22, 22,182,172, 79,159, 62,225,169,169,169,124,154,166, 49,108,216,176,144,133,
- 11, 23,150,184,184,184,120,188,246,218,107,146,182,156,193, 0,250,135,135,135, 75,187,129,249,104,237,165,235,150,147, 78, 8,
- 33, 61, 90, 60,126, 66, 0, 76,203,231, 78, 66,200,168,214,129,239,247,210,131,181,108,217, 50,204,153, 51, 7,222,222,222, 72,
- 73, 73, 1,143,199,179, 37, 66,136,205,163,229, 8,122,120,123,119,248,189, 53, 6,171,147,151,168,255,203, 50, 13,246,138,161,
-230,126,149,103,151,247,238,255,193,121, 95, 10, 44,171,184, 74,121, 46,110,250,176, 16, 87,228, 28, 58,129,145,125, 41,192, 40,
-236,192,132,154, 64, 4, 82,120,203, 41,117, 7,174,195,188,146,146,146, 94, 10,133, 2, 12,195, 64, 40, 20, 34, 50, 50, 18, 71,
-143, 30,133,209,104,132,193, 96,176, 25,199,243,231,207,131, 97,152, 67, 14, 60, 44,180,183,156,255,126,114,234, 10, 57,242, 55,
- 67, 33, 21, 98,228,160, 64,192, 35, 12,116,181, 6,107, 23,196, 43, 95, 92,179,103, 29,236,136,151,185, 23, 2,171,176,176, 16,
-153,153,153,141, 6,131,225,185,174,112, 88, 69, 86, 70, 70, 70,182, 66,161, 16,255,225, 15,127, 64,126,126, 62, 94,125,245, 85,
-189,209,104,156,208,213,248, 46,147,201, 52,227,171,175,190,218, 31, 24, 24, 40,141,139,139,187,195,221,221, 21,113, 69,211,244,
-191,103,206,156, 41, 15, 8, 8, 64,113,113, 49,220,220,220, 32,147,201,208,187,119,111,236,216,177,195,229,233,167,159,238, 80,
-100,113, 28,199, 17, 66, 18,159,124,242,201,189, 89, 89, 89,254, 51,102,204, 40,217,189,123,247, 94, 0,237, 25, 19,249,228,201,
-147,227,179,178,178,252,103,205,154,165, 1,240, 23,174,131,153, 29, 44,203, 30, 41, 42, 42,234, 27, 22, 22, 70, 66, 66, 66, 32,
- 20, 10,225,231,215,236,164,234,223,191, 63,194,195,195,193,231,243, 1, 0,133,133,133, 0,144,107,207,189, 31, 62,124,248,203,
-130,130,130,153,131, 7, 15,166,125,124,124,108,193,179, 2,129, 0, 43, 87,174,100, 74, 74, 74,246, 57, 90,158, 7, 15, 30,252,
- 60, 63, 63,255,133, 97,195,134,241,220,221,221, 33, 18,137,208,175, 95, 63,168, 84, 42,172, 92,185,146,185,124,249,242,190, 46,
- 84,211,213,252,252,124,151,224,224,224, 54, 45,191, 88, 44,118, 5,224,168,231,161,244,248,241,227,194,216,216,216, 47,191,249,
-230,155,200,214, 95, 68, 71, 71,127, 41,147,201,220, 0,148,119, 33,175,108,107, 65,101, 77,214, 33, 67,123, 4,150, 86,171,221,
-235,227,227,243, 31,111,111,239, 31, 35, 34, 34,220,242,243,243,145,154,154, 42, 48, 24, 12,189,114,114,114,108, 29,113, 27,237,
- 16, 13, 13, 13,226,110, 96, 62,146, 0,188, 11, 64, 2, 32,165, 27,138, 43,111, 52, 7,180,135,162,121, 88,240,137, 22,177,101,
-141,201,186,167, 34,139,227, 56,240,249,124,132,134,134, 98,193,130, 5, 88,179,102, 13, 18, 19, 19, 17, 28, 28,108,171,123,107,
-144,187, 35, 30, 44,129, 64, 0,111,111,239,230, 73, 39, 45,222, 43, 0, 40, 44, 40, 0,143,199, 3,203,178, 48, 26,141,157,122,
-176,122,244,232,177,236,205, 55,223,156, 63,126,252,120,234,127,103,220, 89,151,149,104,157, 76, 38, 19,246,238,221, 59,127,245,
-234,213,176,199,235, 69,211, 52,250,247,239,127,199,176,224,135, 31,222,142, 84,136,138,138,194,152, 49, 99,236, 18, 77,173, 57,
- 67,211,223,190, 99, 88,240,107,175,219,197,214,243,217,217, 8, 94,245,129, 67,156,191, 85,180, 57, 71,242, 72,144, 98,101,202,
- 51, 67,167, 15, 11,146,227,187, 67,167,177,238,235,203,151, 74,202,171,192, 86,228,131,213, 93, 68, 82, 66, 20,194, 3,148, 8,
- 15, 80, 34, 41, 33, 10,108,229, 57,112, 53,197,224, 68, 10,148,214, 66,219,129,219,116,205,138, 21, 43,106,149, 74, 37,196, 98,
- 49,132, 66, 33,202,202,202, 16, 17, 17, 1,145, 72,100,123, 3,165, 40, 10,169,169,169, 58,157, 78,183,222,222, 27,145, 10,169,
-217,107, 94,121,194, 91,224, 34, 3, 74, 15,193, 85, 46,195,166,191,189, 13,212,107, 1, 90,128,248, 63, 12,160,125, 61, 21,163,
- 8, 33, 33,221,173, 18,138,139,139, 49,127,254,252, 70,189, 94,255,139, 2,221,181, 90,237,143, 12,195,140, 93,189,122,117,211,
-246,237,219,127,177,184,178,114, 26,141,198,113,239,190,251,110, 67, 81, 81,209, 47, 18, 88, 60, 30,239, 53,147,201,228,154,153,
-153,201, 14, 26, 52,200,242,216, 99,143, 89,198,142, 29,107, 25, 50,100,136, 37, 34, 34,194, 50,101,202, 20,139, 94,175, 23, 73,
- 36,146, 55, 59, 49,138, 23,118,239,222, 61,122,214,172, 89,154,172,172, 44,255,152,152, 24, 21,199,113, 75,219, 74,131, 7, 15,
-246,182,138,171, 93,187,118,117, 26,131,101, 48, 24, 62,204,200,200,208, 91,103,185, 8,133, 66,120,121,121,217,132,176, 64, 32,
-128, 72, 36, 2,195, 48,248,232,163,143,154,154,154,154,214,217,115,239, 85, 85, 85,155,147,147,147,175,102,103,103,155,234,234,
-234, 64, 8,193,181,107,215,176,114,229, 74,102,195,134, 13,215,106,107,107, 55, 56, 90,158,117,117,117, 89,201,201,201, 87,246,
-237,219,103,162, 40, 10, 53, 53, 53,112,117,117,181,113,222,186,117,203, 97,206, 33, 67,134, 20,149,148,148,184, 54, 54, 54,182,
-229,205, 36, 82,169,244, 65, 0, 7, 29,225,140,138,138, 42,190,122,245,170,124,229,202,149, 63,140, 30, 61,122,141, 92, 46, 47,
-144,203,229, 5,163, 71,143,126,243,131, 15, 62,248,151,139,139, 75, 52, 0,135, 55,135,165, 40,138,109,109, 55, 90,199, 96,137,
- 68, 34, 8, 4, 2,187,150,169,112,115,115,219,146,145,145,225, 86, 94, 94, 14,131,193,128,188,188, 60,228,229,229,161,172,172,
-204,214, 9,183,177, 15, 27, 26, 27, 27, 93,238,181,237,224, 56,238, 95, 28,199,245,231, 56, 46,144,227,184,238, 56, 73,230,211,
- 86,226,106, 4,199,113,249, 0, 70,180,156, 71, 2,248,226, 94,122,176,172, 2,139,199,227, 97,218,180,105, 56,112,224, 0,130,
-130,130,108,129,237,173,131,220, 29, 17, 4,102,179, 25,253,250,245,131,193,104,188, 67,160,243,120, 60,120,245,232,129,162,162,
- 34,187, 60, 88,132,144,169,227,199,143,167,206,159, 63,143,176,176, 48,156, 58,117,202,150,242,242,242,112,246,236, 89,156, 59,
-119, 14, 23, 46, 92,192,160, 65,131, 80, 82, 82,130, 71, 30,121,196,186, 76, 67,135, 77,199, 94,111,147,117, 38,160, 29,222,166,
-255, 7,231,253,231,193, 82,123, 73,102, 12,237, 77,240,221,225,211,120, 63, 91,187,133,227,184,221,251,243,235,190,154, 51,200,
- 12,102,215,211,232,151,240,207,230, 97, 65, 0,108,229, 57, 48,187,254, 4, 34,241, 68,110,133, 16,117,122, 83,187,111,205, 12,
-195, 28,115,119,119,223,185,121,243,230,153,207, 63,255,188, 16, 0, 36, 18, 9,254,242,151,191,128,227, 56, 8,133, 66,208, 52,
-141,185,115,231,214, 87, 86, 86,190,203,113, 92,145,157, 15,138,216,207, 93,152,250,204, 75,105, 46,200,219, 0, 80, 2,220,144,
- 69,161,255, 35, 51, 81,169, 57, 10, 84, 93, 4,104, 1,214,167,191,224,249,199,121,111,111, 0, 16,215, 93, 42,224,220,185,115,
-152, 55,111,222, 47, 22, 87,255,235,201,218,177, 99,199, 63,140, 70,227, 11,119,145,115, 92, 74, 74,202,126,111,111,239, 46, 15,
-139,148,148,148, 60,235,239,239, 63,179,179, 7,175,184,184,184,211,161, 14,142,227, 46, 19, 66, 38, 94,185,114,229,245, 75,151,
- 46,125,222,222,239, 46, 93,186,244,249,152, 49, 99,232, 99,199,142,189,102,207, 44,194, 83,167, 78,157,138,141,141,205, 88,183,
-110,221,220,164,164, 36,177, 72, 36,130,171,171, 43, 52, 26,141,109, 29, 28,163,209,136, 69,139, 22, 53,153, 76,166, 45,199,143,
- 31, 63,106,103, 71,104, 38,132, 60, 53,103,206,156, 89, 33, 33, 33,127,100, 89,214,195,104, 52, 86,149,148,148,236,187,117,235,
- 86,151,214,193,226, 56,142, 37,132, 60, 61,119,238,220,233,193,193,193, 83, 24,134,241,176, 88, 44, 85, 87,175, 94,253,178,174,
-174,110, 83, 87, 56,143, 28, 57,162,251,232,163,143,254,163,211,233,194,212,106,245, 77,153, 76,102, 52, 26,141,180, 88, 44,118,
-149, 74,165, 81, 0,142, 2,184,224, 8,231,201,147, 39,175,175, 95,191,254,138,193, 96, 8, 93,191,126,253, 97, 87, 87,215, 3,
-132, 16, 34, 16, 8,220,197, 98,241, 72, 0, 63, 0, 40,116, 52,175, 52, 77,119,232,193,130,157,241, 29,183,110,221, 58,150,158,
-158, 62,104,224,192,129,200,200,200,168,150,201,100,242, 41, 83,166,240,106,107,107, 73, 71, 30,172,238, 32,176,126, 3,168,106,
-241,242, 78,178,198, 92,181, 10,124,255, 20, 64,237, 61, 22,168,119, 8,169, 94,189,122,217,206, 91,167, 86, 49, 88,118,193, 98,
-177, 64, 32, 16,128,199,227,193, 87,165,178,137, 57,142,227, 80, 84, 84,132,234,234,106,187, 4, 22, 69, 81, 52, 33, 4, 79, 62,
-249,164, 93,255,247,169,167,158,194, 15, 63,252,128,206,134, 19, 91,207,248, 11, 8, 8,232, 84, 12,181,228,197,238, 89,132,106,
-181,250,174,112,222,151, 2,235,170, 78,191,114,193,134,227,139,138, 43, 13,187, 31, 42,172, 89,144, 14,112,128,123,118,152,146,
-140,141,163,202, 96,216, 48, 12,196,181,185,179,225,234,203, 65,164,222, 40,135, 26,239,101, 23, 95, 55,113, 76,135,222,135,218,
-218,218,164, 15, 63,252,144,206,206,206,126, 98,245,234,213,110, 97, 97, 97,248,211,159,254, 4,163,209,136,179,103,207, 98,206,
-156, 57,213, 58,157, 46,179,182,182,118,141,189, 55,225, 41,227,253,117,221,203, 99, 61, 40, 83, 61,112,253, 20, 32,114,131,167,
-187, 12,103,114, 15, 1,215, 79, 2,180, 0,160,133, 24,252, 64, 24,250,135, 7,134, 17, 66,134,113, 28,247,239,238, 80, 1,143,
- 63,254,248, 93, 19, 87,173, 5, 17,128, 62,119, 51,159, 86,145, 53,125,250,244,253, 44,203, 74,186,226,222,109, 89,147,201,114,
- 23,141,227,101,116, 50,228,219,178,124,195, 46, 71,120, 77, 38,211,162,252,252,124,204,157, 59,119,238,179,207, 62, 43, 14, 9,
- 9, 65, 64, 64, 0, 10, 10, 10,160,209,104,144,153,153,217,100, 54,155, 55,213,214,214,190,218,133,251,207,108, 73,119,171, 12,
- 88, 0,155, 91,210, 93, 65, 98, 98,226,153,226,226,226, 42, 47, 47,175, 24,129, 64,240, 0,154,227,124,174,183,252,143,194,174,
-112,206,153, 51, 39,175,184,184,248,134,159,159, 95,108, 11,167, 2,192, 53, 0, 27,187,200, 89,149,151,151, 23, 24, 29, 29,205,
-242,120, 60,174,197,195,192,241,249,124,142,207,231,115, 0,144,157,157, 45, 2,208,105,204,101,121,121,249,159,247,236,217,131,
-156,156,156,152,250,250,250,103, 0,252,163,177,177, 49,250,230,205,155,182, 78,184, 29,111,167,200,169,159, 58,109,159,143,181,
-115,189, 2,192,176,110,144, 63, 44, 95,190, 28,153,153,153,232,108, 5,242,189,123,247, 2,157, 12, 17, 90,219,138, 85, 60, 49,
- 12,131,115,231,206, 89,247,222,179, 13, 11, 90,151,104, 48,155,205, 29,174,244,206,178,172,197,104, 52,226,227,143, 63,182, 75,
-100,237,216,177, 3,122,189, 30, 44,203,218,101,103, 91, 22, 38, 69,117,117, 53, 84, 42,149,213,227,220,218, 41,226,112,153,210,
- 52,141,208,208, 80,220,184,113, 3,158,158,158, 0,154,135, 5,109,222,189,134,134,223, 77,251,239,112,161,209,214, 24, 17,160,
-112,163, 4,100,207,195, 65,130, 17, 19,251,201,209,211, 75, 6,158, 80,132,202, 58, 11,254, 93, 92,143, 79,142,234, 74,141, 22,
-203,196, 3,154,154,124, 59,189, 78,177,190,190,190,139, 45, 22, 75, 36, 69, 81, 18,142,227,234,105,154, 62,173,213,106,151,113,
- 28,119,206,145,155, 80,136,233, 66,119, 41,237,198,231, 11, 57, 11,203, 2,160, 0, 98, 77,116,243, 39,213,124,222,164,103, 4,
- 22,142,236,174,208,221,152,117,175, 11, 63, 36, 36, 36,187,161,161,225, 55,183,146,187, 84, 42, 93, 90, 88, 88,120,223,174,228,
-110,197,131, 15, 62, 56, 88, 44, 22, 47,102, 89,246, 65,189, 94,239, 35, 22,139, 43, 8, 33, 39,110,221,186,245,198,233,211,167,
-127,114,118,159,247, 14,119,115, 37,247, 54,218,120, 60,128,101, 30, 30, 30, 33,103,207,158, 21,181,246, 96,181,182,151,142,172,
-139,228, 68,247, 67,120,120,248,177,237,219,183, 15,238,213,171, 23,213, 58,144,157,162, 40,219,226,152, 20, 69,217,102,150,254,
-244,211, 79,230,196,196,196,163,121,121,121,195,219,227, 12, 10, 10,202,206,201,201, 25, 83, 91, 91,251, 51, 33,213,122,101,119,
-235,121, 83, 83, 19,254,250,215,191,126, 87, 88, 88,216,230, 86, 57, 97, 97, 97,239,166,166,166,206,127,244,209, 71, 41,138,162,
-126, 22,115,101,221,214,199,154, 24,134,193,238,221,187,217,172,172,172,247, 47, 94,188,216,110, 12, 86, 84, 84, 84,233,169, 83,
-167,212,214, 37, 19,218, 75,173, 17, 27, 27, 91,254,211, 79, 63,169,126, 77,206,223,141,192,106, 49, 40,100, 84,144,226, 9,142,
- 35, 83, 9, 72, 63,138,112, 66, 51, 7, 13, 1,178, 37,141,162,143,246,106,181, 77,206,199,214,137,251,242, 65, 33,132,114,110,
-242,251,251, 66, 80, 80, 80, 97, 97, 97, 97, 96, 7,109,194, 41,176,126,227, 34,221,203,203,235, 0, 69, 81,254, 86, 17,221,222,
-103,139, 55,233, 74, 69, 69,197,195, 21, 21, 21,237,174,167,168, 86,171,251,186,184,184,252,141,101,217,104,123, 54,123,166, 40,
- 42, 87,175,215,191,244,107,111,246, 28, 25, 25, 89,148,155,155,219, 87, 44, 22,223, 17, 87,104,189,231,255,205,251,229,203,151,
- 49,121,242,228,146,188,188,188,128, 95,147,243,119, 37,176,156,112,194, 9, 39,126, 47,240,243,243, 59,198, 48, 76,152, 94,175,
-231, 27, 12, 6,190,217,108,190,163,131, 19,139,197,186,198,198,198, 30,206,146,114,226,183, 6,149, 74, 21,162, 80, 40,190,229,
-243,249,162,182, 94, 28,254, 23, 22,139, 69, 95, 85, 85, 53, 78,171,213,106,126, 77,206,223, 60,218,154, 33,115,183, 18,128,209,
- 78, 78, 39,167,147,211,201,233,228,116,114, 58, 57,157,156,191,183, 68, 57,181,188, 19, 78, 56,225,132, 19, 78, 56,225,196,221,
-133, 83, 96, 57,225,132, 19, 78, 56,225,132, 19, 78, 56, 5,150, 19, 78, 56,225,132, 19, 78, 56,225,132, 83, 96, 57,225,132, 19,
- 78, 56,225,132, 19, 78,252,174,240,223, 1, 0, 29, 13,182,141,194,138, 6,132, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130,
+137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72,
+ 68, 82, 0, 0, 2, 88, 0, 0, 2,128, 8, 6, 0, 0, 0, 64, 11, 6,158, 0, 0, 0, 4,115, 66, 73, 84, 8, 8, 8, 8,124,
+ 8,100,136, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,215, 1, 66, 40,155,120, 0, 0, 0, 25,116, 69, 88,116,
+ 83,111,102,116,119, 97,114,101, 0,119,119,119, 46,105,110,107,115, 99, 97,112,101, 46,111,114,103,155,238, 60, 26, 0, 0, 32,
+ 0, 73, 68, 65, 84,120,156,236,157,119,120, 84,197,254,198,223, 57,101,119,179, 37,155, 70, 18, 82, 40, 9, 16, 90, 0,105,210,
+ 69,138,160,136,130, 8, 40, 94,189, 42,122, 17, 5, 11, 54, 34,162, 72,141,247,122, 69,192,159,136,122, 85, 64,233, 42,136, 94,
+ 17,174, 20,233, 2, 22, 64,122, 79, 66,122,207,246,221, 51,191, 63,178,103,221,221,108, 11,108, 20,113, 62,207,115,158,221,211,
+222, 51,115,234,123,190, 51,103,134, 80, 74,193, 96, 48, 24, 12, 6,131,193, 8, 31,220, 31,157, 0, 6,131,193, 96, 48, 24,140,
+235,141,122, 27, 44, 66, 72,200, 33, 47, 66,200,224, 80, 53,157, 67,255,107, 93, 51,148,229,234,171, 41, 15, 97,212,236,239,212,
+156, 17, 70,205,134, 76,103,255,107, 85, 83,206,111,168,186,245,209,244,254, 31,166,116,134,116,222, 95, 11,154,193,150,189,138,
+116, 6,212,190,194,227, 62,227, 79,146,206,254,215,154,166,247,249, 19,138,110,125, 53,221,211, 29,198,116, 6, 61,239,175, 21,
+205, 64,203, 95,101, 58,253,106,135,122, 46,249, 57,246, 51,130,173,123, 61, 32,212,103,225,250, 24,140,250, 64, 41, 37,110,250,
+228, 90,213,148, 33,132, 80, 89, 63, 28,132, 83,203,201,182,112,107,122,237,207,112, 49,131, 82, 74, 8, 33,219, 1,244, 15,147,
+230, 54,167,230, 85, 31,119,175,188,134, 69,183,190,230,170,190,154,225, 58,239, 27, 90,211,125,218,213,156,171,222,154,225, 56,
+239,125, 29,247,112,106,134,235, 90,242, 90, 63, 44,215, 82, 67,156,243, 62,206,159,171,214,245,214, 12,199,181,228,173, 25,142,
+243,254,247,208,148,167, 95,205,181,228, 75, 51, 28,231,189,191, 99,127,181,186,127, 22,234, 21,193,106,200, 29,227, 60, 0, 55,
+135, 91, 51,220,105,110, 8,147, 25,202, 91,226,181,162,137,240, 30,163, 25, 78,205, 25, 97,212,188, 57, 92,199,168, 33,206,119,
+119,205,112,233,123,235,132,227, 56,249,210,188,218,244,250, 73,231, 85,225, 75,243,106,207,251,223, 75, 19,225, 61, 70, 97,185,
+150,188, 52,195,118, 45,121,231, 55, 28, 17, 12,119,205,112, 93, 75, 62,210,121,213,199,201,151,230,213,166,215, 79, 58,175, 10,
+ 95,154,225,120,134, 52,148,238,159,129,122, 69,176, 26,138,134, 48, 66, 64,237, 69, 23, 78,237,134,136,226, 52, 84,164, 45, 92,
+ 81, 28, 31,186,219,195, 40, 23,182,104,147,140, 51,125, 97,121,163,253, 51,194,174, 37,118, 45,225, 26,187,150,124,157, 55,148,
+210, 25,132,144, 87,195,169,121,181,120,107,134,203, 8,249,200,251, 85, 93, 75,222,235,134,227, 90, 10,162,121, 85, 17,102,127,
+249,191, 26,221, 63, 11,215, 76, 37,247, 96,229,189, 87,161, 23,214,168, 88,184,105,160,116,222,252,103,200, 59, 26, 32,157,132,
+144, 25, 13,148,247, 63,203, 62,101,215, 18,187,150,194, 66, 56,175, 37,175,115, 50, 44,105, 13,247,121,238, 75, 51, 28,219,112,
+215, 8,215, 57,218,208,121, 15,231,181,212, 16,199,254,207, 66,189, 35, 88, 13, 93,108,114, 45,107, 54,132,118, 3,229,125, 59,
+ 26,224,237,160, 1,234,117,109, 71,248,163, 2, 51, 16,198, 34, 71, 57,207,225, 76,107, 67, 22, 19, 54,196,185,217,144,231,123,
+ 56,235,121, 52, 80,222,183,227,207,113,220,183, 35,204,233, 12,215,181,228,227,152,111,199, 85,166,213,215,254, 11,119, 17,118,
+ 56,207,205,134,212, 12,135,118, 67,164,211,143,238,118,252, 5, 34, 87, 50,215, 76, 4,139,193, 96, 48, 24, 12, 6,227,122,129,
+ 80,214,208, 40,131,193, 96, 48, 24, 12, 70, 88,241, 91, 68,152,146,146,178, 81,163,209,180,244, 55,191,166,166,230,114, 94, 94,
+222,128,134, 73, 22,131,193,184,158, 32,132,112,248, 45, 98, 46, 1,160,148,189,221, 49, 24,140,235, 24,191, 6, 75,165, 82,165,
+ 31, 59,118, 44, 67,146, 36, 56, 28, 14,216,237,118,215,175,197, 98,193, 77, 55,221, 84,239,250, 91,141, 27, 55,222,193,243,124,
+243,250,172,227,112, 56, 46,230,231,231,247,245, 55,159, 16,178, 27, 64, 58, 33,196,125, 90,192, 95, 0,121, 86,171,181, 75, 32,
+ 77, 66, 72,186,183,158, 31, 45,249,127, 64,205,232,232,232, 3,130, 32,164,250,210,242,247, 95,146,164,179,133,133,133,189,253,
+105, 50,194, 75,227,198,141,119, 8,130, 80,239,243,243,242,229,203,126,207,207,228,228,228, 31, 57,142, 75,174,135, 36, 47, 73,
+210,137,203,151, 47,247,245,103, 64,228,115, 62,144,136,247,249, 68, 8,201,177,219,237,221, 2, 44,239, 87, 51,192, 57, 31, 80,
+211,109, 89, 78, 16,132,236,132,132,132,137, 6,131,193, 4,128,242, 60, 79,227,226,226,228,180, 1, 0,236,118,123, 81, 89, 89,
+ 89,135, 96,122, 12, 6,131,241,103,192,175, 73,146, 36,137, 51,155,205, 56,121,242, 36,252,220,231, 29, 87,176,189,140,131,255,
+219,156, 16,153,144, 8,187,213, 10,109,163,120,151,118,193,175, 71, 96,183, 89, 97,183, 88,208,180,123,207,218, 13, 56, 28,104,
+223,190, 61, 31, 68, 51,245,245,215, 95, 79,136,140,140,132,201,100,130,201,100,130,217,108,134,201,100,130,197, 98,129,197, 98,
+129,213,106,133,213,106,133,221,110,135,217,108,198,150, 45, 91,130,165, 61,117,206,156, 57, 9,122,189,222,165, 39, 15,178,166,
+172,107,179,217, 96, 50,153,240,221,119,223, 5,212, 20, 4, 33, 53, 47, 47, 47, 65,161, 80,128, 82, 10, 73,146, 64, 41,245, 24,
+188,105,209,162,133, 53, 72, 58, 25,225, 37, 99,206,138,175, 18,162,212, 42,216, 37, 9,195, 59,181,112,205, 56,251,193, 26, 80,
+187, 3,146,221,142, 86,147,238, 7, 0, 80, 74,209,174, 93,187,128,231, 39,165,180,217,156, 21, 95, 69,135,170, 89, 92, 92,108,
+108,219,182,109, 30,106, 43,130,250,139,240,164, 26,141,198, 4, 57, 13, 50,178, 81,225, 56,206, 99,216,180,105, 19,134, 15, 31,
+ 30, 44,239,169,207, 60,243, 76,130,205,102,131,197, 98,129,217,108,134,205,102,131,221,110,119, 13, 14,135,195, 53, 88, 44, 22,
+236,219,183, 47,152,166, 28,185,122,253,150, 91,110,121,248,171,175,190,210,126,241,197, 23,218,230,205,155, 67,161, 80,128,231,
+121,240, 60, 15,142,227, 32, 8, 2,122,244,232,241,151,169,252,202, 96, 48,174,127,252, 26, 44,179,217,124,174,115,231,206,212,
+249, 63, 69,165, 82, 41,220,231, 19, 66,146, 51, 50, 50, 78,120,175, 23,172,232, 48, 50, 33, 17, 89, 77, 98, 1, 0,175, 92, 40,
+145,181,240,207,222, 55,184,150,153,153, 91, 1, 0, 80,171,213, 32,238,175,205,126,208,106,181,184,229,150, 91,160, 84, 42,209,
+173, 91, 55,136,162,232,115, 80, 40, 20, 16, 69, 49,152, 28, 8, 33,208,233,116,120,237,181,215, 0, 0,130, 32, 64, 27,161,194,
+228,222,221, 16, 1,138,247,142,156,130, 69,162, 16, 4,193, 53,132,162,169, 80, 40,112,248,240, 97, 8,130, 0,158,231, 93,191,
+242,255, 13, 27, 54, 96,244,232,209, 16, 4, 1,106,181, 26,248, 11,125,109,113,173, 16,165, 86,225,239,139, 63, 7, 0, 92,154,
+ 63, 9, 64,237,177,219,247,248, 43,174,101,154,253, 99, 44, 8, 33, 16, 69, 17, 28, 23,252, 59,145, 80, 53, 75, 75, 75,141,247,
+222,123,239,206,200,200,200, 77,149,149,149, 1, 53, 41,165,184,116,233, 18, 4, 65,240,123,190,115, 28,135, 55,223,124, 19,167,
+ 79,159, 14, 41,239, 38,147, 9,239,191,255, 62, 28, 14,135,135,174,252,223,123, 90, 48,156,230,106,246,144, 33, 67,238,255,234,
+171,175, 98, 8, 33,120,251,237,183, 33,138, 34,110,191,253,118,196,197,197,225,219,111,191,133, 66,161,192, 11, 47,188, 16, 82,
+ 26, 25, 12,198, 95, 22, 17,192, 13, 0,226, 81, 27,224,169, 2, 16,237, 54,191,200,249, 27,239, 54,254,131, 15,157,238,206,101,
+228,249,242,184, 5,128,210,199,244, 18, 0,106,231, 96, 6,176, 27, 64,166,219,118,228,245,220,211,241, 3,224, 52, 88,164,182,
+ 85,213,109, 0,110,150, 27,191,187,124,249,242,109,242,210, 45, 90,180, 56,118,226,196,137, 54,178,215,113, 22, 21, 42,236,118,
+123,134, 92,108, 40, 71,135, 6, 15, 30, 28,240,141,222,110,245, 12,202,184, 23, 17,120, 79,119,255,245, 7, 33, 4, 86,171, 21,
+ 99,199,142, 5, 0,191, 15, 27,247, 33, 4,207, 6,139,197, 2, 65, 16,208,186, 73, 60,166, 15,237,140, 27,169, 13, 53,213, 4,
+246,138, 26,140,208,217,112,172, 93, 23, 44,185, 88,132, 11,149,213, 16, 4, 33, 36, 77, 73,146,252,154, 43,158,231,177,120,241,
+ 98,220,123,239,189,224,121, 62, 36, 61, 70,248,177, 75,146,199,184,191,115, 51,212,243, 51, 84,205,210,210, 82,227,240,225,195,
+247,170, 84,170,165,137,137,137,121, 57, 57, 57, 1, 53, 41,165,117, 76,143,247,203,196,191,255,253,111, 44, 92,184, 16, 3, 6,
+ 12, 8, 41,157,102,179, 25,132, 16, 44, 89,178,164,206,188, 89,179,102,213,217, 94, 32, 77,231,139, 17,151,156,156,252,248, 55,
+223,124,163,151,151,109,212,168, 17, 68, 81, 68,135, 14, 29, 16, 25, 25,137,157, 59,119,194,225,112,132,124, 93, 50, 24,140,235,
+ 23, 95, 94,196,141,155,178,178,178,186,101,103,103,207,237,213,171,215,202,221,187,119,175, 32,132,108,148,103, 82, 74,135, 59,
+ 53, 54,186,141,119,135,167,201, 18, 1,196, 19, 66, 54,202,203,187,143,187, 77, 31, 12, 64, 41,143,103,101,101,101,102,103,103,
+207,157, 58,117,234, 75,243,230,205, 83,100,101,101,117,204,206,206,158, 43,111,199, 87, 58,128,223, 34, 88, 1, 91, 1,150,139,
+ 11,143, 31, 63,238,175,184,208, 69,176,246, 51,180,141,226, 93,145,171,153,205,226, 92,211, 95,203, 41,119, 61,184, 22,117,109,
+ 9,173, 86,139,161, 51,255, 21,112, 91, 64,237,195,202, 98,177,160,176,176,208, 21, 85, 8, 54,132,170,169, 81, 71, 96,203, 51,
+ 29,112,169, 68,137, 25,123, 74,241,213, 79,167, 33,138, 34,110,109,215, 1,183, 41, 34,241,114, 51, 37,158, 57,117, 30,182, 16,
+235,234, 82, 74,125, 26, 43,249,191, 92, 84,194, 12,214, 31,199,240, 78, 45, 92, 81,166,125,145,131, 92,211, 71,215, 28,118, 29,
+147,103, 23,255, 19, 0, 48,160, 75,143,160,215, 67, 40,154, 37, 37, 37,198,190,131,110,222,238, 48, 90, 62,190,255,254,251,207,
+109,221,186, 85, 29, 74, 90,125, 25, 44, 57, 74, 43,155, 43, 65, 16, 96,177, 88, 66,202,187,197, 98,241,123,125, 40, 20,138,122,
+ 71,176, 0,160,166,166,198,178,126,253,122, 44, 90,180, 8,113,113,113, 24, 50,100, 8,146,146,146,176,102,205, 26, 80, 74, 49,
+105,210, 36,168,213,106, 57, 90, 29,146, 38,131,193,184,110, 9,228, 69, 84,217,217,217,115,221, 13, 12,224,105,104,220,141,147,
+151,137,146,185, 41, 43, 43, 43, 51, 80, 2,220,205,150, 60, 77,222, 46, 33,100,227,188,121,243,134, 7, 73,135, 28, 73,251,173,
+136, 48, 80,171,176,102,179,249, 92,167, 78,157, 66,114, 17, 6,131, 33, 63,208,124,249,129,228,125, 51,117,143, 10,232,116, 58,
+104,245, 58,112, 33,222,111,109, 54,155,203,160,108,222,188, 25,106,181, 26,195,134, 13,187,170, 8,150,213,106,133, 82, 33,130,
+107,148,136,191,207,223,138,146, 42,163,235,193,178,237,236, 57, 28, 42, 40,196, 51,189, 6, 65,171, 46, 68,181,197, 18, 82,164,
+ 77,146,164, 58,230, 74, 16, 4,140, 29, 59,214, 21, 61,112,175,151, 2, 86, 68,248,135,225,235,252,244,158, 46,121, 69,166,174,
+ 68,179,164,164,196, 56,124,248,240,189, 14,163,229,227,220,220,220,189, 0, 34,110,188,241,198,122, 27, 44,217, 88,137,162,136,
+ 55,223,124, 19, 11, 23, 46,116,205, 15,213, 96,217,237,118, 15,227,116,234,212, 41,143,109,121, 27,186, 64,197,163,180,246, 46,
+ 41, 1,144,210,211,211, 93,235, 52,110,220, 24,209,209,209,144, 36, 9,146, 36, 33, 34, 34, 2,106,181, 26, 10,133,194,175, 22,
+131,193,248,235, 16,192,139, 24,167, 78,157,250, 18, 33,100,163, 51,146,116,196,185,188, 47, 35,229,139,238,240, 52,105, 69,190,
+ 22,114,143,100,185,155, 44,247,255, 50, 89, 89, 89,153, 62,210,225,138,152,185,238,166,110,174,177, 14,238,197,133,225,192, 87,
+177,160,251, 3, 76, 23,173,135, 90,171, 5,207,115, 65,251, 87,146,139, 8,229, 27,254,196,137, 19, 3,214, 75, 9,181,190,148,
+213,106, 5, 39,240,184,220, 56, 13, 14,238,123,215,186,242,192, 9, 34, 46, 52,110, 3,254,248,143, 16, 67,124,208,122, 71,176,
+ 38, 77,154,132,247,223,127, 31, 28,199,185,246,137, 32, 8,104,213,170, 21,206,157, 59, 23,146, 38, 35,252,248, 51,203,222,211,
+ 29, 14, 41,228,168,139,175,229, 74, 74, 74,140, 99,198,140,217, 94, 81, 81,241,113,251,246,237, 79,161,182, 25,131,144, 26,255,
+149,207, 21,119, 99, 37,155,171, 5, 11, 22,120,152, 33,155,205, 22,210, 11,128,205,102,171, 99,116,222,120,227, 13,143, 95, 0,
+232,221,187,119, 72,145, 96, 0,148,227, 56,170, 80, 40,112,203, 45,183,160, 99,199,142,248,226,139, 47, 32, 73, 18,158,120,226,
+ 9,168,213,106,188,245,214, 91,176,219,237,120,253,245,215, 89, 4,139,193, 96, 4,242, 34,230,121,243,230, 29,153, 55,111,158,
+ 43,146,228, 92, 62,152,185,186, 29,181,102, 42, 94, 54,103,168,173, 75,229,171,126,150,156,134, 58,154,222,134, 11,168,141,108,
+249, 72,135,171, 88,242,119,239,236, 57,255,232, 97,252,171, 79,103, 0,158,197,130,139,123,180,129, 86,167,133, 54, 82,135, 49,
+ 27,190, 7, 0,231,205,126,106, 80, 77,155,205,230, 50, 88, 37, 37, 37, 1,205, 85,125, 34, 88,156, 82,192,218,212, 50, 80,165,
+ 8,193, 98,243, 48, 88,188, 32,226, 82, 92, 26, 56, 81, 1,193, 97, 15, 73,147, 82, 90,167, 72,240,193, 7, 31, 4, 33,196,245,
+197, 87,167, 78,157,220,181,216, 19,231,119, 38,255,192, 7, 56,182,238,113, 0, 64,223,154, 26,215,177,152,211,233,183,239, 54,
+230, 31,222,238,138, 54,206,196,115, 87,164, 89, 82, 82, 98,188,177,109,230, 94, 69,108,212,199, 23, 47, 94,220, 11,128,187,231,
+158,123,162, 59,117,234, 20,210, 53, 41,127, 52,225,109,174,220, 35, 87,242,175,205,102, 11, 41,239,114, 93,168, 96,200,197,133,
+193,206,121, 74, 41,141,141,141, 5,199,113,208,235,245,208,233,116,174, 47,104, 35, 34, 34,160,209,104, 92,245, 55, 67, 52,108,
+ 12, 6,227,175, 75,140,108,112,156, 38, 9,128,103,157, 43,119, 19,228,175,168,208, 25,113,218, 17,100, 91, 95,161,214,152,249,
+ 68,142,164,185, 79,243,222, 46,224, 52, 88,222,125,121, 37, 37, 37,253, 87,167,211,165, 5,205,174,147,250, 52, 58,234,176,253,
+ 86,201, 93, 54, 87,132, 16,232, 34,117, 80,235,180, 80, 71,234, 60,230,133,130, 92, 68,200,243,188,235, 97,179,116,233, 82,232,
+116, 58, 60,244,208, 67,245,174,131, 5, 56, 13,150,130,195,183,170,239,192, 43, 5, 15,115, 37, 8, 2,120, 81, 68,190, 46, 9,
+156, 40, 66,176,135, 22, 21,171,168,168,128, 32, 8,152, 62,125,186,235,141,221,221, 92,213, 39,207,140,134,129, 58,126, 51, 35,
+254, 42,178,215,247, 24,121,107,202,145, 43, 69,108,212,199,109,218,180,113, 69,174, 52, 26,141,252,245,104, 80, 56,142,243,105,
+174,188,191,248, 19, 4,161,246, 92, 14,242,181,163,123, 4,107,222,188,121, 46, 93,247,200,149, 76,125,174, 35, 57,173,219,183,
+111,199,161, 67,135, 48,113,226, 68,168,213,106, 44, 92,184, 16,118,187, 29,179,102,205,130, 90,173,134, 82,169, 12, 46,196, 96,
+ 48,174,107,130,244, 43, 90,228, 85,207,137,120, 69,154,138,156,235,122, 24, 43,247,226, 64,183,255,238,111,157,178,174,197,171,
+232,208,123,186,252, 91, 50,111,222,188,173,114,228,202,109,186, 71, 58, 0, 63, 17, 44,149, 74,149,118,242,228, 73, 87, 35,163,
+129,126, 45, 22, 11, 6, 12, 24, 16,114, 36, 76,254,138, 80, 16,120, 15, 67,161,137,212, 65,163,143,132, 90,167,243, 54, 26, 1,
+159,102, 28,199,185,222,128,221, 13,214,171,175,190, 10, 65, 16,240,254,251,239, 3, 0,158,123,238,185,144,235, 96,201,154,112,
+ 16,228,208, 51,232, 60,127, 52, 44,159,216, 80,176,235,103, 8,130,128,132,158,183, 65,186,113, 52, 12,106, 29, 4,135, 61,228,
+175, 8, 75, 75, 75,113,238,220, 57,240, 60,143, 41, 83,166,120,180, 85,228,253,101,218,230,205,155,131,230,157, 17,126,168,100,
+247, 24, 15,161,184, 48,232, 49,114,215,148,235, 92, 85, 84, 84,124,124,241,226,197,125, 0,184,251,239,191, 63, 90,163,209,224,
+ 63,255,249,143, 1,128,114,205,154, 53, 1, 93,150,187, 41, 15,102,174, 68, 81,172, 61,151, 67, 64, 46,194,150,135, 96, 21,222,
+ 67, 57,231,229,180, 18, 66,224,112, 56,160, 86,171, 61, 34, 87, 17, 17, 17, 80,169, 84, 33,165,143,193, 96,252,165,241, 91,164,
+231,131,238,110,102, 41,216,122,254,230,215,103,123, 62,241,105,140, 56,142,131,217,108,198,175,191,254, 26,170, 78,200,141,142,
+ 54,233,214, 3, 51,115, 43, 64, 8,193,123,189,219, 67,171,215, 65,163,213,226,238, 47,182,187,110,216,135,231, 62, 7,149, 86,
+135,228,126, 67,130,234,201,111,222,222, 6,171,188,188, 28,162, 40, 98,246,236,217,224, 56, 14,175,191,254, 58, 82, 82, 82,112,
+249,242,101,172, 89,179, 38,168,174,213,106, 5,239,224,145,244, 64, 91,104, 30,140,130,254,129,155, 16,115,203,171,200,181, 8,
+216,109,210,224, 38,211, 81, 40,191, 93, 0,139,228, 8,249,139, 42,187,221,142,237,219,183,123, 87,100, 7,165,212,213, 74,190,
+205,102,131,213,106,197,235,175,191, 30,210, 23,106,140,240,146,212,115, 18,226,187, 61, 6, 0,216, 48,111,188,107,250,244,195,
+191,157,159,111,126, 82,219, 96,127,155,230,193,207, 79,119,205,146,146, 18,227,173, 3,122,239, 48, 73,226, 71, 29, 58,116,240,
+136, 92, 69, 68, 68, 16,231,120, 72,166,154,227, 56,240, 60, 95,167, 88,208,159,201, 10,165, 14,150,221,110,119, 53, 0, 26,168,
+190,226,149, 68,176,198,143, 31,143,164,164, 36, 87,228,106,230,204,153, 80,171,213,200,202,202,130,205,102,195,130, 5, 11, 66,
+214, 99, 48, 24,140, 32, 92,181, 57, 10, 7, 62,239,160, 38,147,233,124,199,142, 29,125,174, 96, 50,153, 82, 34, 34, 34, 60,238,
+174,196,217,232,168,119, 81, 33, 33,100, 48,165,116,139,183,134, 28,173,137,212, 71, 34, 66,167,133,198, 43,106, 21, 17,169,135,
+ 74,167, 3,167,168,123, 19,247,165, 41,215, 29,113, 55, 88,242, 80, 81, 81, 1, 81, 20,177,104,209, 34,232,245,122,152,205,230,
+160,154,242,195,134,231,121, 24, 46, 85,225,216,220, 45, 80, 70,236, 70,203, 33,247, 34, 73, 84, 67,177,243, 51, 24, 29,158,117,
+178, 66,209,204,200,200,192, 43,175,188, 82,167,121, 6,127,164,164,164, 4,205,251,213,194, 52,125,107, 6,250,202, 85, 70,162,
+ 14, 95,203,249,212,148, 35, 87, 38, 73,252,232,220,185,115,114,228, 42, 74,163,209,224,221,119,223, 53, 0,224,102,205,154,165,
+105,214,172, 89,157,118,228,124,157, 75, 60,207, 99,254,252,249, 62,235, 92,249, 50, 91,161,228, 93,190,142,220,215,237,223,191,
+191,207,134, 70,125,153, 54, 95,154,114, 90,227,226,226, 92,145, 43,135,195,225,250,122, 80,110, 45,222,223,203,196,245,112, 46,
+ 49, 77,166,201, 52,255,154,248,124,186,231,229,229,221,234,111,133,150, 45, 91,158, 60,121,242,100, 43,185,203, 12,231, 13, 83,
+ 97, 50,153, 50,122,247,238, 29, 52,148, 35, 73, 18, 84, 42, 21, 40,165, 24,248, 74, 54, 8, 7,112,240,124,120, 37,244, 25, 4,
+158, 23, 32,213,118,201, 17,244, 43, 66,163,209,232,241, 80,240, 53, 84, 87, 87,195,108, 54, 7,253,188, 92,198,100, 50,121, 52,
+165, 64,168,132, 11,255, 91, 93,231,107, 66,121, 8,181, 94, 78, 68, 68,132, 71, 17, 79, 32,130,181, 41,198, 8, 63,242,135, 8,
+ 0,208,186,247, 48, 72,146, 3,212,225,240,232,206,168,109,218,173,144,168, 3, 86,155, 1,102,179, 57, 88,152,145, 20, 23, 23,
+ 27,199,140, 25,179, 29,192,135, 35, 70,140, 56,129,218, 47, 88,168, 78,167, 83,137,162, 40, 1, 40, 5, 64,203,202,202,162,114,
+115,115, 37,147,201,212, 52, 88, 58,191,250,234, 43,252,250,235,175,232,215,175,159, 71,183, 77,114, 20,212,189, 53,246, 80,206,
+ 79,185, 88,220, 87, 11,238,254, 12, 92,168,240, 60,143,168,168, 40, 40, 20, 10,204,158, 61, 27, 10,133, 2, 26,141, 6, 0,176,
+ 96,193, 2, 87,163,169, 12, 6,131,113, 61,113, 37, 95, 17,242, 1,138, 15, 3, 22, 21,218,237,246,156,102,205,154,213,107, 99,
+ 14,135,163, 32,208,124, 73,146,114,214,172, 89,163, 0,234, 86, 74,246,247, 75, 41, 13,168, 73, 41,205,217,176, 97,131,235,123,
+117,247,135,147,175,255,132,144,160,154, 14,135, 35,167,121,243,223,250, 17, 14,197,144,217,108,182,220,160, 11, 49,194,134,195,
+225, 8,112,126, 78,243,183, 78,176,243,243, 84,235,214,173,115,163,163,163,191, 78, 76, 76, 44,217,181,107, 87, 92,247,238,221,
+227,220,151,233,222,189,123,146,215,106, 22,248,239,135, 16,132,144,156, 17, 35, 70,248, 60,231, 1,184,140,187,215,249, 25,176,
+105,120, 74,105,206,254,253,251, 21,238,235,251,211,119,187,142, 2, 55, 55, 95,187,204,133,206,157, 59,115,238, 58,254,206,125,
+155,205,230,179, 93, 26, 6,131,193,248, 51, 82,111,131,101, 52, 26, 47,117,236,216,209,103,173, 89,163,209,120, 49,208,186,197,
+197,197,221,234,187,189, 96, 88,173,214,222,127, 6,205,162,162,162,176,231,157, 17, 94, 26,226, 24, 21, 20, 20,220, 24,110, 77,
+187,221, 30,246,243,211,102,179,133, 93, 19, 0, 74, 74, 74,122, 53,132, 46,131,193, 96, 92,235,212,219, 96,133,218, 28, 3,131,
+193, 96, 48, 24, 12,198, 95,149,144, 90,141,102, 48, 24, 12, 6,131,193, 96,132, 14, 65,109,175,209,117,168,207,215, 1,132, 16,
+159, 26,129, 8,166,207, 52,153, 38,211,100,154, 76,147,105, 50,205,235, 79, 51,152,246,117,243,117,162,252,117, 84, 67, 12, 0,
+ 6, 51, 77,166,201, 52,153, 38,211,100,154, 76,147,105,254,213, 6, 86, 68,200, 96, 48, 24, 12, 6,131, 17,102,126,247,206,158,
+ 25,181, 16, 66,120, 74,105,200, 45,224,135, 64, 12, 0,127, 29,186, 89, 0,148, 93,129, 38, 1,160,112, 14,114, 67, 69, 54, 0,
+ 86,231, 16, 66, 83,243,175,113,121,121, 49,153,212, 33,118,167,132,136,146,132,159,154, 54,109,242, 35,112,171, 5, 0,116,141,
+219,181,211,105,213,131,205, 86, 75,154, 74, 84,254, 90, 94, 83,189,217, 84,112,226,252, 21,164,149,193, 96, 92, 37,132,144, 59,
+ 0,188,134,218,107,127, 30,165,116,245, 31,156, 36, 6,227, 79,139, 95,131, 21, 25, 25,121,128,227,184,212, 96,237,235,200, 56,
+251, 26,203, 41, 45, 45, 13,233, 83,119, 66,136, 0, 96,140, 78,167, 27, 32,138, 98, 31, 0,176,217,108,187,170,171,171,183, 2,
+ 88, 67, 41, 13,173, 3,181,186,186,122, 0, 99, 1,220,231,156,244, 41,128,213,148,210,202, 43,212,235, 24, 21, 21,181, 78, 20,
+ 69, 90, 92, 92,220, 19, 0,226,226,226,246,218,108, 54, 82, 89, 89,121, 55,165,244,151,122,234,113, 10,133, 34,187, 95,191,126,
+125, 9, 33,203, 40,165,139,175, 36, 93, 62, 80,113, 28,231,211,152, 72,146,212,220,215,244, 32, 40, 0, 68, 45, 90,180, 40,110,
+249,242,229,157,115,114,114, 58, 0, 64,106,106,234,225,251,239,191,255,199,201,147, 39,151, 0,168, 64,173,209,242, 75, 94, 94,
+ 76,102, 97,254,217,137, 5,133,191,142, 5,128,198, 73, 29, 86,243, 60,167, 72, 73, 57,180, 71,211,232,190, 70,173,219,180,120,
+108,229,127, 22, 41,154,167, 53,193,119,187, 15,221, 48,249,169,151, 50, 35, 18, 91,255,155,153,172,223, 15,189, 94,127,128,227,
+184, 84,192,255, 53,238,235,154,119, 56, 28, 57, 37, 37, 37, 62,175,119,189, 94,127, 64, 16,132, 84,127,235,250,155, 38, 73,210,
+217,162,162, 34,159, 77, 70, 68, 69, 69,237, 17, 4, 33, 45, 84, 45,249,215,110,183,231,248,107, 34, 38, 42, 42,234, 0,207,243,
+169,129,242,233,107,158, 36, 73,103, 11, 11, 11,253,165,179, 78,222,195,145,206, 43,209, 12,148, 78,231, 50, 28,128, 5,113,113,
+113, 61, 74, 74, 74,254, 6,224,165,202,202,202, 78, 60,207, 35, 54, 54,246, 37, 66,200,233,168,168,168, 15, 42, 42, 42,118, 3,
+120,138, 82, 42,249,211, 98, 48, 24,158,248, 53, 88, 28,199,165,230,230,230, 38,104,181, 90, 0,191,245,151, 39,119,242, 44, 73,
+ 18, 40,165,174, 95,187,221,142,182,109,219,134,180, 81, 66, 72, 7,189, 94,191, 54, 43, 43,171,233,152, 49, 99,148,114,151, 48,
+121,121,121, 25,235,214,173,251,219,236,217,179, 95, 37,132,140,166,148, 30, 14, 81,143, 3, 48, 8,192,131,157, 59,119, 30, 53,
+115,230, 76,197,192,129, 3,225,112, 56,240,245,215, 95,247,155, 53,107,214, 34, 66,200,103, 0, 62, 6,240,191, 80,111, 18,132,
+144,190,141, 27, 55, 94,177,115,231,206,164,115,231,206, 57,198,140, 25,179, 10, 0, 14, 28, 56,144,238,112, 56, 72,207,158, 61,
+191, 34,132,140,163,148,238, 12, 41,227,181,140,152, 60,121,242,232, 73,147, 38,197, 63,244,208, 67, 15, 0, 88,236,220,150,220,
+139,120,125, 59, 32,116, 69,174, 40,165,138, 0,203, 53, 70,232,145, 44,237,185,115,231, 98,122,247,238,253,120, 97, 97,225, 51,
+238,186, 5, 5, 5, 56,120,240,160,117,238,220,185,243,119,239,222,253, 78, 90, 90, 90, 25,128, 26,127, 66,212, 33,118, 47, 40,
+252,117,236, 77,189, 22, 69, 1,192,154, 13,143,223,187,255,199,162,200,141,223, 44,249,155, 50, 66, 97, 94,254,222,124, 69,171,
+150,205,177,237,192, 41,236,251,181,148,116,232, 59, 92,168,216,184,236, 22, 0, 75, 66, 72, 39, 35, 12,240, 60,159,146,147,147,
+147,160,209,104,124,118,232,238, 85,239, 66,110,184, 20, 25, 25, 25,126, 53, 5, 65, 72,205,205,205, 77,136,136,136,112,221, 59,
+188,239, 25, 0,224,126,186, 83, 74,209,186,117,107,191,134,157,227,184,102, 23, 47, 94, 76,208,104, 52, 46, 29, 95,233,147,145,
+141, 70,235,214,173, 3,229,221, 35,157,161,104, 82, 74,209,170, 85, 43,191,209,103, 57,239,114,143, 21,193,242, 45,107,166,165,
+165,249,189,246,125,105,134,146,206, 22, 45, 90, 4,124, 1, 2,176,224,196,137, 19,147,154, 52,105,130, 86,173, 90,237,238,209,
+163,135, 94,171,213,226,155,111,190, 65,187,118,237, 50,245,122,253,190, 53,107,214,136, 47,188,240,194, 13, 31,125,244, 17, 0,
+ 76, 14,162,199, 96, 48,156,248, 53, 88,132, 16,104,181, 90,172, 90,181,202,111,183, 25,238,255,155, 54, 13,218,187,135,172,219,
+ 45, 45, 45,109,251,206,157, 59,213, 73, 73,191, 53, 96,109,177, 88, 16, 19, 19,131, 39,158,120, 66,121,199, 29,119,180, 26, 50,
+100,200, 94, 66, 72,127, 74,233,129, 32,122,163,226,227,227,223,158, 62,125,122,226, 61,247,220,131,184, 56,143, 70,178, 49,102,
+204, 24,220,125,247,221,138, 19, 39, 78,220,187,116,233,210,123, 23, 47, 94,156, 79, 8,153, 76, 41,253, 44,144,174, 70,163, 25,
+209,178,101,203,119,119,238,220,153,144,144,144,128,244,244,116,238,133, 23, 94,104,149,145,145,161, 78, 77, 77,229, 46, 95,190,
+140, 47,190,248, 34,101,220,184,113,107,149, 74,229, 99, 22,139,101,125, 8,121, 87,198,198,198, 62, 63, 97,194,132,184,202,202,
+ 74,251,161, 67,135, 78,201,211, 85, 42,213, 43, 61,123,246,236, 66, 8, 89, 69, 41,253, 56,152,150, 27,174,200,149, 51, 74,231,
+221,231,136, 77,158, 31, 98, 36, 75,249,211, 79, 63,197,246,234,213,235, 51,179,217,220,101,226,196,137, 23,231,206,157,171,214,
+235,245,122, 0,164,178,178,178,236,181,215, 94,179,188,245,214, 91, 47,182,107,215,110,208,158, 61,123, 70,221,112,195, 13, 54,
+212,154,183, 58, 80, 66, 92,233,185,148, 91,132,237,187, 37,229, 43, 89,207,165,254,115, 78,218,133, 31,142, 94,146, 4,181, 30,
+ 95,238, 56,130,130,146,106,252,119,207, 81, 52,142,139, 36, 10,149,152, 25,157,154,217,191, 34,247,232,142, 43, 48,156,140,122,
+ 66, 8,129, 70,163,193,151, 95,126, 89,167,139, 41, 95,221, 79, 9,130,128,232,232,232,160,189, 17, 68, 68, 68, 96,243,230,205,
+ 62,251, 70,244,213,245, 78, 84, 84, 20, 0,255,157, 93, 19, 66, 16, 17, 17,129, 93,187,118,129,227, 56,159, 93,248,120, 79,211,
+106,181,224, 2,244, 73, 37,107,238,216,177, 35,168,150,252,171,211,233, 0,160, 78,159,145,238,168, 84, 42,236,220,185,211,111,
+158,189,255,235,156,253,177, 6,211,220,181,107,151, 71, 23, 93,222, 93,119,185,143,107,181, 90,215,139,155, 63, 98, 98, 98,122,
+166,166,166, 98,255,254,253, 88,179,102, 77,108,102,102, 38, 78,157, 58, 5, 66, 8,230,206,157, 75,218,183,111, 47,230,231,231,
+163, 95,191,126,248,252,243,207, 27,164, 49, 90, 6, 35, 68, 68, 0, 55, 0,136, 71,109,175, 49, 85, 0,162, 81,251,236, 81, 2,
+ 40, 1,160,118, 14,102, 0,213, 0, 26, 57,215, 45, 70,237,189,197,221, 32, 20,193,179, 83,232,238, 78,109,185, 71,137,120,183,
+121,242, 54,188,199,189,127, 61,180, 5, 0, 32,132,200, 15,177,155, 41,165,219, 61,114, 20,130,185,146,251, 17,243,190,150,105,
+221,142, 95, 85, 90,173,118,221,222,189,123,213,241,241,191,165,221,108, 54,163,170,170, 10,213,213,213,168,170,170, 66,100,100,
+ 36,214,172, 89,163, 30, 52,104,208, 58, 66, 72, 6,165,212,236, 79, 19,192,252,203,151, 47, 39,218,237,118, 40,149,190,171, 32,
+113, 28,135,182,109,219,226,165,151, 94,194,208,161, 67, 27, 15, 24, 48, 96, 62, 0,151,193,242,161, 9,141, 70,243,238,193,131,
+ 7, 19, 52, 26, 13, 78,158, 60,137,156,156, 28, 60,251,236,179, 77, 36, 73,194,165, 75,151,112,234,212, 41,228,230,230, 98,233,
+210,165, 9, 35, 71,142,124, 23,128,135,193,242,165, 9,224,209, 41, 83,166,100,196,198,198,114,255,250,215,191, 42,170,171,171,
+223,115, 78,207, 90,176, 96,193,184,155,110,186, 41,254,145, 71, 30, 1, 33,100, 37,165,180,142, 97,241,210,244, 21,185,114, 0,
+ 56,230,181, 90, 91,175,200, 86, 99,212,158,124,229, 62, 52, 9,128,168, 33, 67,134, 76, 49,155,205, 93,118,238,220,121,186, 79,
+159, 62,205, 0, 92,134,243,164,139,138,138,210,206,159, 63, 63,113,248,240,225, 39, 6, 14, 28,216,101,200,144, 33, 83,138,138,
+138,230, 58,231, 83,111, 77, 73,194, 79,141,147, 58,172,222,177,103,242,216,109,187, 44,138,231,158,122,245, 98,211, 38,205, 43,
+126, 58, 89,234, 56,122,182, 8, 85, 70, 59,238, 26, 88,219,177,120,207, 14, 77,241,246,170,157,120,226,233,105,226,103,171,151,
+221,125,154, 66, 11,224,171, 0,251,243,170, 96,154,181, 56,139,146, 32,138, 34,110,187,237, 54, 16, 66,234,244,181, 41,138, 34,
+246,236,217,131,129, 3, 7, 66, 20, 69,140, 31, 63, 62, 36, 77, 65, 16, 48,100,200, 16, 87, 63,135,238,122,222,102,193,151, 23,
+240,206, 59,165, 20,130, 32,128,227, 56,191, 29, 92,123,107, 6,187, 47,201,233, 12,164,229, 62, 47, 88, 58,229,232, 81,168,230,
+ 42, 84, 77, 57,157,130, 32,160,119,239,222,248,241,199, 31, 3,154, 45, 95,190,210, 59,239,101,101,101,127,207,200,200,216,177,
+104,209,162, 88, 0, 40, 41, 41,113,117, 68,207,243, 60,142, 31, 63, 14,139,197,130, 25, 51,102, 88, 43, 43, 43, 31,169, 35,232,
+ 67, 51, 28, 48,205,191,166,102, 32, 47, 2,224,166,172,172,172,110,217,217,217,115,123,245,234,181,114,247,238,221, 43, 8, 33,
+ 27, 41,165,195,229,223,172,172,172,204,236,236,236,185, 83,167, 78,125,105,222,188,121, 71, 8, 33, 27, 1,192,123,220,153,254,
+225,110,218, 34,128,120, 89,199,153, 22,143,101,125,141,123,255,122,107, 11,110, 19,136, 51,115,196,109, 90,200, 6, 43,216,219,
+ 23, 0, 8,130, 48,105,238,220,185,137,129,204, 85,117,117, 53,242,242,242,208,172, 89, 51,140, 31, 63, 62,113,209,162, 69,147,
+ 0,188, 17, 64, 86,193,243, 60,246,239,223,143,194,194, 66,116,236,216, 17,105,105,105, 30, 11,156, 57,115, 6, 95,127,253, 53,
+202,203,203,209,181,107, 87,160,182,126,145, 79,110,184,225,134, 25,109,219,182, 29, 50,100,200, 16,187, 90,173,198, 79, 63,253,
+132, 46, 93,186, 96,213,170, 85,104,218,180, 41, 52, 26, 13, 78,156, 56,129,142, 29, 59, 98,251,246,237,136,143,143, 71,231,206,
+157,237, 93,187,118,253,190,180,180,116,235,249,243,231,103,248,210, 37,132, 40, 82, 82, 82, 94,154, 48, 97,130, 50, 47, 47, 79,
+ 90,186,116,233,110, 74,233,110, 66,200, 99,211,166, 77,123, 96,232,208,161,241,135, 14, 29,170,252,225,135, 31,126,240,101,174,
+124,224, 43,114,229, 81,111,205, 89, 52, 99, 54, 26,141, 22,179,217,108,227, 56,238, 60, 33,196,226,112, 56,252,149,237, 68, 60,
+248,224,131, 45,138,139,139,159,120,250,233,167,207, 57,205,213,113,212, 86,108, 7, 0,216,237,118,115,117,117,117,101,175, 94,
+189,154,141, 27, 55,238,244,138, 21, 43,158,120,240,193, 7,215,124,252,241,199,213, 0,140,222,130, 77,155, 54,249,145,231, 57,
+ 69, 77, 85,236,217,181,107, 62,120,230,235, 13,147,154, 92,186,148,219, 42,174, 81,124,141, 66, 23,159,183,230,211,143, 14, 0,
+176,228, 21, 85,226,151, 51,249, 16, 69, 30,191, 94,170,192, 77,183,142, 17, 79,159,156,211, 23, 78,131,197,104, 80,168,220, 57,
+244,182,109,219, 2, 70,176,246,236,217, 3, 81, 20,161, 86,171,241,214, 91,111, 5, 20,149, 13,129, 28, 29, 10,102, 98, 56,142,
+ 11,120, 31,145, 77,134,220, 1,187,247,240,127,255,247,127,120,250,233,167, 61,182,225, 52, 25, 1,163, 98,238,198,197, 59,125,
+205,154, 55, 71, 97, 65,129,199,180, 80, 58,139,119, 56, 28, 16, 69, 17,239,191,255, 62,134, 15, 31,142,141, 27, 55, 6,252,189,
+237,182,219,192,113, 92,192,104,173,156,206,222,189,123,195,106,181,186,210,124,252,248,113,159,186,139, 23, 7,174,222, 41, 87,
+104,239,210,165,139,126,192,128, 1,216,177, 99, 7,238,190,251,110,179,213,106, 61, 9, 0,183,223,126,123,235, 69,139, 22, 41,
+ 15, 30, 60,136,184,184, 56,241,226,197,139, 31, 18, 66, 88,197,119, 70,131,226,203,139, 56, 81,101,103,103,207,245, 50, 70, 30,
+200,243, 9, 33, 27,231,205,155, 55,220,169, 87,103,220,185,184,123,223,167, 55,101,101,101,101,186,141, 23,185,155, 39,183,180,
+249,221,182,215,242, 69,128,155,193,114,102,232,102,121,156,227, 56,200, 55,221, 96,230,202,223,155,162, 55, 81, 81, 81,195,238,
+186,235, 46,151,185, 49,153, 76, 46, 99, 37,155, 43,121,252,196,137, 19,232,214,173,155, 34, 42, 42,106, 24, 2, 27, 44, 0,128,
+ 32, 8, 72, 78, 78, 70,113,113, 49, 14, 31, 62,140,102,205,154,193,102,179, 97,211,166, 77,168,168,168,128, 40,138, 80, 40, 20,
+176, 90, 3, 87, 73,104,219,182,237,109,203,151, 47,239,182,108,217,178, 50,249, 13,238,211, 79, 63, 5,165, 20,241,241,241, 48,
+ 24, 12, 40, 40, 40,192,214,173, 91, 97,183,219,161,211,233,144,158,158,174, 28, 49, 98, 68,223,215, 94,123, 77, 4, 48,195,143,
+116,143,187,239,190, 91,175,215,235,241,212, 83, 79, 81,171,213,250, 6, 33,164,231,168, 81,163, 94,154, 60,121,114,236,249,243,
+231, 45,143, 62,250,232, 1,171,213, 58,223,121, 60, 68, 74,169,205,143, 22,128,192,145, 43,155,205, 38,239,211,115,213,213,213,
+104,212,168, 81,179, 32,117,180, 0, 64,177,107,215,174,222, 0,248, 89,179,102, 69, 0, 40,128,155,185,178, 88, 44,168,174,174,
+ 70, 77, 77,141,173,162,162,162,240,249,231,159,183,175, 88,177,130,119,174,243, 43,124, 24, 44,224, 86, 75,251,246, 90, 37,165,
+252,180, 37, 75,150,232,134, 14, 29,202,233,116, 58, 84, 85, 85,233,255,251,205, 55,186, 65, 3,250,166,207,205,254,231,183,250,
+212,142, 5,187,126, 58,139,220,252, 10, 88,108, 54,164, 39, 69, 1,144, 88,133,218,223, 1,231, 7, 42,174, 8,150,187,153,216,
+177, 99, 7,110,189,245, 86,215,181,174, 80, 40, 60, 34, 93,193, 52, 5, 65,192,173,183,222, 90, 39,162,179,109,219, 54,159,209,
+166, 96,184,155, 33,111, 83,228,203,120,113, 28, 87,167,126,146, 47, 77,127, 69,151, 0,234,204, 11,197, 96,201,249,157, 60,121,
+ 50, 68, 81,196, 11, 47,188, 0, 65, 16,208,185,115,103, 8,130,128, 94,189,122, 65, 20, 69, 12, 28, 56,176,222,121,223,187,119,
+ 47,186,116,233,226, 74, 83,231,206,157,209,189,123,119, 8,130,128,126,253,250, 65, 20, 69, 12, 25, 50, 36, 20,205,151,170,170,
+170, 58,233,116, 58,156, 56,113, 2, 60,207,131, 16,114,138, 82,218, 9, 0, 38, 76,152,112,218, 96, 48,180, 48,153, 76,152, 48,
+ 97, 2,177, 88, 44, 29, 95,120,225,133,105, 0,152,193, 98, 52, 24,222, 94,196, 13,227,212,169, 83, 95, 34,132,108,148, 35, 82,
+206,229, 55,122,173,191,209,199,186, 30,243,157, 38, 72, 46, 30,236, 14, 79,243, 38, 23, 29,222, 30, 96, 93,139,151,161,242, 46,
+ 34,252, 1, 8, 18,193,146,111,186,161, 26,172, 96,152, 76,166, 27, 18, 18, 18,228,255,117,204,149,251,175,197, 98, 65, 90, 90,
+ 26, 76, 38,211, 13,250, 58,137,232, 0, 0, 32, 0, 73, 68, 65, 84, 65,133, 61,119, 0,146,146,146, 96,181, 90,241,193, 7, 31,
+ 64,161, 80, 64,161,248,205, 87, 88, 44,129,131, 67, 71,143, 30, 61,183,119,239,222, 46, 93,187,118,141,249,252,243,207,139,250,
+247,239, 31, 63,116,232, 80,168,213,106, 24,141, 70,216,108, 54,244,236,217, 19,109,219,182, 69, 78, 78, 14,254,251,223,255, 22,
+103,100,100, 52,218,183,111,159,148,159,159,127, 33,128,244,160, 65,131, 6,129, 16,130,255,254,247,191, 37,148,210,131,106,181,
+250,243,185,115,231, 70, 91, 44, 22,233,129, 7, 30,184, 84, 90, 90,250, 60, 0,155, 74,165,122, 99,232,208,161, 61,120,158, 95,
+229,112, 56,222,174, 79,254,129,186,251,182,166,166, 6, 17, 17, 17,161, 52, 9, 33,150,150,150,118, 0, 0,173, 86, 27, 11,224,
+180, 60,195,104, 52,122,152, 96,139,197, 98,138,141,141,213, 2,128,115, 29,239,186, 95, 0, 0, 66, 72,188, 70,163, 89,123,225,
+194,217, 72,247,250,113,209,209,209,184,111,220, 56,174, 79,239,222,202, 78, 55,220, 48,228,229,127, 47, 91,149, 28,167,183,164,
+ 39,199,193,230,176, 97,203,183,155, 36, 42,217,190,173,111,222, 25,245,199,189,136,208, 59,130, 37,138, 34,182,111,223, 94,103,
+154, 66,161,192,123,239,189, 23, 80, 87, 54, 4,178,153,242, 87, 68,230, 85,164, 21,240, 70, 34, 71,213,121,158,199,251,239,191,
+ 15, 73,146,240,204, 51,207,120, 20, 27,186,235,135,130,187,249,107,251,170, 4,192,130,156, 55, 85,174,245,189,211,235, 92, 39,
+164,168,216,162, 69,139, 66,138, 96,221,126,251,237, 65, 13,171,123,137,130,123,186,126,252,241, 71,159,186, 75,150, 44, 9,186,
+ 63, 29, 14, 7,190,250,234, 43,151, 57,149,153, 62,125,250,132,212,212,212,196,239,191,255, 30,249,249,249,168,169,169, 65,117,
+117, 53,122,246,236,153, 62,120,240,224,159,242,243,243,207, 31, 61,122,244,174,144,118, 48,131, 81, 15, 2, 68,176,204,243,230,
+205, 59, 50,111,222, 60,159, 17, 42,183,245,135, 7, 50, 89,110, 81,168,238,168, 53, 66,241,178,105, 67,109,245,153, 31, 66, 88,
+ 87,233, 93, 68,232,107,121,239, 8,214,107,110,227,174,155,110, 40,197,132, 33,134,205, 5, 66, 8, 76, 38,147, 79, 99,229,110,
+ 10,172, 86, 43, 74, 75, 75,225,112, 56,174,184,173, 46, 95,111,174,193, 12,214,225,195,135, 31,122,248,225,135,243,162,162,162,
+ 58, 21, 21, 21, 21, 74,146, 52,112,207,158, 61,241,130, 32, 64,175,215, 67,175,215,227,235,175,191,134, 70,163,193,228,201,147,
+ 11, 29, 14,199,142,200,200,200, 56,163,209,248,115,126,126,254,203,254,116, 69, 81, 28,116,211, 77, 55,225,224,193,131, 40, 47,
+ 47,255,142, 16,210,233,145, 71, 30,185,165, 73,147, 38,100,206,156, 57,166,211,167, 79,255, 31,128, 34,173, 86,251,193,242,229,
+203,251,119,237,218, 85,119,255,253,247,131, 16,242, 31, 74,169, 41,212, 60,215,212,212,120, 24,171,202,202, 74, 84, 85, 85, 65,
+171,213,134,212,236, 5,165, 84, 68,109, 93, 42,185, 62,149,235,216, 56,163, 87,242,241,161,130, 32,208,218, 69,168, 79,115, 5,
+ 0, 90,173,118,214,178,101,203,212,222, 31, 31, 56, 28, 14, 20, 20, 20, 64,175,215, 99,250,203, 47, 43,102, 62,251, 72, 23, 94,
+151,184,135,227, 8, 44, 86, 90, 78, 37,203,166,154,130,123,190, 15, 53,223,140,171, 67, 54, 4,119,222,121,103,157, 98, 65,133,
+ 66,129,205,155, 55, 99,228,200,145,174, 23,150,174, 93,187, 6,125,169,146, 13,193, 29,119,220, 1,160, 54, 18,180,105,211, 38,
+159,197,123,114, 4, 42, 16,238,198,133,231,121, 60,249,228,147, 16, 4, 1,111,191,253, 54,166, 76,153, 2,142,227,240,230,155,
+111,130,227, 56,188,242,202, 43, 33,229,219,219,184,156,255,103,237,111,234,148, 74,148, 44, 78, 4, 0, 68,234,245,114,134, 66,
+210,148,243, 46, 8,130, 43,114,117,195, 13, 55, 64, 20, 69,244,234,213, 11,130, 32,184, 34, 87,195,134, 13,115,223,143, 1, 55,
+ 32,107, 10,130,128,147, 39, 79,186,210,220,171, 87, 47,143,200,149, 32, 8,184,253,246, 58, 47,223,190,152, 27, 29, 29,253, 90,
+219,182,109,219,205,159, 63, 95,228,121, 30,131, 6, 13,106,253,232,163,143, 94,136,139,139,139,155, 53,107,150,198,199, 58,106,
+ 0,157,218,181,107,167, 13,121,103, 48, 24,245,192,219,139,184, 17,227, 94,167,170, 30,122, 27,221,151,151, 53,188, 77,145, 51,
+ 34,182, 35,152,150,175,117,253, 33, 56, 23,246,121,167,172,143,193,114,134,151, 3,110, 76,163,209,252, 82, 88, 88,216, 75,173,
+ 86,123,152, 43, 95, 70,139,231,121,228,231,231, 67,163,209,212,171,157,169, 96, 4, 43, 34,116,154,153,103,229,113, 66,200,224,
+ 97,195,134,125,188,121,243,230,164, 45, 91,182, 96,223,190,125,136,143,143,199,162, 69,139, 46, 23, 20, 20, 60, 68, 41,221, 28,
+202,118, 91,180,104,209, 94,171,213, 98,247,238,221, 0,240, 61,128, 7,159,120,226, 9, 98,183,219,241,206, 59,239, 24, 0,108,
+142,138,138,250,108,221,186,117, 55,116,236,216, 81,185,101,203,150,170,125,251,246,109, 11,209, 92, 57, 36, 73,170, 99,172,220,
+247,105,100,100,100, 40, 17, 44, 91, 84, 84,212,225,202,202,202, 49, 70,163,177, 82,165, 82, 69, 86, 86, 86,154,221,141,149,172,
+ 47, 8,130,120,242,228,201, 60, 0,233, 81, 81, 81,135,225, 86,148,232,142, 32, 8,131, 6, 13, 26,228, 97,146,173, 86, 43, 10,
+ 10, 10,144,159,159, 15,171,213,138,174, 93,187, 18,158,216,248,210,139, 63, 79, 8, 33,141,140, 48, 67, 8,161,242,181, 46,127,
+245,231, 61, 8,130,128, 77,155, 54,185,198, 57,142,131,243,179,125,127,154, 46, 51,180,121,243,102,191, 81, 43, 31, 69,132, 65,
+ 67,225,242,242,239,188,243, 78,109,119, 20,206,200, 21,199,113,152, 58,117, 42, 84, 42, 21,230,204,153,131,169, 83,167, 66, 16,
+132,160, 69,132,238,198,165,249, 11, 6,215,116,185,136,208,230,172,239, 68, 8,113, 55, 89, 1, 35, 88,238,166, 45, 80,244, 46,
+148,200,191,187,166,188, 94, 68, 68,132,207, 98, 82, 31,154,126, 55, 64, 41,253,146, 16,114, 54, 41, 41,105, 87,175, 94,189,162,
+ 14, 28, 56,128, 55,223,124, 83, 97, 54,155,155,110,217,178,197,181, 93, 95,251,171,166,166, 70, 29, 82,194, 25,140,122, 16, 40,
+ 50, 12,103,189, 40,249, 63, 0,226, 94, 92, 23,224,215,123,121,184, 77,115,215, 45,130,231,115,204,125,186,183,169,242,222,134,
+251, 50,174,186, 93, 1,155,105,168, 79, 37,247, 80, 34, 88, 6,131,225,127,223,124,243, 77,247,113,227,198, 9,129,138, 7,107,
+106,106,144,152,152,136, 35, 71,142,216, 13, 6,195,255,130,233, 58, 28,161, 55,136, 30,204, 96,121, 67, 41,221,210,184,113, 99,
+222,102,179,161, 85,171, 86, 72, 73, 73,129,201,100, 66,121,121, 57, 31,170,185, 34,132, 40,186,117,235,198, 3, 64, 89, 89, 25,
+ 80,251, 57,105, 70, 70, 70, 6, 14, 30, 60,136,178,178,178,245, 0, 6,207,156, 57,179,115,143, 30, 61, 20,171, 86,173, 50, 76,
+156, 56,113,189,205,102,155, 19,138,190, 36, 73, 22,187,221,158,198,113,156,181,188,188, 60,215,125,127, 38, 38, 38,198,106,181,
+ 90, 82, 80, 80, 16,176, 62,151, 19, 91,167, 78,157,246, 95,188,120, 17,179,102,205, 42,154, 59,119,110, 70, 85, 85, 85, 89, 69,
+ 69,133,221,221,100,153, 76, 38,174, 81,163, 70,170,197,139, 23,171, 1,160, 83,167, 78,251,225,199, 96,213,212,212, 52,209,104,
+126,123, 17, 54,155,205,200,207,207, 71,126,126, 62, 10, 10, 10, 80, 85, 85,133,244,244,116, 24, 12,134,102,161,228,149, 17,126,
+188,191,122,115,191,190,221, 31,224,245,185,214,129,223,140,203,157,119,222,233,170,187, 37, 71,196,228, 97,237,218,181,238,197,
+131, 64,136, 6,235,157,119,222,193,147, 79, 62,137,136,136, 8,204,159, 63,223,163,136,208,219, 20, 72,146, 20,212, 12, 9,130,
+128,180, 23,141,200, 95, 24, 11, 81, 20, 17, 55,177,192,163, 40,206,135,209, 8, 41,157,115,231,206, 13, 75, 17,161,187,102,179,
+102,205, 0, 0,239,191,255, 62,198,140, 25,131,239,191,255,254,138,139, 8, 51, 51, 51, 63,221,184,113, 99,212,209,163, 71, 81,
+ 89, 89,137,162,162, 34,152,205,102,228,228,228, 0,240, 93, 10, 0, 0, 6,131, 33, 34,104, 98, 25,140,240,226,183,232,174,129,
+116,175,122,123, 1,139,223,220, 43,127, 6, 51, 88,161, 68,176,204,102,243,252,167,158,122,234,137,193,131, 7,199, 70, 70, 70,
+ 34, 47, 47,175,142,185,170,174,174,134, 78,167,131,209,104,196,134, 13, 27, 42,205,102,243,252, 32,121,176,217,108, 54, 36, 36,
+ 36,160,184,184, 24,146,159,122,209, 28,199, 65,173, 86,163,186,186, 26,240, 99, 6,252, 65, 41,133,213,106,133,205,102,131,205,
+102,131,213,106, 13,250, 86,236,133, 90,110,176,181,166,166, 6, 0,106,146,147,147, 91, 68, 68, 68,224,220,185,115, 0,112, 18,
+192,128,161, 67,135,138, 37, 37, 37,244,209, 71, 31,221, 67, 41,157, 76, 3,183,102,111,217,177, 99, 71, 26, 0,168,213,234, 19,
+ 0,144,147,147, 99, 43, 47, 47,247,136, 12,106, 52, 26, 58,114,228,200, 36, 74, 41,118,236,216,145,166, 80, 40, 40,252,180, 89,
+ 5,192,180,126,253,250,163, 81, 81, 81, 43,178,179,179,199, 13, 31, 62,252, 72,135, 14, 29,210,106,106,106, 10,141, 70,163,209,
+100, 50, 81,158,231, 21, 49, 49, 49, 17,223,126,251,237,233, 61,123,246, 12,214,235,245, 43,214,175, 95,127, 20,128,207, 72,155,
+ 86,171,205, 49, 24, 12,205,229, 99,234,110,174,242,243,243, 65, 41,197,217,179,103,161,209,104, 46,214,103,135, 50,194,139,252,
+ 50,229, 29,105,241,158, 22,170,185,146, 17, 4, 1,223,126,251,173,223, 40, 78,125, 12,155,187, 25,154, 50,101, 10, 22, 46, 92,
+ 88, 39,130, 53,103, 78,237, 59,201,203, 47,191, 28,114, 29, 44,160, 54, 90,149,191, 48, 22,141,159, 44,245, 72, 59, 0, 16, 57,
+125,245,108,146, 77, 16, 4,204,154, 53,171, 78,229,115,247, 34,188, 16,139,242, 60,210, 89, 88, 88, 8, 65, 16, 16, 27, 27,139,
+251,238,187, 15, 67,134, 12,113, 21, 53,214, 87,247,216,177, 99,187, 94,124,241,197,142,153,153,153,152, 61,123,118,105,116,116,
+116,228, 63,254,241, 15,161,188,188,188, 54,156,232, 39,130,197, 12, 22,131, 17,156,128, 17, 44, 0, 33,153, 43,127, 55, 94, 66,
+200, 96,247,182, 50, 40,165, 21,132,144,251,110,185,229,150,207, 87,175, 94,173,110,209,162, 5,142, 29, 59,134,210,210, 82, 88,
+ 44, 22, 40, 20, 10, 36, 37, 37,161,188,188, 28, 31,125,244,145,209, 96, 48,220, 71, 41,173, 8,164, 9, 96, 90,183,110,221,222,
+125,227,141, 55, 34, 58,119,238,140,210,210, 82, 84, 87, 87,123,180, 58,173,215,235,161, 86,171,177,127,255,126,108,218,180,201,
+ 8, 96, 90, 16,205, 58,200,198, 74, 54, 90,193, 12,150,151,166, 86,142,226, 24, 12, 6, 0,176, 55,109,218, 52, 17, 0,206,158,
+ 61, 11, 0, 23,210,211,211, 95,110,217,178, 37, 89,190,124, 57,165,148,110,241,101,174,188, 52, 75,251,245,235, 87, 6,160,177,
+197, 98, 81, 0, 64, 69, 69,133,181, 81,163, 70, 9, 42,149, 74, 82,171,213, 82, 68, 68,132,148,151,151,103,183,219,237, 10, 0,
+232,215,175,159, 5, 64, 62,220,234,122,120,105, 74, 0, 42,151, 44, 89,242,218,253,247,223,223,171,119,239,222,153,143, 63,254,
+248,225, 71, 31,125,148, 75, 73, 73,137,169,170,170, 50,157, 58,117,170,236,223,255,254,119,213,222,189,123, 7,139,162,120, 97,
+201,146, 37,175, 1,168,116,174, 91, 71,211,110,183,255,111,203,150, 45, 15, 13, 31, 62, 92,200,205,205, 69, 65, 65,129,203, 92,
+ 21, 20, 20,160,109,219,182,216,179,103,143,195,106,181, 6,220,255,161, 28,163,250,194, 52,107, 53,229,230, 1, 2, 25, 43,249,
+ 37, 42, 84, 77,119, 51, 52,102,204, 24,143,168,149, 66,161,192,186,117,235,124,222, 55,188,175, 43,239,188, 19,183, 54,186, 94,
+124,241, 69, 15,179, 54,125,250,116,191, 73, 11,164, 41,231, 93, 20, 69, 84,188,159,226,249, 21,161,159,235, 60, 80, 58,229,123,
+167, 40,138,152, 62,125,122,200, 17, 44,120,213,193,242,165, 41,231,189,127,255,254, 48, 24, 12, 46, 3,235, 47,130, 21,108,127,
+ 58, 28,142, 39, 23, 46, 92, 72,245,122,125,143,202,202,202,191, 93,188,120,113,169,193, 96,184,177,162,162,194,103, 62,101,204,
+102,179, 42,208,254,188, 90,152,230, 95, 83,243,122, 35,224, 43,158,221,110, 71,147, 38, 77, 92, 23, 55, 33, 4, 28,199,121, 12,
+245,169, 71, 0, 0,148,210,111, 9, 33,163,250,244,233,243,201,147, 79, 62, 25,217,185,115,103,177,121,243,230,168,169,169,193,
+185,115,231,112,228,200, 17,251,250,245,235, 43, 13, 6,195,223, 40,165, 65,191, 34,163,148, 46, 35,132,108, 26, 58,116,232, 43,
+ 61,123,246,124,236,213, 87, 95,229, 91,183,110,141,138,138, 10,196,196,196, 32, 33, 33, 1,199,143, 31,199,134, 13, 27, 28,197,
+197,197,239, 2,152, 73, 41, 45, 10,166,235,189, 25,171,213,138,123,239,189, 23,146, 36,225,173,183,222,114,111, 16, 45, 20,172,
+ 86,171,149, 2, 32,197,197,197, 0, 96,144, 13,215,169, 83,167, 0,224, 98,243,230,205,117, 0,176,101,203, 22, 2, 96,119,168,
+233,130, 91, 36,171,109,219,182,231,128,186,221,143,200,243, 81, 27,185, 10,150,110,211,216,177, 99, 11, 13, 6,195,208, 41, 83,
+166,188,242,206, 59,239,140,123,231,157,119,234, 44,164,215,235, 87,188,249,230,155, 51,199,142, 29, 91, 8, 63,209, 43, 0,168,
+169,169,121,249,239,127,255,251,216, 95,126,249, 37, 50, 34, 34, 2, 53, 53, 53, 40, 41, 41,129,213,106, 69,122,122, 58, 10, 11,
+ 11,177,108,217,178, 42,163,209, 56, 35,196, 60, 51,194,140,187, 33,240, 23,197, 10,102,174,252, 33, 8, 2,190,252,242,203, 58,
+ 81,171, 80, 42,181,251, 75,167,175,186, 71,129,162, 96,129, 94,134,228,230,101,188,235,131,137, 98,104,109,251, 5,210, 21, 4,
+ 1,255,250,215,191, 32, 8,130,223,200, 85,125, 34, 88,178,102,108,108, 44, 0, 64,238,218,232,246,219,111,191, 98, 93, 90,219,
+109,152,171,251, 27, 66,200,220,231,159,127,254,181,182,109,219,182, 6,160,114,223, 7,245,140,218, 51, 24,127,121,252, 26, 44,
+135,195,145,211,166, 77, 27, 0,240, 48, 88, 50,190,166,217,108,182,156, 80, 54, 74, 41,221, 68, 8, 73,127,243,205, 55,159,210,
+106,181,131, 13, 6, 67, 71,160,182, 18,124, 77, 77,205, 22,179,217,188,128,214,163,115,102,167, 97,154, 68, 8,121,107,232,208,
+161,115, 6, 14, 28, 56,250,217,103,159, 37,148, 82, 44, 94,188,152,158, 57,115,102, 45,128,105,148,210, 51,161,106,186, 19, 27,
+ 27,123,244,163,143, 62, 74,252,252,243,207, 97,179,217,176, 96,193, 2, 68, 70, 70, 30,173, 79,250, 4, 65,248,164,119,239,222,
+227,246,236,217,179,130, 82,122, 88,165, 82,125,218,175, 95,191,251,118,239,222,189,154, 82,250,171, 32, 8,159,246,234,213,235,
+190,253,251,247,127, 70, 41,253,185, 30,201,115, 69,178,236,118,223, 37,138,190, 34, 87, 65,168,124,248,225,135,173, 15, 63,252,
+240,179, 99,199,142,253,224,135, 31,126,184,177,188,188,188, 35, 0, 68, 71, 71,255,210,189,123,247,253,171, 87,175, 62,142,218,
+200, 85,192, 74,248,148,210, 34, 66,200,200,142, 29, 59,126, 54,123,246,108,109,102,102,166,208,170, 85, 43,156, 63,127, 30,135,
+ 15, 31,182,127,248,225,135,213, 70,163,241, 78, 74,105, 40,125, 36, 50, 26, 0, 57,218, 20, 29, 29,237,241,242, 36,127,186, 95,
+223, 98, 65, 25, 89,211,251,197,140,231,121,191,154, 65, 42,185, 2, 0,116, 58,157,171, 81,210, 80,170, 38, 72,254,234, 13,184,
+165, 83,214,148,135, 16,204, 85,208, 47,254,156, 93,213,132,172, 25, 74, 51, 13, 90,173, 22, 54,155,205,165, 27,194,151,156,245,
+114,137,148,210, 47, 1,124,217,170, 85,171, 83, 0, 90, 50, 83,197, 96, 92, 57,126, 13, 86,105,105,169,207, 94,221,195,133,211,
+ 64,205,116, 14,225,210, 60, 3, 96, 44, 33,228,141,239,190,251, 78, 46, 47,152, 69,131,244,103, 24,140, 99,199,142, 13, 23, 69,
+241,189, 21, 43, 86,244,164,148, 34, 42, 42,106,239,249,243,231,255, 81, 31, 13,187,221,254, 24, 33,228, 25,249,171, 64,179,217,
+252, 24, 33,228, 57, 74,105,141,219,124,215,120, 61,161, 0,204,148,210,100, 63,243,205, 8,221, 92,201,152, 0, 88, 86,175, 94,
+ 93, 13,224, 39,252,214,206,149,205, 57,152,224, 86, 44, 24, 48,113,148,110, 37,132,180,154, 62,125,250, 92,158,231, 7,213,212,
+212,164,104,181,218, 75,118,187,253,127, 6,131, 97, 26,165,180,164,158,105, 99,132, 17,139,197,146,219,166, 77, 27,185,219, 44,
+248,250,245, 69,160, 23, 42,135,195,145,147,145,145, 17,244,165,204,135,102,174,191,121,148,210, 11,233,233,233, 92,168, 90, 50,
+ 86,171,181, 48, 80, 58,211,211,211, 67, 78,159, 91, 58, 3,230, 61, 45, 45,205,103,222, 3, 33, 73,146,223,188,219,237,246, 43,
+210, 12,180, 63, 3, 97, 52, 26,203,226,227,227,171, 77, 38,147,104, 54,155, 69,187,221,238, 17,110, 84,171,213,245, 45, 5, 96,
+ 48,254,114, 92,113, 27, 83,215, 50, 78, 67,117, 71, 24,245,204, 0, 30, 8,131,142,201,107,188, 38,208,120, 61,105,136, 8,144,
+ 4,192, 16,116,169, 16,160,148, 22, 3,120, 52, 28, 90,140,240, 82, 92, 92,220, 35,220,154, 37, 37, 37, 97,127, 65, 43, 42, 42,
+234, 21,110,205,226,226,226,176,167,243,207,162, 25,136,220,220,220,176,159, 19, 12,198, 95,141, 43,139,253, 51, 24, 12, 6,131,
+193, 96, 48,252, 66, 0, 12,246, 53,163, 62, 95, 7, 16, 66,124,106, 4, 34,152, 62,211,100,154, 76,147,105, 50, 77,166,201, 52,
+175, 63,205, 96,218,215,205,215,137,148,210, 6, 27, 0, 12,102,154, 76,147,105, 50, 77,166,201, 52,153, 38,211,252,171, 13,172,
+136,144,193, 96, 48, 24, 12, 6, 35,204, 48,131,197, 96, 48, 24, 12, 6,131, 17,102,152,193, 98, 48, 24, 12, 63, 16, 66, 98,174,
+101, 61, 6,131,113,237,194, 12, 22,131,193, 96,248,128, 16,210, 1,192,236, 48,203,206,118,234, 50, 24,215, 61,132,144, 14,132,
+144,142,127,116, 58,254, 40,152,193, 98, 48, 24, 12, 47, 8, 33,195, 90,180,104, 49, 11,128, 46,204,210,186, 22, 45, 90,204, 34,
+132, 12, 11,179, 46,131,113, 77, 64, 8, 81, 17, 66, 30,224, 56,110,127,135, 14, 29,126,201,204,204,252,153,227,184, 61,132,144,
+ 49,132,144,235,178,237, 77,127, 16,231,215, 0, 32,132,108, 7, 0, 74,105,255, 63, 48, 61, 12, 6,131,241,135,225,124, 0, 60,
+ 54,110,220,184, 59,178,179,179,149, 77,154, 52,185, 68, 41,189, 63,140,250,203, 47, 93,186,148,250,224,131, 15, 86,111,221,186,
+245, 91, 0,239, 82, 31, 29,187, 51, 24,127, 54, 8, 33,205, 1, 60,166,211,233, 30,185,249,230,155, 99,238,188,243, 78,196,197,
+197,193,110,183,227,210,165, 75,216,184,113, 35,118,239,222,157,103,177, 88, 22, 2,120,159, 82, 90,238, 71,103, 59,112,125,120,
+ 17, 66, 41,149, 59, 46,190, 25, 0, 40,165,219,255,216, 36, 49, 24, 12,198,239, 15, 33, 68, 15, 32,107,254,252,249, 61, 31,123,
+236,177, 52,147,201,148, 19, 19, 19,115, 54,220, 6,203,106,181, 14, 46, 42, 42, 58, 48,103,206, 28, 44, 94,188,248, 87, 0,243,
+104, 61,250, 94,101, 48,174, 53, 8, 33, 83, 71,141, 26, 53, 39, 49, 49,145,235,208,161, 3,146,146,146, 96, 54,155, 97, 52, 26,
+ 65, 41,133, 32, 8,160,148,162,162,162, 2, 59,118,236,192,214,173, 91,205,101,101,101, 31, 1, 88, 64, 41, 61,233,166,115, 93,
+121, 17,151,193,162,245,236, 20,148,193, 96, 48,174, 23, 8, 33,105,106,181,122,250,134, 13, 27,218,247,237,219, 55,161,170,170,
+234,172,205,102,171, 73, 78, 78,166,168,237,212,220, 23, 21,148,210,201, 62,180, 22, 1,136,242,179,142,222,106,181,118, 47, 46,
+ 46, 62, 0, 0,235,214,173, 67, 86, 86, 86,137,209,104,156, 69, 41, 61, 23,158,220, 48, 24,191, 47,132,144, 19,199,142, 29,203,
+112, 56, 28, 40, 46, 46,134,217,108,134,193, 96,112, 25, 44,158,231, 65, 41,133,221, 94, 27,172,149, 36, 9, 7, 15, 30,196,150,
+ 45, 91,232,217,179,103, 95,165,148,206,114,234, 92, 87, 94,132, 25, 44, 6,131,241,151,134, 16,210,167,113,227,198,207,124,247,
+221,119,205,155, 53,107,166,175,174,174, 62,109,183,219,109, 0, 16, 19, 19,147,201,243,188,202,123, 29,135,195, 97,142,136,136,
+216,233, 43,186, 69, 8, 89,110, 50,153,250,250, 90,207,185,174,189,172,172,236, 39,121,252,231,159,127,198, 35,143, 60, 98,205,
+207,207,159, 79, 41,221, 21,206,188, 49, 24,191, 7,132,144, 19, 63,253,244, 83,198,202,149, 43,209,165, 75, 23,180,107,215, 14,
+213,213,213, 46,179,101,177, 88, 96,179,217,234,172, 87, 89, 89,137,103,158,121,230, 36,165,180,181, 83,231,186,242, 34,114,133,
+179,215,174,167,114, 79, 6,131,193,168, 47,249,249,249,197,209,209,209,151, 37, 73,162,242,180,178,178,178, 35, 87,162,117,165,
+235, 49, 24,127, 82,108, 22,139, 5,221,186,117,195,185,115,231,112,240,224, 65,151,209, 42, 46, 46, 70, 94, 94,158,199,194,251,
+247,239,199,161, 67,135,112,211, 77, 55,121,235, 92, 87, 94,196,189,146,123,127,224,250, 40,247,100, 48, 24,140,250, 32, 23, 17,
+206,155, 55, 47,238,238,187,239,118, 77,111,136, 34,194,188,188, 60,215, 27, 58, 43, 34,100, 92, 15, 16, 66, 70, 38, 39, 39,127,
+248,196, 19, 79, 68,245,236,217, 19, 57, 57, 57,200,205,205, 69, 89, 89, 25, 58,119,238,140,204,204, 76,156, 57,115, 6,155, 54,
+109,194,161, 67,135,160, 82,169,144,154,154, 10,221,138,149,120,143,224, 40,165, 52,211, 77,171, 63,112,125,120, 17,151,193, 98,
+ 48, 24,140,191, 50,114, 37,247,137, 19, 39,182,155, 54,109, 26, 8, 33, 72, 78, 78,174, 8,119, 37,247,188,188,188, 40, 74, 41,
+ 88, 37,119,198,245, 4, 33, 36, 18,192,243,233,233,233,207, 77,156, 56, 81,213,190,125,123,228,228,228,160,168,168, 8,101,101,
+101,216,187,119, 47, 0, 32, 37, 37, 5, 41, 41, 41, 56,126,252, 56,118,237,218, 85, 89, 93, 93,253, 48,165,244,243, 63, 54,245,
+ 13, 3, 51, 88, 12, 6,131,225, 68,110,166, 97,192,128, 1, 67, 22, 47, 94,140,140,140,140,176, 27,172,147, 39, 79, 70, 77,156,
+ 56, 17,172,153, 6,198,245, 8, 33, 36, 1,192,203,237,219,183,127,236,145, 71, 30, 17,154, 53,107,134,220,220, 92,124,247,221,
+119,104,217,178, 37, 46, 93,186,132,173, 91,183, 90,138,138,138,222, 2,144, 77, 41,173,248,163,211,220, 80, 52,104, 67,163,132,
+144,193, 76,147,105, 50, 77,166,249,103,209,164,148,218, 41,165,111,111,221,186,245,221, 97,195,134, 73,225,208,244,102,216,176,
+ 97,210,214,173, 91,223,165,148,190, 29,200, 92, 93, 15,251,147,105,254,245, 52, 41,165,133,148,210,201, 71,143, 30,109,245,244,
+211, 79,127, 50,123,246,108, 73,146, 36, 36, 36, 36, 96,205,154, 53,210,170, 85,171, 62, 44, 42, 42,106, 65, 41,157,122, 61,155,
+ 43,224,183, 74,238, 12, 6,131,193,112, 66, 41,253,154, 16,146, 3,224,177, 48, 75, 87,159, 57,115,230, 95,148,210,195, 97,214,
+101, 48,174, 41, 40,165,231, 1,220, 79, 8,249,231,193,131, 7,167, 1,160, 0,102, 83, 74,127,253,131,147,246,187,193, 12, 22,
+131,193, 96,248,128, 82,122,152, 16,242,114,152,101, 95,166,148,150,133, 89,147,193,184,102,161,148, 30, 1,112,207, 31,157,142,
+ 63, 2,214, 23, 33,131,193, 96,248, 33,220,102,136,153, 43, 6,227,175, 3, 51, 88, 12, 6,131,193, 96, 48, 24, 97,134, 25, 44,
+ 6,131,193, 96, 48, 24,140, 48, 67, 0,248,251, 18, 96, 75,200, 34, 87,240,133, 66, 48,125,166,201, 52,153, 38,211,100,154, 76,
+147,105, 94,127,154,193,180,235,227, 63,174,105, 40,165, 65, 7, 56,219,203,170,239, 0, 96,240,149,172,199, 52,153, 38,211,100,
+154, 76,243,207,171,137,218,151,119,130,218, 82, 18, 78, 30,191,214,210,233,157,230,107, 53,239,127, 21,205,235,109, 8,248, 21,
+ 33, 33,196,181,147, 8, 33, 18, 0,137, 58,247,226,213, 64, 8,145, 15, 64, 88,244, 24,225,199,121,140,228, 46, 61, 40, 59, 78,
+ 12, 6, 35, 20,220,238, 29, 60,126,123,200, 58, 0, 56, 8, 33,184,214,238, 37,225,124,206, 53, 68,222,255,202,154,127,118,124,
+ 26, 44,121, 71,241, 60,255,109,163, 70,141, 6, 20, 23, 23, 75,206,233, 80, 42,149,224, 56, 14,162, 40, 26,171,170,170,244,245,
+221, 32, 33,228, 63,137,137,137, 15,150,148,148, 72, 28,199, 33, 34, 34, 2,132, 16,151,102,121,121,121,189, 53,195, 77,243,230,
+205,203,140, 70,163,206,123,122, 68, 68,132,233,194,133, 11,145,127, 68,154,126, 79, 8, 33, 68,161, 80,140,138,141,141,141, 46,
+ 42, 42,162, 28,199, 65,161, 80,128,231,121, 56,255,219,203,203,203, 63, 14, 85, 47, 54, 54,118,127,108,108,108,180,188, 62, 33,
+ 4, 37, 37, 37,229, 5, 5, 5, 55, 2,128, 90,173,222,165,213,106,227, 4, 65, 0,207,243,224,121, 30, 6,131,161,164,184,184,
+184, 79,131,101,146,209,160,172, 93,187,150, 31,154, 50,190,165, 64,141,157, 56,142, 70, 73, 18,169,176, 19,245,207,155,114,255,
+115, 58,148,245, 71,143, 30,237,104,232, 52, 6,130, 16,210, 7, 0, 40,165,187,194,164,231,222, 63,161, 9, 64, 49,128,211, 0,
+214, 80, 74,141,225,216,198,213,160, 82,169,222, 74, 76, 76,124,164,186,186,218, 64, 8,161,132, 16,212, 62, 6, 80,231,215,225,
+112,228, 20, 23, 23,119,243,165,227,246,144, 21,149, 74,229,155,141, 27, 55,254,187,193, 96, 48, 56,245, 40, 33, 4, 73, 73, 73,
+ 30,122, 0, 96,179,217,114,138,138,138,124,106,122,147,144,144,176, 68,173, 86,255,205, 96, 48,212, 56, 13,145, 11,175,135,248,
+153,162,162,162,126,254,116,228,180, 42,149,202, 5,137,137,137, 15, 57,243, 14, 66, 8,141,143,143,191,234,188, 39, 38, 38,254,
+189,166,166,198, 35,239, 9, 9, 9, 62, 53,253,229,221,151,166,123, 58, 9, 33,136,143,143,191,234,116, 94,139,154,215, 3,254,
+ 34, 88, 28, 33,100,125,159, 62,125,110,222,190,125, 59,119,236,216, 49,174,109,219,182,112, 56, 28,144,164,218,243, 57, 53, 53,
+ 85, 83,223,141, 17, 66,150,246,235,215,239,222, 29, 59,118,112,235,215,175,231,186,119,239, 14, 66, 8, 28, 14, 7, 28, 14, 7,
+ 58,116,232,160,190,154,204, 16, 66,116,130, 32, 60,163, 84, 42,251,219,237,246,118, 0, 32,138,226,175,102,179,121,187,221,110,
+159, 79, 41,173, 14, 69,199,106,181,106, 10, 11, 11,235,236,155,244,244,116,229,149,166, 77,175,215,239,230, 56, 46, 93, 30,151,
+141,134, 51,221, 62,127, 41,165,103,139,138,138,122,251,211,140,137,137,113,105,250,211,240,158, 38, 73,210,217,194,194, 66,191,
+154, 78,115,117,119,191,126,253,162,182,108,217, 66, 46, 93,186, 68,212,106, 53, 36, 73,130,195,225,128,205,102, 67,251,246,237,
+235,213,126, 90,116,116,180,126,234,212,169, 45,111,187,237, 54,172, 91,183, 14, 15, 60,240, 0,250,246,237,123, 82,158,175,213,
+106,227,142, 30, 61,154, 17, 27, 27, 11,131,193,128,138,138, 10,220,114,203, 45,245,217,196, 53, 73,207, 46, 77,102, 19,142,196,
+202,227,212,238, 40,221,251, 83,238, 85,183,171, 20, 29, 29,125, 72,169, 84, 38,202,199,149,227,126,251, 86,197,223,241, 55,153,
+ 76, 5,197,197,197, 93, 2,233, 18, 66,154, 3,184,131,231,249, 86,130, 32,180, 1,208,220,110,183, 39, 2,128, 66,161, 40,224,
+121,254,188,205,102, 59,110,177, 88, 78, 1,248,146,214, 54, 36,232,147,161, 41,227, 91, 18,187, 97,116,149, 89, 26,166,105,145,
+221,218,112,102,234, 9,141,202,240,245,208,148,241,107, 67, 53, 89,127, 20,132,144,180,198,141, 27, 63,227,252,127,153,134,167,
+ 19,230, 40,147,201,212,151,231,121,149,221,110, 71, 65, 65, 65,241,187,239,190,123, 97,209,162, 69, 3, 8, 33,111,208, 32, 13,
+143,246,234,214,244, 0,199,113,169,112,218, 7,137, 58,114,246, 28,184, 20,150, 7, 19,207,243, 11,238,186,235,174,135,214,174,
+ 93,171, 57,120,240,160,166, 93,187,118,174,251,147, 36, 73,240, 14, 60,164,165,165, 5,146, 35, 0, 4,142,227,222, 26, 61,122,
+244,184,229,203,151,107, 46, 92,184,160, 73, 78, 78,118,105,186,155, 55,153,228,228,228,144,210, 26, 23, 23,247,159,219,110,187,
+237,254,101,203,150,137, 27, 54,108, 80, 55,106,212, 8,113,113,113, 80, 40, 20,117,150,237,211,167, 79,176,150,248, 57,142,227,
+ 22,140, 24, 49,226,254, 85,171, 86,105,246,237,219,167,233,208,161, 3,120,158,191,234,188,143, 28, 57,114,220,202,149, 43, 53,
+191,252,242,139,166, 85,171, 86,224, 56, 14, 28,199,213,209,227, 56, 14, 77,154, 52, 9, 73,243,206, 59,239, 28,183,122,245,106,
+205,161, 67,135, 52,109,218,180,113,237, 79,183,226,185,122,167,243, 26,215,252,211, 83,231, 65,233, 12,151, 46,239,211,167,207,
+208,237,219,183,243, 0,112,232,208, 33,148,150,150, 34, 37, 37, 5, 58,157, 14, 42,149, 10, 38,147,169, 94,225, 62, 66,200,127,
+156,230, 74, 4,128,207,254, 54, 18,103, 69, 96,114,161, 5, 10,133, 2,103,206,156, 1,207,243, 87, 28, 66, 36,132,220,164,215,
+235,151,125,254,249,231, 49, 93,186,116,225,138,138,138,144,158,158,142,210,210,210, 27,119,236,216,209,117,252,248,241,227, 9,
+ 33, 15, 80, 74,119,132,170,249,245,215, 95, 67,171,213, 66,163,209, 64,171,213,194, 98,177,144,224,107,249, 70, 16,132,212,243,
+231,207, 39,232,116, 58, 72,146,228, 26,188,202,175, 93, 72,146,132,140,140, 12,107, 32, 77,158,231, 83, 47, 92,184,144,160, 86,
+171, 65, 41,245,208,115, 56, 28, 80,169, 84,238,111, 10,112, 56, 28, 72, 79, 79,247,171, 41, 71,174,100,115, 5, 0, 43, 86,172,
+ 64,227,198,141,145,144,144, 0,173, 86, 11,181, 90,237,241, 64, 15, 5,158,231, 49,116,232, 80,204,152, 49, 3,217,217,217,120,
+254,249,231, 61,110,176,162, 40, 34, 54, 54, 22,223,124,243, 13,244,122, 61,154, 53,107, 6, 81, 20,235,181,141,107, 17,194,145,
+216, 61, 7, 46,186, 34,178,183, 14,108, 43,244,236,218,236,157,218, 49, 9, 28, 7, 72, 82,237, 35,147, 16, 80,187, 77, 42,251,
+225,231,220, 87,130,233,242, 60,159,124,225,194,133, 4,149, 74, 21, 82, 58, 28, 14, 7, 82, 82, 82,248,128,105, 37,100, 88,102,
+102,230,103,143, 63,254,184,162, 85,171, 86, 68,161, 80, 64, 16, 4, 8, 66,237, 45, 66,146,164,102,148,210,102,146, 36,221, 92,
+ 80, 80, 64, 23, 45, 90,244, 79, 66,200, 93,148,210,175,125,233, 9,212,216,169,202, 44, 13,251,254, 71,220, 56,122,240,139,248,
+102,205,212, 27,251,117,150, 16,169, 49,158, 70,109,228,230,154,132, 16,162, 87,171,213,211,191,255,254,251,140,170,170,170,202,
+190,125,251, 78, 39,132, 60, 77,195,208, 25,115, 89, 89,217, 17,249,191, 82,169,196, 83, 79, 61,133,219,110,187, 45,250,150, 91,
+110,153, 66, 8,249, 7,165,212,239,181,201,113,124,234,174,253,231, 18,228,241, 59,135,118, 84,244,238,222,172, 0, 0,234, 22,
+188, 80, 72, 14, 41,103,223,143, 57, 65, 13, 24, 33,228,159,163, 70,141,186,111,237,218,181, 58, 0, 88,188,120, 49, 70,141, 26,
+133,216,216, 88,104, 52, 26, 40, 20, 10,136,162,232,241, 27, 64, 75, 46, 30,250,231, 61,247,220, 51,122,249,242,229,145, 0,176,
+124,249,114,140, 28, 57, 18,113,113,113,136,140,140,132, 82,169, 4,207, 7, 60, 29,125, 18, 23, 23,247,159,190, 55,222,248,240,
+178,101,203, 0, 0,211,158,126, 26,183,245,232, 1,157, 70, 13,141,186,246,221,151, 82, 64,201,139,184,117,242,147,193,242,205,
+ 1,120, 99,212,168, 81, 99, 87,173, 90, 21, 9, 0, 7, 15, 30, 68, 97, 97, 33, 18, 19, 19,161, 86,171,161, 84, 42, 93,121, 38,
+132, 64,173,246,255,254,239,158,247, 81,163, 70,141, 94,185,114,101, 36, 0, 44, 93,186, 20, 67,135, 14,117,229, 93,165, 82, 65,
+161, 80,120, 12,222,102,211,151,230, 93,119,221, 53,122,245,234,213,145, 0,240,241,199, 31, 99,240,224,193,136,137,137,113,237,
+ 79, 89,171, 62,199,232, 90,214,188, 94,240, 48, 88,206, 29,197, 37, 38, 38,142,253,254,251,239, 93, 79, 81, 65, 16,160, 82,169,
+160, 82,169,160, 84, 42, 93,197,132,161, 66, 8, 33,137,137,137, 15,238,216,177,195,181,146,197,235,166,160, 82,169,234,253,224,
+118,211, 31, 60, 96,192,128,149, 27, 55,110,140, 80, 40, 20, 48, 26,141, 56,114,228, 8,162,163,163,161, 84, 42, 49, 98,196, 8,
+190, 79,159, 62,113, 55,223,124,243, 58, 66,200, 56, 26,194, 23, 10,148, 82,232,116, 58, 15,131,117,181, 69,200,106,181, 26, 27,
+ 54,108, 0,207,243, 62,111, 92,238,255, 19, 18, 18,130,234, 17, 66,160, 82,169,176,123,247,110,240, 60, 15, 81, 20, 33, 8, 2,
+ 68, 81,196, 87, 95,125,133,103,159,125, 22,197,197,197, 32,132, 64, 20, 69, 68, 70, 6, 45,221, 36,177,177,177,209,178,185, 2,
+106,205,143, 90,173,134, 40,138, 68, 16, 4, 34, 23,225, 17, 66, 72,168,101,234, 28,199,225,147, 79, 62,193,235,175,191,142, 23,
+ 94,120, 1, 75,150, 44, 65,167, 78,157, 92,243, 5, 65, 64,101,101, 37, 98, 98, 98, 16, 19, 19,131,136,136,136, 43, 62, 23,174,
+ 37,188,247,206,155,243, 23,106, 32, 81,212, 86,242,144, 0, 9,160,160,144,168,132,130,220,211,120,117,198,191, 66,126,234,168,
+ 84, 42,236,218,181,203,101,130, 4, 65, 0, 33, 4,238,198, 72, 30, 26, 55,110, 28, 84, 79,161, 80,188,246,197, 23, 95, 40, 63,
+249,228, 19,172, 90,181,202,117,110,105,181, 90, 68, 71, 71, 35, 46, 46,206, 53,164,166,166,146, 15, 63,252, 80,209,169, 83,167,
+215, 0,248, 52, 88, 28, 71,163, 52, 45,178, 91,143, 30,252, 34, 0, 96,244,139, 20,101, 39,231,220,192,149,191, 18,229,107,249,
+107, 1, 82,219,209,115,214,134, 13, 27,218, 39, 39, 39, 71,104,181,218, 11,243,230,205,139,123,234,169,167,178, 8, 33, 47,211,
+171,235,148,185, 66,142,210, 68, 68, 68, 68,244,239,223, 95, 57,119,238, 92,180,108,217, 18,227,199,143,143, 93,188,120,241, 8,
+ 0,107,252,173,236,125,169, 45,122,251,157,104, 74,107,207, 31, 42, 81,143,223,210,194,243,120,122,202,171, 33, 37,170, 73,147,
+ 38,143,173, 91,183,206, 85, 29, 34, 57, 57,217,227,225,239,126,143,146, 7,127,134, 0,206,202,205, 77,155, 54,125,248,211, 79,
+ 63,117,105, 54,106,212,200,117, 95, 18, 4, 1, 28,199,225,251,239,191,199,188,215,178, 16, 19,159,140,133,111, 47, 14,154,206,
+132,132,132, 37,195,134, 13,251,219,210,165, 75, 93,211, 58,182,104,129,219,251,244, 64, 66, 35, 61, 26,197,212,222,219,168, 68,
+240,243,241,192, 1, 71,249, 57,215,164, 73,147,241,107,214,172,113,165,211,253,190, 12, 0, 6,131,193, 21,181,183, 88, 44,232,
+214,173, 91, 72,121,119,215,148,163,107,178, 89,243,190,215,203, 47, 48,129, 52,155, 52,105,242,176,108,128, 1, 32, 54, 54,214,
+ 67, 67, 20, 69,172,249,102,153,119, 30,175, 90,179,190,199,221, 91,243,220,185,115,152, 59,119,174,199,113,151,163, 89, 41, 41,
+ 41, 88,180,104, 81, 32, 77, 95,116, 7, 16,239, 54,110, 1,160,116,251, 45, 2,240,131,143,229,228,233, 34,128, 27,156,243, 28,
+ 0,170, 0, 68,251,208,243,167, 83,140,218,238,126,226,189,150,247,222,142, 11, 1, 0, 8, 33,242,213, 59, 0,192,174,226,226,
+ 98,233,216,177, 99,220,193,131, 7, 33,138, 34, 18, 18, 18,208,189,123,119, 0,128,213,106,133, 40,138,208,106,181, 36, 58, 58,
+186, 64,126,224,202, 59,207,189, 44,221,205,200,112,165,165,165,210,230,205,155,185,229,119, 13,129,133, 2,157,167,207,195,208,
+225,195,177, 41, 69, 9, 30,192,141,199,138,161,209,104, 4, 81, 20,109,242, 65,144, 53,221,235,102,121,155, 35, 66, 72,164, 86,
+171,253,240,203, 47,191,140,224, 56, 14, 85, 85, 85,144, 36, 9,125,251,246, 5,199,113, 56,124,248, 48,166, 77,155,134,207, 62,
+251, 12, 95,124,241,133,186, 75,151, 46, 31, 18, 66,218, 81, 74,171,100, 13, 31,154, 0,128,200,200, 72,104, 52, 26,151,193,146,
+243,236, 30,234,150,151,167,148,230, 22, 23, 23,119, 13,164,233,112, 56, 48,114,228, 72, 16, 66,192,243,188,199, 77,199,253, 87,
+161, 80,224,240,225,195,117, 78, 62, 95,198, 80,206, 43, 0,104, 52, 26,232,116, 58,108,219,182,205, 53,191,115,231,206,176, 88,
+ 44,104,212,168, 17,126,253,181,110, 23, 80,222,154, 69, 69, 69, 52, 47, 47,143, 44, 95,190, 28,162, 40, 34, 46, 46, 14, 26,141,
+134, 44, 91,182, 44, 75,161, 80,164,154, 76, 38,201, 98,177, 64,169, 84, 46,148,163, 89,130, 32,212, 84, 84, 84,196,249,211,228,
+121, 30,143, 63,254, 56,158,123,238, 57, 44, 89,178, 4, 19, 38, 76,128,247,124,147,201,132, 70,141, 26,185, 76, 86, 40,121,191,
+ 90, 26, 92, 83,162, 56,114,104, 19,142,254,178, 5,146, 67,130, 67, 51,137,208,191, 0, 0, 32, 0, 73, 68, 65, 84,162,160,212,
+ 1,201, 14, 28,220,188, 55,227,242,217,188, 20, 10, 10, 56, 11, 50, 84, 21,213,246,155, 27,169,218, 0, 88,191,173,216,252,150,
+191,116,202,251, 70, 16, 4,216,108, 54,124,249,229,151, 56,125,250, 52,190,253,246, 91, 24,141, 70,215,126,236,213,171, 23, 30,
+126,248, 97,159, 6,203, 91,147, 82,186,244,210,165, 75,157,251,246,237, 75,202,203,203, 81, 94, 94, 14,163,209, 8,135,195, 1,
+187,221, 14, 65, 16, 16, 17, 17, 1,181, 90,141,196,196, 68,152, 76, 38,106, 54,155,151,250,211,148, 36, 82, 97, 56, 51,245,196,
+ 55,107,166,222, 56,250, 69,138,181,175, 19,180,108,170, 50,252,239, 64,228,195,235,119, 62,127, 11, 0, 42, 57,239, 58, 28, 64,
+109, 14,169,248,185,172,127, 79, 10,150,206,112, 16, 64,243,177,249,243,231,247,236,219,183,111, 66,101,101,229, 49, 73,146,232,
+221,119,223,141, 19, 39, 78,180, 91,188,120,241, 99, 0,222,174,175, 38, 33,100,128,115,254,100,183,105,228,155,111,190,185, 11,
+192,131, 31,124,240, 1, 70,141, 26,133,197,139, 23,103,194,203, 96,185,107, 82, 74,113,254,228,247, 56,127,106, 39, 36,137,186,
+ 69,193,125,255,247,247,230,227,157,206,154,154, 26,211,143, 63,254,168,251,224,131, 15,144,144,144,128,180,180, 52,104, 52, 26,
+ 68, 68, 68,120, 60, 92,221, 31,184,193,174, 77,163,209,104, 58,127,254,188,110,229,202,149,136,139,139, 67,243,230,205,161,209,
+104,160, 84, 42, 93, 47, 2,203,151, 47,199,138, 25,247,225,252,241, 95, 48,242,246,186,213, 1,188, 53, 53, 26,205,223,150, 46,
+ 93,234, 17,242, 72,140,137,129, 32,114,224, 69,130,152, 65,119, 1, 0,202,190,251,220,111,235,142, 94,154,164,170,170,202,180,
+111,223, 62,221,129, 3, 7, 32, 73, 18,154, 55,111, 14,131,193, 0,189, 94,239,202,255,230,205,155, 49, 98,196, 8,124,242,201,
+ 39,232,213,171, 87,208,188, 87, 87, 87,155,126,249,229, 23,221,167,159,126,138,216,216, 88, 52,105,210,196,149,119,121, 16, 69,
+ 17, 60,207, 35, 61, 61, 29, 21, 21, 21,208,233,116, 1, 53,107,106,106, 76, 7, 15, 30,212,125,250,233,167,136,137,137, 65,106,
+106,170, 43,194, 38,155,162,215,223,153,225,161, 17, 65,146,174, 90,179,190,199,221, 91,243,174,187,238, 66,203,150, 45,161,215,
+235,161,213,106, 93,218,129, 52,221,188,200,205,148,210,237,240, 36,158, 16,178,209,109,251,195, 9, 33, 27,221,127,253, 45,231,
+252,123, 83, 86, 86, 86,183,236,236,236,185,189,122,245, 90,185,123,247,238, 21,254,244,252,233,100,101,101,101,102,103,103,207,
+117, 95,222,199,118, 92, 8,110, 51,137, 51,115, 2, 0,180,109,219, 22,165,165,165, 80,169, 84,232,222,189, 59,138,139,139,161,
+211,233,160, 80, 40, 64, 41,197,164, 73,147,248,231,159,127, 62,129,227, 56,216,237,181, 47,118,130, 32,248, 43, 75,151, 56,142,
+ 67,239,222,189,113,196, 89,242, 51,116,248,112,164,166,166, 66,174,196, 17, 17, 17,129, 73,147, 38,145,103,159,125, 86,144,163,
+ 23,148, 82, 24,141, 70, 36, 37, 37,249,141,205, 10,130,240,244,186,117,235,162,148, 74, 37,170,170,170, 92, 69,100, 60,207,227,
+216,177, 99,120,227,141, 55,240,247,191,255, 29, 23, 47, 94, 68,114,114, 50,158,123,238, 57, 93,118,118,246,211, 0,102,250,211,
+148,209,233,116, 46,115,165,209,104,240,244,211, 79, 11,125,250,244, 73,208,233,116,136,140,140,132, 92,220,231,112, 56,208,162,
+ 69,139,160, 86, 92,146, 36,108,218,180, 9,130, 32, 4,141, 96, 57, 79,188,144, 52,247,237,219,231, 50,103,238,111, 69,132, 16,
+ 28, 57,114,196,101,230, 66,208,164, 28,199, 65,171,213,162,113,227,198, 80,171,213,208,104, 52,100,229,202,149, 47,167,165,165,
+ 37, 61,251,236,179, 92,101,101, 37,215,187,119,111,140, 26, 53, 74,144, 36, 9, 86,171, 21,153,153,153, 1,211, 72, 8,193,246,
+237,219,241,238,187,239, 98,194,132, 9, 62, 35, 88,114, 37, 72,189,254, 15,255,198, 33,108, 72, 0,172,118, 27, 12,213, 70, 87,
+ 17,174,195,225,192, 47,219,126,202, 56,251,211,201,204,141, 43, 63, 17, 1,192,180,237,115,247,213,146, 70,189,179,186,245,205,
+177,138,125,219, 74,173,251, 2,233,115, 28,135, 39,159,124, 18,175,188,242, 10,238,185,231, 30,108,222,188, 25,211,166, 77,195,
+248,241,227, 61, 34, 88,161, 96,179,217,222,123,224,129, 7, 38,172, 93,187,182,205,139, 47,190,200,201, 17, 44,141, 70, 35,215,
+225,130,217,108,134,209,104,196,241,227,199,165, 71, 31,125,244,132,197, 98,121,207,159,158,157,168,127,214,168, 12, 95,183, 72,
+229, 90,214,156,251, 87,100,223, 30,205,141, 68,221,181,226,174,214,131,233,176, 7,155,199,128, 82, 80, 9,144, 40, 96, 54,215,
+ 96,210,164,167,234, 95,102, 20, 70, 8, 33,195,198,141, 27,119,199, 99,143, 61,150, 86, 85, 85,117,198,110,183,219,228,121,211,
+166, 77,195,201,147, 39,135, 16, 66,206,251, 43, 18,245,163,153,218,162, 69,139,167, 28, 14, 7, 37,132,156,166,148,230, 56,103,
+ 45, 4, 16,181,125,251,118, 0, 64,106,106, 42, 0,100, 18, 66,150, 3,168,112, 55, 99, 46, 40,133,205,102,135,209,104, 14,104,
+172,228,113, 74,131, 85, 63,114,165,145,182,105,211, 6,119,220,113, 7, 68, 81,116,189,164,185, 23,143,121, 27,173, 0, 80, 0,
+ 18, 33, 4,201,201,201, 24, 54,108, 24, 20, 10,133,135,166,252, 64, 29, 54,108, 24,158,156, 57, 29,239, 61, 57, 16,239, 62,144,
+129,193,179, 11, 2,166,211, 96, 48, 84,111,221,186, 85,253,220,132, 9,184,161, 85, 43, 52,210,235,209, 52, 49, 30,106,149, 18,
+ 10,247, 52,145,224, 65,117, 90,251,176,147,120,158, 71,135, 14, 29, 80, 80, 80,128,115,231,206,225,220,185,115,224, 56, 14,125,
+251,246,117, 69,130, 79,157, 58,133,153, 51,103,194,108, 54,135,156,247, 86,173, 90, 97,224,192,129, 80, 42,149,208,104, 52, 30,
+ 69,131,242, 62,173,170,170, 66,203,150, 45,177,126,253,122,180,110,221, 58,168,102,219,182,109,209,191,127,127,143,253,169, 86,
+171, 93,207, 13, 0,184,180,175,218,181,141,148,148,148,122,105,126,187,255, 34, 62,216,188, 21,102,139,132, 74,131,205, 99,133,
+164, 70,122,236,252,244,197,144,242, 46,107,190,247,222,123,168,168,168,112, 61,123,228, 96,137, 28,156,104,210,164, 9,222,125,
+247, 93,223, 98,191,121, 17,159,207, 42, 95, 70, 38,200,114,242,201,165,202,206,206,158,235,189,126, 48, 61,247,249, 94,235, 91,
+188, 76, 89,157,147,216,215,221, 87,146, 47,130,148,148, 20,200,245, 60,228, 11, 68,198,110,183,227,179,207, 62, 67, 66, 66,130,
+107,136,138,242, 29,253,167,148, 82,185,158,208,147, 69,181,213, 12,190, 73, 86,224, 60,128,219,139,106, 47, 8,185,142,208,186,
+117,235,224,110, 96, 34, 35, 35, 3, 22, 23, 41,149,202,155,187,119,239,206,153,205,230, 58,230, 42, 59, 59, 27,227,198,141, 67,
+235,214,173, 33, 73, 18,170,171,171, 49, 96,192, 0,113,225,194,133, 55,163, 30, 6, 75,163,169,173,207,111,177, 88,176,109,219,
+ 54,196,196,196, 32, 46, 46, 14,177,177,177,136,140,140,148,191,132, 12,120,101,203,149,252, 70,142, 28,233,122,240,185, 71,173,
+188,205,214,238,221,187,131, 37,207, 85,105,178, 71,143, 30,208,106,181,208,233,116,208,233,116,216,180,105,147,107,153, 27,111,
+188, 17,146, 36, 33, 33, 33, 1,123,246,236, 9, 88,204, 73, 41,165, 10,133,194,181,188, 40,138,100,217,178,101, 89,233,233,233,
+ 73, 83,166, 76,225,120,158,199,161, 67,135,112,244,232, 81, 52,111,222, 60,228, 58, 89,229,229,229,151,179,178,178, 28, 89, 89,
+ 89, 0,128,204,204, 76,148,151,151, 23,202,243, 43, 43, 43, 75,134, 12, 25,226, 81, 47,163,184,184,184, 36,232, 14,184,198,145,
+ 36, 9,118,171, 29, 6,147, 9,213, 85, 6, 87, 52,168, 48,175, 32,250,197,103,159, 17,223,152,244, 16, 0,224,217,183,222, 70,
+213,146,223,110, 96,159, 63, 55, 46,225,174, 55, 86, 78, 5, 48, 34,144,190,193, 96,128,217,108, 70,179,102,205,176,127,255,126,
+ 84, 85, 85, 97,240,224,193, 30, 17, 82,121,159, 6, 11,197, 83, 74, 45,132,144, 62,195,135, 15,255, 97,254,252,249, 45,218,181,
+107, 71,106,106,106, 96, 48, 24,224,254,251,203, 47,191,208, 21, 43, 86,156, 53, 24, 12,189, 41,165, 22,127,122,155,114,255,115,
+122,104,202,248,181,255, 59,196, 15, 79,104,121, 66,159, 91,214,194, 94,146,171,170,169, 52, 30, 55, 57,232, 81, 80, 7,224,128,
+ 4,106,151,224,112, 22,111,253, 81, 16, 66, 58,180,104,209,226, 31, 11, 23, 46, 76, 52,153, 76,185, 54,155,173,198,107, 62, 22,
+ 47, 94,140, 97,195,134,253,131, 16,146, 19,172, 66,186,115, 29,101,116,116,244,180,109,219,182,101, 94,190,124, 57,191, 79,159,
+ 62, 83, 9, 33, 83, 40,165,150, 54,109,218, 68, 29, 56,112,160,175, 40,138,202,242,242,242,195,122,189, 30, 22,139,165,131,205,
+102,179,116,235,214,109,167, 47, 61, 42, 1, 54,155, 13, 70,163, 25, 21, 21, 85,176, 88,109,206,123,166, 4,135,195,238,252,149,
+ 96,119,222, 71,149, 10, 33,178,107,199,164,106, 74, 41, 56, 66,202, 15,252,114,217,103, 77,106,249,188,240, 85,148, 21, 74,244,
+202, 7, 14,226,252,106, 44, 46, 46, 14,162, 40,226,147, 79, 62,193,207,187, 54,253, 63,123,231, 29, 30, 69,213,182,241,251,204,
+246,221,100,147, 13,105,164, 64,168, 74, 19, 41,130, 32, 69, 90,104, 2,138,210, 69,129, 15,145,142,162,148, 23, 17, 21,129,208,
+139, 82, 21, 17, 65,145, 94,149, 34,210, 5, 68,233,189, 8, 4, 66,122,223,108,182,206,204,249,254,200, 78,220,108,182, 37, 4,
+ 17,156,223,117, 13,100,103,206,220,115,102,203,236,189,207,121,206, 51, 80, 72, 40, 56,214, 6,214,102, 5,103,179, 64, 38,145,
+224,215, 51,119, 16, 91,211,251,196,108, 66, 8, 13, 9, 9,193, 43, 77,155,162, 75,211,166, 5,211,213,164, 82,248, 43,149,208,
+200, 85, 5,145, 43, 0,148, 99,224, 54,124, 87, 20, 94,232,103,120,120, 56,254,252,243, 79,140, 30, 61, 26,179,102,205,130, 90,
+173, 46,156,205,124,245,234, 85,108,216,176, 1,177,177,177, 37, 62,119, 33, 98, 55,113,226, 68, 36, 38, 38, 98,225,194,133,104,
+216,176, 33,100, 50, 25,178,179,179,241,210, 75, 47, 33, 37,197,179,177, 20, 52,129,191,135,241, 20, 10, 69,145,104,147, 96,252,
+ 74,250, 26, 57,106, 14,124, 45, 2, 59,126, 91, 7, 2,130,147, 63,188, 95,228,187,104,217,250,163, 37,214,252,228,147, 79,138,
+244,211,151,232,149,175, 56, 69,153,124,105,119,218,190,202, 56,113,226,196, 73,132,144, 93, 19, 39, 78,156, 20, 23, 23,119,201,
+ 23, 61, 55,219,127,178,255,255,138,195,186,211, 78,109,138, 27, 44, 74, 41, 85, 40, 20,224,121,190,136,169,114, 78,168, 21, 66,
+126,142, 33, 69, 79, 48, 12, 3,158,231, 11,223, 12,206, 63, 87, 37, 18, 9, 78,156, 56,129, 19, 39, 78, 20, 89,191,114,229, 74,
+143, 95,224, 44,203,214,210,106,181, 69,162, 87,114,185, 28, 19, 39, 78, 68,255,254,253, 11,205,149, 92, 46,199,234,213,171,241,
+194, 11, 47,192, 98,177,212,242,212, 87,185, 92,158, 95,190,124,121, 6, 40,184, 0,249,249,249,145,209,163, 71, 75, 88,150, 45,
+124, 78,132, 69,200, 77,243,246,102, 33,246, 89, 41,251,246,237,243, 41,130,229,107, 14, 18,165, 20,231,206,157, 43, 98,218,132,
+ 89, 48, 0,112,238,220,185,194,252, 44, 95, 52, 37, 18, 9, 56,142,131, 90,173, 38,114,185,156,200,229,242,104,193, 92, 73, 36,
+146,194,215,219, 49, 39,207,219,185, 63,120,240,160,181,167,237,169,169,169, 79,109, 57, 6,171,205, 6, 99,190, 5,250, 60, 35,
+ 62,139,251,182, 96,229,103,248, 29,192,239,205,134,142,198,240, 14,177,109, 80,116,156,223, 43,142, 95,138,155, 55,111,134, 76,
+ 38,195,246,237,219, 17, 16, 16,128,110,221,186, 33, 32, 32, 0, 19, 38, 76, 64,239,222,189,125,142, 96, 1, 0,165, 52,135, 16,
+210,236,189,247,222,251, 99,206,156, 57, 21, 43, 84,168, 0,139,197, 2,171,213, 10,139,197,130, 91,183,110, 97,221,186,117,247,
+243,243,243,155, 81, 74,115,188,233,237,125,240,205,173, 45, 71, 62, 72,108,215,251,117,227,213,148, 61, 72, 78,206, 0,203, 62,
+ 0,207,177,176,178, 5, 51,146, 57,150, 5,203,114,144,203, 37, 1,115,166,191,255, 11, 15, 10,134, 33,150, 30, 61,122,116, 42,
+201,115, 82, 90, 8, 33, 65, 0,134,254,245,215, 95,250,224,224,224, 11,246,213, 1,137,137,137, 4, 0, 34, 35, 35, 41, 0,199,
+ 4,247,161,246,124, 44,111, 55,109, 30,186,115,231,206,151,116, 58,157,133, 97,152,172,143, 62,250,168,194,167,159,126, 58, 20,
+192,162,107,215,174,125,219,167, 79,159, 64,199, 95,240, 25, 25, 25,167,135, 14, 29,138,107,215,174,125,235, 74,140,194, 30,193,
+ 50,153,144,150,145,133,193, 67, 39,219,215,219,255,165, 69,219, 14, 27, 5, 21, 0,164,167,220,194,192,193,163, 61,206,134,224,
+121,222,229, 23, 96, 9,114,112, 10,142, 91, 16,122, 0, 80,240, 30,245,247,247, 47, 24,102,219,190, 14, 63,205, 27, 10,112, 86,
+ 80,155, 17,176,230, 3,214, 60,240,150,124, 16,185, 26,176,121,175, 82, 65, 8,161,254,254,254,240, 87,171, 17,166,211, 21, 20,
+113,148, 72, 32,147, 73,193,219, 0,194,217,103, 94,243, 0,239, 67,129, 15, 74, 41, 13, 9, 9, 1,207,243, 80,171,213,184,123,
+247, 46,134, 15, 31, 14,171,213,138,215, 94,123, 13, 22,139, 5, 38,147, 9, 70,163, 17, 85,170, 84, 65,126,126,190, 79,231, 46,
+ 92,231,133,209,158,247,223,127, 31, 47,188,240, 2,166, 78,157,138,241,227,199,163, 74,149, 42, 24, 54,108, 24,214,173, 91,135,
+ 58,117,234,120,212,117,124, 62, 5, 77,225,117,113, 30,202, 3, 80,226,215,200, 89,179, 32,239, 31,197, 94,247, 49,111,181, 45,
+177,102, 92, 92, 28,210,210,210,138, 69,174,132,191,163,162,162,176,108,153,247,220, 59, 55,199, 19,162, 69,225, 46, 54,191,226,
+212, 14, 40,200,165,250, 3,128, 57, 46, 46,238, 82, 92, 92, 92, 23, 66,200,174,184,184,184, 46, 78,237,188,233, 56,111, 79,243,
+214,215,194,171,175,221,125,182, 2,254,142,140, 8, 95,160,246,131, 8,237, 0, 20,228,251,108,217,178, 5,194,140, 14,199, 54,
+174, 16, 12,214,207,161,246, 16,177, 61,114,229,248,184,107,215,174,168, 92,185,114,145,232,149, 90,173,246,248,166,225,121, 30,
+241,241,241,184,120,241, 34,154, 54,109,138,156,156, 28,200, 24, 6, 31, 92,184,128,218,111,189, 5,139, 61, 34,163, 80, 40,240,
+238,187,239,250,148,168,126,231,206,157, 32,199,199, 33, 33, 33, 9, 45, 90,180,136, 58,117,234, 84, 97,226,187,125,248,172,208,
+104,248, 98, 94, 40,165,120,227,141, 55,138, 68,173, 28,205,149,227,178,103,207, 30,192,135, 33, 66, 74, 41, 90,180,104, 81, 24,
+189,210,106,181,216,182,109, 27,128,130,215,170,101,203,150, 0,128,240,240,112,159, 52,133,243,176, 39,182,195,100, 50,241,122,
+189,158, 57,125,250, 52, 20, 10, 69, 97,196, 78,173, 86, 67,165, 82, 65,169, 84,150,106, 70,208,127, 1, 74,121, 88,108, 54, 24,
+141, 70,228,229, 21, 84, 8,185,117,113,115,145, 54, 86,115,233, 39,167, 9, 81, 42,189, 94,143, 95,127,253, 21, 91,183,110, 69,
+195,134, 13,139, 37,185, 3,222, 35, 88,127,247,153,166, 17, 66,154,143, 27, 55,238,228,180,105,211, 34,203,149, 43, 7,171,213,
+138,123,247,238, 97,213,170, 85,137,249,249,249,205, 41,165, 94, 47, 44,127, 11, 2, 54, 27, 11, 83,190, 25, 57,185,122,124, 58,
+125,181,187,150, 12, 0,100,166, 94, 67,215,110, 61, 75, 93, 14,165,164,216,141,210,112,199,117,246,161, 58, 33, 28,159, 75, 41,
+237, 95, 18, 77, 66, 72,235, 89,179,102,245,110,216,176,161, 54, 39, 39,231, 10, 0,188,243,206, 59, 56,115,230, 76, 91, 66,200,
+ 37, 74,233, 65, 66, 72,157, 6, 13, 26,180,125,231,157,119, 0, 0, 95,127,253, 53,118,237,218,245, 43,165,244,160,235,126,242,
+133, 67,132,121,121, 70, 4,232, 34,240,224,206, 97,175,125,145, 75, 76,160,188,251,225, 66,193, 16,184,138, 90, 57, 94,159, 74,
+240,254,161, 66,206,159,240, 69,221,233,141,183,208,105,248, 76,104,100,192,140,129,205, 80, 69, 7, 64, 93, 14,242,150, 19, 64,
+116, 49, 5, 59, 14,223,233,147,254,248,229,203,113,230, 70, 65,133,151,232,208, 80,140,235,221, 27,212, 6, 28,191,124, 25,235,
+ 15, 30, 68,239,214,173,161, 81,169,124,210, 18,206, 93, 46,151,227,214,173, 91, 56,126,252, 56,106,214,172,137,155, 55,111, 22,
+ 41, 39, 65, 41,245,233,252, 41,165, 84,152,156,164, 84, 42, 33,147,201,144,156,156,140, 46, 93,186, 20,254,192, 63,124,248, 48,
+198,141, 27,135, 65,131, 6,161, 85,171, 86, 46,243, 98,157, 53, 67, 67, 67, 11, 3, 7,206, 19, 16, 28,135,109, 75,242, 26,185,
+210, 20, 40,237,235,238,168, 57,125,250,116,151, 19, 37,124,209,116,244, 34, 30, 56,141,162,209, 35, 8,249, 80,130, 33,114,126,
+ 12, 32, 72, 88, 55,113,226,196, 73,190,238,231,248, 88,136,128, 57,233,186, 69,106,111, 88,228,140,133, 47, 89, 33, 92,236, 10,
+ 63, 63, 63,140, 24, 49, 2, 83,166, 76, 65, 72, 72,136,215,220, 25,193,185,122, 98,231,206,226, 31,178,237,219,183,123, 27, 34,
+188, 26, 24, 24,248, 66,155, 54,109,144,147,147,131,251,247,239,195,207,207, 15,181,231,205,195,133,225,195, 81,111,249,114, 48,
+109,218,128,144,130, 34,169, 23, 46, 92,128, 90,173,190,234,177, 35, 78, 16, 66,160,213,106, 17, 20, 20, 84, 56,166, 46, 24, 45,
+135, 8,150, 87,231, 70, 41,197,207, 63,255,236,242, 87, 98,105,114,176,132, 15,255,201,147, 39,139,228, 95, 57, 26,158,147, 39,
+ 79, 22, 70,176,132,221,188,245,211,254,171,142, 10,122, 26,141, 6,229,202,149,131, 82,169,132, 90,173, 46, 98,174,124,137,222,
+121, 43, 36,170, 86,171, 79,249,249,249,233,132,237, 50,153, 12,122,189, 62, 59, 35, 35,163,177,183,190,254,155,225, 65,193, 90,
+ 89, 24,141, 38,228,233,203,190,150,164, 48,225,100,203,150, 45,120,241,197, 23,139,153, 43,225,185, 46, 41,148,210, 4, 66, 72,
+171, 69,139, 22,253, 62,127,254,252,160,188,188, 60,124,251,237,183, 57,121,121,121,173, 28,242,136,124,211,226, 41,108, 86, 43,
+242, 77,102, 24,242, 10,158,131,191, 46,109,246,178,215,147, 77,141, 26, 53, 6, 14, 27, 54, 44, 84,175,215,255,197,243,127,199,
+ 83,230,207,159,143,191,254,250,107, 32,128,131, 0,150, 79,159, 62,189,122,221,186,117, 43, 0,192,244,233,211,239, 3,112,157,
+148,130,130,107,135,213, 62, 68,152,151, 87, 16,245, 48, 25,210,203,164,191,130,201,112,151,115, 85,154,161, 28, 98,159,185, 44,
+145, 72, 48,114,228, 72, 92, 56,127, 30,109, 35,115, 81,165,188, 22, 52,247, 1,228,109, 62,193,185, 52, 53,230, 46,240, 57,165,
+173,144, 13, 14,147,120,230,110,216,224,114,219, 95,175,122, 28, 93, 47, 68, 56,247,235,215,175, 67,173, 86,131,227,184, 98,223,
+ 55, 37, 61,127, 71,227,178, 96,193, 2,140, 27, 55, 14,171, 87,175,198,133, 11, 23, 80,175, 94, 61,180,107,215, 14,169,169,169,
+ 56,127,254, 60,204,102,179,207,253,116,204,139,187,126,251, 50,246, 31,223,141,248,132, 59, 72, 76,190, 95,162,254,185,211, 20,
+ 16, 94,247, 45,251,207,226,141, 88,143,165,243,220,106,126,242,201, 39, 72, 77, 77, 45, 18,185, 18, 12, 43, 0,183, 17, 44,103,
+ 47,226, 68,186, 83,174,147,240,216,226,100,118,156, 31, 59,183, 7,128, 84, 0, 18, 47,251, 57, 63, 78,143,139,139, 59, 36, 68,
+190,236,186, 18,234, 38,255, 10,112, 83,104, 84,120, 50,132, 47,101,199,168,143,240,183,159,159, 31,180, 90, 45,180, 90, 45, 2,
+ 2, 2,188, 70,134, 4,131,213,226,182,190, 72, 46,151, 16,201, 2,128, 65,131, 6, 21,139, 96, 57, 22,228,116,133,217,108, 62,
+124,248,240,225,250, 93,187,118,149, 92,189,122, 21, 18,137, 4, 60,207,195,210,180, 41,234, 45, 95,142,139,239,191,143,151,239,
+222,133,201,106,133, 74,165,194,222,189,123,173,249,249,249,135, 61,118,182, 56,196,209, 96,249,249,249, 33, 48, 48,176,208, 96,
+248,226,202,133, 15,173,167,252, 6, 97,113, 76,242,247,134,144,115, 38, 44,194, 23, 43, 33, 4, 70,163,177, 48, 89,211,177,189,
+ 39,132, 33, 66,199, 15, 30,195, 48,208,233,116,133, 23, 13, 33,130,229,107,244,206, 91, 33, 81,141, 70, 19,112,237,218,181,106,
+ 66, 25,137,244,244,116,180,105,211,230,134, 59,189, 39, 6, 30,176,178, 28,242,140, 38,228, 25, 61, 15, 49,148, 4,225,189,246,
+253,247,223,227,214,173, 91,176, 90,173,136,139,139, 43,102,172, 74,146,228,238, 12,165,244, 86,131, 6, 13,248,142, 29, 59,226,
+228,201,147, 80, 42,149, 54, 74,105,137,235, 87,241,148,135,149,101, 97, 50, 26,145,103, 48,120,223,225, 41,224,218,181,107, 57,
+ 90,173,246, 4, 0,255, 27, 55,110, 72,252,252,252, 80,181,106, 85,152, 76,166, 28, 0, 57, 64, 97,206,219,204,119,223,125,119,
+ 33, 0,216,108,182,153,158,114,218, 40,165,176,177,118,179, 94,134,207,163,240, 94,114,119, 77, 42, 77,185, 20,199, 47, 84,158,
+231, 49,228,157,119,208, 46, 50, 23,221, 27,134,194,144,116, 3,154,192, 80, 16, 93, 37,204, 93,240, 51, 46,221,246, 57,213,146,
+ 2, 64,135,150,175,226,249,154,197,203,123, 53,111, 91,240, 91,236,216,175,167,144,146,158,232,115, 63,129,130,115, 55, 24, 12,
+110, 35, 85,190, 70,176, 4, 77, 98, 47,151, 34,147,201, 80,191,126,125, 60,243,204, 51, 56,116,232, 16, 26, 52,104,128,155, 55,
+111,226,230,205,155,184,123,247, 46, 46, 92,184,128,172, 44,111, 35,205,197, 95,163,109,251,214, 35, 75,159, 9,133, 92,129,204,
+236,116,196, 63,184,131,240, 96,239,165, 88, 60,105, 58, 6, 82,106,188,242, 41, 0, 32, 50, 52,176, 68, 6,203, 81,115,206,156,
+ 57,197, 76,123, 25,148,222, 57,229,229,113, 73,247,127,228,184,188,250, 42, 20, 10, 99,185,114,229,212,142,227,167, 12,195, 32,
+ 48, 48,144,204,154, 53, 75,194, 48, 12,180, 90, 45, 2, 3, 3, 33,132, 5,189,161, 80, 40,140,149, 42, 85, 82, 11,111, 64,225,
+ 3, 24, 16, 16, 32,153, 53,107, 22, 89,185,114,165,203,253,118,238,220,233, 45, 7,107,126,255,254,253,255, 47, 33, 33, 33, 40,
+ 44, 44, 12, 73, 73, 73, 80, 40, 20, 5, 31,138,214,173,209,226,246,109, 88, 11,114,138,112,253,250,117,124,245,213, 87, 6,179,
+217, 60,223,199,231,167, 16,127,127,127, 4, 7, 7, 23, 14, 13, 10, 17, 28, 7,179,232, 83,106,165,167, 80,188,240,139,175,164,
+ 56, 26, 44,225,139,117,232,208,161, 69,204,150,175,200,229,114, 86,168,212,206, 48, 12,172, 86, 43, 26, 52,104,128,212,212,212,
+194, 15,139, 99,228,206, 23,131, 37,147,121, 46, 36, 42,149, 74, 97,177, 88,208,178,101, 75, 16, 66,176,120,241,226,167, 99,216,
+145,231,137,191,127, 48, 34, 35,159, 69,104,152, 9,188, 47,201, 33, 62,194,178, 44,134, 13, 27, 86, 36, 98, 37,204, 84, 20,134,
+248, 41,165,176,217,108,222,102, 63,185, 69,248, 92,251,242,249,118,171, 1, 20, 14,109, 25, 12,166, 82,235, 60, 46,162,163,163,
+ 3,236, 67,134,206,184,158,237,135,191, 75, 50, 16, 66,166, 37, 36, 36,212,173, 81,163, 6, 94,126,249,101,236,217,179,103, 59,
+128,173, 14,237, 18, 8, 33, 75,132,191, 61,245,131,218,135, 90,141, 38, 51, 12,134,178,143,134,122,250,161, 87, 26,132,107,206,
+148, 41, 31,163, 93, 68, 54, 94,171, 23,136,239,118,253,134,126,245,213,128,197,183, 2,185,142, 8,125, 9,142,170,140,202,207,
+ 53, 41,182, 93, 21, 88, 48, 52, 87,249,185, 38,144,220,191, 89, 34,109,231, 33, 54,231,235,101,105, 34,120,142,207,231,224,193,
+131, 49, 97,194, 4,180,111,223, 30, 55,111,222,196,145, 35, 71,112,243,230, 77,140, 30, 61, 26,117,234,212, 65,189,122,245, 74,
+164,185, 99,255, 38,228,230,229,128, 33, 12, 50,115, 50, 96, 50, 27, 49,126,152,215,250,196, 94,251, 41,112,103,127, 28, 0, 96,
+243, 47,103, 74,173, 57,105,210, 36, 36, 39, 39, 23,137, 92, 61, 76,222,213,147,138, 75,131,149,145,145,225,114,188, 47, 52, 52,
+ 52, 37, 54, 54, 54, 44, 41, 41, 9,254,254,254, 94,205, 21, 33,164, 29,181,215,202, 72, 78, 78,118,169,169,213,106,173,177,177,
+177,178,136,136,136, 34,179, 7,253,252,252, 10,219, 56,221, 10,164, 80, 19, 0, 40,165,122, 66,200,144,102,205,154,125,183,103,
+207, 30,205, 51,207, 60,131,220,220, 92, 80, 74,177,122,245,106,140, 28, 57, 18, 42,149, 10,215,175, 95, 71,183,110,221,242,243,
+243,243,135, 80,135, 26, 88,174, 52, 93,156, 7, 24,134, 41,172, 98,239,194, 92,121, 60,119, 65, 3, 0, 22, 45, 90,132, 25, 51,
+102, 96,210,164, 73,110,247, 5,128, 21, 43, 86, 0, 78,195,121,174, 52, 41,165,152, 59,119,110,153,105,102,100,100,172,118,220,
+238,231,231,183,184,123,247,238,210,251,247,239, 23, 49, 85,142,139,139, 11, 82, 17, 77,111,133, 68, 37, 18, 9,194,195,195, 49,
+109,218, 52, 4, 7, 7,163,124,249,242,197, 34, 47,222, 94,163,210,240,168, 53, 57,202,159,158, 51,243,227,230,223,174,221, 33,
+ 83, 42,128, 19, 71, 54, 35, 55, 43,185, 72,123,179,245,239, 41,209,138, 6,109, 97, 57,243,171, 79,253, 52,155,205,152, 61,123,
+ 54, 62,253,244, 83,124,250,233,167, 30,251,100,127,221,189,106,122,194, 23,147,229, 82,147,167, 68,227, 23, 4,149, 95, 36,106,
+215, 9, 2, 95,194, 90,157,143,233,117,231, 19, 19, 19, 17, 25, 25,137,155, 55,111, 62, 39,145, 72,138, 56, 2,142,227,204, 42,
+149,170,200,108, 63, 55,154, 23,183,108,217, 82,119,242,228,201,152, 49, 99, 6, 0, 12, 56,124,248,112, 31, 66,136,224, 52,221,
+154, 52,103, 77,158, 82,162,214,232,160,242,139, 64,237,231,116,224,249,210,213, 60,117,117, 13, 17, 70, 43, 28,163, 87, 37, 44,
+ 36,237,242, 90, 7, 0,127,252,186, 29, 83,222,127, 14,171,127,250, 29, 95,156, 2,158,215,165,162,118,104, 26,248,180,171,248,
+176,223, 11,152,251,195,159, 0,128, 35,135, 61,107,162, 32,205,199,109, 31, 76, 70,143, 55,189,112,219, 79,231,145, 26,225,154,
+234,216,198, 83, 4,203,149,166,240,227, 80,175,215, 35, 59, 59, 27,223,125,247, 29, 6, 14, 28,136,212,212, 84,220,189,123, 23,
+ 55,110,220,192,143, 63,254, 88, 56, 59,189, 36,253,148,201,100,248,224,157,143, 48,121,238, 88, 80, 80,212,168, 86, 27, 19,135,
+127,138, 70,207, 55, 45,245,185, 59, 71,176, 4,188, 69,175, 60,105, 46, 90,180,168, 84,239,165,167,141, 18,141, 31, 8,145,172,
+144,144,144,194, 55,135,227, 27,175, 52,191,116, 37, 18, 9, 88,150, 45,204,237, 17, 22, 0,232,218,181, 43,118,238,220,233,203,
+204,136, 61,132,144, 55,107,213,170,181,234,179,207, 62,243,127,249,229,151,165,145,145,145,104,212,168, 17,174, 95,191,142,159,
+126,250,201,182,116,233, 82, 67,126,126,254, 32, 74,233, 47, 37,238, 36, 64,132, 91,207, 56, 46, 69, 26,120,233,163,213,106,189,
+127,243,230,205,136,185,115,231, 74, 24,134,193,194,133, 11, 11, 63,140, 66,161, 86, 71,142, 28, 57,194,242, 60,239,113, 72,198,
+102,179,221,191,121,243,102,196,188,121,243, 36,132,144, 66, 77,134, 97, 10, 53, 29,251,229,139,102,177, 19,183, 95, 96,220,153,
+ 43, 87,125,119,198, 91, 33, 81,169, 84,138,235,215,175, 99,202,148, 41, 32,132, 96,243,230,167, 35, 71,231,194,213,244,149,245,
+106,135, 5,117,237,212,188, 46, 8,129,213, 82,124, 4,200, 63,171, 32,249, 93,209,160, 45,186,207, 91,143,173, 31,244,246,170,
+ 75, 41,189,117,236,216,177,114,179,103,207,150, 74, 36, 18, 44, 88,176,160, 72,177, 95,231,215,253,232,209,163,108,105,134,247,
+132,207,179,213,106,133,209, 88,186,168, 9,165,244,120,220,244,201,177,107,190,255, 89, 70,136, 5, 39, 14,111, 70, 78,182,235,
+169,233, 10,153, 20, 43,191,219,194,202,101,146,210, 37,149,148, 29, 95,244,232,209, 99,242,166, 77,155,164, 0, 46,121,109,237,
+158,237,223,124,243, 77,167,158, 61,123,150,171, 94,189, 58,190,253,246, 91,185, 78,167,107, 72, 8, 33,174, 76,154, 39, 40,165,
+219,103, 78,159,252,246,119, 63,252,172, 96,136, 21, 39,142,108, 70,142,147, 89,119, 70, 46,151,225,155,213, 91,172,114,185,236,
+154,167,118,194,205,220,203, 34,114,229, 76,183,254,195,209,125,209, 23,168,218,168, 3,102,206,106,135,111,166,247,196,252,142,
+114, 88, 55,246,195,243, 61,214, 96,221,212,206, 0,128,200,111,124,211,147, 73,229,184,231, 34, 66,149,157, 83,144,216,174,215,
+151, 44, 74, 42,156, 59,224,254, 26, 94,210, 8, 22,195, 48,168, 92,185, 50,170, 86,173,138,102,205,154,161, 65,131, 6,104,221,
+186, 53,206,159, 63,143,243,231,207, 99,244,232,209,110,205,149,183,126,202,100, 50,180,122, 41, 22,191,183,240,248,146,150, 88,
+179,180, 81,110,111,154,174,222, 75,195,134, 13, 3,128,255, 68, 52,171,196, 6,203,113,198,193,195, 12, 29, 56,106, 90, 44,150,
+194,161, 55,199,186, 74, 66,210,187,143, 51,244,126, 33,132,212,249,248,227,143,223, 87,169, 84,173,243,243,243,159, 5, 0, 63,
+ 63,191,235,102,179,249,160,209,104, 92, 64, 41,205,126,152,190, 58,150,101,112,213, 5, 79,251,102,101,101,117,232,208,161,195,
+ 47, 82,169,180,178,227, 7,214, 49,241,207, 17,158,231,239,166,164,164,120,156,170,158,145,145,209,161,125,251,246, 46, 53, 29,
+255, 47,137,166, 51,194,236, 79,119,230,202,213,113,156,241, 86, 72, 84, 42,149,194,207,207, 15,219,182,109, 67, 72, 72, 72, 73,
+186,247,175,231,220,229,212,217,158,182,183, 10, 81, 30, 6, 16,218,125,222,250,123,135,210, 45, 49,173, 66, 20,241, 91, 63,236,
+ 83,209,211, 62,233,233,233,237, 7, 14, 28,184, 91, 42,149, 86, 6,138, 62,255,174, 94, 11,150,101,239, 36, 39, 39,151,184,236,
+ 1,165, 20,215,174, 93,227, 7, 15, 30,156,158,150,150,214,179,164,251, 3,192,196, 41, 95,204,159,241,217,200,224,142,177, 77,
+ 26,129, 1, 44,238,147,122, 41, 1,168, 84, 38,185, 63,110,210,194,119, 74,115,172,178,130, 82,122,134, 16, 50,173, 81,163, 70,
+163,225,182, 46, 56,188,150,169,160,148, 90, 9, 33,243, 59,117,234,244,225,168, 81,163,116,237,219,183,183, 70, 69, 69,157,118,
+140,206,251,202,185,203, 41,239,214,171, 21, 26,221,177,221,139, 29, 64, 8,181, 88, 60, 39, 71, 19, 2, 10, 74,169, 92, 46,187,
+118,234, 92,226,243,238,219, 21,185, 99, 70,153, 15,205,143, 24, 49, 2, 35, 70,140, 0, 80,240,126, 90,188,184, 5, 54, 93, 60,
+134, 30,207, 39,192,252, 85,115,144, 0,143,111,245, 34,253, 4,128,143, 62, 30, 92,102,125,115, 60,119,161,127,101,145,131, 37,
+145, 72,144,158,158,142,235,215,175, 35, 37, 37, 5,249,249,249,184,114,229, 10,172, 86, 43,178,178,178,240,220,115,207,149,186,
+159,101,245, 26, 61, 78,205,255,130,177, 18, 40,145,193, 98, 89, 54,193,219, 93,207,109, 54, 91,137,102, 25,201,100, 50,211, 51,
+207, 60, 67, 92,205, 54, 16,254,246,243,243,243,233,231,179,221, 64, 77, 1, 48,133,216, 63, 17,153,153,153, 15,237, 2, 57,142,
+ 75,140,137,137,145,184, 51, 46, 0,192,178,172,199,138,113,148, 82, 3, 0,207,113,220, 18,242, 40, 52,157,145,201,100,134,154,
+ 53,107, 22,230,114, 57,215, 52, 33,132, 64,173, 86,123,204,186,245, 86, 72,212, 96, 48, 36,117,232,208,129,115,220,238, 88,136,
+244,169,134,208,248,206,125,254, 47,230, 80,186, 37, 6, 0, 4,147, 5, 74,227,221,237, 66, 41, 53, 2,120,249, 81,119,237,246,
+237,219,150, 23, 95,124,241,123,189, 94, 63,156, 82, 90,234, 44,253, 73,159, 44,246, 60,118,253, 47,132, 82,122, 6,192,219,101,
+160,115,145, 16, 50,116,246,236,217, 61,103,207,158, 93, 13, 64, 8, 0,161,142,128, 87,147,230,200,185, 43,105,101, 94, 27,140,
+101,217,132,170, 85,171, 2,240, 61, 82,227,237, 26,111,179,217, 60,126, 79, 92, 66, 32, 38,157, 4, 10,110,227,150,225,147,166,
+201,100,202,108,218,180,105,137,194, 44, 44,203,122,188,134, 56,158,123, 68, 68, 4, 34, 35, 35, 11,255, 23,112, 94,239,173,159,
+ 44,203, 38, 68, 71, 71, 35, 36, 36,196,109,133,118,231,156, 43, 95, 52,203,250, 53,242,164, 25, 25,185,198,213, 46,143,165,159,
+ 79, 58, 37, 50, 88,194, 61, 6,203,146,148,148,148, 71,114,111, 20,143, 3,246, 37, 36, 35, 35,163, 81, 89,105, 61,105,100,100,
+100, 4,123,111,229, 25,111,133, 68, 83, 82, 82, 60, 22, 34,125,154, 57,148,102, 25, 80,108,157,221,108, 61,110, 12, 6, 67, 69,
+ 74,105,169, 50,243,123,244,232, 81,118, 25,253, 79, 56,118, 67,188,250,113,247,195, 21,233,233,233,101,126, 77,127, 20,223, 19,
+153,153,153,117,203, 90,243, 73, 57,247, 71,209,207, 39, 69,243, 73,231,191,155,125, 38, 34, 34,226,145,210,154, 43, 17, 17, 17,
+ 17,145,130, 25,101,237, 92,109, 40,201,204, 29, 66,136, 75, 13, 79,120,211, 23, 53, 69, 77, 81, 83,212, 20, 53, 69, 77, 81,243,
+233,211,244,166, 93,214, 51,135, 31, 27, 66,189,156, 71,177, 0,104, 39,106,138,154,162,166,168, 41,106,138,154,162,166,168,249,
+ 95, 91,196, 33, 66, 17, 17, 17, 17, 17, 17, 17,145, 50, 70, 52, 88, 34, 34, 34, 34, 34, 34, 34, 34,101,140,104,176, 68, 68, 68,
+ 68, 68, 68, 68, 68,202, 24,209, 96,137,136,136,136,136,136,136,136,148, 49,162,193, 18, 17, 17, 17, 17, 17, 17, 17, 41, 99,136,
+125, 54,128,136,136,136,136,136,136,136,136, 72, 25, 33, 5, 0, 66, 72,161,203,162,148,150,236,206,150, 34, 34, 34, 34, 34, 34,
+ 34, 34, 15,201,211,230, 69, 10,111,149,243, 52,156,140,136,136,136,136,136,136,200,147,203,211,228, 69, 10,115,176, 28,157,163,
+136,136,136,136,136,136,136,200, 63,205,211,228, 69, 10, 13,214,211,228, 26, 69, 68, 68, 68, 68, 68, 68,158, 60,158, 38, 47, 82,
+ 36,130,245, 52, 57, 71, 17, 17, 17, 17, 17, 17,145, 39,139,167,201,139,136,179, 8, 69, 68, 68, 68, 68, 68, 68, 68,202, 24,177,
+ 14,150,136,136,136,136,136,136,136, 72, 25,243, 72, 13, 22, 33,164,157,168, 41,106,138,154,162,166,168, 41,106,138,154,162,230,
+127, 13, 49,130, 37, 34, 34, 34, 34, 34, 34, 34, 82,198,136, 6, 75, 68, 68, 68, 68, 68, 68, 68,164,140, 17, 13,150,136,136,136,
+136,136,136,136, 72, 25, 35, 26, 44, 17, 17, 17, 17, 17, 17, 17,145, 50, 70, 52, 88, 34, 34, 34, 34, 34, 34, 34, 34,101, 12, 1,
+224,114, 38, 0,165,116,191,207, 34,165,152, 77,224, 77, 95,212, 20, 53, 69, 77, 81, 83,212, 20, 53, 69,205,167, 79,211,155,118,
+ 73,252,199,191, 26, 74,233, 35, 91, 0,180, 19, 53, 69, 77, 81, 83,212, 20, 53, 69, 77, 81, 83,212,252,175, 45,226, 16,161,136,
+ 71, 8, 33, 82, 66,136,180,180,219,255, 41, 77, 17, 17, 17, 17, 17,145,127, 19, 46,191,196, 8, 33,213, 1, 76, 2, 16,232,176,
+250, 20,165, 52,206,169,221, 15, 0, 52, 14,171, 12, 0,166, 82, 74,111,250,112,108,185, 93, 95,105, 95,120, 0, 38, 0,102, 0,
+122, 0, 54, 31,207, 65,228, 17, 65, 8,105, 10,160,139,253,239, 93,148,210, 19, 37,217,254, 79,105,254, 83, 68, 70, 70,170,131,
+130,130,218,159, 57,115, 70,113,229,202, 21, 28, 61,122,148,174, 92,185,210,154,149,149,181, 47, 49, 49,209,248,184,251, 39,242,
+240, 16, 66, 58, 0,152,104,127, 56,147, 82,186,247, 33,245,136, 70,163, 25,237,231,231,215, 89,169, 84, 70,178, 44, 75,242,243,
+243, 19, 13, 6,195, 47, 44,203,206,163,148,242,165,208,108, 20, 18, 18, 50,180, 78,157, 58,207,220,190,125,251,254,189,123,247,
+214, 2,216, 11,160, 67,197,138, 21,251, 87,169, 82,165,194,165, 75,151,110,164,167,167, 47,167,148,254,241,184,250, 41, 34,242,
+ 95,199, 93,148, 96, 10,165,180,159,227, 10, 66,138,223,224,186, 77,155, 54,221,246,237,219,167,225,121, 30,194,162, 86,171, 89,
+ 0, 3,188, 28, 55,248,248,241,227, 49,195,135, 15,239,158,152,152,248,130, 94,175,111, 12, 0, 26,141,230,247,176,176,176, 63,
+ 22, 45, 90,244, 99,251,246,237, 19, 80, 96,180,124,134, 16, 34,149,201,100, 3,131,130,130, 58,179, 44,219,128, 82, 10,153, 76,
+118, 38, 43, 43,107,175,205,102,251,134, 82, 90, 98,211, 70, 8, 81, 72,165,210, 17, 74,165,178, 3,203,178,117, 1, 64, 42,149,
+ 94, 48,155,205,123, 89,150, 93, 66, 41,181,148, 66, 83,165, 80, 40, 70, 4, 4, 4,196, 90, 44,150,186, 0,160, 80, 40, 46,228,
+230,230,254, 98,177, 88,150, 80, 74, 77, 37,213, 44,107,236, 17,164, 46,148, 82, 25, 0, 72, 36,146, 87,155, 54,109, 26, 67, 8,
+225, 9, 33,148, 82, 74, 24,134,169,207,113, 28, 99,111,223,133, 16,242, 7,165,148, 45,137,230,139, 47,190, 88, 65,179,144, 17,
+ 60, 0, 0, 32, 0, 73, 68, 65, 84, 42,149, 82, 74, 41,161,148, 50, 12,195, 60, 95, 18,205,178, 34, 52, 52,116, 6,207,243,145,
+158,218, 4, 6, 6,190,112,230,204,153, 26, 27, 54,108,224,190,250,234,171,236, 65,131, 6,249, 15, 31, 62, 92,186,120,241,226,
+ 37, 0,198, 56,183, 15, 9, 9,153,207, 48, 76,136, 47,199,231,121, 62, 61, 61, 61,125,108, 41,187, 47, 82,118, 76, 92,186, 95,
+223,146, 82, 96, 68,172,150, 65,129,113, 41, 53, 81, 81, 81,223,189,253,246,219,125,234,214,173, 43,165,148,194,102,179,193,108,
+ 54,215, 56,113,226, 68,171,205,155, 55,191, 0,160,103, 73,244, 8, 33, 93, 38, 78,156,248,245,212,169, 83, 67,101, 50, 25,177,
+217,108, 77, 54,108,216,208,113,232,208,161,231,150, 47, 95, 94,175, 87,175, 94, 90, 97,253, 39,159,124,210,137, 16,242, 62,165,
+244,199,127,186,159, 34, 34, 34,238, 13,150, 31, 0, 16, 66, 82, 0,156,178,175, 59,229,220,232,192,129, 3, 59,164, 82,169, 16,
+193,106,108, 48, 24,194, 81, 52,234,229,138, 74,253,251,247,111,186,105,211,166, 25,189,122,245, 74,214,104, 52,207,188,254,250,
+235,122, 66,136,100,195,134, 13,245,171, 86,173,170,238,218,181,107,255, 54,109,218,124,176,123,247,238,163, 0,210,124, 57, 17,
+ 66, 72,237,114,229,202,109,153, 61,123,118, 76,135, 14, 29,228, 33, 33, 33,160,148, 34, 49, 49, 49,234,167,159,126,234,248,217,
+103,159,125, 64, 8,121,141, 82,122,217, 23, 61,187,102, 35,181, 90,189,233,179,207, 62,139,232,216,177,163,180,124,249,242, 48,
+153, 76,184,114,229, 74,187,189,123,247,182, 92,177, 98,197, 24, 66, 72, 15, 95,127, 37,218, 53, 27, 7, 6, 6,110,254,118,194,
+132,240, 38, 3, 7, 74,203,149, 43, 7, 74, 41,210,210,210,218, 29, 91,179,166,213,176,217,179,199, 16, 66,222,160,148, 22,123,
+190, 31, 39, 10,133,130, 89,187,118,109, 61,133, 66, 1, 0,176, 88, 44,168, 83,167, 78,113,215, 93, 2,100, 50, 25, 51,111,222,
+188, 6, 82,169, 20, 86,171,149,215,235,245,244,245,215, 95,127, 44,195,214,132,144,232,196,196,196, 64,185, 92,238,114, 59,199,
+113,104,217,178,101,101,185, 92,142,121,243,230,217,210,211,211,235,127,249,229,151,103,214,173, 91, 23,178,100,201,146, 30,112,
+ 97,176, 24,134, 9, 73, 72, 72,112,169,201,113, 28,172, 86, 43, 88,150,133,197, 98, 65,173, 90,181,202,252,156, 68, 74, 69, 12,
+ 0,252,124,222, 4, 0,229, 30, 86,204,207,207,175,102,223,190,125,165,105,105,105,144,201,100,176, 90,173, 72, 78, 78, 70,157,
+ 58,117, 36,223,127,255,253,179, 37,213,171, 81,163,198,208,184,184,184,176,159,127,254,217,250,253,247,223,155,219,181,107, 39,
+ 31, 52,104, 80, 64,203,150, 45, 91, 68, 71, 71, 51,171, 86,173, 50,239,223,191,223,250,230,155,111, 42,103,204,152, 17,182,123,
+247,238, 62, 0,188, 26,172,178,238,167,136,136,136,123,131, 37,112,138, 82,250, 42, 0,200,229,242,250, 21, 42, 84,248,142,101,
+217,242, 0, 32,149, 74,147,101, 50,217, 60,171,213,122, 22, 0, 8, 33,219,121,158,239,230, 69, 47,184,127,255,254, 77,119,239,
+222, 61,247,196,137, 19, 57, 25, 25, 25,229,119,236,216, 97,250,224,131, 15,238, 2,192,237,219,183,171,116,237,218, 53,106,228,
+200,145, 9,237,219,183, 95,212,186,117,235, 81, 7, 15, 30,252, 5, 5, 67,143,110, 33,132,212,174, 83,167,206,241, 35, 71,142,
+104,117, 58, 93,145,109,149, 42, 85,194,168, 81,163,228,221,186,117,171,218,182,109,219,223, 8, 33, 45, 40,165, 23,189,244, 19,
+132,144,198,213,171, 87,223,127,224,192, 1,255,160,160, 32,100,103,103, 35, 57, 57, 25,249,249,249, 8, 8, 8, 64,175, 94,189,
+228, 47, 55,111, 86, 97,228,232, 49,251, 9, 33,237,124, 49, 89,132,144,198,205,106,215,222,191, 46, 46,206,223,118,239, 30,212,
+106, 53,242,242,242, 0, 0, 90,173, 22, 47, 84,174, 44,253,115,205,154,168,126,227,199, 11,154,255,184,201, 34,132, 40, 1,128,
+ 82,106, 38,132,236,146, 72, 36,175, 42, 20, 10,230,213, 87, 95,197,254,253,251,137,201,100,146, 2,128, 74,165, 98, 95,125,245,
+ 85,168,213,106, 88, 44, 22, 30,192, 46,119,145, 38, 87,154, 50,153,140,105,221,186,117,254,169, 83,167, 50, 5, 77,141, 70, 99,
+107,221,186,117,176, 66,161, 80,179, 44, 75, 61,105, 62, 10, 20, 10, 5,110,221,186, 85,100,157, 94,175, 71, 90, 90, 26, 50, 50,
+ 50, 96, 54,155,145,157,157, 13,158,231,137, 90,173, 78,227,121, 30, 12, 83, 16,108,115,167, 41,151,203,113,253,250,245, 34,235,
+ 88,150,133,193, 96,128,217,108,134,213,106,133, 94,175, 87,107,181,218,234,181,107,215, 78, 0,176, 61, 51, 51,115, 94,114,114,
+114,124, 89,159,159,136, 79,220,219,117,214, 84, 17,128, 5,192,157, 50,208,227, 1,224,232,209,163, 72, 73, 73, 65,122,122, 58,
+210,210,210, 16, 29, 29,141,210, 12,187, 93,187,118,109, 81,253,250,245,201,185,115,231,118, 2,248,122,253,250,245,221, 51, 51,
+ 51,151,141, 27, 55,174,220,156, 57,115, 50,199,143, 31, 63, 12,192,214,245,235,215, 15,172, 91,183,110,215, 11, 23, 46, 44,124,
+ 28,253, 20, 17,121, 4, 52, 2, 16,106,255, 59, 29, 5,215,221, 96,135,199,231, 81,240,185, 21,218, 89, 0, 40, 92,252, 47, 32,
+ 60, 78, 3,240,135,195,126,194,227,135, 70, 24,138,161,194,226,170, 81,120,120,248,232, 54,109,218,204, 61,125,250,116,173,164,
+164,164,160,164,164,164,160,211,167, 79,215,106,211,166,205,220,240,240,240,209, 66, 59,251,204, 2, 56, 60,118,156,106, 41, 63,
+126,252,120,204,150, 45, 91,102,238,223,191, 63,167,126,253,250,150, 3, 7, 14,176,237,219,183, 79, 5,192, 2, 96,219,183,111,
+159,122,240,224, 65,174, 73,147, 38,234,221,187,119,223,255,237,183,223,230,111,218,180, 41, 28,128,196,141, 38, 8, 33, 50,157,
+ 78,183,237,240,225,195,197,204,149, 35, 21, 42, 84,192,174, 93,187, 2,116, 58,221,118, 66, 72,145,144,130, 11, 77,149, 74,165,
+218,124,240,224, 65,127,173, 86,139,212,212, 84,200,100, 50,132,133,133, 33, 39, 39, 7,201, 73, 73,136,191,113, 3,140,197,130,
+ 5,211, 63,215,170,213,234, 77,132, 16,133, 55,205,192,192,192,205,235,102,204,240,207,216,191, 31,231,166, 77,131,213,106, 45,
+ 28, 90,181, 90,173,248,109,248,112,164,253,250, 43, 86, 77,153,226, 31, 24, 24,184,153, 16,162,242,164, 89, 22, 56,106, 18, 66,
+134, 3,200, 4,144, 73, 8, 25, 78, 41, 61, 81,167, 78,157,211, 87,174, 92, 65,139, 22, 45,176,113,227,198,231,199,141, 27, 55,
+124,220,184,113,195, 55,110,220,248,124,139, 22, 45,112,229,202, 21,212,169, 83,231,180, 99,174,148, 47,154,135, 15, 31, 70,155,
+ 54,109,178, 54,110,220, 88,101,202,148, 41, 51,166, 76,153, 50, 99,253,250,245, 85,219,180,105,147,181,112,225, 66,179, 39,205,
+ 71,113,238, 2, 28,199, 21, 89,120,254,239,239,150,200,200,200,212, 45, 91,182,160, 87,175, 94,140, 66,161, 72,234,221,187,183,
+242,216,177, 99, 20,192,174,146,244,211,100, 50,193,104, 52,194, 96, 48,224,246,237,219,234,217,179,103, 55,255,244,211, 79,171,
+237,223,191, 63,106,210,164, 73,195, 66, 67, 67,207,148, 47, 95, 62,166, 36,154, 37, 69,212,116, 75, 50, 0, 43, 10,126,212,197,
+ 63,140,102,219,182,109,159,171, 86,173, 90,248,134, 75, 65,200,146,215, 0, 47,215,129,151,235,192, 5, 55,194, 45, 69, 39, 84,
+172, 88, 49, 92,171,213, 54, 45,137, 38,165,244,151,179,103,207,118,162,148, 46,167,148,114,148,210, 77,227,199,143, 31, 76, 8,
+217, 60,126,252,248,119, 41,165,155,236,235, 87,158, 63,127,190, 43,165,244,224,227,232,231,195, 34,106,254, 55, 53,189,120,145,
+ 80, 66,200, 46, 66,200,174,255,253,239,127,173, 1, 4, 59, 61,126,201,177, 29, 0,133,171,255,133,197, 97,125, 40,128, 87, 28,
+246, 11,117,113,236, 82, 81, 56, 28, 99,207,129, 17,126,137,159, 34,132,236, 0,112, 74, 46,151,215,175, 87,175,222,171,123,246,
+236,209,134,134,254,125,220,208,208, 80,108,218,180, 73, 91,187,118,237, 87,229,114,121,125, 0,167, 2, 2, 2,118,192,197, 80,
+162, 29,221,240,225,195,187,191,245,214, 91,185,245,235,215, 7,128,236,203,151, 47,107,154, 52,105, 98, 96, 89,150,176, 44, 75,
+154, 52,105, 98,184,124,249,178,198,102,179,233, 27, 53,106,228,215,182,109,219,187, 99,199,142,237, 15, 64,229, 70, 19, 0,250,
+206,154, 53, 43, 58, 40, 40,200,109, 3, 74, 41,244,122, 61,194,195,195, 49,124,248,240,242, 50,153,236,255, 60, 61, 41, 82,169,
+116,196,172, 89,179,194,116, 58, 29,178,178,178, 16, 29, 29, 13,139,197,130,235,215,175,195,100,200,131, 77,159, 11, 91,110, 54,
+210,254,186, 9,157, 76,138,254,221,186,132, 75,165,210, 17,158, 52, 21, 10,197,136,111,198,143, 15,183,220,189,139,219, 27, 55,
+130, 99,139, 7,102, 88,171, 21, 23,190,254, 26,166,132, 4,204, 28, 60, 56, 92,161, 80,120,212, 44, 75,236, 81,166, 57,148, 82,
+ 53,165, 84, 77, 8, 89,244,210, 75, 47,125,175, 86,171,135,199,197,197,117,216,183,111, 95,199, 35, 71,142,180, 98, 89, 86,198,
+178,172,236,232,209,163, 45, 76, 38,147, 84,169, 84, 66, 42,149,186, 52,230,174, 52,155, 54,109,250,157, 90,173, 30,182,108,217,
+178, 14, 7, 15, 30,236,255,231,159,127,142,224, 56, 78,193,113,156,226,207, 63,255,124,215,104, 52,202, 40,165,156, 59,205,127,
+ 26,153, 76, 6,185, 92, 14,181, 90,141,230,205,155,255,181,114,229, 74, 91,116,116,180,108,243,230,205, 65,145,145,145,126,139,
+ 23, 47,206,214,235,245,179,124,213,179, 90,173, 48,155,205, 48, 26,141, 48,153, 76, 56,112,224, 64,229,145, 35, 71, 74, 77, 38,
+ 19,215,181,107,215, 76,155,205,102, 30, 63,126,124, 64,185,114,229, 62,120,148,231, 37,226, 22, 22, 64, 30, 10, 12,150, 89, 88,
+ 73, 8, 81, 18, 66,234, 10,209, 88, 95,200,206,206, 94,241,205, 55,223, 68, 51, 74, 29,142, 89, 58,227, 71,254, 51,236, 11, 92,
+140,212,152, 15, 17, 22, 93, 13,125,250,244, 9,163,148, 46,126,216, 14, 83, 74,183, 83, 74,123, 80, 74,183,148,102,255, 71,221,
+ 79, 66, 72,140,191,191,255,198,128,128,128, 99,254,254,254, 27, 9, 33, 49,165,213, 18,104, 95,157,180,123,181,150, 36,161,125,
+ 53, 66, 95,173, 37, 73,104, 95,189,228,181,154, 68,254,157, 56,121, 17, 71,210, 40,165, 93, 40,165, 93,102,206,156, 57,195,161,
+189,240, 88,237,163,126, 23, 74,105, 23,199,117,118, 99, 85,230, 20, 14, 17, 10,137,203,246, 14, 20,206, 22,172, 80,161,194,119,
+223,125,247,157,214,121,199,164,164, 36,228,230,230, 98,242,228,201,218,183,222,122,107,204,253,251,247,223,246,114, 44, 69,114,
+114,114,131,126,253,250,169,172, 86,107, 22,207,243, 76,110,110,174, 52, 48, 48,144, 19, 26, 4, 6, 6,114, 57, 57, 57, 50,131,
+193, 32,225, 56,206,252,214, 91,111, 41, 6, 15, 30,252, 2, 28, 34, 88,206,132,134,134,198,118,238,220, 89,225,110,187,205,102,
+131,193, 96,128,193, 96,128,213,106, 69,243,230,205,149, 43, 87,174,108, 15, 96,153,187,125,148, 74,101,108,108,108,172, 44, 51,
+ 51, 19,129,129,129,136,143,143,199,157, 59,119, 96,206,203,131, 53, 47, 23,214, 60, 61, 88,125, 46,104,110, 14, 50,110, 94, 67,
+147,154, 53,228, 63, 40,149, 29, 0,204,119,167, 25, 16, 16, 16,219,100,192, 0,169,159,159, 31, 90,245, 43,152, 63,176,187,102,
+ 77, 80,142, 3,207,113,224, 88, 22, 29,174, 95,135,205,102, 3,195, 48,104,148,153, 41, 13, 88,179, 38, 22,192, 92,143,207,234,
+ 35, 66,169, 84, 74,215,174, 93,219, 87,161, 80,128, 82, 74, 44, 22, 11,246,237,219,247,208,154,107,214,172,233, 47,104, 90,173,
+ 86,250,220,115,207, 21,251, 32,153,205,230,127,133,185, 2, 10,134, 13, 85, 42, 21,172, 86, 43, 42, 85,170,100,236,215,175,223,
+241,233,211,167, 87,100, 24,198, 79, 46,151,239,201,200,200,152,145,152,152,120,219, 87, 61,155,205, 6,139,197, 2,139,197, 2,
+163,209,136,191,254,250,171,124,229,202,149,201,240,225,195,185,252,252,252, 42, 95,124,241,197,173,125,251,246,105,102,205,154,
+245, 58,128, 81,143,240,212, 68,156,176, 71,161, 3, 43, 6, 75, 13, 50, 9,242, 0,104,237,102,224,117, 66, 72,147, 90,181,106,
+ 5, 93,185,114, 37,139, 16,114, 18,192,143,148,210, 36, 79,122, 60,207, 19,158,231,241,110,227,108, 12,111, 42,129,205,150,131,
+156,156, 28,196,199,199,227,242,229,203,248,253,119,159,211, 65,139,160, 82,169,254,207,223,223,191,189, 74,165,170,196,178, 44,
+147,151,151, 23,159,159,159,191,159,231,249, 21,212,121, 24,193, 7, 30, 85, 63, 5,252,252,252,102, 79,154, 52,169, 89, 96, 96,
+ 32,206,158, 61, 91,101,253,250,245,179,241,144, 73,243, 42, 25,179,106,254,194,197, 81, 81, 97, 58,156, 63,178, 51,106,198,242,
+ 13,171, 0, 68, 63, 84, 71, 69,254, 21, 56,122, 17, 39,254, 0,240,138,125,118,121, 23, 23,219,125,213,127,168,253, 75, 66,161,
+193,114,115, 66, 96, 89,182,188, 99,228,138, 82,138,164,164, 36, 60,120,240, 0,105,105,105, 8, 10, 10,130,213,106, 45,239,195,
+177,148,122,189,190,113,112,112,112,190, 76, 38, 51, 27,141, 70,104, 52, 26, 94, 38,147, 81,251,113,136,125, 22, 34,103, 54,155,
+137, 84, 42,181,105,181, 90,127,179,217, 92, 3, 30,114,197, 40,165,141,131,131,131, 93,110, 51,155,205,200,203,203,131,193, 96,
+ 64, 94, 94, 30,204,102, 51,194,195,195,193,178,108, 3, 79, 29,101, 89,182,110,104,104, 40, 18, 19, 19,161, 86,171,145,144,144,
+ 0, 75,158, 30, 86,189, 30,172, 33, 23, 92, 78, 14,248,220, 92,240,134, 92,216, 44,249,136,122,166, 38,132, 25,134,238,176, 88,
+ 44,117,131,131,131, 97, 48,252,157, 78, 70,237,198,138,101, 89,176,246,164,103, 97,216, 48, 36, 36, 4,194, 12,195,127, 2,123,
+126,212, 56,134, 97, 22, 41,149, 74,233,176, 97,195,144,148,148, 84,228, 61, 49,108,216,176,194,156,171,150, 45, 91, 30, 85,169,
+ 84,108, 90, 90, 26,204,102,179,204, 23,205, 74,149, 42,197, 79,158, 60,249,148,197, 98,137,142,140,140,212,153,205,102,227,179,
+207, 62, 27,169, 86,171,195, 45, 22, 11,247,194, 11, 47,172, 80,171,213,182,188,188, 60,202,178,236, 67, 37,208,151, 21,132, 16,
+ 16, 66, 10, 94, 35,150, 69, 72, 72,136, 33, 61, 61,253,247,172,172,172,190,165,209,179,217,108,194, 12, 45, 24,141, 70, 80, 74,
+113,246,236, 89,168, 84, 42, 25,199,113,151, 88,150,213,200,100, 50, 48,246,228, 46,145,127, 6, 66, 72,171, 26, 58,197,252,184,
+ 38, 97,186,122, 93,253, 12, 26,133,196,192,199,215,171,244,237,156,203,235,223,234,255,127,218,169, 83,167,198,132,132,132,168,
+110,221,186,101,250,252,243,207, 43,175, 93,187,150,192,203,143,159,251,247,239,111,158, 52,105, 82,185,206,157, 59, 87, 81, 42,
+149, 36, 39, 39, 7,105,105,105, 72, 73, 73,193,157, 59,119,232,249,243,231,255, 50,155,205, 27, 75,210,207,200,200,200,149, 35,
+ 71,142,124,171, 97,195,134, 50,160, 32, 34,106, 48, 24,234, 31, 62,124,184,219,238,221,187, 91, 0, 40,241,251,242,254,253,251,
+ 27, 63,250,232, 35,191, 78,157, 58,213, 80, 42,149, 76, 89,244,211, 17,134, 97,194,253,253,253,177,127,255,126,232,116, 58, 48,
+ 12, 19, 94, 90, 45, 1,147,149,143,138, 44, 31, 12,211,111,243, 81, 35, 52, 6, 38, 43, 31,245,176,154, 34,255, 14,220,121, 17,
+ 20,228, 72,129, 82,218,197,139, 73, 50, 78,156, 56,113, 18, 33,100,215,196,137, 19, 39,185,208, 23,246,227, 28,219, 57,180, 55,
+ 59,239, 83, 90, 74, 84,204,145,231,121, 60,120,240, 0,137,137,137,120,240,224, 1, 50, 50, 50,192, 48,140,167, 39,196, 17, 74,
+ 8,225,127,249,229,151,160,227,199,143, 27, 26, 53,106,148, 45,228,183,176, 44, 75,108, 54, 27,177,231,189,144,248,248,120,249,
+177, 99,199,116, 87,175, 94, 13, 71, 65, 34,154,199, 36, 75, 87, 63,218, 4, 99,229,184,152, 76, 38,168, 84,158, 70, 27,255, 70,
+248, 2, 60,123,250,116,129,185,202,211,219,135, 6,115,192,229,230,128, 26,244, 80,112, 54, 40, 64, 65, 76,249, 62,105, 58,230,
+243, 0, 40, 52, 87, 86,187,193,178, 88, 44,176,217,108,224,121, 30,172,139, 33,196, 71, 13,165,116,105,253,250,245, 27,108,221,
+186,117,208,131, 7, 15,138,109,127,237,181,215, 48,106,212, 40,140, 28, 57,242,234, 43,175,188,114,126,231,206,157, 24, 49, 98,
+ 4,120,158,175, 71, 8,201,161,148,238,246,164, 57,113,226,196, 63,239,223,191,127,232,198,141, 27,195,194,194,194,148,117,235,
+214,189, 89,183,110, 93,201,214,173, 91,195,223,121,231,157,211, 29, 59,118,188,251,235,175,191,150,219,191,127,191,138,231,249,
+134,132,144, 7,143,187, 14,150,217,108, 46,140, 56,153, 76, 38, 88,173, 86,192, 67, 82,187, 51,206,239, 77,225,181,101, 89, 86,
+208, 38, 91,183,110,193,209,163, 71,153,203,151, 47, 69, 15, 27, 54, 92, 72,164, 47,227, 51, 17,113, 5, 33,164,147,130, 33, 95,
+141,171, 23,172,250,224,249, 96,131, 66, 74,242,174,127, 53, 41,239, 78,197, 0, 67,120, 5,141, 37,186,178, 46,114,198,140,233,
+ 17, 87,175, 94, 51, 79,158, 60,249, 74,239,222,189,195, 62,248,224,131, 90,155, 55,111,110, 65, 8,249,134, 82,154,237, 70, 87,
+ 62,104,208,160,223,195,194,194,170, 46, 95,190, 60,245,254,253,251, 65, 54,155, 77, 99,179,217,172, 6,131,225, 86,126,126,254,
+ 49,171,213,186,159, 82,122,186, 36,253,213,106,181,207, 15, 24, 48, 64,150,157,157, 13,251,236, 91,164,166,166,162, 89,179,102,
+146, 29, 59,118,212, 46,205,115,144,153,153, 57,159, 16,114,104,221,186,117,237, 3, 2, 2, 26, 42,149,202,242, 0, 56,189, 94,
+159, 98, 48, 24,206,149,166,159,142,112, 28,151,114,250,244,233,170, 1, 1, 1,184,119,239, 30, 56,142, 75, 41,173,150,128, 74,
+206,220,191,112,100, 71,133,154, 33,149,113,236,248, 73,168,228,204,253,135,213, 20,249,215, 35,228, 72,193,209, 56,185, 48, 70,
+199,227,226,226,212, 51,103,206, 68, 92, 92,220, 37,103, 17, 65,131, 82,218, 37, 46, 46,238,146,208,206,161,253,145,178,234,176,
+212,126, 32,183, 95, 24, 82,169, 52, 57, 45, 45, 45, 72,167,211, 21, 26,171,196,196, 68, 36, 38, 38, 66,161, 80, 32, 62, 62, 30,
+ 10,133,194, 99,168,220,142, 73,173, 86,255, 89,191,126,253,103,111,223,190, 45,255,252,243,207, 43,156, 62,125, 58,160, 89,179,
+102,207,169,213,106,142, 82, 10,147,201,196, 92,185,114,197,127,238,220,185, 81,141, 27, 55,182, 52,110,220,248,204,134, 13, 27,
+140,240, 80,116,148, 16,114, 42, 41, 41,169, 74,165, 74,149, 0,252, 61, 67, 75, 88, 28,141, 22, 80, 48,180, 41,149, 74,207,120,
+124, 82,164,210, 11,215,175, 95,111,167, 81, 41, 97,209,231,194,154,151, 11, 86,175, 7,167,207, 1,151,147, 3, 24,114,161, 96,
+ 89,200, 56, 27,212, 42, 21, 30, 36, 36, 64, 42,149, 94,240,164,169, 80, 40, 46,164,164,164,180,211,233,116,133, 95,158, 54,150,
+ 45, 88, 56, 14, 22,150, 45,140, 96,201,100, 50,220,191,127, 31, 10,133,194,163,230,163,128, 97, 24, 78, 40,197,224, 10,133, 66,
+129,240,240,112,190, 73,147, 38, 24, 49, 98, 4, 56,142, 3, 10,234, 20,182, 34,132, 28,163,148,230,185,211,228,121,158,185,114,
+229, 74,247, 91,183,110, 73,100, 50, 25,243,226,139, 47,214,105,222,188,185, 69,161, 80, 64, 46,151, 75,243,242,242,180,251,247,
+239, 87,217,108, 54, 98,215,252,199,234, 96, 1,112,105,106,133,100,116,163,209,136,188,188, 60,100,101,101, 73,213,106,245,179,
+207, 61,247,220, 73,139,197,178,145,101,217, 85,183,111,223,206,117,167,105, 55,100, 0, 10,204, 22,207,243,160,148,130,227, 56,
+216,108, 54,200,229,114,254,240,225, 35,152,187, 96, 54,190, 91,181,150,118,235,214,141,236,216,177, 3, 60,207, 39, 60,154,179,
+ 20,113, 98, 94,246,143,211, 85, 96, 57,131,249,240,186,188,239,111,228, 26,166,126,191,240, 79,139, 66,146,251,194,203,225,117,
+171, 84,126, 86,162,211, 5, 49,203, 86, 44,202,248, 97,237,166, 91,247,238,221,203, 93,178,100, 73,211,103,159,125, 54,240,220,
+185,115, 81, 0, 92, 26, 44,127,127,255, 74, 3, 7, 14, 28,152,149,149, 37, 95,187,118,237,234, 7, 15, 30, 28,166,148,254,229,
+216,134, 16,210,128, 16, 50, 7,128, 12, 64, 56, 10,242,191,126,161,148,174,241,208, 95,158, 16,130,131, 7, 15, 22,155,237,199,
+ 63,156, 43,207,170, 91,183,238,243, 55,110,220,216,158,156,156,252,189,243, 70,141, 70,211,173, 78,157, 58,125, 78,157, 58,245,
+ 49,165,244,150, 43, 1,119,228,231,231,143,223,180,105,211, 28,137, 68, 18,201,113, 92,162,209,104, 28,255, 16,253, 4, 0,152,
+108,252,224,184,101,235,191, 54, 90,184,138,106,133,228,158,201,198,191,243,176,154, 34,143, 31, 47,193,154, 52,135,232, 83, 26,
+ 0,226,244,248,156,253,111,139, 67,219, 52,187,110, 23, 0, 22,167,168,151,171,109,105, 40,195, 34,231,238, 42,185,255, 15, 64,
+ 99, 0,167,100, 50,217,162,183,222,122,107,238, 15, 63,252,160,205,205,205, 69, 74, 74, 10, 82, 83, 83, 33,149, 74, 17, 16, 16,
+128,165, 75,151, 26, 83, 82, 82, 22, 57,238, 67,157, 42,190,219, 49,133,132,132,252,185,118,237,218,242, 95,125,245,149,244,237,
+183,223,142,127,229,149, 87,106, 44, 93,186,244,182, 92, 46,167, 28,199, 17,179,217, 76,222,125,247,221,170, 11, 22, 44,184, 43,
+145, 72, 52,189,122,245, 34,126,126,126,167, 80,112,225,113, 73, 90, 90,218, 47,219,182,109,235, 62,118,236, 88,165,197, 98,113,
+ 25,185, 18,214,233,116, 58,252,246,219,111,150,172,172, 44,143,201, 68,102,179,249,151, 61, 63,255,212,242,205,222,189,229, 54,
+125, 46,108,250, 92,176,185,185,224,244,217, 32,121,185,144,113, 44,212,114, 30,229,163, 85, 96,141,254,248,233,143,115, 54,179,
+217,236,177, 32, 97,110,110,238, 47,199,190,251,174, 85,227,152, 24,233,111,163, 71,195,106,179,161,211,245,235,133,166,202,106,
+181, 98,123,221,186,224, 8, 65,189, 33, 67,112,147,101,217,220,220,220, 95, 60,105, 62, 46,206,159, 63,159,218,175, 95,191,211,
+ 60,207, 55, 64, 9,162, 57, 2,254,254,254,250,188,188, 60,164,167,167,115, 25, 25, 25, 38, 0, 72, 77, 77,205,218,177, 99,199,
+ 21,158,231, 27,151, 70,179, 44,176,217,138,126,174, 4, 35,196,218,205,111,106,106,170,226,167,159,126,106,121,229,202, 21,249,
+197,139, 23,113,244,232,209,122, 63,252,240,195,255, 98, 98, 98,234,198,199,199, 39,187,210,116, 52,109,174,138,245,194,158, 95,
+184, 97,221, 70, 12, 29, 58,148, 36, 39, 39,227,199, 31,127,132,183,162,167, 34,101,134, 1, 44,167,182, 28, 94,151,247,202,207,
+247,244, 39,146,140,159, 3,216, 75,141, 44,173, 80,161,194,249,134, 13,131, 66, 0,192,108,226,202, 87,175, 94,253,101,169, 84,
+170, 0, 0,127,127,255,134,193,193,193, 75, 1, 52,119, 37,250,218,107,175,189, 20, 22, 22, 86,127,247,238,221,231, 30, 60,120,
+112,196,217, 92, 1,192,179,207, 62,251,217,197,139, 23, 59,201,100,178,194, 55,134,125,246,148, 75,131,213,170, 85,171,103, 99,
+ 98, 98,130,127,190, 17,136, 92,121, 53, 80, 73, 14, 32, 85,129,211, 61,143,120,121, 45, 68, 71,159, 12,214,233,116,245,178,179,
+179,207,185,218,223, 29,132,144,138,189,122,245,250,105,229,202,149, 53, 59,118,236,168, 0, 80,204, 96,213,172, 89,243,245, 95,
+127,253,181,199,176, 97,195,158, 39,132,116,165,190,221,173, 3, 0, 64, 41,141, 7,208,163, 36,125,242,198,190,155,116, 63,236,
+ 53,203, 68,254, 51,148,164,116, 66,153,148, 89,120, 88,220, 13, 17, 54,230,121,190, 27,195, 48,176, 90,173,113,225,225,225,219,
+123,245,234,245,218,255,254,247, 63,255,224,224,224,194,200,213,210,165, 75,141,119,238,220,217,108,181, 90,207, 18, 66,166, 36,
+ 38, 38,118,139,140,116,251,189,160,255,226,139, 47,214,119,237,218,245,237, 33, 67,134, 24,235,214,173, 27, 80,163, 70,141,252,
+227,199,143,251,199,198,198,230, 74, 36, 18,250,219,111,191,105,171, 86,173,106, 34,132, 40,127,253,245,215,140,147, 39, 79, 86,
+141,139,139,251, 6, 5,211,166,221,177,110,218,180,105,147,187,117,235, 86, 53, 56, 56, 24,185,185,185, 69, 76,150,240,183, 74,
+165, 66,114,114, 50,182,108,217,146,100,179,217,190,241,244,164,176, 44,187,100,241,210,101, 99, 90, 55,121, 49, 42, 64,163, 70,
+114, 66, 60,184,156, 44,192,144, 7, 5,107,131, 90, 65, 17, 85, 77, 3,169,196, 15,183,146,243,240,221,241, 63,146, 89,150, 93,
+226, 73,211, 98,177, 44, 25,181, 96,193,152, 19,203,150, 69,197,244,236,137,203,107,214, 20, 14, 9, 10, 6,139, 35, 4, 21,219,
+182, 5, 19, 24,136, 25,203,151,167, 88, 44, 22,143,154,143, 2,158,231, 37, 22,139,251,226,244, 22,139, 5, 60,207, 39, 92,190,
+124,121, 61, 33, 68, 79, 8,105,101,223,116,200, 85,244,202, 81,147, 97, 24,190, 86,173, 90, 91,195,195,195,187, 3, 48,212,170,
+ 85,107,171, 82,169,108, 99,177, 88, 94,228,121, 62,225,236,217,179, 91, 8, 33,201,132, 16,225, 87,198, 63, 90, 7,203,102,179,
+ 97,202,148, 41,152, 57,115, 38, 38, 78, 44,184, 91,138,197, 98, 41, 28, 38,204,206,206,174,124,236,216, 49,249,225,195,135,233,
+242,229,203, 51,222,126,251,109,221,144, 33, 67,116, 95,125,245,213,251, 0, 92,254, 42,183,217,108, 24, 63,126, 60,150, 47, 95,
+142,161, 67,135, 22,219, 46,145, 72,248,132,132,251, 48,153, 76,244,139, 47,190, 72,148,201,100, 65,223,124,243,141,250,157,119,
+222,249, 87,228,160,253, 7,248, 72,221,239,227,247, 80,112,141, 89, 68, 41, 61, 36,108, 8, 8, 8, 80,111,221,186, 77, 10, 0,
+155, 55,109,145, 81, 74, 3,133,194,176,223,127,255,189,170, 89,179,102, 97,238, 68, 55,109,218,148,253,249,231,159, 7, 15, 30,
+ 60,184,227,161, 67,135, 52,132,144,159, 81,112,209, 79, 7,192, 1, 8, 1,240, 91,104,104,104,196,250,245,235,171,181,111,223,
+222,207, 91, 71,245,122,253, 55,235,215,175,175,180,224, 88, 32,126, 54,116,199,125,190, 39,168,142,162, 92,152, 30,181,252,239,
+161,111,223,190,145,139, 22, 45,250, 26, 64, 67, 95, 79,158, 16, 82,251,141, 55,222,216,182,114,229,202,202, 67,134, 12, 73,248,
+237,183,223,238, 19, 66, 62,115,209, 52, 99,192,128, 1,241,171, 87,175,174,198,243,252, 94, 66, 72, 71, 74,233, 13, 95,143, 35,
+ 34,242, 95,132,184,202, 95, 34,132,108,103, 89,182,155, 84, 42,221, 65, 29, 10,141,134,135,135,143,177, 88, 44, 17,132, 16, 42,
+151,203,147, 83, 82, 82, 22, 57, 22, 26, 77, 72, 72,232, 22, 29, 29, 93,184,143,189, 88,166, 99,173,140,128, 78,157, 58,181, 59,
+113,226,196,151,187,118,237, 74,213,235,245,254,155, 54,109, 82,207,156, 57, 51,158,231,121, 58, 97,194,132,152, 14, 29, 58,228,
+115, 28,151, 52,100,200,144,170,149, 43, 87, 30,114,245,234,213,253,112, 48, 88, 46, 52, 65, 8,169, 93,173, 90,181,223, 54,111,
+222, 28,160,211,233,144,154,154,138,204,204, 76, 24, 12, 6,112, 28, 7,153, 76,134,180,180, 52,124,254,249,231,185,137,137,137,
+197, 10,141,186,209,108, 92, 41, 42,234,151, 69,159, 77,209,234,164, 12, 50,174, 93, 1,155,149, 1, 25,107, 67,133,218,129,144,
+ 43,212,184,121, 93,143,247,215,109,209,223,203,204, 46, 86,104,212,157,230, 11,213,171,239, 95, 62,110,156,191,233,254,125, 68,
+ 12, 28,136,252,252,124, 88,173, 86, 48, 12,131,191, 22, 45,130, 60, 52, 20,147, 55,108, 48, 92,186,119,175, 45,117, 42, 52,234,
+ 74,243, 97,113,212, 36,132, 12, 39,132, 20, 38,185,191,246,218,107, 69,218,110,219,182, 13,203,150, 45,131,217,108,102, 41,165,
+ 99, 40,165, 75, 9, 33,254, 0,224,104,174,220,105, 86,170, 84,233, 94,157, 58,117,254,224, 56, 78, 10, 0, 18,137,132, 94,190,
+124,185,225,157, 59,119, 42, 56,105, 10, 67,215,172, 43,205, 71,113,238,193,193,193,139,118,239,222, 93, 41, 44, 44,140, 56, 86,
+ 88, 7,254,206,157, 27, 49, 98, 68,219,147, 39, 79, 42,235,215,175,111, 78, 79, 79,111, 20, 26, 26,122, 96,237,218,181, 33,189,
+122,245, 74,188,116,233, 82,148,179,102, 72, 72,200,220,205,155, 55, 87,171, 86,173, 26, 35, 68,193,156,135, 33, 7, 13, 26,212,
+110,237,218,181,138,238,221,187,155, 13, 6, 67,184, 86,171,189,181,121,243,230,144, 87, 95,125, 53,249,210,165, 75, 17,255,196,
+185,139,154,174,169, 83,167,206,205, 75,151, 46, 85, 19, 30, 27,141, 70,164,165,165, 33, 61, 61, 29, 58,157, 14,177,177,177,127,
+221,185,115,167,154, 43, 77,123, 84,104,225,138, 21, 43, 58,250,249,249,201,143, 28, 57, 98,216,191,127,191, 41, 62, 62,158,181,
+217,108, 52, 34, 34, 66,218,188,121,115, 85,231,206,157,253,148, 74, 37,243,241,199, 31,167, 79,159, 62, 61,132, 16,178,144, 82,
+250,190, 43,205, 6, 13, 26,252,190,103,207,158,198,132, 16, 72, 36, 18, 88, 44, 86,100,103,103,227,193,131, 4, 92,190,124, 25,
+ 39, 78,156,192,190,125,251,206,229,229,229,213,247,245,220, 9, 33, 7,204,102,115, 43,133, 66,225,179,161,231, 56, 14, 82,169,
+244, 32,128,118,148, 82,254,105,123,221, 69,205,199,167,249,180,225,105,118, 30, 0, 52, 38,132,108,183,175, 58,229, 92,138,129,
+ 16,242, 63, 66,200, 20,251,195,198, 62,164, 0,228,238,222,189,251,104,187,118,237, 70,180,109,219,118, 65,251,246,237,147,146,
+146,146,170,204,159, 63, 63,154,101, 89,235,229,203,151,153, 91,183,110,197,255,249,231,159,213,158,121,230,153, 33, 87,175, 94,
+ 61, 12,207,209, 43,161,175,151, 9, 33,205, 90,183,110,189,101,200,144, 33, 21,155, 52,105,162,208,233,116,144, 74,165,184,125,
+251, 54,206,157, 59,103,217,176, 97, 67, 66,118,118,182,207,183,202,161,148,158, 34,132,196,246, 26, 57,102,243,144,215,186,134,
+188, 88,227, 89, 69, 68, 68, 4, 96, 52,226,218,189,100,156,188,118,206,186,242,232,201, 52,179,217,252,134,179,185,242,162,217,
+174,205,184,113,155,167,190,249,102, 56,146,146,164, 17, 17, 17, 80, 40, 20,184,115,231, 14,110,241, 60, 59,107,197,138,148,220,
+220,220,127,252, 86, 57, 66,205, 42,158,231,165, 0,160, 86,171, 49,106,212, 40, 56,222, 26,103,217,178,101, 48, 26,141, 0, 32,
+ 37,132,204, 33,132,172,114, 23,181,114,163, 89,241,231,159,127,174,232,168, 89,179,102, 77, 87,154,101, 54,139,195, 87, 50, 51,
+ 51, 39,119,234,212, 41, 78, 42,149,186,173, 86, 27, 20, 20, 4,189, 94, 15,150,101,185, 7, 15, 30, 92, 11, 10, 10,130, 76, 38,
+ 3,165,212,229,231, 40, 35, 35, 99,242, 27,111,188, 49,141, 97, 24,183,145,142,128,128,128,248, 3, 7, 14, 84,127,231,157,119,
+152,111,191,253,246,246,224,193,131,149, 7, 14, 28,224, 74, 91,211, 72,228,209,225,248, 99,212,254,227,205,109, 73, 4, 74,233,
+ 61, 66,200,248,211,167, 79,171,134, 14, 29,218,240,205, 55,223, 12,104,221,186,181,191, 99, 27,163,209,200,239,220,185,211,176,
+124,249,242,140, 35, 71,142,252, 49,104,208,160,238, 40,200, 31,113,201,189,123,247,126,154, 49, 99, 70, 96,231,206,157,159, 1,
+ 80,152,127,149,150,150,134,248,248,120, 92,188,120, 49,222,106,181,238, 40,225,105,141,232,215,175,223,207,171, 87,175,142, 25,
+ 50,100, 72,194,143, 63,254,184, 3, 64,142,139,118,254,175,191,254,122,183,213,171, 87,199,188,251,238,187,247, 0,140,166, 98,
+133,119, 17, 17,143,184, 51, 88, 57, 60,207,195,100, 50,133,243, 60,223,141,231,121,248,251,251,187,106,215, 56, 49, 49,177,155,
+227,205,158,225,229,182, 54, 0,210,246,239,223,255,203,186,117,235,218, 78,152, 48,225,205,236,236,236,198,231,207,159,111, 2,
+ 0, 50,153,236,132,159,159,223,239,113,113,113, 3,199,143, 31,159, 6, 31,204,149,128,221,100,213,154, 59,119,110,153,221,236,
+217,110,136,170, 47,217,184,101,196, 55, 74,101,172,211,205,158,127,177,223,236,185, 68, 55,102, 22, 52,199,125,253,245,136,128,
+141, 27,255,181, 55,123, 54,155,205,108,247,238,221,191, 97, 24,134, 7, 0,142,227,164,102,179,121, 32, 74, 56,243,212, 89,243,
+181,215, 94,251, 86, 34,145,176, 0,192,243, 60, 99, 54,155,255,239, 97, 52,203, 10,187, 81, 28,233,169,205,115,207, 61,183,118,
+199,142, 29,253,186,117,235,198, 89,173,214,212,174, 93,187, 74,127,255,253,119,202, 48,140,203, 95,113,118,163,248,161, 39,205,
+242,229,203,199, 44, 94,188,248,204,232,209,163, 3,214,173, 91, 87,238,216,177, 99,220, 23, 95,124,145,155,153,153, 57,175,244,
+103, 35,242, 40,144,201,100,208,104, 52,176, 88, 44, 72, 75, 75,115, 57,123,217, 17, 74,233, 45, 66,200, 43,227,198,141,107, 49,
+110,220,184, 87,162,163,163,107, 87,172, 88,177, 34,195, 48, 76, 82, 82, 82,218,253,251,247,239, 90,173,214, 95, 1,252, 4, 64,
+ 94,181,106,213,179, 0,214,186,211,203,200,200,152, 70, 8, 57,184,102,205,154, 87,252,252,252,106,169, 84,170,114, 54,155,141,
+209,235,245,153, 70,163,241,138,201,100,218, 69, 41, 61, 94,146,115,162,148, 94, 39,132,180,150, 74,165, 63,173, 92,185,178,102,
+ 82, 82, 82,165,195,135, 15,119,117,110,215,176, 97,195,213,171, 87,175,142, 25, 54,108,216,173,117,235,214,149, 40, 7, 75, 68,
+228,191,138,187, 47,182, 25, 10,133, 66, 10,251, 77,159,237,184,138,168,156,114,202,185,202, 1, 48,195, 69, 59,103, 12,125,251,
+246,189,211,183,111,223, 57,246, 62, 72, 80, 80,138,129, 69, 65, 6,191, 21, 94, 74, 51,184,194, 62,164,244,181,125, 41, 19,236,
+102,103, 46,202,176,224,231,163,208,124, 88,132,154, 85,246, 89, 77, 0, 48,238,236,217,179, 75, 29,219, 16, 66,206, 59,110,247,
+ 22,105,114,165,121,238,220, 57,103,205,139, 37,209,124,156,100,103,103,143, 89,188,120,241,169,137, 19, 39, 42, 7, 12, 24,128,
+139, 23, 47, 98,230,204,153,230,236,236,236,117,165,213, 76, 78, 78,142, 47, 95,190,124,131,133, 11, 23,126,176, 96,193,130, 87,
+ 9, 33,226,189, 8,255, 37, 24,141,198,191,158,127,254,121,144,130,217, 9,148,101,217,194,217,159,246,138,252,197, 18,215,157,
+177, 95,147, 14,218, 23,111,204,241,214,192, 94,182,164, 76, 75,151,216,163,109,175,220,189,123,119,198,245,235,215,247,184,106,
+115,233,210,165,109,237,219,183,215,156, 56,113, 98, 82, 73,103, 17,138,136,252, 87,113,105,176,236,191, 78,222,244,182,179,155,
+217,130,190,194,193,123,180, 75,228, 31,196,158,255,180,202,254,119, 49,163,227,109,251, 63,165,249,184, 72, 72, 72,200, 2, 80,
+120,203,144, 42, 85,170, 20,203, 83, 43, 13,118, 51, 53, 10, 98,229,246,127, 21,183,111,223,238,244,184,251,240, 79, 65, 41,189,
+ 7,160,159,187,237, 22,139,101, 7,128,146, 14, 63,138,136,252,167,121,236, 67, 51, 34,255, 46,124,137, 74,253, 27, 52, 69, 68,
+ 68, 68, 68, 68,254,205, 16, 0, 46,111,146, 89,146,217, 1,132,148,252, 70,155,222,244, 69, 77, 81, 83,212, 20, 53, 69, 77, 81,
+ 83,212,124,250, 52, 29,180, 23,184,217,116,205, 73,239,171,146,246,225, 95, 1,165,244,145, 45, 40,152,198, 43,106,138,154,162,
+166,168, 41,106,138,154,162,166,168, 89,154,227, 12,249, 39,142,243, 40, 22,241,134,178, 34, 34, 34, 34, 34, 34, 34, 34,101,140,
+203, 28,172, 77,155, 54, 73,132,191,251,244,233, 51,136,227,184,194,233,235, 18,137,100,241,143, 63,254,184,202,147,104,143, 30,
+ 61, 56, 79,154,174,240,118, 28, 87,154,117,158, 13, 28, 22, 28,168, 25,147,157,147,191,240,118, 34,119,212,100, 50,213, 18,182,
+169, 84,170, 43,171, 86,173,242, 88,105,184, 52,253, 28, 52,104,208, 51,206,199,169, 20, 45,107, 85, 78,171, 26,149,153,157, 55,
+255,226, 13,253,147, 25,202,124,130,232,217,179,167,199,215,200,153, 59,119,116,204, 25, 68,204, 11,240,147,119,205, 51,216,230,
+113,167,167,124,249,168,250,246, 79, 18, 17, 17, 81, 35, 32, 32,160, 63,128,218,249,249,249, 97, 26,141, 38, 21,192,229,220,220,
+220,181, 73, 73, 73,215,188,237, 47,208,170, 50,137, 7, 80,209,254,240,222,161, 59, 52,198,151,109,222,232, 80,141,152, 40,160,
+ 36, 4,214,189, 55,105,225, 13, 46, 59, 86, 39, 38,158, 22, 95,223,161, 58,177, 80, 10, 57, 1,204,123,111, 81,223,238,202,254,
+ 4, 64, 8, 9, 0, 16, 11,160, 14,128,243, 0,246, 81, 74,125,187, 67,188,136,136,200, 19,139, 75,131, 53,104,208,160,150, 10,
+ 41,253, 18, 60,213,129,210, 96,179,217, 44, 83, 40, 20,176, 88, 44,208,168,213, 75,134,254,223,128,207, 64,144,109,229,153, 81,
+171, 86,173, 42,245,157,167, 75,114, 39,169, 54,227, 0, 0, 32, 0, 73, 68, 65, 84,156, 30, 61,122, 20,155,230, 28, 20,160,158,
+118,104,231,132,160,150,175,196,205,180,220,201, 28,175,215,235, 25,165, 82, 9,179,217,140,192,192,192,102, 35,135, 12,110, 72,
+ 25, 98,145,171,252,142, 47, 88,176,192,229,189,226,124,225,253,247,223, 47,207, 90, 13, 47, 81, 27, 85, 88, 44, 22,165,243,113,
+116, 26,191, 89,135,118, 78,208,188,220,101,230,103, 0, 68,131,245, 47,162,192, 92,149,255,234,189,190, 47, 14,152, 61,186, 29,
+116,173,102,141, 7,240, 68, 27, 44, 66,136,164, 74,149, 42, 35, 98, 98, 98,122,175, 88,177, 66, 94,165, 74, 21,168, 84, 42, 24,
+141,198,136,191,254,250, 43, 98,216,176, 97, 47, 87,173, 90,117,253,237,219,183,151, 80, 74,139,253,136,112, 65,197, 67,171, 63,
+ 6, 0, 52,235,255,121, 69, 66,200,135, 0,242, 1,224,229, 74,127,111,107, 53,224,243,138,132,144,113, 40, 58,251, 55,137, 82,
+234,114,118, 25, 5, 20,187,214,204, 69,183,183, 62,148, 18, 66,134, 9,235, 59, 63, 3,236,249,126, 17, 58,246, 25, 83,100,125,
+135,170,144,238, 92, 51, 23, 93,222,250,208,237,221,198, 59, 62,195,216,120,222,117, 97, 87, 0, 96, 24,194,238,189, 73, 93,221,
+248, 55,133, 82, 90,236,126,161,132,144, 14, 40,184,209,178,203,246, 93,106, 74, 83,172, 54,206,101,161, 88,185, 76,146,186,235,
+ 42, 91,108,223, 1, 13,136,205,198, 21, 92, 91,229, 82,112,129,129,129,135, 62,250,232, 35,105,151, 46, 93,176,114,229,202,230,
+ 95,125,245,213, 16, 66,200,175, 0,118, 80,177,228,129,136,200, 83,139,203, 11,149,130,161,203,247,174, 91, 86, 45, 57, 45, 19,
+189,135,253, 15,235,214,173, 67, 86, 86, 22,130,130,130,160, 80,200,101, 75,103,140, 47,175,211,106,202,247, 26, 57,101, 57,128,
+ 26,165, 61,120, 9,143, 83,221,121,127, 98, 47, 68, 42,149, 72,101, 10,133,140, 89,191,126, 61,178,179,179,161,211,233,160, 80,
+200,152, 69,159,143, 85,235, 2,252,212,111,142,153,218, 28,192,198,210,246,147, 53,230, 53,223,249,253,226,128,148,180, 12,244,
+ 27, 53, 25,206,199,145,201,229, 28, 80,240,133, 82,218, 99,136, 60, 60,233,233,233, 4, 0, 66, 66, 66, 40,224,104,174,154, 12,
+ 88, 48,182, 61,222,159,191, 15,249, 38, 75,177, 27,217, 62,105, 84,169, 82,101, 68,207,158, 61,123, 79,155, 54, 77,206, 48, 5,
+163,252, 6,131, 1, 70,163, 17, 81, 81, 81, 56,116,232,144,124,242,228,201,189,183,109,219, 6, 0, 95,148, 84,255,210,165, 75,
+149, 42, 86,172,104, 2,128,174,117,181,206,219, 98,132,109, 0,160,213,106,225,141, 96,157,159,249,210,165,147,181,133,253, 70,
+180,141,226,220,172, 55, 1,208,120,210,226,121, 42,221,247,229, 48,183,219,223,153,246, 3,123,126,227,209, 26, 85,170, 84, 49,
+ 58,174,119, 83, 40, 25, 0,194,243,242,242, 42, 58,175, 20,218, 91,109, 92,152,187,227,181, 31,181,204,165,241,178,113,144,254,
+240,195, 15, 0,128,121, 31,246,147,124,253,123,186, 84, 42, 45,184,212,206,153, 51, 7, 83,167, 78, 85,236,221,187,183,243,154,
+ 53,107, 58,219,111,141, 35,150, 63, 16, 17,121, 10,113,105,176, 8,129, 54, 64,235,135,110,111,143,194,238, 61,123,209,178,101,
+203,194,109,149, 43, 87, 70,159,215,187, 98,219,138, 56, 48, 32,222,175,174, 30,120,216,227,100,229, 24, 62,233,212,251,139,207,
+239, 37,231,157,216,181,235,103,180,104,209,162,200,254,111,246,234,142,205, 75,167,131, 80, 42,127,152,126,242, 12,149, 7, 4,
+248,225,141,193, 99,224,234, 56, 67, 7,116,219,213,177,199,162,118, 41, 25, 6,119, 51, 34, 68, 30, 17, 87,175, 94,149,152,205,
+230, 62, 1, 1, 1, 77,100, 50, 89,184, 82, 87,145, 79,148, 54,206, 72, 35, 85,110,167,134,229,183, 28,219, 46,188,227,188,247,
+ 90,227,253,249,251,176,112,221,201,213, 13,144, 60,197,187,234,191,151,136,136,136, 26, 49, 49, 49, 69,204,149, 94,175, 71, 94,
+ 94, 30,114,115,115,161,215,235,193, 48, 12,198,143, 31, 47, 63,124,248,112,239,136,136,136,253, 62, 12, 23,222,107,214,255,243,
+ 2,147, 33,145,229, 77,153, 50,197, 28, 22, 22,102,214,104, 52, 84, 42, 87,234, 91, 13,248, 92, 11, 0,140, 84,174, 95,184,112,
+161, 37, 42, 42,202, 36,149, 74, 21, 99,198,140,241, 41,135,211,108, 54, 83, 71, 77,139,197, 92,184,126,214,172, 89,150,240,240,
+112,179, 70,163,161, 86,171,251,155,140, 59,115,225, 78, 38,148,114, 9,148,114, 9, 84, 10, 25,180,149, 26, 65,153,117, 17, 44,
+203, 98,246,236,217,214,242,229,203, 91, 52, 26, 13, 85, 40, 20,242,209,163, 71,123,237,231,160, 65,131,168, 78,167,179,106, 52,
+ 26,249,212,169, 83,139,221,151,239,192,249, 7, 80, 43,100,208, 40,165,168, 94, 57, 26, 74,106,116, 37,227, 18,137,164,232,136,
+182, 82,169, 68,243,230,205, 81,187,118,109,108,223,190,189, 21,196,250, 82, 34, 34, 79, 37, 82, 0, 32,132,188, 12,224, 16, 0,
+ 80, 74, 9, 0, 48,160,248,116,112, 71, 12,121,171, 39, 56,142, 47,200,138, 7, 32, 33, 4, 31,246,110, 9,158, 99,193,195,235,
+173, 34,188, 78,213, 44,233,113, 28, 53, 41, 97, 36, 0, 80,163, 98, 48, 29, 58,176, 47,120,174, 96, 52,132, 3, 32, 3,240, 65,
+207,230,224, 56, 27,120, 47, 69,225,125,235, 39,143,143, 7,181,135,171,227,212,168, 26,206,152, 57, 22,196,225,102,140,190,104,
+150, 20, 81,179, 40,199,143, 31,143,208,104, 52,243,251,245,235, 23, 57,122,244,104, 5, 39,213, 73, 55,157,200, 8,156,176,244,
+ 68,100,190,217, 42,233,219,186, 18,198,190, 89, 23, 99, 23, 30, 16,204,213,144,202,149,179,159,232,215, 40, 32, 32,160,255,138,
+ 21, 43,138,153,171,148,148, 20, 38, 47, 47, 15, 86,171,149,215,235,245,224, 56, 14, 19, 39, 78,148, 77,158, 60,185, 63, 33,100,
+170, 93,199,236, 74,243,208, 29, 26, 67, 8, 25,119,233,210,165,152,143, 62,250,200,218,166, 77,155,123,149, 43, 87, 54, 72, 36,
+ 18, 68, 68, 68, 44,138,141,141, 45, 55,109,218, 52,107,231,206,157,239, 74, 36, 18, 84,175, 94,221,112,241,226,197, 24, 0,106,
+ 95,207,221, 81,115,213,129,197, 20, 0, 8, 33,136,141,141,141,175, 94,189,186, 65, 34,145,224,198,206, 89,197, 46, 40,238, 52,
+101, 82, 6,207, 68, 5, 22, 60, 32, 4, 80,251, 3, 89, 5, 15, 99, 99, 99, 19,106,212,168,145,199, 48, 12, 46, 92,184, 16, 13,
+160, 72, 62,151, 43, 77,181, 90,109,235,219,183,239,189,107,215,174, 21,107, 15, 0, 82, 9,131, 38, 53,236, 1,171,168, 6, 64,
+194, 49,183,253,148, 73,192, 78, 30,209, 79,170, 83, 1, 74,109,136, 57, 55, 55, 23, 1, 1, 1, 0, 0,171,213,138,179,103,207,
+162,105,211,166, 47,111,220,184,241,176,155,167,203,227,185, 63, 12,162,166,168,249,111,214,116,229, 69,158,100,132, 8,214, 33,
+231,147,225, 57, 22,213,162,130,177,244,195, 55,192,178, 28, 56,142,183, 47, 28, 88,150,135,205,106,129, 23,127,229, 19, 15,115,
+156,160, 0,245,180,221,235, 71, 7,181,125,117, 78,219, 47, 63,120,253, 23,222,102, 3,199, 3, 44,199,131,179,113,224,121, 30,
+ 54, 75,217,212,176,228,109, 28,170, 69, 6,227,203, 15, 94,135,243,113, 22,255,180,175,235,129, 29,227, 53, 45,187,204,252, 0,
+192,236, 50, 57,160,136, 71,174, 94,189, 42,209,104, 52,243,215,174, 93, 27,211,168, 81, 35, 6, 0,142, 94,103,149, 19,150,158,
+136,220, 27,215,140, 52,171, 29,140,212,108, 51,198, 44, 57,135,221, 39, 82,247, 56,155,171, 39,152,218, 85,170, 84, 1,240,183,
+185,154, 59,119,110,200,210,165, 75,163, 0,224,141, 55,222,120,208,182,109,219,244,235,215,175, 35, 34, 34,130,164,167,167,191,
+ 2, 96, 12, 0, 16, 66,198, 81, 74,151,186,209, 53, 84,172, 88,209, 20, 26, 26,106, 22,140, 16,195, 48,144, 74,165,168, 88,177,
+162, 41, 44, 44,204, 92,189,122,117,131, 92, 46, 7,195, 48, 16, 12,158, 47, 16, 66, 32,145, 72, 32,104, 58, 34,145, 72, 32,104,
+150, 4,153,212,161,189,211,245, 65, 56,142,171,227,185, 67,165, 82, 81, 0,110,219, 75, 24,135,203,163,212,115, 38,192,234, 51,
+ 84, 70, 8, 57, 68, 41,197,153, 51,103,112,251,246,109,200,229,114,148, 47, 95, 30, 83,167, 78,133,217, 92,112, 77,234,217,179,
+231,203, 0, 46,248,212, 65, 17,145,255, 6,197,188,200,147, 76,145, 33, 66, 66,200,203,148,210,195, 0,192,177, 54,112, 28,239,
+210,244, 88,109, 44,108, 86,159,239,195,236, 17, 79,199,225, 56,206,227,113,132, 28, 44,158, 82,169, 75,115,197, 23,220, 55,172,
+ 76,250,201,219, 96,227, 80,204, 92,241, 60, 15, 66,152,130,144, 22,197, 67, 13, 69,138,248,142,217,108,238,219,175, 95,191, 72,
+193, 92, 1, 64,186,222, 38,205, 55,219, 36,205,106, 7,163, 97,235,158, 56,125,112, 35, 54, 28,121,128,170,161,154, 35,149,253,
+158, 10,115,133,252,252,252, 48,149, 74, 5,131,193, 80, 24,185, 90,186,116,105,148,197, 98, 97, 0, 64, 42,149, 69,167,241, 81,
+ 42,142, 7, 2, 3,146,144,149,149, 19, 44, 92,176, 8, 33,115, 8, 33,171,168,135,202,249,114,185,188,208,152, 56, 26, 31,165,
+ 82, 89, 42,227, 34, 32,152, 50,185, 92,238,114,189,243, 48,154, 55,228,142, 6, 11,180, 32,138,229,128, 96,232,132,220, 39,111,
+ 40, 20,138,194,115,119,133, 84,226,112, 60, 73,201, 83, 45,173, 86, 43,242,242,242,144,157,157, 13,149,170, 32, 64, 70, 41, 5,
+ 33,100, 12,128,247, 74, 44, 40, 34,242, 20,227,232, 69,158,100,156,175, 62,135, 80, 80,221, 29,172,205,234,210,244,172,217,119,
+ 26,183, 50,108,136, 10,186, 12,161,173,175,244,238,221,123,117, 68, 68, 68, 19,225,177, 92,163, 13,238,255,225, 44,112, 86, 11,
+116, 74,138,247,122,180, 40, 98,174, 56,142,135,213,234, 62, 2,149,149, 99,248,164, 99,207, 69,159, 7,251,105, 79, 56,155,158,
+201,155,174,245,200,200,177, 68, 19,233, 85,100,147, 40,174,231,187,159, 14, 18,246, 99, 24,230,252,250,101, 83,198,250,218,111,
+ 74, 24, 89,215,209, 95, 13,225,228,218, 90, 1, 52,235,200,212, 62,181,182, 58,154,184, 48,127,255, 93, 29,222, 88,208, 46, 37,
+ 83,204,193,250,167, 80, 40, 20,237, 70,143, 30, 93,228,155, 46, 68, 43, 99, 53, 74, 25,247,219,229,116,114,250,224, 70,230,232,
+165,116, 94, 37,151,208, 80,122,187,202,227,234,103, 89,163,209,104, 82,243,243,243, 35,140, 70, 35,114,115,115,145,155,155, 91,
+100,187, 84, 38, 35, 67,134,142, 12,145,201, 21,176, 89, 45,216,189,118,186, 87,205, 86,149, 73,252,203,149, 80,177,107, 93, 45,
+ 36, 50,133,254,114,149, 42,139,164, 82, 41, 24,134,193,206, 37, 19,198,108,153, 63, 74, 11, 0,231,119, 45,201,237, 51,126,241,
+ 23, 12,195,192,108, 54, 43, 75,210,239,251,247,239, 71,155,205,102,147,221,152, 9,134, 15,119,238,220,169, 96, 54,155,141,142,
+235,125, 65,173,209, 2,186,202,128,166,104,158, 57, 33, 4,119,239,222,141,180,217,108,249, 82,169, 20, 22,139,197, 39, 55,196,
+ 48,140,252,194,133, 11,209, 60,207,187,108, 95,187,106, 36, 80,190, 46,160, 8,244,181,139, 66,145, 68,175,109, 8, 33,244,105,
+250,213, 46, 34, 82, 6, 20,122,145, 39, 25,193, 96,181, 34,132, 20, 94, 13, 40, 5, 88,171,181,208, 88, 21, 68,152, 10,254,190,
+147,195,227,218,141,155, 88,184,112, 33, 14,255,249, 65,224,180,105,211,148,147, 39, 79, 54,247,238,221,123, 62,207,243,207, 51,
+ 12,115,190, 71,143, 30, 99, 92, 29,140,231,249, 10,167, 79,159, 46,252,178,179,217,108,208,106,181,208,106,181,168, 83,165,124,
+ 49,115,197,218, 35, 88,238, 46, 83,148, 48, 18, 80, 0, 20,148,229,108,224,108, 40, 52, 61, 25, 57,150,232,109, 7,207, 85,115,
+104,254,172,240, 71,243, 70,181,138,139,217,233, 61,108,106,225,121,172, 95, 54,101,236,180,149, 43,149, 89, 92,248,232, 62,189,
+ 6,215,233,217,167, 63,250,189,222,241,101,147,201,182, 93,202,128,183,241, 28, 56, 27, 15,158, 82,134, 2, 69,114,176, 68, 30,
+ 29,233,233,233,196,104, 52, 86,210,233,116,133,235, 40,165,136,240, 51,152,199,247,122, 38, 49,118,194,177, 72,147,149,131, 82,
+198,208, 49,175,198, 36,254,190,109, 67,112,186, 57,157, 8,179, 11,159,112, 46,223,186,117, 43,162, 66,133, 10,200,205,205, 5,
+203,178,252, 27,111,188,241, 64, 42,149, 69, 75,101, 50,210,165,207, 72, 62, 57, 57,209,198, 48, 18, 80,202,161, 83,207,225, 68,
+169, 82,203,173, 22, 11, 11, 96,156,155,232,149, 99, 41, 6,109,108,108,108, 57, 97,102,223,150,249,163,180, 14,219, 2, 26, 54,
+108, 88,206,113, 22,161, 47, 40, 20, 10,210,187,119,111,117,197,138, 21, 9, 0,252,177,246, 35, 0,128, 92, 46, 39, 93,187,118,
+ 85, 85,172, 88,144, 95,255,235, 18,223,239,117, 29,162,161, 64,206, 29, 32,231,110,145,245, 18,137, 4, 93,187,118, 85, 86,169,
+ 82,165, 68,159, 69,123, 98,187,219,218, 91,126, 82, 22, 72, 62,227,147,214,128, 6,196,246, 81, 75, 72,231,119, 98,160,240, 15,
+ 54, 55,153,176,247,119, 79,237, 69,147, 37, 34, 82, 72, 17, 47,242,164, 35, 5, 0,123, 40,174,200,135,155,181, 89,139,153, 43,
+142,227,161,226, 12, 88,184,112, 33,222,123,239, 61, 0,144,143, 29, 59,118,235,180,105,211,186,243, 60,255, 60,165,180, 5, 33,
+238,175, 17, 12,195, 28,138,136,136, 72,161,148,202, 24,134,105,177,100,201,146,114,157, 58,117,130, 86,171, 5,229,105, 49,115,
+197,113, 60,108,102, 75,129,227,115, 65, 80,128,122,218,158, 77, 99,130,218,188, 58,187, 45,103,195, 47,130,185,226,108,127,167,
+197,103,164, 36, 96,223,158,237, 88,190,108, 69, 22, 8,189, 10, 10,158, 97,152,243,238,250,200,243,252,243,199,254,184,210,162,
+121,163, 90,152,182,114,165,242,210,233,164,173, 35,223,255,168, 78,207, 62,253,177,241,199,181,144, 88,179,206, 72,153,240,191,
+205, 21,199, 33, 77,159,219,245,192,206, 9, 98, 14,214, 99,194,102,179, 33, 43, 43, 11,182,188, 44,246,133, 8, 67,206,167, 61,
+195,204, 41, 89, 38,169,140,207,103,107, 6,164,154, 15,102,222,149,104, 52, 30,103,255, 63, 49,228,230,230,174, 29, 54,108,216,
+203, 71,142, 28,145, 51, 12,131,220,220, 92,180,110,221, 58, 61,141,143, 82, 13, 25, 58, 50, 36, 49,241, 1, 27,160,150,154,229,
+114, 25, 82, 83, 83,249,151, 59,247, 53,246, 25, 52, 38,242,189, 73, 51,190, 74, 60,190,204, 93,254, 85, 17, 28,103,246, 57,111,
+251,250,235,175, 45, 81, 81, 81, 38,165, 82,169, 24, 48, 96,128, 79,227,132, 22,139,133,206,154, 53,203,236, 60, 91,208, 98,177,
+208,133, 11, 23, 90,162,163,163,205,106,181,154,218,108,222,211, 14, 24,134,176,239, 76,251,129,101, 89,182,112,157,112,205,145,
+ 72, 36,176,241, 36,239,203, 47,191,180, 70, 71, 71, 91, 52, 26, 13, 85, 42,149,114, 95,250, 57,114,228, 72, 26, 20, 20,100,245,
+243,243,147,143, 31, 63,254,161,102, 17,218, 56, 72,167, 45, 41, 44,211,160,212,106,181,208,235,245,133,125,141,136,136, 40,182,
+143,104,178, 68, 68, 92,123,145, 39, 25,151, 9, 10, 60,229,243, 82, 82,211,195,116,145,213, 96,179,177,224, 88, 27, 88, 27, 11,
+ 27,107,195,184,129,175, 33,110, 89,193, 72,152,221,100,197,142, 29, 59,118, 43,224,253,182, 59,235,215,175,255,124,236,216,177,
+ 1, 41, 41, 41,123, 87,175, 94, 93,174, 95,191,126, 24, 55,110, 28,230,204,153, 3,169, 66,133,192,242, 49,133,199, 97,109, 44,
+ 56, 27,139,212,140, 44, 80, 74,243, 92,233, 9, 57, 88,148, 66, 26, 80,190, 50, 56, 78,216,215, 6, 70, 82, 48, 51,125,223,158,
+237,232, 55,112, 20,100,202,192,160,197, 11,103, 27,235,188, 16,209,125,242,224,193,222, 51,223, 9,152, 75,167,147,182,142,124,
+111,124,172, 96,174,182,172, 89,114,117,201,152,216,117, 26,133,180,240, 56,156,205, 6,134,145,136, 57, 88,255, 32, 33, 33, 33,
+ 52, 45, 45,237,110,118,118,246,179,126,126,126,200,200,200, 64,102,102, 38,178,179,179, 97,206,205, 98,131,185,108, 3, 97, 51,
+241,255,236,157,119, 92, 83,215,251,199, 63,207,205, 14,123, 41, 67, 4, 7, 14, 20,172,171,110, 28,173, 90,107, 29,109,197,189,
+103,181,213, 86, 91,235,172, 3,247,104,221, 86,171,214, 90, 90, 7,126, 29,173,213,186,234,172,171,162, 56,192,133, 3,217,130,
+140, 64, 8,153,247,252,254,128,208,128, 1, 18,196,174, 95,222,175, 87, 94, 33,247,158,251, 57,231, 50,146, 15,207, 57,207,115,
+132, 66, 33,158,197,235, 97, 48, 24, 82,254, 35,209, 43, 36, 39, 39,223,173, 93,187,246,238,153, 51,103, 14,152, 62,125,186,136,
+231,121,220,187,119, 15, 12, 96, 34,177, 4, 28,199, 65, 36, 18, 34, 59, 91,193,219, 57,184, 36,107,153,192, 78, 36,150,128, 19,
+136,203, 42, 56,250,180,227,240,130, 50, 13,156, 80,156, 99,204,236, 19,139,197,184, 20,177, 82,209,113,248, 2, 39, 0, 16, 75,
+229,153, 93,187,118,141,107,208,160,129,242,234,213,171,254, 40,145, 69, 88, 18, 2,244,239, 14,255, 92, 96, 39,151, 41,187,116,
+233,242,212,168,249,228,248,122,197,144, 9,179,136, 4, 18,101,143, 30, 61,226,130,130,130,148, 2,129, 0, 49, 7,151, 43,222,
+ 29,254,185,140, 10, 18,116,205,114,244, 1, 27,115, 35,226, 92,253, 69,139, 22,233,186,119,239, 30,111, 92, 15,246,228,201, 19,
+159,119,222,121, 71,186,106,213, 42,221, 59,239,188,147, 16, 28, 28,156,203,113, 28, 34, 35, 35,205,102, 5,150, 68, 46,151,235,
+ 70,141, 26,245,244,214,173, 91, 21,202, 34, 44,143,234,213,171,131,231,121,116,234,212, 9,249,249,230, 3,128, 54,147,101,195,
+198,127, 11,179, 6, 75,203,243, 31, 13,157,182,114, 61,129, 28,120,176, 98, 89, 58, 12, 0, 24,163,207, 62,251,212, 30,128,220,
+104,178, 38, 79,158,156, 89, 94,103, 38,230,170,249,160, 65,131, 48, 99,198, 12,124,249,229,151,134, 21, 43, 86, 8, 98, 30,198,
+107, 67,167,172,200, 42,209, 15, 24, 99,185, 6, 3, 62, 50,167,151,153,173,156, 27,242,206,210,249,137,169,121,231,251,126,186,
+164,216,187, 86, 22, 21, 20, 51,220,244,245, 38,165, 72,234,108,223,119,192, 16, 0,232,178,126,245,242,253, 11,177,181,124,147,
+197, 40,240,163,201,159,187, 26,205,213,134, 85,139,110,185, 82,234,186,209, 95, 68,191,176,106,222,217, 1,251, 67,222, 89,250,
+214,179, 12,229,154,242,190, 7, 54, 42, 7,141, 70,115, 98,237,218,181, 53,102,207,158, 45,201,200,200, 64,122,122, 58, 50, 51,
+ 51,139, 30,185,185,185,240,242,242,194,175,191,254,170, 85, 40, 20,151,254,238,241, 86, 38,143, 30, 61,218,240,211, 79, 63,225,
+204,153, 51,253,167, 79,159, 46,242,242,242, 34,103,231, 20,210,105, 53, 0, 24, 75, 75, 75,227,237, 28, 92,146, 61, 60,125,159,
+ 38,165, 60, 11,212,105, 53,224, 13,218, 82, 87,145, 23,150,105,248,236,246,237,219, 53, 86,174, 92,169, 49,205,236, 27,240,249,
+250,181,205,154, 53,115, 91,183,110,157,166, 71,143, 30,113,198, 69,233,150, 44,114, 63,246, 16, 31,223,190,125,179, 97, 73,205,
+142, 99, 87,110, 51,106,154,102, 23,246,252,116,243,182, 58,117,234,184, 5, 5, 5,197,149,165, 91,171, 86, 45,149,183,183,183,
+166,126,253,250,185, 34,145,168, 32,114,165,211,229,213,170, 85,139,247,244,244,212, 52,104,208, 32,215,218,197,248,114,185,156,
+ 1, 47,214,172, 50, 98, 77, 22,161, 72, 0,253,160, 65,131,138, 42,185,127, 86,167, 78,242,144, 33, 67,188,167, 76,153,130,109,
+219,182,225,247,223,127,207, 40,121, 77,135, 14, 29,112,246,236,217,249, 0,230, 90, 52, 96, 27, 54,108,252,227, 49,107,176,182,
+111, 15, 63, 9,147, 53, 75,230, 88,184,112,161,180, 48,114,213,229,147, 79, 62,129, 74,165,114, 45,217,134,136, 58, 27,107,101,
+152, 51, 87,203,151, 47,223,201, 24,243, 5,208, 78,111,224, 47,127,243,237,142, 78,229, 13,216, 84,147, 17, 39,224, 56,202,149,
+136,216,245,175,191,217, 94,172, 66,119,225,162,246,122, 32,220, 88,191,122,185, 10, 64,151,146, 38, 43, 52, 52, 52,175,164,166,
+145, 15,198,143, 43, 50, 87,235, 87, 47, 63, 30,212,220,239,189,217,163, 23,152, 53,101, 11,230,142,179,231, 56,106, 99,186, 6,
+203,156,230,203, 98,211,252, 83, 83, 42,149,238,220,181,107, 87,247,144,144, 16,255,215, 94,123,141,203,200,200, 64,110,110, 46,
+114,115, 11,130,157, 30, 30, 30,136,137,137,225,227,226,226, 18,165, 82,233,174,191,107,156,175, 66,179,112,251,155,181,222,222,
+222, 39,230,204,153, 51, 36, 61, 61,253,157,204,204, 44,247, 95,190, 91,136,110,125,199, 83,135,238, 3,149, 26, 38,148, 37, 36,
+167,214, 63,125,248, 71,183, 35,187, 55, 64,171,209,140, 37,218, 20, 99, 44,211, 96,102,156,121,198,114, 12,245,235,215, 87,154,
+ 26, 20, 63, 63,191,124, 31, 31, 31,117, 80, 80, 80,209,113,115,217,121,230,238,221, 90,205,194,245, 93,202,178, 52, 1, 20,153,
+181,146,229, 31,236,236,236, 96, 52, 93,214,140,211, 52,123,210, 28,229,101, 17,154,106,126,119,141,137, 76,207,125, 71, 36, 8,
+ 15, 15,239, 28, 30, 30,222, 28,192,117, 0,199, 0,232, 10,175, 43, 90, 12,207, 24,155, 7, 96, 94,121,247,254, 50,216, 52,109,
+154,255,100,205,255, 26,150,229, 48,151,192,184,160, 29, 0, 55,121,242,228, 76,149, 74,229, 58,100,200,144, 50,175, 73, 73, 73,
+217,182, 99,199,142, 98,230,234,253,247,223, 31,177,119,239,222, 19,207,158, 61,171,200, 48,224,234, 36, 95,120,230,231,105,174,
+ 29,122, 44,253, 4,192, 10,179,141, 24,248,160,230,222,239,173, 95,189,124, 63,138,155,172,239, 1,188,111,230, 10, 2,128,174,
+221,122,227,199,237,235,140,107,183,228,183,174, 38, 30,233,127, 45,204,108,246,161,139,131, 52,172,112, 28, 83, 96, 91,131,245,
+151, 16, 24, 24,104,184,112,225,194,148,241,227,199,127,245,230,155,111, 86,235,221,187,183,184,122,245,234,144, 74,165,120,248,
+240, 33,206,157, 59,167,125,244,232, 81, 98, 94, 94,222,148,215, 94,123,205,146,253,248,254,117, 36, 39, 39,223, 45, 44, 34,250,
+177,113, 90, 73, 42,147,139, 7,142,252,196,183, 40,139,112,247, 6,168,243, 85, 0, 32,180,164, 76,131, 80, 40, 20, 71, 69, 69,
+249, 27,163, 84, 90,173, 86,106, 60,126,245,234, 85,127, 99,109,172,252,252,124,139,179, 8, 95,149,230,205,155, 55,125,141,217,
+142,198,108, 65,161, 80, 40,142,140,140,244, 53,106,170,213,106,139,178, 8, 37, 18,137, 56, 42, 42,202,215, 96, 48, 84, 90, 22,
+161,145, 66, 67,124,180,240, 1,160,192, 88, 21,154, 43, 42,156, 22,180, 77, 15,218,176,241, 31,163, 66, 6,203,184,160,221,210,
+246, 68, 36,172, 81,163, 70,215, 1, 3, 6, 20, 51, 87,161,161,161,134,125,251,246,157,246,246,246, 78,229, 56,174,188,237, 60,
+ 94,212, 53,174,193, 42, 40,168, 94, 12,142,227,110,180,123,189, 1, 56,142,187, 49,123,244,104,245, 66,108, 45,102,178, 14,238,
+223,243, 86, 41,178, 12, 0,220, 61,125, 49,104,196, 68, 12, 26, 49,209, 21, 64, 91,160,244,236,195,178,198, 97,227,213,209,166,
+ 77,155,228, 59,119,238, 12, 58,126,252,248,192,179,103,207,118,206,203,203,171, 65, 68,144,203,229, 79, 52, 26,205, 9,169, 84,
+186,243,191,106,174, 74, 67,171,213,234,167,207, 95,185, 67, 32, 16, 25,120, 94, 75, 90,173,118, 4,172,248, 59,159, 62,125, 58,
+ 7, 51,107,171, 38, 78,156,104,246,248,223,165, 57,115,230, 76,179, 89,127, 19, 39, 78, 44, 51, 27,176, 52, 62,253,244,211, 74,
+203, 34,180, 4,155,145,178, 97,227,191, 79,133, 12, 22,199,113, 55,204,100, 11, 18, 0,102, 46, 67,143, 49,166, 23, 8, 4,243,
+ 93, 92, 92,198, 41,149,202, 95,223,127,255,253,201,161,161,161, 6,160, 96,225,123, 69,198, 0, 20,172,193,234,216,115,217,148,
+172, 92,245,186,146,231, 74, 70,154,140, 38,107,195,154,229, 27,247,239,221, 21,154,146,148, 96, 54,163,202,104,204, 74, 59,103,
+238,120,182, 66, 53,191, 99,207,101,159,100, 42, 84,182, 53, 88,127, 49,129,129,129, 6, 0,225, 0,194, 75,110,246,252,255, 1,
+198,152,154,136,166, 18,145, 49,130, 59,245,209,169, 53, 69,191,219, 68,235,110,152,158, 43, 35,122,149,108,201,198,205,230,174,
+ 43,235,220, 43,208, 76, 45, 99,227,230,178, 72,181, 82, 47, 21, 0,196, 34,193,179,210, 54,117, 22,139, 4, 21, 11,189,151,192,
+ 24,197, 2, 48,191, 50,244,108,216,176,241,207,192,172,193, 50,154,159,210, 40,173,206, 85, 89, 24, 12,134,101, 0,150, 89,123,
+ 93, 89,220,186,159,243, 13,128,111, 44,109, 95,184,230,106, 88,225,195, 44,134,231,183,173,190,183,208,208,208, 77, 0, 54, 89,
+123,157,141,138, 17, 17, 17,241,255, 42, 42, 85, 30,140,177,141, 68,244,109,225,215,106, 75,207,149,104, 87,233, 27, 14,191, 34,
+205,163,229,183,170, 60,189, 67,119,244,158,149,217, 95, 25,227,176, 69,180,108,216,248,143, 81,161, 8,150, 13, 27, 54,254, 89,
+148, 99,158, 42,103, 67, 78, 27, 54,108,216,176, 97, 49, 4,160,179,185, 19,214,100, 7, 16,145, 89,141,178, 40, 79,223,166,105,
+211,180,105,218, 52,109,154, 54, 77,155,230,127, 79,179, 60,109,211,235,137,104, 44, 99,204,226,153,170,127, 20,172,160,214,212,
+ 43,121, 0,232,108,211,180,105,218, 52,109,154, 54, 77,155,166, 77,211,166, 89,193,126,198,254, 21,253,188,138,135,101, 85,248,
+108,216,176, 97,195,134, 13, 27, 54,108, 88,140,109, 13,150,133, 80,245,119,191, 0,216,140,130, 23,180,156, 61, 61, 48,239,239,
+ 29,209,191, 23, 34,242, 0,208,195, 81, 38,238,213,208, 69,220,250,214,243,252, 11, 74,173,225,103, 0, 7, 25, 99,229,238, 8,
+ 96,195,134,141,151,135, 92, 27, 86, 7,209, 72,128,253,153, 70,201,179,104,150, 21,179,189, 88, 59,151, 6, 35,192, 81, 67,147,
+ 67, 42, 48,108, 97,153,209,241,102,117,255, 76, 49,119,137,141,141,245, 15, 8, 8,136, 3,144, 85,162,217, 11,231, 88, 97,184,
+162, 52, 77,143, 90, 77,135,218,201,236, 38,104, 52,154,154, 14,142,142,207, 50,158,167,109,202,120,122,115,131, 73, 51,167,203,
+151, 47,123,183,108,217, 50, 9, 64, 78,121,154, 54,108,188,106, 94,218, 96, 81,221, 62, 53,161,231,134,129, 97, 48, 8, 81,236,
+ 81, 68,159, 10,233, 4,188, 95, 13,188,176, 5,128,166, 0,107,106, 47,151, 53, 81,105,180,207,120,198,134,178,216,221,215,173,
+214,171,213,247, 23, 0,221, 75, 57, 59,159, 61,218, 51,207, 58, 69, 54,243,143,179,251,164, 46,118,132,128,102,239,125, 14,147,
+138,203,255, 36,136, 72, 14, 96, 56, 17,189,105,103,103, 87, 55, 47, 47,239, 9, 99,236, 38,128,141,140,177,164, 10,106,114, 0,
+ 70, 57,216,219,119,243,119,148, 52,125,154,158,157,152,163, 51,156, 3,176,194, 90, 67, 68, 68, 18,127, 87,251, 51,171, 7,116,
+ 12,108,221,176, 14,248,232,179,200,215,104,123,157, 78,200,237, 53,247, 98,210, 20, 34,106,202, 24,211, 88,168,229, 13, 64,200,
+ 24,139, 47,124,109, 15, 32, 8, 64, 45, 0,143, 0,220,102,140, 41,203,144,176,164,143,127,133,166,175,175,175, 15,207,243,163,
+ 61, 61, 61,223, 73, 77, 77,253,133,227,184,173, 9, 9, 9, 21,250,121, 87, 34,155,141,235, 39, 44,125, 6, 48,206,154, 14,228,
+114,121,106,126,126,126, 85, 0,144,201,100,207, 84, 42,213, 43,203,250,251, 43,251,250, 75, 32,140, 57,118,254,118, 55,211, 67,
+ 93,219, 53,124,177, 29, 71, 13,143,157,143,110, 95,188, 93,144, 1,102,222, 3, 11,171,166, 98,254,252,249, 20, 22, 22, 54,162,
+118,237,218,117, 56,142,187, 55,103,206,156, 98, 37,108, 74,158,155, 59,119,238,159, 21, 87,205,104,250,214,107,115,176,255,128,
+190, 29, 63, 28, 59,220,161, 90, 21, 7, 36,167, 43,221,191,222, 22,190, 50, 60,252,199, 30,163,251,119,233, 6, 0, 11, 22, 44,
+120,183,122,245,234, 53, 4, 2,193,227, 47,190,248,226,251,178, 52,109,216,248, 43,168,144,193,162,134,125,237,145,207, 66, 1,
+ 26,222,161,117,179,118,227,134,246, 36, 38,144, 97,224,152,105,250,242,175, 46,161, 85, 99,132, 20, 2,213,194, 70, 65, 13, 39,
+247,237,217,153,107, 30, 84, 3,222, 85,156, 1, 78,132,205,135,159,184,175, 91,254,197, 70, 0, 45, 43, 48,204,238, 15, 47,238,
+ 68,114,150, 1, 68, 0, 17,192, 17,144,155,207,163,235,187,195,230,194,106,131, 68,156,139, 29, 97,242,206,124, 0, 84,234,190,
+110,127, 39, 68,212,180, 74,149, 42, 27, 38, 77,154,228,218,168, 81, 35,111,153, 76,102,167, 82,169,234,196,198,198,214,156, 61,
+123,118, 23, 34, 90,202, 24,219,103,165,166, 95,128,175,207,158,117,147, 71,181,120,173,150, 63, 68,154, 92,240,106,101,245,251,
+177, 15, 90,127,176, 49, 98, 12, 17, 13, 96,214,109,151, 48,107,243,196,161,129,193,142,128,246,246,239, 16, 9, 4,176,115,118,
+ 69, 23,161, 0, 2, 66,131, 97, 71,159,204,132, 5,251,177, 21, 86, 48,159, 89,240, 37,253, 40, 16, 8,142,119,238,220,185,230,
+232,209,163,169, 89,179,102,136,140,140,172,181,115,231,206,206, 66,161,240,177,193, 96,184, 9,224, 30, 99,236,133,125, 36, 75,
+209, 22, 1,168, 39, 16, 8, 26,253,147, 53,125,124,124,228, 26,141,102,152,175,175,239,216, 94,189,122, 53,234,217,179, 39,213,
+171, 87, 15,119,239,222,109,118,228,200,145,185,141, 27, 55,190,153,144,144,240,141, 68, 34,217,145,148,148,164,178, 68,179,127,
+ 48,221,221,125,139,213,175,232,249, 18,247, 60, 22,128, 79, 97, 64, 99,190, 5,207, 73, 0,230, 51,198,202,170,131, 85,140,252,
+252,252,170,198,207, 79, 34, 50, 91,175,170,178,176,166, 47, 34,138, 33, 34,183,194,175, 81,214, 51,199,113,208,235,245, 74,189,
+ 94, 95,187, 28,205,122,128, 85,203, 58, 24, 99,172,172, 2,206,114, 0,232,218,182, 97, 6, 8,209, 0, 0,158, 69,191,208,138,
+103,209, 69,198,139,161,225,177,223,163,221,138, 69,189, 74, 48,127,254,124,154, 59,119, 46,230,205,155,215, 19, 64, 8,207,243,
+231, 2, 3, 3,215, 22,147,228,249,162,115,115,231,206, 93, 51,127,254,124, 66,177, 93,111,255,196,173, 70,227, 33,239,189,215,
+187,227,162, 89, 19, 29, 18,159,107, 17,245, 88, 5, 55, 7, 49,230, 78, 29, 47, 81,171,117,173, 55,126, 31, 62,118,253,210,105,
+ 91, 12, 6,195, 27, 0,154, 27, 12,134,171, 0,190, 47, 75,211,134,141,191, 2,139, 13, 22, 17, 17,106,247,105, 15, 3,134,251,
+ 87,247, 12,157, 52,186,159, 60, 40, 48, 0,249,112,192,147,116, 3, 14, 31, 58, 2, 0,187,173,233,156,106,245,111, 46, 20, 99,
+199,242,121, 83,235,135,180, 8,194,173, 68, 29,174, 38, 26,144,247, 88, 7, 1,167,131,129,103, 0,131,249,173,231, 45, 32, 33,
+ 83,143,243,247, 52,224, 8, 16,112, 0,199, 17, 4, 21, 93,117,102,208,220, 95,176, 61, 50, 40, 61,149, 7, 12,154,251, 21, 29,
+211,171,130,136,222,168, 91,183,238,234,176,176, 48,175,212,212, 84,183,171, 87,175, 66, 42,149,194,213,213, 85,232,227,227, 83,
+127,245,234,213,217, 19, 39, 78,156, 74, 68,215, 25, 99, 79, 44,212, 12,236,222,188,209,133,111,150, 47,112,214, 93, 62,130,172,
+ 93,255,131,128, 99, 16,219, 59,160,166, 92,142, 35,239, 5,184,133, 30,122,188,143,136, 2, 25, 99,137,150,104, 6,120,185,119,
+109, 20, 24,136,204,253,235, 17,149,153,143, 35, 73, 42,140,236,210, 10,193,110,114,132,232, 13,240,178, 23,189,129,114, 12, 22,
+ 17,185, 2,152,166,209,104, 56,177, 88, 76, 50,153,108,200,162, 69,139,180, 3, 7, 14, 76, 48,182, 9, 9, 9, 65, 72, 72, 8,
+229,228,228,212, 58,117,234, 84,173,240,240,112, 61, 17,197, 48,198, 14,150,166, 43,151,219, 61,205,207, 87, 85,151,201,229,121,
+ 95,111,220,248,101,251,246,237,121,169,244,207,221, 91, 42,162, 9, 0, 46, 46, 46, 91,234,214,173, 75, 51,102,204, 72,170, 44,
+205,154, 53,107, 30, 11, 9, 9,233,212,181,107, 87, 97,219,182,109,225,227,227, 83,116,206,195,195, 3, 33, 33, 33, 20, 31, 31,
+255,218,185,115,231, 54, 30, 59,118,108,109,205,154, 53, 79, 61,126,252,184,107, 89,154, 0,192,202,217,131,180,188,243,197,218,
+ 22, 68,166, 96,133, 97,250,198, 76, 1,227,127, 37, 68,228,176,121,243,230,170,198, 61, 19,117, 58, 29, 12, 6, 67,209,179,241,
+193,243, 60, 12, 6, 3, 22, 45, 90,100, 81,109,183,194, 72,167,209, 56, 24, 31,188,185,103,137, 68,226, 97,217, 96, 17,237, 45,
+205,106, 96,111,111,239, 15,160,123,221,186,117,167,153,158,174, 83,165,224, 89,169, 84,198, 37,171, 93,162, 1,180,127, 65,227,
+ 79, 92,194,194,194,134,205,155, 55,175, 55,254,220, 83,178, 81,223,190,125, 79,149,104,215,168,240, 89, 73, 68,167, 57,142,251,
+ 25,192,118, 0, 47, 68,196,237,236, 28,198, 77,154, 48,218, 33, 33, 93,139,133,251,210,177,253,172, 2,195, 66, 28, 49,249,109,
+103, 12, 26,216,223, 62,226,127,123,199, 1,216, 98,114,201,221,192,192, 64,186,115,231,142,205, 92,253,183,120, 29, 64, 21,147,
+215, 26, 0,198,173,173,210, 81,240,119,225, 94,226,184,105, 59,227,115, 90,225,241, 42,133,215, 49, 19,221, 52, 0,127, 84,214,
+128,133, 0,138,246,192, 42,115, 47,172,154,161,135, 71, 13,236,213,237,157, 55,219,128,147,185,226,254, 51,224,226, 83, 6, 33,
+167, 3, 7,134,203,191,159, 98, 16,242, 59, 76, 47, 41, 43,178, 65, 53, 67, 63,109, 20, 28,180,108,235,242,143, 5, 49,207,132,
+216,126, 46, 15,218,252, 92,164,165, 60,197,179,164, 56, 36, 39, 60, 66,226,211, 71, 55, 1,154,107,169,102, 73, 24, 3, 12, 60,
+ 10,254,231,227,129,130,239,227,139,183,103,145,166, 78,121,167,118,253,224,160, 76,137, 1,208, 41,239,148,223,119,229,111,130,
+ 89,154, 38, 17,117, 9, 8, 8, 88, 49,107,214, 44,223,219,183,111, 59, 41,149, 74,229,145, 35, 71,206,196,197,197,121,122,121,
+121,197,143, 31, 63,190, 77,181,106,213,170,190,251,238,187,118,123,246,236,153, 5, 96,180, 5,154, 65,189, 90, 53,185,184,109,
+237, 42,251,231, 17,235,160,137,189,129,195,201, 74,252,158,154,199,106, 57, 75,233,163,215,170,192, 65, 42,196,130,182, 62, 14,
+221,247,199, 46, 3, 48,200,146,123,111, 88,221,187,182, 78,149,135,124,149, 14, 59,238,102,168,142, 39, 42,171,146,203,147,180,
+181,161,173,100,130,180, 36,248, 59, 74,234, 88,115,239, 70,100, 50,243,187,156,184,186,186,162, 67,135, 14, 8, 12, 12, 20,182,
+111,223,190, 17,128, 34,227, 82, 82, 83,171,213,120,243, 60,131,163,163,163,220,221,221,221,213,209,209,241,185, 86,171,125, 41,
+ 77, 0,112,115,115,235,211,161, 67, 7,225,206,157, 59,211, 31, 63,126,124,121,224,192,129,143,156,156,156,138, 69,123,237,237,
+237, 81,167, 78, 29,124,241,197, 23,194,110,221,186,149,171,233,233,233,217, 37, 60, 60, 28, 68, 84,244, 97, 93, 18,127,127,127,
+120,121,121,161,123,247,238,194, 62,125,250,116, 49, 61, 87, 82,179,127, 48,221, 53,154,167,126,193, 84,230, 7, 83,191, 96, 98,
+ 4,220, 43, 25,201, 42,169, 89, 24,193, 42, 86,157,188,172,105, 54,115,237, 45,248,185, 63, 51, 70,147,100, 50,153, 69,149,213,
+203,209, 44,117, 90, 83, 42,149, 22, 69,157, 74,246,101, 78,147,227, 56,204,158, 61, 27, 68, 4,145, 72, 4,177, 88,108,246,185,
+ 99,199,142,214,142, 51,158,136, 56,177, 88, 60, 77, 40, 20,142, 86,171,213,190, 50,153, 44,201, 96, 48,124,167, 86,171, 23, 21,
+ 70, 64, 93,204,253,238,150,166,105,111,111,239,127,255,254,253,186,165,125, 83,212,106, 53, 26, 53,106, 4,168, 17, 83,150,102,
+108,108,172,127,237,218,181,235, 1, 48,110,165,118,150, 49,214,222,228,181, 41,103, 25, 99,111, 23,126,125,239,225,195,135,254,
+ 40, 52, 88,166,154, 58,173,182,166,111, 85, 39, 68, 61, 81, 97,251, 89, 5, 78,206,242,193,155,139,146,240,126, 83, 33, 2,253,
+ 28,160,215,234,234,245,237,219,119, 7, 10,126,127,255, 0,240,110,223,190,125,235, 11, 4,130,223, 0, 28, 0,144, 93,214,189,
+191, 12, 54,205,202,165, 28, 47, 82,133,136, 14,153,244,223,195,248,122,250,244,233, 51,151, 44, 89,114,155,136, 14,153, 30, 55,
+109,103,250, 92,216,215, 33,198, 88,143, 25, 51,102, 4, 45, 93,186,116,177,177,109,101,222,143, 53, 83,132, 78,105,249,246, 56,
+247,212, 9, 66,129, 1, 66,142, 32, 20, 0, 96,132,184, 39,177,200, 81,100,157,103,143,254,247,216, 18, 33,170,213,183,109,227,
+ 38,141,150,255,184,250,115,238,219,115,121,200, 82,230,227,206,245,211,248,227,244,129, 20,131,222,112, 0,196,174, 2, 92, 36,
+ 30,241,119, 25,171,120,213,238, 2,131, 85,104,170,138,153,172,255, 14, 68,244,118,253,250,245,151,204,158, 61,219,255,250,245,
+235,142, 10,133, 34,237,135, 31,126,184,171, 86,171,175, 3, 88,243,244,233,211, 14,247,162,136,169, 0, 0, 32, 0, 73, 68, 65,
+ 84,107,214,172,177, 91,185,114,101,215, 70,141, 26,213,139,136,136,200,179, 64,243,181,169,195, 7, 93, 28, 61,233, 19, 89,204,
+158, 13,144,196, 68, 98,246,141,116,195,201,228,188, 89, 0, 86, 35, 62,183,109, 90,190,254,248,170, 14,213,185, 26,142, 98, 4,
+184, 72,204,127, 66,152, 65, 38,145, 10,153, 80, 6,141, 70,143, 28, 13,175, 97,140, 41, 67, 91, 4,106,153,189,135, 12, 0,132,
+ 28,149,251, 59,201, 24,203, 36,162,101, 18,137,100, 54, 17,177,215, 95,127, 61, 42, 56, 56, 56,215,213,213, 21, 42,149, 10,106,
+181, 26, 98,177, 24, 42,149, 10,113,113,113,184,124,249, 50, 92, 93, 93, 45, 29, 34, 0, 32, 55, 55, 23,142,142,142,224,121,254,
+165, 53, 13, 6, 3,109,218,180,201,254,246,237,219,246,123,247,238,245,156, 60,121,242,243, 6, 13, 26, 92,237,223,191,255,131,
+170, 85,171,170,111,220,184,129, 11, 23, 46, 32, 51, 51, 19,173, 90,181,178, 72, 83,163,209, 64, 40, 20, 66,165, 82, 65, 42,149,
+ 66, 40, 20, 66,175,215,131,231,249, 34,211,149,155,155,139,140,140, 12,136,197, 98,104, 52,101, 47,107, 51,154,165,126,193,196,
+246,252,122,225, 25, 12, 60,160, 85,232,160,206, 46,120,104,178,117,200,207,210,245,155,242,229,107,123,110, 89, 86,117,220, 24,
+193, 50,165,172,105, 54,115,237,203,163,178,215, 65,149, 53,173,153,149,149, 37,119,113,113,153,102, 73, 68,142,136, 32, 16, 8,
+ 32, 22,139, 65, 68,104,223,190, 61, 70,141, 26,133,166, 77,155, 34, 54, 54, 22,187,118,237,194, 31,127,252, 1,145, 72, 84,212,
+222, 82, 58,118,236, 40,144,201,100, 23,122,245,234, 21, 52,107,214, 44, 89,141, 26, 53, 16, 19, 19,227,183,116,233,210,105, 39,
+ 78,156,232, 77, 68,205, 25, 99,124,185, 66,198,169,191,130,105,193,238,106,181, 26, 49, 49, 47,248,167,178,174,121,129,128,128,
+128, 56,142,227, 30,240, 60,127, 14, 64, 35,198, 88,123, 34, 58, 2,192,190, 68, 83, 37, 99,236,109, 34, 82, 0,184,201,113,220,
+ 61,158,231,227,204, 45,151,114,116,116, 76, 75,120,166,240,116,119,144, 97,104, 59, 7,188,185, 40, 9,161,205,165,144,138, 9,
+119, 31,167, 32,160,118, 13,138, 58,127,176, 57, 10,204,213,235,201,201,201, 0,208, 28,192,227,248,248,120,111, 20, 26, 44, 27,
+255, 13, 74,154, 32,163,113, 90,178,100, 73,143,146,199,204, 25,166,146,199,151, 46, 93,186,216,228,117,165, 38, 89, 21,125,152,
+ 17,149,253, 95, 43,120,188,127,104,223,206, 75,111,106,201, 63,168, 89, 59,252, 25, 13, 98,136,188,124, 1, 0,251,206,146, 14,
+201,167,167,156,179,179,255,110,211,226,137,220,230,211,121,136, 79,122,134, 11,135,191, 67, 90,242,147,237, 0,155,204, 30, 69,
+ 40, 42,126, 59,133,125,212,234, 27, 84,213,195, 29,249, 90, 6,158, 1,120,193,100,253, 55, 32,162,158,245,234,213, 11,187,120,
+241,162,127,126,126,190,227,239,191,255,158, 21, 30, 30,254, 64,163,209,108,101,140,253, 80,216,230,167,244,244,244, 5,140, 49,
+ 56, 58, 58, 10, 69, 34,145,188,172,133,159, 68,212,116,234,232, 97,231,151,109,218, 38,123,112, 43, 10,107,246, 30, 70, 86, 94,
+158,225,244, 51,213,187,140, 49,227,127, 5,191, 5,184, 72, 19, 25, 88,117, 17, 71,240,182, 23,121, 17,145,140, 49, 86,238,116,
+174,119,117,127, 78,231, 87, 19,231,244,249,168,230, 46,149, 0, 64,173,122, 13, 5,215, 85, 58,252,126, 35, 6, 30, 14, 78, 98,
+ 75,238,157, 49, 54,135,136, 60,119,236,216,193,233,116,186,220,216,216, 88,120,121,121,193,211,211, 19,206,206,206,184,115,231,
+ 14, 78,158, 60,137,187,119,239,130,231,121, 52,110,220,216,194,239,106, 1,207,159, 63,199,141, 27, 55,208,189,251, 59,147,211,
+210,158, 57,185,186,185, 43,207,159, 59,187,178, 34,154, 60,207, 19, 0, 4, 5, 5, 33, 40, 40, 72,150,152,152,232,123,232,208,
+161,170, 11, 23, 46,124,234,239,239,255,163, 74,245,231,242, 40,181,218,178,162,235, 70,195,148,159,159, 95,100,254,100, 50, 25,
+196, 98, 49, 20, 10, 5, 82, 83, 83,145,147,147, 3, 0,112,113,113, 41,215, 96, 21,195,192, 3,225,237,174,190,112, 60,120,184,
+ 85,107,156,204, 69,164, 42,179,253,171,160,172,105, 77, 34, 26, 12, 96,154,153,203, 94,128,136,160,215,235, 33, 22,139,209,178,
+101, 75,172, 91,183, 14,127,252,241, 7, 14, 28, 56, 0, 63, 63, 63, 12, 31, 62, 28, 28,199,225,246,237,219,214, 14,145,191,120,
+241,226,180,119,223,125, 55,104,199,142, 29,178,184,184, 56,220,189,123, 23, 46, 46, 46, 88,183,110,157,116,236,216,177, 1,167,
+ 78,157,154, 3, 96, 69,121, 66,166,217,130, 62, 62, 62,253, 26, 53,106,244, 66, 27, 47, 47, 47,231,163, 71,143, 86, 53, 26,175,
+146, 25,134,102,200,154, 51,103,206,170,192,192,192,213,133,211,130, 33, 0,236, 25, 99, 29,247,238,221, 75, 0, 16, 26, 26,202,
+136,232,116, 97,251,155, 17, 17, 17,157,238,220,185,195,230,205,155,103,246, 61, 41,237, 89,242,166, 85,235, 54,175, 90, 54,127,
+170,100, 74,119,103,132, 54, 23, 65, 38, 38, 56,217,137,176,104,237, 22,221,181,203,103,111,120,123,123, 31, 2,240,110,114,114,
+ 50,188,189,189,115, 1,220, 19, 8, 4,143, 13, 6, 67,146,109,141,251,191, 11,115, 94,164, 48,138,156, 92,248,181, 89,227,100,
+ 41, 37, 35, 92, 70,102,204,152, 17,180,100,201,146, 43, 21,213, 53, 71,209,138,164, 82,167, 6,141, 8, 57,111, 47, 79, 15,183,
+233,195,219,130,231, 1,189, 1,208, 27, 24,148,121, 42,196,220,250, 35, 15, 50,218,107, 81,143, 82,201,242,133,179, 62,169, 21,
+149,192, 33, 41, 83,139, 51, 7, 55,179,180,228, 39,125,216,163, 61, 35, 43,203, 92,121, 85,245, 56,189,115,243, 2,252,241, 72,
+ 3, 3, 95,224,175,120,158, 21,125,253, 95,128,136,234,120,120,120,172,188,116,233, 82, 13,169, 84,234,120,255,254,125, 67, 68,
+ 68, 68,146, 70,163,217,104, 52, 87,133, 12,110,214,172,153,206,222,222, 30,185,185,185,106,173, 86,155, 91,134,185,242,237,216,
+244,181,179,203, 54,109,147,229,107, 52,200, 86,169, 33,112,175, 90,210, 92,129,136,218,116,170, 91,173, 26,201, 28,193, 0, 60,
+ 81,104,147, 44, 49, 87, 0,224,224,236,194,249, 54,239,136,230, 31,175,131,130, 28, 25, 0,184,123, 87,227, 58, 77, 88,132,110,
+107,206, 64,201, 57, 90, 99,129,147, 6, 13, 26,148,208,176, 97,195,236,192,192,192,236,231,207,159, 35, 58, 58, 26,153,153,153,
+ 88,179,102, 13, 98, 98, 98,192,243, 5,114,230,166, 75,202,131,231,121,100,102,102, 56, 48,198,144,153,241,220,126,214,172, 89,
+206, 21,209, 52, 24, 12,197,254,182,170, 85,171,134,241,227,199,139,243,242,242, 92,158, 62,125,234,100,122,206, 82, 77,141, 70,
+ 99, 44,194, 7,198, 24, 52, 26, 13,178,179,179,161,209,104,240,224,193,131, 34,115, 85,216,191,117, 6, 75,171, 48,191,200, 94,
+245,220,162,197,247, 70,152, 73,245,101,185, 92,158,106,124,227,148,201,100, 32, 34,115,211,108,149, 82,173,217,216, 23, 17, 49,
+185, 92, 94,218, 38,207,102, 41, 52,121,102,177,118,124, 6,131, 1, 98,177, 24,163, 70,141,194,149, 43, 87, 16, 27, 27, 11,129,
+ 64, 0,165, 82,137,188,188, 60,116,233,210, 5, 18,137,196,216,175,165,178, 76, 44, 22, 15,158, 57,115,166,236,241,227,199, 72,
+ 79, 79, 55, 46,146,135,193, 96,192,228,201,147,229, 82,169,116, 48,172, 12,213, 39, 37, 37,189,117,255,254,253,122, 37, 31, 41,
+ 41, 41,217,166,107, 6, 43,202,222,189,123, 41, 52, 52,148,133,134,134, 50,163,209,178,148,172,132,232, 77, 7,126, 58,116,252,
+211, 47,150,231,230, 41,115, 80,219, 71,142,220,156,108, 44, 90,178, 76,119,241,226,185,211,211, 38,127,208, 58, 34, 34, 98, 41,
+128,123,133,151,220,139,136,136, 24,246,197, 23, 95,124,143,194,114, 13, 54,254, 61,152,243, 34,166,127,123,149, 49,141,103, 78,
+163,112,154, 80,254,178,218,166, 88, 52, 69, 72, 1,253,155,120,122,184,159,218,177,126,190,195,161, 91, 64, 66,252, 19,164, 37,
+199,161,121,235,142,136,185, 21, 5, 94,103,216,199,238, 71,148,155,102, 78, 53,251,214, 13,108,208,112, 66,135,214,193, 88,126,
+ 40, 23,247, 35,143, 34, 43, 45,121, 61,123,188,199,170,204,182, 82,245,107,245, 13,242,172,226,113,250,251, 13, 97,110, 71,162,
+ 57,196,199, 63,193,193,239, 87, 67,167,125,225,179,255,176,181,218,114, 94, 35,201,205, 74,133, 38,199, 0, 25,151,103,126,193,
+207, 95, 8, 99,236, 65,149, 42, 85,118,172, 90,181,234,131,214,173, 91,219, 13, 28, 56,240,126,102,102,230, 66,198,216, 30, 99,
+ 27, 34,122,163, 94,189,122,159,173, 95,191, 62, 32, 62, 62, 30, 39, 79,158,188, 15,224,197,200,196,159,154, 9, 2,129, 96,227,
+201,239,183, 76,149,215,170,143, 53, 51, 63,213,239,253, 35,186, 23, 99,236,136,137,102, 96,231, 70,117, 15, 45,252,236, 67,142,
+191,246, 43,110,196,165,226, 81,182,250,164,165,227,142,205, 82,234, 68, 82, 57, 28,188,106,224,126,174, 65, 44, 20, 10,175,140,
+ 30, 61, 74,204, 9,132,224,132, 98, 68,103,230, 91,243, 33,238,112,229,202, 21, 78, 32, 16, 20, 51,230,166, 17, 33, 35,150, 70,
+134,172,193, 82,205,146, 6,203,136, 94,175,127,225,184,165,154,106,181, 26,230,124,178,185,181, 88, 60,207, 91,119,255,154,108,
+243, 46, 47,223, 58,131,101, 26,145, 50,157, 26, 52,174,151,203,207,207,175, 42,151,203, 83,141,211,124,149, 21,193,122,153,204,
+194,178,166, 41,173, 25, 31,199,113,224,121, 30, 98,177, 24,141, 27, 55,198,161, 67,135,224,230,230, 6, 39, 39, 39, 56, 57, 57,
+ 65, 46,151,195,221,221,189,200, 96,113,156,197,217, 55, 76,173, 86,251,249,249,249,225,193,131, 7,144,201,100, 69, 15,169, 84,
+138,160,160, 32, 40,149,202,106,248, 79,197,234,129, 49,253, 59,247,222, 16,190,127,232,161, 67,191, 76,208,170,243,131,235,215,
+175,199,174, 94, 60,117, 99,218,228, 15,186,149,127,181,141,255, 18,198,232,147,233, 90,170,233,211,167,207,172,168,222,244,233,
+211,103,154,139,104, 85, 6, 66,224, 79,199,104,206, 57, 26,205,213,246,117,243,156,246, 95, 7, 18, 18, 30,227,248,158,181, 57,
+ 58,173, 38,147,231,117,254,143,238, 70, 1, 28,190,179,168, 55,142,181,232,221,189, 19, 29,191,173,129, 34, 43, 13,247,174, 30,
+125, 2,149,100, 70,101,220,136,209, 92,237,216, 48,223,237,231, 91,132,248,248, 39, 56,178,107,117,182, 78,175,125,131, 61,138,
+176,186,142,150, 41, 67, 36,146,222,253, 27,184,244, 24,213, 46, 9,134, 16, 3, 6,199,220,121,219, 39,132,122, 39,157, 43, 59,
+211,235, 85,147,150,150,182,200,193,193,129, 91,177, 98,197,200,252,252,252,121,140,177,162, 40, 34, 17,117,169, 93,187,246,242,
+ 77,155, 54,249, 62,125,250, 84,114,254,252,249,140,211,167, 79, 51, 0, 75,202,210, 52, 24, 12,159, 19,145,160,105,141,106, 19,
+175, 61, 73,236,197, 24,251,213, 68, 51,168, 71,179,134,191,111, 91, 50,199, 81,247,251, 94,228, 38,199, 99,198,239, 9, 10, 0,
+ 22,253, 12,137,200,205,195,195,131,134, 12, 25,194,231,228,228, 64, 44,145,240, 58,157, 78,208,166, 77, 27,195, 39,159,124,194,
+165,164,164, 64,145,147, 43, 36, 34, 55,198, 88, 70, 57, 90, 97, 0, 38,183,105,211,134, 90,182,108,121,121,245,234,213,199,140,
+231,204,153,137,138, 68,176,202,195, 82, 77,158,231,205,126,122,234,116,186, 23,254,222, 42, 18,193, 50,197,156,193,178, 58,130,
+165, 46, 45,130,149,102,117, 4,203,156, 89, 49, 53,135,166, 6,168, 34,107,176, 42,155,178, 76,148, 53,227, 51,174,131, 19,139,
+197,136,138,138, 66,245,234,213,161,213,106,225,232,232, 8, 71, 71, 71, 56, 56, 56, 32, 39, 39, 7, 34,145,200,170,245, 87, 0,
+120,153, 76,246, 52, 58, 58,186, 94,149, 42, 85, 96, 48, 24,138,153,172,251,247,239,195,222,222, 62, 17, 86, 70,176,124,124,124,
+142, 22,102, 17, 22,195,203,203,203,217, 26,157,210, 48,141, 92,133,134,134, 86,104, 30, 97,195,146,169,225, 0,194,251,246,237,
+187,227,230,197, 95,154,123,123,123,255, 18, 24, 24, 72, 0, 96,203, 24,252,111, 80,150, 23, 1,144, 86, 34,242,164, 49,121,157,
+ 6,128, 10, 95,167, 21,106,148,252, 90, 99,230,216,243, 37, 75,150,156, 50, 89,191,149,134, 74,164,204, 8, 22, 5,244,111, 82,
+213,221,237,212,214, 53,243,156,246, 68, 2,137,241,143,113,102,223,186,108,189, 65,251, 6,120,150,124,241,196,190,189, 32,228,
+225,209,222, 51,192,158,178,164, 10,224,209,180,105, 3,127, 28,184,173, 67, 90,194,125, 48,198,111,103,169,223,151,187,232,186,
+ 60,140,230,106,251,186,121,110,251,163, 8, 9,241,143,113,124,207,218,108,189, 65,251, 70, 69,138,148, 26, 25, 77,228,202, 57,
+218,125, 61,244,173, 22,125,253,107, 85, 3,207,116,224,197, 12,239,127,238, 33,188,119, 45,239,128, 95, 87,193, 30, 62,151,159,
+144,112,241,239,171, 62,158,155,155,187,128,136,246, 51,198,138, 86,167, 18,209,219, 1, 1, 1,139,191,254,250,235, 26,137,137,
+137,142,215,174, 93, 83,124,243,205, 55,143,121,158, 15, 99,140,149,155,105,197, 24,251,148,136,182, 50,147, 26, 58, 68,244,218,
+212,145,131, 46, 14, 26, 49, 90,246,248, 68, 56, 92, 31,199,224,179,223,147, 12,247, 50, 53, 3, 25, 99, 41,229,105, 18,145,155,
+ 84, 42,221,123,248,240,225, 7, 77,155, 54, 37,165, 82, 9,157, 78,135,244,244,116,236,223,191, 63,154, 49, 6, 87, 87, 87, 28,
+ 62,124,152, 31, 52,104,208, 94, 34, 10, 45,205,100,153,148,105,160,194, 50, 13,173,126,253,245,215, 59,221,186,117, 75, 0, 94,
+ 52, 41, 82,169, 20,249,249,214, 85,251, 40, 45, 43,177, 34,154,165, 69,176, 74, 30,183, 70,211, 56, 77,105, 92,220, 94,242,184,
+ 17,129, 64, 0,158,231, 95, 56, 94, 38,234, 44,243, 70, 74,249,172,194, 17, 44,211,108, 63, 75,218,151, 69,121, 5, 63, 43,146,
+ 89,104,164,178, 34, 88, 0,138, 34, 88, 63,253,244, 19, 70,140, 24, 1,131,193, 0, 59, 59, 59, 56, 56, 56,192,222,222, 30,251,
+246,237,131,177,140,131, 53, 67,212,233,116, 63, 44, 89,178,100,230,166, 77,155,228,140, 49, 72, 36,146, 34,131, 53,111,222, 60,
+149, 86,171,253, 1, 22, 24,172,162, 10,237, 60,139,174, 83,165,236, 44, 66,115,215,148,178, 30,203, 37, 44, 44,108, 24,207,243,
+189, 81,162, 20, 67,137,118,197, 74, 56,148, 85,166, 1,128,107, 88, 88,216, 24,158,231,141, 85, 80,139,101, 11,154,180, 51,126,
+150,212,235,219,183,239,142,146, 89,132, 54,254,245, 84, 90,249,132,191,138, 82, 13, 22, 5,244, 13,172,234,238,113,106,203,234,
+121, 78, 63, 94, 1,146,226, 31,225,194, 79,235,179, 13,188,206,212,180,180,179,170, 55,162,166, 62, 85, 93,144,113, 73, 5, 69,
+250, 83,128,225,218,203, 12, 30, 0,168, 86,255, 58, 85, 61,220, 79,111, 91, 59,207, 45,226, 58,135,196,167,143,113,186,208, 4,
+190,140,185, 26, 34,145,244, 14,170,235,187,109,192,219,237, 92,157, 73, 7,125,220, 29,108, 29,222, 15,145, 61,181,104,219,223,
+ 25, 45,186, 59, 34,160,137,172,223,225, 45, 25,111,250,132,208,232,191, 51,154, 85,194, 92,245,172, 81,163,198,252,203,151, 47,
+251,243, 60,239,120,230,204,153,156, 77,155, 54, 61,202,207,207, 95,203, 24,251,197, 10, 77, 83,115,213,116,250,216,225,231, 23,
+127,189, 85, 22, 29,249, 7,150,255,240, 51, 84, 58,141,225,104, 66,110, 95,211,233,195,178,144, 72, 36, 11,126,251,237, 55,251,
+ 70,141, 26,209,243,231,207,139, 34, 45, 90,173, 22,217,217,217,200,201,201,129, 90,173, 70,179,102,205,184,181,107,215,218, 79,
+156, 56,113, 1,128, 9,150,142,215,209,209, 17, 98,177, 24, 90,173,182, 40,130, 37,149, 74,225,236,236,140,231,207,159, 99,247,
+238,221, 0, 80,102, 84, 76, 44,150, 36,115, 28, 85,151,219,217,169,101, 50, 25,239,237,237,253, 66, 27,107, 53, 11, 73,120,251,
+237,183,125,195,194,194,100,205,154, 53, 43, 58,104,140, 96, 85, 68,147, 49,150,215,181,107, 87,187,181,107,215,194,223,223, 31,
+ 26,141,166,152,145,226, 56, 14, 98,177, 24,241,241,241, 88,184,112, 33, 24, 99,150,255, 35,147,159,169, 67,163, 97, 85,160,122,
+174, 43,120,164,235,144,247, 76, 7,109,158, 85, 25,189,166,102,197,212, 4, 21,174,145,122,193, 0, 89, 26, 33, 42,111, 10,208,
+218,204, 66, 83,195, 38,149, 74,145,149,149, 37, 39,162,193,230, 74, 53, 88, 19,193, 50, 26,172,152,152, 24,236,216,177, 3,221,
+187,119,135,171,171, 43, 50, 51, 51,177,103,207, 30,220,185,115, 7, 18,137, 4, 68,100, 77, 20,139,111,217,178,229,178,115,231,
+206,245, 28, 56,112, 96,195,207, 62,251, 76, 30, 28, 28,140,123,247,238, 33, 44, 44, 44, 63, 50, 50, 50, 86,165, 82,133,193,146,
+130,164,133, 21,218,141, 69, 68, 45,202, 34, 44,113, 77, 73, 74, 41,211,240,182,217,198,197, 75, 56, 20, 43,211, 96,202,133, 11,
+ 23,106,214,168, 81, 35, 16, 5,153,129,192,139,217,130,166,252,145,156,156,252, 58,108, 89,132, 54,254, 1,148, 30,193, 98, 52,
+121,224,240,177, 78, 63, 92, 33,196,199,197,226,234,225,141, 37,205, 85,185, 16, 81,103,211, 90, 25, 50,185,125, 48, 79, 5,105,
+201,138,244,120,128, 9,172, 54, 88, 37, 53,193,248, 79, 7, 14, 27,235,182,243, 42, 33, 41,254, 33,126, 63,184,193,106,115,101,
+170, 57, 84, 34,153, 35, 18,114,179,222,105,223, 84, 28,210,164, 30,236,158, 61, 70, 74, 66, 18,118,199,164,101,196,102,170, 71,
+255, 78, 90,196, 61, 84,111,237, 62,198,205,205,213, 75,132, 30, 31,184,187, 93,250, 89,113,160,218, 27,156,150,105,217,146,164,
+243,108,158,217,113, 86, 2,229,105, 18, 81, 29, 39, 39,167, 21,145,145,145, 85,100, 50,153,211,213,171, 87, 13,155, 55,111,142,
+207,207,207, 95,201, 24,219, 85, 65, 77,223,215,235,214, 62,179,120,195, 22, 89,174, 50, 15, 74,141, 22, 82, 79,111,195,254,139,
+183,250,176, 82,138, 97,150,212, 36,162, 78, 35, 71,142,124,173,101,203,150,156,169,185,210,104, 52, 80, 40, 20,200,201,201,129,
+ 66,161,128, 66,161, 64, 98, 98, 34, 58,116,232,192,189,246,218,107,193, 68,212,137, 49,118,170,164,166, 73,153,134,153, 0, 56,
+ 34,250, 35, 42, 42, 42,183, 91,183,110,144,203,229, 80, 42,149,240,243,243,131, 94,175,199,225,195,135, 17, 25, 25,169,228,121,
+254, 12,128,168,178,198,169, 82,229,249, 17, 17,167,202,203,107, 60,108,216,176, 14, 83,166, 76, 41,150, 90, 94,181,106, 85,184,
+185,185, 89,165, 9, 0, 25, 25, 25, 13,126,253,245,215, 79,162,162,162, 62,237,222,189,187,243,204,153, 51,165, 53,107,214,132,
+193, 96,224, 42,170,153,153,153,233,124,237,218,181,149,237,218,181,251,176, 91,183,110,194,197,139, 23,195,217,217, 25, 6,131,
+ 1,114,185, 28, 10,133, 2, 97, 97, 97, 56,127,254,188,158, 49,182, 33, 59, 59,251,179,178, 52,139,213,193,154,242, 85,153,233,
+145,165,213,193, 50,243,115, 55, 27,241, 41,205, 0,153,107,255, 87,252, 29,149, 48,108,112,113,113,153, 6, 96,154,185, 82, 13,
+150,106, 2,127, 70,176, 4, 2, 1,158, 60,121,130,205,155, 55,191, 80, 7,203, 88,198,193,156,118, 41,247,206, 78,159, 62,109,
+ 32,162,214, 87,175, 94,157, 54,116,232,208,209, 74,165,210,215,222,222, 62, 73,167,211,125,167, 82,169,140,117,176,204,102,227,
+150,246,253, 84, 42,149,113,230,178, 8, 75,182, 1, 92,202,212, 44, 81,166,161, 88, 41,134, 18,151, 21, 43,225, 80,178, 76,131,
+169,102,155, 54,109, 30,115, 28,119,183,112,170,253, 46, 74,100, 11,154,104,214, 75, 78, 78,126,221,219,219,251, 12, 0,187,146,
+ 89,132,127,199,123,178, 77,243,255, 55,101, 24, 44,200, 78, 92,126, 2,137, 60, 3, 55, 78,110,183,218, 92,153, 67,157,159, 23,
+ 59,103,231,211, 38, 26,117, 62,148,217,169,247,216,227, 93, 86,133,239,205, 66,176, 63,241, 71, 28,100,246, 89,184,126,226,219,
+ 44,131, 33,255, 13, 22,251,191,168,242, 47, 44, 77, 14,211, 55, 30,142, 16,147,179, 27,110,124, 50, 2, 73, 89, 74, 28,121,148,
+185,135,229,169, 39,132, 23,238,187,231,219,154,206,109,155,149,178, 49,228,125,231,126, 30,213, 68,248,106,234,119,144, 77,119,
+ 23,183,120,179,253,223,186, 71,161,113,225,251,154, 53,107,198,135,132,132, 56,244,235,215,239,126, 70, 70, 70,177,133,239, 21,
+208, 76, 32,162,175,127,217,244,229, 84,247, 70,173,176,254,139,207, 13, 59, 47,222, 42,150, 85, 88, 30, 98,177,184,227,244,233,
+211,197, 74,165,242, 5,115, 85,210, 96, 41, 20, 10,220,184,113, 3,195,135, 15,151, 70, 69, 69,117, 4, 80,178, 2,180,113, 92,
+115,136,104, 19, 10,246, 34, 76, 9, 15, 15,111,125,240,224,193,214,147, 39, 79, 22,119,239,222, 29,151, 46, 93,194,241,227,199,
+181, 90,173,246, 34,128,139,204,194,237,103, 88, 65,253,160,107, 68,116,107,249,242,229,173, 5, 2,193, 28,227,185,232,232,104,
+108,223,190,189, 34,154,122, 0, 43,137,232,235,240,240,240, 57, 39, 78,156, 24, 57,108,216, 48, 39,157, 78,135,152,152, 24,124,
+251,237,183, 21,213,252,164, 74,149, 42,179, 15, 31, 62,252,221,177, 99,199,222, 29, 50,100, 8, 55,105,210, 36,172, 91,183, 14,
+255,251,223,255,120,131,193,112, 80, 36, 18, 13, 75, 75, 75, 43, 55, 1,165, 88, 29,172, 50,234, 92,149,119,190,196, 24,191,161,
+130,237,111, 44,222,139,208,146, 72,206,203, 76, 1, 90, 56,110,139,183,234, 41, 13,227,125,116,236,216,177, 40,170,200, 24, 43,
+182,110,206,104,172,172,157, 34, 4,224, 82,248,123,186, 1,192, 58, 20,175,226, 46,192,159,149,222, 45, 85,108,152,172,118,137,
+134, 26, 49,101,111,246,236, 2, 48,152, 15, 93,253, 73,214,156, 57,115, 86,205,157, 59,119, 85,201, 82, 12,166,141, 74,150,112,
+152, 63,127, 62, 74, 43,211, 0, 32,115,206,156, 57,203, 0, 32, 48, 48,144, 10,167, 5,155,163, 48, 91,208, 68,115, 71,225,113,
+187,121,243,230, 13, 5, 80,150,166, 13, 27,175,156, 50,214, 96,177,153,209,231,118,234, 0,184,131,184, 25,236,225,110,179,133,
+229,172,129,241,108,250,111, 63,206, 91, 7,134, 76,102,208, 91, 84, 79,166, 92,120,193,172,232,115, 63,242, 0,185,128,184,233,
+236,225,255, 94,122,156,228,236,134,156,176,241,248,223,237, 36,150,162,212,189, 23,174,209, 20,139,212, 20,174,185,234,239, 19,
+ 66,187, 93,125, 68,251, 63,121,195,157,126,201, 24,250,178,221, 86, 10,105,105,105,139, 29, 28, 28, 4, 43, 87,174, 28,169, 82,
+169,138, 45,124,175, 40,140,177,207,137, 72,208,162,142,255,196, 43, 15,226,122, 91, 58, 45,104,132,136, 36, 62, 62, 62,183,242,
+243,243, 65, 68, 80,171,213, 69,198, 42, 39, 39, 7,217,217,217, 69,175,181, 90, 45,210,210,210,224,231,231, 7, 34, 42,179, 38,
+ 86,137, 15,194,179, 68, 20, 25, 22, 22,214, 62, 44, 44,172, 49, 10,162, 64,103,173,154, 26, 43,174,173, 3,112, 86, 46,183, 75,
+ 34, 34, 95,177, 68,170,188,112,225,194,137,151,212,204, 67, 65,100,228,171,175,190,250,106,145,189,189,253,235,209,209,209, 39,
+ 95, 70,179,208, 60,245,113,119,119,247,217,177, 99, 71,196,182,109,219, 90, 9,133,194, 75, 68,212, 55, 43, 43,203,234,205,158,
+169,120, 68,192,234,243, 37, 24, 7,203,246, 32, 52,125, 46,151,202, 46, 46,250, 42, 12,155,193, 96,200,157, 61,123,118,145,150,
+241,222, 74, 70,171,140,175,181,218, 23, 83,157,205, 81,222, 58,182, 18,148, 99, 46, 40, 23, 0, 10,246, 22, 44,216,254,198,210,
+205,158, 1,148,186,183,229,220,185,115,217,252,249,243,137,227,184,131, 0,238,113, 28,247,160,228, 34,116,211,115,243,231,207,
+199,220,185,115,217,188,121,243, 74, 29,169, 81,243,206,157, 59, 76, 32, 16,156, 4,240, 88, 32, 16, 60, 49,213, 53, 61,110,188,
+166, 44, 77, 27, 54, 94, 53,165, 26, 44,246, 40, 34, 30,192,136,202,236,140, 61,142, 56, 1, 43,246, 50,179, 72,243,201,174, 56,
+ 0, 67, 42, 77, 15, 88, 49,166, 69,199,169, 40,248, 47,240,171,146,230,202,148,164,115,236,160,119, 91, 90,210,226,205,246,147,
+ 81,112,193,226,202, 26,199,203, 96,110,225,251,203, 98,110,225,187,165, 24, 12,134, 99,114,185,156,148, 74, 37, 84, 42, 85,177,
+104,149, 66,161, 64, 94, 94, 30,114,115,115,139, 22,167,231,230,230, 26,167,187,172,250,239,179,208,164, 28, 33,162, 99,140,177,
+ 10,239, 0, 96,138, 74,149, 87, 29, 0,136, 72, 80, 89,154,133,137, 6,163, 43, 83,243,249,243,231, 73, 0,218, 4, 4, 4, 72,
+ 98, 99, 99,173, 72, 25, 44, 78,121, 27, 57, 91,186,209,179,145,202,136, 6,189,106, 42,219,176, 1,128, 86,171,109, 80,217,154,
+140, 49,107,204,173, 37,130,223,118,109,215, 80, 0,211,218, 63,229,109,246, 12, 0,160, 92, 48,124, 91,202, 24, 25, 21, 56, 72,
+ 6, 96,199,195,135, 15,253,121,158,143, 51, 19, 73, 42,118,110,222,188,121, 96,230,210, 98, 95,212, 4,128, 3,241,241,241, 62,
+ 6,131, 33,185,132,110,177,227,101,105,218,176,241, 87, 96,205, 86, 57,255, 47,248, 94,163,153,139,114, 54, 27, 54, 37,249,119,
+ 54, 11,192,172, 87, 55,162,138, 81,153,230,202, 68,211,106,115, 5, 0, 58,157,238, 55, 0,168, 82,165, 10,170, 84,169, 82, 94,
+115,211,235, 42,210, 29, 42,203,180,252, 27, 53, 95,198, 92,217,248,255, 5,203,140,142, 7,240, 69,185,237,202,175,222, 94,188,
+253,159,166, 38, 19, 64,102, 41, 30,167,172,115,101,105, 2,128, 2,128,194,204,181,165, 29,183, 97,227,111,193,170,201,127, 27,
+ 54,108,216,176, 97,195,134, 13, 27,229, 67, 0, 58,155, 59, 97, 77,118, 0, 17,153,213, 40,139,242,244,109,154, 54, 77,155,166,
+ 77,211,166,105,211,180,105,254,247, 52,203,211, 46,153,141,204, 42,105, 27,173,191, 28, 99,102,203,171,120, 0,232,108,211,180,
+105,218, 52,109,154, 54, 77,155,166, 77,211,166, 89,193,126,198,254, 21,253,188,138,135,109,138,208,134, 13, 27, 54,108,216,176,
+ 97,163,146,177, 45,114,255,151, 66, 68,117, 0,204, 4, 96,186, 87,216, 21,198,216,146, 18,237,126, 4, 96,103,114, 72, 9, 32,
+140, 49,246,192,154,254, 4, 2,193,146,246,237,219, 79, 56,127,254,252,151, 58,157, 46,172, 2,227,245,247,246,246, 94, 70, 68,
+205, 0,136,136,232, 97,106,106,234, 18,157, 78, 87,225, 66,117, 68, 84,203,203,203,107, 41,128, 38, 28,199,137,136, 40, 54, 53,
+ 53,117,161, 78,167, 43,185, 45,135, 53,154,142,158,158,158,109, 25, 99, 94, 0, 4, 34,145,232,121, 98, 98,226,101, 86,193,108,
+184,190,243,239,136, 21, 74,189, 8, 0,156,236,133,186,136,185,129, 90, 75,143, 85,244, 30,108,216,176, 97,195,198,223, 79,153,
+ 6,107, 64, 61,242, 54, 8, 33,140,136,102,241, 64,193,135, 15,128,198, 0,234, 0,120, 0, 32,138, 49,150,243, 50, 3,248,183,
+104,254, 3,153,195, 24, 27,100,122,192, 92, 29,161, 55,222,120,163,215,177, 99,199,236,140,219,168,240, 60, 15,185, 92,174, 7,
+ 48,220,210,142,136,168,234,192,129, 3,167,111,221,186, 21,253,250,245,155, 77, 68,171, 24, 99,185,150, 94,239,230,230, 22, 90,
+171, 86,173,117, 91,182,108,169,210,170, 85,107,146, 72, 36,120,248, 48,214,119,220,184,113,193,158,158,158, 7, 83, 83, 83, 71,
+ 91,170,101,196,221,221,125,112,237,218,181,191,218,188,121,179, 71,187,118,237, 64, 68,136,140,140,244,253,228,147, 79, 26,123,
+121,121,237, 74, 73, 73,249,208, 90, 77, 15, 15,143,186,181,107,215,238,180,126,253,122,121,219,182,109, 33,147,201, 16, 21, 21,
+229,240,193, 7, 31,120,121,121,121,197,164,164,164,156,177, 70,175,239,252, 59,226,155,145, 63,191,171,215,170,151, 3,128, 80,
+ 44,253,188,245, 42,197,207, 25,145,103,123,150,119,172,239,124, 28,176,153, 44, 27, 54,108,216,248,247, 82,170,193, 10,109, 72,
+ 97, 16, 98, 38, 0,122,187, 14,237, 58,254, 88,112,174, 75,151, 46, 1,163, 70,141,162,166, 77,155, 34, 50, 50,178,238,174, 93,
+187,222, 17, 10,133,177, 6,131, 33, 18,192,109,102, 97, 21,106, 34, 18, 1, 8, 18, 8, 4,205,254,201,154,255,112,236, 1,128,
+136, 82, 1, 92, 41, 60,118,165,100,163,223,126,251,237, 39,161, 80,104,140, 96,181, 80, 42,149,158, 40, 30,245,178,132, 26, 58,
+157, 14,119,239,222, 5,199,113, 34, 0, 53,241,226,214, 23,102, 33, 34, 95, 95, 95,223,141, 23,175, 68,186,147, 80,142,204,124,
+ 0,249, 90, 72, 28, 60,177,117,123,184,219,148,143, 63,236,227,228,228,116, 78,161, 80,124,111,233, 96,136,168,166,159,159,223,
+170, 27, 55,110,184,219,217,217,129,231,121,228,228,228,192,203,203, 11, 91,182,108,113,153, 50,101,202, 32,185, 92,126, 90,165,
+ 82,253,207, 10, 77,199,218,181,107,119,186,117,235,150,220,184,209,179, 70,163,129,175,175, 47,126,252,241, 71,233,164, 73,147,
+ 26, 72,165,210, 4,181, 90,253,200, 82, 77,133, 82, 47,210,107,213,203,119,108,152, 87, 29, 0,134,125, 56,111,185, 36,199,233,
+176, 37,199, 20, 74,253, 47, 0,108, 6,203,198, 95, 10, 17, 53,243,240,240,216,155,158,158,126, 6,192,104, 86, 9,165, 68,136,
+200, 71, 40, 20,214,100,140,185, 20,190,206,210,235,245,143, 25, 99, 86, 23,194, 53,226, 17,208,169, 39,164,118, 35,192,248,198,
+ 28, 0,226,184, 40,131, 54,111,123,250,189, 83, 63,191,148,166, 68, 62, 18, 96,141, 57,128, 39,142,187,193,235,243,182,164,221,
+ 57,101, 85, 97,101, 27, 54,140,152, 53, 88,125, 27,146, 43,128,105,187,214,205,228,132, 2, 1, 13,252,120,201,160,109, 27, 86,
+114, 93,122,246, 45,154, 38, 9, 9, 9, 65, 72, 72, 8, 45, 95,190,188,206,201,147, 39,235,252,248,227,143,122, 34,186,193, 24,
+219, 93, 90,103,221, 2, 72,197, 3,178,119,234, 11,149, 3,191,248,126,115,203,150, 45, 33,149, 74,241, 50,154, 0,208,181,142,
+224, 81,247,150, 1, 55, 6, 78,156, 19,215,170, 85, 27, 86, 25,154,255, 34,174, 48,198,122, 3, 0, 17,185,250,249,249,181,213,
+235,245, 50, 0, 16, 10,133,249, 0, 38,178,194, 45,126,136,232, 32,207,243,189, 44, 21, 38, 34, 14,192,220, 94,189,122,205,254,
+232,163,143,224,231,231,135, 73,147, 38, 65,167,211, 69, 18,209, 28, 0, 75, 89,225, 42,196,210,168, 90,181,234,156,141, 27, 55,
+186, 9, 37,246,104, 58,237, 49,146,179,244, 0, 0, 7, 41,240,211,120,134, 73,147, 38, 57, 93,189,122,117, 33, 0,139, 13, 86,
+213,170, 85,195,182,108,217,226,102,103,103, 7,198, 24,114,115,115,145,147,147,131,220,220, 92,228,230,230,226,195, 15, 63,116,
+138,137,137, 89, 6,192, 98,131,229,233,233,217,118,253,250,245,114,153, 76,134,220,220, 92,177, 86,171,165,156,156, 28,228,229,
+229, 49,141, 70,163,157, 56,113,162,244,246,237,219, 29, 1, 88,108,176,108,188, 90,136, 72, 0,224, 61,145, 72,244,126, 64, 64,
+ 64,243, 7, 15, 30, 92,215,235,245,251, 0,236,123,217,127,162,136,232, 77, 31, 31,159, 69, 73, 73, 73,235, 25, 99,225,149, 51,
+226,127, 62,158,158,158,251, 46, 92,184, 80,125,227,198,141,195,191,252,242,203,195,176,226,111,168, 36,133,255,244,182,110,209,
+162,133,199,251,239,191, 47,242,242,242, 66, 94, 94, 30, 98, 99, 99,237, 78,156, 56, 81, 69, 38,147, 61, 87,171,213, 22,111, 15,
+ 5, 0, 30,245,218, 58, 64,232,180,171,117,167,206,237,250,245,121,207,209,211,221, 25, 42,141, 1, 15,226,146,253,126, 61,252,
+ 83, 7,159,224,119, 46,104,181,217, 3,210,239,253,110,113,132,221,168,217,169, 91,143,118,157,223,124,211,209,217,197, 25,217,
+ 74, 45, 30, 62, 73,244, 63,117,252,231, 16,239,224,119,206,242,164, 27,146,122,243, 88,133,118, 91,176,241,255, 23,139, 23,185,
+219,217,217,153, 61,238,236,236,140, 78,157, 58, 97,201,146, 37, 66, 0,205, 76,207,177,146,155,159, 2,210, 67,155,102,192,217,
+ 94,202,249,249,249, 57, 58, 57, 57,189,180,102,193, 65,190,102, 27, 63,246,246, 31,223,207, 28,126,226,199,175,130,148, 57, 89,
+162,146, 77, 28, 28, 28, 80,175, 94, 61,204,158, 61,219, 50,205,151,228,175,214,244,246,246,174, 31, 18, 18,210,236,183, 51,103,
+ 92,146,146,146,164, 73, 73, 73,210, 99,191,253,230,210,186,117,235,102,222,222,222,245, 77, 52,172, 25,231,130, 13, 27, 54,204,
+ 57,120,240, 32, 23, 18, 18, 2, 87, 87, 87,116,234,212, 9,135, 15, 31, 22,126,249,229,151,139, 1,204, 46,111,156, 28,199,181,
+ 11, 9, 9, 33, 48,134,148,108, 61, 46, 47,169,143,168,149,129,200,201,103,200,200, 86, 64,165,202,135,157,157,157,172,112, 90,
+215,210,123,111,211,186,117,107, 2, 80,100,170,114,114, 10, 30,185,185, 74,104, 52, 90, 72,165, 82, 71, 34,146, 89,170,201, 24,
+243,106,219,182, 45, 0, 64,171,213, 22,205,181,102,101,101, 81,118,118, 54, 52, 26, 13, 68, 34,145,152,136,202,156, 86, 55,213,
+116,178, 23,234,132, 98,233,231,195, 62,156, 23, 63,236,195,121,241, 66,177,244,115,141,163,194, 96,201, 49, 39,123,161,206,156,
+102,101, 81,158, 38, 17, 85, 17, 8, 4,223, 6, 4, 4,196, 8, 4,130, 29, 68,228,245, 50,154, 68,244, 58, 17, 45,182,179,179,
+ 59,209,160, 65,131,120,123,123,251,223,136,104, 41, 17,181,174,136, 38, 17, 73,236,236,236,126, 91,188,120,113,196,245,235,215,
+251,157, 60,121,178,230,205,155, 55,251, 44, 95,190,124,151,131,131,195, 57, 34, 50,255,134, 85,206, 56,141,212,172, 89,115,219,
+229,203,151, 95,111,211,166,205, 86, 34,146,150,215,222, 18, 77, 34, 18, 16, 81, 19,178,112, 79,160,191,250,231, 78, 68, 62, 77,
+155, 54,173, 46,147,201,208,185,115,103, 0,232,248,146,154,173, 63,248,224, 3,175, 41, 83,166,136,162,162,162,176,117,235, 86,
+ 28, 60,120, 16,207,158, 61, 67,143, 30, 61,196,111,188,241,134,151, 84, 42, 53,251,243, 47, 85, 83,232,180,235,227, 79, 38,119,
+155, 58,105,140,227,141,167, 90,108, 63,241, 20, 7, 46, 38,227, 89,158, 4, 61,251, 12,115,126,171,119,255,183, 36, 82,103,179,
+ 27,219,151,165, 57,125,218,180,110, 99, 71, 14,114,140, 78,230,241,211,165, 20, 92,186,155, 13,189,200, 5,221,251,140,118,109,
+220,182,219, 59, 66,136,190,179,242,222, 43,204,255,103,205,255, 26, 69, 31, 22, 68,196, 24, 43,216,196, 53, 34,154,101,134, 54,
+164,101,253, 63, 90, 60,155, 56, 98, 53,130,218, 68, 87,171,221, 80,233,238,238,142,188,188, 60,168,213,106,136,197, 98,228,231,
+231,227,233,211,167,184,116,233, 18, 92, 93, 93,173,234, 88,161, 80,192,193,193, 1, 14, 14, 14,149,162, 57, 99,120,103,233,195,
+248, 52,233,209, 75,167, 59,172,153,240,191, 86,181,155,116,188,249,102,255, 73,183,156,170,248,228,223,188,121, 19, 23, 46, 92,
+ 64,102,102, 38, 90,182,108,105,213, 56,255,193, 92, 41,124,159,190, 66, 68,174, 33, 33, 33,190, 71, 79,156,117,205,205,231,157,
+158,164,234, 68, 60,207,195,206,206, 91,191,123,239, 79,217,253,250,244, 36, 34,122, 6,224, 74,161,169,125, 97, 42,209,148, 66,
+ 99, 82, 63, 52, 52,116,250,132, 9, 19, 16, 27, 27,139, 49, 99,198,168,174, 92,185,242,188, 77,155, 54,238, 91,182,108,145, 79,
+153, 50, 5,103,206,156,153, 75, 68,251, 1, 60,102,140,153,221, 75,141, 49, 38, 22,139,197,208, 23,218, 5,173,129,135,209,215,
+ 43, 20, 10, 48, 85, 38,196, 98,177, 0, 64, 21, 0, 22,173,147,227,121, 94, 44, 18,137,138,204,213,211, 84, 5,158, 62,203,131,
+ 34, 87, 3,149, 74, 15,141,138, 65, 96,231, 46, 4,158,120, 2,120, 98,137, 38, 0,129, 76, 38,131, 94,175, 71, 78, 78,193, 48,
+140,145, 49,141, 70,131,236,236,108, 8, 4, 2, 7, 0, 78, 0, 50, 44, 17, 44, 88,188,142, 3,133,211,125,248,227,135, 94, 30,
+ 15,126,153,161, 13,157, 23, 83,116,204,201, 94,168,219, 59,165,129,192,221,183,241,249, 38,253,190, 11, 52, 30,251, 59,215, 95,
+ 17,145,180, 74,149, 42,167, 34, 34, 34, 26,212,169, 83, 7,143, 31, 63, 14,236,219,183,111, 75, 34,106,194,172,220, 51,145,136,
+236, 56,142, 91, 54, 98,196,136, 9, 3, 7, 14,164,186,117,235, 66, 40, 20, 66,175,215,251,198,198,198,118,218,179,103,207, 52,
+161, 80,184,197, 96, 48,124,106,233,186, 62, 34,226, 36, 18,201,238,205,155, 55,183,111,217,178, 37,118,236,216,129, 43, 87,174,
+240,175,191,254, 58, 55,116,232, 80,248,251,251,183, 28, 58,116,232, 1, 34,234, 94,145, 72, 22, 17,249, 15, 30, 60,184,186, 64,
+ 32, 64,155, 54,109,196, 23, 46, 92,104, 10,224,130,181, 58, 37, 52, 29,124,125,125,207,116,236,216,177,201,137, 19, 39,174, 17,
+ 81, 71,107,214, 49, 18, 81,111, 31, 31,159,229,206,206,206, 22,191, 41, 42, 20,138,188,196,196,196,207,152,229,251,145,182,106,
+214,200, 78, 9,201, 0, 0, 32, 0, 73, 68, 65, 84,172, 25,226,226,226, 80,191,126,125,136,197,226,214, 68, 52, 14, 64, 55, 0,
+179,152, 21,187, 67, 16,145, 79,235,214,173, 61, 58,118,236, 72, 75,151, 46, 5, 0,136, 68, 34, 24, 12, 6,112, 28, 7,145, 72,
+132,192,192, 64,122,244,232,145, 27, 17,249, 88, 50, 93,232, 17,208,169,103,155, 55,187,181,107,223,242, 53,238,203,189, 15, 96,
+224, 13, 16,144, 30, 66,226,193,235,164,144,138, 5,168, 27,212, 92,112,247,246,141,150, 30,245,186,244, 76,191,119,188,220,233,
+ 66,143,128, 78, 61,187,245,236, 21,210,160,126, 93,110,205,129,135,200, 74,140, 49, 36,222, 57,155,206, 9, 56, 52,104,246,134,
+ 71,221,134, 77, 4, 77, 90,118, 20, 37, 61,190,221,201,173, 78,135,206, 25, 15,206,216, 76,197, 43,198,212,139,252,219, 41,245,
+191,241,189,209,108,142,147,132,106,238,217,179,147, 75,203,209, 42, 99, 99, 99,225,225,225, 1,111,111,111, 56, 59, 59, 35, 58,
+ 58, 26,191,253,246, 27,238,221,187, 7,158,231,209,184,113, 99,171, 58, 78, 79, 79,199,141, 27, 55,224,234,234, 90,105,154,181,
+171, 87,193, 71,213,171,136, 83,159, 43,196, 39,174,220,107,249,205,140, 62, 13,185,192, 62,219,242,243,255,252,236,215,104,254,
+ 27, 59,137,152,102, 11,250,249,249,181,221,190,125,187, 88,173,135, 99,221,113, 23, 87, 40,243, 13,246, 0, 96, 47, 19, 40, 35,
+151,215,251,116,193,130, 5,202,145, 35, 71, 6, 62,125,250,116, 73,233,138, 5, 72, 36,146, 69,111,191,253,246, 84,198,152,232,
+227,143, 63, 6, 0, 12, 27, 54, 76,113,233,210,165,186,140,177,103, 68,228, 51,106,212,168,251,167, 78,157,178,155, 60,121,178,
+ 64,175,215, 71, 11,133, 66, 70, 68, 97,140,177,121, 37,245, 56,142,187,122,237,218,181, 26, 62,254,245,224,239,206, 33,100,118,
+193,118,106,238,118, 60, 18,158, 60,196,157,155, 87,224,229,229,229,236,237,237, 29, 83,191,126,125,109, 98, 98,226,180,220,220,
+220,141,101,141, 81, 44, 22, 71, 69, 70, 70,122,251,251,251, 35, 55, 55, 23, 9,105,121,152,180,207, 14, 10, 85, 65,208, 66, 4,
+ 21,154, 84,175,231, 40,231, 52, 87, 60, 61, 61,181, 26,141,230,139,172,172,172, 50,183,251, 16,137, 68,207,111,222,188,233,224,
+231,231,135,252,252,124,150,145,145, 65, 74,165, 18, 57, 57, 57,244,203, 47,191,188,155,156,156,252,122,205,154, 53,201,215,215,
+ 55,172, 78,157, 58,170,196,196,196, 49,150,172,241,138,152, 27,168, 37, 34,131, 80, 40,252,114,236,216,177,253,246,239,223,127,
+117,239,188, 6,189, 25, 99, 90, 0, 32, 34,231,160,160,160,163,175,189,214,208, 39,124,101,163,181,140,177, 21,229,105,254, 5,
+140,152, 57,115,102, 3, 55, 55, 55,124,240,193, 7,152, 63,127, 62,230,204,153, 83,231,131, 15, 62, 24, 11, 96,149,165, 34, 68,
+ 36,247,242,242,250, 99,205,154, 53,129,109,219,182,197,225,195,135,177,115,231, 78, 60,122,244, 72, 95,179,102, 77, 97,203,150,
+ 45, 49,119,238, 92,188,245,214, 91, 99, 38, 78,156,216,129,136,154, 90,104, 58, 70,206,157, 59,183,119,187,118,237, 48,124,248,
+112,245,233,211,167,251, 1, 56,118,252,248,241, 55,206,156, 57,179,247,135, 31,126,144, 47, 94,188,184,243,148, 41, 83, 62, 0,
+176,174, 2,247,255,110,251,246, 5,123, 27,183,107,215, 14,203,151, 47,127, 11, 47, 97,176,136, 72,226,238,238,254,203,142, 29,
+ 59,154,212,171, 87, 15, 67,134, 12,105,218,175, 95,191, 95,136,168, 11, 99,204,162, 55,164,106,213,170, 45, 59,120,240, 96, 64,
+105, 51, 9,230, 80,171,213,110,239,189,247,222, 82, 0, 86, 25,172, 31,127,252, 17,159,125,246, 25, 26, 55,110,252, 90,171, 86,
+173, 54,141, 27, 55, 14,161,161,161,111, 18,145, 39, 99, 76,105,137,144, 80, 40,172,217,163, 71, 15,209,190,125,251, 0, 0,237,
+219,183, 71,231,206,157,113,235,214, 45,156, 63,127, 30, 2,129, 0,246,246,246,104,219,182,173, 36, 41, 41,169, 38,128,114, 13,
+ 22, 39,181, 27,209,187, 71,119,199,159, 46, 37,195,192,235,209, 60,192, 9, 45, 3,171,226,110,130, 2,145, 49, 9, 48,104,196,
+112,114,115, 71,235, 14, 93,221, 82, 18, 31,141, 0, 80,254,122, 44,169,221,136,247,123,191,227,240,211,197, 36,100, 37,221, 97,
+ 15,174,236,255, 77,151,175, 28, 3, 0, 87, 79,238,218,228,229, 46,239, 82,183, 89,115, 65,199, 46,189, 92,247,237, 76, 25, 1,
+192,102,176,108, 88, 76,153,211, 29, 57, 90,164,190,249, 78, 31, 92,187,118, 13, 0,240,252,249,115, 60,127,254, 28, 1, 1, 1,
+ 88,183,174,248,251, 86, 69,140, 11,207,243,149,174, 9, 0,158,238, 78, 24,210,189,133,240,252,141,157, 50,101, 90,154,204,193,
+193,161,200, 97,253, 87, 12,150, 41,122,189, 94, 86,179,102, 77, 40, 84,160,236, 60,157, 67,250,174,130,200,190,199,128,211, 14,
+ 26,141,134,115,112,112,128, 90,173, 46,115,186, 12, 40, 88, 51,209,187,119,239,169,187,119,239, 22,221,185,115, 7,181,107,215,
+134, 86,171,197,165, 75,151, 18, 88,193, 6,197, 96,140, 37, 9, 4,130, 36,158,231,235, 52,110,220, 24, 75,150, 44, 65, 96, 96,
+ 32,117,239,222,125, 90,161,201,226, 77, 53,147,147,147,151,141, 27, 55,238,141, 61,123,247,187,109,238,175,130, 34, 91,129,220,
+220, 92, 68, 93,191,138,140,212,124,124,243,205, 55,144,201,228, 4, 64,252,236, 89,170,120,242,228,201,107,125,125,125,187, 37,
+ 36, 36,244, 40,109,156, 73, 73, 73,139, 62,252,240,195,214,187,118,237,114,201,201,201,129, 74,149,143, 12,165, 29, 98, 86, 23,
+236,175,219,224,147, 24,108, 88,191,145,107, 84,195,222, 35, 47, 47, 15, 19, 38, 76,248,202,199,199,167,109, 82, 82,210,168,210,
+ 52, 19, 19, 19, 47,127,244,209, 71,158, 63,252,240,131, 76,163,209,104, 13, 6, 3, 84, 42, 21,183,107,215,174,105, 53,106,212,
+112,221,178,101, 11,201,100,242,194,182, 9,226,241,227,199,239,246,242,242,250, 33, 37, 37,101,120, 57,223, 83,129, 64, 32, 88,
+ 29, 30, 30, 62,180,127,255,254,142,201,201,201, 13, 15, 30, 60, 40, 5,160, 42,108,226,221,165, 75,151, 26, 43, 87,174,172, 18,
+ 20, 20, 52,141,136, 68,140,177,191,117,211,112, 15, 15,143,137,189,123,247,198,210,165, 75,241,243,207, 63, 79,113,115,115,251,
+106,254,252,249,240,241,241,249,136,136, 86,151,183,238,206,132, 21,171, 86,173, 10, 12, 12, 12,196,176, 97,195, 52, 39, 78,156,
+152, 9,224, 0,128,184,115,231,206,249,125,247,221,119, 61,119,239,222,189,116,205,154, 53,178,117,235,214, 5,244,233,211,103,
+ 53,128, 82,127, 70, 70, 60, 61, 61, 39, 15, 28, 56, 16, 43, 87,174,196,233,211,167,251, 48,198, 14, 23,158, 58, 66, 68, 61, 23,
+ 47, 94,124,114,246,236,217, 88,181,106,213,199,176,210, 96, 17,145, 67,131, 6, 13,190,232,214,173, 27,206,157, 59,135,144,144,
+ 16,180,110,221,122, 10, 17,173,101,140,165, 91,163, 85,168,199, 57, 56, 56,236,222,190,125,123, 72,141, 26, 53,176,112,225, 66,
+ 76,157, 58, 21,219,182,109, 11, 25, 50,100,200,110, 34,122,191,228,223,140, 57,156,157,157, 29,236,236,236, 48,109,218, 52,246,
+232,209,163,204,242,218, 87,175, 94,221,245,171,175,190, 34, 87, 87, 87,139, 18, 90,136, 72, 46,147,201,218, 4, 7, 7, 99,238,
+220,185, 56,126,252, 56,102,207,158,141,224,224, 96,196,197,197, 97,192,128, 1,118,179,102,205, 10, 5, 96,209,190,132,140, 49,
+103,119,119,119, 60,123,246, 12, 34,145, 8,109,219,182,197,129, 3, 7,160, 86,171, 81,181,106, 85,100,101,101,161, 69,139, 22,
+ 0, 0,161, 80,104, 97,210, 13, 11,246,112,115,198,179,219,137, 16, 66,143,102,117, 61,112,234,214,115,104,117, 60,170,186,187,
+ 32,229, 89, 42, 90, 5,251, 66,163,241, 3, 99,124,176, 37,138, 18, 1,215, 76, 42,147, 35, 35, 39, 29,137, 49,167,159,107, 13,
+234,113, 89,143,206,199, 3,128, 91,237,246,227,174,158, 63,126,181,239, 59,237,171,230, 42,171,131, 24,223,194,178,113,218,176,
+ 81, 64,185,107,176,204,189,151,230,229,189, 56, 75,240,178,198,229, 85,104,154,227,191,104,176,140, 24, 55, 71,214,232,120,104,
+116, 5,239,217,106,181, 26, 42,149,170,172,203,138, 96,140,233,142, 30, 61,186, 99,210,164, 73,248,234,171,175,112,255,254,125,
+136,197, 98, 4, 7, 7,123, 19,145, 3, 80, 16,113,105,214,172, 89, 85,142,227,112,247,238, 93,124,249,229,151, 24, 57,114, 36,
+187,112,225,194, 54,115, 31, 20,140,177,235, 25, 25, 25,235,199,141, 25,153,149,153,250, 20, 58, 85, 38,158, 37, 62,132, 90,153,
+133,133, 75,150, 33, 79, 39, 68, 74,182, 22, 41,217, 90,112, 82, 55,108,218,178, 93,208,160, 65,131,110, 66,161,176, 84,131,197,
+ 24,187,148,154,154,186,101,252,248,241, 89, 41, 41, 41, 69,247,167,209, 49,104,116,197,127, 95,237,236,236,176,122,245,106,231,
+186,117,235,246, 22,137, 68,157,202,208, 76,142,143,143,191, 51,126,252,120, 77,106,106, 42,178,179,179,241,211, 79, 63,245,172,
+ 81,163,134,235,210, 21, 95,145, 82, 43, 68, 74,150, 22, 41, 89, 90, 72, 28,170, 98,247,222,253,130,122,245,234, 13, 18,137, 68,
+165,174, 33, 50,154,171, 31,126,248, 97,104,255,254,253, 29, 87,172, 88,145,113,240,224,193, 13,140, 49,211, 31,200,221,213,171,
+ 87,239,217,189,123,119,206,212,169, 83,221,150, 47, 95, 62,133,136,102,150,250, 67,122,197, 16, 81,167,254,253,251,215,231,121,
+ 30, 17, 17, 17, 55, 25, 99,171,246,239,223,255,135, 90,173,198,128, 1, 3,106,162, 96,186,200, 18,157,215, 7, 13, 26, 52, 33,
+ 36, 36, 4,159,124,242,137,246,196,137, 19,205, 24, 99, 95, 49,198,158,176, 2,226, 24, 99,107,207,156, 57,211,120,226,196,137,
+234, 22, 45, 90, 96,248,240,225, 35,137, 40,164, 28,221, 54, 3, 7, 14, 12,228,121, 30,187,118,237,186, 97, 98,174, 0, 0,140,
+177,223,246,238,221,123, 73,163,209, 96,240,224,193,181,136,232, 13, 43,238, 93, 44,149, 74, 35, 22, 44, 88,224,146,152,152,136,
+161, 67,135,170,239,222,189,139,121,243,230,201,157,157,157, 15, 27,255, 6,172, 65, 42,149,126,243,245,215, 95,247,110,212,168,
+ 17,198,143, 31,175,217,184,113,227,164, 9, 19, 38,104,154, 53,107,134, 13, 27, 54,244,150, 72, 36, 86,109, 1,146,148,148,148,
+ 21, 29, 29,237, 94,222, 35, 33, 33, 33,213,194,123,182,115,116,116,188, 24, 20, 20,164, 8, 14, 14,110,174,215,235, 17, 29, 29,
+253,112,199,142, 29,124,112,112, 48,214,175, 95,143,229,203,151,163, 71,143, 30, 16, 8, 4,161,214,140, 85,169, 84, 66, 38,147,
+ 65, 44, 22, 35, 50, 50, 18,106,181, 26,118,118,118,144,201,100, 16, 8, 4,112,113,113,129,163,163, 35, 0, 88,100,216,137,192,
+ 20,121, 58,136, 68, 28,132, 28,143, 59,113,217,208,234,120,200,196, 2,136,132, 4, 48, 30, 46,246, 34,200, 36, 2,112, 68,229,
+154,214, 66, 77,100, 43,181,144,136, 57,136,196, 18,226,244, 6,185,241, 28, 39, 52,200,229,114, 9,121, 56, 73, 33, 19,219,106,
+114,219,176,158,114, 11,141,242,252,139,191,167,230, 76,138, 90,173,126,169,129,188, 10, 77,115,230,240,101, 53,255,137, 8,133,
+194,252,123,247,238, 73,156,220,125,120,119, 71, 81,102,141,145,231,157, 1,192,205, 65,152,173, 53,232,248,164,164, 36, 72,165,
+ 82,179,107,164, 74,146,159,159, 63,134,136, 22, 2,104, 40, 20, 10, 15,109,223,190,157,194,195,195, 93, 7, 14, 28, 24, 75, 68,
+137, 65, 65, 65,254,219,183,111,119, 2,128,181,107,215,178,221,187,119,191,133,130,210, 23, 41,165,105,166,164,164,204, 19,137,
+ 68, 23, 62,252,240,195,117, 18,137,196,213,222,222,222,253,220,185,115,148,175,101,120,125,102, 92, 81,102,161,147,156,195,217,
+ 25, 78, 24, 59,118,172, 32, 38, 38,102, 9,128, 67,101,104, 78,147, 74,165,231,238,223,191,255,149,179,111,147, 42,246,254, 51,
+157, 91,206,184, 11, 0,240,247, 16,129, 43,124, 63,204,202,202, 66, 90, 90, 26, 38, 76,152,224, 26, 27, 27, 59, 13,192,169,210,
+ 52, 19, 18, 18,206, 72,165,210,132,219,183,111,119, 20,137, 68, 18,123,123,251,215, 47, 94,188, 72,249, 26, 30,175, 77,139, 67,
+ 70,110,193, 56,221, 28,132,184,186,192, 19, 31,125,244,145,240,193,131, 7,203, 0,180, 51,167,199,113,220,114, 83,115,245,249,
+231,159, 71, 1,168, 69, 68,197,166, 64, 13, 6, 3, 13, 30, 60,248, 22,128,224,169, 83,167,186, 49,198,166, 16, 81, 6, 99,108,
+115,105, 99,125, 85, 56, 57, 57, 45, 29, 55,110, 28,118,239,222,141,204,204,204,213, 0,160, 80, 40, 86,253,248,227,143,187,198,
+140, 25,131,239,191,255,126, 41, 17,253,106, 65, 20,235,237, 1, 3, 6,224,200,145, 35, 56,121,242,228, 23,140,177,104,115,141,
+ 24, 99,247,137,104,218,193,131, 7,215, 12, 28, 56, 16,223,126,251,109, 55, 0,231,202,208,237,242,214, 91,111,225,240,225,195,
+120,254,252,249, 6,115, 13,178,178,178, 54,254,244,211, 79,173,222,122,235, 45, 44, 89,178,164, 11,128,223,202,187,111, 34, 10,
+116,118,118,222,190,102,205,154,215, 27, 53,106,132, 65,131, 6,229,107,181,218,110, 83,167, 78,253,121,231,206,157,142, 59,118,
+236,104, 62,118,236,216,203, 68, 52,154, 49,118,169, 60, 61, 0, 16, 8, 4,139,215,173, 91, 55,170, 99,199,142,152, 50,101,138,
+254,232,209,163,189, 24, 99,199,136, 40,246,243,207, 63,255,229,203, 47,191, 20,172, 92,185,114,148, 64, 32, 72, 51, 24, 12,127,
+151,169, 94,176,118,237,218, 86, 93,187,118,197,195,135, 15,113,233,210, 37,104,181,218,239, 47, 94,188,120,182, 78,157, 58, 11,
+ 52, 26,205,207,246,246,246,195, 28, 29, 29,131,154, 52,105,242, 6, 17,217, 89,178, 14,143,136,178, 98, 99, 99,237,171, 86,173,
+ 10,145, 72,132, 27, 55,110,160,106,213,170, 0,128,103,207,158, 33, 56, 56, 24, 2,129, 0, 89, 89, 89, 0,144,109,201, 64,137,
+184,155,177, 79,146,106,185, 57,218, 3, 6, 25,174,223, 77, 64, 21, 15, 87, 24,136, 67, 74, 74, 50,154,212,247, 5, 17, 33,235,
+121, 10,136,232,150, 37,154, 6,198, 71, 62, 77,122, 86,205,221, 81,138, 70,173,186,186, 95,252, 53, 45,220,185,118,187,177, 66,
+ 1, 9,164, 50,167,205,163,134, 15,247,224,121,134,172,231,169, 16,114, 92,153,107, 87,109,216, 40, 73,145, 45, 47,109, 81, 89,
+193, 98,233,226,243,254, 37, 77,138, 76, 38, 43,138,158, 88,138,105, 41,133,202,210, 44,143, 87,161,249,119, 65, 68, 51,136,232,
+ 32, 17,205,136,143,143,191, 51,106,212, 40,173, 94,171,206,185,176,176,214,244,107, 75,106,140,191, 56,207,123,252,129, 73,206,
+211,243,178, 51,114,214,174, 93,171,139,143,143,191, 99,122, 77, 89,218,140,177,167,140,177,195,223,125,247,221,198,136,136, 8,
+ 4, 7, 7, 35, 58, 58,186,170, 82,169,108,122,235,214, 45,183,192,192, 64,132,135,135, 99,247,238,221, 95, 49,198,142,151,101,
+174,140,232,116,186, 19,201,201,201,245,226,226,226, 2, 92, 92, 92,116, 46, 46, 46, 40,153, 89,168, 80,241,120,158,149, 13, 55,
+ 55,119, 56, 57, 57,213, 44, 79, 83,173, 86, 31, 78, 78, 78,174,203,187,214,111, 95, 55,125,117,118,228,226,234,136, 92, 92, 29,
+135,167,249,192,219, 69,130,204,204, 76,164,165,165, 33, 45, 45, 13, 68, 4,157, 78,215,192, 2,205, 71, 73, 73, 73, 91,159, 62,
+125,122,208,211,211, 19,142,142,142, 96, 0, 82,178,116,136, 90, 25,136,168,149,129, 72,201,210, 65,145,147,131, 26, 53,106,192,
+209,209,209,236, 84, 4, 17,113,213,170, 85,235,222,191,127,127, 71, 0, 40, 52, 78,111, 50,198,198,155,121,124,160,215,235,219,
+ 26,219,126,246,217,103,110, 0,222, 42,111,172,149, 73, 97,134,219,135, 99,198,140,105, 46,147,201,176,126,253,250, 71, 0,126,
+ 40, 60, 29,177,113,227,198,187, 0, 48,105,210,164, 32, 0, 83, 10, 75, 36,148,138, 88, 44,110,214,160, 65, 3, 92,188,120, 17,
+ 0,246,151,211,253,222, 11, 23, 46,160, 78,157, 58,144,201,100,175,151,211,182,102,245,234,213,113,247,238, 93, 0,184, 94, 74,
+155,235,119,239,222, 69,245,234,213, 65, 68,229,254, 30, 17, 81,239,174, 93,187,222, 60,117,234,212,235,109,218,180,193,168, 81,
+163, 52,151, 47, 95,238,206, 24, 59,123,253,250,245, 78,131, 7, 15, 86,214,173, 91, 23,103,206,156, 9, 28, 60,120,240, 5,129,
+ 64,176,208, 2,205,145, 97, 97, 97, 51,222,125,247, 93,132,133,133,177, 61,123,246, 12, 98,140, 29, 3, 0,198,216,209, 93,187,
+118, 13, 93,180,104, 17,123,255,253,247, 49,127,254,252, 25, 68, 52,190, 44, 61,165, 82,153,109, 48, 24,160, 84, 42, 45, 10,193,
+ 91,218,222,195,195,227,237,174, 93,187, 98,246,236,217,168, 86,173, 26,126,254,249,103, 6,224, 16, 99,236,156, 90,173,110,207,
+ 24,251, 82,169, 84, 30,184,120,241, 34,186,116,233, 34, 6,240,142, 37,253,235,245,250, 39,167, 78,157,210,186,187,187,195,215,
+215, 23,126,126,126, 80, 42,149,200,202,202, 66,112,112, 48, 90,181,106, 5,165, 82,137, 67,135, 14,105,179,178,178, 44, 74, 68,
+209,107,148, 59,142,255,178, 47,219,221, 81, 10,223,170,206,168, 81,205, 13,185, 89,233, 72, 75, 73, 66,179, 6,126,232,208,172,
+ 6,210,179, 53, 56,122,104, 95,102, 78, 78,222, 14, 75, 52,117,234,188,237, 39,126,253, 57,219,213, 81,140,122,245,131, 48,120,
+212,164, 38, 77,154,182, 60,222,162, 69,219,163, 43,150, 46,126,237,205,214, 13, 40, 33, 61, 31, 71, 14,237,207,204, 86, 40, 44,
+154, 30,181,241,114,252, 87, 22,184, 3,229, 79, 17,166, 79,153, 50, 5, 82,169, 20,222,222,222, 69,166,200,104, 82, 36, 18, 9,
+188,189,189,161,215,235,177,107,215, 46, 0, 40,115,141, 2, 7,168,123,141, 95,194,171,117, 44, 79, 36, 18, 85,138, 38, 0,112,
+ 28,167,238,243,249,183,252,175, 23,204, 39,185, 84, 68,243, 95, 64,139,194,154, 86, 45, 24, 99,153, 79,158, 60, 73,232,215,167,
+ 87,118, 92,236,237, 20,101, 86, 82,178,226,121,124,114,252,163, 91, 41, 51,167, 77,201, 78, 72, 72,136, 47,172,133,213, 34, 41,
+ 41,169, 23, 0, 75,215, 18, 76,233,215,175,223,215, 99,198,140, 97, 81, 81, 81, 0,128,200,200, 72, 12, 31, 62,156, 13, 29, 58,
+116, 53,128,233, 21, 24,183, 82,165, 82, 21,139,126,104, 13,124,209,212,158, 66,161, 64, 82, 82, 18, 52, 26,141,197, 78,248,254,
+209,149,247, 50,158, 92,213, 5,249,219, 35,200,223, 30,129,213,237, 64,250,220, 34,115,149,150,150,134,212,212, 84, 0,176, 40,
+138, 87,136, 66,173, 86, 23, 27,167,233, 20,164, 66,161, 64, 74, 74, 10, 12, 6,131,217, 15, 48,198, 24,159,152,152,120,116,247,
+238,221, 57, 0,176, 98,197,138, 12, 34, 58, 73, 68, 95,155,121,108, 18, 10,133,191, 27,219,174, 92,185, 50, 3,192, 97,115,186,
+175, 2, 34,122,183, 81,163, 70,153, 51,102,204, 88,255,241,199, 31, 99,211,166, 77, 72, 78, 78,158,206, 24,211, 27,239, 37, 61,
+ 61,253,243, 13, 27, 54, 96,196,136, 17,152, 51,103,206,202,166, 77,155, 42,136,104,112,105,154, 85,170, 84,241, 21, 10,133,184,
+118,237,154,130, 49,246,176,172,254, 25, 99, 41,215,174, 93, 75, 37, 34,120,123,123,215, 46,171,173,155,155, 91,128,163,163, 35,
+ 18, 19, 19, 1,224,113, 41,205,158, 36, 37, 37, 49,137, 68, 2, 31, 31,159, 58,229,220, 62, 92, 93, 93, 63,223,186,117,171,240,
+246,237,219,120,243,205, 55, 19,206,156, 57,211,133, 49,118,186,112,108,215, 34, 35, 35, 67, 58,117,234,116,239,248,241,227, 88,
+182,108, 25, 53,110,220,184, 76, 51, 4, 0,254,254,254, 31,140, 28, 57, 18,235,214,173,195,230,205,155,199, 51,198, 34, 74,220,
+243,206, 13, 27, 54, 76,218,188,121, 51, 70,141, 26,133,154, 53,107,150,250,189, 4,128,184,184,184,105, 29, 59,118,140,188,127,
+255,190, 69, 59, 20, 88,210,158,136, 58,181,108,217, 50, 64,165, 82, 97,251,246,237, 15, 3, 2, 2,254,136,136,136,152,194, 24,
+187, 81,162,233,129,125,251,246, 97,200,144, 33,104,220,184,241,118, 34, 26, 88, 94,255,140,177,164,184,184,184,244, 27, 55,110,
+240, 2,129, 0,190,190,190,232,222,189, 59, 6, 12, 24,128,198,141, 27,227,217,179,103, 56,123,246, 44, 31, 27, 27,155,110, 73,
+ 6, 33, 0,164,223, 59,245,243,227,199,247,126,191,118,249,172, 78, 40,224,224,231,237,134,247, 58, 55,193,232,208,182,104, 22,
+ 88, 13,113,207, 84,248,237,183,227,186,199,143, 31, 94,180, 36,131,208,168,121, 39,250,198,133,219,215,206,235, 69, 66, 66, 96,
+253,186,152, 61,243,115,215, 69,115,167,185,212,173,237,135, 27,143,178,113,252,216, 17, 93, 82, 66,252, 41, 91, 6,161, 13,107,
+ 41,111,138,112,197,166, 77,155, 90,108,221,186,181,203,148, 41, 83, 28,134, 13, 27, 6,153, 76,134,188,188, 60,248,250,250,194,
+ 96,248, 63,246,206, 59, 60,138,226,225,227,223,185,222, 47,245,238,210, 8,132,146, 78,239,189, 24,122, 19, 4, 4,193,242,162,
+ 20, 5, 81, 65, 4, 69, 84, 4, 65,154, 20, 17, 65, 81,148,166, 96, 9, 29, 84, 4, 4,169,161, 37, 49, 4,210,123,114,233,229,
+146, 92,219,121,255, 72,194, 47,196,148, 75, 65, 16,231,243, 60,243,220,221,236,238,103,103,246, 46,119,223,108,153,181,226,248,
+241,227,184,122,245,106, 33,199,113,191,160,202,229,255,132,144,160,202, 99,101, 28,143,162,178,178,193, 43, 13,221,130, 39, 78,
+108, 18, 39, 0, 40,239,114,234,172, 22,198, 93,155,246,159, 27,191,231,196, 53,242,218,148,254,188,206,190,205, 0, 0, 58,157,
+ 14,106,181,186,222,206,198,242, 79, 56, 43, 31,190, 77, 77, 77,189, 77, 8,201,120,233,165,151,252, 42, 78,104,151, 72, 36, 37,
+137,137,137, 17,229,225,234,111,203,212,213,206,242, 43,221, 94, 38,132, 28,204,203,203, 59,241,230,155,111, 98,197,138, 21, 56,
+116,232, 80, 95, 74,233,121, 91,219, 89,197,105,245,242,242,202,189,124,249,178,174,141,127, 39,180,212, 10,209,239,221, 59,160,
+148,194, 73, 78, 81,144,155,141,235,215,175,161,160,160,224, 82,125,218,233,230,230,150,155,145,145,225,172,213,106,145,157,157,
+141,204,204,204,123,225, 42, 39, 39, 7,217,217,217,148, 16,242, 71, 61,156, 69,173, 91,183, 54, 68, 68, 68,136,117,205,218,160,
+149, 86,132,238,111,223, 6, 40,133,167, 35, 15, 5,249,185,184,112,225, 2,242,242,242, 78,215,228,228, 56,110,254,212,169, 83,
+249, 0,158,125,243,205, 55, 29, 1,116, 88,184,112,225, 47, 85,175, 20, 20, 10,133,159,236,218,181,171,109,197,161,196,183,222,
+122,107, 61,165,244, 75, 91,218,217, 80, 42, 59,157,156,156,230, 31, 57,114, 68,101, 50,153,176,105,211, 38,172, 95,191,126, 7,
+165,244,190, 43, 36, 41,165, 71,248,124,254, 22, 30,143,247,202,156, 57,115, 48,115,230, 76,121,151, 46, 93,222,192,255,246,114,
+221,231, 76, 78, 78, 94,210,185,115,231,165, 25, 25, 25, 54,157,176,127,231,206,157, 25,157, 59,119, 94,146,145,145,177,186,166,
+118, 2,128, 66,161, 80, 88,173, 86,196,198,198,230, 80, 74,171, 61,180, 68, 41, 45,241,246,246, 78,182, 90,173, 30,114,185,220,
+177,182,190, 3, 64, 78, 78,206, 71, 93,186,116,121, 63, 61, 61,253, 36,128,229, 85,135, 28,161,148,222, 32,132, 4,206,155, 55,
+111,238,170, 85,171,198,167,165,165,253,109,156,165,170,206,248,248,248,143, 6, 14, 28,248,110,100,100,228,206,154, 14,245, 82,
+ 74, 63, 37,132,152,118,237,218, 53, 59, 54, 54,246,111, 87,248, 86,118, 82, 74, 15,163,150, 67,230,213,184,171,157,191,178,147,
+207,231, 47, 92,181,106, 21,239,243,207, 63, 7,165,116,173,197, 98,169,169,157, 55,249,124,254, 55,189,123,247,126,110,255,254,
+253,210,192,192,192,153, 0,246,214,212,247, 10, 74, 75, 75, 47,254,249,231,159, 61,226,226,226,156, 7, 14, 28, 40, 2,202,254,
+ 49,201,205,205,197,225,195,135, 77, 81, 81, 81,153, 69, 69, 69,213, 30,110,173,201,105, 49,230, 79,249,243, 84,240,222,184, 59,
+161, 61, 7, 12, 27,235, 96, 52,121, 64,146,197, 71,110, 86, 26,142, 31,254, 49, 39, 54, 54,250,130,193,144, 91,109, 0,172,201,
+105, 42,205,155,124,225,247,131,251,146, 98, 35,122,244, 27, 56,194,161,196,216, 28, 18, 17, 15, 89,233,201, 56,126, 36, 56, 59,
+ 54, 54,230,143, 18,115,233,243,245,113, 54,134,255,178,243,177,131, 82, 90,103, 1, 32, 2, 16,164, 84, 42, 87, 44, 93,186,116,
+237,165, 75,151,214,142, 26, 53,106,173, 68, 34, 89, 1, 32, 8,128,168,134,229,130,254, 73,103, 87, 55, 56, 14,108, 69,206, 14,
+105, 77,184, 89,125, 29,172,207,119, 87, 24, 7, 13, 26,180,165, 49,206,134,150, 7,237, 4, 16,108, 54,155, 41,128, 52, 0,193,
+229,101,113, 53,203, 44,174, 52, 61, 45, 33, 33,129, 2, 8,174, 79, 59, 1, 56, 63,253,244,211, 92, 65, 65, 1,157, 52,105, 18,
+ 5, 96,215,152,190, 75, 36,146,129,253,250,245, 51,167,235,179,233,237,152,100,122, 49, 36,156,158, 56,245, 39,221,247,227, 17,
+186,121,203, 54,218,190,125,123, 35,128,230,245,113, 10, 4,130, 65, 3, 7, 14,204, 74, 79, 79,167, 17, 17, 17,244,236,217,179,
+244,192,129, 3,116,219,182,109,116,235,214,173,180, 89,179,102,233, 0,116,245,113,202,100,178,177,195,135, 15, 55,231,230, 27,
+104,108,114, 22,189, 21, 17, 75,207, 95,190, 69,143,159, 58, 79,119,239,221, 79, 3, 2, 2, 74,234,114, 2,224,243,249,252,205,
+251,246,237,203,167,148,210,177, 99,199, 38, 1,144, 86,154,222,114,254,252,249, 25,148, 82,186,122,245,234, 44, 0,111, 63,132,
+207,210, 48,119,119,247,219, 34,145,232, 8,128,103,235, 88,110,178, 64, 32, 56,228,226,226,114, 5,192,184,127,178,157,229,175,
+ 71,105,181,218,139, 0,198,212,177, 92,197,124, 79,254,211,219,243,223,226, 4, 48, 72, 32, 16,156, 69,217, 24, 87,117, 45, 39,
+ 2,240, 33,159,207, 63, 10,224,137,250,180, 19,128,155, 82,169,236,163, 84, 42, 71, 43,149,202,209,246,246,246,125, 0,184, 53,
+166,239, 78,222, 65,163, 61, 59,141,249,185, 89,135,145,241,158, 29, 71,197,123,117, 30,251,179,147,119,208,232,198, 58,155,119,
+ 30, 27,236,217,113, 84,130,103,199,209,113, 45,187,142,253,217,217, 55,104,248,227,246,190, 63,202,206, 26,214, 51,227,159, 88,
+207, 3,105,123, 61, 59,170, 0, 48, 14,192,202,242, 71, 69, 99,223,128, 7,225,236,225, 10,159,160,214, 36, 98,132,175, 32, 27,
+192,132,166,112, 54,224, 67,241,160,191, 28,119, 26,141, 70, 90, 82, 82, 66, 13, 6, 3, 45, 44, 44,188, 47, 56, 85,154, 47, 56,
+ 37, 37,133, 38, 37, 37,209,132,132, 4, 26, 23, 23, 71, 1,236,174,111, 59,213,106,245,151, 19, 39, 78,180, 10,133,194,205, 77,
+209,119, 71, 71,199,149,221,187,119, 55,109,220,184,145,254,252,243,207,244,139, 47,190,160,115,230,204,161,109,219,182, 45,181,
+183,183,159,210, 16,167,139,139,203, 18, 95, 95,223,172, 29, 59,118,208,221,187,119,211, 13, 27, 54,208,119,222,121,199,234,225,
+225,145,166, 82,169,134, 54,196,169,213,106,183,247,233,211,199,180,125,251,118,250,203, 47,191,208, 61,123,246,208,249,243,231,
+ 83, 63, 63,191, 82,133, 66,241,148, 45, 78, 0,124,129, 64,176,110,214,172, 89,105,110,110,110, 71,170, 76,147, 7, 4, 4, 92,
+153, 58,117,106, 10,128,183, 30,151,207, 39,115, 50, 39,115, 50,103, 19,173,231, 95, 27,176,234,188,138,176, 50,180,108,144,185,
+159, 8, 33,135,104,249,249, 25,141,229, 65, 56, 47,164,208, 72, 0,126,132, 16, 65, 83, 57, 31, 65, 62, 18,139,197, 2,148,223,
+244,185,156,234,174,114,185,236,230,230, 86,249,117, 30,128,122,143,179,148,151,151,247, 34, 33,228, 85,122,255, 16, 3, 13, 38,
+ 43, 43,107, 49, 33,228,187,152,152,152,149,246,246,246,157,205,102,179, 57, 63, 63,255,108, 78, 78,206, 91,148,210,164,134, 56,
+ 83, 83, 83,151, 19, 66, 14, 46, 89,178,228, 77, 74,105, 55, 30,143, 87, 98, 54,155, 79,103,102,102,174,164,148,234, 27,226, 76,
+ 79, 79,159, 33, 18,137,190,138,138,138, 90, 41,147,201,218,115, 28,103, 52, 24, 12,167, 51, 51, 51, 95,167,148,218,116, 41, 60,
+ 45,187, 97,238,124, 66,200, 58, 0, 25, 85,166, 25, 8, 33,189,195,195,195,157, 40,165,169,213, 27, 24, 12, 6,131,241,111,163,
+ 94, 1,171,130, 7, 17, 90,254, 45,206, 71, 5, 74,233, 93, 0,181,158, 24, 91, 62, 95,157,163,183,215, 99,157, 77, 18,174, 42,
+249,110, 1, 24,222,196,206, 48, 0,207, 54,165,211,100, 50, 93,130,141,247,101,171,141,154, 2, 20, 45, 59,215,141,133, 43, 6,
+131,193,120,140, 96,163,167, 49, 24, 12, 6,131,193, 96, 52, 49, 4,101, 39,127,255, 13, 90,143,171, 3, 8, 33,213, 58,106,163,
+ 46, 63,115, 50, 39,115, 50, 39,115, 50, 39,115, 62,126,206, 74,238,154,238,109,122,187,138,175, 94,119, 60,120,100,120,192, 39,
+167,253, 43, 78,172, 99, 78,230,100, 78,230,100, 78,230,100,206,135,235,124,220, 10, 59, 68,200, 96, 48, 24, 12, 6,131,209,196,
+176,128,197, 96, 48, 24, 12, 6,131,209,196,176,128,197, 96, 48, 24, 12, 6,131,209,196,176,128,197, 96, 48, 24, 12, 6,131,209,
+196,176,128,197, 96, 48, 24, 12, 6,131,209,196,144,242,171, 1,202, 94, 16, 66, 41,165,228, 33,182,135,193, 96, 48, 24, 12,198,
+127,152,199, 37,139,176, 61, 88, 12, 6,131,193, 96, 48, 24, 77, 12, 11, 88, 12, 6,131,193, 96, 48, 24, 77, 12, 15, 40,219, 29,
+247,176, 27,194, 96, 48, 24, 12, 6,227,191,203,227,150, 69, 42,246, 96, 13, 40,239, 88,163,111,104,203, 96, 48, 24, 12, 6,131,
+209, 0, 30,171, 44,114,223, 73,238, 12, 6,131,193, 96, 48, 24,140,198,195,206,193, 98, 48, 24, 12, 6,131,193,104, 98, 88,192,
+ 98, 48, 24, 12, 6,131,193,104, 98, 30,104,192, 34,132, 4, 49, 39,115, 50, 39,115, 50, 39,115, 50, 39,115,254,215, 96,123,176,
+ 24, 12, 6,131,193, 96, 48,154, 24, 22,176, 24, 12, 6,131,193, 96, 48,154, 24, 22,176, 24, 12, 6,131,193, 96, 48,154, 24, 22,
+176, 24, 12, 6,131,193, 96, 48,154, 24, 22,176, 24, 12, 6,131,193, 96, 48,154, 24, 2,160,218, 43, 1, 40,165,191,218, 44,105,
+192,213, 4,117,249,153,147, 57,153,147, 57,153,147, 57,153,243,241,115,214,229,174, 79,254,120,164,161,148, 62,176, 2, 32,136,
+ 57,153,147, 57,153,147, 57,153,147, 57,153,243,191, 86, 4, 77, 29,216, 24, 12,198, 63,204, 1,194, 71,142,175, 23, 40,117, 3,
+ 95,156,138,212, 91,209,120,143,114,141,118,166, 7, 52,135,204,172,131, 69,170, 71,250,205,152, 70, 59, 25, 12, 6,227, 63, 4,
+ 11, 88, 12,198,191, 29,189,159, 15, 4, 88, 9, 30, 92, 65, 77, 81,208, 4,172, 4, 16,218,104,167,136, 91, 14, 43,207, 3,212,
+ 20, 9,173,239, 42, 0,225, 77,210, 94, 6,131,193,248, 15,240, 80, 78,114,151, 74,165, 33, 98,177,248, 67, 66,136,228, 97,172,
+159,241,223,128, 16, 34, 17,139,197, 31,202,100,178,144,135,221,150, 7,198,174,118,114,240,172,195,141,102,206,253,248,173, 92,
+173,161,212,234, 3,158,101, 4,190,242, 81, 54,202, 41, 32, 67, 74, 76,156,231,238,203, 6, 93,145,209,226, 15,138,198, 57,203,
+ 33,132,216,139,197,226,227,132, 16,231,198,186, 24,143, 38, 1,132,116,233, 42, 20, 46,240, 39,100, 16, 33,132, 60,236,246, 48,
+ 24, 15,139,135, 18,176, 74, 75, 75, 59,117,234,212,233, 13,177, 88, 28, 79, 8, 25,243, 48,218,240,176, 80,169, 84,127,218,217,
+217,165,219,219,219,167,219,217,217, 93,171,171,254,113,132, 16,226,163,213,106,227,157,156,156, 34, 43,215,107, 59,140,239,229,
+221,231,185,247,156, 3,159,236,223, 4,235, 24, 35,145, 72,226,187,119,239,254,122, 73, 73, 73,167,198,250, 30, 89, 74, 56, 29,
+120,252,129, 97,169, 6,121,106,190, 89, 23, 18,103, 80, 1,252, 1, 48,194,181,193,206, 60, 78, 7,208, 65, 55,146,138, 21,127,
+102,107,116,127, 68,151,170,193,227, 13, 68, 9,113,105,108,115,121, 60,222,108,142,227, 6,139, 68,162,215, 26,235, 98, 60,154,
+136,121,188,222,127,142, 25,179,252,173,246,237,231,250, 1,163,171, 11, 89,164,140, 87,253,253,253,143, 17, 66, 38, 55,213,186,
+ 9, 33, 31,251,249,249, 37, 19, 66,230, 53,149,147,193,104, 40, 54, 7,172,137, 45, 73,239,103, 90,145, 51, 79,183, 36, 5,147,
+ 91,145,194,103, 91,145,115, 19, 90,146, 65, 13, 93,241,217,179,103,101, 17, 17, 17,218,254,253,251,239,147,201,100,231, 8, 33,
+222, 13,241, 72,165,210,227, 2,129, 96, 98,229, 58,185, 92,126, 92, 32, 16, 60, 93,165, 46, 76, 46,151,231,201,100,178,104, 27,
+189,119,197, 98,113,145, 84, 42,189, 91,185, 94, 32, 16, 60,173, 80, 40,142, 87,169,155, 88,181,174, 38,132, 66,161, 71, 98, 98,
+162, 54, 41, 41, 73, 43, 22,139,117,149,235, 19, 18, 18,180,137,137,137,247,213,215, 23,161, 80, 56, 72,169, 84, 30,168, 90,167,
+ 82,169, 14,212,180, 76, 85,148, 74,229, 15, 66,161,240,190,247, 86,165, 82,253,173,174, 33, 16, 66,124,134, 12, 25,114, 46, 53,
+ 53,213,211,222,222,222,190,242, 52, 71, 59,251,161,223,238,216,242,198,216, 17, 67,102,107, 3,198,181,107,160,223, 91, 46,151,
+159,235,214,173,219,190, 83,167, 78,105,119,239,222, 45,111,108,155, 31, 89, 14, 4,136, 64,184,126, 28,165,154,191,146, 75, 52,
+ 35,199, 76, 20, 92, 79, 44,214,152,173, 86, 71,128, 63, 0, 59, 91,212,127, 15,241,129, 0, 17, 4,230,190, 28,165,186,223,226,
+132,154,129,147,230,242, 79,197, 9, 52,102,171,213, 9, 60,244,111,144,179, 28, 66,136,144,207,231,191,177,110,221, 58, 30,128,
+ 57,132, 16,113, 67, 93,255, 70,186,187, 19,247, 39,218, 8, 46,119,118, 35,189,155,202, 73, 8, 9, 84, 40, 20, 87, 9, 33, 62,
+ 77,229,108, 44, 70,142,187,189, 47, 38,230,196,180,214,173, 71,189,213,190,253, 11, 85, 67, 86,249,243,183, 86,173, 90,245,108,
+ 88, 88,152,166,101,203,150, 51, 9, 33,141,254,103,159, 16,178, 97,213,170, 85, 11,195,194,194,220,188,188,188, 62,104, 10, 39,
+227,145, 66, 12, 96, 32,128,145, 0,158, 0,208,173,252,121,215,242, 50, 18,101,163, 34, 84,126,236, 90,190,108,197,244,238, 53,
+ 56, 70, 86,179, 92,215, 74,245,149, 95, 87,125, 94, 51,229, 87, 3,208,202,143, 85,203,211, 94,120,127,110, 47,119,195, 95,135,
+246,208,194,196, 24,154, 19,113,157, 94,223,254, 17,157,219, 85, 99,120,166, 37, 62,110,192,213, 7,148, 82, 74, 67, 66, 66,104,
+113,113, 49, 61,122,244, 40,167,211,233, 74,196, 98,241, 6, 0,138,250,184,196, 98,113,161, 70,163, 41,144,201,100, 95, 3, 16,
+ 83, 74, 33,145, 72, 10, 93, 92, 92, 10,164, 82,233, 46, 0, 18, 74, 41,134, 14, 29, 90, 76, 41,165, 18,137,164,200, 22,239,240,
+225,195,139, 40,165, 84, 44, 22, 23,149,183, 89, 34,149, 74,191,237,210,165, 75,190, 68, 34, 41, 44,175, 19,203,229,242,175,187,
+118,237,154, 47,149, 74, 11,109,241, 58, 58, 58, 38, 90,173, 86,122,232,208, 33,170,213,106, 83, 42,234, 29, 28, 28, 18,173, 86,
+ 43, 13, 14, 14,166, 26,141, 38,197, 22, 87,149,109,202, 83, 42,149,107,186,117,235,150,171, 84, 42,179, 42,213,173,237,209,163,
+ 71, 94, 69,157, 45, 69,161, 80,100,121,122,122,230, 40,149,202,181, 0,120,148, 82, 40,149,202,172, 22, 45, 90,100,171,213,234,
+ 53, 21,117,182, 20, 55, 55,183,153, 90,173, 54, 69,171,213,166,216,219,219,175,112,117,117, 77,211,235,245,148, 82, 74, 91,181,
+106,149, 65, 41,133,166,253,184, 94,109,122, 63,251,158, 54,112,204,235,159,239,191,112,233,108,104,150,190,253,224,217,107,236,
+218,143,181,171, 71,255, 21, 98,177,120,131,139,139, 75, 73,112,112,176, 53, 61, 61,157,222,188,121,147,166,166,166,210,154, 62,
+215,255,250,178, 37,192,131,110,243,221, 23,190,212, 51,226,236,170, 97,102, 26,119,138,238,121, 65, 99, 62,243,186,123, 20,221,
+234,247, 3,221,230,223,172, 65,206,173,254,123,110,190,227,121,123,243, 7,175,154,227,227,227,233,130,231,134, 89, 78,206,117,
+143,166,159,251,237,111,144,243,127,239,209,148,113,227,198, 21, 38, 36, 36,208,128,128,128, 34, 62,159, 63,253,161,111,195,127,
+168,116,115,131,123,144,143, 56,249,230,238, 5,220,232, 64,121, 86, 39, 87,244,110,172, 19, 64,160, 86,171,205,220,185,115, 39,
+ 85,169, 84, 25, 0,124, 30,118, 63,203,219, 69,252,128, 49,223,180,111, 31,204, 77,152, 96,253,166,125,251, 96, 63, 96, 12,202,
+134, 5, 34, 0, 22,173, 94,189, 58,196,108, 54,135,124,253,245,215, 33, 99,198,140, 9, 1,176,160,145,235,220,248,241,199, 31,
+ 83,179,217, 76,191,254,250,107, 58,102,204, 24, 10, 96,147,173,203, 43,149,202, 54,237,218,181,219, 21, 16, 16,144,208,161, 67,
+ 7,163,191,191,127,137,143,143, 79, 92, 96, 96,224,209,123,187,187, 0, 0, 32, 0, 73, 68, 65, 84, 78,137, 68,226,245,176,183,
+233,127,165,212,145, 69,186, 45, 90,180,104, 49, 0,186,104,209,162,197,148,210,145,229,243,141,172,252,188,234, 35,165, 52,168,
+242,235,234, 28, 21,165, 58,103,117,235,168,242,188,230,254, 84,116, 6, 64,127, 0,103,170,206, 48,177, 37,122,205,237,229, 94,
+ 92,172, 79,165,161, 31,189, 70,127, 31,232, 65,207, 15,112,161,145,111,140,163,169,187, 55,208,151, 59, 58, 24, 38,180,196,192,
+ 6,108, 68, 26, 28, 28, 76, 79,158, 60, 73,163,163,163,105,122,122, 58,125,247,221,119,141, 10,133, 34,135,207,231, 79,181,213,
+ 37,147,201,242,146,147,147,233,187,239,190, 91, 90,190,183,169,165, 92, 46,207, 75, 75, 75,163, 31,125,244,145, 81, 38,147,197,
+ 0,240,150, 72, 36,133,209,209,209, 84, 42,149,218, 20,176,228,114,121, 94,104,104, 40,149, 72, 36, 69, 0,188, 53, 26, 77,204,
+111,191,253,102,230, 56,142,122,120,120,228, 3,104,169,209,104,238,158, 58,117,234, 94,157, 45, 94, 71, 71,199,196,226,226, 98,
+122,242,228, 73,170,211,233, 82,170,214, 31, 59,118,236,190,224,101,227,246,212,185,186,186, 94,175,104,159,151,151,151, 30,128,
+206,205,205,237,198,153, 51,103,204,148, 82,218,170, 85, 43,189,173, 62, 23, 23,151,140,140,140, 12,186,105,211,166, 82,149, 74,
+117, 13,128,206,197,197, 37, 67,175,215,211, 79, 63,253,180, 84,173, 86,135, 0,208,217,226,114,118,118, 78, 49, 26,141, 52, 55,
+ 55,151,118,239,222,189,240,252,249,243, 52, 63, 63,159, 82, 74,105,139, 22, 45, 50, 40,165,240,237, 63,253,195, 75,119, 10,243,
+255,111,225,150,239,189,186, 61,243,209,137,203,201, 73, 95,254,124, 53,196, 57,112,236, 48, 91,214,193,231,243,167, 42, 20,138,
+156, 79, 62,249,196,148,147,147, 67, 99, 98, 98,232,197,139, 23,233,197,139, 23,105,122,122,250,227, 25,176,246,131, 79,183,249,
+142,165,219,124, 67,118, 78,115,206, 44,184,182,151,210, 95,230,209,232, 15, 91,210,165,195, 84, 5,220, 54,223, 16,186,205,111,
+ 2,125,191,191,160, 94,206,237,254,163,233, 54,223,144,143, 39, 54,207,186, 30,114,133,158, 57,115,134,126,182, 97, 53,157, 27,
+228, 94,196,109,243, 13,161, 91,253,199,215,203, 89,169, 72, 36,146, 59,231,206,157,163,103,207,158,165, 31,124,240, 1,149,203,
+229, 9,141,223, 14,254, 34,186,213,167, 57,221,226, 61,128,238,240,118,165,167, 27,214,182, 7, 89,186,185,193,125,176,143, 56,
+ 41,243,250,207,148,102,223,165,105,107, 3,232, 48, 95, 97,163, 66, 86,121,184,210,199,197,197,209,180,180, 52,186,126,253,122,
+170, 86,171, 31,233,144,229, 11,140, 5,176,120,205,154, 53,247,194,213,150, 45, 91, 66,110,221,186, 21,226,233,233,121,180, 17,
+235,218,180,102,205,154,123,225,106,203,150, 45,244,214,173, 91,180,121,243,230,137,117, 45, 59,109,218, 52,121,175, 94,189, 66,
+166, 78,157,106,216,185,115, 39,141,139,139,163,183,110,221,162,107,214,172,161,239,189,247, 30,253,234,171,175,232,248,241,227,
+139,186,119,239,126,105,194,132, 9,210,122,182, 77, 64, 41, 21,151, 23, 33,165,180, 34, 96, 10, 0, 8, 1,240, 31,246,251,244,
+168,149,218,178, 8,173, 33, 68,213, 20,172,170, 78,171, 37,128,213, 26,212,234, 90, 95,109,253,169,188, 11,245, 52,165,180, 63,
+170, 32,160, 88, 54, 99,254,135,210,216,157,235,145,254,221,167,224,231,166, 67, 88,144,133,210,115, 71, 96, 62,119, 16,207,246,
+236, 41,147, 17,178,188,234,114,182, 32,147,201, 32, 16, 8,144,146,146,130,148,148, 20,204,156, 57, 83,116,238,220, 57,251,190,
+125,251,110, 87, 42,149, 55, 8, 33,237,235,114, 16, 66,224,230,230,134,185,115,231,138,191,249,230,155, 86, 42,149,234,154,213,
+106, 21,234,116, 58,204,158, 61, 91,180,127,255,254, 22,246,246,246, 87,172, 86,171, 72, 44, 22,195,214,115, 46, 9, 33, 16,137,
+ 68,176, 88, 44,194,110,221,186, 93, 13, 15, 15,247,234,223,191,191, 32, 34, 34, 2,153,153,153,130,174, 93,187,222, 8, 15, 15,
+111,221,175, 95, 63, 65, 76, 76, 12,242,242,242,168,173, 94,163,209, 8,137, 68, 2, 30,143,119, 95,125,105,105, 41,234,211, 70,
+160,236,240, 95,239,222,189,195,110,222,188,217,161,127,255,254,130,208,208, 80,100,102,102, 10,187,119,239, 30,118,227,198,141,
+246,125,250,244, 17, 68, 70, 70, 34, 47, 47,207,230, 75,236,165, 82, 41, 52, 26, 13,158,125,246, 89,241,254,253,251, 59,104, 52,
+154,155, 2,129, 64,236,236,236,140,169, 83,167,138,247,239,223,223, 81,167,211,221,176,241,144, 33, 31, 0,204,102, 51,102,206,
+156,169, 80,171,213, 72, 76, 76, 4,199,113,176, 90,173, 0,128,172,156,172, 91, 55,110,133, 70, 60, 59,101, 98,255, 98, 83,105,
+233,133,203, 87,255,106,213,162,185, 7, 33,180, 69,109, 98, 66, 72,123,185, 92,126, 99,242,228,201, 95, 36, 36, 36,216, 79,157,
+ 58, 85, 24, 23, 23,135,172,172, 44, 8,133, 66, 72,165,210,251,182,241, 99, 69,126,128, 19, 56, 12,142,215, 27, 37, 18,123, 15,
+149,210,213, 7, 72, 56,139,150, 26, 9,248, 60,190,244, 74,140, 65, 1,208,193,240,204,116,170,159,147, 27, 28,147, 97,148,152,
+ 29,219, 42,221, 60, 60,145,149,149,133,102,173,252, 80, 34,214,136,255,188, 91,164, 4,169,167,179, 28, 66, 72, 95,111,111,111,
+151, 54,109,218, 32, 51, 51, 19,157, 58,117,130,131,131,131, 3, 33,100,112,125, 93,247,216,217, 66,130,124,244, 6, 33,235,192,
+231,125, 0,179, 96, 37,238,234, 59, 97,123,103, 97,131,157, 77, 76,119,119,226,174, 86,138, 47,238,221,247,157,187,147,167, 63,
+112,228,255,160,179,151, 96,199,236, 78,142, 26, 59, 73,112, 67, 14, 23, 18, 66, 2,117, 58,221,169, 75,151, 46, 57, 75,165, 82,
+ 92,187,118, 13, 1, 1, 1, 88,191,126,189,198,193,193,225,236,163,112,184,144, 82, 74, 35,128, 67, 31,223,188,249,245,174,168,
+168,195,211, 90,183, 30, 53,213,199,103,197,172,201,147,167,191,250,234,171, 88,189,122, 53,130,131,131,209,187,119,111,204,152,
+ 49,195,156,144,144,240, 77, 67,214, 67, 8,249,116,237,218,181,115,231,205,155, 87,213,105,138,143,143,255,184,182,101, 3, 3,
+ 3, 61,238,220,185,147,252,198, 27,111,116,218,181,107,151, 76, 46,151, 35, 55, 55, 23,219,183,111,199,226,197,139, 65, 8, 1,
+165, 20, 95,125,245,149,252,133, 23, 94,232, 22, 21, 21,149,220,162, 69, 11, 91, 78,223, 32, 0,164, 0,228,229, 69, 1, 64,190,
+119,239, 94,187,177, 99,199,170,203,235,100, 0,100,236, 66,175,106,169, 54,139, 84, 64, 8, 57, 92,249, 53,165,116, 84,213,186,
+170,211, 40,165,163,106,115,212,135,218,214, 87,149,202,191, 62, 3, 8, 33,103,254, 38, 3,218,187,120,249, 34,239,151,253,144,
+ 9, 8,100,252,242, 34, 32,224, 69,223, 66, 51,169, 16,102, 74, 3, 27,210, 80,169, 84, 10,153, 76, 6,153, 76, 6, 66, 8,114,
+114,114,160, 86,171,241,221,119,223, 73, 55,109,218,212, 78, 46,151, 95,176,179,179, 91, 89,155,163, 34,140, 68, 70, 70,162, 99,
+199,142,228,240,225,195,234, 89,179,102, 9, 0, 32, 62, 62, 30,237,218,181, 35,191,255,254,187,234,205, 55,223, 36, 18, 73,253,
+ 62,203, 34,145, 8, 11, 23, 46, 36,231,207,159, 87,202,229,114,132,134,134,162,176,176, 16,111,190,249,166,224,207, 63,255, 84,
+ 42, 20, 10, 68, 69, 69,161,164,164,164, 94,193,205,104, 52, 66, 36, 18,221,183, 12, 33, 4, 38,147, 9, 98,177,216,230, 80,224,
+236,236,252, 94,151, 46, 93, 14,156, 62,125,218, 73, 38,147,225,214,173, 91, 48, 24, 12, 88,190,124,185,252,220,185,115, 78, 42,
+149, 10,183,111,223,134,193, 96,168, 87,104,171, 88,255,221,187,119,225,237,237, 77,142, 28, 57,162,157, 49, 99,134, 20, 40,219,
+166, 62, 62, 62,228,232,209,163, 58, 63, 63,191,253, 90,173,118,105,109, 46,142,227,144,154,154,138,176,176, 48, 68, 71, 71, 67,
+175,215, 35, 51, 51, 19, 5, 5, 5,176, 88, 44, 0, 0,121, 65,254,145,189,223, 31,186, 33,147,201,228, 1, 62,222,158,183, 66,
+195, 51,100, 50,153,188,185,167,167, 15, 33, 31, 84,187, 49, 84, 42,213, 74,153, 76,118,225,224,193,131,237,191,248,226, 11, 73,
+102,102, 38,226,227,227, 65, 8,129, 84, 42,189, 87,248,124,190,205,253,254,215, 64, 8, 1, 49,122,131,144, 78, 23,163,139, 28,
+251,142,154, 34, 66,204,113,128, 51, 3, 60, 1, 6,180,247, 16, 4,223, 42,210,129,162, 61, 74,225, 7,216,240,230, 19, 66, 0,
+ 83, 27,128,116, 57,121,199,226,212,123,220,108, 81,114,114, 50, 68, 34, 17, 36, 18, 9, 58, 13,122, 74,176,247,134,217, 5, 4,
+ 29, 96,130,175, 77,206, 74,200,100,178,119,223,123,239, 61, 69,101,231,244,233,211, 21,118,118,118,239, 53,104, 27,236,108, 33,
+ 65,145,188, 39,172,244,181,176,228,226,230, 43,142,164,249, 69,103, 20,251,129, 98, 62, 96,238,216,216,144, 69, 8, 25, 32,149,
+ 74, 99, 8, 33,125, 26,234,232,238, 78,220,213, 42,241,133,125,251,190,115,119,108, 86, 22,174, 96, 41, 1,132, 50,184,104,236,
+177,227,245,129,142, 26,123, 89,189, 66, 86,121,184,250,237,226,197,139,206, 82,169, 20, 33, 33, 33, 16,137, 68,144, 74,165,104,
+215,174, 29,182,109,219,166,113,116,116,124,164, 66,214,170,155, 55,119,174, 12, 11,139, 92, 20, 24,232,247,164, 66,225,248,202,
+212,169,118,239,188,243,206,225,131, 7, 15,126, 61,114,228,200,204,203,151, 47,127, 66, 41,221, 95, 31,119,249, 73,242, 91,214,
+173, 91,247, 74, 69, 96,123,231,157,119,190, 58,120,240,224,202,145, 35, 71,166, 94,190,124,249, 13, 74,233,150,218, 28,133,133,
+133, 7,151, 44, 89, 98, 55,110,220,184,138,215, 56,119,238, 28,190,249,230, 27, 40, 20,138,251,230, 29, 51,102, 12, 94,122,233,
+ 37, 7,163,209,248, 67,109, 78,173, 86, 27,116,241,226,197, 0, 0, 34, 0, 18,148, 7,172,208,208, 80,251,252,252,124,123,165,
+ 82,105,239,234,234,170, 42,175,151,141, 27, 55,206, 94, 40, 20,246,173, 79,223,255, 3, 84,155, 69, 42,168, 26,150,106,170,107,
+232,252,182, 96,235,242,247,126,188, 40,165,103, 0,244,171,110, 38, 83,118, 58, 36,176, 66,198, 39,144,243, 43,133, 44,112, 16,
+228,101,212,243,171,246,127, 84,254, 33,148,201,100,144, 74,165,247,246,228,228,229,229,129, 16, 82,103,216,168, 8, 14, 74,165,
+ 18,197,197,197, 48,153, 76,144, 74,165,247,234, 44, 22, 11, 44, 22, 11,100, 50, 25, 36, 18, 73,189,247, 96,153,205,102,132,133,
+133, 33, 42, 42, 10, 60, 30, 15, 10,133, 2,102,179, 25,127,253,245, 23,146,147,147, 33, 16, 8, 32,151,203,235, 21, 96,172, 86,
+ 43,196,226,191,159,223,107, 54,155,235,181, 7,139,199,227,193, 96, 48,208, 59,119,238, 32, 46, 46, 14, 34,145, 8,106,181, 26,
+ 98,177, 24,122,189, 30, 73, 73, 73,247,234,234,211,190,138,121,101, 50, 25,138,138,138, 64, 41,189,215, 94,153, 76,134,210,210,
+ 82, 16, 66,192,231,243,235,124,127,172, 86, 43, 82, 82, 82,160,215,235,145,152,152,136,204,204,204,123, 33,139,227, 26, 63,110,
+229,213,171, 87,105,120,120, 56, 74, 75, 75, 33,145, 72, 32,149, 74,239,123, 20, 8, 30,195,161,222, 62, 11,180,131, 89, 56, 36,
+179,208, 44,209,155, 68,118,186,192, 32, 32,230, 24,192, 19, 0, 82, 7,244,104,219, 18,241, 57, 86,197,237,116,163, 20, 4, 67,
+177,197,199,193, 38,167, 85, 56, 88, 95, 96,150,196,153, 52,106,255,246,157,145,158,158, 14,137, 68, 2,137, 68,130, 46,189,131,
+ 16,147,101,149,135, 39, 23,203, 65, 49,196, 38,103, 57,132,144, 86, 74,165,178,103,159, 62,125, 72,101,231,136, 17, 35, 64, 8,
+105, 71, 8,241,171, 87,255, 55,183, 22,195, 36,239, 1, 33,125, 45, 60,213,224, 22, 28, 90,226, 51,250,201,167, 28, 55,252,154,
+225, 23,145, 90,226, 5,206,178, 0,212,212,185,161, 33,139, 16,210, 95,165, 82, 29,222,188,121,179,151, 84, 42, 61, 70, 8,105,
+208, 15,160, 82,198,255,252,221, 87,166,184, 59, 84,132, 43,179, 1, 16,200, 0,161, 12, 16,200,224,162,117,198,242,151, 6, 59,
+202,165,194, 31,109,117,202,100,178,189, 91,182,108,209, 84, 13, 87, 21,165, 83,167, 78, 88,186,116,169,198,209,209,113, 79, 67,
+218,220, 84, 16, 66,134,216,219,219,239, 10, 10, 10,186,152,162, 82,189,148,218,185,179,248, 55, 59,187,188, 39,242,242,236,154,
+135,134,154,124,129, 91, 0, 62, 75, 76, 76, 28,102,107,184, 34,132, 76,182,179,179, 11, 9, 10, 10, 50,169, 84,170,132,245,235,
+215,191, 60,103,206, 28,172, 94,189, 26, 75,150, 44,249, 2,192,139,148,210,183, 19, 19, 19,221,234, 10, 87, 0,144,150,150,246,
+204, 91,111,189,149,153,153,153, 9, 0,104,215,174, 29,114,115,115,177, 96,193, 2,188,246, 90,217, 69,174, 29, 59,118, 4,165,
+ 20,233,233,233, 88,187,118,109,122, 90, 90,218,243,181, 57, 57,142, 75,220,191,127,127, 55,147,201,228,129,178,195,128,146,220,
+220, 92,117,118,118,182,202,100, 50, 41, 56,142, 83,216,219,219, 43, 1,200,159,125,246, 89, 65, 88, 88, 88,128,197, 98, 73,182,
+165,255,255, 21,106,203, 34, 13,228, 72, 3,219, 49,138, 16,114,184,186, 61, 96,182,194, 43, 23,145,202,143,149,225, 19,220, 76,
+184,122, 22,142,129,157,239,219,123, 37,231, 19,200,212,118,136, 73,140,135, 8, 36,172, 33, 43,175,252,197, 80, 17,178,194,195,
+195,241,196, 19, 79, 24,222,127,255,253, 91, 69, 69, 69, 61,115,114,114, 22,215,230,168, 8, 3,118,118,118, 56,127,254, 60, 29,
+ 63,126,124,254,198,141, 27, 45, 21,117, 23, 47, 94,164,131, 7, 15, 46, 88,182,108, 25,173,122, 88,174, 46,175, 72, 36,194,198,
+141, 27,233,192,129, 3,243, 46, 93,186, 68, 21, 10, 5,228,114, 57, 54,110,220,104,233,215,175, 95,222,239,191,255, 78, 21, 10,
+197,223,254,219,169, 13, 30,143,119, 47, 96, 85, 14, 61, 60, 30, 15, 28,199,213, 43, 96,101,100,100,124, 16, 17, 17, 49,113,208,
+160, 65,233, 97, 97, 97, 84,173, 86,195,206,206, 14,139, 22, 45, 50,116,236,216, 49,227,230,205,155,247,234,234,115,168,172, 98,
+253, 42,149, 10, 97, 97, 97,116,212,168, 81, 25,159,125,246, 89, 73, 69, 93,104,104, 40, 29, 62,124,120,122, 88, 88,216,196,180,
+180,180,101,181,185, 56,142, 67,116,116,244,189, 61, 86, 37, 37, 37,200,204,204, 68, 98, 98,226,189, 67,132,197, 10,245,176, 41,
+147, 70,119, 40, 46, 46, 54,132, 71,222, 73,104,215, 54, 64, 91, 92, 92,108,136, 79, 72,136,164,244,189,106, 83, 88, 65, 65,193,
+226,226,226,226,158, 43, 86,172,184, 53,113,226, 68,195,237,219,183,255, 22,174,164, 82,233,227, 25,176,120,156, 11, 8,237,243,
+199,157, 66,251,193,163,159, 22,147,180,203,128,169, 16,144, 56, 0, 18, 7, 8, 20, 78, 24,222,183, 35,127,231,197,124, 23, 80,
+174, 23, 68, 18,143, 58,157, 66,170, 3,184,190,191, 68,150, 56,244,153, 48, 87,156,157,157, 13, 62,159,127, 47, 12,201, 21, 10,
+ 60,241,228,179,188,175, 46,151,186, 0,180, 55, 8,191,110,103, 57, 98,177,120,225,187,239,190, 43,202,201,201, 1,143,199,251,
+159, 83, 46,199,172, 89,179, 36,106,181,122,137,205,125, 63, 16, 32,130, 80,210, 3, 28,125,237,118, 90,177,219,193,155,197, 62,
+243, 87,238,144, 5,118,236,134,153, 3,180,178,149, 71, 51, 2,110, 36, 27,188, 0,235, 27,176, 24,187,212, 55,100, 17, 66,250,
+170, 84,170, 35, 87,175, 94,149,143, 24, 49, 2,107,215,174, 85,200,100,178, 99,132,144,122,127,225, 23, 21, 90,231, 44,219,244,
+109,250,205, 79,134, 2,166,162,178, 96, 85,169,100, 20,114, 88,186,227, 84,158,217, 76,167,216,234, 44, 46, 46,126,238,197, 23,
+ 95,204,250,241,199, 31,255, 22,174,164, 82, 41, 98, 99, 99,177, 98,197,138,236,236,236,236,231,235,219,222,166,130, 16, 50,100,
+206,156, 57, 43,146,146,146,124,127,249,229, 23,129, 94,175,215,174,251,242,203,188, 3,121,121,217, 43, 67, 67,111,191,221,182,
+173,247,162,246,237,159,175,105, 8,135, 26,156,147, 95,121,229,149,189, 73, 73, 73,157,126,253,245, 87,161, 94,175,247,120,229,
+149, 87,176,102,205, 26, 44, 89,178,100, 27,128,153,180,252, 36, 30, 91, 49, 26,141,183,115,114,114, 70, 13, 29, 58, 52, 55, 39,
+ 39, 7,237,219,183,199,232,209,163,225,226,226, 2, 55, 55, 55,140, 29, 59, 22, 62, 62, 62,200,202,202,194,148, 41, 83,178,245,
+122,253, 80, 74,105,173, 87,161,103,101,101,221,221,179,103,207,157, 57,115,230,116, 78, 74, 74,242, 7,224, 84, 80, 80,160, 40,
+ 40, 40,144, 24,141, 70,153,131,131,131, 67,199,142, 29,157,103,204,152,161,188,118,237, 90, 64,114,114,114, 1,128,184,250,180,
+251,113,166,182, 44, 2, 64, 95, 30,116,140, 85, 30,245,117, 76,179,117,217,106,159,219, 48, 95,141,212,249,171,107, 2,150,126,
+179,127,103,137,216,179, 13,236,124, 59, 64, 46,149, 66, 38, 22, 67,230,224,132, 82,142,195,151,177,105,134, 34, 74,109,255,130,
+ 44,135, 82,122,239,240,160, 84, 42, 69, 97, 97, 33,230,206,157, 91, 50,105,210,164,220,216,216,216, 89,249,249,249, 29, 40,165,
+ 55,235,242, 16, 66, 80, 84, 84,132,247,223,127,191,120,209,162, 69,209, 5, 5, 5,157, 68, 34,145,217,100, 50,225,221,119,223,
+ 45,153, 61,123,118, 92,110,110,110, 87,145, 72,100,170,239,143,173, 80, 40,132, 64, 32, 48,231,229,229,117,122,235,173,183,162,
+ 86,172, 88, 81, 44, 18,137, 32, 18,137,204,249,249,249,237, 22, 47, 94,124,123,241,226,197,197, 66,161,176, 94,123,198, 42,246,
+ 8, 85, 61, 68, 88,121, 79,145,173,152,205,230, 83, 25, 25, 25, 29,230,205,155,119,125,227,198,141, 6,165, 82, 9,137, 68, 98,
+204,200,200,104,255,242,203, 47,223, 88,187,118,173, 65,169, 84,214,107, 15,150,201,100, 2,199,113,216,188,121,179, 97,222,188,
+121, 55,244,122,125,123,148,125, 32,177,113,227, 70,195,203, 47,191,124, 61, 61, 61,189,131,217,108, 62, 85,151,203,106,181, 90,
+243,243,243, 33, 16, 8, 16, 26, 26, 90, 42, 18,137,192,227,241,112,247,238,221,123, 1,203,209,209, 49,160, 67,187,182,126,223,
+238,221,127, 70, 38,146, 72,122,118,235,226, 31, 29, 23,159, 68, 41,169,245,139,135, 82,122,179,168,168,168, 67, 98, 98,226,172,
+233,211,167,231,206,159, 63,191,164,176,176,240,190, 31, 28,161,240,145, 57, 29,167,233,224, 65, 14, 2,217,157,140, 82,149,148,
+103, 33,136,252,185, 44, 92, 73,237, 1,169, 3, 32,117,128,187,187, 7, 46,199, 26, 84,224, 65, 12,171, 89, 91,167,147, 82, 5,
+ 8,228,161,233, 80, 9,197, 50,146,150,150,118, 47, 8, 85, 20,175, 54,254,184, 22, 95,168, 4,161, 18,240, 81,159,161, 68, 70,
+ 57, 57, 57, 9, 82, 83, 83,255,230, 12, 8, 8,224,155,205,230,161, 54,155, 82,172,174, 0, 55, 39, 50,163,196,237,167, 27, 6,
+159,215, 87,126, 37,147, 89,115,129,171,155, 16,216,202, 13,175, 79,232, 40,126, 39, 88, 31,120, 37,206,208, 10, 2, 58, 11, 92,
+161,198, 86, 53, 33,164,143, 74,165, 58,118,229,202, 21,185, 74,165, 66,116,116, 52,186,117,235,134,237,219,183,203,229,114,249,
+ 81, 66,200,128,122,244, 25, 23,211,104,124, 97,129,181,231,194,253, 9,105, 55, 83, 45,247,133, 43,125, 17,197,139, 31, 31,204,
+205,201, 47,121,234, 66, 66,221,127, 71, 21, 80, 74,175,231,230,230, 14, 89,178,100, 73,150, 94,175,191,239,179, 30, 31, 31, 95,
+ 17, 4, 6, 80, 74, 27,244, 79,111, 83, 96,103,103, 55,117,229,202,149,184,114,229, 10, 70,140, 24,129,179,103,207, 34, 59, 59,
+ 27,251,142, 29,187,179,231,206,157,183, 43,206,201,170,110, 8,135,154, 80,171,213,243, 87,174, 92,137,171, 87,175,222,115,102,
+101,101, 97,229,202,149, 73, 0,102,215, 55, 92, 85,144,158,158,126,249,246,237,219, 67,219,183,111,255,215,230,205,155,147, 92,
+ 93, 93,185, 25, 51,102,224,197, 23, 95,132, 70,163,177,110,216,176, 33,161,111,223,190,161, 81, 81, 81, 65, 69, 69, 69,183,234,
+242, 81, 74,105,102,102,230,249, 47,190,248,226,194,160, 65,131, 20,211,166, 77,211, 6, 7, 7, 59, 25, 12, 6, 55,145, 72,164,
+ 51, 26,141,226,240,240,112,193,129, 3, 7, 92,255,250,235,175,216,226,226,226,203, 13,109,251,127,144, 43, 40,219, 27,245,107,
+149,199, 43,117, 76,179,117,217,154,158,215, 53, 95,205,216,114,102,255,212, 86,120,127, 86, 91,149,225,207,105, 61,104,218,140,
+ 62, 52,253,105,127,122,174,191, 35,157,222,154, 20, 61,215,192, 97, 26,172, 86, 43, 77, 79, 79,167,233,233,233,116,249,242,229,
+ 22,153, 76, 86, 44,151,203,235, 61, 76,131, 82,169, 44,244,246,246, 46,176,179,179,187, 55, 76,131, 74,165, 42,244,245,245, 45,
+176,183,183,191, 55, 76,131, 66,161, 40,164,148, 82,165, 82,105,211, 85,132,106,181, 58,175,176,176,144,202,229,242,138, 97, 26,
+ 68,118,118,118, 95,120,123,123, 23, 40,149,202,138, 97, 26,132, 14, 14, 14,159,251,248,248, 20,168, 84, 42,155,134,105,112,113,
+113, 73, 76, 74, 74,162, 73, 73, 73,180, 89,179,102, 41,149,235,227,227,227,105,124,124, 60,245,240,240,104,208, 48, 13, 26,141,
+102, 77,215,174, 93,179, 53, 26, 77, 86,165,186,181, 93,187,118,205,169,168,179,165, 56, 59, 59,103,117,233,210, 37, 71,163,209,
+220, 27,166, 65,163,209,100,149,187,235, 53, 76,131, 76, 38,155, 41,149, 74, 83,164, 82,105,138, 68, 34, 89,209,162, 69,139,140,
+239,191,255,158,110,216,176,129,170, 84,170,178, 97, 26, 2,198,244,108,211,235,249,183, 53, 1, 99,231, 55,102,152, 6,185, 92,
+190, 65, 38,147, 21,127,244,209, 71,150,162,162, 34,106, 54,155,105,249,151, 23,173,239,246,124,164,203,118,159, 54,116,171,223,
+193,168,101, 94,225,243,250,201, 75,110, 45,239, 64,233, 15,227, 40, 61,250, 34,165,167, 22,210,203,219,102,208, 94, 94, 18,235,
+249, 5,205, 34,233,231,190, 63,217, 52,180,194,246,118,109,232, 86,191,163,119, 62,240, 10,127,174,175, 91,201,151,159,109,160,
+151, 46, 93,162,161,161,161, 52, 58, 58,154, 30,253,249,123,218,171,149,188,204,185,213,239, 96,125,134,107, 0,208, 91, 34,145,
+ 20,174, 95,191,158, 94,188,120,241,158,243,224,193,131, 84, 46,151, 27, 0, 27,175, 66, 6, 8,221, 18, 48,206,242,153,239,185,
+ 37,131,149,133, 89,135, 23, 82,122,107, 39,165,219, 3, 41,253,186, 59,165,223,143,164,244,208,243,244,226,134, 9,180,183,151,
+200, 76, 63,247,253,131,238, 8, 24,108,107, 59,133, 66, 97,254,143, 63,254, 72, 83, 82, 82,232,217,179,103,233,213,171, 87,105,
+ 68, 68, 4, 77, 72, 72,160, 71,142, 28,161, 66,161,176, 4, 64,189,175, 82,236,174, 67,243, 32,111, 81,234,141, 85,189, 41, 13,
+158, 66,245,123,166,210, 81,109, 85,217, 61,154, 9, 6, 53,244, 51, 0,160,163,147,147, 83,230,145, 35, 71,104,108,108, 44, 61,
+115,230, 12,213,106,181,153, 0, 2, 31,246,231, 51, 40, 40,232, 18,165, 52,100,196,136, 17, 33, 0,142, 7, 5, 5,133,196,196,
+196,132,116,235,214,237, 34,106, 25,194,161, 54,231, 19, 79, 60, 97,162,148,210, 17, 35, 70, 80, 0, 41, 65, 65, 65, 52, 38, 38,
+134,118,235,214,205,216, 20,109, 70,217,197, 56,207, 11,133,194, 47, 29, 29, 29,127,119,112,112, 56,197,231,243,183, 3,152, 86,
+159,239,187,106,156,238, 0, 2, 80, 54, 94, 82,151,242,231,110, 96, 87, 16,254, 39,138,205, 51, 78,240, 66,239, 23, 90,145, 51,
+207,180, 68,193,148,150, 40,252,191,214,228,220, 83, 94,168,245, 11, 2, 53,220,109,187, 34, 96, 29, 58,116,136, 54,107,214,172,
+ 72,165, 82,157, 3,224,109, 83,131,171, 56, 29, 28, 28,142,243,249,252,137,213,212, 61, 93,185,206,206,206, 46,204,222,222, 62,
+ 79,173, 86, 71,219,210, 78,181, 90, 29, 33,151,203,139,212,106,117, 68,229,122, 62,159, 63,214,201,201,233, 72,149,186, 49, 85,
+235,106,234,187,139,139, 75, 98, 74, 74, 10,213,235,245,212,211,211,243,190,128,149,148,148, 68,211,210,210,238, 11, 94,182, 56,
+ 43, 23,129, 64, 48, 72,163,209, 28,168,171,174, 54,167, 78,167,251, 65, 32,184,255,203,191,186,186,250,190,239,229,211,124,220,
+221,221, 51,214,173, 91, 71,149, 74,101, 70,229,105,190,253,254,239,221, 75,119, 10,243, 95,124,107,235,247, 26,255, 39,219,213,
+183,239,229,243,121,171, 84,170,115,205,155, 55, 47,250,237,183,223, 40, 45,171,164, 13,221,158,245, 45,255,136,115,191,191,136,
+110,243,239, 77, 63,247, 63, 18,241, 94,243,191,158,239,174, 40, 13, 89, 55,130,210, 83, 11,233,197,173, 47,210,158, 94,226,178,
+ 32,180,205,239, 24,253,202,167, 31,221,212, 74,108,147,243,203,214,125,233, 54,191, 99,225, 75,155,255, 53,174,179,198,184,119,
+231, 54,122,247,238, 93,122,240,192, 30,218,163,101,121,184,250,220,255, 36,221,234, 63,208, 38,231,253,211,122, 75, 36,146,194,
+ 29, 59,118,208,187,119,239,210,159,126,250,201,166,112,117,159, 19, 32,116,107,192,147,150,207,124,207, 45, 14, 82,230,190,216,
+ 93, 90, 58,165,163,216, 56, 54, 80,100, 26,210, 70,100,233,213, 92, 96,237,224,202,227,252, 53,160, 67,124,101,165,244,115,223,
+ 63,232,231,254, 67,109,109,167, 88, 44, 78, 64,165, 49,113,170, 22,137, 68,162,175, 41, 96,213,245,190,119,215,161,121,144,143,
+ 36,245,183,101,131,232,232,246,170, 44, 91,194, 85, 93, 78, 0, 29,157,157,157, 51,191,254,250,107,170,211,233,244,182,132,171,
+127,226,243,105,103,103,183,171,176,176, 48,228,196,137, 19, 33, 65, 65, 65, 33,187,118,237, 10, 57,119,238, 92,136, 92, 46,223,
+ 85, 62,255,223, 66,150, 63, 48,180, 54,167, 90,173, 14, 41, 40, 40,160, 39, 78,156,160, 65, 65, 65,116,215,174, 93,244,220,185,
+115, 84, 46,151,135, 52,248,239,232, 1,244,157, 57, 89,185,111, 27, 61, 80,121, 45, 1,107,218,180,105, 6,185, 92,158, 14, 96,
+204,195,126, 83,255, 73,167,179,179,243,159, 58,157, 46, 93,167,211,165,107, 52,154,107,213,213, 59, 59, 59, 95,123,216,237,124,
+144, 78, 0, 62, 34,145, 40, 94, 40, 20, 70, 86,174,215, 4,140,233,217,186,247,115, 75,116,129, 99,134, 55,182,157, 0,198,200,
+229,242,244,241,227,199, 23, 61,118, 1,139, 82,208, 77,173,196, 21, 33,235,214,146,230, 17,163,219,202, 77,219,223, 24, 66,123,
+182,168, 18,174,190,110, 46,169,151,179, 60,100, 93,127,199, 51, 98,160,143,210,178,114,201,235,180, 71, 75,217,253,225,170, 62,
+206,251,167,247,150,203,229, 5,239,189,247,158,205,123,174,254,230,252,210,215,147,110,245,219, 93, 22,158,234, 42,254, 95,210,
+ 79,125, 61, 31,149,247,189,187, 14,205,159,240,145,132,217,186,231,202, 22, 39,128,142, 14, 14, 14,127,217, 18,174,254,169,190,
+ 3, 24, 50,107,214,172,144,152,152,152,144,232,232,232,144,115,231,206,133, 60,249,228,147, 33, 0,134, 84,154,231, 94,200, 50,
+141, 31, 95,218,145,199,123,189, 14,231,228, 89,179,102,209,152,152, 24, 26, 29, 29, 77,207,157, 59, 71,159,124,242, 73, 10, 96,
+114, 83,190, 71, 15,226,125,103,206,255,110,121, 40,103, 0,171, 84,170,107, 63,254,248,227,241,226,226,226, 21,148,210,210,135,
+209,134,135,133, 94,175,239, 85,159,250,199, 17, 74,105, 36,128,230, 85,235, 51,194,130, 47, 0,184,208, 68,235, 56, 72, 8, 57,
+121,252,248,241,119, 84, 42,213,176,166,112, 62, 82,204,141, 50, 98,115,235,171, 16,139, 87,181,117,151, 47,122,119, 4, 37, 43,
+ 79,252,217,124,245,120,109, 66,175,214,138, 88, 8,185,143, 65, 74, 47,227,249, 56,219,255,190,202,156,151, 33, 51,175,234,208,
+ 76,190,232,163,177, 32, 31, 31,219,217,124,205,147, 78, 9,189, 90, 41, 19, 64,241, 49, 36,134, 11,245,114, 86,130, 82,122,158,
+ 16, 50,124,221,186,117,223, 24, 12,134,151, 40,165,191,215, 91,162,226,165,161,200,188, 20,102,126, 91, 80,212,124,194, 34,165,
+ 6,240, 16,138, 44, 94,122, 67,218,250, 32,184,152, 70,227, 1, 52,104, 72,155,154,160,148, 94, 7,224,223,148,206,198, 66, 41,
+ 61, 73, 8,193,158, 61,123,166,250,249,249,181, 10, 15, 15,143, 54, 24, 12,187, 41,165, 39, 43,205, 67, 9, 33,135, 62,190,121,
+179,232,211,240,240,243, 70,142, 59, 95,135,115, 95,185,115,190,159,159, 95, 96,120,120,120,152,193, 96, 88, 71, 41,221,247,224,
+123,196, 96, 52,140,135, 18,176,242,243,243, 59, 63,140,245, 50,254, 91,148,135,247,119,203,203,227, 71,165,144,213,217, 83, 54,
+247,199, 89, 50, 3, 40, 73,130,144,219, 80,239,112,117,191,243, 50,100,230, 85,221,154,203, 94,251,105,166,204, 0,138, 52, 80,
+124,210,152,112, 85, 1,165,244, 60,128,150, 13, 22, 76, 8, 55, 1,136, 5, 33,113,120, 31, 53,159, 28,253, 62,238,253,155,205,
+248,231, 41, 15, 83, 39,235,152,135, 2, 56, 85, 94,108,113,238, 3,192, 2, 21,227, 95,195, 99,120, 13, 59,131,241, 31, 98,110,
+148, 17, 7, 2,174, 32,147,191, 0, 60,180, 4, 44,241, 40,178,164, 97,110,156,177,145,206, 75,200, 36,243,192,135, 15,196,150,
+ 40, 20, 26,211, 48,171, 17,206,166,166,236,199,185,230, 0,213,176,225, 75, 25, 12, 6,163,201, 96, 1,139,193,248,183, 83,182,
+ 87, 39,169,188, 60,186, 78, 6,131,193,248, 15, 65, 0, 4, 85, 55,129, 82,250,171,205, 18, 66,170,117,212, 70, 93,126,230,100,
+ 78,230,100, 78,230,100, 78,230,124,252,156,117,185,235,147, 63, 30,105, 30,228, 25,244,248,151, 92,185,192,156,204,201,156,204,
+201,156,204,201,156, 15,215,249,184, 21,219,239,159,194, 96, 48, 24, 12, 6,131,193,176,137,135,122, 14,150,220,217,199, 21, 2,
+ 94,123,194, 81, 63, 0,160, 60, 18, 1, 11,119,211,144, 25,153,218, 88,183,202,221,215,145, 66,188,159,192, 56,177, 32,249,118,
+118, 99,125,237,124,237,198,235,156, 85, 83,211,178,242,190, 9,141, 40, 8,174,207,178,246,246, 45,236,164,142, 14, 19, 74, 77,
+230,182, 98,145, 40,193,148,155,191, 61, 59, 59,170,160,177,109, 98, 48, 24, 12, 6,131,241,104, 82, 99,192,106, 17,216,247,138,
+ 84, 42,243, 2, 0,142, 82,112, 20, 40,202,207, 13, 73,141,186, 50, 20, 0, 52, 94,157, 79, 8,165,234,206, 28, 45,155,110,229,
+ 0,139,169, 36, 54, 47,238, 98, 87, 91, 86,172,212,250,142, 11, 26, 18, 52,126,212,168,145,190,237,218,182,107, 13, 0,183, 66,
+111, 69, 29, 62,124,228,182, 82,235,251, 99, 97,198,237,159, 26,211, 49, 10,233,135, 93,186,116,236,115,245,234,181,101, 0, 94,
+105,140, 11, 0,156,156,148,115, 79,254,176,160,223, 19,227,215, 42, 0,212, 43, 96, 73, 29, 29, 38,140, 29, 61,172,227,155,175,
+206,226,189,184,224, 35,175, 43,231, 79,175, 86,185,181,205,165,156,249,100, 81,250,211,127,212,116, 67, 99, 6,131,193, 96, 48,
+ 24,255, 78,106, 12, 88, 82,169,204,235,226,233,195,142, 63,157, 75, 4, 0, 4,117,114,193,219,203, 55, 15, 33,132,220, 6,128,
+ 49, 47,190,239,179,108,241,171,248, 51, 44, 3,148, 82,116,108,227,132,225, 99, 39,218,180, 82,153, 75, 64,215,167, 39, 77,122,
+102,193,130,249, 99,238,222,189, 27,183,119,239,222, 63, 0,160,111,191,126,109, 62,250,232,163, 73,107, 29, 28, 37, 50,151,128,
+228,226,180,240,218,111,164, 88,147,223,189,181,123,128,119,251,169,223,125,181,153, 55, 96,232, 83, 83,100,238,173, 87, 22, 39,
+ 71, 37,219,178,172, 70,163,153, 39, 20, 10,237, 0,128,227,254,151,123, 90, 53,227,187, 0,128,197,202,169, 28,221,253, 10,248,
+ 34,169, 85, 34, 17,133, 23, 20, 22,126,147,151, 20,254,101,109,206, 82,179, 57,240,181,217, 47,240,174, 71,103,193, 43,176, 47,
+127,195,202,119,192, 89,205, 14,175, 47, 94, 62,225,234,165,239, 0,188,119,166, 33,253,100, 48, 24, 12, 6,131,241,104, 82,235,
+ 33, 66,165, 76,128,219, 49,105, 0, 0,123, 25, 48,119,230,115,200,202,212,251, 24, 45, 28,254,239,185,105,184, 22,145,138,219,
+177,122, 80, 74,225,227, 33,183,121,165,124,112, 93,254,111,250,255,245, 63,113,242,228,229,119,151,188,251, 45, 33,101,163,119,
+111,219,254, 69,207,165,239, 45,125,105,218,115,211, 6, 31, 56,112, 32, 12,117,221,169,186,166, 78, 17,213,230, 53,171, 86,136,
+147, 50, 75, 74,230, 45, 88,196,205,127, 99,222, 6, 0, 79,217,178,172, 80, 40,180, 75, 74, 74, 82,242,120,247,159,158,246,241,
+138, 69,103, 7,143, 95,123, 39, 46, 33,247,250,137,131, 7,187, 6, 4, 4, 32, 41, 57,173,247,234,141,159,119,112,109,221,245,
+133,130,252,226,241, 69,250,240,106, 71,141,150, 8,133, 97, 31,172,222,218,145,179,111,195,123,251,165, 17, 8,108,237,134,228,
+140, 92,244, 27, 58, 70, 16,114,229,202, 16, 0,103, 26,210, 79, 6,131,193, 96, 48, 24,143, 38, 60, 0, 32,132, 84, 59, 96,159,
+213, 74,113, 59, 54, 21,183, 99, 83,113, 57, 66, 15, 19, 21, 98,195,234, 15,176,110,229,123,200, 46,230,225,167, 63, 19, 17, 25,
+155,134,200,216, 52,100,230, 20,254,109,121, 90,229, 82,203,117,171,228,157, 54,108,176, 91, 51,164,159, 98,128,163,131,131,195,
+157,176,111,139,150,190,145,238,255,193,107,137, 34,161, 81,146,164, 80, 42,122,237,223,255,125,128, 78,163, 85, 40,149,170,133,
+ 10,143,142, 59,236,237, 59,216,213,230,172,138, 92,231, 63,102,204,200, 97,131, 92, 92,116,220,172, 13, 33, 17,109,253,253,204,
+222,109,188,123,203,117, 62, 99,106, 90,166,178,147,227, 56,240,120, 60,164,167,167, 35, 37, 37, 5, 49, 49, 49,136,140,140, 68,
+ 98, 98, 92, 58, 71,169,208, 10,142,231,234,234, 1,129, 64, 12,175, 22,205,177,117,195, 74,249,242,247,223,238, 38, 85,136,131,
+ 9, 33,164, 58,103, 73,118,206,129,163,199, 79, 38, 31,219,187,213, 10, 0, 25, 57,133, 56,117,229, 46,174,133, 39,214,214,149,
+ 90,219,217, 84, 48, 39,115, 50, 39,115, 50, 39,115, 62, 10,206,154,178,200,191,149, 90,175, 34,140, 74,204,198,237,152, 52,116,
+246,115, 71,235, 22,174,184, 28,153,131,221,167, 18,177,227, 68, 60, 78,221,208,131, 19,168,144,150, 15,220,137, 75,199,157,248,
+204,218,198, 85, 6, 0,240, 37,194,167, 95,123, 45,111, 65,187,128,252, 30,167,143,205,133,187,230, 78,192, 91,111,229,206,229,
+ 75,132, 79, 59, 52, 83,237, 93,180,224,245,169, 42,185, 92,108, 44, 53,162, 85,203,230,210, 87,231,204,125,129, 56, 72,246,218,
+218, 25,181, 71,128,131, 68, 38,251,114,249,251, 11, 37,159,252,116, 39,161,200,136,162, 31, 47,164, 71,207, 95,180, 52, 91, 32,
+148,110, 85,123, 4, 56,216,234, 50,155,205, 40, 45, 45,133,209,104,132,201,100, 66,114,226, 95, 99,126,251,233,205,161, 45,155,
+ 57, 14,149, 72,165,160, 0,242,139, 45,136, 73, 53, 96,224, 19,131,249,157, 59,117, 10, 84,186,250, 79,175,206,149,155, 27,151,
+199, 81,190,234,240,207,123,248,223,255,114, 29,223, 30,190,130,224,223,175,227,242,153, 99, 22,202,153,239,221, 78, 66,229,230,
+237,163,114,107, 31,175,114,239,144,126,175,120,180,187,106,107,155, 25, 12, 6,131,193, 96, 60, 26,212,120,136,176,164,164, 56,
+246,169,167,167,193, 85,235,162, 28, 59,224,121, 81, 72, 84, 46,244,169,241,184, 27, 25, 10, 67,137, 25, 34,135,150,128,212, 5,
+ 45,188,154,227,230,237, 96,211,166, 53, 71, 10, 57, 75,105,108, 77,190,177, 99,221, 60, 92, 53, 10,222,154,213,158, 23, 35,111,
+231,116,222,179,228,107, 60,243,140,210,121,205,106,207,139,113,209, 10,158, 92, 74,123,189,240,220, 20,194, 35, 20,111,189,181,
+ 0, 99, 71, 13,195,255,189,240, 44,249,230,155,157, 61,108,237, 12, 7,225,167,139,223,249, 64,156,158,107, 49, 94,142, 44, 44,
+149, 43,100,178,243,119, 10,139, 2,189, 60,101, 35,198, 63,159,114,100,255,151,159, 0,120,206, 22, 87, 69,176, 50,155,205, 48,
+153, 76, 0, 96, 5, 0, 30,175,236, 49,171,192,136,140,220, 82,164,231,150,194, 98,229, 48,254,233,231,100, 87,174,222,120, 14,
+ 64, 13,231, 99,113,156,217, 98,198,143,191, 92, 67,242,149, 3, 28,225,241,243, 42, 78,114, 7,202,194,149,139,139,231,217, 81,
+227,159,213,136,165,101,135, 91, 11,138, 74,241,205,231,171,109,237, 62,131,193, 96, 48, 24,140, 71,132, 26, 3, 86, 92,216, 31,
+ 93, 1,192,183,235,208, 44,165, 84,224, 40,224, 17,164, 39, 69,225,155,181,243,192,113, 20, 35, 94, 90, 3,149,151, 11,100, 34,
+ 62, 74, 11,179, 10,179,238,158,118,170,109, 69,132,152, 7,111,217,150,236,245,242,236, 86,234, 61,123, 10,133, 0,176,103, 79,
+161,112,246,172,102,234,207,182,197,122,117,239,211, 25,212,106,197,168,177, 79,225,233,201, 79, 35, 46,205,128, 31,206, 38,160,
+168,216,104,211,253,207,228, 26,255, 14, 90, 55,247, 97,175, 61, 63, 76, 33,224, 19,226,221,220,142, 41,233,120, 44, 0, 0, 32,
+ 0, 73, 68, 65, 84,159,168, 55, 91,248,124,161,245,208,149,188,148,241,227, 39, 59,159, 58,250,253, 32,185,198,191,131, 65,255,
+215,141,186,124,165,165,165,176, 90,173, 40, 45, 45,133,217,108,134,163,115,203,163,131,159, 90,155,148,154, 86,112, 36, 45,167,
+164,123,145,217,130,244,220, 82,100,228,150, 34,183,200, 4, 23,149, 3, 44,102, 99,187,154,124,148,210,111,159,124,106,218,179,
+ 0,120,132,103,249,186, 32,229,175,200,138,105, 21,225,106,216,216,103, 52,103, 67,162,112,247,234,177, 28,202, 89,204,101, 27,
+142, 99,183, 42, 97, 48, 24, 12, 6,227, 95,198,189, 67,132,132, 16, 90,211,241,207,228,244,108, 56, 41, 5,208,184,121, 97,234,
+188,117, 0, 0,171,213, 12, 74, 1,139,213,182, 17, 6, 40, 21,254,242,202,108,175,216, 22, 94, 36,111,234, 51,242, 98, 0,152,
+250,140,188,184,133, 23,201,123,101,182, 87,108, 65,137,210,100,177, 90,113, 62, 44, 3,107,190,251, 11, 75,119,222,194,241,171,
+182, 15,135,197, 23,139,102,175, 94,181, 82, 36,224, 19, 18, 22, 95, 88,152,148,101, 41,228, 11,133, 38,185, 92, 76,141, 84, 80,
+ 26,151, 73,179,158,120,242,133,187, 60, 62,169,246, 48, 94, 5, 21, 87, 14, 86, 28, 34,172,216,131, 69, 41,165, 4,224, 56, 98,
+181, 38,101,150, 32, 81, 95,140,196,140,255,149,244,156,210, 26,143,144,170,220,188,125,236,212,202,227, 14,246,234, 23,236,237,
+212,207, 41,100, 14, 39, 84,110,222, 62, 21,211, 42,194,213,197,176, 20, 68, 93,255, 53,221,106, 50, 76, 42, 72,190,161, 43, 72,
+190,161, 43, 72,186,213,197,230,141,192, 96, 48, 24, 12,198,191,152,218,178,200,191, 13, 30, 0, 80, 74, 73, 69,169, 58, 3,165,
+192,157,248, 76,136, 5, 28, 60, 90,180, 6,173, 20, 35, 40, 0,139,213,182,237, 16, 28,156,146,212,170, 77, 17,183,112, 97, 66,
+207,182,237,156,110,206,158,213, 44,162,109, 59,167,155, 11, 23, 38,244,108,213,166,136, 51, 91,132, 86, 90, 62,222, 86,197,216,
+ 90,229,195,241,219,218,149,110, 29, 2, 90,242, 63,216,115, 39,225,229,207, 34,111,139, 68, 34,179,135,179,156, 52,215,201,249,
+158, 26,153,184,212,204, 43,245, 9,236,100, 4,143,116,170,205, 82, 17,176,140, 70,227,125, 37, 75, 31, 53,230,228, 15, 11,198,
+186,235, 28,158, 79,214, 23, 35, 33,195,128, 68,189, 1, 9,122, 3, 12,165, 22,220,250, 43, 26,224,139, 66,171,115,170, 85,142,
+ 39,246,238,254,214,179,131,127, 43,109,128, 79, 11,237,151, 59,191,245,148, 74,237, 79,168,220,188,125, 60,189,124, 67, 46,253,
+250,189,230, 98, 88, 10,226,111, 95, 77,179,148,230,239, 45, 74,143,248,173, 30, 29,103, 48, 24, 12, 6,227, 95, 79,109, 89,228,
+223,136, 77, 35,185, 55,247,208,225, 82,104, 44,218,249,181,132,157, 90,133,136,168, 36,240,121, 66,240, 8, 96,182,216, 30,130,
+168,201,252,221,250,245,118,136,143, 85,240, 62,219, 26,235,245,202,108,175,216,245,235,237, 46, 80,147,249, 59, 0,211, 40, 45,
+187, 55, 98,197,192,166, 54,238, 28, 43,115,115,230,102, 58, 71, 57,255,106,116, 81, 22,143,199, 47,117,178,147,114, 78,118, 18,
+158,147, 74, 44, 20, 9,249,156,133,242, 76, 30, 90,175, 18,202,113, 29,108,241, 85, 62, 68,104,181, 90, 65, 8,207, 10, 0, 28,
+199, 41, 18,179,138,145, 87,194, 71,122,110, 41,114, 10, 76,240,118, 87,224,215, 83, 7, 12, 86,115,241,158,234, 92,124,161,200,
+174,181,151, 7,222,254,112, 61,138, 75,173,184,147, 92, 8,145, 68,226,162,115, 9,188, 49,237,229, 69,146, 87,183, 71, 97,250,
+ 32, 39,188,241, 71, 84,178, 33, 93,186,200,246, 94, 51, 24, 12, 6,131,193,120, 20,177, 41, 96, 41,229, 82, 80,190, 20,127,132,
+ 68,193, 55,160, 61,118, 30,188,140, 54,237,122, 32,181,192, 2, 10, 94,157, 87, 15, 86, 48,127,145,225, 26,128,107, 99,199,186,
+121,140, 27,231, 62,152, 82,225, 47,159,125,158,151, 4, 0, 91,247,245, 7, 5,192,113, 20,148, 2,148, 43, 11, 90, 54, 67, 4,
+241,177,169,249, 45,188, 92, 20, 8, 79, 50,149, 42, 36, 34,158,131, 66,204,215,216,137, 69, 34,129, 0, 86, 74, 74, 83, 83,163,
+ 74, 9, 16,103,139,174,226,208, 96,197,163, 92,233,122,244,137, 39,215,232,227, 18,242,174,122,103, 27, 58,228,153,196,160, 20,
+240,118, 87, 32,244,226, 17,107,122,242,221, 59,197,233,183, 63,175,206,197,113,224,155, 44, 28,110, 68,231, 33,183,200,140,220,
+ 66, 19,122, 15, 28, 45,234, 29, 52, 6,127,132,102,130,179,152,177,250,139, 35, 5, 86,106,126,154,210,112,179,237,157,102, 48,
+ 24, 12, 6,131,241, 40, 98,211,205,158,173, 28,133,179,147, 35,164, 10, 53, 98,211, 77, 40, 32, 90,228, 24, 40,172,214,178, 61,
+ 88, 53,237,104, 34,132, 4, 85, 87, 31, 28,156,146,244,243,207,250, 29,193,193, 41,149, 78,224,254,223,158,171,123,143,220,223,
+ 3, 86, 77, 78, 66,173,191, 30, 60,118, 58,111, 76,119,141, 3,143,207, 47, 22, 9,121,165, 2, 17,223, 36, 18,240,204, 34, 1,
+207,168, 83, 11,249,167, 15,237, 19, 83,130,211,117, 57, 75, 74, 74, 16, 20, 20,132, 17, 35, 70, 96,236,216,177,152, 56,113, 34,
+124,124,252,181, 60, 62, 49, 82,194,113, 26,113, 1, 90,107, 8, 4, 37,137,248,109,223,199,134,208,243, 63,223,176,150,150,140,
+166,149,142,105,222,231,164,148,203,206, 43, 69,137,201,138,156, 66, 19,114,138, 76,176,104,122,226,231, 63, 83, 80,108,180, 34,
+ 62,228, 64,177, 62, 45,105, 94, 73,250,157, 26,175,194,172,173,239,141,129, 57,153,147, 57,153,147, 57,153,243, 81,112, 62,110,
+216,176, 7,139,162,149,171, 2,109,220, 21, 40, 49,105, 81, 98,180,162,168,196,138,124,131, 9,249, 6, 51, 98,211, 12, 8, 61,
+216,248,134,148,237,181, 2, 72,249,115,144,178, 96,103,235, 62, 44,177,201,248,225,186,213, 31, 77,218,215,169,163,241,213,145,
+174,205,110,198, 26, 83, 8,225, 21,243,248, 2,179,163, 74, 32,140,136,184,169,191,112,246,104, 63,169,197,250,108,109, 30,139,
+197,146,231,238,238, 14,224,254, 91,229,248,183,150,141, 61,127,228,173,150,253,199,172,214,124,178, 98,129,129,199, 23,113, 68,
+ 32, 10,181,154,139,247, 22,167,223,222, 74,107, 57, 97,140, 39,146,254,117,233,122,120, 15,123,199,102,184,155, 92,132,162, 18,
+ 11, 76, 22, 14, 14, 74, 17,146,110,157, 48,197, 70, 92,253,190, 32,249,198, 78, 27,187,202, 96, 48, 24, 12, 6,227, 17,167,206,
+128, 85, 82, 82, 18,219, 39,104, 52, 56,142,194, 74, 1,206, 90,190,167,137,251,223,222, 38,171,185,164,214, 61, 47,182,192,113,
+214,203,159,110,223, 49,162, 83,183,254,252, 0, 79, 37,242,179,210,112,241,252,239, 22,112,244,130, 45,203,103,102, 70, 22,202,
+ 93,188,159,154, 52, 97,220,254,231,254,111, 86,110,191,129, 3, 21, 90,173, 75,105, 82,114,146,225,171, 93,187,205, 39,142, 6,
+247,227, 96,153,156,153,121,231,239, 67,206, 87, 34, 55, 55,119, 99,117,245, 79,244,105,214, 27, 64, 75,190,128, 24, 13, 25,145,
+138,250,244, 45, 51, 57,113,252, 71, 31,190, 31,247,204, 75,175,139, 91,185,183, 70, 70, 30, 31,177, 73,105,136, 56, 27, 92,154,
+ 28,121,229,167,252,164,107,181, 94,217,200, 96, 48, 24, 12, 6,227,223, 69,157, 1, 43, 33,188,108, 60,172, 7, 77, 65, 90,198,
+180,157, 59,191, 93,254,237,174,125,189, 75,140, 70,119, 10, 81,162,213, 98, 60, 83,104,197, 82, 91, 29,134,180, 59, 87,157,157,
+125,218,126,245,197,167,239,124,181,227,179,254,224,172,126, 4,136,163, 4,167,165,102,235,115,117,133,171,218,200,204, 44,216,
+ 54,248,169,181,197, 89, 89,133,223,214,119, 89, 67,102, 68,154, 82,215,170,217,182, 13, 31,174,225,241,248, 67,172, 86, 78,200,
+ 89,205,119,173,166,146,143,139,245,183, 15,214,182,247,139,193, 96, 48, 24, 12,198,191, 15,155, 78,114,255, 39,200,206,142, 42,
+ 0,240,106, 99, 61,153,153,145,133, 0,154,252, 74,188, 91,145,121, 63, 0,248,161,161,203, 23,166, 71,235, 97,227, 40,242, 12,
+ 6,131,193, 96, 48,254,221,216,116,146, 59,131,193, 96, 48, 24, 12, 6,195,118, 8,128,106,175, 4,168,207,157,178, 27,114, 53,
+ 65, 93,126,230,100, 78,230,100, 78,230,100, 78,230,124,252,156,117,185,235,147, 63, 30,105,104,249,136,233, 15,162, 0, 8, 98,
+ 78,230,100, 78,230,100, 78,230,100, 78,230,252,175, 21,118,136,144,193, 96, 48, 24,255, 57,156,157,125,148,206,206, 62, 74, 91,
+231, 87,104, 2,116, 10, 77,128,238, 65,182,137,241,120,193, 2, 86, 35, 33,132, 16, 95, 47,229,220, 33,253, 91,254,236,215, 74,
+ 62,246, 97, 57,149,186, 86, 26,149,103,215,243,106,143,182,195,155,162, 13, 85,218, 35, 9, 12, 12,236, 25, 24, 24,216,147, 16,
+ 34,105, 10,167, 66,231, 59,165,153,119,207,179,186,214,157,126, 87,186,248, 76,104, 10,103,101, 84,110,222, 78, 42,207, 46, 63,
+168,220, 59,228,168,220, 58,228,171,154,117, 57,163,214, 4,180,170,107, 57,207,177, 43,253,150,237, 11,219,235, 57,118,165, 95,
+117,211, 29,135,111, 86,189,255,221,221, 21,206, 99, 86,219,252,197,204,184, 31,207, 62,207,216,187, 13, 88,224, 84,223,229, 60,
+124,123,134,121,181,237,151,225,238,211,163,218,123,126, 86, 71, 51,191, 94,215, 90, 4,246, 73,111,230,219,235,106,125,215,247,
+ 95, 69,166,109,213, 83,230,216,252,136,212,177,249, 81,169, 83,171,129,141,245,185,185,185,201,252,253,253,135,245,236,217,115,
+102, 80, 80,208,107,157, 58,117,154,209,162, 69,139, 33,132,144,135,118,145,149, 66,231,187,184, 84, 72, 50, 75,133, 36, 83,161,
+243, 93, 92,215,252, 74,157,223,114,194,179,166, 16,158, 53, 69,169,243, 91,254, 79,180,209, 22,164, 46,190,205, 21, 58,223,245,
+106,215,192,203,114,157,207,232,250, 46,239,232,232, 56, 68,171,213, 62, 89, 81, 28, 29, 29,135, 60,136,118,254, 87,169,247, 7,
+156,144,206, 66,165,171,249, 53,177, 84,246, 60,143, 7,117,198,221,139,238, 15,162, 97, 77,133,166, 85,247,171,124, 30,223,163,
+114,157,149,179, 38,233,163, 47,117,105, 10,191,111, 11,217,244,119, 22, 78,123, 99,202,164,160,230, 65,163,230, 17, 0,193,213,
+205,167,242,236,250, 39, 33,188,150, 60, 2,240,120, 4, 60, 2, 0, 52, 37, 51,250,210,223,110, 62,109,171,179, 2, 59,109,235,
+150, 98,165,230,108,159,177,175,184,132,252,186,123,167, 66, 19, 48,184, 72, 31,126,179,177,125, 35,132,104, 90,183,110,221,213,
+199,199,199,105,238,220,185, 34, 0,248,228,147, 79,218,180,105,211, 38, 43, 42, 42,234, 10,165, 84,223, 16,175, 66,235, 55,109,
+227,218,101,223, 14, 31, 62, 2, 41,153, 69, 88,189,126,203, 0,165,139,207,196,194,180,200, 3,141,109, 51, 0, 56, 56,180, 84,
+ 11,212, 14,183,230, 45, 92,166, 29, 54,160, 43,191,176,196,130,227,103,175,247,221,189,101,217,101,181, 38,160, 91,190, 62, 60,
+186,166,101, 57, 67,222, 18,157,146, 14,227, 12,121, 0, 48,165,234,116,119,165, 57, 72, 35,179, 14,115,149, 8,174, 3,248,177,
+206,182,120,245, 57, 33,148, 72,154,243,120, 60, 84,188,247,124, 82,246,254,155, 77,197,241, 73,127,157, 29,218,168,206, 54, 17,
+234,230,221,211,192, 23, 56,241,200,255,218, 71,202, 63,167,132,210,252,212,200, 63,234, 29,136,170, 66, 8,177,107,219,198, 62,
+112,100,239, 62, 95,157,137,201, 86,120,246,127,253, 8,161,188,207,226,207,174,187, 97,203,242, 82,169,212,225,208,161, 67,154,
+ 97,195,134,217,233,218, 62,121,198,150,101,148, 98,105,192,225,195, 7, 69,195,134,217,190,153, 21, 90,223,193,224,241,118, 17,
+ 64,200,113,244, 19, 62, 71,191, 47,204,138,140,162,229,199, 69,108, 69,174,243,155,206, 3,181,249,123,134, 3,185,106, 72,143,
+216, 81,159,117, 84, 64, 8,225,203,180,190,207,203,164,210, 5,222,190,254, 62,177, 49, 81,145,249,249,121,235,139, 51, 34,119,
+ 80, 74,235,113, 87, 87, 0,102,203,155,191,254, 17, 50, 92, 32, 20,146, 97, 79,116,231, 3,248,189, 33,109,170, 64,167,211, 61,
+185,121,243,230, 86, 61,123,246, 4, 0, 88, 44, 22,245,254,253,251, 93, 62,252,240, 67, 5,108,248, 27,170, 14, 66,136,187, 70,
+163,241, 20,139,197,238, 0, 96, 52, 26,147,245,122,125, 2,165, 52,185,174,101,149, 46,173,157, 9, 4,203,254, 56,123, 86, 0,
+ 0,125,251,246, 91,222,188,239, 92, 7,190, 72, 89, 92,221,252,102, 99,129, 2,192,235, 23, 47, 93, 32, 0,208,163,123,207, 69,
+ 10, 77,192,167, 69,250,240,244,134,180,189, 41,144,233,252,186,243,128, 55,122,247, 27, 60,254,233,201,211,120,129,222,158, 24,
+ 50,120,208, 91, 0, 14,213,199, 35, 16, 8,100,151, 47, 95,110,205,227,241,248, 22,139,165,164, 71,143, 30, 9,141,105,151,187,
+111,175, 63, 9,120,205, 76, 22,227, 23,250,232,171,203,171,126,246, 8, 33,124,187,102,157,222, 1, 95,240, 18,199,113,137,249,
+241, 87,122, 53,102,125,143, 58,245, 10, 88,132, 16,190,218,163,227,185, 73, 79, 79,109,251,225,194, 25,210, 77,187,126,129, 99,
+203,110,225,217, 49,151, 3, 30, 84, 3, 27, 11,159,199,247, 56,121,242,132, 86, 38,225, 3, 0, 10,139,173, 24,110,195,151,173,
+189, 87,247,211, 60, 66,124, 43,110,233,109,181,152,164, 2,161,184,132, 0, 0, 41,187, 58,192,217,173,197, 41, 87, 87, 71,249,
+148, 73, 65,205,119,237,251, 37, 41, 33, 41,235, 76, 77, 62, 30,143,239, 17,124,240,144,214,221, 73, 10, 1,159,160,176,216,130,
+ 97, 35, 70, 91,171,155,215,213,213,113,228,148, 73, 65,205,247,124,247,107, 66,106,106,246,145,218,218, 41,119,245,233,172,176,
+211, 29, 31, 63,243, 67,167, 18,158, 35,150,174,216,232,124,246,216,158, 51,253, 71, 78,227,226,227, 19, 75, 40, 33,225, 57,217,
+169,175, 21,166,222,189, 93,103,167, 81,246, 30, 43,149,202, 86, 74,165,178,195,240,225,195,165, 11, 22, 44, 16, 14, 24, 48,224,
+222,244, 25, 51,102,136, 78,159, 62,237,186,118,237,218, 17,110,110,110, 37,133,133,133, 55, 10, 11, 11,163, 41,165,213,246,165,
+ 58, 92, 92, 52,115,158, 26, 55, 26,131,198,191, 2, 43, 71, 48,227,229,215,113,226,216,143,179, 0, 52, 73,192, 50,203,213, 31,
+190, 52,115,129,166, 71,215,142,252,101,123,110, 67, 38, 22, 96,104, 23, 95,242,194,220, 37,246, 59, 54, 45,251, 18, 64,255,170,
+203,120,142, 93,233,199, 25,242,150,180,117, 54, 78, 30,211,179, 37, 14,238, 53, 78,246, 8,122, 11, 60,185,221,242,132,224,197,
+ 17, 0,208,122,248,171, 42, 7,153,108,179,155, 61, 95, 43,177,234, 55,183, 30,254,234,175, 81,199, 54, 21,212,214, 22,161, 68,
+210,124,223,222, 61,222, 14, 74, 17,248,124, 2, 1,143, 7, 62,159,160,212,100,197,132,137,147,155,162,187,229, 63,174,222, 35,
+120,192, 11, 0,192, 1, 95, 23,103,220, 57, 90,159,247,132,240, 69, 78,135, 15,254, 36,208,218, 73,192,231, 19,240,121, 0,159,
+ 71, 16,151, 94,140,233,211, 95,176,107,100,251, 52,195,123,107,187,158,254,180,255,208, 30,109, 29,219,127,119,129,216,245, 24,
+254,180, 83,102,137,252,249,125,193,191, 79,246,236,247,198, 37, 74,185, 53,137,127,108, 56, 89,155,167,180,180, 52,125,232,176,
+225,106, 34, 80,200,127,253,121,103, 63, 1,143,192,108,165,176, 88, 41,172,229,247, 46, 45,251,123, 37,224,241, 8, 40, 71,241,
+210, 75,211, 49,116,216,112, 3,103,225,146,106,115,223, 7,143,183,235,248,175,231, 53,165,102, 14,107, 55,239, 88, 86,148,167,
+ 95, 22, 19,225, 20, 39,215,249,188,110, 72,143,180,249,190, 21, 60,208, 46,137,209,161, 51,247, 28,190,136,182, 1,254,176,114,
+101,237,244,245, 80, 96,207,145,139,240,243,245, 43,107, 55, 71,225,211, 76,137,174, 93,186, 2, 64,189, 3, 22, 33, 3, 4, 10,
+157,223,222, 49, 19,158,155, 48,126,194, 20, 56, 58,168, 97, 52,149,250,252,118,226,232,246,173,155, 87,247, 38,132, 60, 95,175,
+112, 72,173,247,126, 23, 40,199, 53,122, 47,147,155,155,155,166,107,215,255, 13,167,104,177, 88,224,229,229,133,228,228,100,223,
+250,186, 8, 33,114, 87, 87,215,145,219,182,109,211,142, 24, 49, 66,232,226,226, 2, 0, 72, 75, 75,115, 63,126,252,120, 39, 55,
+ 55,183,140,212,212,212, 35,148, 82, 67, 77, 14,171,153, 39,226, 9,192,151, 74,229, 0, 0, 10,194, 91, 48,231,217,246, 58, 87,
+183,210,234,230,215,235,211,196, 11, 95,249,157, 8, 4,162,242,249,193,163,148, 35,213,205, 11, 0,142,142,142, 65, 66,161, 80,
+ 86,221, 52, 19, 95,221,131, 10,237, 94,228,241,121,101, 31, 86,139, 89,159, 29, 31,226,111,107,255, 21, 58,223, 64,161, 88,180,
+245,153,231,102,246,154, 48,126, 44, 92, 53,118,248,245,220, 77,204,154,243,134,217, 98, 50,175,183,213, 83, 25, 62,159, 47,200,
+200,200,136,115,112,112,112,105,200,242,247,185,120,164,229, 47, 39,142,105,127,253,237,212,162,117, 27, 54,205,118,243,233,107,
+230, 40,189,119,159, 97,207,182,131,132,131, 71, 77, 82,107, 91,247,144,110,122,239, 69, 97, 99,215,247,168, 83,175, 63, 30,165,
+ 91,192,107, 19, 39, 77,106,251,202,172, 25,210,215, 54,159,195,111,123, 63,201,108,170,112,165,210,250,246, 36,124,193, 76,194,
+231, 43, 8,143,136, 57, 43,151,104, 49, 26,151, 27, 50, 35, 83, 27,235,182,114,192, 15,231, 51,234,181, 12,161,104,179,235,251,
+159,181, 58,123, 9, 74,140, 22, 60, 61,101, 26,118,237,250, 86,229,172, 22,163,196,104,193,154,117,235, 10, 10,227,142,104,227,
+ 18,115,146,131, 70,191,113, 50, 58, 54, 35, 52, 33,181,228,251, 26,125,132, 7,173,157, 4, 43,246, 69, 66, 45, 19,194, 65, 37,
+ 2,143, 71, 42, 77, 39,196,167,133, 98, 78,179,102,154,129, 41,169, 57,121,149,156,187,107,114, 42, 92,219, 13,181,115,112,219,
+ 59,110,230, 10,251, 59, 25, 2, 80,152, 16,165,150, 98,210,243,175,170, 91,185,200,160,144,242,237, 99,226,147, 93, 23,188,249,
+230, 57, 59,109,235,110,121, 25, 81, 49,117,245,187, 69,139, 22,227, 71,141, 26, 37,159, 63,127,190,176, 89,179,102,248,122,207,
+254,230,125,135, 78, 28,157,146,154,222,140, 82, 10,157, 86,155,248,210, 11, 19, 15, 29, 61,122, 52, 62, 49, 49, 81,184,122,245,
+234,238, 63,253,244, 83, 0,234,241,159,168,149, 82,148,148, 90, 97, 45,255, 97,212,231, 85,251,189, 86, 35,132, 16,226,238,238,
+ 46, 73, 78, 78, 46,173,248,225, 32,132,220,219,152, 74,247,142, 67,159,232,223, 93,176,237, 88, 44, 10, 75,172, 80, 72,133,136,
+ 77, 55,160, 75,199,118,228, 11,171,165, 67,117,206,233,147, 70, 46,209, 41,233,176, 49, 61, 91, 66,235, 32,199, 87,159,174,192,
+193, 11, 49,195,210, 11, 9,156,199,172,158,233, 42, 17, 12,214,200, 69,155, 7,116,105,237, 50,168,115,115, 92,233,210,218,229,
+108,200,237,200,118,147,214,207, 77, 46, 20,254,154,125,108,110,181, 65,139,207,227,193, 81, 37,198,151,199,227, 32,151, 10,160,
+144, 10,160,144,148, 61, 86,126,255, 27,130,204, 45,160, 25,159,179, 78, 87,187, 5, 76,159, 60,105,162,219, 51,147, 39, 82,240,
+121,216,255,195,161,177,187,119,239, 74, 85,186,248,126,105,229,241,119, 20,167,132, 39,214,229, 34, 60, 64,107, 39,198,155, 95,
+134, 66, 45, 19, 66, 37, 23, 66, 45, 23, 98, 80,123, 13,248, 13, 60,145,128, 16,226, 48,107,108,171, 17, 55,191, 13, 26,232,235,
+169,244,190, 17,149, 23, 62,125,249,213, 13,167,115, 7,190,246,233, 39, 1, 78,133,185, 70,193,210, 5, 47, 9,146, 82, 82, 6,
+238, 63,116,102,144, 91,183,233,183, 45,166,162,183, 51,110,124, 95,237, 30,219,196,136, 63, 59,121,244,156, 40, 53, 21,154,111,
+221,184,157,212, 58,167, 84,130,176,184,124, 40,164, 2, 40, 43,182,173, 84, 0,133, 84, 8,165, 84,128,148,164, 88,100, 23,241,
+207, 37, 59,241, 6,210,211,127, 90,234,211,246, 18,147, 21,215, 99, 10,209,194,183, 35, 92, 93,221, 96, 28, 49,181,197,165, 83,
+ 63, 4, 43, 92,253, 87, 22,165,254,245,182,173,158, 61,135, 47, 98,209,235, 51, 67, 8,112, 13, 0, 40,208,105,233,170, 45,157,
+151, 45,122,229,190,186, 5, 31,108,234, 92,159,246, 85, 64, 8,225,203,117,190,187,251,143,156, 54,161, 93,143, 33,136,142,141,
+197,177, 67, 87,241,196,224,225, 24, 49,122, 60,140,198,210,103,119,108,219,116, 5,192,150,170,203,170, 92,253,251,180,107,235,
+191,219,221,205,173, 25,199,149,221,149,131, 82,160, 79,255, 65, 88,248,218, 75,224, 40, 69,135, 78,221, 6,141,152, 60,151, 82,
+ 90, 22, 4, 51,179, 50,139,110, 71,132, 7, 21,167, 71, 92,178,181,141, 37, 37, 37,102,189, 94,143,235,215,175, 35, 50, 50, 18,
+ 97, 97, 97,200,202,202,130,157,157, 93,189, 6,126, 38,132,168,219,183,111,255,204,169, 83,167,164, 14, 14, 14,247,234,141, 70,
+ 35, 84, 42, 21,158,121,230, 25,225,144, 33, 67,220, 71,142, 28,249, 28, 33,100, 15,165, 52,191, 58, 79,113,214,157, 20,181,139,
+223,231,253, 7,244,159, 13, 0, 50,181,107,204,230,175, 15,133,213,182,110,153,157, 91,243, 94,189,122,183, 6,165, 32,160, 27,
+139, 50,111,167,213, 52,175, 64, 32, 80, 92,188,120,177, 21,159,207,191,247,251,202,113, 28, 62,251,234, 59,191, 95,254,184, 53,
+126,213,154,181, 82,181, 66, 2,125,158, 17, 47, 78, 29,103,243,111,176,220,197,111, 68,239,222,253,131,151,125,240,174, 64,169,
+ 80,224,228,165,104,204,125,237,205,146,212,184,208,181,148, 19,110, 41,202,184, 93,191, 31,185,191,211, 36, 3, 94,123,123, 40,
+161, 26, 51, 84, 58,235,217, 49, 82,163,217,138,220, 34, 51, 74, 77, 86, 88, 57,138,188, 34, 51,194, 19, 10,224,172, 22, 55, 68,
+221, 21,128, 6,128, 30,192,149, 42,175, 81,254, 28,213,188,206, 68,217, 62, 17, 39, 0, 70, 0,149, 87, 94,241,186,166,250,138,
+229,195, 1,248,151, 59,173, 0, 46, 3,200,169,171,193, 2, 66, 8,165,148,222,251,166,175,250,186, 50, 34,177,114,210,162,185,
+211,164, 31,238, 9,193,111,123, 63,202,212, 71, 93,168,232, 0,180,173,187, 95,203,136,186,255,112, 23,181,225, 82, 75,153, 91,
+ 64, 51, 1,225,175,239, 63,160,223,144,217, 47,191, 12,223, 86, 30, 34,171,213, 74, 67, 35, 99,204, 59,119,124,245,188, 93,179,
+118, 27,242,147, 66,151, 84,236,106,180,197, 89, 25, 43,103, 77,170,186,199,202,202, 89,239,251,111,182, 58, 39, 33,128,189, 66,
+132,207,143,198,128, 82,128,128, 66, 45, 23, 98,223,233, 36,196,132,252,152, 63,170, 67,126,209, 51,171,222, 31, 52,112,196,171,
+167,194,163, 74,190,207,200, 40, 57, 65, 41, 77,171,201,201, 35,128,128, 79,160,150, 11, 97, 39, 23,193, 94, 33, 2,169,244,195,
+ 85,249,176,224,128, 17,175,254,114,234,124,252,219, 0,244,148,210,210,234,156, 50, 23,239,174,106,123,143,239,199,207, 94,173,
+186,149,100,129,128, 15,180,116,145,193, 81, 37,130,209, 66, 16,167, 55,149, 45, 3,123,204, 93,240,129,227,162, 55,102, 31, 37,
+ 36,160, 45,165,225,166,218,250,110, 48, 24,196,211,166, 77, 19,154,205,102,211, 51, 47,206, 27,146,150,166, 31,251,217,198,143,
+ 37, 90,173, 14,134, 18, 11, 66,194,238,250, 47, 91,246, 65,203, 67,199, 79,255,252,254,155,179,130,135, 13, 27,102,247,221,119,
+223,113,181, 57,171,162, 79,207,252,244,171,221, 7,190,253,100,237, 71,184, 29,159,131, 29,219,182,128, 90, 45,159,215,182, 76,
+101, 39,165,148,190,253,246,219,178,159,127,254,217, 67,161, 80,228, 27, 12,134,202,135, 42,121, 60, 30, 17,164,103, 27,224,172,
+ 18, 67, 36,224, 65,231, 32,133,214, 78, 2, 33, 31,224, 17, 98,173,206,185,227,251, 35,203, 57, 67, 30, 14,238, 53, 78,254,234,
+211, 21,248,191, 57,239, 32, 52, 83,124,156, 39,183, 91,254,202,228,241,139, 52, 50,235, 48, 55,123,158,118, 80,231, 22, 80, 72,
+ 69, 88,252,234, 52,116, 11,137,211, 38,231,114,239,232,139,249, 29, 1,188, 83, 93,223,121, 60, 2, 1,159, 64, 37, 23,226,248,
+238, 53, 25, 69,121,250,188,138, 67,111,198,210,146,248,218,250, 92,219,246, 84,232,124, 23,117,238,216,126,197,236, 25,211,121,
+189,123,118,163, 60,158, 16,153, 5, 70, 66, 41,240,218,220, 89,120,101,214, 75, 46,137, 41, 25, 75,183,108,249,124,137, 82,235,
+255, 97, 97,198, 95,239,215,230,228,145,178,189, 62, 74,169, 0, 74, 89, 89, 96, 81, 74, 5, 40, 49, 90, 65,254,159,189,251,142,
+111,170,220,255, 0,254,121, 78,102, 51,186,119,161, 45,179,236,189, 55,200, 18, 5, 5, 68, 65,112,224, 0, 68,175,202, 21, 21,
+113, 32, 23, 5, 68,134,160,168, 12,153,138,202, 18, 68,150,236, 97,101, 21,202,106, 11,165, 3, 74,119,155,166,217,243, 60,191,
+ 63,218, 98,129,142, 20,235,239, 94,241,251,126,189,242,162, 73, 79, 62,121, 78, 72,210,111,158,113, 14,131,196, 63,186,131,158,
+149,244,220,102, 22,164, 85,252,141,251,206,204,128,168,150,251,127, 77,241,110,166,251, 81, 23,155,154,121,241,163, 51,241, 57,
+ 39, 57,231,133, 81,125,254,253,140,195,197, 97,180,186,144,154, 99,134,203,193,217,115, 67,162, 81,127, 20,107, 58,123, 85,220,
+ 58,198,152, 79, 89,225,124,103,102, 70,236, 70,107, 80,235,145,163, 23, 45, 89,118,106,254,199,239, 74,242,245,118,136,156,195,
+ 75, 33,129, 74, 33, 45,189, 72, 96, 49,233,177,244,171, 21,217, 46,176,145,252,208, 33, 87, 85,237,188,139,200,199,141,120,168,
+247,247, 12, 80, 48, 65,158, 17, 17, 93, 47,186,255,176,103,189,250, 63,242, 20,220, 46,251, 52, 77,104,179,131,166,156,132,253,
+158,100,182,106,209, 28, 12,136, 51,230, 36, 78, 2, 0,109,104,211,175,155, 53,109,214,225,206,219, 26, 55,110,122, 87,129, 85,
+ 89, 38, 99, 76, 80, 5,199, 76,104,220,172,245, 91, 47,189,191,172, 94,106,150, 25, 1,145, 49,184,120,254, 44,118,253,240, 69,
+156,197,160,155,191,107,251,150,183,102,125,178,184,237,176,225, 79, 96,219,214, 31,222, 96,140,125,201, 75,252,241, 62, 18,197,
+113,107, 86, 46,143,148, 41,148,112,186, 68, 56,221,188,228, 95,151, 27,133,133, 58, 56, 93, 34,188,212,222,112,137, 12, 78,183,
+ 8,167, 75,132,205,238,210, 76,122,234,225,201, 0, 78, 84,212,206,186,205,251,238,145, 43,149,209, 28, 37,231,150,229,156, 67,
+226,178, 11,225,225,225,223, 1,128, 82,169,132, 82,169,132, 40,138, 56,147,152,247, 74,112,179, 1, 47,161,180,176,115, 59,236,
+233,186,212, 99,131, 43,219,247,176,176,176, 97,119, 22, 87, 86,171, 21, 70,163, 17, 71, 99, 79,249,174, 92,183,233,193,212,244,
+140,134, 34,247,181,121,135, 52, 28, 12,224,182, 57, 73,229, 51,139,179, 19, 38, 71,118,155, 32,188,241,242, 51,141,151,172,217,
+113,242,202,238, 89, 85,206,195,106, 48, 96,154,253,141,137,143,117,156,187,248,155, 43,133,199,190,154, 82,221,255,145, 84, 42,
+149,229,229,229,165,151, 93,255,124,197,134,142,113,137, 55,135,127,182,232, 51,175, 51,215, 12, 56,159,154,137,103, 6, 68,225,
+182, 63, 2, 85,100,106,195, 26, 5, 53,106,212,236,187,165,139,231, 74,175,100, 90,241,197,150,147, 56,176,237,235,163,217,185,
+ 39, 30,228,217,153, 21, 14,109, 86,151, 89,209,102, 30,108,227, 81,230,193,248,124, 24,173, 46,216,236, 46, 56, 69,142, 98,179,
+ 19,185, 69,118, 20,155, 29, 48, 90, 92,120,102, 96, 84,133,247,171,166, 30, 9,102,140,237,224,156, 15, 69,201,225,165, 20,229,
+174,131, 49,182,163,180, 93,183, 93,159, 54,109,218,244, 57,115,230, 92, 44,219,182,236,246,178,109,171,186,189,220,253, 3,223,
+121,231,157, 86,115,231,206,157,221,173, 91,183,239,127,251,237,183, 20,120, 82, 96,149,223, 9,198, 88,149, 79,176, 82, 46,141,
+ 80,123,251,151, 20, 28,127,116, 24,160, 94,171,190, 5,159,205,251, 79, 64,120, 76,215,244,172, 43,191, 71, 87,247,160,101,188,
+ 67,154,116, 87,169,212,191, 44, 88,176, 0, 99,134,245, 82, 93,207,119, 26,227,175, 91,114, 76,118,184, 66,130,155, 40, 62,154,
+ 61, 87, 59,119,222,167, 47,239,216, 46, 22, 1,248,180,162, 12,191,250,157, 78, 75, 88,185, 57, 86,140,129,139,238,140,194,212,
+147, 29, 1,224,207,204,181, 50, 89, 93,144,148,206,157, 97, 12, 48,219,220,144, 72, 88,110, 81,226,143,151,198,206,250,232,129,
+245,223,255,154,201, 5, 63,131,201,148,170,230,156, 87, 57, 4,193, 4,134, 98,179, 19,190,106, 25,252,180, 50,248,106,228,144,
+148,123,115,149, 13, 11,174,223,176,247,102,122,122,193, 41,148, 20, 87,149,102, 74, 37, 66, 10,119, 59,173,156,187,189,135,118,
+ 10, 70,136,159, 2,225,254, 74, 40, 21, 82, 56, 93,128,197, 46,194,106,119, 35, 45,215, 2,131, 69,133,214,125, 30,111, 16, 24,
+126,218, 22, 24,221,233,167,130,244, 83, 35,171,106,171,219,237,198,154,239, 54, 53,206,204,204,121,116,231, 79,223, 42,243,138,
+157,136, 79, 51, 33,183,200, 6, 72,130, 49, 99,246, 23,202,183,167, 76, 24,190,102,195,230,244,254,189,186,164,215,240,105,133,
+ 41, 55, 97,125,235,238, 15,127, 61,116,232,112,213,197, 19, 59,113,229,236,254,143,141, 57,158,207,191, 98,140, 9, 27, 55,110,
+116, 77,152, 48,193, 48,123,246,236,200,237,219,183,215,207,203,203, 59, 11,192,233,231,231,215,172, 73,227,232,115,123,119,239,
+170,243,240,240,199,101, 25,249, 22,248,170,229,136, 14, 81, 35,246,232, 30,167, 66, 33,171,112, 62, 73,233, 48,224,147,117, 7,
+188,141,237,177, 41, 15, 94, 44,240, 58,244,226,243,207,164,239, 61,146, 88,240,249,186,189,159,212,209, 58,207,122,137,121,159,
+159,238,216, 40,108,218,191,158,194,156, 37,235,113,248, 76, 98,174, 73, 8,255, 56,203,230,250,245,195,209,111, 85,216, 86,137,
+ 80, 82, 88,123,171,100, 48, 21,231,233,175,158,217,213,164,166,207, 87, 37,158,217,251,211,122,161,208,224,196,141,124, 43,203,
+ 44, 52,192, 45,114,248,169,229,112,137, 28, 69,133,249,236,219,245,235,112,234, 84,172, 0,137,240, 2,128, 15,171, 10, 19, 88,
+201,144,160,214, 75, 86,210, 3,164, 42,249,215,233, 22,209,180,113, 35, 44,255,124,161, 79, 80, 72, 40,122,246,246,124,206,179,
+119, 96,116,219,239, 87,127,142, 67,191,197,245, 61,252,217, 23,157,180, 17,193, 75,124,234,182,152,239, 91,127,160,213,230,112,
+ 67, 95,164,131,194,126, 3,157,235,228, 33, 64,237, 70, 90,113, 56, 46,100, 95,209, 86, 55,156,149,127,126,203,217,224, 86, 35,
+222,219,244,243,129, 57,131, 7,246,197,133,180, 98,168, 20, 82,120, 41, 36,240, 82, 72, 32, 99,110, 44,252,234,107,167, 78,111,
+ 24,154,127,225,167,124,143, 27, 92,202,148,155,176, 15, 37,223,118, 1,148, 44, 32, 89,191,228,189,181, 47,190, 53,111,240,131,
+ 35,158,101, 23, 78, 29,156, 14, 96,127,229, 9,127,112,139,119,239, 74, 69,183,137, 21,220, 86, 17,198,152, 16,210,168,227,119,
+171,215,108, 24,221, 34, 38, 18, 57, 69, 78,100,234, 28, 56, 26,151,140,181, 43,223, 43,210,229, 92, 27, 7,135,209, 40, 50,151,
+126,207,238,159,119,191,242,218, 91,104,217,170,109,189,226,140, 98, 31, 0,250,219, 30, 83,194,150, 61,253,252,196,209,161,161,
+161,222,127,244, 96,113, 52,105,218, 2, 15, 61,242, 24,246,108,219,138, 75, 23,227, 33,242,146, 66, 73, 20, 57,138,116, 5,217,
+ 46,167,125, 77,101,237, 83,120,121, 69,175, 90,189, 46, 70, 16, 24, 28, 78, 17,118,151,136, 41,147,199,219, 39,189, 62,189,231,
+ 67,131,250, 92, 84, 72, 80,156,118, 61,203, 47, 54,238,114,107, 81,166,141,124,126,234, 66,185,213,230,134,222,236,196,206,111,
+ 42,175,113, 84, 1,209,221,218,118, 31,254,252,164,247,151, 43,149, 18,193,209,178, 73,100, 74,159,174, 45,111, 68, 69, 4, 25,
+254, 51,247,139,206,199, 78,196, 61,244,196,216,231,189,158,105,214,129, 69, 4,170,188,199,143, 29,209, 70, 19, 24,245,180,169,
+224,122,165,167, 54,147,169,253,139,162,234, 55,190, 53,148,168, 14,107,186,133,113, 52, 40,191, 13,103, 72, 49,103, 39,142, 4,
+128,240,136, 40,171, 76,233, 83,229,148,128,219,238, 91,250, 58, 94,178, 98, 67,199,115, 73,153, 47, 46, 90,244,153,250,204, 53,
+ 3,206, 94,211, 67, 41, 23,224,112,138, 96, 30,118, 98,139, 92, 50,241,221,119,166,249,232, 76,110, 28,138,207,195,197,211, 7,
+185,221,104, 29,171,118,249,140,212,132, 54,125, 26, 64, 35, 0,201,140,241,101,166,156,176,109,156, 31,170, 81,143, 45, 80,210,
+203, 6,148,204,233,117, 75,149, 15,201, 20,154,110,140,241,150,140,195, 31,224, 55, 11, 74,255,166, 86,185,207,229,126, 54,229,
+ 36, 97,222,236, 15,176,120,229, 86,100, 22, 88,225,235,190,129,109,223,124,132, 55,230,124, 7,139,173,242,217, 11,213,213, 35,
+ 21, 21, 68,119, 22, 90,101, 63,151,109, 55,103,206,156,161,183,181,179,244,247,119,181,255,142,219,203,223,127,238,220,185,179,
+203,253,190,210, 33,232,242,164,165, 33,172,186,157,242, 9,110,209, 80,238,163, 85,250,168,100,168, 31, 21,142, 49, 47,125, 24,
+ 20, 22,211, 35, 87,169,144, 74,126,218,176, 60, 32,223,162, 4, 19, 4,147, 39, 15, 10,148, 76,210,243,246,246,222,185,101,243,
+ 86, 52,140, 10,145,127,123,180, 48, 53, 46,197,114,171, 75,183, 56, 47, 93, 81,223,199, 44, 29, 57, 98,132,122,255,129,131,175,
+163,146, 2, 75,194, 36,117, 87,172,219, 28,226,173,146,129, 49,192, 96,113,225,197,167, 31,243,180, 25,149,227,162,228,185,103,
+159, 6, 43, 45,174,138, 11,178, 49,253,173,151,172, 26,231,149, 75,215,211,174,223, 28, 48,236,141,253,197, 70,102, 29,253,212,
+228, 83,151,146,230, 84, 91,201, 66,116,102, 60,244,240, 67,242,146,158, 2, 64,194, 24, 68, 46,230, 52,173,175,253,215, 93,195,
+130,217,182, 21,213, 21,108,134,155,137,133,222,225,173, 71,173, 95,240,202,138,136,208,144, 64,173, 70,197,181,106, 37,107,217,
+ 44, 70,222,181,107,119, 69,253,166,109,228, 71, 47, 91,112, 61,207,130,148, 76, 61,148,161,237,164, 99, 30, 24,130,245,159, 77,
+237,203, 24, 19,170,155,248,250,235,161,223,135,173,252,106,145, 50,167,200,129,132,235, 70,100,235,172,200,210,217,144, 93,104,
+133, 86, 37, 67,239, 71, 38, 40,127,217,182,108, 88,255, 94, 93,150,212,240,153, 5, 0,164,164,164,254,146,118, 51,235,241, 54,
+237, 59, 99,253,218,213,189,252,253, 27,248,232,116, 41, 21,118,233, 87,128,127,244,209, 71,138,185,115,231, 74, 63,255,252,243,
+226,174, 93,187,134,189,243,206, 59,131,115,115,115, 79,214,171, 87,175,233,158, 45,107, 14,180,235,253,104, 39,136,142,224, 94,
+125,250,201,149,162, 20,123,119,236,112,252,248,195,183, 5, 22,139, 97, 82, 85,193,130,218,247,163, 28, 35, 67,112,157, 58, 23,
+181, 10,247, 64,169, 80,148, 84,184,235, 95,235, 0,108,105, 52,228,213,125, 7, 79, 39, 38,117, 60,147, 22,114,224,204,213,220,
+ 66,179,163, 73,242,174,127, 87,249,129, 43, 97, 12, 82,137, 0,111,149, 20, 66,233,167,169,119,157,182, 87,193, 88, 48, 80,242,
+218, 98, 96,165,255, 2,140, 33,179, 48, 61,206,131, 57, 25,140,139, 28, 72,204, 48,193,104, 45,233,130,175, 27,164, 70, 94, 78,
+ 6,190, 92,178, 6,113,167, 79, 97,208,144, 71,176,116,197,183,120,241,233,199,173,213,165, 9, 66,105, 15, 86,185,222, 43,173,
+ 74, 10,128,161,200,228,196,230, 99, 55,208,168,129,224,241, 31, 4, 0,240,214,170,161, 55, 88, 32,200,189,145,124,102,167,122,
+215,193, 19,239,188, 55,107,209,155,186,172,248,235, 87,207, 31, 69,211, 32, 61, 26,212,113,224, 98,182, 15, 78, 23,212, 71,211,
+198, 13, 33,200, 79,121,148,157,127,177,245,188,109,194,230,161, 29,219,181,232, 22, 29,226, 7,139,221, 93,218,139, 37,193,234,
+ 85,235,144,150,154,241,124,254,197,159,226, 60,111,109,229,140, 57,215,242,188, 66, 99, 94, 62,127, 98,127,202,136,177, 47, 35,
+188, 78, 84,133,195,204, 21,169,168,112,170,232,182,138,138,174, 59, 49,198,132,128,122,237,214,174, 93,191,113,116,131,168, 48,
+252,122, 34, 21, 39,147, 10, 16, 20, 20, 8,137, 58, 12, 49,125,198,251,157,223,189,248, 49, 75,190,113,173, 76,174,126,161, 75,
+215, 30,224,156, 35,241,242,197, 66,189,222,247,174,207,102,115,102,194, 89, 0, 62,229,111, 83, 7, 55,111,171,245, 13, 56,107,
+115,184,113,243,102, 6,142,255,118,168,125,233,118, 30, 83,202, 37,216, 27,151, 11,135, 83,132,195, 37,162,119,159,129,118,185,
+ 96,235,245,241,162, 85, 93,179, 50,179, 4,141, 79,144, 24, 80,167,185, 60, 92,233,176,157,187,166,151, 59,156, 34, 26, 70,104,
+170,204, 12,142,104, 60,123,234,212, 41,205, 37,114, 21, 12, 38,155, 61, 43,243,102,216,242, 13, 7,141,151, 19,206,215,169, 27,
+226,235,243,201,103,160,118,160, 3, 0, 0, 32, 0, 73, 68, 65, 84,203,228,197, 86,134, 92,189, 13,133,134, 98, 54,118,226, 91,
+ 17, 43,191,152, 51, 14,128,199,231,142,101, 28, 13,126,217,123,180,153,191,183,156, 25,173, 46,177,160,216,225, 30, 59,252,207,
+ 45,162, 44, 45,174, 38, 44, 90,248,153, 58,238,154, 1,231,174,233,225, 37,151, 64, 33, 23, 96,119,138,240,228,237,196, 24, 19,
+ 26,180,234, 51,169,123,199,214,216,115, 54, 31, 18,137, 0,139, 65,103,150,162, 32,169, 99,223, 65,234, 14,157,187,162, 95,223,
+ 62,184,154,148, 24,181, 99,251,230,254,177,199, 15,103,107, 67,154,190, 98,204, 77,220, 90,147,182, 26,205,102,137, 83, 17, 54,
+ 62,188, 78,189, 30, 35,199,140,247,141,142,170,195, 66,130, 2,225,226, 82, 76,120,250, 49,143,223,249, 37, 5, 57, 48,119,214,
+ 59,176,217,236, 8,246, 83,128,115, 96,213,146, 15, 97,183,219, 17, 17,168,132,222,228,172,244,254,213,213, 35,149,245, 58,213,
+ 68,249, 34,172,170,219, 25, 99, 59,166, 77,155, 54, 29, 0,159, 54,109,218,244,178,235,115,230,204,177, 0,200,172,238,113,254,
+152,204, 88,201,176, 32, 0,120, 71,196, 52,241, 15,137, 56,246,227,218, 47,252,117, 70, 7,188,228, 18,212,141,140,198,219,255,
+ 89, 28, 60,164, 99, 16,242,172,106,108,220,180,186,208,110, 53,255,224,201,206,169,195, 98, 58,122,107,124,246,172, 93,255,131,
+ 24, 20, 24, 40,124,185, 55,239, 90,129,193,117,107,232, 42,233,196,118,241,244,158,229,225, 28,108,183,151,151, 87, 99,187,221,
+238, 95, 85,158,200,129, 85,123,211, 75, 39,231,254,185,121, 45,101,152, 68,226,254,246,219,245, 8,244, 81,192,230, 20, 49,237,
+205,215, 44,207, 12,210, 22,141,125, 98,204, 3,253, 30,122,245,128, 76, 19,179,191,123,251, 24,222,174, 93,187, 34,137, 68, 82,
+109, 94, 65,202,201,187, 86, 75, 52,171,175,126,225,221,183,158,121,183,130, 97, 65,143, 38,228, 26,178,206, 31, 3,112, 91,143,
+ 8,107,212, 72,241,221,198,109,175,141,122, 98,244,123,117,218, 14,215,166,102,233, 33,103, 14,116,106, 30,142,131,187,183,242,
+140,180,164, 41,158,172, 42,202,205, 43,140, 12, 14, 14, 69, 92,138, 17, 55, 11, 44,200, 46, 45,174,178,116, 54, 24, 44, 6,180,
+137,142, 64,145, 94, 31,233, 73, 59, 43,194,128,173,123,246,236,121,252,161, 71, 71,227,213, 55,103,246,252,230,171,249,241,218,
+176, 38,207, 25,179,147, 14, 85,119,223,210,119, 94,225,219,111,191,221,104,197,138, 21,194,184,113,227, 44,173, 91,183,246,122,
+234,169,167,122,174, 91,183,206, 75,173,246,178,156, 59,186,253,189, 23,254, 53,237,209,229,139, 63,106,171,211,233,152,203,233,
+220,229,208,233,166, 25,170, 41,226,174,111,123, 39,129,181,152,249,236,192, 94,193,219, 3,212, 66, 75, 37,183,143, 97, 45,102,
+254,192, 47,205,112, 36,239, 90, 98,104,253,196,194,127,101, 22,137,239, 90,133,144,143,171, 43,174, 0, 64,144, 48,216,157, 34,
+188, 85, 50, 8, 66,105,143, 37, 23,195, 87,255,176, 75, 29,236,171,128, 76, 34, 64, 42, 41,233,221,204, 47,118,224,229,241,158,
+ 30,233,131,139, 46, 55,135,197,238,130,185,244,219,160,161, 56, 31,239,188,249,111, 12, 25, 54, 2, 47, 76,250, 55,116, 22,224,
+116,138, 1, 14,167,179,218, 55,133,192, 4,152,109, 46, 60, 55, 40, 26,133, 70, 7, 76, 22, 23,236, 46, 17,106,133, 20, 50,169,
+ 0,141,151, 20, 62,106, 25,192,185,156, 49, 54, 1, 0,100, 50,153,213,225,112,172,175,180,133,156,163,126,100, 40, 44, 78, 1,
+157, 71,207,199,128,110, 77,112,241,216,102,233,225,223,207, 55,120,253,205,119,241,218,139,195,176, 41,161, 17, 2, 66,162,161,
+213,168,224,228, 2, 0,238,209,132, 60,206,103,136,225,205, 70, 62,249,245,138, 85,137,255,249, 96,154, 87,145,137, 65, 41,151,
+224,192,254,125,136, 61,113,122,113,222,197,159, 42,109,215,189,144,113, 33,212,199,199, 7, 94, 10, 9,236, 14,155,221,211,251,
+185, 69, 14, 14,180,215,134, 54,253, 26, 40,153,111,229, 22, 81,193,109, 85, 23, 88,140, 49,230, 27,209,106,245,215, 43,191, 29,
+ 23, 17, 22,130,173,251,227,177,122,197,231,104,208,110, 40,142,253,178, 26,190,245,187, 66, 19,213, 19, 10,239,141, 19, 4,137,
+180,245, 43,175, 79, 31,217,161, 83, 55, 28, 63,122, 0,185,217, 89, 95,115,158,224, 81,143,134, 68,198, 94,125, 96,224, 48, 88,
+237,110,244,234, 63, 20,187,127,222,250, 47,148, 46,158,240,212,157, 69,184, 8,193,245,239, 41,175,202,114,245,118, 89,190,222,
+142, 27,249, 22,164,101,155,240,211,247,223,120, 60, 36,197, 96,239,212,187, 77, 93,217,132,121, 7,110, 68,214, 13,183,201,108,
+ 22, 85, 82,242,181,102, 47,140,127, 70,214,160,113, 51, 33, 87,111, 67,158,222,134,124,189, 13, 70,171, 11,141,235,198, 8, 78,
+ 23,235, 86,147,118, 3, 64,144,175, 66,182,244,231, 20,248,104,100,232,222,236,222, 23,206,138,162,248, 71,113,181,168,164,184,
+138, 79,209, 67, 41,151, 64, 41, 23,160,148, 75,224,114,115,143,190,176,168, 66,154, 60,244,242, 43,147, 35,236, 46,160, 64,111,
+135, 84,194, 16, 18,228,175,233,212,246, 73,172,154,255, 47, 0,192,139,111,127,137, 23,158,123, 10,205, 91,182, 70,145, 78, 23,
+246,228,168,135, 22, 1,240,168,192, 18, 69, 17, 59,247, 30,138,218,123, 36,238,237,151,167,206,208, 62, 49,172,159,228,236, 53,
+ 61,178, 10,109, 72, 78, 50,212,168,167, 13, 0, 92,110, 17, 28, 28,107,126,216, 1,149, 66,138, 60,189, 3,156,115,124,244,249,
+143,240, 86,201,144,165, 43, 25,214,175, 74, 85,245, 72,233,239, 43,236,129,242, 84,233,253,243,240,199, 60,173, 10,115,203,247,
+ 96,205,153, 51,231,226,156, 57,115, 42,236, 17,171, 76,181, 19,236,188, 35, 98,154,248,249,135, 31,223,254,195,138,128,173,113,
+118,252,190,241, 52, 30,238, 18, 14,185, 84,128,218, 55, 24,231, 82, 76,216,179,123, 67,209,206,237,155,110, 22,202,204, 21,246,
+ 50,149,167, 14,111,218, 94,163,242,217,183,116,249, 90, 87, 80, 72, 8,214, 31, 45,204,208,153, 92,183,202, 89,183,219,201, 78,
+239, 89,222,192, 37, 58, 31,180,100, 95,169,246,235,172,200, 33,159,243,213, 54, 0, 28,162, 40,130,139, 34,100, 94, 90, 77,112,
+163,110, 57, 0,224, 22,185,151, 84, 96, 37,223,224, 75, 95, 37, 92,116,101,228, 93,171,186,187,147, 1,240, 81,203,240,195,225,
+155, 0,144, 35, 49,156,185, 60,246,137,146, 97, 65,171,221,171,184,101,163, 70,188, 83,167, 78, 69, 42, 85,133,139, 69, 60, 82,
+211, 97, 65, 79,240,228,100, 59,128,121, 17, 77,123,141, 24,172,109,211, 89, 33,200,209,161,105, 56, 14,238,249,137,255,190,123,
+213,139,230,156,196,181, 30,229,112, 14,163,213,137,204, 2, 43,110, 22, 88,145,173,179, 34,187,208,134,108,157, 21,140, 49, 88,
+237, 53,238,129,190,141, 41, 55,113,227,250,181, 43, 31,177, 57, 48,166,247,160, 17,248,247,140,165,209,235,191,158,187, 79, 21,
+218,172,135, 39, 19,104, 57,231,110,198, 88,218,248,241,227,219,110,216,176, 65,210,170, 85, 43,203,229,203,151,213, 0, 68, 0,
+ 14,173, 86,173,250,230,139, 57,123, 58,119,238,252,253,205,164,132, 3, 0,116,158,172,164,170,215,119,188,178,153, 79,225,132,
+ 40, 77,247,193, 13,195,212,136,210, 24, 6, 55,211,158,251, 52,164,255,235,179,115,247,127,150,155,101,115,253,154,103,145,180,
+187,105,148,121, 52, 23,208,105,179,166,143, 28, 53, 26, 18, 38,192, 97, 53,167, 3, 0, 88,201,132,242, 15,191, 77,128,214, 75,
+ 6,111,149, 20, 90,149, 12, 61, 91, 4,120,244,141,182,236, 41,112,186, 69,152,109,110, 88,108, 46, 88,237, 46, 4, 69,250, 99,
+197,250,141,184,158,107,193,182, 83,249, 72, 76, 55, 32,166,174, 6,156, 87,255,241, 40,186,157,166, 97,143,141,243,150, 8, 12,
+ 18,129, 9, 45,154, 53, 65,161,209, 1,185, 84,128,220, 75, 5,141, 82, 10, 31,149, 12,114,185, 12,185,185,185,176,217,108,136,
+138,138,242,170,178,129, 34,135,183, 86,133,152, 6, 17,112, 56, 93,216,121,228, 18, 62,158, 50, 18, 3,123,119, 4,147,105,145,
+ 96,107, 15,239, 0,111,136,130, 0,135, 75,132,221,225, 6, 32, 84,218,219, 22, 21, 21,245,128, 70,163,209,152,205,102, 67,122,
+122,250,161,172,132, 45,215, 67, 90, 14,159,176,123,239,129,245, 67,135, 12, 68, 92,252, 69,108,218,186,253,104,126,160,126,106,
+217,125, 90,181,106,213, 53, 40, 40, 72, 91, 80, 80, 80,124,254,252,249,147,158, 63,189,127, 96,140, 49, 77,104,179,215,187,245,
+236, 11, 99, 81, 46,114,110,164,122,252,173,185,121,180, 55,222,159,179,180, 67,211, 38, 77, 59,184,121, 73,193,213, 34,202, 27,
+111,204, 88,210,161, 81, 76,147, 14,101, 11, 61,154, 71, 85,125, 88, 53, 77,104,211,201, 31, 47,252,234,233,168,200, 72,236, 58,
+158,128, 57,239, 78,138,211,168,189,235,215, 13,245,247,147,183,236,136,179,103,127, 67, 8, 20,240, 9,141,169, 59,230,145,137,
+117, 7, 15,121, 4,231,207,157,198,103,243,102,197,154, 36,170,217,158,180, 85, 27,218, 48,184, 93,167,222, 99,189, 3, 66, 81,
+164, 55,192,219, 63, 4,205,219,116, 26,171, 13,109,248,118,233,201,234,239,137,200, 57,108, 14, 14,157,193,129,235,121, 37,197,
+ 85,106,142, 25,162, 88,131, 57, 63,110,145,105,189,164,210, 0,231,213,168,243,251, 14,240,232,200, 80, 54,111,214,155, 18, 7,
+188,144, 87, 84, 82, 92,229, 21,219,145,167,183,195,104,117, 34, 64, 35,133,232,174,124,165, 95,101,116, 70, 7,188, 75,231,201,
+122,210,171, 88,153,175, 86,255,208,244, 92, 82,230,240,133, 11, 63, 83,159, 77, 41, 87, 92,201, 74,122,175,148,114, 9,220,162,
+ 8,120,240,142,151, 73,101,175, 62,250,208, 0,220,200,183,148,174, 68,102,136,105,221, 25, 65, 42, 17,253, 71, 79, 3, 0, 12,
+123,168,100,158,113, 74,150, 9, 63,255,158, 7,220, 62, 97,187, 74, 38,139, 69,178,252,219, 95, 94,223,248,227,247,190, 86,183,
+ 20,203,118,165,193,108,115,193, 75, 46,129, 82, 46,129, 74, 46,185,109, 74, 80,117, 92,238,146, 57,117,215,243,157, 48, 91,173,
+ 40,182, 56,193, 1,156,188,106,132,197,238,130,222,228, 68,215,102, 85,246,153,120,226, 23, 0, 15,151, 93, 41,223,155, 85, 73,
+ 15, 84, 69, 78,149,207, 40,219,254,206,140, 59,127, 87,154,231,209, 23, 65,233,157,149, 98,249,235,222, 17, 49, 77,252,252,194,
+143,111,255,126, 69,192,150, 56, 27, 14,158, 43,192,168, 94,117, 97,214,103, 99,238,156,183, 10, 25,184, 93,144, 8, 69, 54,171,
+101, 75,129,218,241, 49,191,148,236,184,251, 33,254,160, 9,110,209, 70,165, 86, 31,248,228,179,101,142,144,208, 58,226,150,223,
+139,114,245,102,247,109,125,133,110,155, 77,224, 34,151,123, 82, 92, 1,128, 32, 48,199,140,127,141,128,200, 57, 62,252,108, 35,
+102, 79, 29, 13,173,106,156,154, 49,166, 54, 89, 93,152, 50,115, 37, 22,188,255,188,183, 90, 41, 5, 99,128,213,238,198,211, 99,
+ 70,120, 18, 13,147,213,133,228, 19, 27,140,134,148, 29,151,203, 15, 11,118,233, 57,228,116,151, 46, 93,138,252,253,253,161, 82,
+169,254,232,153,240, 64,101,171, 5,115,139,144,225,237,237,221,199,199,199,167,124,158,169,168,168,232, 39,143,195,203, 49, 20,
+229, 31,200, 78, 59,223,185, 71,191, 97, 56,180,231, 39,254,251,174,111, 94,172,201, 49,118,252, 3,252,111,156, 57,159,220,156,
+177,128,146, 30,172,210,226,202,238, 20, 17, 29,170,198,141,180,100,248,249,250, 86,187, 58,173,140, 58,164,217,163, 76,224,147,
+ 24,248, 42, 99,118,210,198,210, 98,231, 73, 77, 88,179,248,139, 23,206,126, 60,116,236,171,210, 65,163, 38, 75,190,158,243,202,
+116,220, 49, 57,181, 10,142,196,196,196, 75,207, 63,255,124,247,216,216, 88, 55, 0, 51, 99,204, 41,145, 72,212,118,187, 93,222,
+175, 95, 63,125, 66, 66,194, 97,120, 48, 25,177,215,115,155,130,152,210, 48,164, 81, 76,167, 39,163,189, 13, 3,251,245,234,134,
+110, 45, 35,113,163, 87, 55, 0,120, 53,221,168,109,218,243,165,111,126,104, 16, 92,119,231,215,171,127,158,253,226,232, 1, 83,
+ 34,134,205, 92,152,249,243,140, 42, 39,152, 94,191,116,168,130, 99,130,148, 13, 27,202,160, 85, 73,225,173,146,193,219, 75, 6,
+167,203,179,111,180,165,184,211, 37,150,244, 96,217, 93, 48, 90, 92, 56,112, 54, 7,217,122, 59,138, 12, 14, 88, 28,110,112,240,
+146,111,159, 30,124,138,231, 94, 57,230, 87,246,179,127,116, 7,253,242,207,231,251,108, 62,150,113,107,133,158,175, 90, 1,111,
+117,201,170,234, 35, 71,142, 32, 48,176,250,111,247,162, 40, 98,211,238,147, 88,184,230, 0,118,175,122, 11, 94,114, 9,218, 60,
+ 58, 19,207, 14,239, 2,145,139, 72, 78,188,152, 19,211,162,109,168, 32,168, 32, 48, 6,155, 83, 4,192, 43,125, 62,237,118,123,
+224,245,235,215,139, 27, 55,110, 28, 86,167, 78,157, 81, 18,137,132, 43, 1,219, 79,223, 23,154,247,239,248, 78,109,178,216,220,
+106,151,126, 85,227, 44,203,195, 49, 49, 49, 96,140,241,160,160, 32,249,129, 3, 7,140,173, 91,183, 14,174, 44,183, 42,140, 49,
+ 65, 21,210,100,241, 11, 47,189, 62,170, 81,195,134,216,248,221, 42,112,206, 54,123,122,255,111,127,142,197,172,119,110, 95, 49,
+248,198,140, 37, 29, 22,204,124,245,182,219, 94,122,103, 97,165,171, 8, 25, 99,172,110,171, 7,222,106,214,172, 5, 98, 47,102,
+ 96,222,123, 47,197, 89,115, 83,158,180,107, 3, 39, 58,140, 89,255,110,215,190, 35,194, 2,125,144, 89,104,195, 35,227,134,163,
+ 71,207, 94, 56,127,238, 52,102,189,255,102, 44,204,246, 65, 60,239, 82,181,147,160, 1, 64,228,178, 73,253, 6, 15,151, 89,108,
+ 14, 44,153,247, 1, 38, 78,253, 24, 93, 31, 24, 38,187,112,246,247, 73, 0,254,227,233, 62,219, 28,110,244,107, 29, 84, 82, 52,
+ 59, 69,108, 79,145, 72, 43,122, 5, 74, 37, 76,104,215,208, 15, 22,187, 11,197,230,202,135,140, 0, 64, 42,151,101, 23,233,139,
+235,125, 49,251,117,137,201,234, 66,158,222,142, 92,189, 13,249, 69,127, 20, 86,249,122, 27,242,244,118,200,164, 12, 73,215,210,
+ 33,200,164, 53,158,127,167, 51, 58,209,185,137, 63,128,146, 66,230, 94, 56,165, 62, 93,118, 31, 62, 55,114,225,194, 69, 94,231,
+ 82, 13,136, 79, 41, 46,237,185,146, 64, 41, 19,160, 40,253,217, 45, 2,213, 61,132,111, 72,163, 6,207, 60,255, 98,127, 31,173,
+ 10,153, 87,114, 33,149, 48, 72, 36, 12,190, 33,145,240, 85, 90,241,202, 75, 19, 16, 20,232,135,235,249, 54, 44,222,154,132,248,
+ 75, 87, 33, 90,106,182,219, 75,150,125,255,224, 11, 47,191,225, 39,200, 20, 88,183, 39,181,164,157, 18, 55, 18,126,255,217,154,
+153,124,222,100, 44, 46,224,224,110, 15,191,248, 51,238,114,151, 20,166,179, 63,156,134,239,215,124,137, 61,103,114,111, 77,206,
+ 58,182,121, 1, 94,127,231, 35,228, 23,219,129, 10, 38,213, 87, 85,143,160,164, 3,162,172,231,233,174,235,229,138,162,138,174,
+179,210,235,246, 74, 50,236,119, 20, 85,246, 59,110,183,223,145,231,209,177,251, 42,237,193,242,142,136,105,226,235, 31,118,124,
+219, 15,203, 3,182,156,177,227, 80,124, 73,113,229,178, 21,225,171,121,239,100,153,139,138,123, 87,117,192,198, 59,105, 66,154,
+180, 82,106, 52,135,223,251,104,177, 45,180, 78, 61,215,206,179,197, 5, 6,171,251,174,110, 16,185, 90,227,214,248, 6, 91,253,
+162,219, 47,148, 89,236, 31,228,229, 93,170,114, 94, 23, 67,201, 55,164, 29, 39,178,193,121,201, 87,162, 31,143,220, 68,233, 55,
+113,184,197,146,225,147, 95,207,230, 66, 90, 58,207,196, 19,140, 1, 95, 45,251,178,248,225,214,122,211,216,217, 31,222, 26, 22,
+236,218,182,164,231,202,199,199, 7,126,126,126,208,106,181,240,100,136,176, 76,101,171, 5,189,189,189,251,156, 61,123,214,203,
+199,199, 7, 18,137, 4, 54,155, 13, 45, 91,182,244, 56,183, 60,109, 88,179,151, 59, 63, 48, 98,122,207, 7,134,225,192,238, 45,
+252,247,221,171, 39,212,244, 0,134, 15, 15,232,254,243,172, 89, 31, 54,120,239,227, 47,148,222, 94, 82, 92, 54,218, 33, 48,134,
+232, 80, 53, 2, 53, 2, 14,253,180,206, 58,122, 88,119,143, 15,106, 23, 25, 89,103,253,130,207,151,107, 22,204,157,217,207,187,
+ 78,211, 3,134,155,137,133, 0, 96,202, 78,152,167, 14,107,118,169,238,111,123,119,182,237, 51, 2,161, 17, 13, 7,122,154, 89,
+ 58, 84,104,190,118,237, 90,202,123,239,189,215,116,238,220,185, 92, 34,145,136, 0,148,159,125,246,153,249,202,149, 43,103, 81,
+178,196, 22,213,245, 94,245, 31,216,114,138, 86,225,238, 26,160, 22, 90, 54, 12, 83,163, 91,203,146,209,207,209, 15,247, 68,100,
+ 84, 20,174,101,155,219, 21,154, 69,153,209, 46,105,184,116, 89,252,169,250, 65,146, 23, 93, 22,251, 37, 84,115, 16,216,138, 48,
+252, 49,241,189,172,247,202, 91, 37,131, 8,212,228,155, 34,119,186, 68,216, 28,110, 88,108,110, 88,236, 46,152,236,110,152,237,
+110,136,188,228, 61,193, 24,131,195, 37,150, 61,164,231,237, 99,128, 79, 64, 16, 26,214, 47, 89,245,234,173, 42, 57,100,131,143,
+ 90, 86,178,214, 57, 48, 16, 33, 33, 33,213, 55,144,115,216, 29, 37,111,113,187, 83,188, 53,124,111,119,184,192, 57, 71, 82, 82,
+226, 91,105, 41, 41,143, 54,142,105,220,187, 69,155,182, 1,106,165, 0, 0,149, 22, 3,102,179,217,237,237,237, 29, 18, 16, 16,
+ 32,220,188,121,243, 86,209,220,184, 93, 63,215,214, 45,155, 49,114,228, 8,227,229,147,231,110, 45, 85,183, 88, 44,172, 71,143,
+ 30, 62,145,145,145,130,205,102,243,116,126, 95,233,115,192,152, 38,184,201,240,200,102,221, 63,126,122,252,196, 38,253, 6, 60,
+136,131,251,247, 98,219,150, 13,107, 77,185,137, 85, 30,175,171,188,166, 77,155,221,181,138,176, 81, 76,147,187, 86, 17,214,107,
+ 16, 83,105,129,229,235,219,198,167, 77,167,190,145,105,249, 14,236,218,181, 19, 38,125,246,251,118,187,209, 12, 25, 95,185, 99,
+195,210,231, 95,120,125,166, 79,223, 62,189,224,239,163,134, 84, 42,193,153, 83,177,152,251,159,233,177, 48,219, 7, 85,247,249,
+121,107,127, 91,180,144, 55,142,170,247, 90, 84,163, 86, 56,243,251, 81, 36, 39, 93,184,120,238, 84,108,203,198,173,187, 34, 56,
+ 34,250, 53,214,162,197, 92,126,233, 82,149, 95,160, 1,192,110,181,166, 63,251,204, 83, 40,191,138,176, 91,251,166,129,183,189,
+ 0, 75,175,152, 13,185,142,111,230, 79,185, 82,182,138, 80,116,216,211, 43,203,213,235,242, 54, 29, 58,126, 98,234,163, 15, 63,
+ 40,228, 23,219, 75,122,172,244,246,210,139, 13,249,101, 63, 23,219, 16, 19,161, 69,226,197, 51,162, 85,159,239,113, 33, 92,218,
+ 44,235,179,143, 15,190, 4,252, 49,169,159, 1,213,206, 95,188, 19,151,249, 76,152,247,233, 66,175,115, 41, 70,196,167, 22,151,
+ 12, 9,202, 36, 37,133,149, 76,184, 85,108,149,172, 78,175,154,139, 73,102, 63,247,204, 24,228, 23, 59, 32,138,128, 84, 34,148,
+ 94,228,184,110, 96,184, 97, 48, 35, 95,151,135,148,180,116, 20,101, 39, 67, 16, 4, 4, 69, 52,129,167,221,141,110,174, 8, 55,
+219,121,235, 81, 15,247,150,110,249, 45, 11,106,165, 20, 54, 67, 14,118,253, 48, 63,207,102, 44,254,216, 98, 54,110,177, 20, 92,
+169,118,174, 81, 25,129,177,188, 98,163, 53, 84, 41,147, 96,227,154, 47,240,248,179, 47,149, 62, 41, 37,255,188,245,238, 44, 64,
+ 96, 40,212, 25,192, 24,171,105,175,232,157,157, 46,158, 77,216,172, 89,102,173,170,180,192, 82,171, 3,247,109,251,126,121,192,
+111, 41, 2, 78, 38,234, 48,170, 87, 93, 56,173, 58, 44,254,232,223,217,197,197,185, 15, 24,242,174,120, 92, 92, 1, 0, 4, 97,
+240,232,231,166, 94,108,216,164,133,237,224, 5, 99,106,145,201, 89,233, 60,134,110,163,222,187,120,250,151,207, 31,210, 59,175,
+ 77,214, 70,180,116,139, 46,215, 60,115,110,226,204,138,182, 21, 57, 20, 51, 23,111,188, 53, 60,248,246,220,117, 37, 63,187,221,
+112,115, 17, 92, 4, 94,121,255, 43,184, 68, 55, 68,183, 27,162,155,195,233,230,234,234,154, 27, 18, 81,111,139, 46,225,199,102,
+ 99,255,115,247,176,160,159,159, 31, 2, 3, 3, 17, 24, 24,136,178,130,200, 83,149, 13, 11,250,248,248, 64,171,213,226,232,209,
+163, 80,169, 84,208,104, 52, 53,202, 45,163, 13,107, 54,185, 83,223, 71,191,120,224,145,231,241,235,150,101,252,212,145,159, 39,
+154,115, 18, 87,122,122,127,183,219,205,156, 78, 39, 30, 30,212, 55, 61,238,226,213,221,239, 78,157,244, 96,247,161, 19,149,221,
+154,214,129,213,238, 70, 70, 90, 50, 14,253,180,218,218,164, 65,248,158,254,189,186,164, 59,157, 78,184,221,238,106,255,128, 91,
+237,142,124,137, 76,165, 25, 51,102,172,236,212,201,147,155,181, 33, 77, 54,186,153,112,142,113,177, 13, 99,108,100,155, 54,205,
+225,112,138, 48,155,139,171, 95, 48,112, 7,131,193,144,178,106,213,170, 6,207, 60,243,140,186, 69,139, 22,178,228,228,100, 44,
+ 88,176,160,192, 96, 48, 84,123,220,175, 50,123,143, 36,126, 38,101,186, 43, 10,209,241,100,180,183, 97,224,245,158,221, 48,102,
+104, 79,124,255,203, 49, 28, 58, 26,139,116,163,246,172,209, 37,253,233, 70,122,166,173,101, 64,241,230, 71,186,213,147,108, 92,
+163,219, 28,210,239,157, 39, 56, 87,238,205, 59, 52,195,227, 5, 30, 37,139, 49,156,240, 81,151, 28,175,169,172, 39, 75,194,152,
+199,149, 16, 3, 82,142,198,158,105,213, 49,166, 5,226, 82,244,200, 45,178,193, 98,115, 65, 20, 57, 68,112, 4,122, 43,224, 37,
+ 23,112, 61, 45, 5, 34,119,164,122,218,182, 18, 60,175, 79,239, 62, 82,128,129, 49, 46,149, 73,165,224, 40, 57, 46,162, 74,165,
+ 50,134,132,132,120,212,131,229,112,185, 48,242,193, 46,232,218,169, 13, 30,157, 56, 31, 0,176,127,237, 52,248,107,101,248,126,
+253, 74, 92, 63,188,104,125,195,238, 47,237,189,112,254,226, 99, 23,227,126, 27, 59,164,131,170, 93,152, 52, 83, 94, 89,158,209,
+104,220,204, 24, 83,200,229,242, 7,123,247,238, 29,176,121,243,230,162,160,160, 32, 81, 33,151,231, 61, 50,108,168, 40,147,203,
+ 11,203,182, 61,126,252,184,108,226,196,137,222, 58,157,238,122, 78, 78, 78, 44,231,188,202, 46, 18, 77, 72,179, 1, 16,176, 1,
+140,121,105, 85,234,244,110, 3,198, 68,116,234,218,197,119,248,200,199,161, 84, 40,241,235,222,221, 88,178,104,238,143,198,172,
+203,207,121,252, 52,162,118, 86, 17,234,245,190,166, 43,151,206,233, 82,115,237,254, 50,191, 24,200,148,222, 19,153,111,196, 98,
+137, 82, 59, 35,184,237,112,159, 77,219,119,226,252,133, 11, 8, 80, 57,113, 45,249,138,249,194,217,184, 47,205, 76, 54,147,231,
+ 93,242,104,165, 19, 0,168, 11,220,143,117,123,234, 65,127,155,195,141, 35, 7,126,177,138, 46,241,193,216,195, 59,147,235, 54,
+233,228,213,170, 83,127,255,252,109, 43, 71, 2,248,190,186,156,140,203,119,247,216, 70, 53,237,156,186,255,192, 62,223,208,232,
+150, 18, 6, 6,135,205,138,188,107,167, 92,230,156,132, 98,125,198,121,143, 86,213, 22,220,192,251,239,204,248,100,114,167,142,
+ 29, 53, 28, 94,183,245, 88,149, 21, 86,249,197,118, 4,121, 43, 96, 41,206,195,149, 83,187,173,230, 60, 73,149,199, 43,115,217,
+ 77,234,252,220,156, 91, 67,105,198,156,196,174, 85,109,159,159,155,163,112,217, 77,213,254,237, 16, 4, 9,124, 52, 10,156, 79,
+189,121,107, 66,187, 82, 86, 50,247, 74, 33,147,220,154,135, 5,220, 61, 95,173, 2,125,229, 94,126,184, 89, 96, 5, 3,135,232,
+118,193,229,180,195, 80, 92,140,155,153,217,200,201,206,129,193, 80, 4,181,214, 31,173,218,117,134,183,198, 11,231, 14,253, 8,
+206,185, 71,199, 37,116, 50, 89,211, 78, 93,123, 41, 47,164,149,204,181,242,146,113,252,188, 97,110,129,177, 56,183,151, 33, 51,
+233,138, 39, 25,229,185,220,238,125,241,151,174,180,172, 27, 94,159,157, 77,214, 99,253,138,207, 97, 47,237,201,116, 58,221,184,
+112,221,132,172, 66, 51,174, 95,187,204, 69,183,187, 70,135, 92,250, 59,170,180,192,146, 43,100, 42,159,128, 8,204,122,114, 28,
+190,252,242, 43,164,222,184,137, 37,179,166,100, 23, 27,242,250, 25, 50,175, 36,121, 18,206, 24, 27, 80,118,172, 12, 83,118,194,
+188,231,190, 76,205,216, 30, 87, 40, 88,236,188,202, 9, 60, 94,193,209,232,245,220,130, 61, 22, 67,161,194,109, 51, 75,127, 94,
+255,220,134,138, 50, 1, 64, 96,176,127,252,198,104,104, 85, 82, 48,198, 80, 54, 44,184,116,214, 4,168,149, 37, 99,199, 22,155,
+ 11,227,166, 44,196,250,133,255, 6, 7,240,228,227,199,110,251,224, 41,159, 89,110, 8,175,110,122, 90,238,205, 1,195,222,216,
+111,117, 40,109, 67, 71, 60,115,186, 99,199,142, 69, 42,149, 10, 42,149, 10, 62, 62, 62,240,247,247,135,159,159, 31, 42, 82, 73,
+102,165,171, 5, 5, 65,128, 32, 8,208,104, 52,208,106,181,208,104,238, 94, 85,115,231,190,223, 73, 27,214,108,114,167, 62,143,
+ 44,237,255,232, 11,248,117,203,114,126,234,200,207,147,204, 57,137, 43,170,122,174,239,204, 20, 69,241,220,200,145, 35, 91, 79,
+156, 56, 81, 62, 99,234,196, 61,191,236, 61,148,180,113,199,242, 97, 58, 93, 81, 36,231, 28,126,190,190, 55, 70, 15,235,254,115,
+191, 30,157,210,247,239,223, 47,110,216,176,193,198, 24, 59, 95, 93, 59,243,115,115,215,238,223,119,224,195, 94,125,250, 98,229,
+154, 13,125, 46, 94,186,220, 39, 57,249, 10, 34,163, 27,162,126,131, 24,152,153, 63, 14, 28, 62, 10, 99, 81,110,133,115,196, 42,
+219,247,178,165, 38, 58,157,238,183,209,163, 71, 15, 58,118,236,152, 48,122,244,104,115,126,126,254,113,148,126,111,170,172,247,
+170,124,230,111, 95, 13,207, 3,176,182, 94,223,241, 63,222,116, 20,189, 6, 96,110, 84,116, 20, 14, 29,141, 69,236,177, 19, 95,
+229,171,163,102, 62, 55,110,252,132,122,143, 72, 94,120,164, 91, 61, 73,136,191, 26,223, 45, 95, 32,217, 30,155,182, 48,173,192,
+189, 18,192,172,170,218,121,167, 2,131, 3, 61,154, 7,192,233,230, 16,121,201, 7,173,183,151,172,194, 15,220,138, 50,165,118,
+229,115,147, 38, 78, 76,110,213,166,221,235,227,198, 79,146,183,107, 24,137,147, 87,139, 0,198, 16, 16,166, 65, 86, 86, 22,142,
+108, 90,238,210,221, 76,248, 74, 34, 17,239, 26,222,169,170,157,133,105,113,141,203,109, 55, 33, 63, 63, 31,135, 14, 29, 66, 89,
+ 97, 21, 28, 28, 92, 97,129,117,103,102, 65, 78,230,241, 89,159, 46,235,241,226,211, 35, 48,180,111, 75, 28, 62,149, 12,123,233,
+241,150,202,150,132,167,196,126,173,120,109,116, 67,251,228,145, 77,138, 45, 78, 69,218,251,169,250, 35,229, 87,185,222,153,201,
+ 57,183, 51,198,182, 39, 38, 38,246,108,219,182,109,189,157, 59,119, 22, 94, 60,177,231,213,242,237,120,227,141, 55,180, 95,126,
+249,165,154,115,126,220,102,179,221,245, 69,176,194,125, 23,240,221,153,211,167, 3, 29, 78, 17, 71, 79,156,107,222,191, 71, 59,
+136, 28, 56,117,234, 20, 86,126,179,210,122, 62,254,236,124, 83, 78,216,127, 42, 91, 32, 82,217,243,233,105, 49, 85,209,118,101,
+153,156, 31,114,105, 67,155,125,117,252,232,225,119,149, 17, 29,209,236,161,233,143,220, 60,183,253,145,176, 22,131, 17,212,176,
+ 59, 50,227,183,227,248,158,111,119,138, 46,215, 52, 47, 81, 72, 55,229, 37, 84, 90,236, 87,214, 78,165, 74,253,175, 22, 29,250,
+224,122,122, 26, 82,175, 92, 88,107, 41,184,146,169, 13,107,182, 54, 51, 35,125, 82,131,150, 61,112,108,207,247,175,162,146, 2,
+171,186,215,124,100,176,106,249,206, 29,219,199,100,100,124, 29,102,178, 88,149,156,115,171, 82, 33,205,214, 10,134, 74, 23, 69,
+221,253,255,126,201,161, 9,168, 63,242,241,113,147,126, 89,178,100,145, 44,212, 79,141,108,157, 21,197, 22, 7, 12,102, 7, 4,
+198,208, 56, 66, 3,179,161, 16,135, 55,125,234,180, 27,117,163, 57,191,234,168, 44,179,228,124,130,252,149, 55, 94, 58, 8,133,
+111,100, 68,131,254,211,171,236,157, 51,100,198, 15,123,227,165,159,155,114,206,251,107, 67,155, 25,140, 57, 9,239, 85,182,239,
+140,149,188,191,199,246,139,132,195, 85,114,252, 48,151, 8,184, 69,177,180, 87, 15,224,183,198,237,239,126,195,223,158,201,196,
+ 31,126, 57,142,204,156, 34, 88,236, 78,216,236, 46, 56,156,110, 8, 18, 9,252,252,253, 16, 83,191, 61,124,253,124,144,147,157,
+137,216,253,219,145, 20,127,248, 56,227,152,105,206, 77,218, 95,121,230, 31,228, 42,191,166,225, 17, 97, 66, 86,177, 29, 42,133,
+ 4,103, 15,239,116, 56,237,182,249,158, 20, 87, 21,101, 22, 21, 20, 46,124,125,234,155, 79,174, 94,181, 38,172,117, 3, 31,100,
+228, 91,144,145,103,133,193, 90,242,253,198,229, 22, 97, 51,230, 35,254,192,154,108,183,213,112, 79, 71,158,255, 59,169,180,192,
+ 18, 93,110,123,226,213,107,152, 54,243, 83, 92, 75, 75,199,146, 57,111,230, 24,107, 80, 92, 85,100,213,228,250,213,126, 3,186,
+ 93,233, 33, 73,254,147, 86,229, 86,119, 13, 11,114, 17, 34,231,248,249, 68,246,173, 97, 65,177,116, 70,101, 92,114, 81,149, 89,
+119, 14,225,197, 39, 26,190,181, 88,114,124, 19,174,206,215, 1,128, 68, 34,185,117, 41,155, 43,101,181, 90,171, 92, 85, 84,197,
+ 65, 68,111, 27,215, 22, 69, 17, 62, 62, 62, 80,169, 84, 53, 30,122,212,132, 54, 29,211,169,239,163, 95,244, 31,254, 34,246,109,
+ 93,193, 79, 29,222,254,146, 57, 55,113,185,199, 1,165,116, 58,221, 69,198,216,149,249,243,231,183, 91,185,114,101,131,169, 83,
+167, 94, 91,247,197,135, 75, 0,160,160,160, 0, 0, 16, 23, 23,199, 95,122,233, 37,155,213,106, 77,209,233,116,103, 56,231,213,
+ 14, 29, 88,242,212,179, 87, 46,157,219,234,198,205,172, 17, 13, 91,117, 70,112,131,206, 8,107,220, 5, 58,131, 3, 39,175,102,
+226,218,229,253,184,124,116,211, 78,179,214,245, 97, 77,219,220,182,109,219, 72, 65, 16,234, 27,141,198,176, 22, 45, 90,180,213,
+104, 52,113,109,219,182,109, 47,149, 74, 51, 78,159, 62, 93,245,139,231, 14,105,135, 86,219,234,245, 29,191, 56,221,224,221,239,
+ 90,182,185,125,186,193, 59,206,172,244,253,119,238,254,207,108,161,131,230, 47,228,142,252,139, 27,215, 20,111,254,110,249, 2,
+201,184, 9,111,184, 47,232,253, 95,147,170, 20,191,206,121,182,181,199,143,193,152,144, 53,249,153, 71,255, 56, 76, 67,105,207,
+ 85,233,207, 30,117,199, 23, 21,157,211, 3,120, 91, 21,209,242,139, 11,175, 77,156,213,166, 83,143,167,122, 15, 25, 45,184,228,
+ 90,236,217,250, 53, 79,137, 63,176, 81,202,221,239,154, 61, 56,122,127,117,236,118,123,181,197, 85, 69,244, 55, 52,125, 55,110,
+248,230,217,205, 91,183,204, 25,254,200,163,129, 75,223,127, 2,159, 46,251, 9, 26,149, 18, 92, 20, 49,250,129,168, 81,151, 55,
+ 12, 30, 22, 25,234, 85,103,243,193,140, 35,175, 44,186,240,182,217,236, 72,170,110,149,107,105,193,124,212,219,219, 59,175,103,
+207,158, 93,149, 74, 37,203,207,207,151,134,132,132,184,124,125,125,237, 25, 25, 25,102,155,205,182,153,115,238,113,175, 34, 0,
+ 56,156, 34, 82,115,172,216,182,101, 51,206,157,216,143,203,151, 19, 13,151, 47, 93,254,156, 73,249, 34, 99,118, 82, 97,245, 9,
+119, 19, 43, 92, 69, 88,241,109, 85, 49, 73, 84,179,227,118,124,218, 55,230,129, 87,187, 5, 54,234, 1,255,232,146, 53, 58,250,
+140, 11,184,113,106,227, 54, 67,166,252,113,206, 47, 84, 61,145,169, 10, 17,117, 27,196,112,137, 2,191, 29,250, 5, 92, 20,191,
+ 2, 0, 46,138, 95,197, 29,219, 57,169,203, 67, 47, 32, 32,164, 94,219,178,181,243, 53,205,150, 75, 5,211,174,205,171,183,166,
+166,166, 34, 33, 33, 1, 87,175, 94, 69, 97, 97, 33,190,251, 46,181, 70,255, 63,166,194,212, 95,181,129, 13, 7, 63,246,196,216,
+159, 71,141,121,218,171, 65, 76,107,161,105, 93,127, 4,106,165, 72,188,154,134,164,211,241, 98,226,201,157, 86, 71,113,238,112,
+115, 97,106,165, 5,159, 38,184, 69, 40, 19,248,180,178,115, 11,118,235,214,163,233,155, 31,207,233, 26, 24, 28, 82,225,231,120,
+ 65, 94,174,226,173, 87,182, 55,141,253,253, 55,143,206, 69, 40,186,221, 5, 19,158, 29, 45, 74, 74, 78,228,137, 91,253,210, 12,
+ 0, 47,235,181, 42,185,157,139,174,106,123,236,199,143,232, 5,151, 40,194,100,113,160,216,100,131,222, 96, 69, 86,110, 1,206,
+197,199,227,240,207,219,145,156,120, 46,197,105,183,239, 21, 4,182,201,156,157,120,184,186,188,219, 8,210, 6,129, 1, 1, 72,
+ 41, 52,194, 75, 33, 69, 90,210,105,155,169, 88, 95,233,217, 67,170, 99,206, 79,202,210,132, 54, 29, 52,122,244,152,221, 15, 12,
+126,196,183, 83,247, 1,234, 32, 31, 63,200,165, 28, 87, 82, 51,113,230,248,110,211,181,115, 71,138,157,118,227,131,181,113,150,
+150,255,117,149, 22, 88,197,134,188,126,207, 63, 55,113,143, 32,149, 40,193, 69,171,217,172,123,240,207, 20, 87,127, 21,206,221,
+ 25,207, 62, 89, 50,105,189,236,187,128, 75,228,170, 39, 31,223, 99, 41,255,221,192,233,230,234, 39, 31, 63,110, 6, 0, 46, 86,
+ 62, 97,239,214, 16,222,247,191,102,164,167, 23,156, 42, 44,180, 29,252,179, 43,251,202,159, 91,176,138,213,130,166,102,205,154,
+221, 42,170, 36, 18, 9,220,110,183,199, 31, 64,114,165,234,197, 7, 30,121,158,237,251,105, 5, 63,121,232,167,201,230,220,164,
+101,247,218,222,210,130,233, 4, 99,236,194,187,239,190,219, 41, 52, 52, 52,244,131, 15, 62,240, 42, 46, 46,150, 45, 93,186,212,
+154,159,159,159, 93, 92, 92, 28,203,121,229, 19,146,239,206, 60,227, 4, 48, 82, 27,218,164, 31,223,188, 98,160, 95, 80,157, 65,
+190,193,117, 27, 21,229,221, 76,209,231,101,238, 5,176,175,244, 0,143, 53,210,190,125,251,134,130, 32,140, 6,208, 74,163,209,
+ 52,214,106,181, 74,206,121, 51,198,216, 69, 81, 20,227, 91,180,104,177, 3, 64,141,254,255,210, 14,173,182,245,158,252,205,134,
+ 66,179, 40,183, 11,242, 13,105,135, 86,219, 0, 32,103,239, 84, 51,128,109,161,253,166,141,220, 30,155,182,228,162,206,247,213,
+220,131,179, 61, 62, 55, 93,153,162, 27,103, 27, 87,191,149,103, 44,153, 23, 51, 0, 60,171, 9,109,186,224,124, 92,236, 12,198,
+ 33,115,195,245,145, 57,231,202,233,218,200,151,201,100,214, 58,117,234, 84,184, 90, 80,169, 84, 86, 57, 63,165,244, 96,135, 43,
+ 25,235,187,102,203,143,107,158,253,105,251,182, 57,189,251, 15, 15,244,170, 91, 23,245, 67, 24,214, 76,235,240,234,254,184,188,
+147,143,188,121,228,203,107,153,214,120,206,121,141,230,187, 24, 12,134, 36,198,152,206,104, 52, 62,202, 57,191,193, 24,139,212,
+233,116,103,157, 78,231,249, 26, 23, 2, 34,198,118,235,214,249, 59,198,152,148,187,196,121,177, 50,201, 6,107,214,229,140,123,
+ 41, 40,202,107, 93,223, 7, 83, 62, 88,220,161, 81,227, 38, 29,202,206, 69,216,178,158, 55, 38,190,189,160, 67,189, 6, 49, 29,
+254, 56, 63, 97,213,171, 8,121,230, 25, 11, 11,109, 61, 48,113,239,252,247, 3,147,143, 79, 86, 5,212,213,154,242,211, 10,117,
+105,167,231,155,115, 67,231,223,203,129, 37,203, 75,189,122,113,209,202,249,111, 79,205,186,153,178,210,148,155,116, 1, 0, 76,
+185, 73, 23,212,161, 77,222,207,207,206,152, 90,144,123,109,254,189, 62, 23, 38,147, 41,243,219,111,191,245,235,209,163,135, 16,
+ 26, 26,138,188,188, 60, 28, 60,120, 80, 20, 69,177,218, 19, 51,223,201, 88,112,237, 32, 99,141, 2,214, 46,251, 98,158, 92,227,
+253,144,203,229,138,224, 28,144, 74,165, 89,118,115,241,110,131,160,121,147, 23,166, 86,243,186, 20, 25, 0,161,236,220,130,162,
+ 40,178,121, 75,214,164,201,188,188, 43, 28, 82,117, 90, 13,106, 81, 20, 61, 62, 23,161, 46,253,116,163,154,238, 87,101, 24,231,
+ 51,219,118,236, 58,221,233,116, 88, 81, 50, 31,204, 10,192,202, 57, 10, 4,129, 29,150,136,206, 61,158,156, 2,173,210,124, 6,
+ 31,206,164,240, 86, 73,193,192, 96,212, 23,242,154,204,185,170,136, 41, 39,241, 34, 99,125,163,119,217,127,124,230,192,175, 59,
+ 31,119,187,221,245, 75, 95, 57,169, 54,139,105,163, 49,203,127, 45,231,167,254,220, 50,244,191,137, 74, 11,172,210, 98, 42,250,
+255,175, 41,247,166, 32,165,250,163,203,214, 68, 86, 78,225,154,193,195,167,242,212,180,220,147,215,179,109,107,121,185,211,223,
+252,217,204, 27, 55,242, 14,150, 14, 11,222,181,196,243, 94, 87, 11,150,113, 88, 45,159,124,246,238, 24, 88, 45,166,117,230,220,
+164, 53,127, 38,171, 76,105, 1,117,152, 49,230, 59,121,242,228,246, 74, 16,255,138, 0, 0, 32, 0, 73, 68, 65, 84, 90,173, 86,
+150,159,159,127,130,115,174,175,246,206,149, 48,230, 36, 29, 4,112, 16,192,180,218,104, 99, 92, 92,220,181,118,237,218,173, 23,
+ 4,161, 62,231, 60,148,115,238,139,146, 2, 54, 95, 42,149,222,188,116,233, 82,141, 63,196, 1,128,219,188,119, 25,237,146, 24,
+ 23,247,223,125,231,239,100,129, 33,191,166, 23,186, 87, 72, 52, 94,255, 51,115, 8, 76, 57,137, 23, 1,212,194, 17,118,111, 87,
+213,113,174, 60, 85,190,208, 58,244,203,234,103, 5,133,239, 71,253,155, 90,205,131, 94,191, 57,235,232,249,188, 19,156,115,143,
+143,142,125,119, 54,207, 83, 40, 20, 22,198, 88,164, 92, 46,183,216,237,246,248,123,201, 41, 45,238,239,105,165, 97,101, 68,176,
+211, 29, 58,120,254,241, 36,130, 85, 89, 20,243,156,243,102, 0,211, 88,139, 22, 31,168,147, 79,249,155,243,131, 10, 56, 79,172,
+149, 63, 84,198,236,132, 89, 40, 29,230, 46,207,156,147,244, 17,128,143,254, 76,246,169, 83,167,126,158, 63,127,190,126,201,146,
+ 37, 81,110,183, 91,109,183,219,205, 22,139, 37, 53, 35, 35,227,183,123,201,227, 60,217, 14,224,181,210, 75,141,153,243, 19,178,
+181,161, 77, 22,119,239,214,253, 53, 0, 96,224,139, 83, 15, 47,158, 82,213,125,180,161, 77, 44,229,183,175,234, 92,132,181,201,
+152,155,244, 21,128,175,254,178, 7,224, 98,222,216, 81,143, 2,165, 7,212, 22, 93,174,123, 62, 28,199,109,177, 37,239,249,111,
+112, 15, 39, 47,191,175,240,210,211, 35,252, 21, 23, 0, 3, 40,147, 50, 41,147, 50, 43,216, 86,248, 59,180,147, 50,239,223, 76,
+175,240,230,145, 94,225,205, 35, 61,189,127, 69,219,255, 93,247,253,127, 53,243,126,187,120,124, 38,111, 66, 8,169, 45,220,131,
+179, 9, 16,242, 87,178,100, 94,242,248, 56,126,247,178, 61, 33, 12, 37,103,165,190, 11,247,236,236,219, 37, 33,140, 85,152, 81,
+149,234,242, 41,147, 50, 41,147, 50, 41,147, 50, 41,243,254,203,172, 46,187, 38,245,199,255,180,191,178,123, 12,127,147,110, 73,
+202,164, 76,202,164, 76,202,164, 76,202,252,239,102,222,111, 23,207,207,241, 66, 8, 33,132, 16, 66, 60, 66, 5, 22, 33,132, 16,
+ 66, 72, 45,163, 2,139, 16, 66, 8, 33,164,150, 81,129, 69, 8, 33,132, 16, 82,203,168,192, 34,132, 16, 66, 8,169,101,140,115,
+142,210, 83, 76, 49, 0,183,253, 76, 8, 33,132, 16,242,255,225,126,171, 69,110,245, 96, 49,198,254,212, 57,183, 8, 33,132, 16,
+ 66,254,140,251,169, 22,185, 85, 96,113,206,217,253,180, 99,132, 16, 66, 8,249,123,185,159,106,145,219,230, 96,253,221,187,227,
+ 8, 33,132, 16,242,247,118,191,212, 34, 52,201,157, 16, 66, 8, 33,164,150,177,210, 67,222, 19, 66, 8, 33,132,144, 90, 66, 61,
+ 88,132, 16, 66, 8, 33,181,140, 10, 44, 66, 8, 33,132,144, 90,246,151, 22, 88,140,177, 1,148, 73,153,148, 73,153,148, 73,153,
+148, 73,153,255, 52,212,131, 69, 8, 33,132, 16, 82,203,168,192, 34,132, 16, 66, 8,169,101, 84, 96, 17, 66, 8, 33,132,212, 50,
+ 42,176, 8, 33,132, 16, 66,106, 25, 21, 88,132, 16, 66, 8, 33,181,140, 1,168,112, 37, 0,231,124,159,199, 33,247,176,154,160,
+186,124,202,164, 76,202,164, 76,202,164, 76,202,188,255, 50,171,203,174, 73,253,241, 63,141,115,254,151, 93, 0, 12,160, 76,202,
+164, 76,202,164, 76,202,164, 76,202,252,167, 93,104,136,144, 16, 66, 8, 33,164,150, 81,129, 69, 8, 33,132, 16, 82,203,168,192,
+ 34,132, 16, 66, 8,169,101, 84, 96, 17, 66, 8, 33,132,212, 50, 42,176, 8, 33,132, 16, 66,106, 25, 43, 93, 13, 0,198, 24,231,
+156,179,255,114,123, 8, 33,132, 16,242, 15,117, 63,213, 34, 2,240,199, 14, 49,198,248,127,187, 65,132, 16, 66, 8,249,231,185,
+223,106, 17, 26, 34, 36,132, 16, 66, 8,169,101, 84, 96, 17, 66, 8, 33,132,212, 50,154,131, 69, 8, 33,132,144,255, 9,247, 83,
+ 45,114,171,192, 34,132, 16, 66, 8, 33,181,131,134, 8, 9, 33,132, 16, 66,106, 25, 21, 88,132, 16, 66, 8, 33,181,236, 47, 45,
+176, 24, 99, 3, 40,147, 50, 41,147, 50, 41,147, 50, 41,147, 50,255,105,168, 7,139, 16, 66, 8, 33,164,150, 81,129, 69, 8, 33,
+132, 16, 82,203,168,192, 34,132, 16, 66, 8,169,101, 84, 96, 17, 66, 8, 33,132,212, 50, 42,176, 8, 33,132, 16, 66,106, 25, 3,
+ 80,225, 74, 0,206,249, 62,143, 67,238, 97, 53, 65,117,249,148, 73,153,148, 73,153,148, 73,153,148,121,255,101, 86,151, 93,147,
+250,227,127, 26,231,252, 47,187, 0, 24, 64,153,148, 73,153,148, 73,153,148, 73,153,148,249, 79,187,208, 16, 33, 33,132, 16, 66,
+ 72, 45,163, 2,139, 16, 66, 8, 33,164,150, 81,129, 69, 8, 33,132, 16, 82,203,168,192, 34,132, 16, 66, 8,169,101, 84, 96, 17,
+ 66, 8, 33,132,212, 50,198, 57, 7, 99,140,151, 94,239,203, 57, 63,252,223,108, 16, 33,132, 16, 66,254,121,238,183, 90, 68, 90,
+246, 3,231,156,149,238, 28,251, 47,182,135, 16, 66, 8, 33,255, 80,247, 83, 45,114,107,136,176,116,135,250,254, 23,219, 66, 8,
+ 33,132,144,127,176,251,169, 22,185,173, 7,235,191,217, 16, 66, 8, 33,132,252,179,221, 79,181, 8, 77,114, 39,132, 16, 66, 8,
+169,101,172,244,144,247,132, 16, 66, 8, 33,164,150, 80, 15, 22, 33,132, 16, 66, 72, 45,163, 2,139, 16, 66, 8, 33,164,150,253,
+165, 5, 22, 99,108, 0,101, 82, 38,101, 82, 38,101, 82, 38,101, 82,230, 63, 13,245, 96, 17, 66, 8, 33,132,212, 50, 42,176, 8,
+ 33,132, 16, 66,106, 25, 21, 88,132, 16, 66, 8, 33,181,140, 10, 44, 66, 8, 33,132,144, 90, 70, 5, 22, 33,132, 16, 66, 72, 45,
+ 99, 0, 42, 92, 9,192, 57,223,231,113,200, 61,172, 38,168, 46,159, 50, 41,147, 50, 41,147, 50, 41,147, 50,239,191,204,234,178,
+107, 82,127,252, 79,227,156,255,101, 23, 0, 3, 40,147, 50, 41,147, 50, 41,147, 50, 41,147, 50,255,105, 23, 26, 34, 36,132, 16,
+ 66, 8,169,101, 84, 96, 17, 66, 8, 33,132,212, 50, 42,176, 8, 33,132, 16, 66,106, 25, 21, 88,132, 16, 66, 8, 33,181,140, 10,
+ 44, 66, 8, 33,132,144, 90,198, 74, 87, 3,128, 49,198, 57,231,236,191,220, 30, 66, 8, 33,132,252, 67,221, 79,181,136, 0,252,
+177, 67,140, 49,254,223,110, 16, 33,132, 16, 66,254,121,238,183, 90,132,134, 8, 9, 33,132, 16, 66,106, 25, 21, 88,132, 16, 66,
+ 8, 33,181,140,230, 96, 17, 66, 8, 33,228,127,194,253, 84,139,220,234,193,186,159,198, 61, 9, 33,132, 16,242,247,115, 63,213,
+ 34,183,122,176, 8, 33,132, 16, 66, 72,237,160, 57, 88,132, 16, 66, 8, 33,181,236, 47, 45,176, 24, 99, 3, 40,147, 50, 41,147,
+ 50, 41,147, 50, 41,147, 50,255,105,168, 7,139, 16, 66, 8, 33,164,150, 81,129, 69, 8, 33,132, 16, 82,203,168,192, 34,132, 16,
+ 66, 8,169,101, 84, 96, 17, 66, 8, 33,132,212, 50, 42,176, 8, 33,132, 16, 66,106, 25, 3, 80,225, 74, 0,206,249, 62,143, 67,
+238, 97, 53, 65,117,249,148, 73,153,148, 73,153,148, 73,153,148,121,255,101, 86,151, 93,147,250,227,127, 26,231,252, 47,187, 0,
+ 24, 64,153,148, 73,153,148, 73,153,148, 73,153,148,249, 79,187,208, 16, 33, 33,132, 16, 66, 72, 45,147, 86,116,163,172,203,199,
+ 57, 46,151, 43, 4, 0,164, 82,105,174,243,228,123,225, 85,133,200,128,254, 46, 96, 69,105,224,139, 78,206,127,173, 32,243, 87,
+151,203,229, 95,154,169,115,158,124,111,112,149,153,157, 63,218,115,219,246, 39,222, 29,120,215, 70,140, 73,100,157, 63,202,188,
+163,173, 17, 85,229,222,134,115,247,255, 71, 59,255, 46,153,255,100,242,174, 31,231, 56,157, 37,175, 35,153, 76,154,235, 56, 81,
+245,235, 72,222,229,163,204,219,182,255,253,221,208,170, 50,213, 42,101, 65,163, 58,193, 11,171,202,188,150,153,255,111,147,217,
+ 26, 88, 85,102, 77,223,155,145,225,225,253,221,165,239, 77, 9,240,226,141,204,204,255,159,247,166,135, 24, 99, 29, 1,188, 7,
+192,167,220,205,241,156,243,215,239, 53,147, 16, 66,254, 23, 84, 88, 96,185, 92,174,144, 51, 91,103,192,100, 3,250, 63,253, 81,
+ 72,195,225,203,190,187,107, 27,171, 78, 81,116,241,135,214, 18,103,177,127,176,212,225,147,153,153,201, 0,128, 49,182, 2, 64,
+ 84, 5,153,254,103,182,206,128,217, 14,244, 30, 51,211, 63, 10,240,201,147,203,223, 80,105, 52,253, 44, 22, 75, 75, 0, 80,169,
+ 84, 23, 45, 38,211,193, 96,135, 99,193,157,219, 87,182, 3,229,219,250,192, 83, 31,133, 52, 27,190,236, 85,183, 40, 42,110,158,
+250,186,183, 53,255,138, 84,230,178, 45,157, 14,236,154, 1,220, 85, 76, 85,146,247,199,227, 62,254, 78,160, 12,120, 64,225,229,
+213,214,207,223,191,151,200,121,115, 81, 20,153,219,229,186, 84,172,215, 31, 21, 93,174,115, 46,187, 41,240,204,246, 57, 98, 85,
+237,188,115, 95, 30, 7,164, 91,129, 81, 26,173,182,159, 68, 38,235, 14, 0,110,167,243, 55,147,209,120,112, 4,176,201,147,125,
+247,244,249,185,215,237,255,105,156, 78, 87, 72,202,158, 25,176, 57,129,246,143,205, 9,105, 51,118,237,119, 0, 96,207, 61, 23,
+106,188,178,189, 11, 0,104, 26, 13, 61,161, 12,107,159, 3, 0,210,244,172,144,164, 29,239,194,230, 4,154, 15,157, 25, 82, 93,
+230,248, 15,126, 12,124,107,194, 72, 37, 0,236,221,252, 69,147, 3, 91,190, 26, 2, 0, 15,140,124,105,215,160,199, 94, 73, 2,
+128,121,203,183, 4,126, 63,231,137, 42, 51, 61,123,111,234,229,250, 43, 59, 26,219,139,179,252, 34, 53,210,176, 43, 87,174, 8,
+ 0, 16, 17, 17,225,209,123,179, 46,224,155, 5,188, 44, 72, 36,189, 26, 53,110,220, 30, 0,191,150,156, 28,231,118,185,142,133,
+ 3, 75,107,249,181,244, 42,231,124, 88,249, 27, 24, 99,127, 50,146, 16, 66,254,251, 42, 44,176, 0,192,100, 3, 14, 95, 5,250,
+116,109,131, 9, 99, 31,210,150,255,221,166,101, 51,163,174,156,218,214,236,155,181, 11,132, 54,109,218, 32, 37, 37,197,163, 7,
+ 51,219,129, 67, 87, 0, 20, 93,246,214,105, 52,201,139, 62,253,212,103,224,192,129,210,136,136, 8, 48,198,144,157,157,221,117,
+223,190,125, 29,167, 76,153, 50, 9, 69,151,117,102, 59, 12,135,174, 84,159, 91,214,214,150, 77,234,225,189, 87,158,240, 5,128,
+233, 79, 47,237,120, 42, 49, 39, 32, 57, 57,185,255,219,111,191, 93, 32, 57,120,240,171, 32, 96,117, 14,112,195,147,118,174,251,
+249,132,151,111,214,134,134,227, 94,121,101,115,227,198,141,181,209,209,209,204,219,219, 27, 18,137, 4, 58,157, 46,234,194,133,
+ 11, 67, 78,158, 60,105,218,119,120,133,226,244,201, 71,174,229,122,117,177,122,180,239,150, 76,175,189,222,222, 23,159, 26, 49,
+162,238, 19, 79, 60,225,213,168, 81, 35, 0, 64,114,114,114,204,166, 77,155,198,108,222,188,249, 3, 88, 50, 93,102, 59,172,213,
+237,251,173, 76, 0, 94, 64,119,191,144,144,113, 18,153,172,165,203,229,170, 3, 0, 82,169,244,166,219,233,188, 88,148,155,251,
+237,157,219,147,187,217,156,192,229, 44, 96, 64,175,246,120,106,228, 0, 13, 0,188, 61,250,227,174,233,169, 87,229,118,187, 29,
+ 77,154, 54,239, 49,107,206,194, 61, 16, 4,172,223,178,239,214,246,158,100,198, 95, 78,193,140, 89,139,144,121,126, 83, 87,183,
+254,106, 63, 67,177, 94, 2, 0, 62,190,190, 35, 55,253,176,225, 96, 68,235, 81,191, 95,205,119,120,148, 89,213,123,115,247, 15,
+159,135,103, 92, 56,216,226,203,189,171,100, 81, 81, 81, 56,127,254,188, 71,251,126,235,181,161, 79,244, 22,195,195, 47, 45,120,
+243,205,176,222,189,123, 67,171,213, 66, 42,149,194,229,114, 13, 56,118,236,216,128, 25, 51,102,188, 4,125,162,201,211,247,166,
+ 7, 22, 48,198,250,141,159,240,106,248, 67,143,142,194,200, 7,123,212, 74, 40, 33,132,252,183, 85, 88, 96, 73,165,210,220,129,
+207,204, 14,233,213,165, 21, 78,157, 75,210,167, 93,207, 50,150,253,174,240,226,166, 38,143,246,168,211,226,200,145,195,176,217,
+108,248,237,183,223,112,238,220, 57,164,166,166, 98,226,196,137, 54, 41,240, 98, 37,153,186,222, 99,102,250, 67,127, 69, 27,163,
+ 72,172,191, 47, 33, 65, 98,181, 90,113,228,200, 17,232,116, 58, 40, 20, 10,212,173, 91, 23,131, 6, 13,146, 38, 36, 36, 4,244,
+ 31,248,160,111,239, 7,159, 76,129,111,140, 81, 42,149,234, 42,221, 1,169, 52,183,255,211, 31,133,180,136,169,135,228,180, 76,
+253,123,115,190, 49,138, 34,151, 94, 75, 77,119, 28, 62,124, 24,237,219,183,199,175,191,254, 26, 88, 88, 88,248,254,210,165, 75,
+223,147,125,242,229, 98,167,189, 96,106, 21,121,186,222, 99,102,250, 7,230,110,140, 62,176,251, 39,249,197,139, 23,229, 95,127,
+253, 53, 10, 10, 10,160, 80, 40,224,231,231,135,176,176, 48, 52,105,210,132, 77,159, 62, 93, 59,116,232, 69,252,235,197, 81,209,
+142,134, 47, 36, 86,214,206, 91,251,110, 76, 87, 7, 21,239,109,180,229,151, 95,132,158, 61,123,222,246, 53,189, 65,131, 6, 24,
+ 60,120,176,215,184,113,227, 26, 61, 49,102,172,216,251,225,241,201,208, 70,155,171,205, 52,221, 80, 5,154, 99, 35, 6,140, 25,
+179,125,230,204,153,126, 97, 97, 97,208,104, 52, 0, 0,189, 94, 95, 55, 45, 45,173,235, 7, 31,124,240,216,137,248, 31,164,189,
+135,222,200,132, 38,210, 82,213,243,249, 79, 37,147, 73,115,203,122,141,188, 53, 42,221,141,140, 28, 19, 0,216,237,118,216,237,
+118,216,108, 54, 76,126,105,162,228,197,199, 58, 55,142,238,245,234,217,212,155, 57,133,205,247,253, 30, 80,118,223,234, 50,165,
+230,212,162,162,235,251, 95,156,241,230,155, 97,161,161,127,140,252,173, 95,183, 78, 82, 88, 88, 56, 96,198,140, 25, 45,184,186,
+111, 81,243,161, 51,253,170,202,172,234,189, 89,148,244, 75,253, 89,175, 12,110,187,108,206, 14,184,221,110,196,198,198,226,200,
+145, 35, 88,184,112, 33,223,181,107,151,222, 71,163,169,230,189,153,232,221, 51, 60,187,225, 39,159,108,102, 74,165, 18,219,182,
+109, 67, 66, 66, 2, 4, 65, 64,155, 54,109,240,212, 83, 79, 97,192,128, 1, 97, 19, 38, 76,228,189, 31, 28,125, 13,190, 77, 13,
+127,230,181,196, 24, 19, 0,188,250,206,140, 79,194,159,126,225,101,204,155, 53,157, 10, 44, 66,200,253,163,116, 53, 0, 47,189,
+244,225,156,131, 3, 66,131,225,203,190,223,120, 90,252,165,193,240,101,223,115, 64,224,128,224, 3,212,107,215,174,157,179,168,
+168,136,159, 60,121,146, 79,158, 60,217,180,120,241,226,131,191,252,242,203, 38,151,195,177, 50, 34, 60,124, 62, 7,132, 10,103,
+212, 3, 66, 52,224,171, 86,171,243,174, 95,191,206,119,238,220,201, 63,252,240, 67,254,237,183,223,242, 93,187,118,241,125,251,
+246,241, 93,187,118,241,239,191,255,158,199,199,199,243,164,164, 36,174,209,104,242,162, 1,223, 42, 50, 37, 28,144, 52, 25,254,
+245,212,205,167,156, 51,155, 14, 95, 54,133, 3, 18,127,160, 89,187,118,237,220,155, 54,109,226,235,215,175,231,107,215,174,229,
+241,241,241, 60, 63, 63,159, 75,149,154,188,178,251, 85,214, 78, 14, 8,117,234,212,201, 43, 42, 42,226,145,145,145, 92,161, 80,
+240,208,208, 80,222,164, 73, 19,222,181,107, 87, 62,100,200, 16, 62,118,236, 88,254,254,251,239,243,162,162, 34,238,229,229,149,
+ 83,118,191,202, 50,219, 3, 42,141, 70,115,253,204,153, 51,188, 50, 22,139,133,231,231,231,243, 61,123,246,112,141, 70,115,189,
+ 61,160,170, 42, 83, 5,116,104,221,186,117, 94,126,126, 62,119, 56, 28,252,250,245,235,252,194,133, 11, 60, 33, 33,129, 95,191,
+126,157, 91, 44,150, 91,217, 73, 73, 73,188, 97,195,134,121, 42,160, 67,165,153,255,228, 75,217,107,226,142, 75, 84,104,232,144,
+176,176, 48,203,230,205,155,249,205,155, 55,249,154, 53,107,184, 0,124,124,215,182, 85,100, 42,128, 65, 61,123,246,116,199,198,
+198,242,179,103,207,242,105,211,166,241,193,131, 7,243, 7, 31,124,144,207,152, 49,131,103,100,100,240,140,140, 12, 62,100,200,
+ 16,183, 2, 24, 84,221,235,179,162,247,166, 47, 16, 53,116,232, 80,139,195,225,224,215,174, 93,227, 45, 91,182,204,144, 0,227,
+ 52, 64,139, 62,128,178,186,215,103, 29,192, 63, 60, 60, 60, 43, 54, 54,150,111,217,178,133, 71, 71, 71,231, 73,128,241, 62, 64,
+ 3, 31,160,129, 4, 24,223,160, 65,131,188,216,216, 88, 94, 80, 80,192,163,162,162,178,234, 0,254,247,250, 90, 66,201, 49,248,
+ 86,189, 51,227, 19,158,152, 97,226,239,204,248,132, 3,184,206, 75,126,249,235,127,253,245, 64, 23,186,208,229,255,253,114, 87,
+ 45,242, 55,191, 72,203, 21, 90,140, 49,198, 81,114,108,172, 10, 89, 36,146,217,243,230,205,147, 90,173, 86,124,243,205, 55,134,
+ 39, 71,143,222,226,231,231,231,146,201,100, 96, 66,245, 11, 18,243,148,202,215, 62,157, 55,207,207,110,183,227,244,233,211,232,
+216,177, 35,148, 74, 37,228,114, 57,100, 50, 25,100, 50, 25,194,195,195,145,155,155,139,150, 45, 91,226,173,183,222,242,157, 59,
+123,246,107,176,217,102, 85,149, 43,138, 92, 10, 0,110, 81, 84,200,129, 9,109, 59,117,154, 63,125,250,116,193,199,199, 7, 86,
+171, 21, 54,155, 13, 9, 9, 9, 8, 12, 12,132, 90,165,150,194,102,170,182,173,130, 32, 8, 90,173, 22, 7, 14, 28,192,242,229,
+203,145,154,154,138,172,172, 44,120,123,123,163,101,203,150,104,222,188, 57,250,244,233,131,107,215,174,129,121, 48,105,228,146,
+ 84,250,242,228, 23, 95, 12,105,223,190,125,133,191,183, 90,173, 40, 42, 42,130, 94,175, 71,221,186,117, 49,106,212,168,144, 13,
+235,215,191, 12,151,107, 65, 69,219, 7, 2, 97,117, 99, 98,182,159, 60,121, 50,136,115,142,245,235,215,195,104, 52,194,110,183,
+ 67, 16, 4,120,121,121,193,223,223, 31, 15, 60,240, 0,130,131,131, 17, 19, 19,131, 31,127,252, 49,104,200,144, 33, 59, 2,115,
+115, 59, 20, 0,153,213, 62, 9, 4,233, 57, 57,123, 7, 1, 65,227,198,142,221,117, 46, 62,190,215,184,113,227,144,147,147, 51,
+ 93, 54,109, 90,145, 19, 88, 84,221,253,155, 2,190, 1,225,225,171, 63,249,228, 19, 33, 59, 59, 27,111,188,241, 70,126,102,122,
+250, 52, 95,224, 40, 0,236,223,189,187,215,183,223,126, 59,119,253,250,245, 65,235,214,173, 19,218,183,111,191,186,233,245,235,
+ 45, 19, 1,125, 77,218,105, 0, 94,253,236,179,207,188,172, 86, 43, 6, 14, 28,120,205, 43, 53,181,173, 11,176,120,122,255, 44,
+224,229,133,111,189, 21,166, 84, 42,241,198, 27,111,228,155,211,211, 91,185,128,188,114,155,164, 5,167,164,236,126,250,233,167,
+ 47,196,199,199, 7, 45, 90,180, 40,236,177, 17, 35, 94, 6,240,177,167,143,113,199,132,246,152,241, 19, 94, 13,109,223,185, 27,
+214,173, 92,138, 57, 51,223, 94, 13, 96, 25, 99,236, 21, 0,159,122,154, 73, 8,185,191,120, 82,139,252, 93,220, 42,176, 74,119,
+168,111, 85, 27,251, 7, 6,118,108,213,170, 21,142, 28, 57,130,214,173, 91,159,244,243,243,115,201,149, 74,200,100, 50,112, 81,
+172,246,193, 84, 26, 77,255, 1, 3, 6, 72,127,255,253,119, 52,108,216, 16, 42,149,234, 86, 97, 85,118,145,203,229, 8, 15, 15,
+ 71,113,113, 49,250,247,239, 47, 91,178,100, 73,255,234, 10, 44, 0, 72,191,114, 65,155,247,251, 39, 99, 87,172, 89,221,160,119,
+239,222,208,235,139, 33,138, 34,212,106, 53,236,118, 59,164, 82,105,201, 80,143,147, 23,123,242,196,184,221,110,183, 68, 34, 65,
+195,134, 13, 49,123,246,108, 88,173, 86,200,229,114, 0, 64,113,113, 49,138,138,138,112,225,194, 5,164,165,165,129,151,150,222,
+ 85,241,246,245,125,232,137, 39,158, 80, 84,244, 59,155,205, 6,189, 94, 15,189, 94,143,162,162, 34, 88,173, 86,116,235,214, 77,
+241,203,142, 29, 15,161,160,160,194, 2,203,230,229,245,216,186,117,235, 66, 20, 10, 5, 44, 22, 11, 12, 6, 3,110,220,184,129,
+244,244,116,107,110,110,174,203,219,219, 91,136,142,142, 22,148, 74,165,114,248,240,225,172,184,184, 24,140, 49, 12, 29, 58, 52,
+240,187,245,235,159, 0, 80,229,138, 54,242,135,189,128,173,131,221, 62,172, 75,231,206, 7, 78,158, 58,213,254,181,215, 94, 67,
+124,124,252, 39,234, 31,126, 56,108, 6,206, 85,117,223,107,192,203,243,203, 21, 46, 60, 61,189,181,227,142,194, 37,186,164,112,
+ 57, 95, 86,184, 60, 94,195,194, 5, 0,188,125,125, 59,133,135,135, 99,215,174, 93,184,158,154,250,118, 77,138, 43, 0, 16, 36,
+146,158,189,123,247,198,182,109,219,144,145,158,254,246, 29,197, 21, 0, 32, 15,200,147, 94,187,246,246,234,213,171, 87, 61,247,
+220,115,144, 72,165, 61,225,114,213,228, 97,238,154,208,254,220,196,215,176,122,249,146,213, 0, 94,224,156,139, 0, 78,214, 36,
+144, 16,114,127,241,164, 22,249,187,184,213,237,196, 57,103, 0, 14, 85,181,113, 72, 72, 72, 29,173, 86,139,204,204, 76, 52,111,
+214, 44, 87,169, 84, 66, 33,147,193, 75, 81, 97,221,112, 23,179,217,220, 58, 34, 34, 2,122,189, 30, 65, 65, 65,144,203,229,183,
+ 46, 10,133,226,214,207,222,222,222, 16, 4, 1, 81, 81, 81, 48,155,205,173,171,205,205,185, 16,242,195,146,151, 38,199, 30,222,
+213, 96,196,136,145,240,247, 15, 64,100,100, 93,132,132,132, 64,165, 82, 33, 50, 50, 18,141, 26, 53,226, 11, 22, 44,128, 58,164,
+141, 71, 31,224,229,139, 38,169, 84, 10,183,219,141,156,156, 28, 36, 38, 38, 34, 62, 62, 30,177,177,177, 56,123,246, 44, 12, 6,
+ 3, 60,168,175, 96,182, 88,218, 74,165,119, 79,121,179,217,108, 40, 42, 42,186,213,123, 85, 84, 84,132,188,188, 60,164,165,165,
+193,104, 50,181,171, 44,207, 63, 48,112,100,171, 86,173, 36, 0,160, 82,169,208,174, 93, 59, 44, 91,182,204,245,243, 79, 63,141,
+110, 17, 27, 27, 16,185,103,143,223,138,175,191, 30, 61,106,212, 40,247,239,191,255,142,226,226, 98, 92,190,124, 25,193,193,193,
+ 82,133,151,215, 19,158, 60, 7,228, 15,103, 0, 83,144,193,240, 96,247,238,221, 83,244,122, 61, 62,253,244, 83, 65,230,237,189,
+124, 38, 32,169,242,142, 18, 73,143,222,189,123, 99,251,246,237,200, 76, 79,159,150, 94, 65,225,146, 14,228, 93,191,118,109,218,
+234,213,171, 49,104,208, 32, 48,169,180,198, 19,145,186,118,237,218, 74, 20, 69,156, 63,127, 30,126,192,137,154,222,191, 81,227,
+198,237,181, 90, 45, 18, 18, 18,160, 41,237, 93,171,136, 6, 56, 26, 23, 23, 7,149, 74,133,230, 45, 90,116,168,225,195, 44, 96,
+140,101, 61, 55,241, 53,108,217,125, 28, 0,176,122,249,146, 28,252, 81, 92, 17, 66,254,225, 60,169, 69,254, 46,106,116,160,209,
+178, 66, 66, 38,147, 65,161, 84, 66,161, 80,148, 20, 70, 74,165,199, 25,140, 49,120,121,121,221, 42,168,202, 23, 86,229,127, 86,
+171,213, 30, 21, 46, 0,160,187,186,187,215, 11,207, 63,167, 80, 42,149,176,219,109,224,156, 67,169,244,130,159,159, 31, 26, 54,
+108,136,226,226, 98,116,239,209,199,118,163, 72,190, 35,176,249,240,248,154,236,115, 25,151,203, 5,147,201, 4,157, 78,135,194,
+194, 66, 20, 23, 23,195, 98,177,120,188,164, 92, 20, 69,201,141, 27, 55,176, 97,195, 6, 20, 20, 20, 0, 40,153, 64, 93, 86, 84,
+149,253,155,146,146,130,245,235,215, 35, 53, 53, 21,168,193,255, 79,175, 94,189,176, 99,199, 14, 73,223,254,253, 87,254, 26, 29,
+157,249,107,116,116,102,223,254,253, 87,110,223,190, 93, 82,167, 78, 29,164,165,165,225,244,233,211,208,233,116,101, 47, 96, 82,
+ 67,201,128,206, 92, 88,248,220,244,233,211,185, 86,171,197,167,243,231,183,253, 24,120,178,170,251,148, 47, 92,124,171, 40, 92,
+124,255, 92,225, 2,206, 57, 68, 81,132,219,237,209,209, 72,238,194, 24, 99, 50,153,172,166,135, 72,240,120,227,242, 19,218,223,
+122,127, 54,118,110,219, 84,246,171, 43, 84, 92, 17, 66,238, 71, 82,224, 86,197, 88,237, 31,222,156,156,156,155, 38,147,169, 65,
+116,116, 52, 50, 50, 50, 66,162,162,162,210, 21, 50, 25,228, 10,133, 71,115,176,212,106,245,249,204,204,204, 30,117,234,212,129,
+203,229,186, 85, 76,221, 57, 68, 8,148,244,202,156, 61,123, 22,106,181,250, 60,172, 85, 30, 1, 1,110,187,174, 94,135, 14, 29,
+110,245, 4,249,249,249,193,207,207, 23, 74,165, 23,222,125,247, 93,113,209,130, 5, 75,163, 30,152,169,127,118,202,116, 62,253,
+227,149, 30, 62, 53,158,241,244, 15,146, 90,173, 62, 31, 25, 25,217,205,215,215, 23, 91,182,108, 65, 90, 90, 26,116, 58, 29,204,
+102, 51,108, 54, 27,204,102, 51,236,118, 59,188,188,188,208,162, 69, 11,248,248,248, 96,223,190,125,231, 97,179, 85,152,167, 43,
+ 40,216,114,254,252,249,110,157, 59,119,190,213,131,210,175, 95, 63,214,175, 95,191,160,178,235,102,179, 25,249,249,249, 56,121,
+242, 36,246,237,219, 7,198, 24,174, 92,185,226,182, 89, 44,223,255,217,253,254,167,178, 2,191, 73, 86,175, 94, 53,105,210,164,
+231,123,244,232, 1, 55, 48, 4,192,250,202,182,255,171, 11,151, 50,177,177,177, 23,220,110,119,143, 38, 77,154,160, 8,232, 2,
+ 96, 91, 77,238,159,124,245,106,156,203,229,234,223,182,109, 91,108,217,184,177, 23,128,180,138,182, 51, 1,189,218,183,111, 15,
+139,197,130,203,151, 46,157,241, 36,187,180,184, 90,249,206,140, 79,198, 63,253,194,203, 88,183,114, 41, 86, 47, 95,114, 99,213,
+178,197,145, 0, 28, 53,105, 39, 33,228,254,229,105, 45,242,119, 81,163, 30, 44,189, 78,119, 38, 46, 46, 14, 29, 58,116, 64,114,
+114,114,103, 46,138, 82,185, 66, 1,133, 92, 14,193,131, 63, 32, 22,147,105,255,254,253,251, 93,237,218,181,131,209,104,132, 84,
+ 42,189,173,247, 74,161, 80, 64, 38,147, 65, 42,149, 66,173, 86, 99,235,214,173, 14,139,201,180,191,186, 92,209, 45,186, 5, 65,
+184,245, 71,172,168,168, 8,102,179, 5,179,103,207,198,231, 11, 22,140,117, 3, 83,100,154,224, 26,205, 73,169,109, 86,179,249,
+192,206,157, 59,157, 13, 26, 52,192,248,241,227, 49,101,202, 20, 76,153, 50, 5,147, 38, 77,194,248,241,227,241,212, 83, 79, 97,
+196,136, 17,232,210,165, 11,130,131,131,145,152,152,232,180,154,205, 7, 42,203, 83, 90,173,155,159,121,230,153,220,178,194,204,
+100, 50,193, 96, 48, 64,175,215, 35, 47, 47, 15,199,143, 31,199,186,117,235,176, 96,193, 2,108,221,186, 21, 54,155, 13, 14,135,
+ 3,103,207,158,213,105,156,206,141,255,159,251,126,191,145, 1, 91,142, 29, 59,134,128,128, 0, 68,212,173,219,167,170,109, 75,
+ 11, 23,180,109,219, 22,122,160, 87,101,219,233,239,161,112, 41,207,100, 48,156, 74, 73, 73, 65,223,190,125, 17, 94,183,238, 39,
+ 45, 0, 85, 77,238,239,118,185,142, 30, 59,118, 12, 79, 63,253, 52,162, 27, 52,248, 36, 24, 8,190,115,155, 96, 32,184,126,163,
+ 70,159,140, 31, 63, 30,123,247,238,133,219,229,170,180, 71,142, 49,214,145, 49,182,157, 49,118, 24, 64,218,248, 9,175,142,191,
+ 99, 66,251,227,140,177,111, 1, 84,122,200, 20, 66, 8,249, 59,171, 81,129,165,114,187,223,153, 58,117,170, 83, 16, 4,140, 28,
+ 57,210,123,219,246,237,163,206,158, 59,215, 48, 55, 55,215,207,237,118, 87,155, 21,108,179, 45,158, 58,117,106,145,221,110, 71,
+211,166, 77, 81, 88, 88, 8,183,219, 13,169, 84, 10,169, 84, 10,198, 24, 4, 65,128, 86,171, 69, 92, 92, 28, 86,173, 90, 85, 28,
+108,179, 45,174, 46,215,237,118,159, 95,191,126, 61, 36, 18, 9,247,242,242, 2, 99, 12, 82,169, 20,139, 22, 45,202,253, 28,216,
+ 2, 0, 18, 65,176, 3,128, 32, 48, 79,103,229, 86, 59, 62,169, 80, 40, 32,150, 76,238,175,118, 91,127,155,237,179,121,243,230,
+ 25, 46, 95,190, 12,147,201,116,171,183,205,104, 52,222,154, 52, 95, 84, 84, 4,198, 24, 76, 38, 19,182,111,223,110,240,183,217,
+ 62,171, 44,175, 0,200,206,184,114,229,145,206,157, 59, 23,164,164,164, 64,175,215,227,252,249,243,216,183,111, 31,126,252,241,
+ 71,236,221,251,127,236, 93,119, 84, 84,215,215,221,119, 58, 83,232,189,139, 20, 65, 4, 21,177,119, 81,177,119,141, 70, 99, 18,
+ 99, 52,137,137,177, 36,209,104,108,137,198,152,166,166,153,104, 18,107,130, 93, 36,118, 69,137, 26, 43,168,128, 10,138, 32, 34,
+ 48, 67,155,222,203,253,254,128,225,135, 74, 25, 82,190,196,100,246, 90,179, 24,102,238,219,239,220,247,238,188,183,223,185,231,
+158,115, 12,119,238,220,129,201,100,130,191,191, 63, 40,165,216,191,127,191,204,164, 80, 12,174, 0, 74,109, 60, 6,255, 73,180,
+240,241, 73,240,246,242, 42,244,244,240, 40,106,225,227,147,240,248,247,206, 64, 78, 78, 78, 14, 76, 38, 19, 66, 67, 67,221, 26,
+139,195,162, 38,211, 89,171,112, 9,108,217,114,117,112, 61,194, 37, 24,240, 12, 14, 11, 91,109, 21, 46,212,100, 58,219, 92,155,
+ 29,129,245,111,189,245,150,134,195,225, 32, 41, 41, 41,212, 24, 30,126,139, 5, 76, 18, 1, 81,125, 0, 78, 83,219,251, 2, 95,
+189,247,222,123,165,132, 16,108,223,190,221,195, 57, 44, 44,147, 5, 76,117, 6, 90, 56, 3, 45, 88,192, 84,231,176,176,204,164,
+164, 36, 15,147,201,132, 57,115,230,148,250, 2, 95, 53, 66,249, 6,165,116, 56,165,180, 23,165, 52,240,135,111,215,225,208,129,
+221, 86,113,245, 18,165,244, 18,165,116, 10,165, 52,179,185,125,181,195, 14, 59,236,120, 26, 64,234,139,115, 98,119, 94, 41, 6,
+168, 87,239, 46,109,113,249,218,109,153,135,171,211, 81,235,119,149, 89,187, 91,245,139,117,106,251,245,215, 95,131,205,102,227,
+193,131, 7,200,206,206,134,147,147, 19,158,125,246, 89,157, 70,161, 24, 97,173, 69, 72, 8,233, 79, 41, 61, 81,195, 89, 93,239,
+ 76,150, 43, 10, 99, 93,111,121,228, 80, 10,211,217,217, 25, 74,165,178, 54,173,128, 64, 32, 0,159,207,199,149, 43, 87, 48,116,
+248, 72,115,153,160, 87,109,162, 81,107,189,179,186,156, 32,132, 9, 0,157, 1, 65, 58, 48,207,203,207,111,254,226,197,139,249,
+137,137,137,224,112, 56, 8,104, 17, 81, 26, 58,232,227,245, 12, 6, 49, 21, 85,200, 23,133,181,240,115,206,206, 45, 0, 64,170,
+107, 22,214,212, 34,172,207,206, 32,253,153,208,125, 91, 62,117,106,223,190, 58,206, 92, 42,149, 66, 44, 22, 67, 34,145, 64, 42,
+149, 66,165,170, 78,245,144,146,146,130, 67,105,183,228,154,128,113,121, 13,217,249,191,190,223,118,244, 51, 92, 12,217,177,109,
+ 11,211,211,211, 19, 98,177, 24,101,101,101,144, 74,165,208,104, 52, 48,155,205,168,172,172,196,247, 63,110, 49, 87,136,122,229,
+ 91, 19, 57, 54,202,169,122,192,119, 83,158,243,143,139, 14,166,211,166, 77,115,116,114,114,130,197, 98, 65, 85, 85, 21, 10, 11,
+ 11,113,239,222, 61,164,165,165,169, 36, 82, 61, 84, 30, 3,138,172,137, 70,235, 61,158,127,214,160,122, 26, 57,107,198, 18, 0,
+248,249,250, 22,223,191,127,223,203,108, 54,195,223,223,223, 36,173,172, 92,205, 5,142, 57, 2, 37, 0,104, 57,176,120,237,250,
+245, 47,142, 28, 57, 18, 29, 59,118,124, 80, 42, 22,135,212, 55,150, 64, 8, 51, 18,112, 86, 7, 4,100, 93,186,116,201,167,176,
+176, 16,207, 61,247, 92,249,253,187,119,107,211, 52,200,128,158,193, 97, 97,171,147,146,146, 60, 90,182,108,137,216,216,216, 82,
+ 7,107,154,134,250,199,103,131,191, 77,105,206, 47, 33,175,140,142,233,248,234,171,175,194,100, 50, 33, 45, 45, 13, 23, 47, 94,
+196,253,251,247,113,238,220, 57,169,147, 80,248,140,181, 22, 97, 67,227,115,112,132, 42,116,251,246,109,132,195,225,224,199, 31,
+127, 68,122,122, 58, 0, 32, 46, 46, 14, 47,188,240, 2, 76, 38, 19, 38, 79,158, 66,127,185,205,207,107,108,124, 18, 66, 98, 0,
+124,130,106,113,215,145, 82,234, 64, 8, 41, 6, 16,216,156,152,171,167,114, 44,217, 57,237,156,118, 78, 59, 96, 67, 45,194, 15,
+190,129,243,163,229, 56,166, 23,239,254,118, 57,171, 71,207, 94, 81,203,151, 45,101,116,234,212, 9,129,129,129,136,139,139, 67,
+ 97, 97, 33,207,197,197,165,169,122,103,202, 94,131, 38,221,107,219,182,173,203,130, 5, 11,156, 7, 14, 28,200, 14, 12, 12, 4,
+165, 20,233,233,233,216,187,119,175, 97,211,166, 77,114,181,247,112,233,213,212,159,148,182,212, 59,187, 8,168, 1,172, 8, 40,
+ 46,254,238,181, 87, 94, 89,218,190, 67,135,105,203,150, 45, 99,136, 4,124,246,170, 69, 47, 57, 0,192, 7, 95,238,116, 30, 57,
+238, 89,172, 13, 7,122, 79,170,191,206, 91, 93, 59, 11,139,166,223, 31, 50, 58, 33,124,222,172, 23,205, 19, 38, 76, 16, 58, 57,
+ 57, 33, 48, 48, 16,174,174,174,200,203,203, 67, 81, 81, 17, 61,120,240,160,242,183,140, 28,246,254, 99,151,239, 59, 56,251,218,
+ 82, 55, 80,209, 43,113,124,254,144, 33, 67, 92,167, 78,157,234, 24, 31, 31,207,230,241,120,224,241,120, 16,139,197,184,115,231,
+142,225,224,193,131, 74,181,215,224,170,171,169, 73, 10, 27,107, 17,106,122, 77, 92,126,231,215,227,203,230,100,221,184, 49,197,
+ 2,180, 51, 24, 12,254,102,179,153, 48, 24,140, 18,139,197,114,195,160, 80,252,160,139, 91,246,185,189, 22,161,109, 48,155,205,
+ 28,179,217, 12,169, 84,138,227,199,143,179,238,222,189,187,248,218,181,107,139,139,139,139, 97, 52, 26, 49,118,236, 88,196,197,
+197, 33, 53, 53, 21,101, 98,241,193,198,184,110, 3, 50, 94, 81,209, 11,211,167, 79, 63,188,109,219, 54,198,181,107,215, 60,126,
+252,241,199,239,235, 19, 46, 83,166, 76,177,136, 11, 11, 95,208, 53,146, 3,171,137,223,102,249,145,164, 47,174,141, 26, 51, 46,
+122,217,146,197,236,110,221,186,193,195,195, 3, 61,123,246,132,193, 96,112,105,221,186,117, 83,191, 77, 69,175, 65,207,228,181,
+107,215, 78,248,249,231,159,251,188,248,226,139,152, 53,107, 22, 0, 64,163,209,224,216,177, 99,152, 51,103, 78,105, 33,171,179,
+170,169,241, 89,227,153,178, 10,175, 51, 0,122, 1,200,179, 7,180,219, 97,135, 29,255, 21, 52, 89,139,240,215,139,153,168, 91,
+142,163, 26,190,217,166,160,169,119,103,204, 95, 29,203, 52,202, 93,217, 68,235,148,155,147, 67,154,170, 73, 88, 91,239,204, 57,
+ 66,233,126,239,231, 78,171, 62,248, 96,246,218,181,107, 19,172,169, 24, 4, 2,193, 13,141, 74,117,210, 83,167, 91,167,118,142,
+ 56,217,220,218,121, 69,128, 24,192, 43,174, 87,175,174, 31, 54,114,236, 26, 7,183, 80,246,187, 43, 55,105,153, 12,134,254, 78,
+113, 25,214,134, 3, 66, 27, 22, 60,170,245, 64,150,212,215, 36,118, 31,119,251,189,183,222,154,247,193,138, 21,157, 68, 34, 81,
+111,131,201, 20, 97,177, 88, 0,139, 37, 87,173, 82,157,161, 6,195, 37, 93,220,146, 79, 29,156,125,169,205,117, 3, 93, 90, 43,
+220,242,119,119,218,252,195, 15,111,236,218,181,235,137,190,187,235,116,235,213, 46,173, 79,216,210,247,186,109,180,192,121, 72,
+ 36,231, 27,106, 75, 96,175, 69,104, 43, 88, 22,203,203,174,174,174, 91, 19, 18, 18, 28,250,247,239,143,161, 67,135,162, 91,183,
+110,176, 88, 44,160,148, 66,161, 80, 96,231,206,157, 88,179,102, 77,110, 8,176,162, 41, 62, 29,112,146,119,232,208,224,118,237,
+218,253,216,152,112,169, 17, 87, 77,198, 28, 54,254,219,228,229,154,156, 71, 20, 76,124,109, 85,184, 94, 94,226,226, 46, 48,249,
+100,101,222, 96,216,254,219,140, 84,152,211,119,118, 30, 59,122,244,107, 76, 22,171,103,205,138, 70,122, 51, 59,251,170,181,216,
+ 51,226, 94, 56,222,204,177,100,205, 61,103, 15,104,183,195, 14, 59,254, 51,104,176, 22,161,213,203,195, 98,177, 36,121,251,103,
+ 60,219, 24, 9, 27, 72,168,241, 92,161,201, 90,132, 53,239, 11, 0, 5,116,186,247, 31, 73, 34, 90,103,181, 32,251,177,246,205,
+233, 84, 21,112, 27, 38,221, 48, 72,178,129,228, 87,170,249, 58,125,240, 78,221, 62, 53,180,237,163,118,114, 42,181,192,175, 80,
+ 42,127,133, 82, 89,111,118,105, 54,139, 83,217,148,157,143,247,189, 16,144,255,209,190, 63,206,217,224,193,248,157,237,255,203,
+120, 88, 94,190, 31,128, 40, 32, 37,197,251, 72, 74,202,132,121,115,231,142,245,245,243, 11,243,240,240,112,117,116,116,100, 92,
+184,112,225,158, 73,171, 93,223, 30,216, 92,227, 61,109, 18, 58,224,100,100, 97, 97,155,241,163, 71,191, 70, 88,172, 30,117,133,
+ 11, 53,153,206,133, 2, 95, 53,230,185,178,162,185,191,205, 64,158,111, 66,141,231, 10, 76, 27,127,155, 69,213,118,172,132,201,
+180, 18,215,159,204,106,242, 59,126,155, 31, 16, 66, 20,176,103,104,183,195, 14, 59,254, 75,248, 43,235,240, 0,232,111,231,180,
+115,254, 91, 56, 81, 29,204,238,244, 79,183,211,206,105,231,180,115,218, 57,159, 70,206,127,219,171,193, 41, 66, 59,236,176,227,
+ 81,208,234,160,115,155, 74, 45,217, 97,135, 29,118,216,241,223, 6, 1,208,191,190, 47,104, 51, 86, 7, 16, 66,234,179,190,216,
+255, 0, 0, 32, 0, 73, 68, 65, 84,229,104, 12, 77,241,219, 57,237,156,118, 78, 59,167,157,211,206,105,231,252,247,113, 54,197,
+221, 28,253,241,143,198, 95,233, 30,195, 83,226,150,180,115,218, 57,237,156,118, 78, 59,167,157,211,206,249,247,114,254,219, 94,
+205, 74, 52,106,135, 29,118,216,241,111,197,242,229,132, 1, 16, 2, 44,103, 0,187,153,192,120,102,245,255,191, 31,227,199,147,
+122,147,208,190,241, 6,113,252, 35,188,118,216, 97,199, 63, 31,246, 24,172,191, 17,132,144, 32, 31, 31,159,111, 1,144,210,210,
+210,151, 41,165,133,127,183, 77,118, 60, 9,119,119,247, 4,147,201, 4,153, 76,214,100, 10,133,167, 17,109,194,201,104,202, 64,
+235,218, 15, 40, 10,179,115,233,214,250,218, 70, 71,144,231, 64,254,151, 75,139, 88,112, 51,235, 14,221,103,235,190, 8, 33,140,
+ 81,131, 61, 63, 1,128,253,135,203,230,211,191, 32, 47, 22, 33,164,149,167,167,231, 81, 22,139,197, 50,155,205,175,136,197,226,
+148,134,218,142, 31, 63,158, 9, 0,158,252,189, 11, 93,220, 60, 22,188, 55,143,176,245,186,143,165, 58,173, 86,198, 96,177,242,
+185, 28,193, 89, 19, 67,120,184, 72, 60, 56,187,190,237,119,237,218,213, 96,117,237,152, 8, 50, 56, 42, 58,122,120,135, 88,126,
+222, 39,235, 58,173,237, 29,234,193,190,247, 32, 67,244,205,214,194,111, 61, 93,253,135,207,126,137,149,194,163,230, 41, 31,125,
+ 79,149, 13,113,216,241, 36, 62, 36,196,205, 0,196,178,121,188, 64,179,201,228, 77, 0,202,100,177,196, 70,157,238, 1, 7,184,
+190,128, 82,233,191,157,147,195,227, 5,152, 77, 38,111, 0,248, 39,218,105, 71, 53, 26, 20, 88,142,142,142, 87, 24, 12, 70, 64,
+221, 34,181,140,154,130,206,214,207,234,126, 71, 8,129,217,108, 46,170,172,172,140,183,117,231,132, 16, 39, 0, 19, 0, 88,151,
+154,239, 0,176,147, 82,250,187, 2,137, 9, 33, 78, 28, 14,103,190, 80, 40,236,167,209,104,218, 0, 0,159,207,207, 82,169, 84,
+167, 12, 6,195, 39,191,135,151, 16,194, 2, 48, 94, 36, 18,245,101, 48, 24,125, 41,165,132, 82,154,170, 84, 42, 79, 1,216, 69,
+ 41,181,181,244, 78, 93, 78,190,151,151,215,202,168,168,168, 73, 11, 23, 46,172,112,119,119,143,156, 51,103,206,101, 79, 79,207,
+159,202,203,203, 23, 81, 74,255,214,186,137, 86, 16, 66,194,124,124,124,118,176,217,108,230,131, 7, 15,250, 2, 64, 96, 96, 96,
+170, 94,175, 55, 75, 36,146,103, 41,165,119,155,201, 39, 4,208, 69, 36, 18,197,139, 68,162, 94,102,179,185,181,197, 98,129,197,
+ 98,185,169, 84, 42,211, 12, 6,195, 21, 0, 23, 40,165,170,191,162, 63,191, 7,132, 16, 71, 47, 47,175,109,132, 16, 16, 66, 34,
+ 40,165,138,191,219,166, 63, 27,148,129,214,217, 89,183, 34,173,255, 71,183,137,106,184, 49, 65, 80, 61,109,109, 22, 88, 67, 18,
+ 92, 6, 13, 31,222,142, 1, 0, 6,195,229, 65, 0, 14,253, 14,147, 27, 54,143,144, 86, 99,198,140, 57,191,109,219, 54, 87,157,
+ 78,135,151, 95,126,121,135,179,179,243, 87, 50,153,108, 97, 99,219, 57, 58, 58,206, 89,241,254,151,130,154,107,154,151,197, 98,
+241, 42, 41,121, 16,113,251,214,141, 65,183,111,103,174, 50,168,246, 93, 48, 80,230, 12,169,122,196, 45, 91,236,136, 14, 35,195,
+ 70,142, 31, 61,116,197,138,101,152,244,204,164, 22, 89, 89, 90,190,191, 83, 30, 87,110, 16,134,123,120, 4,140,120,231,221,143,
+200,133,223, 78,143,216,181,115,211,169,119,166,145,126,118,145,213, 52, 8, 33,228, 3, 22,171,139,107, 84, 84,175,103,246,239,
+135, 40, 48,144,197,226,241, 24, 0, 96,210,233, 2,149, 15, 30,248, 38,141, 24,209,121, 57, 33,167,151, 82,122,209,206,249,255,
+207,105,199,163,104, 80, 96, 49, 24,140,128,135, 15, 31,122, 9,133, 66, 0,213,177, 90,102,179, 25,102,179, 25, 53, 55, 69, 80,
+ 74,107,255,154, 76, 38, 68, 69, 53,114, 97,174, 1, 33,132, 1,160, 31,128,231,251,244,233, 51,238,147, 79, 62, 97,199,198,198,
+ 90, 75,123,244,124,247,221,119,191, 36,132,236, 1,176, 25,192, 73, 91,159,112, 9, 33,137, 66,161,112,251,199, 31,127,236, 52,
+ 96,192, 0,150,159,159, 31, 8, 33, 40, 45, 45,237,114,226,196,137,248, 57,115,230,188, 66, 8,153, 76, 41, 61,218, 52, 91, 45,
+103,140,163,163,227,238,209,163, 71, 7,244,238,221,219, 33, 58, 58, 26,102,179, 25, 25, 25, 25, 47, 94,185,114,101,226,158, 61,
+123,150, 18, 66,198, 81, 27,235,169, 17, 66,136, 72, 36,154,234,239,239,191,114,201,146, 37,110,147, 39, 79,230,102,102,102, 86,
+133,134,134,146,179,103,207,122,238,220,185,243,149,213,171, 87,143,119,116,116, 92,164, 84, 42,183,208,154,137,238,198,224,228,
+228,116,133,193, 96, 4, 0, 77, 11, 96, 0, 54,139, 96, 66, 72,251,144,144,144,157,191,254,250,107, 72, 65, 65,129,121,212,168,
+ 81, 91, 1,224,212,169, 83,177, 70,163,145, 12, 28, 56,240, 48, 33,100, 2,165, 52,195,198,190,183,117,115,115, 59, 48,105,210,
+ 36,183,176,176, 48, 65, 72, 72, 8, 17, 10,133, 96, 50,153,144,201,100,126,153,153,153,253, 47, 94,188,168, 57,113,226, 68, 37,
+ 33,100, 4,165,244,201, 4, 76, 13,115,119,243,242,242,154,194,102,179, 99, 76, 38,147, 63, 0,176, 88,172,135, 70,163, 49, 83,
+ 34,145,108,163,148, 54,152,128,181, 41,120,123,123,127,177,114,229, 74, 15,137, 68, 66, 87,175, 94,253, 5,128,169,191,151,235,
+159,142, 29, 63,237,194,149,203, 23, 1,128, 67, 8, 33,143,143, 63, 66, 8,105, 29, 1,206,155,111,206, 69,124,199,206,120,118,
+210,248, 38, 57, 71, 13,245, 88,193,101,178,220,213,122,221,197,114, 25,227, 64,144, 23,119,244,228,241,241,121, 0,112,228,240,
+141,209,157, 59,187,157,245,112,182,140, 20,112,121,157,245,102, 83,197,254, 95,202,151,216,106, 47, 33,164,149,191,191,255, 81,
+ 87, 87, 87, 65,101,101,101,105, 89, 89,217, 55, 99,198,140,249, 96,243,230,205,174,247,238,221,195,131, 7, 15, 48,123,246,108,
+ 81, 81, 81,209,107, 60, 30,239, 55,157, 78,215,160, 39, 75,161, 80,172, 91,249,254,220, 37,142, 78,174, 76, 1, 95, 8,145,163,
+ 19, 66, 66, 34,208,177, 83, 79,244, 31, 48, 2,121,121,183,187,236,252,121, 83, 58,179,100,247,135,102,110,220, 7, 82,105, 72,
+131,215,165, 54,145,164,183, 85, 92, 45, 89,178, 12, 57,183,110, 41, 10,242, 25,175,255,178,159, 37, 24,156, 16,197,211, 27,148,
+ 5, 23,126, 59, 29,210,165,107, 31, 0,136,223,181,115,211,169,229,147, 73,194,210,237,255, 62,241,254,103,129, 16, 66, 86,176,
+217, 83, 19, 63,255,220, 43,238,149, 87, 56,202,252,124, 67,222,134, 13,106,113, 90,154,153,197,227,209,192, 65,131,136,103,223,
+190, 14,175,220,188,201, 57,183,122,117,175, 85, 92,110,232,187,122,253,118, 59,231,255, 31,167, 29, 79,162, 65,129, 69, 8,129,
+ 80, 40, 68, 82, 82, 18,216,108, 54, 88, 44, 22,216,108,118,131,239,131,130,158,168,192, 81, 31,231, 24, 31, 31,159, 47,191,250,
+234, 43,239,196,196, 68, 56, 56, 56,212,126,199,100, 50, 49, 96,192, 0,244,239,223,159, 93, 92, 92, 60, 49, 41, 41,105,226,170,
+ 85,171,196,132,144, 89,148,210,189, 77,240,246,141,140,140,220,123,236,216, 49,190, 86,171, 69, 90, 90, 26,170,170,170,192,229,
+114, 17, 16, 16,128,129, 3, 7,178,110,221,186,229, 54, 96,192,128,189,132,144, 97,148,210, 84, 27,108,141,247,242,242, 58,179,
+107,215, 46,135,118,237,218,145, 59,119,238, 32, 46, 46, 14, 0, 32,147,201, 48,106,212, 40,135,201,147, 39,135, 77,156, 56,241,
+ 2, 33,164, 55,165,244, 74, 19,124, 29,124,124,124,182,140, 30, 61,218,111,213,170, 85, 78,142,142,142, 40, 40, 40, 40,241,241,
+241,137,176, 30,239,137, 19, 39,114,135, 15, 31,238,187,102,205,154,117,187,119,239,126,139, 16, 50,149, 82,122,181, 49, 94,171,
+ 16, 22, 8, 4, 16,139,197,216,177, 99, 7, 94,123,237, 53, 48,153, 76, 72, 36, 18,236,220,185, 19,175,191,254,186, 85,200,216,
+ 36,130,133, 66, 97,255,118,237,218,125,127,234,212,169, 0, 23, 23, 23,248,249,249, 49,222,123,239,189,152,208,208, 80,126,139,
+ 22, 45,152, 37, 37, 37,216,187,119,111,232,148, 41, 83, 14, 56, 56, 56,188,168,213,106,155,156, 58,243,246,246,254,225,151, 95,
+126, 9,202,202,202,194,134, 13, 27, 80, 89, 89, 9, 46,151, 11, 23, 23, 23,248,248,248, 32, 34, 34,130, 44, 88,176, 64, 48,124,
+248,112,193,172, 89,179,126, 0,208,190, 41, 78, 66, 72, 59, 47, 47,175,111, 39, 78,156, 24,186,124,249,114, 23, 31, 31, 31, 88,
+ 31, 8,100, 50, 89, 64, 65, 65, 65,151, 37, 75,150,140,243,246,246,190, 39,145, 72,102, 80, 74,175, 53,217,249, 71,249,219, 39,
+ 36, 36, 12, 27, 53,106, 20,179,164,164, 4,219,182,109, 27, 70, 8,105,111,171,168,124,218,112,229,242, 69,188,252,234,108,165,
+ 95, 96, 32,231, 96,242,207, 35,149,202,239,206,138, 24, 46, 44, 0, 80, 90,164,166,238, 93, 68, 61,134,143,152,200, 25, 50,116,
+148,242,187,175,215,137,108, 17, 88, 92, 38,203, 61,105,251,204, 7,105,231,114, 91, 31, 61, 81,208,127,212,136,254, 12, 22, 39,
+ 50, 12, 0,230,205,157,206,221,159,124,226,171,196,254, 45, 74,122,117,143,120,240,204,228, 13,129,182,218, 74, 8,105,213,170,
+ 85,171,211,233,233,233,222, 60, 30, 15,149,149,149,238,223,125,247,221,103, 61,122,244, 96,228,229,229,225,214,173, 91,200,207,
+207,135, 76, 38,195,128, 1, 3, 68, 87,175, 94,253, 6, 64,131, 2,171, 76, 51,102,101,168, 87,249,122,127,119,215, 16,173, 65,
+230,101, 54, 85, 68,159, 58,113,173,237,158, 93,234, 56, 47,159,128,136,137, 19, 95,198, 59, 11, 63, 98,239,219,179,101,201,153,
+180, 99, 0, 66, 26,206,224, 79,209,237,221, 69, 11, 33, 87,232, 48,121,210,116, 76,153, 52,221,157, 66,239, 75,205, 90,161, 94,
+ 83,229,226,204,201, 74,217,242,243,174,209, 0, 2,234,136,172,147,118,145,213, 48, 86,176, 88,157,135,125,249,165,103,204, 75,
+ 47,241,174, 45, 95,174, 42, 79, 75,211,132, 15, 25, 82, 21, 55,115,166, 14, 0, 20,249,249,156,156,165, 75, 5,158,189,122,241,
+187,206,159,239,106,214,235,125,222, 39,164,211,123,148, 94,106, 46,103,208,132, 9,230, 37, 63,254,216, 49,109,238,220, 62,196,
+104,100, 14,234,218, 53, 99,245,182,109, 15,255, 8,231,159,105,103,241,153, 51,186,202,208, 80,196,141, 26, 85, 17,228,229,165,
+251, 51,251,254, 71,236,180,227, 73, 16, 74, 41, 8, 33,189, 1,156, 6,176,156, 82,186, 12, 0, 92, 92, 92,196, 82,169,212,107,
+239,222,189, 77,138, 43, 54,155, 13, 95, 95, 95, 68, 68, 68, 72,196, 98,177,119,131, 59, 35,228,129,197, 98, 9,160,148,214,122,
+ 91, 26,130, 78,167, 67,110,110, 46,218,182,109, 91, 68, 41,109,240,194, 75, 8,113, 20, 8, 4,121,183,110,221,242,200,206,206,
+198,149, 43, 87, 16, 26, 26, 10, 87, 87, 87,176,217,108, 24,141, 70,200,229,114, 68, 70, 70,130,199,227,161, 67,135, 14,229, 42,
+149, 42,180,177,169, 30, 66, 8, 79, 40, 20,230,158, 57,115, 38, 48, 46, 46, 14,151, 46, 93, 66, 96, 96, 32,124,124,124, 0, 0,
+249,249,249, 56,123,246, 44,134, 12, 25,130,244,244,116,140, 29, 59,246,129, 74,165,138,160,148,234, 26,226,116,119,119, 47, 57,
+117,234, 84, 81,108,108,172, 86,165, 82, 49,196, 98, 49, 59, 45, 45,205,164, 80, 40, 68, 50,153,140, 45,149, 74,217,114,185,156,
+165, 82,169,216, 12, 6,131,163,209,104,216, 39, 79,158,100,234,245,122,167,198,142,147,245, 60, 37, 39, 39, 35, 54, 54, 22,123,
+247,238,197,188,121,243,112,238,220, 57, 4, 6, 6, 98,215,174, 93,152, 63,127, 62,110,223,190, 13, 15, 15, 15, 68, 71, 71, 55,
+122,142, 0, 32, 60, 60,252,206,141, 27, 55,194, 56, 28,142,181,238,162,181,158, 29,202,202,202,112,247,238, 93, 60,124,248, 16,
+225,225,225,152, 52,105,210,221,162,162,162,240,198,248, 0, 32, 32, 32,160, 44, 43, 43,203,163,109,219,182, 16,139,197,112,113,
+113,129,179,179, 51, 92, 92, 92,106,223,135,134,134, 98,238,220,185,240,241,241,145,104, 52,154, 70,109, 36,132,180,143,141,141,
+ 61,122,242,228, 73, 15, 39, 39, 39,148,150,150, 66, 46,151,131,197, 98, 65, 32, 16,192,195,195,163, 86,192,231,230,230, 98,232,
+208,161,229,121,121,121,137,205,240,184, 49,188,189,189,111, 93,191,126, 61,130, 82,138,194,194, 66,220,190,125, 27,175,190,250,
+106,174, 86,171,141,250, 43, 98,135,254, 46,212,137,171,226, 76,125,225,101,206,168, 17, 35,213, 25, 87,142, 88,248, 56,131, 78,
+237,249, 82, 0,184,148,161,113,209,160, 55,218,199, 15, 98,236, 79, 62, 32,216,178,249, 59, 54, 44,240, 6,193,237,236, 28,250,
+126, 67,220,195, 18, 93,158,155, 63,123, 80,235, 94,221,123,177,228,114,234,243,253,214,141,157,238,223,203,243, 6,128,224,150,
+161,226,105,207, 77,191,228,228, 68, 74,211,206,165,153, 62, 89,119,228,102,202, 81,105,189,177, 95,117, 65, 8, 9,141,136,136,
+248, 45, 57, 57,217,195,203,203, 11,206,206,206, 80,169, 84, 48, 24, 12,200,206,206,214, 38, 37, 37, 25,157,156,156, 28, 75, 75,
+ 75, 33,149, 74, 65, 8, 65,114,114,114, 33,165, 52,248,113, 46,107, 12, 22, 0,188, 58,184, 53, 59,186, 95,132, 43,135,103,226,
+243,217, 57,190, 32,102, 30,161, 34,239, 83,167,126,107,155,122,230,215,103,135, 12,123,198,179,107,215,190,248,104,213, 59,198,
+194, 82,113,156, 84, 61,226, 86,125, 49, 88,173, 35, 72,191, 81, 99, 71,143, 95,177, 98, 25,150, 45, 89,142,148,228,253, 50,145,
+144,161,115,114, 97, 59,247,234,210, 93, 59,247,181,145, 15,212,202,162,192,207,190,218, 56,105, 64,226,248,128, 46, 93,251,224,
+194,111,167,177,107,231,166, 43, 28,179,209, 62, 93,248, 24,150, 19,226,234, 18, 26, 58,227,141,220, 92,206,181,101,203,148,166,
+226,226,170,248, 57,115,202,235,107, 91,116,252,184,144,235,231,231,228, 58, 98,132,219,186,224, 96,106,148, 72,190,173, 47,134,
+168, 62,206, 19, 34,145,203,207,135, 15, 39, 80, 54,187,247,219,239,188,195, 31, 54,108, 24,228,114, 57,246,236,217,131,111, 55,
+108,208,249,250,250,222,240,203,204, 76,143,145,203, 23,219,202, 25, 63,103, 78,185,217,108, 38,227,231,207, 31,144,149,159,223,
+175, 84, 34,105, 1, 0,190,110,110, 15,226, 67, 67,175,252,144,146,114,251,139,144, 16,139,173,118,110, 60,114,196,123,119, 65,
+193, 75,110,110,110,124,177, 68,194,226,113,185, 21, 93,162,163,119,125,189,104,209,105,211,245,235, 28,135,128, 0, 39,231, 97,
+195,154,221,247,248, 57,115,202, 43, 21, 10,214, 27, 31,124,208,253,190, 88,220, 66,169,211,133, 75, 21, 10, 31,179,209,200,112,
+ 18, 8, 42, 90, 70, 70, 74, 52,105,105, 37, 45,213,234,217, 27, 41,109,176, 18,202, 31, 69,125, 90,228,105,134,213,131,117,154,
+ 82,250,196,106, 25, 74,169, 77,222, 43, 54,155,253,200,116, 84, 35,224, 16, 66,112,245,234, 85,184,187,187,195,199,199, 7, 60,
+222,163,197, 1,203,202,202,112,238,220, 57,220,188,121, 19,237,218,181, 3, 0, 78, 99,132, 60, 30,239,205, 53,107,214,184,232,
+245,122, 92,185,114, 5,241,241,241,224,241,120,224,112, 56,143,136, 63,137, 68,130, 54,109,218,224,237,183,223,118, 94,181,106,
+213,155,104,164,134, 28,139,197,154, 53,125,250,116, 47,171,199,234,193,131, 7,232,208,161, 67,237,247,158,158,158,200,200,200,
+ 64,124,124, 60, 2, 2, 2, 48,110,220, 56,175,109,219,182,205, 2,240, 73, 67,156, 92, 46,151, 17, 27, 27,219, 17, 0,132, 66,
+ 33, 24, 12, 70,142,147,147,147,167,183,183,183,208,201,201,233,137, 62,254,248,227,143, 82, 6,131, 97,108,172,239, 64,245,180,
+ 96,105,105, 41, 98, 98, 98, 32,147, 85, 87, 90, 81,169, 84, 8, 15, 15,135, 92, 94, 29,114,166,211,233,224,231,231, 7,141,166,
+241,208,174,118,237,218, 45,139,138,138, 26,216,167, 79, 31, 30,155,205,198,181,107,215, 16, 23, 23,135,164,164, 36, 4, 5, 5,
+ 65, 32, 16, 32, 55, 55, 23,177,177,177, 56,115,230, 12, 60, 61, 61,209,166, 77, 27, 94,135, 14, 29,126,173,172,172, 76, 45, 40,
+ 40, 88,214,136,157, 12,145, 72,132, 51,103,206,224,135, 31,126, 64,126,126, 62,138,139,139,225,232,232,136,246,237,219, 35, 58,
+ 58, 26,221,186,117, 67,110,110, 46, 72, 19,131,137, 16,226, 19, 17, 17,145,114,233,210, 37, 15, 74, 41,182,109,219, 6,165, 82,
+ 9,189, 94, 15, 6,131, 1, 7, 7, 7,184,186,186,162, 95,191,126,240,244,244, 68, 68, 68, 4,118,238,220,233, 49,120,240,224,
+ 67, 53, 30,168,210,166,142,171,171,171,235,236,165, 75,151, 6,122,121,121,161,160,160, 0, 50,153, 12,222,222,222,232,211,167,
+143,255,137, 19, 39,102, 3,248,188, 41,142,167, 5,214,128,118, 66, 8, 57,152,252,243,200, 32, 95,110,235, 78,113,138,224, 27,
+ 87, 89, 97,135, 78,220,105, 11, 0,174,174,193,215, 59,117, 80,220,189,116,229,200,253,131,201, 63, 95,188,153,131, 3,182, 76,
+ 97,151,203, 24, 7,142,158, 40,232,223,182, 77, 79,230,250,175,150,142,124,121, 90, 34,207,205,181, 39,145, 75,118,226,220,197,
+ 27,193,239, 45, 91,224,245,254,178,213, 7,143,158, 40, 48,151,203, 24, 43,109,177,183, 77,107,223, 47, 78,239,247,242, 80, 26,
+190, 70,198, 69,103,128,221, 21, 45, 67, 91, 65, 46,151,195,193,193,193, 97,210,164, 73,230,133, 11, 23,170,157,156,156, 4,132,
+ 16,164,166,166, 74, 0, 36, 54,197,171,245,114,165,102,131,209, 68,185, 76, 11, 37,142, 26, 98,174,228,102,102,223, 67,239,222,
+131,197, 29,227,227, 86,173,254,248,243,119, 67, 67, 35, 61, 39, 77,158,193,254,228,147,197, 27, 0,244,172,143,231,102, 46, 61,
+ 21, 29, 70,248, 0,134,174,120,127, 25,242,242,114, 93, 95,126, 94,186,156,197,227,251, 69, 5,119,119,220,240, 67,234,160,240,
+240,144, 22, 47,191,240,226, 47,223,253,248,195, 80,212,241,100,253,252,211,119, 7, 8, 33, 9,182, 28,219,255, 16,218, 78, 73,
+ 73,129,178,176,208, 88,249,235,175,218,132, 47,191, 44, 15, 76, 76,252, 92,111, 48,120, 88, 47, 21, 12, 66, 64,172, 33, 18, 22,
+ 11, 97,189,253, 54,131,178, 88, 48,186,186, 62,191, 0,104,213, 20,231,188,146,146, 49,207,190,244,210,208, 3, 71,142, 32, 36,
+ 36,164,246,126,230,226,226,130,249,243,231, 99,206,156, 57,188,140,140,140, 78,187,119,239,238,244,201,199, 31,123, 47, 0,198,
+216, 98,231,177, 11, 23, 92,103,174, 88,177,168, 93,124,124,208,214, 29, 59,120, 97, 97, 97, 0,128,187,119,239, 70,124,180,122,
+117,112, 76,108,172,120,213,155,111,110,206, 90,184,176, 13,128, 95, 27,227, 44, 77, 75,211,239, 46, 40,120,233, 84,106,170, 75,
+ 76, 76, 12, 0,224,246,237,219, 94,235,214,173,155,222,102,220,184,201, 43, 94,121,101,241, 48,173, 86,234, 84, 86,198, 27,246,
+197, 23,172,159,199,143,111,146,211,106, 39, 0,244,121,241,197, 55,123,246,237, 27, 61,230,165,151,220,130,130,130,136, 72, 36,
+130,193, 96, 64,113,113,177,107, 86, 86, 86, 88,138, 66, 33,223,119,225,194,182,141, 53, 69,220,255, 34,212,171, 69,158, 86, 88,
+ 5, 86, 31, 66, 8, 5,208,135, 82,122, 6,168,190,113,155,205,102,155,196, 21,139,197, 66, 77, 16,176, 77, 59,165,148,162,188,
+188, 28,229,229,229,181, 83, 68, 18,137, 4,167, 78,157, 66,110,110, 46,216,108, 54, 56, 28, 14, 12,134,166,107,195, 10,133,194,
+254,253,251,247,103, 93,184,112, 1,161,161,161,224,243,249,181,118, 89, 95, 28, 14, 7,190,190,190,144,203,229, 72, 72, 72, 96,
+175, 95,191,190, 63, 26, 17, 88,206,206,206, 67, 38, 76,152,192,181,254,175, 84, 42,193,100, 86, 63,232,234,116, 58, 40,149, 74,
+ 84, 86, 86, 66, 42,149, 66,171,213,162,107,215,174,220,148,148,148, 33,104, 68, 96,213,133, 90,173, 86, 74, 36, 18,151,158, 61,
+123,186,110,222,188,249,118,215,174, 93, 35,235,126,127,250,244,105,173, 86,171,101, 51, 24, 12,155,234,220,109,223,190,189,246,
+216, 63,124,248, 16, 27, 54,108,168,253, 46, 55, 55, 23,235,215,175,175,205,203,209,216, 57,138,138,138, 26,188,109,219,182,248,
+173, 91,183, 86, 49,153, 76,220,190,125, 27, 59,118,236, 0,165, 20,158,158,158, 80,171,213, 16,139,197, 72, 77, 77,133,201,100,
+130, 72, 36,130,191,191,191,195,172, 89,179,122, 44, 95,190,156, 13, 96, 89, 67,220,102,179,217,204,100, 50, 17, 28, 28,140, 37,
+ 75,150, 64,171,213,130,195,169,214,149,114,185, 28, 82,169, 20,233,233,233, 40, 40, 40, 64, 83, 55, 23, 7, 7,135,113, 91,183,
+110,245,226,114,185,208,104, 52, 80, 40, 20,120,240,224, 1,238,223,191,175,149, 72, 36, 38, 71, 71, 71, 70,112,112, 48,131,199,
+227,241, 70,141, 26, 69,172, 66,115,216,176, 97,238,219,182,109,123, 6, 77,136, 35, 66,136,103,235,214,173,223,157, 62,125,122,
+237, 28, 54,165, 20,165,165,165, 24, 51,102,140,224,252,249,243, 11, 9, 33, 59, 40,165,101,141,241, 60,109,160,148, 82,165,242,
+187,179,105, 7,190,108,125,227, 42, 43, 76,175,175,234, 58, 96,200,108, 22, 0,156, 63,243, 99,215, 27, 87, 51,193, 39,166,251,
+135,143,125,114, 86, 36,122,185,209,115, 68, 8, 97, 12, 73,112, 25, 20,228,197, 29, 61,106, 68,127,198,247, 91, 55,118,122,121,
+ 90, 34,207,171,229, 70, 2, 0,174,156, 0,116, 51,207, 99,104,117, 42,135,239,183,110,236, 52,106,196,144,139,249,247,238,127,
+ 62,180,191,235,190, 67, 39,165, 71, 26,243, 16,250,250,176,253,221,156, 42,224,230, 24,135,224, 80, 71,164,103, 92,199,129,189,
+191, 34, 34,170, 7,116, 58, 29, 76, 38,147,112,248,240,225,234,164,164, 36,109, 78, 78,142, 66,163,209,244,166,148,230, 52,213,
+255,162,162,108, 75,164, 79, 23, 3,135,207, 51, 41,100, 28,245,130,197,187,199,119,232, 60, 48,222,213,215,159,237, 41,180, 28,
+236,219,187,231,142,159,182,127, 59,103,222, 91,239,163,125,251,174, 93,111,222, 57, 28, 13,224, 70,125, 92,217,119,105, 74, 76,
+ 4, 49,229,221,185, 51,244,126, 65, 65, 81, 43,111, 31,253, 93, 41, 53,206, 94,176,113, 64,207,222,227,218,134,181,238,197,205,
+202, 62, 67,230,190, 54,253,167,207,190,218, 56, 9, 53, 34, 43, 45,237,104,239,101,203, 10,184, 0, 26,244,134,255,215,192,225,
+241, 2, 68,193,193,172,252,205,155, 53,161,195,135, 87, 1,128,222, 96,240,200, 47, 40,112, 22, 8, 4,160,148,194,104, 52, 62,
+ 18, 35,108,141, 11,142,137,140,172,215, 19,254, 56,103,254,123,239,181,125,251,237,183, 81, 90, 90, 10,147,201, 4, 54,155,253,
+ 72,123,181, 90, 13,149, 74,133,231,159,127, 30, 95,124,252,113, 23, 91, 56,205,102, 51,153,185, 98,197,162,119, 22, 45, 10,155,
+ 49, 99, 6,163,238,181,215,205,205, 13,187,247,236,225,126,245,213, 87, 1,239,126,241,197,243,207,242,120,121, 77,113,150,135,
+135,195, 77, 44,230, 91,197, 21, 0, 68, 70, 70, 98,195,134, 13,188,105,211,166,113,135, 15, 31,254,105, 70,187,118,235, 62,239,
+209,227,142,123,171, 86, 78, 92, 30, 47,192,214,227, 9, 0, 10,173, 54,230,243,117,235, 92, 47, 94,188, 8,177, 88,140,210,210,
+234,231, 80, 66, 8, 58,118,236, 72,166, 76,153,226,220, 50, 48,176, 83,253,103,233, 79,195, 19, 90,228,105, 6, 11, 0,106, 58,
+ 66,106, 58, 86, 59, 10,204,102,243, 35, 66,165, 41,129,245,123, 32,149, 74, 33,149, 74,177,105,211, 38,112, 56,156,218,155, 46,
+ 0,232,245,250, 38,183, 87,171,213,177,126,126,126,144,201,100,104,213,170,213, 35,158, 43, 14,135, 3, 22,139, 5, 14,135, 3,
+ 30,143, 7,157, 78,135,160,160, 32,168,213,234,216,198, 56, 53, 26, 77,123, 55, 55, 55,212, 28, 27,232,116,213,215, 58,157, 78,
+ 87,107,175, 94,175, 71, 85, 85, 21,148, 74, 37, 20, 10, 5, 84, 42, 85,156, 45,253,181, 88, 44,200,204,204,188, 27, 25, 25,217,
+158,201,100, 66, 36, 18, 9, 85, 42, 85,109,236, 80,101,101, 37,182,108,217,162,122,238,185,231, 60,146,147,147,155, 20, 88,132,
+ 16,188,254,250,235,224,241,120, 80,171,213,248,230,155,111,240,198, 27,111,128,195,225, 64,161, 80, 96,195,134, 13,152, 59,119,
+ 46, 88, 44, 22,244,122, 61,214,173, 91,215, 32, 87,118,118,118,254,133, 11, 23,226, 58,116,232,224,186,111,223,190,178, 1, 3,
+ 6,120, 38, 38, 38,130,207,231, 67,163,209,192,104, 52,162, 75,151, 46,136,138,138,130, 68, 34,193,225,195,135,203, 35, 34, 34,
+ 60, 46, 94,188,104, 41, 45, 45,189,223,152,157,117, 69, 19,139,197,130,217,108,134, 88, 44,134, 84, 42, 69, 89, 89, 25,138,139,
+139, 81, 84, 84, 4, 22,139,133,166, 30,222,221,221,221,199,198,196,196, 48, 1,128,207,231,163,125,251,246, 88,180,104,145, 73,
+163,209, 76, 0,112,184,166,217,224,141, 27, 55,238, 59,123,246, 44,203,207,207, 15,183,110,221,130,167,167, 39,203,193,193,161,
+ 73,129,229,227,227,243,227,193,131, 7,221,172,162,218,122,156,213,234,234,211, 49,102,204, 24,183,173, 91,183,254, 8, 96, 72,
+163,134, 62,133, 16, 49, 92, 88,157,218,243,165,135, 78,220,105, 59, 96,200,108,150,111,216, 82, 0, 64, 55,128,117,252,208,186,
+182, 67,250,135,239,178,198,101, 53,134, 81,131, 61, 63, 25, 62,188, 29, 99,242,248,248, 60, 22, 39, 50,108,251,214,117,222,110,
+174, 61,255,119,145, 96,186, 65,200, 7,162,194,204,140,223,126,206,243,158, 59, 59, 82,191, 99,243, 75,121,219,119, 93,233,207,
+225, 92,235, 7, 96,110, 67,220,215,179,116,201, 85, 10,255,214,174,156,211, 4, 14, 35, 16,215, 62, 2,158,158, 82,124,243,221,
+ 86,248, 7,117,135, 78,167,131,147,147,147,192,108, 54, 27,152, 76,230,118, 91,196, 21, 0,156, 60, 41,181,180,105, 35,213, 51,
+ 21, 22,211,107,111,124, 50,122,192,224, 17,209,253,250,245,183, 28, 59,126,204,208, 61,206, 80,210,175, 95, 87,113,234,233,180,
+220,210,210,135, 17, 81, 81,109,145,115, 59, 99, 16, 64, 50,129,250, 7,108,102, 46, 61, 18, 22, 70, 82,147,146, 94,182,104, 44,
+233,252, 15, 86,222, 24, 60,116,232,212,152, 94, 61,123, 89,142,159, 56,165,231,162,252,166,168, 71,183,135, 83, 39, 78,216,151,
+180,119,223,192,212, 83, 41,225, 50,185, 56,229,227,175, 26, 14, 53,248, 47,194,108, 50,121,179,120, 60, 70, 89,106,170, 41,118,
+218, 52, 29, 80,253,123, 20, 8, 4, 56,112,224, 0,184, 92,110,237,139,195,225,212,190,247,246,246,182, 46,170,178,137, 19, 0,
+ 74, 74, 74, 80, 90, 90, 10,103,103,103,120,122,122,162,180,180, 20,231,207,159, 71, 78, 78, 14,216,108, 54, 6, 13, 26, 4, 70,
+ 3,177,203,143,115,142,159, 63,127, 64,235,216,216,160,199,197, 21, 0, 24, 12, 6, 84, 86, 86, 98,228,200,145,140,195,135, 15,
+251, 28, 41, 44, 28,241, 30,240, 68, 16,121, 93,206,184,161, 67, 43,196,187,119,215,187,239, 14, 29, 58,144,115,231,206,241, 6,
+ 37, 38,206,153,183,114,229, 87, 95,108,221,250,192,108, 50,249, 52,167,239, 12, 6,131, 65, 8, 65, 96, 96, 32, 42, 43, 43,161,
+ 84, 86,207, 84,139, 68, 34,184,186,186,194,104, 52,194, 66, 41,187, 62,206, 63, 11, 13,105,145,167, 21, 44, 0,168,233, 12, 0,
+244,177,126, 65, 8,129,197, 98,177, 73, 92,177,217,236, 38, 99,170,154, 66,125, 55, 85, 91, 4,150,213, 86, 7, 7,135,218, 31,
+ 88, 93, 97,101,181,147,193, 96,128,201,100, 54,121,243, 6, 0,139,197,194, 84, 40, 20,216,179,103, 15,122,247,238, 93, 59,253,
+ 36,147,201, 32,149, 74, 33,147,201,160,213,106,145,159,159,143,147, 39, 79, 34, 60, 60, 28,128,109, 73, 91,243,242,242,174,132,
+132,132,196, 91,111,222,125,251,246, 13,216,188,121,115,241,144, 33, 67,252, 40,165, 88,188,120,113,121,151, 46, 93, 60,234,222,
+220,155, 2,147,201,196,249,243,231, 17, 30, 30, 14, 74, 41, 56, 28, 14,110,223,190, 13, 47, 47, 47, 88, 44, 22,176, 88, 44,148,
+149,149,193,209,177,241,220,134,153,153,153, 47,188,248,226,139,197,206,206,206,109, 43, 42, 42, 74,120, 60, 94,207,180,180,180,
+ 64,131,193, 0, 39, 39, 39, 56, 57, 57,225,208,161, 67,112,113,113,193,155,111,190, 89,168,209,104,206, 11,133, 66,111,141, 70,
+115,189,180,180,116,177,205, 6, 3, 48,153, 76, 80,169, 84,168,170,170, 66,101,101, 37,228,114, 57,180, 90,109,147, 54,214,135,
+158, 61,123, 34, 37, 37,133,249,225,135, 31,126,159,151, 87,253, 32, 24, 26, 26,138, 55,223,124,147,233,239,239,143,252,252,124,
+ 92,185,114, 5, 6,131, 1, 77,185,159,217,108,118,223,121,243,230,245, 8, 10, 10, 34, 6,131, 1, 22,139, 5, 58,157, 14,214,
+247,133,133,133,104,221,186, 53, 35, 56, 56,184, 43, 33,164,175, 45, 11, 38,236,168,134, 92,178, 19,174,156, 0,128,233, 6,139,
+252, 43,168,126,103, 50, 18,137, 68,178,114,210, 12,230,180, 67, 59,148,222,183,239, 56, 34, 48,116, 10, 2, 90,142,196,244, 23,
+205, 88,246, 65, 10,252, 3,163,113,255,254,125,244,237,219,151, 83, 92, 92,252, 34,128,249,182,114, 31, 63,126,193,124,236,208,
+225,113,227,159,153, 26,223,191,255, 16,211,209,163,135,144,121,253,104,214,139,207,140,149, 80,139,146,184,184, 8,210,239,220,
+185, 25, 17, 19,211, 1, 6,163,177, 39,176,108, 13,128, 6, 47, 42,119,239, 82,253,242,229,203, 25,191,236,255,113,202,164,201,
+207,183, 75, 72, 24,104, 60,122,252, 32,174,252,118,252,218,167,107,166,159,249,112,221,206,190, 3, 6,141,109,227,224,116,225,
+ 80, 76, 27,205, 75,129, 78, 65,205, 74,125,242, 95, 2,203,193,193,130,154,235, 34,131, 16, 80, 74, 31, 17, 87,143, 11, 44, 6,
+131,209,228,131,127, 93, 78, 43, 40,165,181, 15,210,223,126,251, 45,120, 60, 30,184, 92, 46,216,108,118,147, 97, 22,117, 57,179,
+242,243,251,109,217,190,157, 87,159,184,170,168,168, 64, 69, 69, 5,148, 74, 37, 38, 78,156,200, 89,126,249,114,135, 6,232,106,
+ 57,131,124,125,117, 66, 62, 95,156,157,157,237, 23, 29, 29,253,136,189,114,185, 28,124, 62, 31,219,119,236,224, 12, 27, 58,244,
+213,132, 67,135, 62, 5,208,104,254,170,250,250, 78, 8,129,151,151, 23, 92, 93, 93, 65, 8,129,201,100, 66,105,105, 41,178,178,
+178,112,249,242,101, 48, 9,105,118, 90,162,230,160, 62, 45,242, 52,195,234,193,170,119, 20, 54, 71, 96, 49,153,204,223,237,197,
+106, 8,182, 76, 17, 10, 4,130, 27,197,197,197,221,253,253,253, 97, 50,153,106, 5,214,227, 83,132, 64,181,183, 35, 35, 35, 3,
+ 2,129,160, 94,183,126, 93, 78, 74,105,215, 78,157, 58, 97,239,222,189, 72, 77, 77,197,189,123,247,160, 86,171,161,211,233,160,
+209,104,144,149,149, 5,139,197,130,152,152, 24, 8,133,194, 38, 57, 1, 64,165, 82,149,176,217,236, 72, 62,159, 95,251,153,175,
+175, 47, 42, 42, 42, 44, 70,163, 17, 91,182,108,145,251,248,248, 8,249,124,190,205,130,149, 16, 2,137, 68,130,128,128,128,218,
+ 24, 44,133, 66, 1, 47, 47, 47,171,160,128, 78,167,131,163,163, 99,147, 83,132,148, 82, 45,128,121,117,184, 59,142, 31, 63,254,
+167,164,164,164,150, 39, 78,156,192,197,139, 23,225,233,233,137, 85,171, 86,221, 43, 40, 40,152, 68, 41,189,108,147,145,205,128,
+ 45, 99,168,162,162, 98,207,141, 27, 55,186,118,234,212,169,246,234,208,183,111, 95,210,183,111, 95, 15,235,255,106,181, 26,101,
+101,101,184,116,233, 18, 78,156, 56, 1, 66, 8,114,115,115,205, 26,141,230,167, 70,246,205, 9, 14, 14,222,188,104,209, 34,145,
+201,100,170, 29,219,124, 62, 31, 14, 14, 14,224,112, 56, 96, 50,153, 40, 40, 40,192,200,145, 35,157,191,252,242,203, 31, 9, 33,
+ 97,148,210,166, 7,234, 83, 2,165, 69,106,186,148,161,113,113,117, 13,190,126,254,204,143, 93,187,213, 92, 35,206,159,249,209,
+228,234, 26,124,253, 82,134,198,165, 87,160,212, 36,106,130,103,255,225,178,249, 6,195,229, 65, 71, 14,223, 24, 61,111,238,116,
+110,112,203, 80,241,185,139, 55,130,187,153,231, 49,132,124, 64,165, 1, 42,165,192,173,187, 76, 75,112,203, 80,241,229,171,183,
+185,159,126,182, 41, 84,173,209,239, 59,116, 82,122,164, 49,110, 74,169,150, 16, 50,234,245,119,217,103,166,190,224,197,229, 58,
+ 4, 66, 81,117, 21, 45,130,221, 49, 97,108, 36,190,250,238, 42,156,156,220,224,237,237, 13, 6,131, 33,180,181,239,229,229,229,
+100,207,207,191, 78,123,238,249,233, 93, 18, 7, 14, 53, 29, 57,250, 11, 43,245, 88,242,249, 31,191,123,119, 31,101,170, 4,132,
+ 42,248,129, 65, 1,215,243,239,229, 76,234,213,107, 32,248, 92, 65, 56, 16, 85,239,128,173, 93, 56, 64, 81,200, 96,192,225,185,
+231, 95,238,150,152, 56,194,116,244,232,126, 28, 61,180,245,194,210,165, 45, 14,221,123,184,131,243,219,229, 34,135, 81,227, 94,
+169, 74, 57,124, 83, 63,118,120, 72,142,159,176,253, 63, 34, 7,222, 63, 9, 76, 22, 75,108,210,233, 2, 3, 18, 19,153,234,251,
+247,217, 34,111,111, 19, 0, 24,141,198, 38, 5, 22,128,122,167,154, 31,231,180,213, 22,181, 90, 13, 11, 80,175,200,120,156,179,
+ 84, 34,105, 81,243,240, 93, 11,163,209, 88, 43,174, 42, 42, 42, 32,149, 74, 33, 20, 10, 81,166,211,213, 59,149,249, 56,231,192,
+206,157,183, 44, 95,182,108,254,238, 61,123, 56,192,255,196,149,245,197,102,179,241,209,154, 53,156, 55,222,122,235,149, 87, 89,
+172,217,205, 57,158, 64,245,195, 58,147,201, 4,139,197,194,253,251,247, 81, 88, 88,136,251,247,239,227,254,253,251,224,243,249,
+160, 13, 28,207, 63, 11,255,166,248, 43,160,137, 52, 13,205, 9,114,183, 85, 16,152,205, 13, 38, 62,126, 2,182, 8, 44,149, 74,
+117,226,228,201,147,157, 71,141, 26,197,186,112,225, 2,124,124,124,106, 5,150,245,175,117,218, 73, 32, 16, 96,223,190,125, 6,
+149, 74,213,104, 33, 73,181, 90,125,242,208,161, 67,241, 75,150, 44, 97,191,240,194, 11,200,206,206,198,140, 25, 51, 32,149, 74,
+ 33,151,203, 81, 81, 81, 1,181, 90,141,206,157, 59,195,193,193, 1,215,175, 95, 55,170,213,234, 70, 83, 21, 80, 74,169, 68, 34,
+ 81,122,122,122,250, 62,254,221,184,113,227,188,191,254,250,107,245,173, 91,183,140,221,187,119,119, 2,108, 19, 26, 86,252,252,
+243,207,181,158,185,156,156, 28,124,253,245,215,181, 49, 87, 87,175, 94,197, 39,159,124, 82,155,187,172, 57,160,148, 94,110,211,
+166,141,201,104, 52, 34, 60, 60, 28,254,254,254,208,106,181, 88,187,118,173,233,175, 16, 87,182, 66,171,213,238,158, 58,117,234,
+ 59,233,233,233,190, 44, 22,171,218,117, 93,211, 63,131,193,128, 59,119,238, 32, 43, 43, 11,183,110,221, 66,101,101,101,237, 3,
+ 64, 70, 70, 70,149,209,104,220,217, 16,175,167,167,231,226, 31,126,248,193, 71, 32, 16, 60, 50,158,173,222, 79,171, 87,180,172,
+172, 12, 46, 46, 46, 72, 72, 72,240, 58,121,242,228, 98, 0, 54,231,110,250, 39,131, 16, 66,186,119, 17,245,120,253,149,231,209,
+169,131,226,238,141,171,153, 56,126,104, 93,109,144,123,108,135,152,187,151,210, 29, 49,120,224,252, 30,231, 46,204,104, 52,200,
+189, 38,134,234, 80,231,206,110,103,247, 39,159,248,106,193,220,233,151,222, 91,182,192, 75,171, 83, 57, 68,133,153, 25, 64,181,
+184,250, 45, 93,168,125,127,217,244, 75,171, 63,219, 98, 41,148, 24,230, 92,188, 88,213,224,234,222,186,162,165, 77, 43, 56,248,
+ 4, 15, 45, 14,110,217, 55,228,250,213, 77,240,112,174,130, 99,120,119, 12, 78,236,140, 19, 39,111,224,254, 67, 45, 74, 74, 74,
+160,211,233, 26, 77,123,112,235,250,190, 41,148,208, 32, 66, 73, 33, 97, 80,135, 41, 83, 95,234, 57,116,232, 8,154,146,146,108,
+218,191,111,251,217,157,219,214,239,102,112,216, 44,141,222, 89, 79,136, 86,102, 97, 56,102,171, 84, 21, 0, 0, 22,135,211,176,
+187,181, 38, 33,107,116,155, 40,159, 41, 83,103, 56, 15, 25, 60,146, 30, 58,180,223,178, 51,105, 75,234,206, 77,177,219, 45, 12,
+ 57,167,228,129,154, 39,147, 27,101,148,112, 93,148,114,139, 90,156, 23,166,245, 27, 58,238, 95, 35,214,255, 44, 24,116,186, 34,
+229,131, 7,190,110,189,123,243,238, 44, 91, 38,240,238,220, 89, 75,106, 98,132, 27, 19, 88, 76, 38, 19, 96, 48,234,189,232, 61,
+206,105,171, 45, 26,141, 6, 22,160,222,197, 71, 77,113,154, 76,166, 71,196,149, 85, 96,213,192, 38, 59,191, 91,186,244, 66, 80,
+ 98, 98,229,233,211,167,189,251,244,233, 67, 20, 10, 5, 20, 10,197, 35, 34,203,207,207,143, 68,199,196, 8,126, 78, 77, 13,173,
+239,194, 84,223,241,180,165,239, 12, 6,227, 47, 23, 88,255, 54, 52, 26, 75, 97,245, 96,217, 34,176,108,244, 96, 25,141, 70, 35,
+188,188,188, 80, 94, 94,222,224, 13,185,212,196,113, 0, 0, 32, 0, 73, 68, 65, 84,159,193, 96,128,207,231, 91,231,128, 27, 93,
+ 73,167,211,233,214,206,159, 63,127,214,224,193,131, 61, 34, 35, 35, 81, 86, 86, 6,111,111,111, 56, 56, 56,212,198,134, 89,249,
+174, 94,189,138, 31,126,248, 65,174,211,233,214, 54,193,249,249,154, 53,107, 94, 27, 51,102,140,155,143,143, 15, 92, 93, 93,113,
+253,250,117,184,186,186, 66, 46,151,227,246,237,219,112,116,116,172,141,203, 73, 78, 78, 86,232,116,186, 70,227,122,212,106, 53,
+ 77, 75, 75, 51, 56, 58, 58, 94, 47, 43, 43, 99, 86, 86, 86,178,170,170,170, 88,114,185,156, 45,147,201,216, 71,142, 28,241,112,
+118,118, 86,159, 58,117,170, 44, 40, 40,136,121,239,222, 61,166,209,104,108, 82,181, 18, 66, 48,123,246,108,112, 56, 28,232,116,
+ 58,172, 93,187, 22,243,231,207,175,141,185, 90,179,102, 13, 22, 45, 90, 84, 43,152, 55,110,220,216, 20,229, 35,160,148,194, 96,
+ 48,192,104, 52,194,104, 52,218, 36,122,255, 8,108, 17,234,148,210, 82, 66,200,176, 78,157, 58, 29,219,181,107,151,123, 77, 78,
+ 49,136,197, 98,136,197, 98,148,149,149, 65,169, 84,194,100, 50,193,223,223, 31, 98,177, 24,251,247,239,151, 41, 20,138,196,198,
+ 86, 16, 50,153,204,169, 61,123,246,100, 61,110,131,245,169,206, 42,218,121, 60, 30,138,139,139,209,183,111, 95,238,233,211,167,
+167,226, 41, 23, 88, 86,225,210, 58, 2,156,225, 35, 38,114,218,199, 15, 82, 95,186,114,228, 62,159,152,238, 15,233, 31,190, 11,
+168, 78,211,112, 41,221, 17,237,227, 7, 49,134,151,232, 59, 75,171,190,107, 31,221,138, 24, 26, 43,171, 3, 0, 30,206,150,145,
+137,253, 91,148, 56, 57, 17,214,251,203, 86, 31,252,126,235,198, 78,191,253,252,191, 52, 13,239, 47,171, 78,211,144,216,191,133,
+ 41,251, 86,206, 72, 0, 13,167,105,120, 76,180, 12, 27, 54, 60,253,187, 77,219, 80,148,151,236,247,213,106, 23, 46,180, 85, 0,
+ 59, 18, 61,187, 56,225,226, 23,133,184,118,237, 90,169, 94,175,239,219, 88,223, 41,161, 65, 89,217,153,173, 98,219, 68,251, 76,
+153,250,178,211,176, 97, 35,145,146,114, 0,219,182,108, 74, 27, 59,113,204,247, 15,171,228, 76, 47,182,128, 35,160, 22, 46,147,
+227,204,114, 16, 8, 36,134,226, 98, 0, 0,139,197,118, 2,198, 91, 26,153, 33,196,204,151, 39, 59,247,235, 63, 18,191, 28, 58,
+128,109, 91,190, 59,243, 94,155,113,155, 66,226, 90,147,206, 29, 62,126, 37,164,101, 72,176, 74, 41,150, 51, 8,215,160,213, 90,
+ 28, 63,222, 82,240, 89,222,162,169,121,233,153,227, 63,181,175, 34,124, 4,215,183, 13, 25,210,233,141,187,119, 57,158, 61,122,
+240,139, 83, 83, 5,164,186,114, 72,163, 2,139,197, 98,129, 54, 60,165,245, 8, 39,217,186,149, 1,160,209,197, 85, 28, 14, 7,
+106,181, 26, 70,160,161,139,224, 35,156,190, 71,143, 62,184,123,247,110,132,155,155,219, 35,226,170,178,178,178,246,189, 86,171,
+133, 90,173, 6,159,207,207,178,133, 83,156,150,166, 93, 61,123,246,146, 73, 19, 39,174, 63,113,242,164,131,187,187, 59,100, 50,
+217, 35, 2, 75,175,215,163, 95, 66, 2,103, 77,122,250, 20, 0, 75,109, 57,158,222,125,251, 54, 25,239,203,100, 50, 97,249,139,
+167, 8,255,109,104,240,110,102, 21, 75,182,174, 34,172,239,198, 72, 8,233,255,216, 71,139,226,227,227,181, 57, 57, 57, 8, 10,
+ 10,170, 21, 41,117,247,233,228,228, 4, 23, 23, 23, 92,189,122, 21, 43, 87,174,212, 0, 88,212, 24, 39,165, 84,161, 86,171,159,
+ 25, 48, 96,128,134,197, 98, 33, 42, 42,170, 54,255,149,197, 98, 1,151,203,133, 80, 40, 68,122,122, 58,134, 15, 31,174, 86,171,
+213,207, 60,158, 3,171, 30, 78,153, 90,173,126,118,224,192,129,234,236,236,108,244,236,217, 19,215,174, 93,131, 82,169,132, 82,
+169, 68,126,126, 62,162,163,163,161, 86,171,241,245,215, 95,107,212,106,245,179,148, 82, 89, 99,156, 10,133, 98,248,252,249,243,
+153, 63,253,244, 83,136,191,191,127,155,142, 29, 59, 70, 38, 36, 36,132,141, 30, 61, 58,120,200,144, 33,190, 17, 17, 17,218,196,
+196, 68,207,193,131, 7,123,170,213,106,246,185,115,231, 74,140, 70,227,224, 38,142, 39,128,106, 81,146,147,147, 83, 59, 37,200,
+ 98,177, 80, 94, 94, 94,155,105,223,122, 49,170, 79, 0, 55,196,105,133,197, 98,169, 21, 86, 86,161,213,212,181,191, 1,206, 38,
+111, 24, 92, 46,215,234,225,124,162,109, 61,231, 40,227,230,205,155, 3,122,247,238,157, 49,109,218, 52, 69,105,105, 41, 28, 29,
+ 29, 17, 26, 26,138, 86,173, 90,193,195,195, 3, 6,131, 1,251,246,237, 83,237,223,191,255,134, 76, 38,235,251,120, 14,172,199,
+ 57, 25, 12, 70,126,125, 23, 87,171,247,202, 42,176, 28, 28, 28,224,239,239,111, 61,182,249, 54,244,253, 15,225, 47,231,172, 17,
+ 46, 9,253, 18, 91, 14, 25, 58,202,121,127,242, 1,193, 23,223,108,190,217,107,228,172, 13, 30,193,243,246,122, 4,207,219,219,
+107,228,172, 13, 95,124,179,249,230,254,228, 3,130, 33, 67, 71, 57, 39,244, 75,108,153,157,117, 43,242,145,186,132,245,216, 41,
+224,242, 58,247,234, 30, 33, 77, 59,151,102, 90,253,217, 22,115,247,110, 67, 46,174, 95,191, 97,231,250,245, 27,118,118,239, 54,
+228,226,234,207,182,152,211,206,165,153,122,117,143,144, 10,184,188,206,182,244,125,230,203,147,157,135, 14, 25,137,148,148,125,
+166,221, 63,127,189,102,227,182,226,222,125, 71, 23,137,243,243, 46, 83,168, 55,195,195,241, 58,110,222,188, 41,211,235,245,125,
+235, 11,112,175,143,115,198,244,201,117,197,213,175,238, 62, 61, 55,222,188, 9,243,241,227, 7,141, 39, 79,166,107,126,205,144,
+200,174,100,151, 87, 86,200,181,247, 84, 10,185,222, 98,177,128, 90,204,204,229,203,171, 3,113, 27, 58, 71,221,187,247,193,169,
+ 19, 59,176,101,243,183, 50,139, 5,218,113,187,118,153,199,143, 95, 70,131, 91,180, 8,222,254,243, 14, 50,108,196, 40,103, 10,
+ 88,134,143, 25,233,242, 83,210, 79,164,101,120,203, 22,161,161,213,169,105,158,202,177,244, 23,112, 46,165,180, 74,126,255,254,
+153,171, 95,126,169,243,126,230, 25, 55,174,183,183, 19,204,102, 98,189,190, 55,244, 98,177, 88,143,120, 92, 26,227,244,247,240,
+120,152,156,156,140, 86,173, 90,193,223,223, 31,117, 99, 96,173,137,180,221,221,221,177,103,207, 30, 80,224,138, 45,156,113, 33,
+ 33, 87, 63, 90,189, 90,111,177, 88, 80, 85, 85,245,132,247,170,170,170, 10, 22,139, 5,135,126,249, 69, 47, 87, 42,183,216,218,
+247,190, 76,166,114, 82,175, 94, 31, 14, 29, 58,212,112,247,238, 93, 88, 44, 22,212,245,100, 73, 36, 18,136, 68, 34,104,117,186,
+ 64, 66,136,192, 22, 78,201,145, 35,194, 6,214,106,212,226,113, 15,214, 95,113,222,255,109,104,212,131,101, 50,153, 16, 24, 24,
+248, 72,233, 21, 6,131,241,200,171, 57, 43, 8, 41,165, 91, 9, 33, 71, 19, 19, 19,151,116,233,210,101,230,146, 37, 75,152,145,
+145,145,144,201,100,112,117,117,133,151,151, 23,110,223,190,141,228,228,100,115,121,121,249, 6, 0, 43,108, 89, 10, 79, 41, 77,
+ 37,132, 12,107,219,182,109,210,130, 5, 11,156, 7, 14, 28,200, 14, 12, 12, 4,165, 20,233,233,233,216,187,119,175, 97,211,166,
+ 77,242, 26,113,101, 83, 80, 50,165,244, 24, 33,100,236,224,193,131,183, 79,157, 58,213,209,108, 54,179,243,243,243,161,211,233,
+ 96, 52, 26, 81, 88, 88,104, 72, 73, 73, 81,170,213,234,201,148,210, 99, 54,240, 93, 37,132, 68, 31, 63,126,124,234,185,115,231,
+ 86, 78,155, 54,205, 61, 33, 33,129, 99, 50,153,112,246,236,217,178,184,184, 56, 47,137, 68, 98,216,179,103, 79,133, 86,171, 93,
+100, 54,155,109, 42,149, 67, 8,129, 92, 46,135,135,135, 7,116, 58, 29, 44, 22, 11,244,122, 61, 68, 34, 81,109,121, 35, 74, 41,
+154, 19, 52, 95, 23, 38,147,137,105, 48, 24, 48,113,226, 68, 88, 44, 22,172, 93,187, 22, 38,147,169,217,100,206,206,206, 87, 50,
+ 50, 50,134,181,111, 95,157,160,157,201,100,214,142, 33, 30,143, 7, 15, 15, 15,184,187,187, 35, 37, 37, 5,108, 54,187,209,172,
+248, 86,212,100,102,143, 35,132,116,187,113,227,198,115, 0,218, 27, 12, 6,127,179,217, 76, 24, 12, 70, 9,165,244,186, 92, 46,
+255,222,214, 82, 57, 18,137,100,229,243,207, 63, 31,183, 99,199, 14, 17,139,245,191,159, 6,139,197, 2,143,199,131, 53,169, 37,
+165, 20,122,189, 30,139, 23, 47,150,171, 84, 42,155,114, 55, 61, 13,136,239,216, 25,223,125,189, 78,116,242,212,209,178,155,185,
+ 56, 80, 55, 21,131, 8,192,185, 11, 51, 14, 72,171,190,107, 95,252,224,129, 40,190,227, 19, 90,168, 94,232,205,166,138,103, 38,
+111, 8,172, 41,149,179, 50,255,222,253,207,119,108,126, 41, 15, 0, 62,253,108, 83,104,161,196, 48, 39,251, 86,206,200,111, 54,
+156,238,172, 55,155, 42,108,225,252,159,104,217, 46, 3,133,150, 82,122,145, 16, 18, 18,217, 77,187, 40, 38,138, 51,162, 88,108,
+124,168, 84,234, 95,167,148,214,187,244,189, 62,244,232,222, 27,167,142,253,132,109, 91,182,203,169,133,169,245,240,240,160, 0,
+112,243,166, 7,189,121, 83, 74,255, 23, 47,236,162,242, 20,148,173, 88,180,112,230, 92,133, 66,241,249, 87, 31, 55,158,112,182,
+109,187, 46,104,219,174, 11,102,189,254,174,115,116,155,168, 32, 0,216,181,139,154, 99, 34,200,193, 37,239, 45, 27,177, 98,197,
+ 50,200, 21, 58, 88,203,234,220,206,204,254,229,238, 93,106,219,234,158,255, 16,150,152, 76, 23, 49,119,110,132,186,178,210,179,
+199, 59,239,120,176,222,122,139,209, 88,144,123,221,223,175, 45,156,151,175, 95,255,101,198, 75, 47, 61, 92,186,100, 73,226,134,
+111,191,229,199,198,198,162,180,180, 20, 81, 81, 81,240,247,247,199,241,227,199,177,103,231, 78,149, 84,161, 88, 4,224, 27, 91,
+ 56,183, 30, 58,116, 59,178, 77,155,242,111,191,253,214,111,232,208,161, 68,165, 82, 65, 38,147, 65, 38,147, 65,167,211,161, 38,
+145, 51,205,201,205,189,105, 52, 26, 55,216,194,217,227,157,119, 60,204,101,101, 14, 43, 58,119, 46,226, 88, 44, 31,141, 29, 51,
+102,254,138,247,223,231,181,108,217,146,232,116,186, 90, 47,150,193, 96,128, 72, 36, 50,232,245,122,119, 0, 79,120,167,234,227,
+228,109,218,100, 42, 43, 43,131,167,167,103,109,218,165,186,121, 5, 21, 10, 5, 40,181, 39,193,109, 14, 72, 67,247,112, 55, 55,
+183, 43, 44, 22, 43, 0,104,188,182, 93,221,207,140, 70, 99, 81, 89, 89, 89,124,157, 54,253, 41,165,245,198, 59, 17, 66, 66, 1,
+172,234,215,175,223,216,121,243,230,145,211,167, 79, 99,255,254,253, 52, 47, 47,111, 55,128, 69, 13, 93, 28,155,224,116,228,241,
+120,111, 10,133,194,254,214, 84, 12, 2,129,224,134, 74,165, 58,161,211,233,214, 54,148,189,189, 9, 78, 39, 30,143, 55, 91, 40,
+ 20, 14, 80, 40, 20,237, 1,192,209,209, 49, 67,165, 82, 29,215,233,116,235,104, 3, 5,164,155,224,228, 59, 59, 59,175,244,240,
+240,120,246,173,183,222,114, 79, 75, 75, 43, 57,117,234, 20, 71, 42,149,238,208,235,245, 13, 22,123,174,143,211,221,221,253, 10,
+147,201, 12,248, 43,206, 17, 0,180,107,215, 46,101,248,240,225, 67, 39, 79,158, 12,163,209,136,111,190,249, 6,199,143, 31,255,
+ 37, 55, 55,119, 88, 67,219,212,199, 73, 8,241, 8, 8, 8, 56, 61,115,230,204,224,137, 19, 39, 10, 92, 93, 93,193, 98,177,160,
+ 82,169,112,231,206, 29,164,167,167,211, 3, 7, 14, 40,175, 94,189, 90,164, 86,171,251, 80, 74,203,155,226,252,163,168,143,147,
+205,102,247, 14, 12, 12,252,121,233,210,165,142, 3, 6, 12,224,187,187,187,131,201,100,194,104, 52,162,164,164, 4,153,153,153,
+ 56,122,244,168,106,247,238,221,170,138,138,138,137,143,231,106,249,255,178,243,207,228,140,110, 69,222,123,172,128,115,131,217,
+217, 27,107,107,139,157, 67,251,187, 14, 25, 59,182, 99,127, 0,216,179,231,242,137, 95, 78, 84, 53, 90,236,185, 49, 59,155,178,
+213, 22,206,214, 17,204,165, 89,217,153,143, 36,162,108, 19, 29,147,211, 58,118,204, 7,182,112, 89, 51,185, 63,222,247, 58,217,
+241,255,135,199,166, 83,173, 5,161,223, 93,180, 16,171, 86,126,136, 3,187,246,253,146,125,151,214,150,243,121, 26,199,210, 95,
+201, 73, 72,117,113, 98,129,175,111,175,181, 22,203,194,107,153,153,162,186, 15,106, 86, 79,115,221,135, 73, 63, 63, 63, 73,113,
+113,177,183, 45,156,195,190,248,194,160, 22, 10,121, 11, 63,250,168,183, 82,171,237,189, 98,197, 10,214,229,203,151,241,245,151,
+ 95,154,180, 69, 69,219,203,128,217,245,205,126, 52,198, 25, 60,123,182,195,219, 95,127,253, 66,104,120,184,215,115,207, 61,199,
+102,179,217, 80,169, 84,120,240,224, 1,142, 29, 61,170,207,190,121, 51, 91, 46,151,143,160,148, 22,219,202, 57,236,139, 47, 12,
+ 46,161,161, 16,120,122,210,147,169,169,206, 51,222,124,115,102,139,144, 16,231,196, 65,131,216, 78, 78, 78,168,170,170, 66,126,
+126, 62,246,237,219, 39, 81, 42,149,126,148, 82,179, 45,156,219,207,157,107,123,232,204,153,113, 31,124,240, 1, 55, 38, 38, 6,
+206,206,206, 80, 40, 20,200,204,204,196,153, 51,103,116, 27, 54,108,144,201,100,178,153, 38,147, 41,185, 33, 59,237,120, 20, 13,
+ 10,172, 63,133,220,134, 19, 64, 8,137, 7,240, 94,205,191,239,211,166,107,250, 61,181, 23,136,122,218, 4,185,185,185,125,167,
+213,106,169, 70,163,153, 65, 41, 45,252,167,217, 73, 8, 97,197,199,199,127, 45,145, 72,186, 81, 74,225,236,236,124, 62, 43, 43,
+235, 85, 74,105,131,115,241, 13,113, 18, 66,152, 0,186,137, 68,162,206,142,142,142,189,117, 58, 93,235,154,105,182,155, 42,149,
+234,140,193, 96,184, 8,224, 60,165,244,137,149, 16,255,159,125,175,177,115,128,159,159,223, 75, 22,139, 37,156, 16,226, 98, 54,
+155, 97, 52, 26,165, 22,139,229,142, 76, 38,219, 4,224,248,223,109,231,159,197,217, 38,156,140,166, 12,180,174,253,178,145,184,
+170,199,133, 3,177,224,102,214, 29,186,207, 86, 59, 9, 33,140, 81,131, 61, 63, 1,170, 87, 26,210, 38, 74, 14, 61, 34,176,108,
+ 16, 45,182,224, 17,206,112,214,243,148,208, 71, 56, 9, 37,133, 81,109, 71,111,179,133,171, 33,129,101, 43,218, 68,146,222,160,
+232,102,161,184,120, 51,151,158,106,200,206, 63, 11,255, 6,206, 15, 9,113,251,210,213,245, 60,131,197,242, 1,192,168,241,182,
+ 88, 44,132,152, 41, 33,166,186,211, 88,117, 31, 40,155,226, 52, 0,177,108, 30, 47,208,108, 50,121,151, 2,162, 67,102,115, 7,
+ 45,165,202, 0,224,189,116, 74,111,255, 30, 59, 13, 64, 44,147,199, 11, 58, 68,233,200, 50,161,176,173, 68,163,241, 4, 64, 69,
+ 66,225, 77,185, 74,181, 69,171,213,126,245,248, 76,133, 45,156, 28, 30, 47,192,108, 50,121, 3, 0,131,197,146, 36,233,116,129,
+ 69, 78, 78,207,105,117,186, 96,145, 72,100,212,235,245,114,173, 86, 59,217,104, 52,158,108, 78,223,239,152, 76,209,231, 24,140,
+158, 6,161,208,221, 64,136, 80,111, 50, 25,244, 6,195, 3,173, 86,123, 3,192,103,148,210,218, 52, 34,118,129,101, 3,172,171,
+205,254,138, 23,128,254,118, 78, 59,167,157,211,206,105,231,180,115,218, 57,255,122, 78, 0, 2, 0, 65, 0,152,255,100, 59,255,
+ 43,175,166, 39,170,237,176,195, 14, 59,236,176,195,142,127, 60, 40,165,106,212, 19,115,101,199,223, 3, 2,160,222,149, 0,180,
+ 25,174,191,223,179,154,160, 41,126, 59,167,157,211,206,105,231,180,115,218, 57,237,156,255, 62,206,166,184,155,163, 63,254,209,
+248, 43,221, 99,120, 74,220,146,118, 78, 59,167,157,211,206,105,231,180,115,218, 57,255, 94,206,127,219,235,143, 21, 16,252, 23,
+131, 16,226, 77, 8,169,183,124,193, 31,105,107,199,211,135, 63,114,126, 9, 33,254,132, 16,255,102,182,127, 34,219,191, 29,118,
+216, 97,135, 29, 79, 23,254,223, 5,150,173, 55,171, 63,120, 83,251, 67,130,135, 16,242, 33, 33, 40,174,126,145, 15,255,172,182,
+ 54,236,215,207,211,211,243,141, 54,109,218,108,247,241,241,153, 69, 8,241,106,230,246, 17, 66,161,112,157, 72, 36, 58, 45, 18,
+137, 78, 11,133,194,117,132,144,136, 63, 98, 83, 29,110, 66, 8,153,225,224,224,144,234,231,231,247,144,199,227,165, 18, 66,102,
+ 18,210,140,154, 62,143,242,133, 17, 66,230, 18, 66,230, 17, 66, 34,155,222,226,127,240,142, 25,181,211, 43,102,212,117,175,152,
+ 81,153, 30,177, 35, 34,188, 98, 70,101,122,197,140,186,238, 29, 51,170,193, 50, 56,191, 23,127,228,252,214,108, 91, 88,253,106,
+122, 91, 66,200,103, 4,120, 64, 8,138,254,232, 88,178,195, 14, 59,236,176,227,239, 69,179,130,220, 3, 2, 2, 6, 91, 44,150,
+ 73, 0,192, 96, 48,126, 42, 42, 42, 58,220,156,237,107,110, 56,111,215,188, 95, 67, 41, 93,248, 71,218,217,176,237,231,148,210,
+249,205,180,209,155, 16,188,109,177, 80, 6, 0, 48, 24,228, 29,111,111,111, 1,147,201,124, 34,112,208,108, 54, 11, 8,193, 44,
+139,165,186, 64, 37,131, 65,222, 38,132,172,163,148,138,155,179, 79,235,126,167, 76,153,242,249,186,117,235, 28, 4, 2, 1,238,
+223,191, 63,112,230,204,153,221, 9, 33,115, 41,165, 37, 77,109,207,231,243, 39,117,234,220,109,238, 71, 31,127, 42,242,246,242,
+ 18,154,204, 22, 67,126, 65,129,112,241,194,249,157,249,124,254,186,198,138, 28, 63,102, 7, 1,240, 50,139,197,154,224,224,224,
+ 16,166,213,106,239,154, 76,166,221, 76, 38, 51,113,229,202,149, 49, 67,134, 12,113,144,203,229, 92,147,201, 20,190,109,219,182,
+185, 63,252,240,195, 96, 66,200, 72,218,200,114,123,171, 7,135, 82,250,176,206,199,131, 11, 11, 11, 99,217,108, 54,194,194,194,
+ 8,128,219, 77,180,175, 5, 5, 34,178,206,238,138, 5,128, 54, 61,198,231,100,157,221,133,154,247,182,116,209,102,212, 55, 22,
+248,124,254, 55, 26,141,230,129,245,251, 26, 59,159, 56,223,245,109, 75, 8, 89, 79,171,203,252,196, 0, 24, 83,211,116, 47,165,
+ 52,147, 16,226,227,192,227,189,169,209,106, 9, 0,242, 71,198,146, 29,118,216, 97,135, 29,127, 63,154, 37,176, 40,165,207,221,
+185,115, 71, 96,177, 88, 16, 25, 25, 57, 5,128,205, 2,171,190, 27, 78, 66, 66, 66, 28,159,207,127, 36,107,177, 70,163,225, 18,
+130,132,223, 35, 90,172,251,208,235,117, 12, 54,155, 11, 6,131,204,109,219,182,109,139,242,242,242, 52, 6,131,177,189,168,168,
+168,170, 57,253,173,225,196,198,141, 27, 91,249,250,250, 62,145, 93,185,164,164,132, 59,114,228,136,102,241,189, 64, 8, 79,199,
+227,117,230, 16,226,107, 54,153, 92, 0,128,197, 98, 85, 69, 58, 59,199,175,250,224, 3, 1, 33,196, 82, 81, 81, 1,141, 70,131,
+ 57,115,230,240,179,179,179, 71, 1,248,170, 9, 27, 91,117,233,218,125,206,209,163, 71, 90,203, 43,171,180, 27, 63,255, 46, 93,
+195, 98,171, 90, 70,183,230,126,253,221, 22,151,151, 95,152,252, 58, 33, 36,131,214, 83, 54,228, 49, 30, 6,128,125,111,190,249,
+102,155, 97,195,134,113, 21, 10,133,131, 70,163,105,177,125,251,246,197,241,241,241,162,246,237,219,115,127,254,249,103, 34,147,
+201, 64, 41, 21, 68, 69, 69,209, 9, 19, 38,104,147,146,146,102, 1, 88,223, 0,231, 35,130,215,215,215,119, 9, 0, 48, 24,140,
+186, 99,143,237,231,231,199, 7,128,146,146,146, 21,132, 96, 78, 77,251,122,197, 53, 1,114,219,244, 24, 15, 16,132,103,157,221,
+229,208,166,231,120, 45, 40,238, 16, 32, 23, 0,252,253,253, 87, 0,117,242, 58, 61,138,155, 15, 31, 62,252, 93,181, 3,135, 13,
+ 27, 14, 74,233, 55,254,254,254, 41, 98,177, 56,134, 16,204,104,204,206, 71,108, 38, 4,238,238,238, 99, 1,124, 1,224,153, 91,
+183,110,181, 1,128,168,168, 40, 54,128, 76, 23, 23,151, 14,186,106,113,101,135, 29,118,216, 97,199,191, 0,205, 21, 88, 28, 0,
+ 72, 75, 75, 3,165,148,251, 59,246, 87,123, 3, 33, 53, 69,138,125,125, 31, 13, 55, 41, 41, 41,193,233,211, 54, 85,179,177,105,
+ 31,239,191,255,190, 72, 42,149,246,255,254,251,239,123,249,251,251,127,242,240,225,195, 11,141,109, 76, 41, 21, 19, 66,214,212,
+120, 28,192,227, 57,228,204,156, 57, 51,189,230,235, 22, 7, 15, 30, 20, 12, 31, 62, 92, 13,160, 0, 0,120, 60, 7,127, 38,147,
+209,170, 58,168, 13,107, 26, 19,130,227, 9, 9,229,114,185,253,102,124,241,133,169,195,240,225, 44,161,167, 39, 1,128,130, 91,
+183,220,215,124,252,113,247,170,188, 60,174,198,221,189,162, 66,165,210,228,228,228,128,199,227, 17, 38,147,217,161,169, 14, 11,
+133,194, 55, 62, 88,181, 70, 40,175,148,106,116,114,165,158,105, 54,234, 28,249,124,115,105,169,184, 92, 36, 16,168, 23,190,183,
+156,243,202,244,231,222, 0,240,106, 19, 84,179,230,206,157,219,186, 83,167, 78,254, 59,119,238, 36, 50,153, 12, 44, 22, 75,212,
+190,125,123,196,199,199,155, 79,157, 58, 69, 66, 66, 66, 16, 19, 19,131,179,103,207,226,252,249,243, 36, 46, 46, 78,176,119,239,
+222, 41,168, 71, 96,213, 35,170,231,118,237,218, 53, 80, 36, 18,105,229,114, 57,166, 77,155, 6, 0, 24, 48, 96, 64, 43,161, 80,
+248,141, 82,169,116, 72, 78, 62, 48,182, 41,113, 45,206,220, 63, 1, 0,188, 98, 70, 93, 7, 16, 11,138, 59,146,204,253,109,235,
+ 52,105,125,251,246,237, 46, 85, 85, 85,181,193,134,214,194,226,189,122,245,106,234,112,214,194, 58, 22, 70,140, 24,254, 14, 64,
+208,167, 79, 31,241,236,217,179,105,102,102,230,232,241,227,199, 37,228,230,222,105,208,206,199,199,209,164, 73,207,222,115,115,
+115, 27,224,231,231,151, 11,128,197,102,179,173, 77,153,254,254,254,110, 49, 49, 49, 19, 69, 34, 81, 62,147,193, 8,161,160,180,
+169,177,100,135, 29,118,216, 97,199, 63, 27, 44, 0, 32,132,212,102,146,165,148, 54,248, 20, 77, 8, 41,207,200,200,240,213,106,
+181, 32,132,148, 55,212,174, 14,215,137, 58,239,197, 76, 38,243,107, 6,131,188, 74, 8, 65, 76, 76,236,189,181,107,215,214, 87,
+115, 75, 31, 19, 19,123,143,201,100,180,164,148,130, 16,198, 55, 22,139, 89, 92, 31,103, 61,251, 19, 19, 66,214,112,185,188,183,
+ 1,192,199,199, 55,239,240,225,195,250,113,227,198,225,227,143, 63,230, 44, 88,176, 96,126,112,112,240,172,251,247,239,151, 54,
+100,103,205,255, 11,189,189,189, 5, 27, 55,110,108, 53,115,230,204,244,226,226,226,133, 0,224,231,231,247, 33,128,104, 0, 5,
+117, 62,195,134, 13, 73, 15,167, 79,159,158, 35, 22,139, 23, 54,196, 57,150,144,176,224,168,168,126, 43,210,210, 40, 67,167, 35,
+229,191,254, 42, 47, 19,139,141,119,203,202, 4,155,175, 92, 25,182,248,195, 15,217,129, 65, 65, 56,157,156,236, 81,174, 86,151,
+201,116, 58,173, 88, 44,166, 38,147,233,124, 67,156,117,208,198,203,211, 83,240,237,103,223, 92,118,100, 51, 45,222,254,254,132,
+229,230,194,102, 8,156,185, 12, 22, 75,219, 50, 56,156, 3,160, 77, 3,199,172,150,147,195,225, 76, 25, 56,112,160, 32, 41, 41,
+137,196,196,196,192,197,197, 5,191,254,250, 43, 50, 50, 50, 96, 52, 26, 25, 85, 85, 85,232,216,177, 35, 62,250,232, 35, 4, 5,
+ 5, 65, 42,149,162,176,176,208,131,203,229,122, 54,114, 60, 31, 17,188,243,231,207, 71, 96, 96, 32, 76, 38, 19, 42, 43, 43, 97,
+ 50,153, 32, 20, 10, 1, 0, 5, 5, 5, 56,120, 48,185,222, 14, 54,118,222, 27,104,143,174, 93,187, 42, 8, 33, 55, 31,251,234,
+102,157, 54, 77,114,250,250,250,110,145, 72,202,226,250,246,237, 11,153, 76,166, 95,186,116, 41,218,182,109,139, 86,173,234, 15,
+ 27,123,108,204, 47,228,241,120,155,130,130,130,222,123,235,173,183,220,220,220,220,160,211,233, 94, 47, 41, 41,193,204,153, 51,
+ 1, 0, 67,135, 14,141, 98,177, 88,155,167, 77,155,134, 22, 45, 90,220, 82, 40, 20,183, 51, 50, 50, 22, 40,149,202,236,223,219,
+119, 91, 96,231,180,115,218, 57,237,156,255, 52, 78, 91,181,200,211, 2, 22, 80,221, 17, 66, 8,109,170, 67,148,210, 42,127,127,
+127, 95, 62,159, 15, 74,105,179,167,219,204,102,243, 44, 15, 15, 15,201,194,133, 11,123,180,106,213, 74, 63,107,214,172,204,252,
+252,252, 69,117,219,132,132,132,172,252,242,203, 47,145,147,147, 83,240,225,135, 31,158, 45, 47, 47,111, 86,157, 49, 74,233, 2,
+ 66,200, 90, 0, 40, 41, 41, 41, 79, 78, 78,110,155,150,150,246,234,231,159,127,238,249,218,107,175,113,222,120,227,141,201, 0,
+ 62,110,138,135,201,100,170,235,155, 22,172, 15,190,190,190,250,250, 98,180,172, 24, 78, 8,223,137,203,237,187, 34, 45,141,234,
+ 11, 10,212, 63,124,250,169,227,183,151, 46, 45, 53, 82,234,237,229,229,133,158,221,187, 43, 29,152,204,114, 73,105,169,197, 43,
+ 44,140,153,127,248,176,135,134,203, 45, 78, 74, 74,146, 85, 84, 84,236,111,106,255,132, 16,185,217, 98, 49, 56,250, 7,154,198,
+141, 30,216,230,242,197,140, 91,142,158, 30,140,248,184,152,216,236,156,130,171,212,108, 54, 18, 66,234,173,153, 88, 23,206,206,
+206,173, 42, 42, 42, 32,151,203,225,233,233,137,181,107,215,194,199,199, 7,106,181, 26,191,253,246, 27, 13, 8, 8, 32,105,105,
+105, 8, 8, 8, 64, 89, 89, 25,244,122, 61, 20, 10,133, 68,167,211,213, 91, 59,145, 82, 42,102,177, 88,155, 24, 12,242, 18, 0,
+180,104, 17,114,243,155,111,190,209, 2, 64,235,214,173, 49,122,244,104,236,217,179, 7,217,217,217,176, 88, 44,160,148,106, 3,
+ 2, 2,111, 50, 24,164,117,245,230,191,223,139, 99, 45,193,243,240,225,195, 49, 77,183,126, 18,132, 16,226,227,227, 51, 58, 42,
+ 42,106,242,164, 73,147,244,108, 54, 27,106,181, 26,106,181, 26, 55,111,222,212, 15, 28, 56, 80, 60, 98,196,112,239,148,148,148,
+ 70,237,212,233,116,247,252,252,252,230,207,157, 59,119,237,134, 13, 27,156, 22, 47, 94, 12,179,217, 12,139,197, 82,251,215,250,
+126,255,254,253,200,203,203, 91, 87, 87, 92,217, 97,135, 29,118,252, 87, 96,171, 22,121, 90,240,255,158,201,157,201,100,126,123,
+236,216,177,246,189,122,245, 98, 37, 36, 36,196, 4, 4, 4,196, 20, 21, 21,101, 2, 64, 64, 64, 64,204,160, 65,131, 98,188,188,
+188,176,110,221, 58, 53,147,201,252,246,247,236,227,177,155, 93,186,175,175,239, 39,123,247,238, 93, 51, 99,198, 12,248,248,248,
+ 68,255, 41, 29,105, 6,156,120,188,184,105,107,215,154,216, 70, 35,227,139, 79, 62,113,250, 52, 53,117,205,206, 93,187, 88, 93,
+187,118, 37,148, 82,220,184,126,157,255,209,250,245,130,137,163, 70, 21,220,206,203, 51, 29, 56,122,212, 40,126,248,176,242, 97,
+ 89,217, 18, 74,105,101, 83,252, 70,163,241,183,220, 59,185,254, 61,250,118,243,251,245, 82, 86,198,152, 81, 67,250,177, 89, 12,
+114,167,224,225, 21, 95, 31, 15,231,211,169,199,181, 70,163,241,183,166,120, 84, 42, 85,190,201,100,114,163,148,122,158, 62,125,
+ 26,158,158,158,168,170,170,130,209,104,132, 94,175,215,171,213,106,135,138,138, 10,104,181, 90,232,116, 58, 56, 57, 57,225,198,
+141, 27, 98,147,201,116,170, 33, 78,147,201,244,178,131,131,195, 42, 74, 41, 91,167,211, 21,159, 56,113, 2, 28, 14, 39,208,217,
+217,121,161,209,104, 68,113,113, 49,206,157, 59,247,161,193, 96,120, 96,221,134,203,229,121,234,116, 58, 83, 67, 65,238,182,128,
+210,223, 95, 99, 51, 32, 32,192, 47, 36, 36,100,238,130, 5,111,135,183,109,219, 30,229,229,229,176, 88, 44, 16,137, 68, 80,171,
+213,112,114,114, 66,183,110,221,210, 87,174, 92, 89, 73, 41, 22, 52, 37, 2,139,139,139, 43,130,130,130,150,204,156, 57,115,110,
+120,120,120, 16, 0, 68, 68, 68, 96,224,192,129, 56,124,248, 48,114,114,114,160, 84, 42,205,151, 47, 95, 62, 88, 92, 92,252,239,
+ 72,176,103,135, 29,118,216,241, 31,199,255,187,192, 18,139,197,101, 1, 1, 1, 71,174, 94,189, 58,108,194,132, 9, 56,125,250,
+244,243, 0,230, 2, 0,143,199,123,126,194,132, 9,184,122,245, 42,110,221,186,117, 68, 44, 22,151,253, 25,251,228,114,185, 90,
+189,190,218, 25,229,224,224,224,208,204,205, 91,212, 76, 13, 2, 64,139, 70, 62,107, 16, 12, 22,203, 55,118,208, 32, 86, 85, 70,
+134,124,227,197,139,239,111,223,190,157,213,163, 71, 15, 98, 52, 24, 96,182, 88, 16, 26, 26, 74, 18,250,247, 23,254,184,125,187,
+155, 89,165, 74,251,224,157,119,126,253,110,218, 52,101, 14,165, 5,182, 24,168,211,233,214,191,254,234,203, 3, 78,166,166,249,
+ 69, 69,133,186, 31, 57,158,154,238,238,230, 44,104, 21, 17, 33,172,172,170, 50, 47, 90,240, 54, 75,167,211,125,209, 20,143, 70,
+163,217,119,226,196,137, 81,129,129,129,158,153,153,153,208,235,245, 48,155,205, 72, 72, 72, 0,165,148, 7,192,194, 98,177,112,
+235,214, 45, 24, 12, 6, 73,110,110,110,241,157, 59,119,120, 0, 86, 55,198,171,213,106,239,215,253, 63, 40, 40,168,199,208,161,
+ 67, 97, 50,153, 48,104,208, 32, 36, 39, 39,247, 40, 46, 46,222, 88,167,201, 35,237,127, 15,106, 98,175, 90,251,251,251,239,173,
+249,200,166,224,118, 95, 95,223,200,136,136,136,149, 31,126,248, 33, 59, 48, 48, 16, 22,139, 5,110,110, 46, 80,169, 52,168,168,
+168, 64,116,116, 52, 2, 3, 3,241,209, 71, 31, 1,213, 43, 0,109,242,176, 21, 22, 22,230, 3,152, 21, 29, 29,205, 81, 40, 20,
+ 49, 26,141,102,105, 66, 66, 2,210,211,211,241,219,111,191,189,174, 82,169, 42,133, 66,161,209,207,207,111, 18,131,193, 16, 26,
+ 12,134,100,137, 68, 34,249,253, 71,192, 14, 59,236,176,195,142,191, 19, 54, 11, 44,111,111,111,129,131,131,195,179, 47,189,244,
+146,139,197, 98, 1,135,195,137,245,240,240, 88, 85, 94, 94,174,108,238, 78,213,106,245,206,237,219,183, 15,252,236,179,207, 56,
+ 67,134, 12, 9, 11, 8, 8,232, 4, 0, 99,198,140, 9,115,116,116,196,246,237,219, 13,106,181,250, 79,203,105,100, 52, 26,123,
+117,236,216, 17,149,149,149, 40, 40, 40,200,108,206,182, 7, 15, 30, 20,160, 58,238,170,209,207, 26,131, 73,175,119,117,241,247,
+103, 60, 76, 77, 53, 84,202,229,190,189,122,247, 38, 70,131, 1, 12, 6, 3, 21, 21, 21, 40, 44, 44,132,179,139, 11,185,149,155,
+ 43,218,244,246,219, 7, 91,180,107,199, 53,235,245,238,182,242, 83, 74, 85,132,144,231, 95,159,245,218,190, 29, 59,126,242,144,
+ 74,229,121, 14,124,190,158,199,101,123,191, 49,235, 53,115,101,101,229, 84, 74,169, 45,231,105,245,142, 29, 59, 6, 13, 26, 52,
+232,122, 80, 80,144, 87, 89, 89,153,143, 84, 42, 53, 87, 86, 86, 50, 81, 29, 75, 69, 0, 32, 53, 53, 21,114,185,220,100, 54,155,
+211, 0,172,160,148,218, 52,149, 10, 0,110,110,110,142,125,251,246,237,226,237,237, 13,185, 92, 14, 15, 15, 15,196,197,197,117,
+113,115,115,219, 89, 89, 89,169,176,149,199, 22, 28, 63,126,220,145, 82,218,133, 82,138, 65,131, 6,217,180, 13, 33,100,220,208,
+161, 67,217, 12, 6, 3, 26,141, 26, 60,158, 3, 68, 34, 39, 56, 58, 58,163, 85,171, 86, 40, 46, 46, 70, 98, 98,162, 33, 55, 55,
+119, 91, 73, 73,201, 47,205,181, 73, 38,147, 13,232,218,181,235, 75,175,190,250, 42,204,102, 51, 70,142, 28,137, 7, 15, 30,188,
+151,159,159,127,208,195,195, 99,212,139, 47,190,232,230,238,238,142,121,243,230,241, 1,172,109, 46,191, 29,118,216, 97,135, 29,
+255, 12,212, 10,172,198,230, 60, 3,254,143,189,243, 14,143,162,248,255,248,123,118,175,230, 82, 46,189, 23, 66, 75, 66, 8, 1,
+164,215,128,244, 34, 16,154, 8, 42, 22, 64, 44,136, 34, 32,126, 5,197, 66, 81, 1, 11, 29,145,222,130, 32, 2, 2, 65, 36,244,
+ 22, 33,144, 0,129, 4, 8,185,244,222,175,237,238,252,254, 72, 49,196, 36,119, 23,162, 63,197,125, 61,207, 61,119,187, 55,243,
+222,217,107,251,190,207,124,102,198,219,187,163,179,179,243,155,182,182,182,246, 39, 78,156,176, 6,128, 30, 61,122, 64, 16,132,
+181,158,158,158,171, 82, 83, 83,207, 90,114,208,188,188,188, 66, 15, 15,143,159,206,159, 63, 63, 54, 60, 60, 28,145,145,145, 47,
+ 0, 64,120,120, 56,206,159, 63,143,123,247,238,253,148,151,151,103, 50,103,200, 28,188,189,189, 7,135,133,133,133,119,236,216,
+ 17, 7, 15, 30, 4,207,243,231, 76,215,250,131,234, 35, 6, 81,203, 40,194,202,125,102,137,177, 44, 8, 33,224, 56, 14, 0,144,
+157,149,133,248,219,183,145,155,151, 7,157, 86,139,146,210, 82, 62,192,223,191,172, 64,175,151, 18,192,162, 62, 46, 74,105,146,
+141,141,205,195,210,210, 18, 87, 71,103,135, 50,107,165, 18,249,133, 5,178, 43,151, 47, 20, 81, 74, 19,204,212,208, 19, 66,122,
+255,242,203, 47,243, 89,150, 29,103, 99, 99,131,233,211,167,179, 97, 97, 97,144,201,100,208,233,116,200,207,207,199,182,109,219,
+178, 56,142,107, 10, 0,132, 16, 27,107,107,235,205, 44,203,106, 10, 11, 11,255,103,234, 24, 10,133, 34,236,153,103,158, 97,117,
+ 58, 29, 22, 46, 92,136,249,243,231, 99,208,160, 65,236,165, 75,151,194, 0,212,158,225,222, 0, 4, 65, 64,255,254,253,171, 39,
+185,215, 76,118,175, 21,169, 84, 26,208,162, 69, 11,100,101,101, 33, 43, 43, 11, 46, 46, 46,240,244,244,132,155,155, 27,150, 47,
+ 95, 78, 87,172, 88, 17,197,243,252,214,244,244,116,147,131, 60,106,226,237,237, 61,225,197, 23, 95,124,118,236,216,177, 40, 41,
+ 41,193,137, 19, 39,208,189,123,119, 44, 89,178,196,229,244,233,211,175,116,236,216, 17, 82,169, 20, 81, 81, 81, 48, 24, 12,169,
+150,234,139,136,136,136,252,219,121, 82,242,175, 0, 19, 17, 44, 7, 7, 7, 59,165, 82, 57,117,216,176, 97, 61, 70,142, 28,137,
+207, 63,255,172,234, 57,134, 97,176,101,203, 22,155,125,251,246,205,241,241,241,233, 45, 8,194,234,148,148, 20,147,249, 66,149,
+ 8,130,176,111,251,246,237, 67,186,118,237,170,234,211,167, 79, 51, 0, 80, 40, 20,250,237,219,183,151, 10,130,176,207,210, 19,
+169, 57,233,163,151,151, 87,168, 68, 34, 9, 31, 54,108, 88,232,228,201,147, 17, 27, 27,139,109,219,182,221, 13, 8, 8, 56, 99,
+161,244, 3, 19,163, 8, 43,247,213, 9, 43,151,231,228,167,167,219,219,248,250, 74, 29,108,109,211, 14, 30, 60,232,211,175, 95,
+ 63,146,156,156,140,188,188, 60,104,181, 90, 92,190,124, 89,144, 0, 73, 18, 7, 7,146,116,254, 60, 97,229,242, 28, 75, 95, 3,
+ 31, 15,135,150, 31,206,157,214, 68,171,213,182, 46, 40, 40,224,164, 82,169,212,219,221, 62,217,116,205, 63,160,148,234,172,173,
+173, 59, 0,144, 8,130, 80,234,232,232,168, 58,118,236, 24,228,114, 57, 8, 33,104,211,166, 13,148, 74,165,204,218,218,250, 33,
+ 0,184,187,187,203,215,174, 93,171,158, 56,113,226,105, 83,218, 97, 97, 97, 18, 63, 63,191, 1, 1, 1, 1, 56,119,238, 28,110,
+222,188,153,114,225,194, 5,175, 14, 29, 58,192,203,203,107, 64, 88, 88,216,225,147, 39, 79,114,150,158,119, 29,231,209,160, 36,
+119,158,231, 41, 33, 4, 12,195, 64, 16, 4,100,101,101,161,105,211,166, 88,185,114, 37,150, 47, 95,254,109, 67,115,164,130,131,
+131,101,237,218,181, 11, 31, 59,118, 44, 18, 18, 18,176,104,209,162,188,204,204,204,115,199,142, 29, 27, 60,125,250,116,182,123,
+247,238,200,201,201,193,198,141, 27,185,223,127,255, 61, 34, 35, 35,195,226,239,128,136,136,136,136,200, 63,135, 58, 13,150,151,
+151,215, 80, 71, 71,199, 87,198,143, 31,207, 6, 6, 6, 34, 35, 35, 3, 69, 69,197,218,208,208, 16, 1, 96,168, 92, 46, 51, 88,
+ 91, 91, 99,202,148, 41,104,211,166, 77,167, 57,115,230,116,116,119,119,223,146,158,158,190,215,156, 3,103,100,100,148,122,120,
+120, 68, 76,159, 62,125,241,213,171,191, 55, 5,128, 75,151, 46,221, 75, 77, 77,157,155,145,145, 81,231,136,188,218,168, 54,153,
+ 37,177,178,178,186,216,178,101,203,251,131, 7, 15,182, 27, 57,114, 36, 92, 92, 92, 16, 29, 29,141, 37, 75,150,220,209,235,245,
+243, 27,235, 2,110, 9,156, 78,151,126,101,255,126,219,176,231,158,179,155, 49,116,232,151,175, 79,159,190,236,195, 15, 63,148,
+ 4, 6, 6,146,210,210, 82, 92,188,120,145,238,221,187,215,248,195, 39,159,172,128,181,181,244,252,222,189,114,189, 94,159,100,
+201, 49,188,189,189,123, 15, 25,212, 59,240,203,101,223, 64, 91, 86,140,139,231, 14, 33, 47, 47, 11,107,215,253, 24,232,237,237,
+221, 91,163,209, 68,153,171, 69, 8, 9,136,140,140,116,165,148, 66, 46,151, 99,225,194,133,240,244,244,132,157,157, 29,138,138,
+138,240,206, 59,239,168,223,126,251,109, 53, 0,196,198,198,194,198,198,198, 44,221,219,183,111, 63, 53,109,218, 52, 21,207,243,
+ 56,114,228,136,129,101,217, 47, 35, 35, 35,151,182,109,219, 86, 22, 22, 22,166,250,232,240, 3, 78, 0, 0, 32, 0, 73, 68, 65,
+ 84,225,135, 31, 58, 0,168,119,158, 50,115,105,104,146, 59,207,243, 15,142, 29, 59,214,102,220,184,113, 84, 34,145,144,252,252,
+124,168,213,106,172, 92,185,178, 52, 45, 45,173,193, 19,180,229,228,228, 72, 91,183,110, 45, 19, 4, 1, 17, 17, 17, 72, 73, 73,
+121, 47, 35, 35, 35,203,211,211,243,200,172, 89,179,166, 6, 6, 6,122,223,186,117, 43,165,172,172,108, 77,106,106,170,166,161,
+199, 17, 17, 17, 17, 17,249,103, 80, 95, 4,235,185, 35, 71,142,176,130, 32, 96,221,186,117,136,142,142,166,217,217,217,243, 9,
+ 33,155,237,236,236,248,236,236,236,231, 94,125,245,213,145,243,231,207, 39, 61,123,246,196,249,243,231, 73,211,166, 77,195, 1,
+ 84, 25, 44, 66, 72,191,250,230,202, 40, 40, 40,184,156,145,145,222,180,218,196,146, 77, 21, 10,229,229,250, 26, 92, 83,179,230,
+100,150, 44,203,116, 94,184,112, 97,137,135,135,135,254,198,141, 27, 88,179,102,141,112,229,202,149,223,228,114,249,218,212,212,
+ 84,157, 57,154,141, 65,117, 77, 57,199, 69,111,157, 53,171,213, 83, 35, 70, 8,175,188,251,110,177,204,202,234,173, 47,191,249,
+102,118,126, 81,145, 39, 8,161, 78,106,117,210,186,133, 11, 23, 13,122,230,153,226,216,168, 40,229,213,200, 72,169,139,209,120,
+205,146,118,106, 52,154,168,150,205,125,177,105,253, 50, 24, 12, 58,164,165, 36, 1, 0,178,115, 10, 80,159,185,170, 77,147,227,
+184,130,209,163, 71,203, 0, 88, 77,154, 52, 73,158,153,153,137,230,205,155, 3, 0, 10, 11, 11,113,232,208, 33, 4, 5, 5, 1,
+ 0,174, 95,191, 94,245,216, 84, 59,109,109,109,251,245,234,213, 11, 73, 73, 73,136,139,139, 59,151,146,146,146,239,229,229,117,
+238,225,195,135, 97, 29, 59,118,196,222,189,123,159, 70, 29, 6,203,210,247,200, 28,131, 85,199,185, 47,222,183,111,223,216,243,
+231,207, 15,123,247,221,119, 37,125,251,246, 5, 0,148,148,148,104, 41,165,124, 67, 52,171, 99, 52, 26, 43, 39, 61, 45, 5,128,
+ 10, 51, 85,111,215,234, 95,253,249, 20, 53, 69, 77, 81, 83,212,252, 39,104, 62,105,212,103,176, 56, 65, 16,112,242,228, 73,252,
+248,227,143,188, 94,175,127, 63, 45, 45,237,118,181,231,127,240,241,241, 57, 29, 30, 30,254, 85,124,124, 60, 27, 23, 23, 7,115,
+ 46, 64,213,209,106,181,198,154, 75, 5,107,181, 90,163, 37, 26,181,177,105,211, 38,164,167,167, 27,146,147,147,143,115, 28,183,
+239, 49, 71, 35, 62,246, 40,194, 31, 40,213, 61, 71,200,241, 5, 61,122,244,159, 31, 25,169,120,101,222, 60,221,139,147, 39,191,
+199,235,245, 70, 86, 38, 19,228,214,214, 12,175, 80, 72, 99,163,162,148, 95,191,246,154, 99,153, 78,119,100,171, 5,137,227, 64,
+ 85, 4, 11, 47,190, 50, 19,101,213, 34, 88,231, 47,199,195,210, 8,150, 86,171,109, 13, 0, 86, 86, 86, 15, 1,184, 63,255,252,
+243, 16, 4, 1,101,101,101, 40, 42, 42, 66,106,106,106,193,228,201,147,121, 0,176,182,182,150,132,135,135,219,153,163,219,164,
+ 73, 19,119,150,101,113,248,240, 97, 40, 20,138, 19, 0,160, 80, 40, 78, 68, 70, 70,134, 77,152, 48, 1, 62, 62, 62,190,149,147,
+160,212,167,227, 22, 50,114, 55, 5, 90,130,160, 5, 0,128,160,133,107,200,200, 24, 2,220,169,152,229,253,102,251,246,237, 1,
+ 51,243,174,170,147,149,149, 85, 2, 96,163,155,155,219,161,247,222,123,239,249, 46, 93,186,244,156, 63,127, 62,161,148, 62,246,
+194,232,148, 82,240,188, 69, 95, 17, 17, 17, 17, 17,145,127, 41,117, 26, 44, 66,200,206, 62,125,250, 60, 75, 41,101, 25,134,217,
+ 86,195, 92, 1, 0,146,147,147,239,121,123,123,175,243,247,247,175, 90, 0,218,146,131, 87,204,188,190,132, 97,200,236,242,109,
+203, 39,150,172,182, 36,201,108, 0,132, 97,216,205,191,255,254,251,188,135, 15, 31,102, 89,106,248,106,163, 49, 70, 17, 2,192,
+118, 74,239, 63, 75,200,209,119, 67, 66,250, 13,122,237, 53,132, 14, 26,100,231,233,231,199,151, 25, 12,194,245, 51,103,200,185,
+136, 8,217,213,200, 72,105,153, 78,119,228, 71, 74, 31, 90,218, 78,141, 70, 19,213,188,153,247,177, 49,225, 67, 6, 52,243,247,
+ 4, 0, 36,222, 79, 69,118,110,193, 49, 75,204, 85,117,180, 90,237,136,149, 43, 87, 30,144,201,100,146,234, 75,206, 24, 12,134,
+220, 74, 19, 70, 8,241, 92,183,110,221, 78,134, 97,146, 76,233,221,190,125,251,216,130, 5, 11, 6,221,187,119,239, 84,114,114,
+178, 6, 0, 18, 19, 19, 53,158,158,158, 63,166,166,166, 14,126,248,240,225, 47,166,204, 21,240,167,197,158, 17,123,102,143, 18,
+ 64,155,202,197,158, 27,186,214, 96,117, 42, 76,249,151,222,222,222, 63, 13, 30, 60,248, 89, 66, 72,186,201, 74,245, 96, 99, 99,
+195,149,149,149,113,130, 32, 72, 12, 6, 3,181,177,177,249,219,187,170, 69, 68, 68, 68,254,229,116, 4, 80,185,114, 72,101,224,
+196,165,198, 99, 61,128,234, 75,249, 85,110,103, 1,184, 92, 77,163,250,126, 83,117, 1, 32, 27, 64, 76,197, 62,179,168,211, 96,
+105, 52,154, 95, 96,198, 98,206,230,150,171, 11, 74,233,251,132,144,175, 43, 30, 55,104,214,238,234, 26, 28,199, 53,202,250,109,
+ 12,195,220, 31, 62,124,184, 69,229, 77,149,217, 73,105,210, 91,132,108, 57,248,237,183,237,142,172, 89,227,197,115,156, 19, 1,
+ 40, 43,151,231,232,245,250, 7, 46, 70,227, 53, 75, 35, 87,213, 73, 72,212, 12, 4,128,128,128, 0,122,231,206,157,199, 30,141,
+ 65, 41,189, 6,192,199, 68,153, 84, 0, 61,205,209, 75, 78, 78, 62,128, 90, 70, 10,166,166,166,254, 12,224,103,115,219, 85,181,
+216, 51,192, 8, 68, 24,211,186,199,216, 8, 0, 66,229, 98,207,141,137, 70,163, 73, 4, 96,209,106, 2,181,145,144,144,160,247,
+247,247,223,191,120,241,226,145, 49, 49, 49, 7,147,147,147, 27,252, 62,139,136,136,136,252, 7,233, 8,192,133, 16,114, 16, 0,
+ 40,165,195, 0,128, 16,114,176,230,227,202, 50,149,229,170,151,169,212,168,185,191,190,186, 0, 48,119,238,220,121,139, 22, 45,
+ 82, 1, 48, 59, 23,247,111,159,104,180, 54, 26,106,172, 26, 91,163, 58, 26,141,102,189,233, 82,150,243, 77,185,129,106,148, 68,
+238,186,136,143,143,127, 98,134,185,214, 70,229, 98,207,213, 8,249,127,105,136,133,220,191,127,127, 75, 88, 88,216,142,228,228,
+100, 49,122, 37, 34, 34, 34, 98, 25, 46,181, 25,162,218, 10,214, 98,170,234,164,182,114,181,109, 19, 66, 14, 46, 90,180,200,164,
+ 94,117, 30, 59,175, 68, 68, 68,196,124,254, 63, 70,177,138,136,136,136,136,212, 78,205,168, 21, 80,110,186,106,110,207,157, 59,
+119, 30, 44,232, 30, 4,202,103,230,238, 87,199, 65,205, 30, 29, 64, 8,169, 85,163, 62, 76,233,139,154,162,166,168, 41,106,138,
+154,162,166,168,249,228,105,154,210,174,163,254,208,186,186,244,234,235, 46,172,249,216, 84, 93, 51,202,154,191,130, 71,101,242,
+242, 95,113, 3,208, 79,212, 20, 53, 69, 77, 81, 83,212, 20, 53, 69, 77, 81,243, 49,111, 29, 41,165, 67, 81,190,202, 9,165,148,
+ 14,165,148, 14,154, 59,119,238,251,149,251,230,206,157,251, 62,165,244,233,202,114, 21,101,170,234, 84,238,171,121, 95,115,159,
+137,178,102,183,249, 31,145,131, 37, 34, 34, 34, 34, 34, 34, 34, 82, 15,151, 1,116,164,127, 68,151,178, 0, 92, 95,180,104, 81,
+ 94,181,220,168, 44, 0,215, 0,180,173, 40,151, 5,252, 41,167, 74, 95,177,173,175,165,140,222,156,178,230, 34, 26,172, 58,104,
+231,193,126,226,235,237,218, 1,168,136,242,149, 79, 14, 9,161,220,185,131, 86, 88,120, 8, 2, 40,165, 72,205,204,143,142,201,
+160, 31, 54,244,120,129, 94,196,209, 85,169, 92, 33, 80,218,163, 98, 87, 84, 65,142,110,230,141, 2,154,111,174, 70, 43,119,210,
+ 74,201,224, 61,129, 34, 20, 0, 24,130, 24,173,128, 47,110,166, 83,139,231,131,170, 9, 33,132,180,118,193, 20,185,149,106,188,
+218,222,161, 69, 94, 94,246, 29,131, 86,183, 39, 46, 11,107,171, 94, 11, 11,104,238, 72,186, 8, 20,243, 0, 48, 82, 6, 95,197,
+231,208, 6,207,146, 46, 34, 34, 34, 98, 33,236, 99,214,175,109, 10,160,199, 29, 92,212,176,229, 39,254, 91,212, 54, 17,249, 37,
+ 51,203,253,237, 88,100,176, 90,187,146,215, 64,240, 17, 0, 10,138,143, 99, 51,233,106,139,234,123,146,126, 74,150,221, 0,128,
+213, 26,248,119,169,128, 83,181,149, 35, 12,122, 41,101,236, 87, 0, 4, 45,207,191, 28,155,106,126, 62, 88,136, 55, 25, 36, 17,
+152,173, 2,165, 82, 94,160,155, 65,113,208, 70,134,179,231, 53, 84,107, 73, 91,125,189, 93, 59,236,191,148, 54,224,183,213, 51,
+208, 57,180, 57, 40,207, 1,130, 17,170,158,239,225,215,229,207,163,115, 43, 95, 80,193, 8, 8, 28,108, 6,127,137,193, 33,234,
+ 6,127, 57, 2,189,136,163,159,179,235,141,245,235, 55,184,123, 54, 11, 38, 2,103,192,237, 75,199, 38,190, 61,123,126,223, 16,
+ 53, 9, 49,199,100,181,245, 36,175, 52,111, 26,248,222,204,143,150,177,158,158, 62,214, 60,167,227,210,239,221,108,255,205,210,
+249,123,219,122,146,175,174,165,210, 13,230,180,133, 16, 66,130, 93, 48, 85,162,144,143,181, 82, 90,183, 40, 45, 45,186,203, 27,
+140,123, 66, 60, 37,131,190,248,114, 69,187,176,254, 67,108,248,162,116,198, 40, 32,120,247,174,157,126,223,174, 92, 53,132, 16,
+242, 12,165, 84,176,228,156, 5,138,217,241, 91,166, 12,145, 74, 88,210,234,165,245, 44, 44, 24,250, 90,157, 96, 55, 50,129, 80,
+211,211, 68, 80,130,211,113, 25,212,162,121,218, 42,105,229, 70,190, 39, 20, 1, 32,136, 32, 20, 59, 99, 51,105,102, 67,116, 68,
+ 68, 68,254,185, 48, 12,243,155, 32, 8,125, 26, 83,147, 16,210,133, 82,250,151,142, 26, 23,249,231, 98, 89, 4,139,224,211,216,
+132,100, 7,240, 6,180, 14,104,246, 9, 0,139, 12,150,146,101, 55, 95,190,147,225, 14,206,128,245,159, 77,223,165, 55, 2,156,
+209, 0,158, 51,130,231,140,224, 56, 3,120,163, 17,212,168,195,252,141,191, 1,250, 34,116, 8,105,185, 25,128,135,185,199,144,
+ 82,102,107,244,153, 99,142, 68, 95,128, 29,171, 23,189,153,156, 85,252,230,241,152,212,236,214,110,228,253,184, 76,252, 96,137,
+ 17,248,109,205, 12,108,219,119, 72,243,245,247, 37,183, 4, 74,225,104,103, 21, 56,113, 88,172,207,150,159,126, 75, 94,177, 89,
+123, 11, 0,212,214,242,192, 23, 98,238,248, 90,242, 58,212,196, 85,169, 92,177,118,213,183,238, 30, 78, 86,132, 59,183, 24, 28,
+207,195,199,111, 40,251,254, 27, 19, 61, 62, 93,190, 97, 57,128, 23,235,171, 31,228, 70,130, 3,154,183,122,119,243,161,115,190,
+165, 69,153,250, 99,219,230, 37, 80, 29,140,238, 94,173,164,159, 44, 90,198,126, 48,103,198, 59, 65,110,228,226,173, 12, 26, 87,
+159, 14, 33,132,105,229,138,159, 22, 45,254, 50,180,239,224, 97, 54, 66,113, 22,171, 45, 41, 14, 88,191,113,195, 71, 65,161,157,
+ 84, 61, 67,188,101,153,123,166,145,178,162, 92, 24, 24,165,162,111,235,126,118,101,147,158, 53,174,223,180,237, 13, 0,223, 88,
+114,206,124,181,238,105, 65,104,248,191, 73, 66,209,243,234,133,223,166,242,169,151, 65,121, 35,192, 27,170,238,193, 27, 65,133,
+242,251,206,211, 54, 2, 64,131, 12, 22, 67, 49,224,248,153,203, 30, 25,233,105, 29,151,127,249,249,251,193,174,228, 23,240,216,
+122, 51, 23, 81,150, 26, 75, 17, 17,145,127, 46,132, 16,142, 82,218,168, 61, 59,132,144, 33,148,210,195,143,169,241, 30,128, 87,
+ 42, 54, 55, 80, 74,191,104,132,118,121, 3,112,175,216, 76,167,148,138,107,160, 54, 50,150,126,144,148,160, 2, 16, 49, 18, 0,
+172, 44, 61, 24, 5,148, 32, 44, 96, 44,193,136,193,253,225,236,234, 14, 24, 75, 1, 67, 41, 96, 44, 3,140, 37,128,177, 12,217,
+105, 73,128,161, 4, 72,252, 5, 28,165, 10, 75,143, 3, 93, 1, 16,191, 7, 79,183,247,133,139, 90,137, 25, 35,130,157,215, 29,
+137,223,176,225,216,237,126, 0,198,155,213, 86, 74,209,185, 77, 11,124,189,161,228,214,129,232,204,129, 0, 48,180,157,243,145,
+206,193,126, 62, 43, 54,107,111, 29,138,201, 29, 4, 0,131, 67,212,191,116, 10,244,240, 21, 30, 35,186, 43, 80,218,211,179, 73,
+ 11,194, 95, 93, 11,161, 80,131,194,194, 50,104,238,111,129,131,215, 83, 12, 47,160,183,169,250, 86, 44,230,190,245,191, 37,210,
+210,194, 12, 61,111,200,226,157,153, 60,137, 68, 33, 16,164, 70,233, 74,132,124,254,237, 87, 39,241,179,230,127, 62, 23,192,196,
+250,116,130, 93,241,198, 87, 95,173,104,211,189, 67,144,107,250,222, 25,164, 56, 47, 3, 28,171, 82,140,232,218, 29,246, 45,131,
+133,140,147, 95, 17,121,179,126,176,119,106,134,148,115,219,241,224,194,143,164, 71,251,112,197, 15, 59,100,147, 80,135,193,106,
+233, 66,122, 12,236,213,105, 87, 51, 95, 79, 15, 74, 5, 8, 2, 5, 21,120,188, 52,102, 0,222,223,157, 8,158,231, 49,122, 96,
+143,167,151, 76,237, 75, 5, 65, 0,165, 2,146,211,115, 74, 79, 92,188,245,116, 66, 46,189,104,234,220, 41,193,233,182, 93,250,
+244,136,137,190, 16,100,140,255, 25, 29, 38, 46,186, 69,128, 51, 85,207, 3, 61,126, 63,250, 67, 16,176,209,148, 84,173, 16, 66,
+ 72, 43, 87,240, 15,142, 44,134,111,175, 41,236,218, 29, 71, 92, 10,178, 82, 94,216,187,101,213,152,213,107,215,110, 3, 48,173,
+ 65,194, 34, 34, 34,255, 56, 40,165,141,110,178, 18, 18, 18,210, 30,199,100,121,123,123,247, 2,176,180, 50, 19,131, 16,178,212,
+223,223,191,106,181,138,138,181, 77, 43, 41,224,121,126,162, 70,163,169,181,119,168,146, 97,195,134,121, 2,240,175,166,233, 79,
+ 8,241,175,173,172,189,189, 61,223,173, 91,183, 7, 7, 15, 30, 76,109, 72,251,255,203, 88,250, 33,186,245,112,207,140,246,186,
+180, 98, 0,184,101,170, 48,173, 49,212, 82,107,228, 23,111,250,232,249,197,173,155, 56,162,168, 68,143, 99, 87, 30,128,231,141,
+224, 57,174, 34,146,197,129,231,140, 24,216,214, 25,221,180,211,240,205,193,219,224,120, 97, 81,125,154, 53, 49, 80, 97, 66,187,
+126,227,118, 11, 2,149, 43,164, 76, 65,128,143,147,235,187,163,219, 50, 51, 70,180, 70,153,129, 27, 23,236, 70, 78,196,101,208,
+ 71, 38, 17,173, 83, 83,248,243,148, 69,180,182,125,124, 45,251,204, 28,166, 26,228, 70, 58, 63, 59,172,191, 29,213, 21,192,152,
+157,136,162, 82, 35, 18,115,140, 72,215,230, 67, 65,210,204,210, 20, 40, 66,189, 60, 60,172,207,238,154,115,223, 73, 82, 40,113,
+149,112, 82, 57,229,164,188, 64, 89,228,199,233,156,130,250, 75, 42,243,178,234,107,167,149,202,246,249, 94, 3,134,170, 31,110,
+159, 66,172, 2, 6,194,181,189, 15,238,159,218,132,204, 43, 7, 81, 92, 92, 72, 20, 5,249,112,115,106,142,193, 19,199,227,139,
+241, 29, 81, 84, 88, 4, 54, 45, 65, 45,151, 42,236,235,210,164, 60, 38,126,181,228, 51, 15, 9,203,148,191,158,149, 55,222,136,
+ 50,157, 14,224, 57, 40, 37, 2, 8,173,124,206, 8,222,104, 80,133,134,207,153, 14,224, 98,109,154,213,137,203,160, 59, 90,187,
+146,158, 16,140, 65,212, 88, 6, 2,156,137,205,164, 85,166, 39,216,141, 76,120,106,224,228,158,148,224,116,125,231, 94, 23, 33,
+ 78, 24,214,193,223,198,218,186,240, 22, 52, 17,111, 34, 1, 74,234,214,253, 21, 76,120,233, 13,213,186,117,235,134, 19, 66, 94,
+171,158,131,102,238,251,110, 9,162,166,168,249,111,213, 84,171,213, 77,155, 52,105, 50,223,104, 52,246,146,201,100,110, 6,131,
+ 1,130, 32,164,203,229,242,211, 15, 30, 60, 88, 88, 80, 80,112,239,159,208,206,234,196,196,196,152,109,178,204,209,148, 74,165,
+184,125,251,246, 93,115, 77, 86, 77, 77,169, 84,186,245,204,153, 51,216,189,123, 55, 0, 32, 62, 62, 30, 45, 91,182,180,174,173,
+238,253,251,247,173,195,194,194,182,162,198, 10, 28, 53, 53,175, 95,191,222,244,231,159,127, 70, 68, 68, 4, 0,224,246,237,219,
+ 8, 8, 8,168,181, 61,103,206,156, 97,159,123,238,185,166, 0, 30, 49, 88,127,197,123,244,164, 33, 1,128,138,245,117, 73,205,
+199,181,144,232,235, 32,111, 15, 45, 15, 0,137,150, 30, 44, 46,157, 46,105,235, 33, 29,244,107,196,202, 94, 74, 25,131, 5,235,
+223, 77,206,202, 45,234, 34, 33, 16, 0,128,163, 96, 28,108,228,231, 23,189,208,214, 55,175, 88,139, 3,151, 82, 78,197,102, 88,
+ 22, 10,141, 77,165,145, 0,170, 46,248, 33, 78, 36,224,133, 47, 34,119,238,156, 59, 40,116,230,136, 80,252,116,238,193, 76, 0,
+ 38,103,105,167,130, 0, 42,112, 85, 73,237, 0, 0, 65, 0, 4, 14,213,174,167, 16, 64,203,247, 9,150, 69,176,194, 8,145,228,
+185, 98,176,163, 74,254,221,212,169,175,218, 25,179,238, 32, 87, 47, 67,114,158, 22,233,101, 82, 20, 75, 92,145,114,235, 58,207,
+ 16, 68,154,210, 34, 4,133,224,181,246,142,114, 27, 38,164,255,116,175,194,163,243,242,228,148, 99,237, 70,126,106,159,253,235,
+178, 7, 92, 89, 86, 9, 33, 48,185,136,182, 90,109,223, 82,155,243,128, 45,200,203,134,189,123,107, 12, 26, 55, 12, 31, 15, 13,
+ 70, 81, 97, 9,178,206, 29,162, 45, 60,236, 72,210,233,109,248, 96,112, 43,228,100,164, 65,103, 4, 72,137, 46, 87,171,215, 22,
+215,165, 73, 25,172,125,123,214,236, 9,126, 30, 46,214,149,131, 5,168,192,163,109,171,102,232,223,171, 51, 34,207,156,197,229,
+235,241, 16, 42, 6, 11, 80, 65,128, 38, 51, 47, 67,107,224, 55, 89,244,130,242, 28,168,241,207,105,118, 21,121, 87, 22,119, 13,
+182,113, 35, 42, 30,248,176, 75, 11,219,151,231, 14,243,179,181, 86, 16,104,141, 60,180,122, 35,138,206,126, 7,167, 38,109,160,
+ 82, 42, 73,123,148, 73, 0,211,175,173,136,200,127,137,177, 99,199, 42, 51, 50, 50, 78, 14, 29, 58, 52,184,127,255,254,170,158,
+ 61,123,162,164,164, 4,199,142, 29, 67, 73, 73,137,159,143,143,143,223,177, 99,199,194,187,116,233, 18,231,237,237, 29,182,103,
+207, 30, 75,114,100, 37,248, 35, 73, 93, 0,192, 17, 66, 80,177,143, 0, 16,232, 99,172, 67, 43,151,203,145,148,148,212,104,145,
+ 44,153, 76, 6,173, 86,139,148,148, 20,179, 77, 86,117,138,139,139,101, 94, 94, 94,112,113,113, 1,207,243, 40, 41, 41,193,254,
+253,251, 81, 80, 80, 0, 65, 16, 96,101,101,133, 79,191, 90,143, 91,191,159,196,197,139, 23, 81, 80, 80, 32, 51,165,169,209,104,
+ 72,219,182,109,161,211,233,192,113, 28,180, 90, 45,142, 31, 63, 94,181, 45,145, 72, 48,251,147,229,136,191,114, 18, 87,175, 94,
+133, 70,163,249, 91, 86, 7,177,192,139,252, 43,248,219, 71, 17,242, 60,247,254,186,205, 59,207,191, 63,109, 60,222,120,182,159,
+207,194,149, 63,246,139,203,162,155, 1, 32,216,133,188, 48,169, 79, 11, 95,123,149, 20, 31,111,191, 2, 80,250,254,227, 30,239,
+ 70, 14,141,111,237, 78,102,238,187,152,116,114,222,248,246,104,230, 97,215,178,121,115, 34, 79, 72, 48, 99,205, 63,129,131,131,
+141, 34,112,104, 59,231, 35, 16, 4,216,219, 42,130,192,115,176,183, 81, 4, 14, 14, 81,255, 2, 0,246, 42, 89, 80,109,145,174,
+186,232,232, 43,155,162, 82, 72,166, 88, 63,229,225,251,226,240,254, 86, 67,134,135, 91,217, 72, 57,228, 92, 60,134, 66,169, 55,
+140,142,126,208, 25,115,161,185,151,192,255,122,225,102, 74,118,145,238, 93,147,205,164, 56,149,114,239,182, 75,211,208,254, 14,
+217, 7, 63,200,108, 58,121,187, 63, 3,129, 41,218, 54, 42,195,218,181,147,213,165,187,247,138, 5,250,231, 8, 78, 77, 10, 11,
+ 10, 30, 24,121,120,148,241, 18,219,132,223,126,192,220,193,109,144,151,155, 9,173,129, 67, 65, 25,103,112,183, 87, 42,116,247,
+110, 64,103,224,160, 55, 10,144,218,123,225,216,249,235,217,130,209, 88,231, 90,148, 9,217,244, 42, 0,155,234,251,154,187,144,
+182,115,236,172,174,194, 88,134, 36, 77, 42, 54, 31, 58,223,190,162, 92,131,161, 2, 87,222,205, 92, 65,101,242,123, 67,146,219,
+ 91,185,145, 78, 86, 74,217,183, 75,103, 62, 23,220, 53,192, 81, 33,104,206,131, 8, 6, 88,243, 18,148,201,121,168,125,154, 65,
+208, 23,209, 82,173, 54, 63, 22, 16,103,102, 23, 17,169, 70, 80, 80,144,187, 90,173,142,157, 53,107,150,227,168, 81,163,176,111,
+223, 62, 20, 22, 22, 98,211,166, 77, 88,177, 98, 5, 62,250,232, 35, 24,141, 70,172, 91,183, 78,181,119,239,222, 78,171, 86,173,
+210,248,249,249,181, 78, 74, 74, 50,181,160, 58, 1,160, 0, 32, 69,249,181,139, 0, 16, 14, 31, 62,140, 33, 67,134,224,240,225,
+195, 66,197, 62,158, 16, 98,164,148,234, 26,210,126,185, 92, 14,185, 92,142,130,130,130, 70, 51, 89, 54, 54, 54,144,203,229, 40,
+ 42, 42,178,216,100,113, 28,199,106, 52, 26, 20, 20, 20,160,255,240,225, 88,190,104, 17,250,244,233,131,254,253,251,131, 82,138,
+227,199,143,163, 95,247, 16,140,127, 38, 12, 55,111,222, 4,199,113,102,181, 55, 61, 61, 29, 25, 25, 25, 24, 52,124, 56,214,175,
+ 90,133,206,157, 59, 35, 48, 48, 16, 28,199,225,228,201,147, 24, 51,176, 59,148, 35,251, 33, 62, 62,190,225, 39,254, 31,231,111,
+ 55, 88, 55, 50,233,133, 96, 23,114,240,217,129,157,134, 13,239, 17,140,245,187,126,253, 44, 56,152,236, 4, 0, 39, 91,197,167,
+207,247,105,134,184,135,121,248,245,106,234,193,184,172,198, 25,125, 33,240,112,118,178, 83, 1,172, 28,101, 6,129,179, 75,132,
+201,196,100,129, 82,168,122,205,193,164,225,113, 62,157,131,125,124, 42, 71, 17,218, 12, 89,134, 23,174,223,245,237, 24,232,238,
+ 11,222, 8,240, 70,216,141,223, 14,124, 82,107,196,246, 17,122, 52, 85, 68,206,121,119,102,183,193, 35,199, 89,201, 85,106,240,
+133,201, 48,166, 95, 71,206,157, 83, 40, 81,181, 68,122, 82, 34,118, 31,189, 88,112, 71,147, 83,200, 48, 56,150, 81,160,123, 47,
+ 33,151,214, 25, 29,170, 68,107,196,162,249, 31,188, 59,116,247,206, 93,182,138,102, 61, 72,194,119, 67, 10,228, 18, 78,225,210,
+244, 41,166, 84,233, 76, 63,223,180,203,174, 68,143,197,166,116, 74, 75, 10,127, 60,126,236,200,248, 22, 77,123,216,222,191,124,
+ 8,101, 90, 29,116, 70,160,117,167, 48,240, 60,149, 19,134, 8,118, 44, 75, 50,115,242, 64,140,124,198,233,107,247,211,206, 92,
+ 75,100,117,182,166,181,171, 35, 33,236, 91,195,195,218, 1,198, 50, 60,211,171, 13,150,111,251,245, 77, 0,147, 45,209,248, 19,
+ 66,121, 4,139, 2, 61, 90,187,146, 53, 0,122, 92,217,191, 34,168,195,200,183, 1, 11, 34, 88, 33, 46,100,112, 72,115,207, 31,
+150,127, 58,199,209,201,187, 37, 75, 4, 35,168,123, 40, 80,168,161, 68,115, 30,106,175,206,224, 61,187, 99,221, 55, 95, 22, 11,
+ 2,221,217,144, 41, 42, 68, 68,158,100,180, 90,237,143, 75,150, 44,113, 28, 54,172,124, 58,161,226,226, 98,156, 63,127, 30, 27,
+ 54,108,128,181,245,163,191,147, 67,134, 12, 1,165,212,113,193,130, 5, 63, 2,232, 90,151,102,151, 46, 93,134,175, 92,185, 50,
+181, 93,187,118,137, 40, 55, 89, 50, 0,204,141, 27, 55,152,228,228,100,226,224,224, 64, 61, 61, 61,141,169,169,169, 2, 0,254,
+165,151, 94, 98,109,108,108, 90, 20, 23, 23, 71, 89,218,254, 74,131, 37,151,203, 27, 37, 39, 75, 42,149, 86,233,202,100, 50, 80,
+ 74, 45, 50, 89, 60,207, 75, 14, 31, 62,140, 43, 87,174,224,163,118,237, 48,211,203, 11,142,142,142, 56,121,242, 36, 40,165,176,
+182,182, 70,110,110, 46,118,238,220,137,190,125,251,130,227, 56,147, 17, 44, 0,136,136,136, 64,116,116, 52, 62,233,208, 1, 51,
+213,106,216,216,216,224,248,241,242, 94, 63,133, 66,129,164,164, 36, 28, 63,126, 28, 97, 97, 97, 13, 61,245,255, 60,102,127,104,
+194, 8,145, 16, 55,184, 27,244,101,160, 28, 5, 8, 60,131,131,137, 44, 46,142, 26, 44, 61, 40,195,224,131,111, 54, 31, 28,186,
+236,237,225,100,202,136,246,158, 11,127,248,237, 53, 0,120,121,116,128,151, 74, 33,193,215, 63,197, 81,134,193, 7,150,234,214,
+ 70,112, 48,145, 49, 12, 94,235,223, 57, 16,169,249,122, 36,164,230,159,136,163,212,172, 46,157, 95,151, 77,194,150, 3, 39,147,
+ 87,108,209,222,162,148,194,222, 70, 17,248, 66, 76,130,239, 15,135,163, 31,126,181, 91,123,139, 10, 20,246, 42,105,208,228,155,
+221, 77,142, 34,236,232, 43,155,242,254,156,247,186,143,152, 60, 75,201,221,218, 3,125,194, 81, 8,134, 50, 20, 26,100,200,103,
+221,161,121,248, 16,159,175, 59,152, 92, 88,162, 31,127, 35,211, 50, 99, 25,159, 77,139,131, 93,200,168,207, 63,158, 23,185,232,
+211, 5, 54,165,137, 39,139, 89,194,149,177,126,189, 37,159,126,180,140, 20,233,244,227, 18,114,105,145, 41, 29,157, 45, 22, 47,
+249,234,155,161,175, 78, 12,191, 21,208,178,183, 19,159,122,207, 73, 91, 88,152,185,253, 72,180, 59,202,255, 25, 18, 0, 72,208,
+228, 32,171,160,132,227, 57, 99,148,173, 20, 11, 99,205,137, 6, 86,208,204,141,184,140,234, 25,250,156,139,173, 12,101,197,249,
+112,181,149, 98, 96,231,230,207, 53,115, 35,115, 18, 51,168, 69,147,184, 61,130, 96, 4, 53,150,225,194,226,190, 65,148, 55, 6,
+129, 55,194, 16,179,213, 98, 25, 74, 48,243,141, 94, 54,118, 14,250,251, 12, 74,172, 1, 43,103, 16, 59, 63, 64,237, 79,164,173,
+198, 33, 53, 49,150,123,243,185,137, 57,247, 30,104,190,119,182,194, 99,143,228, 17, 17,121,210, 72, 74, 74,122,254,253,247,223,
+ 63,211,185,115,103, 55,103,103,103,180,105,211, 6, 7, 14, 28,192,172, 89,179,170,202,180,107,215, 14,148, 82,228,230,230, 98,
+201,146, 37,233,169,169,169,207,215,167,121,235,214,173,219, 91,182,108,233, 25, 28, 28,108,144,201,100,249, 0, 20,249,249,249,
+202,220,220, 92,162,213,106, 33, 8,130,160, 86,171,249,212,212, 84,227,248,241,227,117,231,206,157,107, 94, 82, 82,242,176, 33,
+237,175, 52, 87, 62, 62, 62, 55,114,114,114, 10, 8, 33,143, 53,133,131, 84, 42, 5,195, 48,144,201,100,112,118,118,118, 41, 46,
+ 46, 22, 0,228, 53,100, 10, 7,142,227,208,161, 67, 7, 28, 61,245, 59, 14,255,122, 14,133,169,183,241,218,171,207,163, 77,155,
+ 54, 56,122,244,104, 67,154, 7, 0,104,219,182, 45,142, 28, 63,131, 51, 87,174, 33, 41, 62, 6,111,190,246, 42, 90,183,110,141,
+ 35, 71,142, 52, 88, 83,228, 15,131, 21, 70, 8,169,252, 39,254, 39,187,218,202,133,180,245,108, 33,223,186, 96,112,243, 86,210,
+254, 11, 64,164, 86,216,211,242, 72,247, 15, 62,255,238, 86, 27, 55, 50,241,122,134,233,209, 94,213,185,145, 65, 99, 91,187,146,
+ 29,215,110, 6, 61,247, 76,103, 31,172, 63,160,250, 16, 0,198,245,108,138, 75,119,178,112, 49, 62,115, 71,108, 38,141,125,188,
+ 83, 43,207,163, 1,197,142, 37,111,141, 8,243,243,118,199,134,125,103, 64, 8,126, 52,167, 46,165,148,118, 14,246,195,138, 45,
+ 53, 71, 12,186,251,126,181, 91,123,235,232,141,194,193, 0, 48,160,149,245, 47, 29,155, 59,248,154,138,100, 88,201, 37, 83, 7,
+135, 79, 82,114,241, 7,128, 7,199, 65, 56, 29,202, 12, 2,210,178,139, 80,170,246,193,201,243,215,202, 10,180,250,183, 99, 45,
+ 52, 87,149,196,101,209,196,118, 30,228, 97, 73, 73,153,135,202,165,185, 86, 66, 4, 90,172, 21,112, 41,238, 65, 65,108, 26,189,
+109,142, 70, 66, 2,213,119,245, 38, 61,215,108,222, 61, 95, 42,147,143, 99, 9,136,171,189,181,203,154,101,159,192,214,214, 6,
+130,190, 24, 40,201,194,168,215, 63,207,186,158, 98,104, 10, 0, 1,206,196,166, 87, 51,217,102, 9, 67, 52, 39,238,234,255,103,
+234, 24,196,136,105, 19, 7,182,147, 10,250, 18,188,181,100, 23,214,206, 25,129, 73, 79,183,146, 30, 58, 27, 63, 13,192,194,134,
+156, 59, 80, 62,208,128, 26,203,208,117,222,169, 91, 4, 56, 67,129, 30, 87,118,127, 26, 4,252,110,182,198, 83,132, 72, 37, 30,
+164, 85,168,175,181, 76,208,156,133,160, 57, 75, 89,159,238, 32,190,189, 8,113,239, 64,191, 93,250, 81,201,250,245, 27,142, 9,
+ 12, 62, 54, 53,229,133,136,200,127, 21, 74,105,162,189,189,253,160, 33, 67,134,252,122,244,232, 81,199,144,144, 16, 0,192,149,
+ 43, 87, 0, 0, 29, 58,116, 64, 64, 64, 0, 50, 50, 50,240,236,179,207,102,167,165,165, 13,162,148,214,155,211, 91, 84, 84,148,
+ 24, 17, 17,225, 90, 92, 92,220,254,195, 15, 63,204,240,243,243, 43,212,106,181, 36, 63, 63, 95,224, 56, 14, 14, 14, 14,242,118,
+237,218,161, 91,183,110,197,231,206,157,243, 79, 78, 78, 46, 4,112,191, 33,237, 31, 49, 98, 4, 78,157, 42, 31,132,215, 24,243,
+ 98, 73,165, 82,132,132,132,120, 37, 38, 38,166, 0, 64, 67,230,197,170,126,121,185,118,237, 26,162,126,215, 64,162, 47,131, 60,
+ 43, 21, 23,246, 69, 96,248,212,233,224,184,134,103, 43, 92,187,118, 13,251,143, 95,128,181, 66,130,219,183, 99, 17, 17, 17,129,
+215, 94,123,237,177, 52, 27, 72,189, 94,228,223,134, 4, 0, 40,165, 81,168,101, 22,218,230,205,137, 92, 81,140, 5, 3, 59,120,
+205, 30,215,163, 57,107, 44, 76,133,192, 11, 96,165,128,171,179, 29,182,110,221,209,116,199,174, 93,231,219,122, 73,191, 17, 56,
+238,131,235, 25,180,212,130, 99, 47, 88,182,235,204,184,173,239,134, 73, 94, 27, 28,228, 8, 0, 50, 9,131,175, 15,196,114, 0,
+ 22, 60,206, 73,117,245, 38,202, 98, 35,166,184, 59,169, 63,124,255,149,161,142, 97, 29, 2, 16,117,241, 6,190,137, 56,127, 74,
+158,137, 45,230,234, 80,193,136,154,190,169,182, 81,132, 16, 76,231, 83,242, 60,117,151, 89, 59,192,240,224, 55,192,160,133, 86,
+103, 64,114, 14,143,228, 92, 45, 36, 42, 25,174,196,107,202,156,210,113,208,164, 80, 29, 16, 66, 72,143,102, 74,207, 15, 63,251,
+202, 91, 91, 86,204, 21,230,101,115, 50,249, 5,169,202, 74,145,102,186,246, 31,156,215, 80,109,239,166,178,167, 0,129,149, 43,
+105,233,188,119, 94,180, 78,137, 59,138, 22, 76, 42, 8,165,176,106, 53, 20,182, 86,172,172,167,191,236, 33, 0,248,187,171,229,
+ 75, 62,158,165,126,123,206,199, 38,115,188,130, 9,145,181,233,232,254,118,136,159, 3, 78, 69,223,194,169,235, 73,177,167,174,
+220,110,221,167,141, 39, 2,188,237,103, 4, 19,178, 56,142, 90, 30, 17, 5, 0, 80, 14, 48,106,171, 70, 17, 6,187,145, 9, 29,
+199,253,175,214,209,131,117,225, 15, 8,241, 60, 5, 97, 89,128, 48,229, 35, 26,147,207, 66, 98,223,140,238,216,189,191,116,195,
+134, 45,159,196,101, 61,254,252, 51, 34, 34, 79, 58,249,249,249, 49, 42,149,106, 96,104,104,232,166,183,222,122,203,118,226,196,
+137,158,175,190,250, 42, 3, 0, 25, 25, 25,194,138, 21, 43, 82,191,253,246,219,130,236,236,236,201, 6,131,225,186, 41, 61, 74,
+ 41, 37,132,156,219,184,113, 99, 86, 84, 84, 84,235, 46, 93,186, 40, 59,116,232,192, 59, 56, 56, 72, 20, 10, 5,175,215,235,181,
+241,241,241, 66, 98, 98,162,103,126,126,254, 29, 0, 9, 13,233,190,175,136, 86, 45,100, 89,118, 62,165, 52,164, 49,114,176, 84,
+ 42,149, 7,128,187,132,144, 22,150,118, 15,214, 68, 34,145, 32, 47, 47, 15,165,233,177, 80,106,238, 32,212,154, 65,176,131, 13,
+236,236,236, 30,203, 12, 21, 20, 20, 0, 37, 41, 56,115,230, 26,192,113, 80,171,213, 80,171,213,127,187,193,170,203,139,252, 91,
+169,243,131,211,218,149,188,230, 32,199,138,169, 67,155,203,252,125,189,161,211, 92,193,181,228, 98,124,208,165, 83, 28,171,176,
+213, 78,125,126, 68,135,240, 49, 77, 16,214,173, 35,241,247, 80,207, 88,188,108,245,235,173,221,200,172,216, 12,250,181, 57, 7,
+142,205,164,247, 90,185,146, 13,191,197,104,166,121,171,202, 32, 8, 20,191, 93, 79,195,245, 7,121, 27,110,102,210, 90,135,238,
+214,217, 86, 79,210, 79, 2,102, 23,165, 84,169,182,182, 46,106,215, 54,200,185, 95,215,182,204,160,222, 29, 32, 99,129, 51,151,
+174, 97,230,178, 31, 47, 8, 2, 29, 26,109,102,247, 96,249,136,193, 71,141, 83,249,136, 65,227, 35, 35, 6, 41,165,180,124, 20,
+ 97,253,105, 93, 44, 75,210, 75,147, 46,187, 75,157, 90,162, 44,225, 55, 60,200, 19,144,148, 89,132, 66,137, 59,116, 41, 41, 0,
+ 21, 30,158,164,180,193,159,102,103,103,103,215,166,193, 1,205,191,219, 28, 1, 67,105, 1,238,157,220,132,226,188, 52,124,186,
+230, 64,115,111,111,239,222, 26,141, 38,202, 92, 45, 66, 72,192,175, 7,119,184,130, 2,172, 84,129, 67,171,118, 35,219,201, 10,
+206, 42, 25,132,178, 44, 76,125,123,162,122,112,255,137,106, 0, 72,186,125, 21,126,170, 50, 83,146, 0, 0,131, 19,194,199,245,
+ 9,180,135,177, 12,155,143, 92,213, 50,192,160, 45,199, 98, 19,250, 4,217, 43,199,245,240,115, 88,152,154, 63, 26, 13,156, 12,
+180, 50,130, 85, 73, 67, 70, 15,238,161,148,111,229, 66, 18,118,157,203,180, 30,211,255, 41,149, 76, 66, 8, 45, 78, 1,181,114,
+198,234,205,123,138,229, 70,172,107, 72,219, 68, 68,254,139,148,150,150, 70, 19, 66,218,188,247,222,123, 19,230,205,155,215,203,
+218,218,186, 41, 0,148,148,148,220, 51, 26,141,167, 0,236,176,100,180, 95,133, 97,186, 75, 8,185,119,255,254,125,247,237,219,
+183,171,241,199,124,140,101, 0, 10, 80, 62, 97,102,131, 71, 16, 86,154, 41, 66,200,124, 83,101, 45,208, 60, 92,161,217,162, 33,
+245, 25,134,225, 9, 33, 32,132, 64,161, 80,224,244,233,211, 24, 59,180, 63,110, 30,202, 71,136,189, 13, 58, 77,158,138, 93,145,
+145, 96, 89, 22,132, 16,176, 44,107,209,117, 68, 34,145,224,204,153, 51,152,244,236, 24, 40, 36,128, 90,173,198,123,239,189,135,
+159,126,250, 9, 18,137,184,154,222,227, 80,247,171, 71,176, 48,114,211,231, 50,240, 70,252,188,233, 75, 28,188, 81,172,191,157,
+133, 15, 2,179,176, 34, 2, 69, 66,214,178, 45,211, 34,207,220,248,226,165,241,195, 84,125,251,244, 71,223,176, 62,146,214, 29,
+123,127, 8,160,202, 96, 17, 66,250,213, 55, 87, 6, 47,224,147,117, 71,110, 77,221,117, 50,158,192, 80,132,241, 3, 58, 82, 94,
+192, 39,245, 53,184, 54, 77,181,149,205,174, 51,231,207, 59,192, 80,140, 7, 87, 79, 40,155, 52,109, 14,240, 6,220,189,123, 7,
+223,110,222, 39,156,188,116,123,171,158,195, 91, 9,185,180,196, 92, 77, 0,128,192, 65,109, 45, 15, 28, 28,162,254, 69, 0,133,
+189, 74, 22, 68, 5, 30,246, 42,105,208,128, 86,214,191, 80, 74,169,173,149, 52,136,242,127,246,108, 53, 53,203,244,220,218,205,
+ 27, 55,124,245,242,203, 47, 91,103,107,210,145, 90,120, 3,197,114, 47, 24, 85, 62, 72,184,122,170,172, 84,199,153,188,120,215,
+247,122,102,103,103,103, 70, 95,204,197,174, 53,139, 96,212,235,144,169, 41,247,168,169,217,133,176,115,246, 58,111,137,166,129,
+ 19, 10,194, 39, 78,145, 89,217,194,106, 82,248, 48,121, 66,142, 14,237, 61,109, 1, 0,180, 56, 11, 55,143,159, 65, 88, 73, 20,
+ 0, 32, 49,153,129, 95, 91, 79,179,218,105,171,148,189, 53,248, 41, 47,220,123,152,134,211,177, 41,155, 19,115,104,106, 51, 39,
+178, 57, 33, 53,127,218,136, 46,190, 88,254, 83,220,155,168,195, 20,213,165, 25,236, 70, 38, 0,232, 81,158,228, 94, 6, 10,244,
+ 8,118, 35, 19,204, 25, 57, 88,155,166, 68,134,231,190,250, 37,233,127,123, 46,103,143,152,253, 92, 79,187,110,221,134,200,193,
+233, 81, 84,166, 51,198,229,209,194,134,104, 62, 46,162,166,168,249,111,213,172, 48, 59, 91, 43,110,141,169,153, 82,113,107, 20,
+ 77,224,209,238, 64, 74,169,164, 34,122, 85,111,146,187, 41,205,234,221,129,148,210,195, 21,209,171,122,163, 88, 53, 53, 5, 65,
+ 72,237,208,161,131,227,240,225,195,193,243, 60,238,220,185,131,164,228,100,244,155,246, 38,236,237,237,113, 42, 38, 6,183,111,
+223,198,252,249,243, 97, 52, 26,177,127,255,254, 63,205,200, 94, 83, 83, 34,145, 24,154, 55,111, 46, 27, 57,114, 36, 56,142, 67,
+ 98, 98, 34, 82, 82, 82, 48,115,230, 76,168,213,106, 68, 71, 71, 87,105,102,103,103, 67, 34,145,252,169,103,225,175,248, 44, 61,
+105,212,103, 79,121,240, 70, 20, 68, 46,192,215,167, 97, 48, 24, 17, 20,155, 73,171,247,105,175, 14,117, 34, 63,199,220,184,117,
+ 47,250,108, 95, 57, 50,175,151,215,177,128,248,108,154,214,209, 71, 82, 4, 67,145, 29, 18,127,193,253,140,162,226,248,108,106,
+ 81,151, 22, 0, 80,129, 39, 48,148, 2,105, 87,112,238, 84, 20, 78, 94,184,134,203,215,111,241,231,162,227,119, 49, 2, 62,137,
+203,166,119, 44,214,164, 20, 54, 67,151,227,197,235,119,125, 59, 6,184,249,130,231, 64, 5, 35,212,227,119, 96,114, 92, 55,223,
+142,205,236,125,203, 35, 87, 70, 56,188,114, 2,248, 74, 89,175,222,229,135,134,117, 61,154, 42, 70, 23,229,231,116,121,186,119,
+ 87, 72, 90,177,166, 0, 0, 32, 0, 73, 68, 65, 84,107,117,171,193,200,190, 27,143, 59,215,206,148, 69,223, 72, 56,119,249,161,
+225,177,162, 35, 94, 94, 94,189,158,238, 29,136,241, 83,223,135,161,180, 0,137, 39, 55,162, 56, 55, 29,167,207,219,224, 86, 97,
+ 97, 87, 0, 81,230,106,157, 75, 50,182, 6,128, 30,254,178,135,182,208,185, 63, 63,108, 56, 20, 68, 11, 65, 87, 8, 82,154,141,
+132, 20,125,193,232, 53,201, 60, 0,168, 20, 68, 98, 77, 11,236,204,209, 13,246,115,106,169, 98,141,216, 18, 25, 11, 65, 40, 95,
+102, 73, 16,176,122,203,137,132,105,159, 76,106,143, 96, 95,135,182,164, 98,242, 19,115,219, 74, 40,122, 94,222,245,113,144,246,
+215, 15, 1,193,128, 51, 51, 28,131,122,126,157,219, 19, 13,140,132, 93, 79,161, 41, 0,166,181,242, 36,107,103,124,125,228,195,
+ 14,145,113, 61,222,125,101,132, 29,168,184, 48,186,136,136,200,223, 79,113,113,241,212,201,147, 39,175,149, 74,165, 46, 0,136,
+ 32, 8, 16, 4, 65,242,197, 23, 95, 72,121,158,103, 24,134,225, 89,150,229, 14, 31, 62,108,228,121, 62, 75,171,213, 78, 53,165,
+201,113, 92,194,244,233,211,155,155, 26,113,184,115,231, 78, 72, 36, 18, 3,199,113, 9,141,118, 66,255, 33,234,190,104, 80,124,
+220,125,210,130, 5, 0, 8, 40, 62,170, 97,174, 0, 0, 49, 57, 52,181,181, 43,153,217,186, 99,239, 5,149,117, 44,109,128,150,
+231,199,116,108, 19,176, 19, 0,116,148,159,100,105,125, 0, 40,212,149,141,107,215,177,235, 46,129, 82, 9, 71,233, 6, 70,192,
+ 94, 45,135,155,230,140,156,171,139,212,204,252,232,202, 5,156, 5,208, 63,186, 5, 43,166, 99,160,148,210,170,110,193, 47,149,
+200, 46,208,153,156,199,233,204, 61, 93,255,142,190,178, 41,199,206, 94,157,202,243,212,157,101, 73,122,153,158, 91,251,184,230,
+ 10, 0, 52, 26, 77, 84,176, 43, 57, 22,211,214,109,128,179,170,124, 95,118, 41,144, 93,138, 99,154,204,162,168,134,104,230,149,
+ 24, 71,204, 91,241,211, 1,185,148,149,128,210,242,137, 64, 41,133,214,192,231, 86,154,176, 80, 39,226,249,222,126,110, 39,203,
+146, 36, 83,122, 23,111,167, 45, 31,191,248,248,172,216, 7,121, 27,238,231,209, 27, 0,112, 63,143,222,104,225, 68, 62, 76, 72,
+ 47,154,117, 35, 41,239, 75, 75,243, 38, 40,193,233,142,227, 23,252,105,159, 37, 26,181,113, 51,149, 94, 3, 48,170,181, 43,233,
+ 63,254,221,111,223, 37, 4,226, 50, 17, 34, 34,255, 33, 42,163, 88, 12,195, 52,120,240, 77, 45,154,135, 9, 33, 67, 0,220,181,
+160,206, 69, 0,109, 26,171, 13, 21,154, 57, 0,114, 26, 83, 83,228,207,212,105,176, 98, 51,233,106,152,177,152,179,185,229,234,
+172,159, 74,143, 3,112,106,104,253,106, 26,142,143,163, 81,147,152, 12,250, 97, 99,234, 85, 82, 97,166,254,146, 92,158,184, 76,
+ 58, 16, 0, 2, 2, 2,232,157, 59,119,240,184,179,224,222,204,162,215, 80, 99,201,133,154,196,228,208, 84, 0, 61,205,209,139,
+207,166,159, 0,127,238, 2,190,155, 67, 63, 5,240,105, 67,218,216,208,153,218,205, 37, 54,147, 70, 2,166,103,211, 23, 17, 17,
+121,242,104,140, 73, 70,107,209,124,172,133,159, 69,254, 61,136,221, 30, 79, 32,241,241,241, 79,204, 40, 12, 17, 17, 17,145,191,
+128, 6, 39,194,215,131, 56,233,176,200, 35, 48,255,223, 13, 16, 17, 17, 17, 17, 17, 17, 17,121,210, 32, 0,250,213,246,132, 37,
+163, 3, 8, 33,181,106,212,135, 41,125, 81, 83,212, 20, 53, 69, 77, 81, 83,212, 20, 53,159, 60, 77, 83,218, 79,204,232, 68, 90,
+ 45,121,185,177,111, 0,250,137,154,162,166,168, 41,106,138,154,162,166,168, 41,106,254,215,110, 98, 23,161,136,136,136,136,136,
+136,136, 72, 35, 35, 26, 44, 17, 17, 17, 17, 17, 17, 17,145, 70, 70, 52, 88, 34, 34, 34, 34, 34, 34, 34, 34,141,140,104,176, 68,
+ 68, 68, 68, 68, 68, 68, 68, 26, 25,209, 96,137,136,136,136,136,136,136,136, 52, 50,164, 98, 52,128,136,136,136,136,136,136,136,
+136, 72, 35,193, 0, 0, 33,132, 86,191, 23, 17, 17, 17, 17, 17, 17, 17,249, 59,121,210,188,136,216, 69, 40, 34, 34, 34, 34, 34,
+ 34, 34,210,200,136, 6, 75, 68, 68, 68, 68, 68, 68, 68,164,145,169, 52, 88, 97, 21, 33,185,176,255,207,198,136,136,136,136,136,
+136,136,252,103,121,162,188, 72, 85,146, 59, 33,132, 82, 74,201,255,115,123, 68, 68, 68, 68, 68, 68, 68,254,163, 60, 73, 94, 68,
+ 28, 69, 40, 34, 34, 34, 34, 34, 34, 34,210,200,136, 57, 88, 34, 34, 34, 34, 34, 34, 34, 34,141,204, 95,106,176, 8, 33,253, 68,
+ 77, 81, 83,212, 20, 53, 69, 77, 81, 83,212, 20, 53,255,107,136, 17, 44, 17, 17, 17, 17, 17, 17, 17,145, 70, 70, 52, 88, 34, 34,
+ 34, 34, 34, 34, 34, 34,141,140,104,176, 68, 68, 68, 68, 68, 68, 68, 68, 26, 25,209, 96,137,136,136,136,136,136,136,136, 52, 50,
+162,193, 18, 17, 17, 17, 17, 17, 17, 17,105,100, 8,128, 90, 71, 2, 80, 74,143,155, 45,210,128,209, 4,166,244, 69, 77, 81, 83,
+212, 20, 53, 69, 77, 81, 83,212,124,242, 52, 77,105, 91,226, 63,254,209, 80, 74,255,178, 27,128,126,162,166,168, 41,106,138,154,
+162,166,168, 41,106,138,154,255,181,155,216, 69, 40, 98, 22,132, 16, 55, 66,136,219,255,119, 59, 68, 68, 68, 68, 68, 68,254, 13,
+ 72, 26, 83,172, 21, 33,125,167,135,186,237,121,253, 90,186,163,169,178,174,174,174,107, 85, 42,213,196,210,210,210, 18, 66,136,
+ 80,185,191,194, 25, 87, 95,191, 39, 49, 51, 51,179,167, 41, 61,133, 66,177,194,205,205,237,149,226,226,226, 82, 66, 8, 37,132,
+128,144,242,229,140,106,222,243, 60,175,201,206,206,238, 96,201,185,253,211, 32, 0,235,236,230,118, 73,202,178, 94,150,214,229,
+ 5,225,126, 70,122,122, 87,179,143, 69,200, 34, 66, 48,187,226,241, 82, 74,233,251,150, 30,243, 31, 15, 33,172, 57,197, 66, 0,
+219,120, 96, 60,207, 48,111, 74,129,149, 58, 65, 88, 3, 0,160,148,111,232,161,245,151, 72,115, 66,209,150, 16,168, 41, 69, 1,
+ 37,184, 38,239, 68, 19, 26,170,247, 56, 16, 66,186, 72,165,210,113, 14, 14, 14,182,153,153,153,191, 2, 56, 0,224, 25, 87, 87,
+215,167,243,242,242,138,140, 70,227,110, 74,233,133,134,104,247,106, 71,230,200,101,210,151,180, 6,227,146, 51, 87,233,198,176,
+167,136, 19, 39, 96,177, 82, 38,233,169,211,115, 75, 79, 95,163, 27, 44,108,235, 35,235,149,209,138, 31, 15, 75,136, 48,243,125,
+ 7,128,253, 14, 14, 1, 10, 23,187, 95,165,114,246,126,126, 70,241,196, 49,153,153,201, 99, 30,227,125,255, 39,226,226,226,242,
+ 34,195, 48,159, 81, 74,193,243,252, 7, 57, 57, 57,155, 26, 67,151, 16, 50, 1,128,117,197,102, 9,165,116,135, 5,117,147, 0,
+248, 86,108, 62,164,148,250,213,183, 95,196, 50, 8, 33,171,247,237,219, 55,173, 79,159, 62, 88,190,124, 57, 86,175, 94,253, 32,
+ 43, 43,107, 49,128,205,148, 82,253,223,173,243, 36,209,104, 6, 43,152,144, 54, 47, 15,234,122,104,234,216, 65,114, 83,101, 93,
+ 92, 92,190, 31, 52,104,208,164,205,155, 55, 75,227,227,227,173,252,253,253,193, 48, 76,149, 1,170,254, 59,217,164, 73, 19,161,
+ 46,157, 74, 88,150,253,122,212,168, 81,147, 35, 34, 34, 84,209,209,209,170, 86,173, 90, 85,233, 9,130,128,154,191,187,254,254,
+254,245,234,169,213,234, 43, 44,203,122, 3,127, 54,103,117, 61,230,121, 94,147,147,147, 99,210,180, 17, 66, 6, 2,152,107,170,
+ 28,128,197,148,210,163,245, 21,144,178,172, 87,106,106,170,171, 25, 90,143,224,227,227, 99, 48,183,108,121,228, 10,179, 5,129,
+ 50, 0,192, 48,100,142,149,149,213,234,178,178,178,228,202,231, 1,128, 82,154, 97, 73, 27,188,189,189, 7, 11,130, 48,161, 92,
+147,217,161,209,104,126,177,164,190,157,157,221, 21,185, 92,238, 45,145, 72,170,222,140, 26,215,219, 71,182,121,158,167, 6,131,
+ 65,147,155,155,107,177,177,142, 2,200, 32,160, 23,199,178,111, 59, 57, 59,247,140, 62,118,204, 58, 36, 36,132, 97, 89,246,125,
+ 0,107, 44,213,171,142,254, 18,105,206, 27, 49,182,204,168, 24,166,240,251, 40, 64,151,244, 81,188,149, 84,119, 80,127,137,236,
+249,187, 77, 22, 33,100,208, 11, 47,188,240,249,146, 37, 75,156,229,114, 57,179,123,247,238,174, 51,103,206,124,105,249,242,229,
+ 94,227,198,141,179,213,235,245,194,156, 57,115,122, 17, 66, 62,166,148,254,100,137,118,183,118,164, 75,160,191,199,252, 55, 38,
+246,197,172, 69, 59,223,232,209,134,100, 91, 89,203, 86,143,238,217,220,190,117, 83, 7,124,188,246,220, 91, 0,204, 54, 88,132,
+ 16, 34,149, 74,219,185,187,187,251,235,116, 58, 30, 0, 92, 93, 93,171,190,232, 44, 91,238,155,116, 58,157, 33, 47, 47,239,176,
+ 37,109,173,141, 89, 74,101,231,206,246, 54,145, 11, 38,188, 96, 85,152,151,235,246,245,161, 3, 49, 17,112, 13, 29, 3, 60,120,
+ 92,237,127, 18, 12,195,124,150,146,146,226, 65, 41,133,135,135,199,103, 0, 54, 53,146,180,117,229,239, 48, 33,196,218, 68,217,
+154,248, 86,171,235,107,198,126,139, 33,132, 40, 37, 12, 51, 93, 46,149, 14,224,121,190, 13, 0,176, 44,123, 93,111, 52, 70,114,
+130,176,146, 82,170,125, 28,253,127, 56,179,167, 77,155,214,127,222,188,121,254,179,103,207,198,236,217,179,155,172, 95,191,126,
+237,231,159,127, 62,135, 16, 18, 74, 41, 45,254,155,117,158, 24, 26,197, 96, 5, 19,226, 51,176, 93,192,201, 55, 95, 24, 43, 19,
+ 34, 86, 16,188,248,191, 58,203,186,184,184,124,223,181, 67,135,151, 54,111,222, 12, 0,152, 56, 98, 4, 6,116,234, 4, 91, 27,
+107,200,229,229,205, 33,148, 64, 38,149, 97,228,204,119, 76, 30,155, 16,178, 52, 60, 60,252,185,136,136, 8, 27, 0, 88,189,122,
+ 53,194,195,195,225,232,232, 8,149, 74, 5,153, 76, 6,169, 84,250,200,189, 41, 88,150,245, 78, 73, 73,113, 85, 42,149, 0,202,
+ 13,159, 32, 8,143,220,170,245, 67,131,227, 56,180,108,217,210,164,110, 5,115, 11, 10, 10,122,149,148,148,212,219,119,219,180,
+105, 83, 0,168,215, 96, 85,242,217,167,159, 64,224, 74, 32,145, 0, 28, 7,232, 12, 12,132, 90,254,203,123,122,122, 98,250,244,
+233,127, 50,156,150, 48,108,216,112, 80, 74, 87,123,121,121, 29,204,200,200, 8, 33, 4, 83, 1,203, 35, 91,148,210,231,239,222,
+189,171, 18, 4, 1,129,129,129,147, 0, 88,100,176, 36, 18,137,119, 76, 76,140,171, 66,161,168, 51, 82, 89,205,252,194, 96, 48,
+160,125,251,246,156, 37,199,112, 3,124,115, 25,230,213,118, 79, 61, 53,101,254,136, 17, 86, 87,174, 92, 81, 48, 12, 3,142,227,
+240,197, 23, 95,112,148, 82,251, 96,192, 46, 14, 40,172, 75,131, 16, 50, 15,192,139, 40,143,202,110,160,148,126,241,200,243, 20,
+109,203,140,138, 97,137,197, 35, 59,117,110, 50, 7,113,177,215, 59, 53,179,217, 15, 91,137, 46, 1,192,223,106,176,212,106,245,
+152,229,203,151,187,108,216,176,161,240,246,237,219,134, 53,107,214,184, 76,157, 58, 53,200, 96, 48, 96,218,180,105, 89,129,129,
+129,178,229,203,151,187,236,219,183,111, 32, 0,139, 12,150,132,224,147,103, 71, 12,128,214,200,192,104,228, 92, 60, 92,108,183,
+206,120, 33, 76, 74,169, 30, 91,126,138,134,145, 19, 54,154,171, 85, 17,185,106, 55,122,244,104,191, 29, 59,118, 72,110,222,188,
+ 41,105,213,170, 21,120,158,175,186, 9,130, 0,158,231, 17, 16, 16, 96,233,203,240, 39, 94, 2, 2,156,221, 28, 35,187, 14, 25,
+108,229,161, 84,192, 49, 47, 11, 47,203, 36,182,155, 84,186,109, 0,186, 61,246, 1,254, 65, 80, 74, 33,145, 72,144,156,156, 12,
+ 87, 87, 87, 43, 71, 71,199, 52, 0, 31,229,230,230,174,251, 43,142,247, 56,145,173, 70,108, 67, 39,185, 68,178,119,203,198,175,
+221, 59,119,235,198,186,121,184, 34,254,206, 67, 72, 8,223, 47,230,114,116,216, 75,175,189, 59,131, 16, 50,154, 82,122,233,239,
+110,219, 95,141, 71,247,215, 71,121,244,120,115, 53,161, 2, 62,254,238, 64,209,162,165, 43, 84,211, 94,125,129,157, 57,115, 38,
+124,124,124,252, 71,141, 26,181, 20,192,107, 38,117,186,188, 62,202,189,219, 27,171, 65, 41, 22,124,123,160,232,243,165, 43, 84,
+175, 53, 64,231, 73,227,177, 13, 86, 8, 33,246,161,126,110, 81,159,206,158,106, 67,127,249,129, 41,205,201, 68, 93, 22,198,213,
+213,117,237,224,193,131, 39,110,218,180,169,106, 95,215,144, 16,140,234,219, 3,174, 78,106,168,172,229,229,151, 33,129,224,218,
+237,251,102, 25, 1, 31, 31,159,105,123,247,238,181,169,220,246,244,244,132, 76, 38,171,186, 85, 55, 87,149,183,154,145,142,218,
+ 80, 42,149, 56,126,252, 56, 36, 18, 9, 88,150,133, 68, 34,169,186, 85,223,102, 89, 22,110,110, 22,165, 38, 45, 86,171,213,161,
+ 69, 69, 69,118,249,249,249,240,245,245, 45, 4, 16, 83,237,249,208,172,172, 44, 59, 75, 4, 5,174, 4, 51, 95,110, 5,169,254,
+ 2,244,210, 78, 40,147,116,199,185,203, 55,113,240,104, 20, 82, 82,211,209,163, 75, 59, 60, 63, 97, 12, 34, 35, 35,193,243,150,
+245,104, 80, 74, 51, 8, 33, 75,159,121,102,248, 28,128, 32, 44, 44, 44, 99,198,140, 25,244,198,141, 27,163,198,142, 29,243,244,
+157, 59,119, 9, 0, 48, 12,153, 77, 8,249,218,220, 72, 22,165, 84, 6, 0,167, 78,157, 2,165,212,100,212,179, 54, 20, 10, 5,
+206,159, 63,143,202,238, 96,134, 97,192, 48, 12, 88,150,197,207,119,157, 81,162,103, 80,154,113, 3,111, 14,243, 69,211,166, 77,
+193, 48,166, 83, 14,195, 0,229, 57, 96, 20,145, 74,103,122,120,122,250,247,110,214, 76,117,252,248,113, 22, 0,252,252,252,104,
+ 90, 90, 90,254,254,253,251,139, 36,192,106, 63, 74, 55,215,103,174,124,125,125,187, 51, 12,243, 89,229,107, 78, 8, 89,234,239,
+239, 63,191,242,121, 65, 16, 48,161,191,163,116,198,140,183,101,157,195,202,255,148,116, 30,190, 3,133,137,139, 90,145,220,121,
+234,134,188, 38,143, 67, 65, 65,193,214,128,128, 0, 54, 43, 43,235, 4,128,123, 70,163,241,187,173, 91,183,186,190,252,242,203,
+153,219,182,109,123, 3,128,207, 23, 95,124, 49,176,184,184,120,151, 37,186, 61,219,146, 33, 29,218,133,116,241,245,241, 65,212,
+185, 75,144,201,165,246,211, 95, 28, 6, 27, 27, 9,190,220,112, 72, 72,210,228,190,113,250, 26,221,108,142, 86,133,185, 10, 29,
+ 51,102,140,207,142, 29, 59,100, 0,112,227,198, 13,100,102,102,194,201,201, 9, 74,165,178,234, 59, 95, 25,197,122, 28, 94, 2,
+ 2,212, 62, 78, 23,247,239,255,201,202,209,209, 30,223,189, 51, 3,207,167,106, 96,199, 50, 48, 26, 81,127, 40,252, 95, 6, 33,
+ 36, 96,244,232,209, 74,158,231, 81, 82, 82,130,147, 39, 79,170,173,172,172,212,222,222,222, 11, 0,152,109,176,172,172,172, 50,
+180, 90,173, 43, 0, 40,149,202,204,178,178, 50, 55, 0,165, 74,165,210,170,162, 72, 89,181,226,230, 68,182, 30, 86,139, 80, 61,
+ 52, 99,191,217, 16, 66, 58,118,234, 24,122,252,199,136,237, 54, 5, 69,233,176,119,200, 4,131, 2,172, 91,183, 18, 86, 86,118,
+ 88,176, 96,158,228,126,191,190, 94, 3,135,140, 62, 78, 8,233,247,196,153, 44, 74,214,245, 27, 62,209,209, 74,101, 11, 0, 16,
+ 56, 35, 54,173,159, 1,134, 97, 48,127,254,124,180,110,221,122, 10, 33,228,127,148,210,220,250,101,176,174, 77,175,113,142,114,
+101,249,165, 88,224,141, 88,179,115, 86,185,206,251, 83,241,236,240,166, 83,174,109, 35, 71, 90, 55, 67, 17, 0, 80,138, 50, 41,
+131,135,232, 68, 51, 43, 53, 8, 33,189, 41,165, 81,117,109,255, 27,145, 16, 66, 40,165,180,122, 55,203, 35,219,245,209,132, 16,
+ 69, 75, 7,155,163,171, 62,154,225,201,158, 63, 36, 41,123,120, 23,169, 90, 30,246, 21,207,211, 26, 67, 45, 85, 42,213,196, 77,
+155, 54, 61,226,191,124,221, 92, 33,147, 73, 33,149, 17,216,247, 28, 6, 0,200, 63,125, 16,132,212,110,174,106,106,150,148,148,
+104,175, 94,189,106,179, 97,195, 6,184,186,186,194,223,223, 31, 42,149,170,234,135,182,250,173,210,104,213, 52, 88, 53, 53, 43,
+159,151, 72, 36, 96, 24, 6,145,145,145,224, 56, 14, 99,198,140,249,147,185,146, 72, 36,181, 26,182,154,154,213,246, 31, 37,132,
+196, 80, 74,123, 85, 92,120, 99, 40,165,189,171, 29,123,160,139,139,203, 92, 0,139,205,213,100, 89, 10, 86,123, 14,130,247, 10,
+ 72,146,103, 64, 47,109,139,223,206, 68, 99,211,218,229, 0, 0,255,160,142, 24, 59,106, 88, 85,244,205, 28,205,234,120,120,120,
+108,206,204,204,106,223,167, 79, 31, 20, 20, 20,232, 23, 44, 88,128,208,208, 80, 4, 4, 4,214, 90,222, 28, 77, 66, 72,246,181,
+107,215, 60,180, 90, 45, 8, 33,217,166,202,215,166, 73, 8,193,214,173, 91,161,213,254, 57,122,239,208,251,115,204, 10,247,195,
+228, 55, 55, 99,233,237,221, 88,181,106, 85,189,231,174, 2, 66,181,234, 22, 95,203, 89, 46,116,201, 7,111, 40, 38, 77,154,196,
+ 78,158, 60, 25, 15, 31, 62,196,203, 47,191,172,141,140,140,212,167,167,165,253, 36, 23,132,239, 12,143, 26,226, 58, 53, 21, 10,
+197,150,163, 71,143, 98,247,238,221, 0,128,248,248,120,180,108,217,242,145,139,136,144,187, 7, 69, 73,223,225,226,207,183,208,
+121,248, 14, 92,252,121, 2,248,252, 67,210, 14, 45, 81, 80,223,185, 63, 46,181,105, 82, 74, 79, 2, 56, 89,185, 77, 8,249,223,
+182,109,219,198, 2,248,145, 82,122, 14,192, 57, 0, 59, 45,209, 44, 23,194,228,113,225, 35, 33,145,217,226,214, 93, 13,122,119,
+109, 15, 55, 87, 87,196,220, 76, 64, 82, 74,110, 6, 33,120,113, 80,119,197,226,178, 50,253,255, 78, 93,165,223,155,210,244,241,
+241,105,186,103,207, 30,105,229, 54,203,178, 96, 89,246,145, 63, 84,149,251, 44,106,103, 13, 94, 2, 2,108,189,109, 46,126,178,
+178,187,245,197,235,219,208,210,111, 8,236, 6, 14,193,178,157, 59,160,201, 46,208,114,165,220,211,150,106, 90,194,223,169, 73,
+ 8, 9, 8, 15, 15, 63,183,125,251,118,251,228,228,100,156, 58,117, 10,254,254,254, 40, 45, 45, 53,249, 71,183,166,166, 86,171,
+117,173,102,154, 42, 83, 24,118,234,116,186,202, 31, 74,147,255,156,171,107,214,149, 91,101,105,206, 85, 45,191,243,114,165, 76,
+182,103,255,143, 59,109,226,110,157, 66,187,182, 93, 96,163, 14,134,192,167, 35, 39,183, 24,121,119, 83,241,233,167, 75,177,224,
+163, 15,112, 96, 95,132, 77, 96,171,182,123, 9, 33, 45,170,119, 23,254,219,223,119, 16, 58,229,248,207,219, 86, 19, 42,160, 44,
+227,150, 66, 90,114, 79, 53,113,194,104,118,252,248,241, 56,112,224, 0, 98, 99, 99, 87,215,101,174,170,107, 18,138, 41, 55, 78,
+237, 94, 13, 74, 81,150,121, 75, 33, 43,187,167,122,225,185,177,236,243,207, 14,192,133, 19, 95, 99, 64,187,123, 55, 60, 93, 49,
+ 42,175,162,147, 80,194, 34, 71,161,196, 89,171, 75,228, 66, 53,147,117, 18,229,255,161, 42,141,213, 73,148, 79, 37,245,175,165,
+ 42,130,101,137,177,170, 40,207, 62, 37,151,252,184,113,193,235, 33,202, 7, 55,100,186, 27,231,145,170, 19,232,134,135, 92,222,
+138, 58,234,148,150,150,150, 36, 36, 36, 88,189, 56,106, 20,186,133,132,192,195,201, 9, 45,188,189, 97,165,144, 67, 46,147,254,
+161,109,193, 9, 16, 66,104, 96, 96, 32,134, 15, 31, 14,169, 84, 10,149, 74, 5, 27, 27, 27,200,229,242, 90,163, 87, 82,169,212,
+180, 40,202, 67,229, 44,203,226,198,141, 27, 72, 74, 74,130,189,189, 61,206,158, 61,139,167,159,126,250, 79, 81,172,138,118, 88,
+208,234, 63,186, 29,107,217,127, 20,102,118, 13, 86,194,243, 4,197,180, 45,148, 15,222, 64, 41,105, 15,157,142,131, 78,167,195,
+247,103, 12,184,148, 80, 2,131, 65, 15,157, 78, 87,231, 49,235,130, 16, 66,220,221,221, 71, 5, 5, 5, 77,156, 48, 97,130, 94,
+ 42,149,162,180,180, 20,165,165,165,184,121,243,166,126,192,128, 1, 25,207, 60, 51,220,237,224,193,131,148, 82, 44,181, 36, 15,
+139, 82,154,231,233,233,233,161, 84, 42, 65, 41,205,179,228,124,171,181,175,202,188,212,228,197,101,113,144,176,229,239,201,234,
+213,171,193,243, 60,234,251,124,107, 9,249,245,163,207,191, 82, 47, 89,177, 17,106, 71, 55, 68, 69, 69,241, 71,142, 28, 41, 34,
+ 64,252,157,216,216,101,207, 0,135,247, 0,102,231,174, 1, 64, 94, 94,158,149,191,191, 63,188,189,189, 33, 8, 2,140, 70, 35,
+ 98, 98, 98,144,158,158,142,156,156, 28,148,149,149,193,209, 58, 31,205,157,188,193, 21,157, 68,218,141,143,225, 97,115, 11,155,
+143,234,141, 79, 5,224,154, 37,199,250, 43,160,148, 30, 6,240,216,249, 75,160,240,114,117,247, 1, 67,141, 72,205,204,193,200,
+161, 3,192,202,108,112, 63, 57, 27,109,131,155,121, 60,247, 76,119, 15,150,112,152,189,120,199,116, 0,223,155,146, 43, 45, 45,
+229,111,222,188, 41,189,118,237, 26, 88,150,133,157,157, 93, 85, 58, 64,117,115,101, 78, 58, 64, 93, 84,154,171,207, 87, 63,109,
+205, 72, 75, 80,200, 31,199,154, 31, 46,160,165,239,211,216,116,235,142, 86,146, 95,220,239, 75,173, 54,190,193, 7,248, 7,224,
+225,225, 49, 85, 16,132, 5,148,210,252,240,240,112,183, 29, 59,118, 56,164,164,164, 32, 58, 58, 26,243,231,207,207,226,121,158,
+163,148, 18, 74,233,199,143,123, 44, 74,169, 80, 61,178,101,101,101, 85, 25,217, 42,169, 22,185, 42,177, 84,151, 16, 34, 85, 41,
+241,166,179, 29, 25, 33, 97,236,252,185,194,226,251,217,122,250, 83, 41, 39,124, 75, 41, 53,214, 87,151, 97,152, 87, 34,118,173,
+246,116,118, 17, 16,230,210, 23,105, 25, 6,124,254,206, 11,200,201, 41,194,247,235, 23, 1,144,195,192,177,232, 21, 54, 26,174,
+174, 94,152,242,234, 20,247,213,107,215,188, 14,224, 75, 75,219,249, 79, 37,237,236,202,125,132,144,227, 46, 46, 46,177,175, 79,
+153,226,226,239, 63, 9, 74,165, 18, 59,119,238,196,142,239,190,227, 87, 0, 99,215, 18,242,219, 84, 74,247,213,171,115,225, 15,
+157, 25,211,166,185,180,106, 53, 13, 10,133, 2, 39,142,252, 0,109,250,214,162,161,221, 96, 40,213, 98,104,147,225,212,241,193,
+207, 36, 87, 42,197, 93, 0,144, 42,145, 38, 5, 50,107,200,253,235,141, 85, 37, 13,238, 34,108, 38, 83,157, 91,255,206,184,246,
+ 46, 66,153, 68,127,230,103,164,232, 4,238,139,187, 6,195,149,124, 58,177,174, 58, 12,195, 8,190,190,190,232,219,161, 3, 70,
+245,236, 9,137, 68, 2,165, 92, 6, 91,165, 21, 40, 95, 30,185,170,236, 34, 52,215,235, 85, 26, 27, 39, 39, 39,200,100,178, 42,
+ 99,101,110,244,170, 46, 77, 65, 16, 32,145, 72, 16, 19, 19,131, 30, 61,122,192,199,199, 7,187,119,239,198,192,129, 3,255,212,
+101,104,169,185, 2,202, 13, 86,245,238,186,106,201,239, 38,147,219,107,162,213, 19,100,235,219,130,144, 16,112, 28,192, 83, 64,
+167,213,130, 82,128, 82,192,104,208, 67,171,213, 86, 29,211,156,174, 87,111,111,111, 79,127,127,255,119,230,206,157,221, 34, 52,
+180, 29,178,179,179, 33, 8, 2,108,108,108, 80, 90, 90, 10, 59, 59, 59,116,235,214,237,247,207, 62,251, 44,151, 82,204,181, 52,
+201,253,113,169,124,205,143, 29, 59,246, 72,247, 96,229,173, 36, 77,131,201,111,109,131, 92, 2,196,196,196, 32, 40, 40,200,148,
+185,100,250,244,234,142,115,191,199,115, 47,191,183, 66, 39,205,137, 94,236, 46, 8,155, 52, 64,131,207,139, 82,138,236,236,108,
+100,100,100, 96,196,200,145,216,177,125, 59, 30, 60,120,128,224,224, 96,244,233,211, 7,174,174,174,120,240,224, 1, 46,157,214,
+ 65,151,151,139, 92,125, 52, 84,182,157,177, 63, 42, 65,247,225, 42,253,255,203, 40, 66,160,188,219, 4,192,203,106,181,186, 73,
+105,105,105,186,209,104,220,141,114,211, 63, 80, 42,149,142, 83,169, 84,238, 5, 5, 5, 15, 0,124, 79, 41,189,108, 74,207, 74,
+169,116, 82, 40,237, 32,112, 58, 72, 36, 18,248,248,248,131,242,122,228, 21,150,225,197,241,195,241,123,204, 77, 28,249,237, 2,
+103, 52, 10,223,152,219,198,128,128, 0,228,228,228,128,101, 89,168, 84, 42, 88, 91, 91, 35, 48, 48, 16,201,201,201, 85,230,170,
+161, 93,132, 47, 1, 1,118,190, 54, 23, 62, 91, 89,110,174,210, 83,211,144,242,128, 66, 33,151, 99,237,186,213, 37,165,233,121,
+157, 55, 2,255,106,115, 5, 0,130, 32,124,156,146,146,226, 42,145, 72,220, 57,142, 67,114,114, 50,174, 92,185,130, 55,222,120,
+ 35, 35, 39, 39, 39,140, 82,218,160,115, 84, 42,149,153,149,145, 43,165, 82, 89,117,241,172, 45,178,245, 56, 57, 87,132,144,102,
+254,222,182,145,235,151,207,244,237,216,185, 27,163,146,216,229, 21,223, 77,239,113,230, 84, 84,183, 55,150,127,255, 58, 33,100,
+ 0,165, 52,177,174,250, 10,169,116,112,151,238,221, 37,160, 25,144,200,123, 96,233,146,241,200,202, 46, 68, 94,110, 17,100, 50,
+107,232,141, 44,120,129,160, 91,143,158,248, 97,243, 46,180,126,245,101, 86, 46,149,246,199, 19,100,176, 42, 88,244,237,183,223,
+250, 6, 6, 6, 98,211,166, 77,248,109,203, 22, 60, 95, 80,128, 40,134, 97,141, 82,169,243, 97,163,113, 29,128,122, 13, 86,117,
+157,214,173, 91, 99,227,198,141,216,186,117,235,195,137, 79,103,238,157, 57, 17,174, 6, 3, 6, 69,223,134, 99,147,225, 64,244,
+109, 56, 62, 21,136, 22,156, 4,119, 9,129, 85,117, 1, 66, 72,239,234,247,255,118, 36, 0,194, 72,121,127, 92,213,189,169, 74,
+214,110,129, 19,182, 79,234,223, 33,184,169, 55, 99,220,253, 53, 82, 74, 57,237,252,219, 6,225,118, 17, 29, 29, 87,143, 57, 96,
+ 24,134,178, 44, 11, 91, 43, 43,184,216,219,151,255,211,100, 24, 64, 0, 4, 35, 64,248,242, 47, 31, 21, 8, 44, 25,252, 44, 8,
+ 2,228,114,121,173, 9,237,150,230, 94, 85,215, 44, 42, 42,194,253,251,247, 49,101,202, 20,168, 84, 42, 0, 64,122,122, 58,252,
+252,252, 32,145, 72,144,146,146,130, 19, 39, 78,160,105,211,166, 80, 40, 20, 22,185,172,106,209,164, 80, 66, 72, 20,128,208,180,
+180, 52, 59, 15, 15, 15,192,210, 8,150, 64, 81,170, 35,208,235,121,220,185,115, 7,169,169,169,184,127,239, 46, 58,150, 20,130,
+130, 5,165,212,162, 8,150,135,135, 71, 96,203,150, 45, 63, 91,180,104,145,212,199,199, 7,130, 32,192,209,209, 30, 37, 37,101,
+200,201,201, 65,112,112, 48,124,124,124,176,116,233, 82,160,188,251,232,111, 53, 87,213,169, 28, 45, 90,253,158, 97, 24,188,245,
+140, 47,114,115,109,192,178,127,140, 38, 53,145,131, 37, 3,128,176, 1,225,146,200, 35,135,173, 57, 96, 97, 58,203, 46, 52,245,
+ 15,132, 82,106,228, 5, 65, 85,215,243,201,201,201,144, 74,165,136,216,179, 7,185, 25, 25,104,219,182, 45, 58,117,234,132,187,
+119,239,226,247,223,127,135,147,147, 19, 92,188,187, 34,234,158, 1,113,169,101, 80,171,213, 72,208, 48,255,111, 67,255, 9, 33,
+195,250,245,235,247,221,178,101,203,220,221,221,221,165, 89, 89, 89,220,202,149, 43, 7,174, 92,185, 50,238,245,215, 95, 15,126,
+253,245,215, 29, 92, 92, 92, 36,233,233,233,198,119,222,121,103, 32, 33,100, 46,165,180,206,110, 67, 0,176,182,182,117,100,101,
+214, 32, 68, 2,123,181, 3, 36,114,107, 8,156, 4,188, 0,216,169, 93,112,238,247, 8,156,189, 94, 52, 53, 51, 7,123, 76,181,
+143, 82, 74,157,156,156, 40,203,178,112,114,114,122,164,107, 16, 0,220,220,220, 80, 88, 88, 8,150,101, 33,149, 74, 45, 54, 89,
+149,230,234,243,149, 79,219,144,106,230,170, 56,219, 9,191, 29,189,153, 95,154,158,215,227, 73, 48, 87, 0,170, 6,235,220,187,
+119, 15,165,165,165, 56,125,250, 52, 62,254,248,227,172,154,230,202,205,205,237, 85, 59, 59,187,143,138,139,139,151,166,165,165,
+125,109, 74,183, 34, 50,213,104,212, 54, 29, 3, 33, 68,234,227,161, 60,250,251,233,109,126,106,122,141, 32,105, 10,112,167, 48,
+214,246,162,107,175, 33, 29,135, 50,237, 87,125,210,164,211,212,247,143, 18, 66, 2,235,138,100, 9, 60,223,222,218,198, 22, 64,
+ 38,162,175,156,172, 50, 87, 57,185, 5,208, 25, 88,232,244, 4, 90, 3,131,190,253, 6,225,187, 53, 91,145,146,153,139,202, 17,
+134, 79, 10,132, 16,199,144,144,144,105, 99,199,142,197,194,133, 11,113,124,217, 50,253,107,132, 20, 74, 0,122,136,231, 33, 80,
+ 74, 24, 51,146,211,107,234,124,249,229,151,251, 0, 60,187,248, 13,116,205, 43,198,139,158,195,169, 99,147,225,229,101,199,204,
+161, 0,224,152,117,252, 79,169, 58,164,178, 39,205,210, 30,181,127, 42, 18, 74,105, 20, 33, 4,213,239,235,171, 96,239, 30,216,
+251,127,115,102,172,232, 62,162, 31,147,254, 90, 15,228, 23,234,244,115,110, 26, 25, 77, 41, 29, 85,159,185,170,206,123, 43, 87,
+226,247,248,242,239,175,183,171, 43,102, 63,247, 28, 40, 7,156,141,141,195,174,227,199, 49,190, 95, 63, 88, 87,140,224, 51, 69,
+229,197,179,182,168, 85,245,232,149,165, 81,166,252,252,124,236,217,179, 7,157, 58,117,130, 74,165,130, 68, 34, 65,104,104, 40,
+110,222,188,137,102,205,154,129, 16,130,253,251,247, 99,212,168, 81, 72, 76, 76, 68,215,174, 93,109, 76,171,254, 65,165,217,137,
+139,139,179,163,148,246,170,140,118, 52, 20,157, 78,135, 91,183,110, 97,248,240,225,112,112,112,128,151,215, 14, 28, 63,186, 13,
+170,144,231, 65, 8, 44, 50, 88,132,144, 49, 67,135, 14,149, 50, 12,131,178,178, 82, 40, 20, 74,216,216,216,193,214, 86,141,128,
+128, 0,164,166,166, 98,224,192,129,134, 59,119,238,108, 77, 75, 75, 59,100,105, 91,221,220,220, 84, 69, 69, 69, 51,252,253,253,
+149, 0,160, 84, 42,251, 58, 59, 59,127,158,157,157,109,209, 48,222,234,198,138, 16, 2,150,101,171, 12,150,132, 97,224,225,238,
+ 90,181, 93,145,127, 86,231,135,128, 16, 82,152,146,163, 83, 0,128,175,175, 47,190, 91,123,128, 25, 58,116, 40,102,204,152, 1,
+163,209,136, 85,171, 86, 1, 0, 38, 76,152, 0,131,193,128,189,123,247, 2, 0, 36, 18, 73,189,125,206, 87,174, 92, 65,116,116,
+ 52,140, 70, 35, 10, 10, 10,240,203, 47,191, 32,234,212, 41,236,220,255, 43, 30,220,187,139,208, 64, 63,188,252,242, 75,144, 74,
+165,216,188,121, 51,122,244,232, 97,201, 75,208,232,200,100,178, 23,214,175, 95,239,181,105,211,166,252,159,126,250,169,160,115,
+231,206,214, 43, 86,172,112,253,238,187,239,250,232,245,122,188,253,246,219,153, 23, 47, 94, 44, 25, 49, 98,132,122,221,186,117,
+ 94, 45, 90,180,120, 6,181,228,101, 85,116,251,140, 7, 48, 41,172,147, 90,146, 95, 84, 6,129,211,227,222,131,251, 40, 40,214,
+ 67,224, 13,120,168, 73, 69,177,150, 71, 78,110, 17, 66,219, 15,248,246,228,201,147, 31, 16, 66,230, 81, 74, 15,154,106, 39,207,
+243,184,112,225, 2,206,158, 61,139, 83,167, 78, 33, 41, 41,169,234, 57, 59, 59, 59, 68, 70, 70,162, 79,159, 62, 22,157,123, 93,
+230,170, 40,171,220, 92,229, 63,204,125, 98,204, 21, 0, 80, 74, 23,120,120,120, 44,240,240,240, 80, 30, 59,118, 76,221,164, 73,
+ 19,112, 28,167,175, 25,185, 10, 11, 11,251,223,250,245,235, 61,154, 53,107,246, 6, 0,147, 6,171, 46,234,138,108,153,129,111,
+181,200,151, 47, 0, 48, 12, 94, 93,186,122,154,179,173,252, 97, 42,238,124, 85, 49, 23, 32, 11,148, 22, 2, 39,183, 67,210,253,
+195,251,111,140,156,227, 48,119,211,194, 87, 1,172,170, 75, 56, 33, 49, 25,171, 87,127,135,153,111,191,136, 31,190, 95, 10, 65,
+144, 64,103,100,225,235,223, 5, 58,131, 0,194, 72,208,182,125, 7,252,118,242, 52,164, 12,176,103,211,234, 6,158,253, 63, 19,
+ 74,105, 46, 33,100,213,254,253,251,223,156, 49, 99, 6, 4, 65,144,127,180,122,117, 89, 86, 86,214, 34, 88, 48,127, 85, 45, 58,
+163, 86,175, 94, 29, 63,247,187,172,125, 51, 39,130,125,240, 51,201,141,190, 13,199, 49,115, 40, 34,150, 16, 60, 21,136, 92, 85,
+237,151,248, 83, 53,238,255,213, 72, 0, 84,229,166,212,231, 24,159, 10,104,246,137,218,209,225,165,110, 29, 91, 57,189,243,198,
+171,210,196,116, 45,142,118,120,167,224,192,242, 15,109, 30, 10,214,111, 39,209, 66,139,162, 46,187, 78,156,168,122,252,197,142,
+ 29,181, 62,151, 54,102,140, 89, 90,130, 32,212, 25,181,178, 52,114, 5, 0, 42,149,202,190,127,255,254,120,250,233,167, 49,122,
+244,232,170,156,171,118,237,218, 97,231,206,157, 8, 15, 15,199,213,171, 87,225,225,225,129,160,160, 32, 4, 5, 5,225,240, 97,
+203, 82, 85, 42,187,235, 66, 66, 66, 42, 71, 17,134,106, 52, 26,139, 70, 15, 86, 71,167,211, 33, 39, 39, 7,142,142,142,144,203,
+229,232,220,185, 19,222,124,171, 51,156, 61, 54, 34,164, 85, 32, 74, 74, 74,170,134,174,155, 66, 42,149, 6,180,104,209, 2, 89,
+ 89, 89,200,202,202,130,139,139, 11, 60, 61, 61,225,230,230,134,229,203,151,211, 21, 43, 86, 68,241, 60,191, 53, 61, 61,221, 98,
+ 71,232,237,237,221,209,217,217,249,205,204,204, 76,101,181, 31, 77,101,219,182,109,215,122,122,122,174, 74, 77, 77, 61,107,174,
+ 22, 33, 4, 6,131, 1,132, 16, 28,186,231,137, 18, 61, 65,161,230,255,216,187,238,176, 40,206,245,123,190,153,109,148,165,151,
+165, 44, 32,168,160, 40, 24,187, 81,136, 93, 52,154,168,216, 80,115, 19, 75,162, 73,140, 53,118,141,137, 49,106, 98, 55,106,108,
+ 55,137, 92,187, 98,140,196, 94,176,199, 46, 32, 32,138,133, 14,178,244,133,173, 51,243,253,254,160, 4,145,178,152,114,111,242,
+243, 60,207, 62,176, 51,179,103,190, 25,150,153, 51,239,247,190,231,189,133, 41,111,123, 61, 39,184,196, 98,177, 41,137,186, 37,
+ 97, 97, 97,206, 30, 30, 74,164, 38,221,195,129, 3, 20,171, 87,175,198,133, 11,101,255,231,137,229, 15, 4, 21,239,187,119,239,
+ 14,111,111,239, 6,153, 91, 10,130,128,232,232,104,236, 62,124, 30,174, 94,254, 72,121,144,128,219, 71,143,160,145,147, 61, 90,
+182,105, 7,163,209,248,187, 44, 52,254, 8, 24, 12,134,173,190,190,190,208,235,245,103, 0,108,139,142,142, 30,156,153,153,185,
+230,231,159,127,118, 27, 54,108, 88,198,145, 35, 71,166, 1, 56, 20, 29, 29, 61,230,171,175,190,234,105, 44,155, 62,120, 1, 44,
+203,254, 48,125,250,244,110,195,134, 13, 35, 18,198,168, 63,121, 98,135,136,227,140,100,230,188,237,124,212,165,243, 12,199, 25,
+201,144,176,233,194,209,179, 49,204,132,201, 43,248,214,157,250, 35, 54, 54,214,101,192,128, 1, 75, 0,212, 41,176, 88,150, 5,
+207,243, 16,139,197,149, 2,186,166,109, 26, 18,189, 26, 7, 52,182,246,146,255,186,116, 99, 47, 57, 17,169,255,241,226, 10, 0,
+ 84, 42,213, 22, 0, 91,236,237,237,179, 45, 45, 45, 81, 92, 92,252,194,247,143, 16, 98,214,172, 89, 51, 51,169, 84,138, 62,125,
+250,216,187,186,186, 38, 50, 12,179, 46, 61, 61,189,193, 74,163,166,200,214,203,218, 52,216, 57, 97, 64,199,224, 54, 86,247,109,
+ 22, 91,153,137,180,119, 26, 37,154, 89, 19, 0,133, 58,197,227, 43,201, 35,138,200, 51, 89,235,118,221,219,194, 90,100, 57, 0,
+181, 8, 44,134,101,111, 23,230, 23,244, 43, 42,214,227,210,229, 88,132,141,104, 10,157,129, 64, 16, 24,168, 75,116, 0, 43, 6,
+ 3, 96,228,168,119, 65,137, 8,121,217, 25, 96, 89, 54,166,161,199,253, 55,192,220,137, 19, 39,246,155, 55,111,158, 79,185,127,
+149, 87,185,127,213, 44, 66, 72, 32,165,180,244, 37,121, 26, 29,217,179,112,198,225,139,155, 11,251,119,214, 60,104, 91, 86, 19,
+101,223,182, 25,242,196, 98, 60, 20,177,200,165,244,185,138, 82, 84, 20,124, 85, 45,252,250, 59,195,164, 28, 44,223,198,202,190,
+ 93,219,183,155, 60,127,222,124,171, 7,215, 47, 96,254,146,111,133,166,237, 66, 10, 87, 29, 58, 94, 92,104,221,168, 71,105, 70,
+194, 29, 19,247, 71, 1, 32,164,123, 40, 90,181,232,240,194,202,160,238,101, 30,144,151,206,221, 68,118, 78,186, 73,132, 21,226,
+169,182,156, 43, 83, 74,243,171, 67,163,209, 20,196,198,198, 58,167,165,165, 61,151,208,238,237,237, 13, 66, 8,174, 93,187,134,
+ 95,127,253, 21, 97, 97, 97, 16,137, 68, 16,139,197, 56,127,254,124,113, 67,246, 81, 37,154, 20, 77, 41,237, 74, 8, 9, 81, 42,
+149, 53, 86, 15,154,194,165,209,104, 80, 88, 88,136, 19, 39, 78,160,105,211,166, 88,186,116, 41,220, 92, 21,152, 63,127, 6, 4,
+ 65, 64, 81, 81, 81,165, 63, 80,125,224,121,158, 86, 68,135, 4, 65, 64, 78, 78, 14,124,124,124,176,113,227, 70,172, 89,179,230,
+219,140,140,140, 6, 87,185,216,217,217, 89,155,153,153, 77, 24, 48, 96, 64,208,160, 65,131, 16, 18, 18,242,220,250,157, 59,119,
+202, 15, 29, 58, 52,219,195,195,163,171, 32, 8,223,165,167,167,215, 89, 22, 92,129,239,191, 47,179, 79,178,232,180, 8,115,134,
+ 53,194, 59, 31,237,192,170, 85, 17,144,201,100,149,122,237,222, 71, 0, 0, 32, 0, 73, 68, 65, 84,219,176, 44,139,197,139, 23,
+215, 41, 94, 4, 74,125, 37,170, 43, 25, 51,102,175,116, 94,182,236, 52, 78,159,126, 6,134, 97,224,234,234, 10,134, 97,240,228,
+201, 19, 48, 12, 3, 47, 47, 47, 48, 12,131,244,244,244,138,156,191,124,212, 80,197, 88, 19, 24,134,129, 86,171, 69,106,202, 83,
+164, 37, 37, 66, 94,148, 5, 39,107, 11,228,223,139, 70,171,113,239,195,104,172, 51, 39,247, 47, 1,165,244, 20,128, 83, 85, 22,
+ 29, 32,132, 24, 9, 33,163, 0,236,165,148, 70,148, 47,223,142, 58,140, 65, 59,117,234,212,122,222,188,121,226, 10,219, 12, 55,
+207,175, 56,131,193, 32, 0, 64,179, 86,111, 60,167,242, 31, 62,124,136, 85,171, 86,161,164,164, 4,146, 6,100,166,247,234,213,
+171, 50, 39, 82, 34,145,192,209,209, 17, 6,131, 1, 28,199, 53,120,106,208,193, 75,249,237,181, 91,231,249,187, 73,155, 53, 49,
+247,143,153,167, 61, 17,160, 86, 57,254, 99,197, 85, 85, 80, 74, 23, 41,149,202, 69,130, 32, 80, 74,233,194,138,229,132, 16,153,
+167,167,231,197,147, 39, 79, 58,112, 28,135,245,235,215,219,102,101,101,217,190,241,198, 27,115, 0,212, 42,176,106,177,105,168,
+ 13, 47,101,211,192,243,240,179,182,178, 69, 62,210,160,115, 52,182, 46,112,224,242, 78,101,190,127,199, 45,185, 77, 11, 75,222,
+232,195, 20,233,225,110, 97, 11,129,210, 90,141,208,116, 70,227,177, 59,183,110,247,241,244,104,202,254, 28,121, 1, 3, 7, 15,
+131, 78,199, 64,107, 36, 32,172, 24,132,149, 32,176, 85, 27, 52,111,217, 10, 20,192,205,235, 87, 56,189,209,120,170, 54,190,191,
+ 35,220,130, 38,135,185, 5,125,178, 14, 84,160, 53,248, 96,249, 12, 30, 60,120, 25,128,201,245,241, 40, 94,159, 28,230,210,185,
+140,167,170, 15,214,244, 79, 38,226,222,117,177,205,133, 91, 95, 75, 66, 58,225,151,156,211, 4, 22,102,191, 85, 17,138,153,151,
+179,215,248,187,160, 94,129,229,233,233,105,235, 44,183,248,254,227,113, 99,173,146,239, 94, 69, 90,244, 85, 92,190,148,152,191,
+235,224,225,244,162,194,156,113, 13, 16, 87,149,211,121,142,174,141,224, 83,131,192, 50,183,114, 2, 0,248,180,232, 0, 81, 74,
+195,108,128,106,138, 94,189,140,184,170, 64,133,168,170,158,208, 62, 97,194, 4,108,219,182, 13, 93,186,116,129,175,175,111,229,
+147,114, 67,163,100,213,163, 73, 47, 83, 61, 88, 21,197,197,197,240,242,242,194,214,173, 91, 17, 19, 19, 3, 43, 43, 43,132,133,
+133,161,184,184,184, 82, 88,153,154,228,206,243,252,211,147, 39, 79, 6, 14, 31, 62,156,138, 68, 34, 82, 80, 80, 0, 27, 27, 27,
+108,220,184,177, 52, 51, 51,243, 92, 67,199,230,238,238,222,223,222,222,126,252,136, 17, 35,216,102,205,154, 33, 59, 59, 27,214,
+214, 86,122, 66,136, 20, 0,108,108,108,244,150,150,150,248,224,131, 15, 16, 24, 24,216, 97,246,236,217,237, 93, 92, 92,194,179,
+178,178, 14,214,198, 89, 49, 45,184,103, 79,217,236,212,184,117, 9,208,235,203, 4,202,166, 77,155, 80,158,203, 86,137,164,164,
+ 36,192,132,202, 20,185, 92, 14, 95, 95,223, 26,255,246,193,193,193,184,121,243,102,217, 20,164, 72, 4,103,103,103, 92,190,124,
+217,164,178, 76, 90,110,224, 24, 27, 27, 11,127,111, 71,196,156, 62, 9, 71, 11, 49, 94,115,115,129, 50,184, 43, 18, 19, 19,255,
+171,209, 43, 66,200, 64, 0, 3, 0, 28,165,148, 30, 34,132, 12, 5, 16, 82,241, 30, 13, 52, 22,229, 56,142, 50, 12, 67, 82, 83,
+ 83, 13, 22, 22, 22,196,222,222, 94, 36,147,201,160,211,233, 42,133,214,195,135, 15, 17, 25, 25,137,180,180, 52,216,219,219, 51,
+ 54, 54, 54, 48, 24, 12, 38, 85,148,242, 60,255,130, 61, 67,249,126, 27, 44,174,222, 3, 2,182,125,181,188,145,140, 97,109,252,
+ 29,251,226,209,189,135, 26,181,170,192,252,255,131,184, 2,128,252,252,252, 45, 0,182, 84,188,119,114,114, 26,195,178,236,124,
+ 27, 27, 27,155,243,231,207,219, 58, 57, 57,145, 29, 59,118, 24, 23, 46, 92, 88,192,178,108, 62, 33,100, 77, 93,124,181,216, 52,
+188, 52,106,178, 99,160, 20,113,170,194, 36, 47,177,157,155,112, 87, 75,175, 76, 77,157,211, 60, 95,220,212,137,180, 12,192,224,
+103,241,151,198,112, 73,157,179, 51,179, 24, 10, 33,174, 54, 94, 65, 16,182,207,153,183,120,102, 98,194,109, 79, 51,107, 51, 76,
+152, 56, 15,191, 28, 63, 7,194,136,113,241,202, 53,232, 13, 60, 84,121,133, 24, 49,114, 52,148,174,142,136,251,245, 68, 14, 39,
+ 8, 27,127,239,241,252, 47,129, 82, 97, 67,159,129, 99,236,100,230,101,105,164,130,192,227, 63,255,158, 1,134, 89,135,207, 62,
+251, 12, 1, 1, 1, 31,145,178,206, 13,117, 62,240, 18, 34,108, 8,236, 58,210, 78, 34, 43,227,161, 2,143,173,251,231,148,251,
+ 96, 77,195,198, 45, 7, 3, 91,122, 63,254,188, 46, 31,172,127, 34,106, 21, 88,141, 26, 53,146, 89,138,241,129,189,185,100,214,
+199,163, 6, 57, 61, 75,186,135,180,248,219, 0, 0,157, 78, 99,204, 76, 60,255, 90,125,228,229,198,108, 85,163, 29,180,174, 41,
+ 42,173,182,254, 39,248,234,156, 21, 55,218,234,209,171,134,136,171,154, 56, 1,188,112,131,101, 89, 22, 30, 30, 30, 88,182,108,
+ 89,189, 62, 88, 53, 28,123,197,242, 16, 0,173, 0, 84, 77,114, 15, 49,165,114,176, 54, 78, 39, 39, 39,228,230,230, 2, 0,186,
+117,235,134,110,221,126,171, 83, 48, 24, 12,149, 81, 43, 43, 43,171, 23, 34, 88, 53,113,114, 28,183,252,208,161, 67,195,174, 94,
+189, 58, 96,198,140, 25,162, 30, 61,122, 0, 40,243, 28,163, 38,244, 94,171,129,115,212,241,227,199, 89, 65, 16,176,117,235, 86,
+220,186,117,139, 90, 90,202,167,202,229, 86, 59,172,173,173,249,130,130,130, 81,239,191,255,254,160,207, 63,255,156, 4, 7, 7,
+227,234,213,171,196,199,199, 39, 20,192,193, 58, 56, 1, 0,215,174, 93, 3,195, 48,224,242, 82,240,209,156,189,176, 52, 23, 33,
+ 33, 33, 1,121,121,121, 47,152,143,154,114, 62, 5, 65,168,188,113, 87,188,130,131,131, 43,167, 27, 59,118,236, 8,150,101,113,
+231,206,157, 26,167, 91,171,113, 82, 7, 7,135,202,239,135, 68, 34,193,185,115,231,240,229,151, 95,194,211,222, 22,249,241, 49,
+112,233,214, 3,189,199,190,143,176,176, 48,176, 44, 11,123,123,123,160,154, 79, 80,109,199,254,123, 80,149,147, 16,242,150,191,
+191,255,220,184,184, 56,101, 96, 96, 96, 11, 66, 72,183,128,128,128,246, 49, 49, 49, 21,239,197,148,210,154,253, 48,106,225,188,
+113,227,198,129, 13, 27, 54, 76,124,239,189,247, 36,130, 32,240,201,201,201, 70, 0,196,197,197,133,189,113,227,134,240,243,207,
+ 63, 67,163,209, 64,169, 84, 50,238,238,238,228,212,169, 83, 66,124,124,252, 53, 74,233, 60, 83,143,189,162, 82,176, 34,153, 93,
+163,209,152, 36,174,170,115, 54,106,238,183,180,231, 27,205, 60, 84, 25,119,144,153,158, 4,109,158,157,241,220,137,203, 13, 18,
+ 87,127,246,223,232, 47,230, 92,252,224,193, 3,119,157, 78, 7,169, 84,138, 77,155, 54, 25,150, 45, 91, 22,167, 82,169,130, 40,
+165,154,234, 27,155, 58,206,134, 24,144,214,199, 89,152,139, 95,126, 58,124,163,189,124,240,118,124,148,145, 83,153,184, 72, 9,
+177,143, 80,180, 8,178,232, 16,152,206, 28, 93,196, 20,243,165,149, 57,162,213, 57, 41,165,122, 66,200,176,193,161, 35,207,236,
+217,179, 91,190,112,209, 34, 92,190, 22,131,220, 2, 53, 4,202, 66, 32, 4,243,231, 47,132,139,163, 61,138, 50, 30,148,234, 12,
+134,193,180, 90,203,156,191,251,223,157, 16,102,210,169,159,119,172, 99, 8,132,146,236,251, 50,182, 56,201,226,157,176,193,162,
+ 97,195,134, 33, 34, 34, 2,177,177,177,155,107, 19, 87, 85, 57, 41,101, 38,197,156,223,187,142, 0,130, 38,231,190, 76,164,126,
+108,241,238,168,193,162,176,176, 48, 28,138,188,130, 61, 71, 30,127,183,251,103,122,228,143, 60,166,191, 3,106, 21, 88, 86, 34,
+196, 6,181,104,236, 30,220,166,165,153,136,215, 32, 45, 62, 9,121, 37, 90,156,186,151, 92,192, 80,230,135,151,221, 97, 89,238,
+132, 4, 41, 41, 15, 94, 88, 87, 80, 80,150,245, 86, 92,220,176,182, 79, 12,195, 60, 23,189,250, 61,145,171,170,227, 84, 40, 20,
+149, 55,199, 10, 33, 87,113,195,174,200,241,121, 9,139,134, 57, 41, 41, 41,214, 41, 41, 41,160,148,226,218,181,107,214, 29, 59,
+118,156,131,223, 17,189,154, 49, 99,198,115,237, 65,170,254,172,105, 89,125,200,201,201, 41, 1,240,189, 66,161,248,101,230,204,
+153,255,234,212,169, 83,240,103,159,125, 70, 40,165, 47,123, 98, 57, 65, 16, 16, 21, 21,133,136,136, 8, 94,175,215,207,205,204,
+204,188, 95,101,253, 15, 30, 30, 30, 23, 7, 13, 26,180, 42, 49, 49,145,141,139,139,131, 41, 66, 78,163,209,192,215,215, 23, 28,
+199,225,235,143, 60, 80, 92, 28, 8,142,227,192,243, 60, 44, 45, 45,159,235, 67,105,202,223,137, 97,152,231, 34, 35, 21,175,107,
+215,174,129,101, 89, 4, 5, 5,225,246,237,219,149, 17,172,250, 34, 78, 6,131, 33, 69,161, 80, 40, 22, 47, 94, 92, 57,174,156,
+156, 28,156, 60,121, 18,157, 94,239,140, 22, 31, 76, 64, 70, 70, 6,214,172, 89, 3, 55, 55, 55, 44, 93,186, 20,121,121,121,224,
+ 56,238,175, 14,155,247,141,139,139, 83,142, 26, 53,234, 89, 76, 76,140, 50, 50, 50,210,118,192,128, 1,150, 35, 71,142,124, 22,
+ 19, 19,163, 36,132,188, 1,160, 94,129, 85, 21, 60,207,207, 37,132, 28, 95,186,116,233,156,201,147, 39,119,124,239,189,247,196,
+ 98,177, 88, 72, 79, 79,231,118,239,222, 77,124,125,125, 25,137, 68, 66, 78,156, 56, 33, 92,191,126,253, 87,142,227,190,166,148,
+ 94,108,200, 62,170,138,171,134,230, 92, 85, 96,170,179,236, 93, 43, 38, 39,104,195,166,101, 76, 51,111,165, 33,124,247,201,212,
+139, 87, 31, 60, 98,117,220,212,239,129, 90, 75,252,255,201, 96, 89,118,159,191,191,255,152, 73,147, 38,153,135,132,132,200, 62,
+255,252,243,194,226,226,226, 26,197, 85, 77,104,136, 77, 3, 26,104, 64, 90, 5,255,158,251,105,228,212,233,129, 99, 26,143,119,
+105,132,211, 37,207,144, 47, 98, 25,107, 91, 6,109,188, 88, 20,171, 30, 58, 29, 57,243,227, 19,212,227,171, 70, 41,189, 65, 8,
+233,213, 50,176,245,193,175,151,126,237,188, 96,246, 44,241,193,200, 99,160,156, 1,215,206,159,135, 92,194,211,248, 91,167,179,
+117, 6,253, 32,250, 79,115,113, 7,144,113,105,253, 30, 66,200, 97,123,123,251,187, 99,223,123,207,215,223,127, 36, 44, 44, 44,
+112,224,192, 1,252,103,253,122,126, 45, 48,124, 11, 33,183, 39, 80, 90,231, 61, 63,251,106, 37,207,157,247,199,142,245,107,211,
+102, 60, 44, 44, 44,176,127,255,126,236, 88,187,214,100,158,127, 26,106,159, 34,100, 72,241,175, 15,146,213,215, 30, 36,171, 33,
+ 80, 42, 80,170, 99, 24,164,150, 24, 12, 75, 19, 31,165,189,148, 24,168,152, 34, 92,242,213,164,151, 30,112, 77,156, 21,162,231,
+101,202,178,107, 2,207,243,105, 77,155, 54,125,110, 31,245,253,110, 52, 26,211, 76,164, 95,238,233,249, 66, 95,210, 6,231, 93,
+ 85,160, 98,218,207, 84,113,101,170, 15, 22, 0,100,103,103,231, 0, 88,169, 84, 42, 15,247,235,215, 47,140, 16,146,245, 50, 99,
+ 36,132,236,233,222,189,123, 24,165,148,101, 24,102,103, 53,113, 5, 0, 72, 77, 77,125,172, 84, 42,183,122,123,123, 87, 54,128,
+174,139, 83, 16,132,199,129,129,129,149,198,159,213, 5, 84, 77,239, 5, 65,168,247,111, 84, 80, 80,128, 14, 29, 58,188,208,115,
+146, 82,138,228,228,228,138, 8, 19,128,178,115, 95,151,112, 83,171,213, 19, 62,249,228,147, 45, 98,177,216, 19, 0,169, 16,183,
+ 60,207,179,223,126,251,173, 25,207,243, 44, 0,194, 48, 12, 39, 22,139,181, 17, 17, 17, 28,199,113, 41, 58,157,110, 66,125,227,
+252,131,177,151, 16, 34, 6,144, 31, 23, 23,247, 70,121,228, 42, 45, 54, 54,246,244,158, 61,123, 20, 64,253,246, 9, 53,161, 92,
+ 48, 93, 36,132, 4,111,218,180,105,238,132, 9, 19, 58,132,133,133,137,186,117,235,134, 95,126,249,133,143,138,138,186,166,209,
+104,150, 55, 84, 88, 17, 66,212, 94, 94, 94, 0, 80,105,244, 91, 27, 56,142,171,243,105,205,193, 75,182, 97,244,135,110,102, 91,
+151,159, 84,171, 50,244, 87,140,106,253,188, 31,129,216,134,140,231,159,134,172,172,172, 79, 9, 33, 11,215,172, 89,147,241,218,
+107,175,201, 36, 18,137,222, 84,113, 5, 52,204,166,129, 82,106,186,243,241,243,159,227, 8, 33,111,174,238, 61,244,112,215,249,
+159,120,247,238, 30,100,225,209,200,217, 61, 62, 41, 27, 15,175,254, 82,114,247,200, 87, 79,169, 46,127, 32,165,180,222,254,163,
+148,210,235,132,144,166, 51,102,205,168,104,246,220,170,231,169,159,232,255,163,102,207, 75, 86,172, 88,225,235,239,239,143, 3,
+ 7, 14,224,212,206,157, 24,161, 82,225, 28,203,178,140, 68,226,112,196, 96, 88, 9,192, 20, 97,180,100,213,170, 85,126, 1, 1,
+ 1,216,183,111, 31, 78,236,216,129,225, 47,199, 83, 27,218, 3,112, 42,255, 93, 5,224, 62,128,182, 0,204, 1,232, 0,168, 1,
+ 56, 86,217, 62,183,124, 93,197,250, 11, 0,254,210, 68,215, 90,175, 78, 49, 15,158,180,253,163,119,166,209,104,242,124,125,125,
+ 77,179, 82, 47,135,209,104,172,115,142,150,227,184,180,198,141, 27, 3, 48,221, 77,189, 62, 49,148,155,155,219,206,212,241, 53,
+ 20,191, 55,215,170, 42,120, 65,120,234,234,234, 42,148,243,214,180,175, 26,151, 81,224, 73, 67,246,147,150,150,246, 8,192,151,
+ 47, 57, 76,164,165,165, 29,131, 9,205,156, 77,221, 14, 0,242,242,242,254,240, 38,187,132,210,244,207, 63,255,252,183,247, 38,
+ 8,107, 80, 90,107, 53, 6,165, 52, 6, 64,199, 63,116,144,127, 2, 40,165, 23, 80, 94, 22, 77, 8, 25, 76, 8,121, 19,192, 9,
+ 74,233,129, 63,136,191, 82,104,109,221,186,117, 42,165, 20, 69, 69, 69,107, 27, 42,172, 42,144,157,157,125,182,254,173, 76, 67,
+ 94,182,254,236,238,205,105, 61, 52, 5,134,169,219,212,122,147,250, 33,254,127, 0,165, 84,235,236,236,252,195, 59,239,188,211,
+ 9,192,143,127, 4,231,239,176,105,168, 17,148,210, 39,132,144,215,206,205,248,114,236, 57, 91,171,254,224, 69,205,160,103,142,
+ 64,159,251, 11,128,239, 77,137,130, 87,225,210, 2, 88, 85,254,250,127,131,114,255,170,169, 99,198,140,193,194,133, 11,113, 98,
+229, 74,195,135,132, 20,138, 1,122,188,236, 1,147, 33,192,108, 83,121,222,125,247, 93, 44, 92,184, 16, 71,191,254,250,165,120,
+234,129, 19, 33, 36, 18, 0,230,204,153, 51,111,217,178,101,118,115,231,206,109,181,124,249,242,165,229,239,239, 85,172, 7, 0,
+ 74,233,128,185,115,231,182,172,178,190, 24, 64,189,198,200,127, 40,170, 62,161,255,209, 47, 0,189, 94,113,190,226,124,197,249,
+138,243, 21,231, 43,206, 87,156,175, 56,127,231,171,127,153,100,169,253,103,109,191, 87, 89,246, 87,142, 23,191, 63, 89,233, 21,
+ 94,225, 21, 94,225, 21, 94,225, 21, 94,225,191,128,170, 81,171,151, 89,255,103,130, 0,232, 85,211, 10,218,128, 42, 6, 66, 72,
+141, 28,117,161, 62,254, 87,156,175, 56, 95,113,190,226,124,197,249,138,243, 21,231, 63,143,179, 62,238, 90, 62,223,159, 16, 18,
+ 73, 41, 29, 80,219,207,114,206, 23,126,175,178,172,193,157, 71,126, 23,254,204,240, 24,254, 38, 97,201, 87,156,175, 56, 95,113,
+190,226,124,197,249,138,243, 21,231,127,151,179,158, 87,127,148, 85,154,210, 57,115,230,204,165,127,131, 41,194, 58, 74,112, 14,
+176,233,233,176,150, 74, 45, 36, 0,160,215,151, 26,220,221, 81, 4, 12,253,175, 53,162,125,133,191, 39, 8, 33, 10, 0,160, 38,
+ 52,133,110,200,182,175,240, 10,175,240, 10,175,240,255, 6, 57,180, 60, 50, 5, 32, 7, 0, 41,127,175, 47,255,153, 3,148, 37,
+183, 87,251,253,185,245,127, 37,106, 17, 88, 7, 88,149,202,194, 81, 36,202,247,227,121,109,115, 0, 16,137,152, 4,149,202, 46,
+209,209,241,128,234,101, 68,150,147, 66,113, 75,204,178,238,166,108,107,228,249,116, 85,118,246,115, 86,239, 20,248,219, 11, 59,
+ 83,197,195,239, 17, 25,127,133, 64,113,114,114, 82, 40, 20,138,183,173,173,173, 95, 47, 40, 40,184,158,147,147,115, 40, 39, 39,
+167,198,253, 17, 66,150, 17,130, 89,229,191,127, 67, 41,157, 91, 27,111, 67,182,173,225,179,190, 22, 22, 22, 31, 17, 66, 2, 0,
+128, 82, 26, 91, 90, 90,186,137, 82,250,162,225,218, 63, 28,132, 16,115, 0,131, 68, 34,209,187,142,142,142, 29,178,178,178, 62,
+167,148,214,233,190, 93, 7,151, 8,192, 12, 91, 91,219, 48, 91, 91, 91,159,188,188,188, 71, 69, 69, 69,251, 0,172,162,148,214,
+ 91,242,252,197, 20,183,215,187,133,116, 91, 16,117, 34,106,201,162,117, 25, 87, 95, 88,255,169,155, 67,159,222, 93, 22, 70, 29,
+185,178,120,238, 6,211,218, 35, 85, 25, 27, 3, 84,230,145, 10, 40,123, 74,253,239, 54,115,172, 3,132,144, 78, 0,230,161,108,
+204,171, 40,165, 13,238,138,240, 87,130, 16, 98,169, 80, 40,190, 6,240,150, 72, 36,138, 75, 79, 79,255,128, 82,106,170, 29, 77,
+125,220, 98, 0,246, 0,242, 76,249, 30, 85,249,156, 8,101,229,250, 1, 40,179,211,184, 65, 77,176, 98,248,167, 65, 38,147,173,
+117,113,113, 25,175,209,104, 74, 9, 33,180,170, 95, 35,199,113,105, 57, 57, 57,127, 90, 37,252,127, 17,127,109, 5,224, 31,128,
+ 26, 5, 86,122, 58,172, 69,162,124,191,103, 89, 49, 35, 50, 50,163,135, 3,128,155,107,171,125,206, 46,129,123,211,211,165,134,
+246,189, 67,229, 98, 11,209, 38,150, 21,183,214,234,117,142, 98,145, 88,101,224,140,119, 24, 61,253, 40, 51, 33,162, 70,147, 68,
+ 49,203,186, 63, 77, 60,231,204, 25,242, 32, 54,115,131,216,252, 5, 47,168, 74,184,185,185,189,212,193,216,219, 55,177, 50,200,
+204,166,138,197,108,111,129,114, 1, 84, 0, 24, 34,142,229,120,227, 25,137, 78,183, 58, 47, 47,169, 65,253, 2,171,162,185, 35,
+113,161, 64, 24, 8,122,131,226, 20, 1,246, 36,168,168,201,190, 80,166,138,135,223, 41, 50,170,126,118, 13,165,244, 83, 83, 63,
+107, 42,148, 74,165,221,144, 33, 67,214,126,249,229,151,230,114,185,156,164,164,164,132,204,158, 61,251, 13,165, 82, 57, 61, 45,
+ 45, 45,163,218,120, 20,132, 96,150, 32,148, 25,148, 50, 12,153,173, 80, 40, 44, 88,150,125,161,121, 40,207,243, 22,132, 96,146,
+ 32,148, 53, 28,103, 24, 50,139, 16,178,206, 20,161,104,110,110, 62,178, 67,199,206,211,191, 94,177, 74,174,112,118,182,228,120,
+193,240,228,233, 83,203, 5,115, 63,237,104,110,110,190, 78,163,209,152,212, 64,182,218,216, 9,203,178, 35,100, 50,217, 0, 0,
+254,229,139,227,117, 58, 93, 36,207,243,123, 77,189,145,187,184,184, 92, 96, 89,182, 81, 67,246,205,243,124, 74, 86, 86, 86, 80,
+253, 91,190, 8, 66,200, 48, 79, 79,207,239,187,118,237,106,209,161, 67, 7, 72,165, 82, 44, 92,184,112, 6,128, 58, 5, 86,133,
+144,178,176,176, 24, 97,105,105,217, 88,173, 86, 39,105, 52,154,131, 82,169,180,215,186,117,235, 60,186,116,233, 98,149,157,157,
+ 77, 88,150, 85, 68, 70, 70,254,107,253,250,245, 33,132,144,158,245,221,220, 10,147,232, 2,217, 91,254,193,133, 73,231, 22, 0,
+232, 87,125, 61,167, 53,123,151,178, 30, 3, 52,244,118, 42, 26, 80, 34, 79, 8, 97,196, 98,241, 58, 23, 23,151, 49, 90,173, 86,
+ 11,128, 18, 66,168, 66,161,168, 88, 15, 0,208,235,245,249,249,249,249,205,234,226,106,222,188,249, 77,150,101,149,181,173,231,
+121, 62, 45, 33, 33,225,143,184, 97,205,202,202,202,122, 83, 44, 22, 19, 15, 15, 15, 22,128,201, 2,139, 16,226, 7, 96, 62,202,
+110, 50,155, 40,165, 60, 33,164, 59, 80,246,255, 14,224,155, 10,193,198,178,236,166,102,205,154,189, 29, 31, 31,255, 29,165,116,
+201,203, 14,214,197,197,101,203,198,141, 27,135, 15, 28, 56,144,205,201,201,113,127,237,181,215,118, 1, 8,126, 89,190,242,227,
+144, 2,152,235,226,226,242,113, 80, 80,144,195,237,219,183,243, 8, 33, 27, 1, 44,167,117,120, 77, 17, 66,148, 0,122,217,218,
+218,246,156, 63,127,190,124,192,128, 1,216,186,117,235,155,219,182,109, 83, 19, 66,206, 0, 56,253, 71,137,191,255,117,176, 44,
+187,110,196,136, 17, 99,118,237,218,101,241,244,233, 83, 11,119,119,247, 74,211,107, 66,200, 75,223, 63, 95,225,143, 71,141, 2,
+ 75, 42,181,144,240,188,182,121, 70,102,244,240, 55,186,126,107, 3, 0, 23,206,127, 50,220,217,165,101,172, 84,106,145, 40,179,
+ 54,139, 8,125,171, 87,235,161, 3,186, 18,165,171, 51,210, 50,159, 41,254,189,231, 68,223,200, 19,231, 34, 80,102,252, 85, 35,
+ 56, 67, 30,204, 13,167,113,255,210,122, 56,118,203,192,134,163,105,184,122,247, 9, 74, 11, 85,104,228, 98,142, 21, 83,251,192,
+197,206,226,165, 14, 68,174,240,235,206,152, 89,236, 29, 53,242, 29,155,183, 7,249,139,189, 92, 92, 64,169, 12,137, 73,234,206,
+199, 78,158,107,127,112,255,238,143,228, 10,191, 17,234,236, 68,147, 47,106,109,221,136,121,137, 1,131, 68, 44,249, 87,112,199,
+150, 61, 71,190, 25,204,180,240,111,138,184,123,241,125, 14,159,189,182,162,133,130, 57,195,241, 52,220, 82,130,159,110,101,212,
+110,196, 87,147,208,232,217,179,103, 27,115,115,115,125,213,237, 52, 26,141,148, 16,244,124, 25,145, 81,177, 15,189, 94,199,136,
+197, 82, 48, 12,153,222,170, 85,171, 70, 42,149,234, 2,195, 48, 59,211,210,210, 76,234,241, 86,129,201,132, 72,243, 69,162,182,
+140, 76,230,202,235,245, 14, 0, 64,164,210,124,165,157, 93,224,252,121,243,228, 44,203, 10,185,185,185, 40, 45, 45, 37,239,191,
+255,190, 89, 82, 82, 82, 40,128,245,245,140, 17,219,182,109,243,115,117,117,213, 87, 95,151,153,153, 41, 29, 56,240,237,134, 12,
+177,130,211,175,211,235, 93,166,157, 56,113,220,191, 40, 47, 95,187,109,205,214,219, 70, 51,115,173,119,115, 63,201,166,173, 59,
+172, 63, 24, 51,250, 19, 66,200, 29, 74,169,201,253,228, 8, 33,158,230,230,230, 17, 43, 87,174, 12,232,222,189,187,216,217,217,
+ 25,217,217,217,136,143,143, 15, 56,123,246,236,160, 29, 59,118,204, 32,132,132, 82, 74, 77,113, 92,247, 61, 19,254,189,179,165,
+189, 3,120,163, 17,110,173,218, 84,228, 47,224,225,217,147,224, 12, 6, 8, 70, 35,252, 7, 12, 2, 80,214,170,167, 69,139, 22,
+ 47,229,150, 75, 8,113,107,217,178,229,127,150, 46, 93, 42,209,233,116,184,118,237, 26,206,157, 59, 39,100,102,102,214,105,100,
+ 75, 8, 17, 17, 66, 78, 46, 90,180, 72, 25, 20, 20,100,165, 82,169,192,243,188,227, 79, 63,253,244, 81,155, 54,109,172, 61, 60,
+ 60,164,225,225,225, 80,171,213,224, 56,206,190,113,227,198,246, 35, 71,142,212,135,135,135,207, 0,240,117, 77,156, 95, 76,113,
+123,189, 40,137, 46,200, 34,141,251, 54,107,251, 46,178,200,241,190,211,251,185, 30,179,110, 66, 42, 35, 89,253,154, 52,177,106,
+220,220,114,182,220, 58,208,190, 40,253,244,236,126, 77,154,108, 59,150, 84,255, 67, 16, 33,132, 97, 24,102, 93,104,104,232,168,
+ 61,123,246, 88,196,199,199, 91,248,251,251, 67, 16,132, 74,199,252, 10,163, 88, 95, 95,223,122,207, 27,203,178,202, 51,103,206,
+ 56,155,155,155,191, 96,202, 91, 82, 82,130,129, 3, 7,214,203, 97, 34,170, 94,111, 27,250, 55,254,226,241,227,199,195, 34, 34,
+ 34, 70,207,154, 53,203, 23,192, 36, 0, 11,115,115,115,187, 2,128,131,131,131, 20,192, 57, 66,200,216,153, 51,103,126, 56,103,
+206, 28,188,249,230,155, 11, 9, 33, 95,189, 76, 84,143, 16,194, 58, 58, 58,190, 57,112,224, 64,214,104, 52,194,210,210, 18, 70,
+163,177, 73, 67,121,170,113,202, 36, 18,201,207, 43, 87,174,236, 61,114,228, 72,136, 68, 34, 8,130, 96,127,242,228,201,207,198,
+140, 25, 19, 76, 8,233, 87,147,200, 34,132,188,251,225,135, 31, 14,121,231,157,119,208,174, 93,187, 74,115,217,149, 43, 87, 98,
+241,226,197,242,147, 39, 79, 14, 10, 15, 15, 31, 68, 8, 57, 72, 41,253, 71,123,153, 17, 66,190, 25, 49, 98,196,168, 93,187,118,
+201, 1, 96,197,138, 21,152, 54,109, 26, 20, 10, 5,228,114,249,127,123,120,175, 80, 13,245, 54,123,174, 9,165,165,165,109,230,
+ 78,254, 23, 24,166,236, 41,177,169,143, 39,150,205,251,128, 28,142, 60,209,166,174,207,137,205,220,112,255,210,122,200, 60,166,
+ 66,103,228,240,235,221,199, 56,181, 34, 4, 0,224,215,111, 62,116,134,158, 0, 0, 74,169,189,212,220,252, 27, 61,207, 95,134,
+139,203, 53, 36, 39,215, 57,119, 42, 87,248,117,119,114, 81, 68,110,222,252,181,121, 64,147,102, 48,112, 70,164, 63, 75, 7, 33,
+ 50, 40,221,173, 48,246,221,126,226,174, 93,221, 28,191,248, 98,203, 47,150, 78,126,131, 75,114, 18,235, 53,250,108,230, 68,126,
+ 12,110,227, 59,124,100,255, 32, 89, 96, 64, 75, 72,100,230,149,235,218,182,107,135,182,237,218, 49,115,212,197,189,175,223,184,
+213,251,192,201, 95,117,205,156,200,190,251, 57,244,189, 58, 40, 43,221, 41, 9, 33,152, 50,101,202, 11, 13,137, 51, 51, 51, 17,
+ 21,245,187,102, 13,158,219,199,151, 95,126, 41, 47, 40, 40,232,245,239,127,255,251, 13,119,119,247,149,233,233,233,191,154, 66,
+242, 47, 66, 26, 65, 38,235, 57,102,213, 42,161,245,219,111,179,182, 46, 46,140,192,243, 36,227,209, 35,135, 53,235,215,119,203,
+123,248,208,188,196,222, 62, 47, 95,163, 41, 77, 76, 76,132,153,153, 25, 17,137, 68,237,171,243, 80, 74,179, 9, 33,223, 48, 12,
+153, 77, 8,129, 76,102,150, 56,113,226,196,219,229,171, 27, 29, 57,114,196,226,173,183,222, 42, 5,240, 20, 0,100, 50, 51,119,
+150,101,252,202, 18, 4,241,141, 41,194,210,210,210,114,242,146,165,223, 88, 22,229, 21,104, 12, 37, 37, 70,103,107, 57,129, 92,
+206, 22, 23,169,139, 50,178,114,180,243, 63, 95, 44,154, 48,246,157,201, 0, 62, 50,233, 4, 18,226,249,218,107,175, 93,143,136,
+136,112,118,112,112, 64, 65, 65, 1,114,115,115,113,253,250,117, 8,130,128,208,208, 80, 89,231,142, 29,218,204,155,191,224, 42,
+ 33,228,117, 83, 68,150,165,189, 35, 86, 4,181, 6, 0,124,246, 52,183, 98, 63,216, 58,108, 64,229, 54,139,211, 10, 1, 0,102,
+102,102,191,167,213,211,235, 61,123,246,148, 0,192,184,113,227,138,138,139,139,151, 1,216, 69,235, 48, 67, 45,199,140, 5, 11,
+ 22,184,251,248,248,120,237,218,181, 11,106,181, 26, 0,156,125,124,124,208,172, 89, 51, 62, 42, 42, 10,126,126,126,176,178,178,
+194,133, 11, 23,240,235,175,191,162,109,219,182, 86, 18,137,100, 56,106, 17, 88,221, 66,186, 45,144,189,229, 31,220,172,237,187,
+144, 91,187, 98,219,238,189,184,127,107, 71,176,206, 16,191, 96,217, 36,247,119, 52, 84,246,158,210,215,106, 78,163,118, 93, 29,
+154,182,124, 27, 94,109,111, 59,106,249,139,143, 23,126,220,120,185,200, 76,187, 99,209,202,140,220,154,120,203,167, 5, 87,132,
+134,134, 14,219,179,103,143, 45, 0,196,196,196, 32, 59, 59, 27, 78, 78, 78, 48, 51, 51,131, 88, 44,174,236, 31,106, 42,204,205,
+205,145,153,153, 9,131,161,172, 57, 0,207,243, 40, 46, 46,134,139,139, 11, 0,224,139, 47, 8,179,104,145,105,174,227,132,144,
+160,142, 29, 59,238,244,242,242,242,168,186,188,127,255,254, 8, 11, 11, 3, 0,116,237,218,181,231,208,161, 67,105,133, 16,204,
+204,204, 84,223,184,113,163, 55,165,244, 90, 77,156, 12,195,104,210,211,211, 49,115,230, 76, 60,121,242,228, 99, 66, 72, 50, 0,
+ 51,169, 84, 90,177,137,148, 16,226,215,178,101,203,117,211,166, 77, 67, 82, 82, 18,226,226,226,174,191,236,148, 41,165,148,247,
+246,246,126,104, 52, 26,219,113, 28, 7,141, 70,131,193,131, 7,155,217,219,219,103,179, 44,155,160, 82,169, 70, 83, 74, 51, 77,
+ 60, 31, 82, 0, 94, 34,145,104,195,204,153, 51,123,246,234,213, 11,209,209,209,136,136,136,192,200,145, 35,209,183,111, 95,172,
+ 92,185,178,235,164, 73,147,230, 0, 88, 84, 3, 69,207, 77,155, 54,129,231,249, 23,254, 55,204,204,204, 16, 20, 20,132, 22, 45,
+ 90,224,240,225,195, 61, 1,252,163, 5,150,151,151,215,196, 61,123,246, 84, 42, 41, 55, 55, 55,200,100, 50, 84,249, 30,188,194,
+255, 16,106,188, 2,233,245,165, 6,145,136, 73,112,115,109,181,239,194,249, 79, 42,167, 8, 1, 38, 65,175, 47, 53, 0, 0, 47,
+ 80, 20,149,114, 48,151, 49,120,154, 85,140,123,143, 84, 47,240,208,106,165,150, 98,115, 79,200, 58, 60, 5,165, 20,122, 3, 15,
+ 93, 97, 22,150,253, 82,138,248, 52, 45,244, 37,249,208, 27,202,210,172, 28, 29, 29, 69, 39, 78, 28,155,118,250,244,217, 15,127,
+248,225, 7, 54,205,198, 38, 14,133,133,109,106,226,180,183,111, 98, 37,178, 52,223,247,221,230,133,230,148,125,132,196,148, 18,
+ 52, 85,118,128,163,173, 7,178, 84, 37,184, 28,119, 20, 9, 15, 34,225,227,234,133,169,147,251,154, 45, 89,186,107,175,157,157,
+143,103,126,254,227,162,218,198, 89,142,119,183, 28, 79, 4,151,247, 8,124,110, 18,248,226,140, 23, 54,144, 59,121,162,109,119,
+119, 56,121, 52,145,189, 55,117,241,187, 0,222,171,137,147, 82,154,205,178,236, 38,134, 33, 31, 17, 66, 16, 16, 16,248,120,237,
+218,181, 47, 68,113, 0,232, 3, 2, 2, 31,179, 44,227, 67, 41, 5, 33,204,119,130,192,103,215,196, 89,195,185,206, 38,132,124,
+ 35,149,202,102, 1,128,139,139,235,163, 99,199,142,233,135, 14, 29,138, 21, 43, 86, 72,230,204,153,243,169,151,151,215,164,228,
+228,228,172,106,159,123,142, 51,148, 16, 79,247, 38, 77,250,124,117,249, 50, 21, 27,141, 36,239,250,245,162,130,204, 76, 46,171,
+184, 88,186, 63, 33,225,205,241,159,126, 42,245,240,240,192,165,200, 72,135,156,146, 18, 90,160,211,105, 10, 10, 10, 40,199,113,
+215,107,226,164,148,206, 85, 40, 20, 22,219,182,109,243,155, 56,113,226,237,140,140,140,185, 0,224,230,230,182, 12, 64, 11, 0,
+ 79,171, 44,195,230,205,123,211,223,127,255,253,196,236,236,236,231,166, 70,235, 56,246,150,206, 78, 78, 22,187,183,132, 71,219,
+ 91,153, 51,142, 74, 87, 70,108, 99, 35,230,100, 22, 18, 74,161,245,241,105, 98, 1,160,101, 45,231,236, 57, 78, 66, 8, 49, 55,
+ 55,143,248,249,231,159,157,197, 98, 49,120,158,135,147,147, 19,158, 60,121,130,130,130, 2, 20, 23, 23,227,113, 66, 60,188, 61,
+ 60,240,197,156,217,174,147,102,207,137, 32,132,180,171,122, 19,171,105,156,188,209,128,106,251,169,177,235, 64,213, 60, 10, 19,
+143,189, 58,158,164,164,164, 64, 46,151, 35, 32, 32, 64,126,249,242,229,139,181,137,171,170,156,102,102,102,195,187,116,233, 98,
+181,123,247,110,180,109,219, 22, 54, 54, 54,136,138,138, 66, 76, 76, 12, 12, 6, 3,163, 86,171, 97,101,101,133,229,203,151,195,
+203,203, 11, 69, 69, 69, 72, 73, 73,113, 16,139,197,142,181,113, 70,157,136, 90, 82,152,116,110, 65, 22, 57,222,119,219,238,189,
+120,127,228, 8,184,208, 71, 23,109,154,144, 37,125,222,234,242, 25,101, 61, 6, 88, 90,181,178,243, 13,120, 11, 18,169, 28,147,
+102, 45, 70, 98,236, 17,187,210,226,232,143, 9,159,234, 1, 96, 74,117, 78, 82,118, 98, 24, 15, 15,143,241,251,247,239,183,170,
+ 88, 94,209,147,176,170,176,170,120,213,116,158,107,252, 27,241, 60, 12, 6, 3, 12, 6, 3,120,158,135, 74,165, 66,113,113, 49,
+108,109,109,203, 54, 88, 4, 16, 16, 66, 81,179, 96,169,198, 57,250,244,233,211, 30,150,150,150,213,183,129, 74,165, 2,199,113,
+176,176,176,168,220,167,209,104,132, 86,171,149,183,104,209,226, 35, 0,215,106,226, 20, 4, 97,250,240,225,195,187, 92,187,118,
+173,241,250,245,235,161,215,235, 87,100,101,101, 97,200,144, 33, 16, 4, 1, 61,123,246,236, 68, 41,189, 63,127,254,124, 0,192,
+180,105,211,140, 37, 37, 37, 19, 77, 57,246,154, 64, 8,105, 49,116,232,208,198,103,206,156, 65,112,112, 48,116, 58, 29, 86,174,
+ 92,105,189,121,243,102,235,240,240,112,167, 89,179,102,125, 15, 32,164, 46,206,114, 97, 53,175,111,223,190,211, 7, 14, 28,104,
+153,158,158, 14, 91, 91, 91,236,221,187, 23,203,151, 47,191,160,215,235,231,133,135,135, 47,139,136,136, 8, 30, 57,114, 36, 86,
+174, 92,249, 49, 33,100, 9,165,212, 88, 19,231,227,199,143,225,228,228, 4,107,107,107, 0,101,141,236,239,220,185,131, 83,167,
+ 78,161,121,243,230,245, 30, 83, 3,254,143, 76,198, 95,205,169,209,104,180, 41, 41, 41,242,175,191,254, 26,174,174,174,240,242,
+242,130,153,153, 25, 8, 33, 48, 26,141,160,181,232,105, 83,198,217,173, 27, 17,169,210,237, 6,218,216,218,125, 76, 41, 21, 21,
+ 22,230,111, 49,160,224, 64, 82, 18,173,233, 94,245,167, 28,251, 63, 13, 34, 0, 32,132, 80, 74, 41,169,248,233,238,142, 34,149,
+202, 46,209,217, 37,112,175,179, 75,203,242,190, 92, 76, 2,203,218, 37, 42, 20,165, 69, 0, 96,224, 40,174, 36, 20, 32,250, 97,
+ 22, 98, 30,102,193, 82,102, 90,155, 26,157,129, 43,171,179,164, 20, 90,245,111, 15,169,134,210,124,232, 12,101,233, 28,122, 93,
+ 41, 10,115,226,200,176,193,189,205, 62,252,112, 2, 92, 93,221,157,106,161,131, 65,102, 54,117,210,180, 55,109,237,109,197,136,
+188,124, 28,157,154, 15,134,153, 76,140,220, 66, 45, 64,128, 7,143, 78, 1,130, 21, 98, 19, 83,208,177,165, 5, 66,250,248,203,
+ 15, 29,184,255, 41,128,133,166,140,151, 75,187, 14,137,111, 63,136,121, 35,140,170,251, 16, 10,146, 1, 75, 23,104,136, 28,185,
+153,201, 72,184,120,208,164, 22,165, 60,207, 79,114,116,116,124, 54,119,238,220, 32, 63, 63, 63,253,164, 73,147, 98,159, 60,121,
+ 50,191,234, 54,222,222,222, 95,109,216,176, 1,137,137,137, 79,151, 45, 91,118, 73,165, 82, 53,168, 61, 13,165,116, 14, 33,100,
+ 45, 0,100,102,102,170,126,254,249,231, 86, 23, 46, 92,248,104,205,154, 53, 78, 31,127,252,177,100,242,228,201,163, 1,172,168,
+237,243,147, 9,145, 90,202,100,189,190,186,112,129,114,105,105,186,255,124,251,173,116,227,149, 43,243, 13,130,224,230,232,236,
+ 76, 58,119,236, 88, 98,193, 48,170,220,236,108,206,169,113, 99,246,201,169, 83, 14,212,220, 60,227,216,177, 99, 69,106,181,250,
+ 96,109,188, 44,203,150,214, 52, 45, 88, 19, 92, 93, 93,245, 53,229,104,213, 6, 66, 72,145, 64,169,193,206,199, 27,125,122,118,
+110,250,240,254,163, 71, 50, 27, 91,214,215,183, 81,179,184,132,167,215, 4,142,211, 17, 66,138,234,103, 2, 88,150, 29,177,118,
+237,218, 64,107,107,107, 8,130, 0, 27, 27, 27,228,228,228, 64,175,215,163,168,168, 8,250,226, 66,232, 11, 11, 17,147,252, 4,
+ 93,186,117,195,176,190,125,252,195,127,250,121, 4,128, 61,117,241,186,181,106, 83, 25,185, 90,220,200,161,114,249, 23,169, 5,
+149, 98,235,235, 54,190,144,200,229,232, 61,125,142,169,135,254, 2, 40,165,183,165, 82,233,209,208,208,208, 55, 63,253,244, 83,
+ 38, 51, 51,243, 56, 33,164, 11,165, 52,174,174,207,201,229,242, 38, 21,130,194,198,198, 6,107,215,174,133, 66,161, 64,105,105,
+ 41,110,220,184, 65,149, 74, 37, 57,119,238, 28,148, 74, 37, 84, 42, 21, 12, 6, 3, 74, 74, 74,178,244,122,125,173,211,226,229,
+211,128,253,166,247,115, 61,118,255,214,142, 96,119,242,248,198,240, 25, 93, 31,222,143, 73, 72, 57,121,234,242,151,156,214, 44,
+181, 32,237,244,108,159,246,183, 29, 63,158,249, 5, 54,172, 88,132,251,215, 46,228, 41, 60,139, 54,154, 19,221,143, 29,123,215,
+ 62,222,146,146, 18,109,124,124,188, 85,116,116, 52, 8, 33,176,177,177,129,133,133, 69,141, 34,203, 84,240, 60, 95,249, 83,165,
+ 82, 33, 39, 39, 7,137,137,137,216,177, 99, 7, 50, 50, 50, 28,215,216, 88,103, 57, 74, 37,209,146, 2, 50,207, 96,160,183,235,
+161,219,210,187,119,239, 17,158,158,158, 86, 85, 23,182,111,223, 30, 19, 38, 76,192,119,223,125,135, 43, 87,174, 60,215,239, 50,
+ 43, 43, 43,211,104, 52,254, 88, 27, 33,165,180,128, 16,210,119,240,224,193,183, 46, 94,188,104,189,125,251,118,112, 28, 87,227,
+107,219,182,109,248,245,215, 95, 23, 82, 74, 19, 76, 62, 1, 85, 64, 8,105, 62,100,200,144, 11, 59,119,238,180,205,201,201,129,
+ 74,165,130, 90,173, 70, 73, 73, 9,120,158, 71,179,102,205, 8,199,113,117,230,181, 17, 66,100, 78, 78, 78, 71,207,159, 63,223,
+189, 89,179,178, 77,141, 70, 35, 46, 95,190,140,183,223,126,187, 72,175,215, 15,161,148,230, 18, 66,230, 30, 56,112,224, 74,199,
+142, 29,209,190,125,123,251,228,228,100,123, 0, 53, 70,174,213,106, 53,212,106, 53,196, 98, 49, 92, 83, 65, 51,158, 0, 0, 32,
+ 0, 73, 68, 65, 84, 92, 92,176,100,201, 18,232,245,101,151, 21, 63, 63,191,138,253, 50, 0,214, 52,111,222,124,112, 66, 66,194,
+114, 74,233,198,151, 57, 7,255,171, 32,132, 16,177, 88,140,113,227,198, 65, 36, 18,193,220,220, 28, 90,173, 22, 70, 99, 89,157,
+ 64,185,192,106,208,244,179,175,175,149,131, 8,146,247,253,252,222,152, 58,108,202, 0, 39, 87, 55,119,216, 90,203, 16, 31, 31,
+215,229,236,153, 83,223,182,104,230,180, 89,208, 27, 55, 39, 60, 41,248,211,155,208, 87,215, 34,127,246,254,254,108,212,114, 5,
+ 26,202, 59, 58, 30, 80,165,167, 75, 13, 82,169, 69, 34, 80, 22,213, 42, 19, 87, 67,121, 96, 55, 56,131,177,252, 2, 65,203, 95,
+ 38, 10, 44, 35,143,135,247, 99,113,241,228,207,112, 44, 77,135,234,113,107, 64, 18, 8,189,166, 16, 90,125,217,147,190, 32,240,
+184,123,235, 12,138, 10,243, 16,208,110, 0,192, 48,181, 78,109,217, 56,144, 1,157,219,182, 98, 31,166,196,162,189,223, 80, 52,
+ 86, 6, 35, 57,179, 8, 5,106, 29,242,139,180,104, 29, 48, 7, 57,249, 26, 20,149,106, 17,247, 48, 28,238,110,141, 25, 34,122,
+212, 19, 38, 10, 44, 93, 92, 4,116, 9,135, 33,241,234, 2,105,179,183,193,122, 5, 33, 37,250, 28,238, 30, 91,131,180,123,151,
+ 64, 5, 30,174,126, 29,234, 39, 2,192,178,236,150,147, 39, 79,182,126,227,141, 55, 68, 61,123,246, 12, 80, 42,149, 1,105,105,
+105,177, 0,160, 84, 42, 3,250,246,237, 27,224,236,236,140,117,235,214,149,178, 44,187,197, 36,210,106,168, 54,173,118,219,213,
+213,117,101, 68, 68,196, 55, 19, 38, 76,128,139,139, 75,139,186, 62,155, 35, 22,191,246,222,210,165, 84,204,178,116,207,134, 13,
+146, 47,142, 31, 95,245,195,143, 63, 74,122,116,239, 78, 40,165,184,115,231,142,197,215, 27, 54, 88,140, 26, 56,240,105,242,179,
+103,220,249, 43, 87, 12,153,105,105,197,207, 74, 74,190,200,200,200,120,169, 70,208,191, 23, 70,163,241,234,147,199,143,148,109,
+ 58,180,118,186, 29,247, 56, 46,164,103,231,215, 25,134, 97, 18, 30, 37, 95,117,114,178,182, 56,115,242,180,193,104, 52,190, 80,
+189, 86, 19,100, 50,217,128, 30, 61,122,136,242,243,243,225,230,230,134,156,156, 28,164,167,167,151, 69, 24, 10,243, 97, 40, 44,
+132,177,168, 0,124,137, 26,143,111, 92, 71,235,198, 62,178,253,101, 73,240,117, 10,172,138,167,202,234,209,148,170,145, 44,169,
+149, 21,164,114, 57, 72, 3,167, 7, 9, 33, 3,109,109,109,103, 23, 20, 20, 28,165,148, 46, 49, 24, 12,147,102,207,158,221,126,
+253,250,245,142, 95,125,245,149,245, 7, 31,124,176,159, 16,210,154, 82,170,171,141, 67,173, 86, 39,113, 28,231, 8,192,249,204,
+153, 51,112,118,118, 70, 97, 97, 97, 69,100, 69, 95, 90, 90,106,150,155,155, 11,157, 78, 7,189, 94, 15,107,107,107,220,188,121,
+ 51,159,227,184,159,235, 27,159,117, 19,178, 68,103,136, 95,224,224,111,153, 97,224,236,186, 62,203, 19,242, 23,173,204, 88, 12,
+ 96, 85,191, 38, 77,182, 25,132, 11,143, 31,196, 30,177,123,114, 35, 42, 47,227, 65, 73,227,109,191, 60,170, 53, 7,171,252,202,
+ 43, 16, 66,104,179,102,205,160, 82,169,192,178, 44, 44, 44, 44, 32,151,203,209,188,121,115,164,166,166,190,180,192,226, 56,174,
+ 82, 92, 69, 70, 70, 34, 51, 51, 19,187,119,239,134,135,135, 7, 3,192, 41, 53, 53,181,247,176, 97,195, 58, 58, 56,216, 45,203,
+205,205,175, 53,175,141, 82,122, 7,128,117,213,101,132,144,238,142,142,142,103,117, 58, 29, 30, 61,122,132,159,126,250,169, 27,
+165,244,188,201, 3, 44,227,125, 68, 8,233, 27, 20, 20,180,163,109,219,182, 77, 40,165, 8, 12, 12, 68, 88, 88, 24,194,195,195,
+113,247,238, 93, 20, 22, 22, 10,167, 78,157,250, 1,192,202,134,112,147,223,238,108,205,134, 12, 25,114,105,215,174, 93,118,185,
+185,185,208,104, 52, 40, 41, 41,193,254,253,251,209,165, 75, 23, 56, 58, 58, 98,231,206,157, 28,165,244, 72, 29, 92,102,182,182,
+182, 71, 47, 93,186,212,173,105,211,166,136,139,139,195,153, 51,103,208,168, 81, 35, 72,165, 82,140, 30, 61,218,250,187,239,190,
+251,132, 16,178, 92, 44, 22, 47, 25, 50,100, 8,120,158,199,229,203,151,115, 1,212, 91, 73,106, 52, 26, 81, 80, 80,128,130,130,
+ 2,152,155,155, 87,156, 27,160, 44, 69, 98,251,154, 53,107,198, 76,157, 58, 21, 77,154, 52, 89, 66, 8,249,142,190,100, 67,233,
+255, 37, 52,107,102,215, 82,202,202,166, 72, 36, 98,135,252,252,252,202,107,135, 94,175,135, 78,167,123, 46,114, 37,145,136, 29,
+ 58,180,241,250, 69, 83, 90, 60,239, 94, 98,126,173,141,203, 91, 52,181,109,101, 97,105, 51,181,127,223, 97,163,251,244, 29,196,
+114, 70, 35, 78,156, 56,130,127,255,123, 19,186, 7,249,161,113,211, 64,124, 50,121,138,141, 78,207,205, 57,117,234,248,236,206,
+ 29,124,142, 23, 23, 21,204,173,139,243, 21,158,135, 8, 0,106, 86,140, 67,121,119,119,228, 3, 0, 33,196,209,206,206,110, 3,
+207,243,221,129,247, 33,150,187, 32,238,230, 53,228,229,139,161,211,240, 16,104,153,200, 50, 5, 58,157, 30, 23, 78, 28,198,218,
+ 53,171,144,155,155,139,160, 55,186, 65, 45,242,128,167,135, 39,180,154,178,192, 5,165,128, 65,111,132,147,194, 11,183,111,223,
+ 53, 22,149,148,156,175,141, 79, 98,102,240,247, 84,248, 65,103,120, 29,102, 82, 41, 10,139,245,200, 47, 23, 87, 59, 15, 12,135,
+174, 84, 3, 78,111, 0,167, 55,194,201,115, 8,154, 43,122, 64,224,143,212, 56,101, 84, 43, 4, 30,134, 39, 23, 96,120,114, 1,
+230,175, 79,198,207,203, 70, 62,183,218,212,255,223,236,236,236, 28,165, 82,121,252,214,173, 91, 3,134, 15, 31,142,168,168,168,
+247, 0, 76, 7, 0,153, 76,246,222,240,225,195,113,235,214, 45, 36, 36, 36, 28,207,206,206,254, 67, 60, 59,164, 82,169,182,226,
+ 41,207,204,204,204,172,158,109,221,219,135,134, 50,133,183,111, 23,173,185,124,121,209,182,237,219, 37,189,122,246, 36, 70,142,
+131,192,243,104,234,235, 75,250,244,233, 99, 25,190,111,159, 3,107, 52,254, 58,115,210,164, 51,223,189,243, 78,241, 53,181,218,
+212, 4,242, 70,229, 83,131, 0,208,168,142,101, 38, 67,167,211,173,159, 56, 97,124,239,115, 81,231, 61, 26,121,185, 91,157, 60,
+115,225,174, 84, 38, 97, 26,123, 55,102, 11, 10, 10, 68,159, 47,154,107,174,211,233,190, 53,145,206,223,209,209, 17, 89, 89, 89,
+120,248,240, 33,116, 58, 29,140, 70, 35,132,210, 18,232,243, 11,160, 47,204, 3,209,106, 32,227,121,104, 85,217,104,212,216, 7,
+248,173,194,176, 78,212, 52, 45, 88,117, 74,208,204,218, 26, 18, 75, 57, 24,177,184,198,105,173, 90, 56,219,118,232,208, 97,223,
+193,131, 7, 37, 99,199,142,237, 72, 8,217, 64, 41, 77, 38,132,244, 92,184,112,225,245, 13, 27, 54,200, 38, 76,152,208,108,229,
+202,149,239, 2,168, 85,176,107,181,218,125,191,252,242,203, 40, 47, 47, 47,231,152,152, 24,104,181, 90, 8,130,128,126,253,250,
+ 1, 64,229,119,230,254,253,251, 26,173, 86,251, 44, 54, 54,182, 40, 57, 57, 89, 15, 19,170,254, 22,173,203,184, 58,125,152, 50,
+ 84,225,226,254,171,153,121, 35,111,170,190, 61,120,250, 48,229,138,213,251,211,180,199,146,146,138, 23,126,220,120,121, 73,113,
+244,199,182, 74,245,198, 99, 71,106, 23, 87, 85, 64, 43,202,210, 29, 28, 28, 32, 18,137, 32, 22,139, 33,145, 72, 0, 0, 10,133,
+ 2,133,133,133,117, 78, 17,214, 4,158,231, 81, 84, 84,132,194,194, 66, 36, 36, 36, 32, 51, 51, 19, 87,175, 94, 5,207,243, 40,
+ 43, 82, 4,148, 74, 37,174, 95,191,110,213,190,125,251,121, 68, 66,206, 81, 3, 53,185,108,156,101,217,169,239,188,243, 14,244,
+122, 61,194,194,194,176,109,219,182,169, 0,206,155,250,249,202,131,167,244, 87, 66,136,239,221,187,119,173, 1,188, 61, 98,196,
+136, 31,135, 12, 25,130,243,231,207,227,200,145, 35,221, 0, 36, 2,208, 0, 88, 70,202, 26, 43, 47,171,171,192,131,148, 89, 49,
+108,114,114,114,122,187,101,203,150,119,135, 12, 25, 18,176,107,215, 46,219,103,207,158, 85, 20, 53,224,201,147, 39,248,254,251,
+239, 51,183,111,223, 94,196,243,188, 3,195, 48,191, 20, 20, 20,212, 86, 5,109,102,105,105,121,236,210,165, 75, 93,155, 54,109,
+138,211,167, 79, 99,222,188,121,232,218,181, 43,118,239,222,141,230,205,155, 35, 48, 48, 16,206,206,206, 31,231,229,229,117,222,
+186,117,107,183, 78,157, 58, 97,231,206,157,200,204,204,220, 84,155,101, 67,125,169,100, 70,163,145, 0,232,184,102,205, 26,159,
+169, 83,167,226,224,193,131,104,211,166,141,205,163, 71,143, 86,162,252, 26,251,119, 69,115, 95,135,229, 29,218,119,157,237,234,
+222, 20, 59,119,237, 70, 94, 94,153, 6,165,191, 25,126,130, 82,138,226,226, 98,100,101,101,193,198,218, 10, 43, 86, 46,121,243,
+163, 15,198,120,160,204,206,226, 5,248, 55,177, 95, 57, 52,108,252,140,176, 81, 99, 16,115,247, 22,194,127,220,130,216,152, 59,
+149,124,156,209,128,196,248,155, 72,140,191, 9,133,139, 23,250,244,234, 70, 70,142, 28,217,239,157, 81, 35,156, 0,252,105, 22,
+ 16,255,164,232, 21, 80,203, 20, 97,213, 13,202,197,213,189,189,123,247, 58, 4, 5, 5,177, 28,199,225,248,137, 19,248,248,195,
+127,225,221,119,230,192, 0, 59,112,122, 9, 4, 73,157,247,238, 74,104, 52,165,160,160, 40, 41, 41,193,149, 43, 87, 64, 5, 14,
+225, 91, 87,129, 82,161, 82, 96, 1, 20,122,131, 1,238,158,205,176,105,219, 87, 28,196,226, 90, 47,100, 69,185, 44,111,228, 40,
+210,159,165, 32, 37, 51, 22, 54, 86,158, 16,137, 61,145, 91, 80, 10, 17,227, 2,163,246, 62,248,242,240,105,105, 73, 26, 52,134,
+223,247,119,227, 11, 95,140,146, 82,193,244, 7,164,210,210,210,125, 59,119,238,236,179,122,245,106,201,155,111,190,217, 68,169,
+ 84,118, 0,128,208,208,208, 38, 86, 86, 86,216,185,115,167,161,180,180,116,223,239, 26,100, 21, 24,141,198, 55,218,183,111,143,
+188,188, 60, 60,125,250,180,206, 39, 15, 94,175,119,144, 59, 59,179,207,206,157, 51,230,228,231,123,244,232,209,131, 24, 57, 14,
+ 12, 33,200, 43, 44, 68,242,211,167,176,181,181, 37,247,238,223,151,127,251,201, 39,135,252, 2, 2, 68, 21, 21,134,166,224,200,
+145, 35, 22, 40,203,187,170,115, 89, 67, 64, 41, 45, 33,132,188,247,201, 39,159, 28,250,207,127,118,218,100,101,103, 63,144, 73,
+101,156, 92,110,238,250,206,232, 17,162,130,130,130, 81,148, 82,181,169,124,249,249,249,120,252,248, 49,204,205,205, 33, 17,139,
+ 33,104, 74,193,151,168,161,205,203, 1,107,208, 67,202,243,176,183,144,193, 67,161,128,167,147, 99,253,132, 40,171, 22,172, 72,
+104,175, 58, 45,184,162,131, 63,164,150,114, 72,173,228,248, 40, 50, 10, 0,202,132,194,194,250,103,134, 9, 33,142,238,238,238,
+ 63,239,218,181, 75,146,147,147,131, 59,119,238,220,165,148, 22, 18, 66,172, 0, 8,241,241,241,167, 99, 99, 99, 7,148, 87,209,
+213, 87,253,181, 42, 34, 34,162,119, 80, 80, 16,231,237,237,109,153,157,157,237,153,155,155, 75, 50, 51,159,207, 97, 62,122,244,
+168,153, 70,163, 41, 17, 4,225, 16,202,124,156,234,245, 31,154, 62, 76,105,118,229, 54, 38,119, 13,105, 20,104,237,216, 10,121,
+220,237,192, 95,239,102, 78,158, 62, 76,185,126,245,254, 52,173, 57,209,253, 72,248, 84, 15,145,153,214,164,228,100, 74, 41,117,
+116,116, 4,165, 20,215,175, 95,199,165, 75,151,112,225,194, 5, 36, 39, 39, 87,110, 99, 99, 99,131, 83,167, 78,161,123,247,238,
+166, 80, 2, 0, 74, 75, 75,225,234,234, 10, 59, 59, 59,132,135,135, 99,247,238,221,149,137,238, 21, 80,169, 84,176,176,176,192,
+234,213,171,229, 67,135, 14,253, 18, 64, 31, 83,184, 9, 33, 62,189,123,247,238,239,234,234,138,220,220, 92,184,184,184, 32, 40,
+ 40,232, 45, 66,136, 55,165,244,137,201,131,124, 30, 31,133,132,132, 44,249,226,139, 47, 96, 52, 26, 49,110,220, 56, 60,120,240,
+ 96,223,131, 7, 15,214,122,122,122, 78,158, 53,107,150, 66,161, 80, 96,248,240,225,150, 0, 66,107, 35,177,183,183, 95,182,101,
+203,150, 81,253,251,247,103, 12, 6,195, 27,103,207,158,197,211,167, 79,161,215,235,193,113, 28,146,146,146, 48,105,210,164,204,
+220,220,220,174,148,210, 36, 19,198, 53,231,228,201,147, 93,253,253,253, 17, 25, 25,137,208,208,208,115,182,182,182,126,173, 90,
+181,114,117,115,115,195,254,253,251, 97,109,109, 13, 79, 79, 79,251,175,190,250,170,199,160, 65,131, 16, 25, 25,137,105,211,166,
+ 69, 1,168,179,218,181, 54, 8,130, 64,214,172, 89, 19,176,102,205, 26,101,133,184, 98, 24, 6,123,247,238,197,221,187,119, 7,
+226,111, 46,176, 88,134,188,183,116,241, 76,220,184,125, 31, 17, 17, 18,220,184,113, 3, 10,133, 2, 50,153, 12,148, 82,232,116,
+ 58,228,228,228,192,104,208, 33,176,165, 15,118,108, 95,142,103,207,114, 0,134,212,154, 90, 67, 24, 50,122,204,191, 6,227,226,
+165, 19,248,238,187, 45, 80,171, 75,106,220, 78, 42, 53, 67, 83, 63,127,184,187, 57, 35, 53, 45, 21,132,129,105, 23,189,151,196,
+255,147, 41,194,223, 96,107,107,187,118,207,158, 61, 14,221,187,119,103, 75, 74, 74, 32, 8, 2,130,131,130, 48,121,234, 84, 28,
+217,181, 11,190, 29,195, 64,244,114,112, 22,166, 85, 49,104, 53,165,104,209,166, 51,134, 13, 31,129,148,228,100,132, 12, 24, 2,
+173,182,180, 50, 23, 1, 40,139, 96,233,245, 6, 56, 58,123,224,228,201,147, 44,198,141,187, 87, 27, 31,111,144, 70, 39, 38,105,
+187, 20,104,110,227,202,141,112, 24,116, 6, 4, 6, 46,132, 65,112,128,179,242, 3, 24,141, 63,161, 40,231, 44, 0,192,218,161,
+ 59,210, 82, 82,192,176,146, 90,249,234,131, 80,242, 98, 96,169, 33,133, 58,249,249,249, 69,174,174,174,135,175, 94,189, 58, 44,
+ 52, 52, 20,167, 78,157,122, 23, 0, 66, 67, 67,113,245,234, 85, 60,126,252,248,112,126,126,190, 73, 57, 67,245, 65,169, 84,246,
+235,214,173, 91,104,251,246,237, 17, 25, 25, 9,158,231,175,152,242, 57, 86, 44,166, 12,195, 64, 16, 4, 16, 0,185, 5, 5,120,
+240,224, 1,114, 85, 42, 24,141, 70,148,168,213,130,191,159,159,154, 10,130, 85,189,100, 85, 80,181, 98, 16, 53, 84, 17, 86, 44,
+107, 8, 39, 0, 80, 74,147,229,114,121, 74,177, 90,237,100,109,103, 95,108, 38,149,242,133, 5,133,133,113,247, 98,244, 38,222,
+ 20, 42, 16, 31, 27, 27, 27,144,145,145,129,148,148, 20,112, 37,197, 96,117,122, 48,186, 82,244,236,252, 58,204, 65, 97, 6, 1,
+ 98,193, 8, 49, 43, 70,113, 89,181, 93,124,125,164, 21, 2, 31,248, 45,146, 69, 8, 41,155, 22,180,180,132, 84,110, 85,185,174,
+252,120,234, 29,168, 76, 38,219,181,127,255,126, 87,119,119,119, 44, 94,188, 24, 74,165,178,121, 96, 96, 96,105,112,112,176,185,
+ 66,161, 64,139, 22, 45,208,185,115,103, 28, 59,118, 12, 0,234, 60, 7,148, 82,142, 16,210,231,226,197,139, 51, 46, 95,190, 60,
+140, 16, 66,230,204,153,131,190,125,251,194,204,204, 12,165,165,165,200,207,207,199,214,173, 91, 9,165,180, 77,249, 88,189,204,
+204,204,118, 19, 66,210, 52, 26,205,240,234,156,225,107, 90,185, 61,203, 19,198, 41, 92,220, 7,119, 13,105, 20,216, 35,164, 23,
+124,124,123,160, 71, 72, 10, 0, 44,183, 23, 61, 13, 91,177, 32,224,144,163,135,253,247, 39,143,159, 90, 20,212,181,199,252, 57,
+ 19,236,150, 44,223, 82,255,119,159, 16, 2,158,231, 33, 18,137,192, 48, 76,141, 81, 42,145, 72, 4,150, 53, 45, 21,133,231,249,
+180, 65,131, 6, 85,190,207,200,200,112,244,240,240, 96, 42, 34, 87, 0, 80, 88, 88,136,212,212, 84, 24,141, 70, 56, 56, 56,192,
+ 96, 48,180, 50,137,188, 12,147,199,142, 29, 75, 52, 26, 13,198,143, 31,143,109,219,182, 33, 44, 44,140,156, 63,127,126, 50,128,
+169, 13,224, 1, 0, 48, 12,179, 98,214,172, 89, 51, 38, 77,154,132,188,188, 60, 28, 61,122, 20,253,250,245,195,222,189,123,157,
+142, 30, 61,186,180,123,247,238, 96, 89, 22,145,145,145,224, 56,238,126, 93, 92, 18,137,228,237,254,253,251, 51,169,169,169,144,
+ 72, 36,104,215,174, 29,210,210,210, 80, 90, 90,138,244,244,116, 76,153, 50, 37, 43, 55, 55,183,155, 41,255, 71,132, 16,113,211,
+166, 77, 39, 53,111,222, 28,167, 78,157,194,208,161, 67,207, 27,141,198,254, 57, 57, 57,147,242,243,243,191, 25, 61,122, 52, 2,
+ 2, 2,144,152,152,136,222,189,123,163, 75,151, 46, 56,122,244, 40,198,143, 31, 31,101, 52, 26,251,215,100,209, 80,142,226,103,
+207,158,217, 52,105,210, 4,217,217,217, 80,171,213,184,122,245,170,117, 84, 84,148,183,155,155,155,237,163, 71,143,232,130, 5,
+ 11, 44,166, 78,157,138,181,107,215,226,206,157, 59, 8, 15, 15, 71,143, 30, 61,140, 15, 31, 62, 52,217, 91,237,127, 21, 2, 47,
+ 0, 16,224,237, 33,199,137, 35,219,113,235,238, 35,220,186, 27, 11,169,172, 44,185, 93,163, 41, 69,155,192,166,232,216,174, 3,
+ 50, 50,211,241,159,240,237,176,119,116,175,243, 58, 66, 41,133, 68,196,195,223,207, 5,187,194,183, 32,242,232, 25,132,255,103,
+119,101, 78,155, 72, 36, 70,235, 54, 29,209,174, 93, 16, 30, 61, 78,194,246,237,223,193,201,217,163, 86,190, 87,168, 25,149, 83,
+132, 85,127, 86,133, 32, 8, 61,130,130,130, 88,181, 90, 13,173, 86,139,172,172, 44, 60,125,250, 20,182,118,182,120,148,241, 4,
+221, 44, 12,200, 18,138, 16,127,247, 30, 79, 88,241,157,250,118,216,191,107,107,160,107,107,124, 60, 54,172,214,109, 40, 40, 44,
+173, 29,161,211,233, 96, 48, 26, 31, 98,253,250, 90,159,148, 57,222,120,250,196,169,179, 29,198,190,251,182,248,228,217,109, 48,
+234, 5,104,140, 54, 40,209,234, 81, 98, 16,131,177,233, 7,168,206,131, 21,201,208,233,181,166, 56, 20,113,204, 64, 57,227, 25,
+147,206, 14, 0,145, 34, 0, 92,246,111,129, 31,161,228,217,115,235,205,172,236, 77,158, 34,172,228, 16,132, 67,187,118,237,122,
+243,245,215, 95,183,232,222,189,123, 99, 0,144,201,100,250, 93,187,118,149,150, 71, 7, 26, 4, 82,205,189,221,221,221,189,149,
+ 72, 36, 10, 29, 48, 96, 64,171, 49, 99,198,224,222,189,123,216,185,115,231, 67, 63, 63,191, 75,117,241,176, 82,105,174,250,217,
+ 51, 91,185,183,183,200,206,202, 42,227,216,209,163, 94,189,122,247, 38, 41, 41, 41,200,205,205,133, 86,171,197,157,187,119,169,
+152,101,211,136,181, 53,115,255,246,109,134,149, 74,107, 44,167,175, 5, 79,235,169, 34,172, 88,214, 96,120,184,218, 53, 89, 52,
+119,162,143, 86,171, 13, 40, 42, 42,226, 68, 98,177, 88,233, 98,155,220, 16, 14,157, 78, 23,121,250,244,233, 65,189,122,245,146,
+ 37, 70,223, 1, 87, 88, 8,125, 97, 62, 36, 2, 15,251, 54,175,129, 53,232, 0,189, 17,238,254, 20,218, 2, 11,156,191,118,223,
+168,211,233,234,237,212, 94, 33,176,152, 42,102,128, 0, 32,149,203, 33,179,178,134, 76, 46,175, 62,133, 88,231,147, 27, 33,196,
+226,237,183,223,238,217,169, 83, 39, 80, 74,177,117,235, 86, 24, 12, 6,169,193, 96,128, 94,175,135,193, 96, 64, 81, 81, 17,194,
+195,195,177,105,211,166,203, 0,126,168,111,140,148, 82, 78, 44, 22, 79,226, 56,206, 89, 38,147, 25,156,156,156, 36,251,246,237,
+171,180,141,104,221,186, 53, 44, 45, 45,117,132, 16, 3, 0,184,184,184, 24,127,252,241, 71,209,192,129, 3, 37, 53,241, 53, 11,
+108, 62,211,135,179,235,106,102,222,200,219,218,177, 21,124,124,123, 0, 0,122, 15, 24, 11,159,166,158, 40, 82, 69,123,107, 53,
+ 79, 7, 75, 68,249,118,247,214,167,199,153,247, 15, 24, 83,242, 44,234, 1,128,237,245,141, 21, 40,243, 11,235,213,171, 23, 66,
+ 66, 66, 42,167, 3,157,157,157,161,215,235,107, 44,231,175, 11, 21, 38,162, 95,124, 65, 24, 44, 2,214,216, 88,103, 1,168,124,
+250, 47, 44, 44, 68, 74, 74, 10, 82, 82,202,162,215,229, 9,197, 38, 61, 93, 19, 66,204,125,125,125,223,107,211,166, 13,142, 30,
+ 61,138, 27, 55,110,164,159, 56,113,194, 61, 40, 40, 8,222,222,222, 99, 8, 33,243, 40,173,221, 67,175, 6, 62,203, 55,222,120,
+227,147, 73,147, 38, 33, 54, 54, 22, 19, 39, 78,204, 77, 77, 77, 61,180,111,223,190,241,139, 22, 45, 98, 66, 66, 66,144,153,153,
+137, 21, 43, 86,240,151, 46, 93, 90, 9, 96,113, 93,124,148,210,132,212,212, 84,165, 86,171, 69, 94, 94, 30, 56,142, 67,105,105,
+ 41,142, 29, 59,134,240,240,240,236,114,113,245,208,196,225,217, 7, 5, 5,217, 61,120,240, 0,219,183,111,135, 94,175,159, 79,
+ 41,213, 18, 66,126,152, 61,123,246, 60,133, 66, 97,211,187,119,111,180,105, 83,230, 5,183,119,239, 94, 76,153, 50, 37, 74,175,
+215,247,175,231, 28,172,118,113,113,249, 96,226,196,137,205,167, 79,159,142,228,228,100,235,163, 71,143,118,185,114,229, 10,241,
+240,240, 64,110,110, 46, 28, 28, 28,176,118,237, 90, 76,155, 54,237, 7, 0,217,215,174, 93,123, 47, 41, 41,233, 75, 74,233,119,
+166,158,219,255,101, 80,202,163, 52, 63, 22,188,206, 14,173, 3,155,161,117, 64, 35,156, 56,123, 11, 0,208,115, 72, 16, 74, 75,
+138,241,227,143, 91,241,240,225, 3,136,196, 98,216,218,187,212,203, 41, 8, 2,244, 69, 9, 40, 48,100,162, 87,247,118,232, 23,
+210, 13, 63,236,216, 11,206,104,192,248,177,163,144, 95, 80,128, 29, 59,182,227,209,227, 36,136,196, 98, 56, 56,254,249, 6,166,
+117,105,145,191, 35, 76,202, 2, 53, 26,203, 18,218,211,211,211,113,243,230, 77, 60,121,242, 4, 22, 22, 22,208,112,188,240,221,
+233, 75, 2, 33,146, 52,129,210,203,148,171,116, 21,126,145,131,231,211,171, 56,204,218,216,217,217, 73,117, 58, 13, 56,206, 88,
+229, 74, 69, 0, 2, 72, 68,128,171,155, 15, 82, 83, 82,169, 70,171,141,170,107,108, 18,157,118,237,225, 67,251, 39,117,238, 18,
+228,216,175,231, 23, 56,244,211, 66,228, 23, 21, 65,107, 16,163, 68,107, 64,169, 22,176,181,247, 67,251,192, 86,200,200,200, 69,
+244,141,243,106,145,174,212,148, 4,208, 7,223,206, 31,235, 59,246,227,153, 48,247,234, 2, 93,252, 33, 8,234,236,202, 8,150,
+153,220, 14,246,158,254, 40, 40,209, 97,255,153, 91, 0, 96,114, 75,150,236,236,236, 82, 87, 87,215, 3, 31,125,244,209,242, 59,
+119,110,251, 0,192,245,235,215, 31,103,100,100,204,201,206,206, 54,185,130, 14,120,206,189,157,152,155,155, 95,243,245,245,125,
+210,175, 95, 63,235, 65,131, 6,193,201,201, 9,183,110,221,194,215, 95,127,253, 64,175,215,127, 22, 21, 21, 85,231,148,142, 94,
+175, 79,191,245,211, 79,214,221,254,245, 47,219,153,111,189,181, 98,210,164, 73,107, 23, 47, 94, 44,246,245,245, 37, 70,131, 1,
+ 49, 49, 49,116,215,206,157,198, 77,115,231,174,145, 90, 90,138,174, 31, 62, 44,230,116,186,250, 60,150,254,116, 40,149,202,174,
+111,246,237,234,191,114,245,122,104, 53,106, 92,187,242, 11,242,243,115,176,101,107,132,191, 82,169,236,154,150,150,118,222, 20,
+ 30,158,231,247,126,255,253,247, 51, 58,182,105,211,166,177,135, 7, 98,146,159, 64, 42,240,144,112, 28, 88,131, 14, 12,167,133,
+ 71, 0, 5, 97,172,144,153, 85,132,175,246, 28,136,229,121,126,111,125,188,205,223,124, 27,139,211, 10, 65, 8,193,170,215, 3,
+ 32,181,146, 67, 98, 41,199, 71, 63,159,173, 20, 85,145,139,231, 66, 42,151,163, 73,199,250, 13,220, 41,165,165, 86, 86, 86, 55,
+ 99, 98, 98,218, 7, 4, 4, 96,198,140, 25,120,250,244, 41, 4, 65, 64,118,118,182, 54, 51, 51, 51, 61, 39, 39,231, 41,128, 67,
+ 0,182,153,154,228,203,113,156,243,173, 91,183, 0, 64, 2, 0,103,206,156,129,155,155, 27,108,108,108, 80, 84, 84,132,153, 51,
+103,202, 62,251,236, 51, 0,192,205,155, 55,197, 21, 9,198, 53, 33,230, 86,252,202,130, 98,154, 79,213,183, 7,231,113,183, 3,
+123,132,164,162,247,128, 49, 56, 21,249, 3,206,158, 56, 13,123,209,211, 39,176, 44, 62,166,122,162, 42, 74, 43,241,221,236,223,
+118, 60,155, 89,114, 98,243,228,129,118,172,171,171,176,127,206,166,194,130,122,206, 1, 88,150,173,204,193,170, 72,104,111,168,
+184,170,138, 69,139,168, 64, 64,136,163, 84, 18,157,154,154,218, 91,169, 84, 34, 59, 59, 27,169,169,169, 72, 73, 73, 65,106,106,
+ 42,154, 54,109,138, 71,143, 30, 65, 34,145,212,251, 48, 89,142, 81,195,135, 15,183,210,235,245,216,189,123, 55, 7, 96,192,254,
+253,251,111,182,111,223, 94,212,183,111, 95,171,141, 27, 55,142, 2,176,173, 1,195,180,180,182,182,150, 24, 12, 6,108,220,184,
+ 17,169,169,169, 93, 41,165,241,132,144,205,195,135, 15,223, 20, 16, 16,208, 52, 54, 54,246,129, 90,173,254,136, 82, 26, 93, 31,
+ 89,118,118,246,216,118,237,218,237, 23, 4,193,171, 87,175, 94,150,171, 87,175,182,190,127,255, 62,148, 74, 37, 4, 65,136,161,
+ 13,107, 53,149,119,250,244,233,252,206,157, 59,219,149, 39,180,127, 69, 8,249,146,101,217,229,161,161,161, 54,187,118,237,194,
+209,163, 71,161,215,235,145,144,144,144, 19, 27, 27,251, 45,128,149,117, 21, 96, 0, 0,165,244, 49,128,217,132,144, 86,155, 55,
+111, 14,115,119,119, 31,117,229,202, 21,114,241,226, 69,172, 90,181,138, 91,184,112,161, 40, 56, 56, 24, 51,102,204,120, 12, 96,
+124,249,247,125, 94, 3,198,253,191, 14,163,193,160,135,181,189, 15,212, 5, 41,200, 73,189, 2, 11, 43, 23,132,244,120, 13,165,
+ 26, 61,142, 28, 62,136,232,152,187, 96, 24, 6, 10, 23, 15,216,218, 57, 34, 49,241, 1, 0,212, 85, 61,108, 52, 24, 12,176,178,
+107, 4,117, 97, 42,244,207,110,193, 92,238,140, 49,255, 26,140, 82,141, 1, 17,135, 14, 34, 54, 54, 26, 44,203,194,197,213, 3,
+ 54,182,101,156,132,214,201,249, 10,213, 80,175,192, 98, 89,246,220,241,227,199,135,118,236,216, 81,244,240,225, 67, 60,124, 88,
+246, 48,147,159,159,207, 17,240, 7,178,163,127, 26, 89,219,103, 9, 33,189, 42,188, 50,170,246, 22,148, 91, 89,165,223, 79,136,
+ 87,228,231,101,227,238,237, 75,120,152, 24,131, 39,143,226, 97, 48,104,193, 50, 12, 24,150, 65, 35,159,150,184,116,249,138, 94,
+207,243, 87,107,227, 4,128,188,188,164, 98,185,194,111,196,146,197,243, 34,167,205,252,220,124,216,208,239, 16,125, 63, 14,106,
+206, 5,148, 2, 46, 14,150,104,221,120, 22,210, 51,114,176,231,135,141,165,130,193, 48,186,170, 7, 86, 77,156, 0,160, 80,161,
+197,166,173, 63,140,219, 22,190,235,243,153,159, 76, 80, 12, 12, 29, 13,105, 94, 28,140, 25,183,224,211,190, 31,136,204, 22, 71,
+ 79,158,197,249,155,113,217, 2, 79, 63, 87,228,226,223,245,113, 86, 69, 97, 97,225,141,236,236, 44,159, 42,174,237, 62, 50,153,
+ 89,157, 73,179,213, 57, 73, 53,135,120,150,101, 58, 46, 94,188,184,196,213,213, 85, 31, 27, 27,139,205,155, 55, 11, 55,111,222,
+ 60, 39,149, 74,183,100,100,100,212,120, 17,171,202,233,100, 52,222,221, 53,103, 78,139, 14,161,161,116,228, 39,159,148, 66, 38,
+155,188, 98,213,170, 57, 57,249,249,110, 84, 16,224,100,111,159,182, 98,238,220,101, 67,135, 15,207,191,119,233,146,249,149,159,
+126, 50,151,114,220,173,250,198,249, 71,160, 46,206,180,180,180,243,190, 77, 60,241,227,182,213, 48, 24,116,200, 76, 79, 6, 0,
+168,114, 11, 81,151,184,170,206, 89, 62,249, 31,186,224,179,207,126, 93, 48,109,170,203, 27, 61,123, 33,229,238, 29, 24,242,114,
+ 64,140, 28,196, 68,132,146,103, 22,120,150,173,198,236,255,236,123,166, 46, 45, 13,165,213,226,240,181,141,179, 34, 66, 37,179,
+182,130,196, 82, 14,169,220,234,185,168,149,153,181, 53,164,150,114,136,164,210,154,146,225, 95,224, 84,171,213, 67,134, 14, 29,
+ 26,125,253,250,117,187,241,227,199,163,115,231,206,183, 53, 26, 77,119, 74,169, 73,237,160,106,226, 20,137, 68,207,218,182,109,
+235, 44, 22,139,185,113,227,198,137, 84, 42, 85,165, 19,186, 90,173,198,177, 99,199, 80, 81,114,127,239,222, 61,180,108,217,178,
+ 86,206,241,179, 98,210, 1, 44,158, 62, 76,185,226,215,187,153,147, 1, 44,247,105,234,129,179, 39, 78,227,226,217, 43,115, 58,
+ 5, 8,235,223, 28,221,254, 75,139,238,195,103,250,183, 29,207,202,173, 93,177, 35,226, 32, 27,127,107,251, 87,165,165, 49, 77,
+ 0,124, 90,219, 56, 9, 33,160,148,190, 96,201,160,209,104, 76, 18, 87,117,125,151, 40, 40,149, 20,144,121,195,134, 13,235,120,
+237,218, 53, 43,185, 92, 14,131,193, 0, 74, 41,154, 52,105, 2,145, 72,132,111,191,253,182, 68,165, 82, 45, 52,133,211,210,210,
+114, 82, 72, 72, 8, 18, 18, 18,112,227,198,141,131,148,210,104, 66,200,193,135, 15, 31,142, 8, 14, 14,198, 15, 63,252, 48, 9,
+181, 8,172,218, 56, 5, 65,168,234,121,148, 7, 0,148,210,187, 0, 58, 53,244,216,105,153, 89,104, 23, 0,112,112,112, 72, 85,
+ 40, 20,214,119,239,222,133,167,167, 39, 12, 6, 67,199,250,248,170,114, 82, 74,141,132,144, 13, 81, 81, 81,159,117,233,210, 5,
+147, 38, 77,234, 26, 21, 21,213,181, 75,151, 46,240,247,247,199,217,179,103,177,115,231,206, 3, 60,207,127, 4,160,128, 82, 90,
+107,127,217,154,142,189, 92, 48, 70, 7, 6, 6,142,242,240,240,192,170, 85,171, 12,209,209,209, 83,150, 44, 89,178,230,206,157,
+ 59,178,150, 45, 91, 50,209,209,209,181, 62, 76,252,213,215,165, 63,138,147, 18, 50,127,252,251,147, 55,191, 63,126,148, 89,187,
+182,173, 81, 90,148, 6,141, 58, 27,165,197, 89,248,118,219, 73, 16,194,192,201,201, 21,206, 46, 74, 36, 39,167,224,242, 47, 71,
+245, 37,165,154,181, 82,163,176,188,110,206, 79,202, 56,219,148,113,150,150, 60,131, 70,253,172,146,211,217,217,173,156, 51, 25,
+151,174, 28,213,106, 74, 74, 86,235, 41,249,230,207, 60,246,127, 26,234, 21, 88,249,249,249, 83, 38, 76,152,208,125,246,236,217,
+ 14, 28,199,177,246,246,246, 72, 78, 78,230, 14, 28, 56,144,167, 86,171,167,188,212, 78,197,226,104, 95,191,102,221, 7, 14, 28,
+200,189,253,246, 91,146,119,198,246, 21, 57, 57, 59,163,176, 32, 23,137, 9,119,112, 63,238, 22,124,155,189,134, 69,139,215, 0,
+182,182,245, 86,234,168,179, 19,207,201, 21,126, 3,190, 88,240,233,222, 46, 93,251, 88, 55,107,249,154,164,117, 19, 27, 24,140,
+ 28,210,210,210,112,248,167,187,134,216,155, 23,139, 4, 78, 63,162, 36,199,180, 86, 57, 81,101, 9,188, 91, 2, 21,100,231,210,
+ 21,223,206,216,184,229,199,153,179, 39,143,183, 12, 14,234,141,152,211, 63,224, 96,228,222, 18,173, 78,191, 66,194, 98, 85,140,
+138, 54, 40,234, 4, 0, 90,173,214, 88, 61,117, 68,171,213,154,220,244,180, 54,252,248,227,143,200,202,202, 50,164,166,166,158,
+230, 56,238, 80, 67,170, 17,215, 83,170, 15, 37,228,244,130,160,160,190, 11, 78,156, 48,123,111,214, 44,253,232,119,222,249, 20,
+ 58,157, 1, 82, 41, 21, 89, 90, 50,144,201,196,247, 46, 93, 50, 95,247,225,135,246, 68,175, 63,245, 67, 61, 79,159,213,240,135,
+ 87, 17, 2,149, 17, 44,188, 55,126, 26, 52, 85, 34, 88, 87,111, 36,162, 33, 17, 44, 0,160,148,166, 16, 66, 58, 77,158,191, 32,
+ 98, 68, 72, 79,255, 0,175, 70, 50, 39,239, 70,144,187,184, 32, 55, 39, 7,151,110,220, 55, 46,222, 27, 17, 91, 46,174, 76,242,
+133, 17, 4,161,178,202,173,231,148,217, 32, 44, 11,148, 11,129,138, 74, 32,239,246,157, 65, 68, 34,240, 84,128, 78,167,171, 55,
+ 9,139, 82,154, 70, 8, 25, 50,122,244,232, 51,145,145,145, 76, 72, 72, 72,235, 67,135, 14,253,174,114,116,163,209,168, 4, 0,
+145, 72, 84,100, 97, 97, 33, 26, 51,102, 12,140, 70, 35, 74, 75, 75, 81, 88, 88,136,248,248,120,221,176, 97,195,100, 0, 96,105,
+105,105, 28, 49, 98, 68,189,215,143,213,251,211,180,211,135, 41,215,219,139,158,134, 21,169,162,189,237, 69, 79,159,116, 10, 16,
+214,175,222,159,166,253, 98,154,237, 18,213,211,243,137,153, 37, 39, 54,239,136, 56,200,190, 59,120, 8,175,148, 63,152, 99,230,
+ 76, 15,244,120,171,110, 94, 66,200, 11,166,162,191,195, 1,255, 57, 24, 12,244,182,131,131,221,178, 14, 29, 58,204, 91,189,122,
+181,220,201,201, 9, 28,199,225,241,227,199,216,176, 97, 67, 73,126,126,254, 87,148,210,155,166,112,249,249,249,121,139, 68, 34,
+236,217,179, 7, 0, 54,148, 47,222,112,232,208,161, 17,227,199,143, 71,163, 70,141, 90, 16, 66,100,245, 69,113,170,130, 82, 90,
+ 57,171,240, 71,130, 16,242,104,221,186,117,238, 46, 46, 46,228,216,177, 99, 28,203,178,181, 90, 49,212,129,101, 59,119,238,124,
+ 93, 16,132,158,193,193,193,104,218,180, 41, 0,224,230,205,155,248,233,167,159,246,242, 60, 63,186, 46, 97,101, 10,226,227,227,
+ 47,166,166,166,134,205,152, 49, 67,178,122,245,234, 53,211,167, 79,151,165,166,166, 34, 46, 46,174, 70, 23,252,191, 59, 18, 30,
+228,134, 7, 54, 86,156, 88,188,100,245,103, 77, 26,123, 79, 28, 55,102, 56,235,231,219, 18, 37,133,105,112,112, 84, 64,233,225,
+131,156,103, 42, 28, 63,126,140, 87,169, 10,190,231, 25,242,197,131, 7,185, 47, 58, 99, 55,128,211, 93,233,131,103,207,158,225,
+232,209,163,124, 65,126,209, 86, 24,153,197,113, 79,243,235,237,172,241, 10,207,131,152,146, 80, 91, 94, 73,184,174,204,166,161,
+ 44,170,149,159,159, 63,133, 82,250,162,125,251,243,159,171, 84,184,164,186,249,217,176, 97, 18,252,242, 75, 43, 24,141,157,108,
+173,172,122, 82, 65,104,255,218,107,175,201,135, 15, 31, 46, 4, 5,117,150, 90, 91, 91,147, 22, 45, 2,138, 11, 11, 10,236, 0,
+128, 2,124,117,206,234,168,104,246, 44, 98,197,189,120,222, 16, 88, 54,214,250,155, 61,155,162,196, 27, 43,136,147, 72,192, 34,
+134,144, 49, 2,165, 63,112, 12,190,120,148, 77,107, 21, 47,166,112, 86,153,222,171,104, 13, 83,103, 99,231, 90,158,230, 43,167,
+ 8, 25,134,221,225,238,238, 62, 47, 37, 37, 37,199,212,139, 88, 77,156, 21,173,114, 6, 76,157,106,108,219,167, 15,103,239,225,
+ 33, 80, 74,249, 39,183,110,145,171,135, 15,139,175, 30, 62,108,102,212,233,206,237,167,244,145, 41,156,110,110,110,203,142, 28,
+ 57, 98,114,110,213, 91,111,189, 21, 87,145,151, 85,215, 56,171,162, 73, 99,229,137,198,222,238,125, 26,123,151, 77, 67, 63,122,
+146,129, 71, 79,210, 79, 38, 61, 74, 11,169,237, 51,117,113, 18,242, 91,179,103, 82,110,197, 64, 77,104,246, 92,157,211,209,209,
+241,166, 72, 36,170,181,145,112, 77,224,121, 62, 35, 39, 39,167,178,237, 84, 61,227, 28,233,237,237,189, 60, 57, 57, 57,130,231,
+249,105,166,238,163, 30,206,206, 44,203, 30,229,121,254,185, 57, 64,145, 72,244,172, 66,132, 17, 66,188,100, 50,217,115, 73,238,
+117,113,174, 88, 16,240,217,235,193,193,131,175, 94,188,120,104,230,146,216,231,242,130, 38, 15,182, 31, 59,242,227, 41,223,236,
+222,184,110,214,250, 67,121,223,215, 55, 78,133, 66, 17, 5,192,183,124,125,157,199, 89,126, 46,159, 43, 43, 55,245,201,155, 72,
+ 72,123, 71, 27,199, 47, 13, 6,195,107, 0,168, 68, 34,185,171, 82,169, 22,214, 36,174,106,227,100, 89,118,121,243,230,205,167,
+220,191,127,127, 55,199,113,227,170,108,191,178, 73,147, 38, 31, 63,125,250,116,131,209,104,156, 89,227,254,107,254,127,183, 14,
+ 14, 14,254, 63,246,206, 59, 60,138,170,109,227,247,153,221,157, 45,217, 84, 66,218,210, 91,128, 4, 72, 32,161,132,150, 4, 65,
+ 81, 64,169, 74,143,162, 32, 77,144, 38,132, 23, 41, 10,137,160, 52, 17, 1, 1, 1, 5, 4, 4, 20,164, 23, 3,210,139, 36, 16,
+ 66, 11,144, 66, 66, 8,233,101,251,206,249,254, 72,118,217, 36,187,155, 77,136,239,231,171,243,187,174,185,118,103,230,204, 61,
+103,102,118,103,158,121,206,115,158,147,179,106,213, 42,230,227,143, 63, 70, 76, 76, 76, 45, 74,169,221,227,140, 86,114,221,189,
+221,220,220, 54, 25, 12, 6, 63, 74,233,129,130,130,130, 57,148, 82,203,221,203,108,104, 18, 66, 88, 0,211,154, 52,105, 50,165,
+110,221,186, 94,169,169,169, 41,137,137,137, 75, 1,216,157,147,170,146,122, 6, 13, 28, 56,240,194,242,229,203, 69,245,234,213,
+ 67, 74, 74, 10,166, 77,155,166,219,187,119,111, 8,165,180,130, 71,221, 30,205,234,242,223,214,244,111,226,209,132, 10, 12,139,
+ 3, 91,251, 13, 30, 53, 98, 0,185,112,229, 30, 46, 94, 56,143,212,180,180,125, 28,195, 68,222,189,251,220, 98,147,110, 85, 52,
+207, 95,185,139,139,231,207,211,244,180,244,221,160,130,255,196, 39,102,218,117,159,231,169,136, 93, 6, 86,181,197,109, 25, 88,
+150, 80, 40, 20,200,180,134, 88,153, 0, 0, 32, 0, 73, 68, 65, 84,202,234, 40, 21, 10,187, 74, 36,146,112,134, 97,206,100, 63,
+127, 62, 25,176,207,192,170,137,122, 86, 70,211,166, 68,108,109,232,128,234,104,150, 15, 80,175,142,102, 85, 52,236,213,180, 54,
+216, 51,167, 86,167,185,235,245, 87, 87, 83,235,231,160,188,102,221,186,117, 63,224, 56,174,145,189,117, 98, 24,230, 81,106,106,
+106,153,102, 19,123,207,103,243,230,205,233,189,123,247,236, 10,146,252,255,254, 45,253,155, 52,183,173, 8, 80,180,104,211,114,
+102,220,181,219, 95,150, 54, 31,154, 88,248, 81, 45,167,174, 61,194,230,253,113,234,247,207,230,175,206, 46,243, 18,244, 79, 56,
+118, 66, 8, 99,201,176, 32,164,164, 47,122, 85, 53, 89,150, 93,215,161, 67,135, 15, 46, 94,188,184, 73,175,215,143,173,169,122,
+ 86, 23, 27,247, 37, 2, 64, 92, 21,239, 92,101,154,102,235,131, 4, 2,193, 52,127,127,255,142,241,241,241,151, 12, 6,195,114,
+ 91,198,149, 61,154,213,225,255, 75,211,223,215, 61,152, 82, 83,178,236,197,183,239,103, 93,182, 85,190, 74,154,148, 51,112, 84,
+240,249,157,196,231, 54, 71, 44,224, 13,172,202,169,214, 96,207,213,193,104, 32,217, 36, 45, 45, 5, 64, 10,128,221,127,121,133,
+170,137, 61,198, 85, 85,168,142, 81,244, 87,104,148,167,212,128,178, 43,173, 67,101,148, 55,150,254, 74,238,222,189,251,143,232,
+125,242, 79, 99,212,199,177,105, 0,166, 6, 91, 72, 77, 85,106, 84,205, 12,127,243,191, 93,171,255, 14,214,188, 54,182,140, 43,
+ 91,104,181,218, 15, 9, 33,211,104, 21,122, 31,254,127, 80,122,124, 85, 54,174,236,212,190, 6,192,106,252,239, 63,157,248,123,
+ 89, 87, 1, 84,210,144,254,255,175,249,111,167,102,130, 22,120,120,120,120,120,254,107,252,221,141, 43, 30, 30,158,146, 92, 46,
+ 61, 45,173,168,138,235,143, 16, 98, 81,195, 22,118,196, 39,241,154,188, 38,175,201,107,242,154,188, 38,175,249, 15,211,252,215,
+ 96,236,197,244, 87, 76, 0,122,242,154,188, 38,175,201,107,242,154,188, 38,175,201,107,254,219, 38,190,137,144,231, 47,231,235,
+129,164,206,215, 3, 73,157,191,170, 60, 15, 15, 15, 15, 15,207,223,141,255, 90,144,187, 53, 8, 33, 10,148, 36,200,107, 10,224,
+ 14,128,179,180, 10,221,142, 45,232,213, 6,240, 54, 33,100, 8, 0, 80, 74,119, 3,216, 69, 43, 73, 41, 97, 68, 38,147,101,168,
+ 84, 42, 79, 0,144, 74,165,207, 84, 42,149,249,152, 3,196,108, 2, 0,106,156,104,169, 73,111,137,198,141, 27,103,168,213,106,
+ 79, 59,118,159, 71, 41,141,101, 24, 38,206,209,209,241,212,157, 59,119, 42, 29,134,197,156, 30, 61,122, 68, 8, 4,130,197, 0,
+ 96, 48, 24,230,158, 58,117,106, 75, 85,182,175, 10,132,144,142,245, 20,222,223,107,117, 90,125, 70,102,246, 60, 74,233, 47,150,
+202,173,237, 71,162,132, 4, 51, 75,191, 47,155,112,192,118, 42,138,170,150,183, 81,191, 96,145, 72, 52,201,203,203,235,245,212,
+212,212,171, 0,102, 81, 74, 43,205, 66, 92,191,126,253, 81, 66,161,112,132,193, 96,104, 34, 16, 8, 18,245,122,253,143,201,201,
+201,219,170, 83, 7, 30, 30, 30, 30,158,127, 47, 85, 50,176, 90,214, 38,222, 20, 24, 10,130, 94,160, 56, 78,128,157, 9,207,233,
+ 83,123,183,239,211,146,232,116,250,146,125,178, 12, 12,135, 31, 48, 27,250,244,233, 83,119,242,228,201,232,220,185, 51, 46, 94,
+188, 24,178,121,243,230,247, 4, 2, 65, 44,199,113,167, 1, 92,164, 54,210, 1, 24, 33,132,200, 1,188, 5, 96,248,235,175,191,
+222,115,241,226,197,130, 86,173, 90, 65,169, 84,226,247,223,127,239,186,108,217,178,149,132,144, 19, 0,182, 3,248,133,218,200,
+237,162, 82,169, 60,141,182, 18, 33,196,115,208,160, 65, 87,204,114,237, 16, 66, 8, 24,134, 1,165,244, 2,128, 11, 28,199, 93,
+216,189,123,119, 74, 75, 66, 58,142,107,196,238,153,242, 80, 83, 33,231,145, 90,173,246,220,191,116, 9,132, 18, 9,212, 5,249,
+ 8,121,247, 69,207,234,227,159,206, 4,225,244, 16,128,230,132,127,190, 50, 22, 64, 92, 90, 90, 90,108,104,104,232, 35, 59, 79,
+171, 9,129, 64,176,248,200,145, 35, 62,148, 82,188,246,218,107,139, 1,108,169,170,134, 61, 16, 66, 36,157,130, 3, 79, 31,248,
+121,135,180, 48, 59, 3,189,223,122,231, 71, 66, 72, 4,165,244,103,243,114,107,223, 32, 94, 68,136,153,227,151,108, 23, 0,192,
+218,200,225,179, 86,190, 70, 86, 79, 61, 74,159, 18, 66,194, 1,211,208, 74, 75, 41,165,167,215,190, 65,188, 32,192, 39,227,151,
+108, 39, 0,240,109,228,240,153,107,223, 32,171, 38, 28,170, 90, 47, 73, 66,200,132,136,136,136,213,139, 23, 47, 22,248,248,248,
+224,201,147, 39,189,253,253,253,155, 19, 66,252,169,141,224,224, 70,141, 26,253, 20,254,106,255, 38, 3,135, 12,149,213,118,119,
+195,147,244, 76,151, 93, 59, 54,143,107,212,168,209,235,143, 30, 61,122,167,106,103,137,135,135,135,135,231,223, 76,165, 6, 86,
+144,130,200,138,180,232, 47, 20,144, 81,221, 58,182,122,101,216, 27,221, 24,127,191,102,136,191,117,251,213, 95, 78, 93, 90,230,
+239,197,156,212, 27,232, 54, 57,139,253,215,210,108,247,108,209,233, 33, 60,182,127, 59, 0, 96,194,123,195, 5,151, 47, 95,110,
+ 22, 20, 20,100, 26, 65,253,149, 87, 94,193, 43,175,188, 66,214,174, 93, 27,120,236,216,177,192,141, 27, 55,106, 9, 33,223, 83,
+ 74,127,179,166, 73, 8,153,212,180,105,211,101,171, 87,175,150,132,134,134, 66, 34,145,152,214, 57, 58, 58,162, 95,191,126,232,
+215,175,159, 32, 45, 45,237,181, 3, 7, 14,188,182,116,233, 82, 13, 33,100, 6,165,116,141, 53, 77,115, 62,253,244,211, 32, 11,
+139,143, 16, 66, 30,232,245,250,235, 1, 1, 1, 41, 45, 8,105,246,225, 27,157,143, 79,232,226, 43,183,166, 35, 20,139,177, 53,
+162,228, 25,109,110, 96, 61, 58,117, 24,142,206, 78, 89, 14, 78, 78,177, 0,226, 0,196, 82, 74,227, 30, 60,120,112,219,143,144,
+192, 78,110,204,247, 27,179, 13, 1,246,212, 21, 0, 4, 2, 1, 82, 82, 82,224,226,226, 34, 11, 11, 11, 75, 39,132, 44, 56,125,
+250,244, 6,123,183,183,147,142, 11,102, 78, 96,115, 30,199,226,105,194, 5, 76, 27,210,213, 97,234,215,191,126, 6,224,103, 91,
+ 27, 17,194, 48, 75,207,115,179,167, 2, 83, 0,204,203,202,202, 10, 5, 0,119,119,119, 49,128,211, 43, 46,225,141,143,187, 84,
+146, 57,210,166, 62, 97, 5, 2,193, 55, 91,183,110,125,127,212,168, 81, 37, 67, 60,252,241, 7, 28, 29, 29,177,104,209,162,134,
+211,167, 79,143, 66,201,190, 43, 80,191,126,253, 81, 97,189,250, 55, 94,185,236, 51,191,130,236, 60,245,250,111,118, 93,169,211,
+186,133,224,195, 73,211,157,214,232, 52,222,245,235,215, 31,197,123,178,120,120,120,120,120,236,197,166,129,213,194,131,108,233,
+214,206,247,237, 97,125,186, 74,218,180,110, 5, 86,242, 34,177,115, 80,112, 48,130,130,131,153,217,133, 5,189, 46, 95,185,214,
+107,207,177,139,234, 22, 30,100,215,157, 76, 26, 97,239,206,141,131,197, 46,126,203,171, 71, 81,238, 51, 41, 0,200, 93, 61, 85,
+145,251,159,158,234,210,165, 11,234,214,173,203,158, 60,121,114, 12, 0,171, 6, 22,128,200, 59,119,238, 72, 4, 2,219,121, 76,
+ 21, 10, 5, 6, 15, 30,140, 22, 45, 90,136,195,194,194, 34,241, 98,216,138, 50, 72,165,210,103,132, 16, 79, 0,168, 85,171,150,
+ 97,193,130, 5, 55,104, 41, 0,192,113,220, 5,129, 64,112,129,227,184, 75,191,252,242, 75,106, 43, 66, 60,251, 6,181, 56, 59,
+ 97,228, 96, 7,186,103,165, 85,227, 64,149,159,111,113,185,131,163, 60, 83, 38,151,199, 74, 28,164,113, 0, 98, 1,196,213,169,
+ 83,231,118, 43, 66,234,118,106,209,232,216,218,143,135, 59,217, 60,176, 82,130,130,130,154,135,135,135, 75, 13, 6, 3,138,138,
+138,240,237,183,223,186,200,100, 50,151,215, 95,127,125, 62, 0,147,129,229, 79, 72,155, 65, 10,193,216, 5, 79,244, 19,237,209,
+ 53,135, 16,226,218, 45, 36,248,241,215,209,243,157,131, 59,117,195,189,211, 63, 32, 59,187, 0,121,185,133,224, 56,174,194,200,
+191, 19, 14,209,140,181,253,200,178,181,115,134,127, 66, 24,134, 4, 14,152,133, 55,189,243, 62, 34,132,220, 2, 32, 18,139,197,
+198,162, 66, 66,136,162,117,235,214,203,154,189,218, 13,223,206, 29, 9,202,113, 20,192, 50,123,189, 87,132, 16, 79, 39, 39,167,
+ 95,142, 29, 59,214,177,125,251,246,184,120,241, 34, 30, 62,124,136, 9, 19, 38,104, 38, 78,156,200,142, 30, 61,154, 76,155, 54,
+109, 50, 33,100, 15,165,244, 92,249,237,133, 66,225,136,183, 6,190, 35, 46,204,205, 87,105, 53, 90,141,187,187, 11, 85, 21,169,
+ 10,178,114,242,149,111, 15,125, 95, 27,119,237,226, 8, 0, 21, 12,172,151, 57,159, 60, 60, 60, 60, 60,118,211, 30,128, 7,128,
+ 76, 0, 87,202,205,163,244, 59, 44,204, 63, 71, 73, 88,143,187,153,214,115,148,132,247,120,160, 36, 71,231,101, 0,213, 14, 77,
+178, 6,161,148,162, 52,161,176, 49,177,176,201, 72,104,225, 65,232,157, 76, 10,125,118, 34, 12, 89, 15, 96, 40,168, 56,188, 17,
+145,186, 34, 79,105, 64, 74,226,109, 68, 76, 93,132, 59,153,214, 51,104,247,105, 73,116, 46, 98, 8,157, 88,128,117,112, 85, 15,
+139, 62,122, 62, 56, 56, 88, 21, 25,202,244,137, 90, 91,226,217,154, 54,118, 56, 66, 62,222,115, 52, 49, 49, 81,175, 80, 40, 48,
+106,212, 40, 80, 74,251, 90, 61, 0, 66, 50, 10,174,156,247, 76,232,219, 25, 29, 50, 44,135, 65,221,189,123, 23,103,206,156, 65,
+114,114, 50,154, 52,105,130, 49, 99,198, 60,163,148,122, 89,211,236,221,187,119,204,210,165, 75,187,127,245,213, 87,177, 91,183,
+110,237, 66,169,229,177, 6,253, 9,145, 7, 54,244,190,178, 49,234,147, 38,228,240,247,162,226,228,251,112,141, 81, 86, 56,126,
+133, 66, 65,211,210, 94,156,187, 47,154,251, 64,238,226, 4,185,179, 99,198,232, 99, 87, 77,158,171,210,207, 59, 65,132, 56,215,
+245,113,191,186,115,197,188, 58,204,169,159,164,236,250, 11, 54,189, 58, 65, 65, 65,205,195,194,194,206, 47, 94,188,216, 45, 45,
+ 45, 13, 39, 78,156, 64,195,134, 13, 81, 92, 92,140,229,203,151,167,159, 61,123, 86, 81, 90, 95,175, 14, 45, 26,196,126, 59,253,
+ 93, 23,118,204,167, 18, 91,154,150, 96,133,194, 53,231,143,252, 52,209, 69, 66,145,155,246, 16, 15,110,223,194,229,248, 71,186,
+109,199, 99, 13,249, 74,117, 31, 74,233, 41, 75,219, 77,234, 74,154,157, 78,243, 56,112,228,247, 43,190, 62, 62, 62, 24, 55,110,
+ 28,158, 62,125, 10, 74, 41, 56,142, 51,245,184,136,140,140, 68,243,230,205, 17, 49,244,205, 98, 73,246,181,176, 3,241,246,141,
+247, 70, 8,105,221,160, 65,131, 99,167, 79,159,246,170, 83,167, 14,206,158, 61,139,167, 79,159,194,219,219, 27, 39, 79,158, 68,
+116,116,244,214,241,227,199, 15, 89,188,120,177,116,216,176, 97, 79,142, 30, 61, 90,175,124,204, 92,195,134, 13,111, 31, 56,122,
+214,241,228,190,163,137,110, 78,114, 56,122,213,130,192,201, 77, 9, 10,165,151,135, 11,251, 78,255,158, 77, 31, 63,126,236,103,
+190,205,203,158, 79, 30, 30, 30, 30,158, 23, 88,179, 69, 74,233, 67, 8, 57, 88,106, 15,104, 0,136,205,230, 65, 8, 57, 8, 0,
+229,231,103,207,158, 29, 25, 21, 21,117,203, 56,111, 44, 51,103,206,156, 86,209,209,209, 75, 66, 66, 66,118,158, 63,127,126, 1,
+128,251, 53,125, 60,118,197, 96,233, 83, 47,131,245,125, 29, 34,131, 14,186,231,119,192,229, 38, 1,114,111, 40,137, 35,178,210,
+147,144,112,246,231, 18, 91,176, 18,126, 75,160, 34, 66,200,201,219,183,111, 35, 33, 33, 1, 41, 41, 41,112,112,112,168, 80,238,
+143, 63,254,128, 76, 38,131,143,143,143, 93, 7, 65, 53,101,147, 5,199, 6, 53,128, 99, 72, 40,158, 15,251, 16, 39, 79,158,196,
+179,103,207,192,178, 44,196, 98, 49,244,122,125,165,122, 12,195, 16,192,148,137,216, 98, 22,230, 48, 66,132,117,107, 57, 30, 88,
+ 59,127, 74, 35,230,194, 65,145, 50,249, 62,210, 84, 6,184,218, 81, 95,153,163, 28, 14,114,135,116,153,204,161,188,113,117, 47,
+136, 16,145,220, 81,122,224,251,207,167,121, 11,174,159,148, 42,239,199,130,181,160,209,171, 87,175,113, 0,230, 83, 74,115,195,
+194,194,188, 22, 47, 94,236,246,228,201, 19,196,199,199, 99,215,174, 93,153,250,146, 3, 37,148,210,133, 0, 16, 66,136,180,190,
+135,235,209, 53,159, 78,113,194,233,159,196, 24,243,169, 29, 53, 45,139,139, 95,191,223, 6,141, 30, 63,113,245,148,126, 40, 42,
+ 80, 98,251,241,235, 56,114,237,193,155, 0,254,176, 21,215,182,230, 15,122,159, 16,242,202,192,129, 3,255, 60,115,230, 76,237,
+141, 27, 55, 66,175,215, 91,156, 54,110,220,136, 19,103,175,125, 68,237, 28, 76,151, 16,162,104,212,168,209,137, 75,151, 46,121,
+ 56, 56, 56,224,248,241,227,200,205,205, 53,121,174, 34, 34, 34, 72,110,110,238,208,111,191,253,118,208,227,199,143,191, 60,123,
+246,108, 22, 74,134,109, 42,243, 67, 16, 8, 4, 15,244,122,109, 75,133,159,175, 96, 72,191,110,221, 10,179, 98,225,232, 30,128,
+139,127, 62, 56,152,151,155,173, 20, 8, 4, 15,204,203,215,196,249,228,225,225,225,225,169, 26, 70,163,202,220, 96, 42,111,104,
+ 25,191, 27,203, 69, 69, 69,153,230,141,219, 68, 71, 71, 47, 49,155,183,232, 68,121, 89,140, 6, 86, 24, 33,132, 2, 8,179, 84,
+ 72, 29,191, 23,234,132, 95,192, 54,232, 2,113,139, 55, 33,104,208, 21,201,177,167,113,227,240, 10,164,222,250, 3,148, 51,192,
+167,121, 7,123,247,169,106,217,178, 37, 84,170,146,208, 43,181, 90, 13, 86,238,166,154, 54,118,184, 20, 0, 56,161,212,100, 45,
+217,232,152, 87, 6,167, 46,225,232,144, 65,113,217,171,196,224, 53,122,178, 62,127,247, 93,176, 44, 11,150,101, 77,131,194,218,
+ 99, 96,149,142,161,101, 28,173,190, 66, 37, 8, 33, 36, 88, 34,218,190,115,254,164, 14,146,199,113, 98,245,205, 11, 72, 83,115,
+244, 64,134,225, 55,123, 70, 52,118,144, 59, 60,145, 57, 56,196,201, 28,229,230, 6,214, 3, 0,160, 34,209,182, 31, 22, 78, 10,
+144,103, 36,202, 85, 87, 78, 34, 93,197,105,157, 45,203, 44, 60,124,248,176,167, 80, 40,244, 54, 24, 12, 72, 78, 78,198,173, 91,
+183,176,106,213,170,140,130,130,130,176,107,215,174,221, 53,171, 47,211, 94, 38,222,181,109,209,148,198,194,216, 24,169,250,193,
+ 77,139, 70,155, 45, 60,218, 12,120,237,205,176,192,223,198,141,156,139,254,111,188,138,209, 97,254,244, 81, 90,182, 10,192,113,
+106,199,192,210,148,210, 39,132,144, 94,221,187,119,255,177,109,219,182,126,148, 82,180,105,211, 6, 67,135, 14,197,182,109,219,
+112,227,198, 13,228,231,231,107,143, 29, 59,182,146, 82,186,185, 50,189,210,227,114,112,115,115, 59,114,234,212, 41, 15, 7, 7,
+ 7, 28, 59,118, 12, 74,165, 18, 62, 62, 62,152, 56,113,162, 56, 58, 58,122,107,126,126,254,144,168,168, 40,233,163, 71,143,214,
+ 28, 61,122,180, 33, 0,134, 82, 90,225, 71,160,209,104, 54,108,223,182,101,245,196, 73,147,235,156,186, 24,127, 82, 93, 84,224,
+ 82,175,126, 74, 65,237, 90,142,142, 43,150, 46,172,167,209,104,198,153,237,215,236,124,254, 94,173,243,201,195,195,195,195, 83,
+ 1,155,182, 8,240,194,104, 42,111,100,217,131,153,241,165,156, 61,123,118, 36, 33,228, 96,169,135, 75, 9,160, 98, 19,221, 75,
+ 34, 44,173,112, 12, 33, 4,148,210, 24,171, 37, 57, 3,180,143,206, 64,251,232, 12,100, 33, 31,225,215,168,178,195, 64,217, 57,
+ 72,186, 69,250, 45, 58,126, 74,173, 86, 11,183,108,217, 98,138,203, 2, 0,131,161,242,225, 11,171,138, 61, 6, 22, 74,135, 16,
+ 42, 53,176, 42, 84,162,145,196, 49,102,195,199, 67, 58,185, 27,138, 69,154, 63, 14,224,137,154,211,127,121, 95, 91,124, 37,151,
+ 46,141,180, 34,184,127,234, 56,164,156, 61, 1, 7, 71,199,148,247,207,196,153,123,173, 98, 1, 60, 4,128, 70, 82,231,147,187,
+166, 13,235,234,205,130,213,252,182, 27,105,106, 78,189,238,177,110,243, 42, 11,122,198,102,181,135, 15, 31,162,184,184, 24,231,
+207,159,199,207, 63,255,156, 89,222,184, 42,173,239,239,155,102,141,232,232, 92,240,148,213, 92, 57,129, 52, 53,167,110,110,199,
+ 73,240, 8, 24,208,133,101,200, 49,194, 8,100,111,116,243,199,212, 15, 6, 96,197,166, 95,245, 26,207,110,125, 87,255,114,232,
+237, 66,181, 54,210, 30,227,202,172,206,177, 0,252, 9, 33, 18, 0,225, 67,135, 14, 61, 52,104,208, 32,196,196,196,224,192,129,
+ 3,190, 0,210, 1,128, 16,178, 8,128, 23, 74,122, 23, 90, 27,201,157, 97, 89,118,231,137, 19, 39, 90, 41, 20, 10,156, 56,113,
+ 2, 74,165, 18,227,199,143,215, 76,154, 52,137,141,136,136, 32,121,121,121, 38,207,213,249,243,231,179, 96,197,184, 2,128,212,
+212,212,195, 13, 27, 54,236,210,189,123,247,254,141,125, 91, 56, 39, 22,228, 63,115,116,144,202,206,198,156,102,175, 93,185,176,
+ 38, 53, 53,213, 52,152,106,217,243,121,210,238,243,201,195,195,195,195, 99, 29,187,108, 17,192,102,216,144,157,219,137,162,162,
+162,110, 69, 69, 69,149,241,112,213, 52,213,202,131,101,200, 75,174,176,140,114,246, 27, 88,150, 60, 83,110,110,110,122,153, 76,
+ 86,198,192,226,236,212,204,222,183, 3,137, 19,134,155, 60, 87, 70, 79, 22,122, 71, 84, 40, 91, 21, 15, 86,105, 48,116,153, 74,
+200,189, 90, 12,219, 57,178, 87, 23,255,198,117, 24,221,174, 85, 72, 45,214,171,230,223,209,170, 18, 10,232,155,241, 22,130,167,
+ 77,154,122, 29,164,114, 89,146,204, 81, 94,222,184,122, 12, 0,142,222,205, 7,109, 29, 22, 30, 22,216,162, 41,163,255,105, 57,
+158, 20,235, 10,103,223,214,106, 19,139,232, 94, 75,122,148,210,249,175,190,250,234,124,119,119,119,233,234,213,171, 93, 26, 52,
+104, 0,189, 94,175, 41,111, 92,201,189, 90, 12,251, 41,162,119,151,230,222,110,140,110,207,215, 72, 81, 26,138, 87, 37,234,182,
+174,171,228, 28,120, 4, 12,232, 82,219,197,241,232,186, 37, 19,100, 14, 18, 17, 84, 42, 21,162,215,238,193,177,115, 55,251,102,
+198,237, 59, 10,224,104, 37, 18,182,120,191,111,223,190, 43, 22, 45, 90, 4,157, 78,135, 49, 99,198,224,193,131, 7,199,238,220,
+185,179,170,126,253,250, 51,102,205,154,165,240,246,246,198,219,111,191,205, 2,136,176,162,241,197,246,237,219,251, 6, 6, 6,
+ 34, 38, 38, 6,185,185,185,240,241,241,193,164, 73,147,196, 81, 81, 81, 91,243,243,243,135, 44, 89,178, 68,250,240,225, 67,155,
+158, 43,115,244,122,253,103,235, 87, 76,152,222,190, 83, 87,230,254,253,187,250,228, 14,161,204,233, 19, 7,206,184,185,185,109,
+ 53,150,145,123,181, 24,246,211,187,175, 87,249,124,242,240,240,240,240,212, 24,191, 1,232, 99,156, 49,247,102,153, 27, 95, 70,
+ 15,149,249,124,249,242,165,235,255,146, 65,201, 77, 6,150,133,128, 50,171,112, 69,153, 21,150,217,211,156,215,167, 37,209,141,
+107, 15, 97,100, 40, 3, 86,238,166,234,183,232,184,197,160,104, 0,144,203,229,118,123,176, 56,181,202,230,122,179, 60, 86,118,
+ 25, 88, 2,129,128, 0, 56,194,113,220, 5,152, 25, 88,174,222, 45, 66,255,243,201,148,149, 93, 7,245,102, 50, 62, 8, 65,110,
+161, 90, 61, 43, 94,207,165, 22,219, 54,174, 0, 0, 6,221, 35, 7,185, 99,156, 84, 94, 38,238, 42, 25, 0,100, 94,205, 58,204,
+254,120,242,218, 30,195,250,145,204,241, 93,145,147,171, 84,207,184,165, 39, 79,148,116, 72, 60,165,167, 45,201,157, 60,121,114,
+ 61,128,245, 97, 97, 97, 25,114,185, 28,133,133,133, 21,174,129,177,190, 93, 6,245,102, 50,222,239,136,236, 34,173,122,214, 45,
+ 61,210,148,220, 78, 91, 85,245, 8, 24,208,197,195,213,233,232,186,197, 19, 28,210, 82, 31,131,101, 89, 56, 58, 58,226,248, 31,
+113,200,188,185,255,101, 12, 43, 8, 4,130, 5,145,145,145,243, 39, 78,156,136,172,172, 44, 28, 56,112, 0,111,188,241, 6,118,
+236,216,209,224,208,161, 67, 43,194,195,195, 33, 16, 8,112,240,224, 65,232,116,186,123,150, 52, 8, 33, 3,198,142, 29, 59, 99,
+208,160, 65,184,124,249, 50,210,211,211,203,120,174,114,115,115,135,174, 93,187,118,208,163, 71,143, 42,245, 92,149,163, 67,163,
+166,237,216, 57,243,190,130,186,248,153, 48,243,201,197,152,147,199,153, 11,217,217,217, 14, 0,242,170,123, 62,121,120,120,120,
+120,236,195,134, 45,146, 89,106, 60,101, 90,154, 55, 51,172, 44,205,147,114, 94, 47, 77,185,245, 55,106,170,254,230,216,229,193,
+ 18,122,181,134, 62,227,166,105,158, 43,122, 86,102,189,212,169,150, 93, 77,132, 58, 61,132,235, 54,155,242, 96, 73,179,178,178,
+164,181,107,215, 86,153, 27, 6, 14, 14, 14, 80, 40, 20,200,201,201,193,134, 13, 27, 0,160,178, 96,103,189,243,160,145,232, 48,
+108, 12,174,212, 21,131,234,180, 38, 79,214,186,119,223, 53, 21, 34,132,128,101, 89, 99,236, 87,101, 15,219, 75,132,144,199, 28,
+199, 93,160,148,210,160,230, 77, 62,147,202,229,239, 6, 7, 52,173, 61,117,194,251,162, 71,207,212, 56,213,117, 78,238,158, 47,
+ 62,113, 76,161,142, 19,147,104,174,109,227, 10, 72,124,235,219, 31,202,123,174, 82,219, 53,111, 50, 87,234, 32,253,160, 83,235,
+230,222,179,167, 77, 16, 61,202, 80,147, 83, 29,102,229,255,188,116,150,195, 67, 56,205, 72,161, 57, 22,141,171,114,204,127,227,
+141, 55,230, 83, 74, 41,199,113,243, 0,192,188,190,211, 38,125, 32, 74,124,170,194,201,174,115,115,126,254,226, 19,167, 20,216,
+174,175, 71,192,128, 46, 94,110,206, 71,215, 45,153,232,144,254, 36, 9, 18,137, 4, 78, 78, 78, 72,201,200,131, 72, 40,176,153,
+231,172, 50, 8, 33,146,208,208,208, 79, 38, 76,152,128,184,184, 56,140, 31, 63, 62, 61, 57, 57,121,239, 79, 63,253, 52,254,211,
+ 79, 63, 21,190,246,218,107, 72, 79, 79,199,178,101,203,116,127,252,241,199, 18, 0,203, 44,233, 8,133,194,247, 63,251,236, 51,
+154,150,150, 70, 30, 62,124, 8, 31, 31, 31, 76,158, 60, 89,188,100,201, 18, 83,204, 85, 85, 60, 87, 70, 82, 83, 83, 99,124,155,
+214,199,155,135, 87, 66,175, 83,199,228,102, 37,159, 73, 72,204,137,169, 37, 22, 79,239, 26, 20, 80,173,243,201,195,195,195,195,
+ 83, 35, 92,169,100,254,111, 71,101, 6,214,189,175,231,190,231,251,222,196,153,144, 53,232, 2,245,237,125,224, 10, 51, 76, 30,
+ 44,169,163, 27,106,213,247, 67,110,145, 26,187, 79, 94, 3, 0,139, 30, 7,107, 20, 20, 20, 32, 40, 40, 8,223, 68, 52,239,161,
+ 42,200,146,202, 0,168, 37,206,170,253,226,110,167, 14, 29, 58, 84,204,113,220, 78, 0,135, 42,145, 89,208,170, 85,171, 53, 95,
+125,245,149,216,111,216,123, 40,188,120,182,204, 74,134, 97, 32,147,201, 32,145, 72, 16, 27, 27,139, 83,167, 78,105, 0, 44,176,
+ 37, 72, 8,185,164,215,235,111,236,222,189, 59,197,183, 73,221,222, 97,237, 59,124, 20, 57,103,182, 83,252,217, 99,152,183,100,
+ 13,215, 44,248,181,188,232, 29,251, 11,242, 28,235,191, 82,156,150,240,167, 29,135,122, 3,101,141,171, 52,191,198,245,123,132,
+180,107, 59,115,222,188,185,206,183,206, 30,199,167, 75,215, 81,223,192,158,121, 75,127,254, 37,255,185, 67,195, 87,149, 25,183,
+ 47,219,150, 44,225,247,223,127, 95, 15, 96,189,113,190,124,125,103, 47, 90,197, 53,111,223, 59, 39,122,199,207, 69,249, 78,245,
+123,218,170,175,167,255,192,206,245,124,106, 29,253,250,243, 15, 29,158, 62, 73,134, 68, 34,129,163,163, 35,146,211,115, 49,127,
+229,174, 34, 45,199,245,182,167, 78, 54,144, 56, 57, 57, 73,180, 90, 45,190,249,230, 27, 36, 39, 39,135, 80, 74,147, 9, 33,235,
+222,121,231,157,213,109,218,180,105,121,235,214,173,123,133,133,133, 19, 41,165, 9,214, 68, 92, 93, 93, 67, 60, 60, 60,200,133,
+ 11, 23,240,225,135, 31,106, 38, 79,158,204,142, 30, 61,154,228,228,228, 84,215,115, 5, 0,168, 91,183,110,232, 91,125, 58,163,
+ 75,175,241, 49, 26, 85,238,153, 71, 9, 91, 99, 24,122, 78, 26,212, 54,160, 90,231,147,135,135,135,135,231, 95,140,173,145,160,
+ 67, 1, 97,115,119,140,107, 85,135,125,186,237,139,201,180, 32,241, 60, 85, 94, 94, 79,243,247,125, 64,127, 91, 54,154, 30,250,
+122, 42, 29,223,167, 21,109,233, 73,158, 54,119,199,184, 80, 64,104,190, 61,202,141,182,253, 70, 11,232,122, 53, 5,237,213, 20,
+180, 79,115,232, 0, 68,182,107,215,110,255,164, 14,160, 52,126, 59,165,241,219,233,164, 14,160, 0, 62, 4,224,104,169, 78,229,
+ 53, 75,151,249, 0,216, 16, 20, 20,164, 63,125,250, 52,189, 51,164, 39,189,222,178, 54,157, 56,113, 34,253,244,211, 79,233,240,
+225,195,169,135,135,135, 30, 37, 9, 55,125, 42,211,124,243,205, 55,235, 82, 74, 81,175, 94, 61,215, 96,191,102, 79, 99, 79, 30,
+160,103,182,173,166,155, 38, 13,164, 29,219,248, 61,247,110,217,253,134,204,167, 69, 91, 91,231,206, 92,211,219,219,123, 14,165,
+180, 55,165,212,135, 82, 10, 95, 95,119,199,118, 45,155,165,221, 56,113,128,158,253, 97, 13,221, 52,105, 32,237, 20,224,159, 85,
+215, 47, 60, 65,234,217,178,131, 61,154,150, 38,139,245,109,221,242,185, 87,179,206,127, 90,171,175,185,102,227, 14,111,255,146,
+154,150, 65, 47, 93,186, 68, 15, 29, 58, 68,207,158, 61, 75,183,253,244, 11,173,223,126, 72, 97,237, 54,253,187,216,218,183, 61,
+245, 4,224,210,167, 79, 31,122,239,222, 61,250,250,235,175, 83, 0, 46,213,209, 4,176,255,209,163, 71,244,230,205,155, 52, 50,
+ 50,146, 2,216, 50, 97,194, 4,101, 94, 94, 30,237,217,179,103, 50, 74, 58, 41, 8,171, 83,207, 38,141,234, 68, 15,232,215,109,
+193,164, 15, 7,133,190,236,249,172,169,137,215,228, 53,121, 77, 94,243,223,160,249, 79,155,108,122,176,126, 47,121,251, 95,223,
+198,139,252,184,100,217,215,211,191, 89,191,101,230, 39, 31,189, 47,239,214,181, 23,226, 78,124,143,159, 15,254, 84,164, 82,107,
+150,177, 2,124, 21,247,220,114, 50, 78,115,126, 75,160,162,242,203, 8, 33, 14,181,154,194,148, 67,233,126, 14, 64, 41,173, 82,
+204, 48,165, 52, 29,192, 88, 66,200, 87,225,225,225,139, 63,232,210, 97,224,164,206, 61,160,211,233,176,109,219, 54, 36, 37, 37,
+237, 5, 48,151, 82,106,151,135, 45, 46, 46,238,121,171,102, 13,167,212,146,177, 51, 39, 14, 31,224,145,249, 32, 30,169,183,175,
+ 3, 0,212,106,165, 46,253,110, 76, 96, 85,234, 39,147,201, 46,121,120,120,220,241,240,240,200, 49,168, 11,199, 74,133,206,243,
+198, 15,125,203, 51,235, 81, 2, 82,110,149,180,128,170, 85,197,218,148,187,167, 90, 86, 69,215, 72,195,134, 13, 37,114, 17,198,
+ 89,172,175, 70,165,123,122,239,118, 91,123,116,138,213,154, 37, 11, 87,108,123,245,243,153,239, 74,156,157,157,113,237,230,125,
+204, 91,190,163, 72,169,209,245,206,140,221, 87, 35,205, 96,148, 82,232,116, 58,187, 59, 48, 88,225,147,192,192,192, 22,139, 23,
+ 47,246,141,136,136,192,203,122,174,204,121,240, 48,117,118, 88, 88,152,255,253, 59,215,194,107,201,216, 31, 95,230,124,242,240,
+240,240,240,252,123,177, 43, 6, 43, 46,131, 22, 3, 88,212,196,139,172,155,179,120,197,124,134,172,124,151,163,244,123, 61,131,
+133,137,207,105,197,136,247, 42, 64, 41, 45,238,211,146,232, 95,237, 63, 92, 8, 0, 34, 97,165,241, 81,182,180,238, 1, 24, 68,
+ 8,105,255,221,185,203,255, 41, 93,252, 57,165,180, 74,109,181, 78, 66,220,236,234,223,164, 78,183,118,173,164, 2,131, 18,169,
+183, 31, 32,187, 72,133,227,183,146,114, 25,202,124, 95,213,122, 37, 38, 38,254, 14, 0,173,155, 53,188,221,205,191,105,253,238,
+ 65,173, 28, 68, 68,131,212,248,107,200, 83,106,112,236, 86, 82, 30, 8,169,118,160,116, 77,213,247,105,236,254, 43, 30, 1, 3,
+122, 18, 66, 78, 68, 78, 26, 38,153,191,124,103,141, 26, 87, 0,138,159, 60,121,146, 85, 92, 92,236,158,150,150,166, 65, 53,147,
+187, 81, 74,239, 19, 66,218, 76,157, 58,117,209,140, 25, 51,102,126,241,197, 23,108,117, 98,174,172,145,243, 36,105, 95,247, 86,
+ 53,119,253,121,120,120,120,120,254,125, 84, 41, 77, 67, 98, 6,205, 4, 48,177,105, 83, 50,237,193, 3,170,169,169, 74, 88,242,
+108,189, 12,165, 6, 85,191,106, 11, 48,164,224,226,189,164,194, 75,247,146, 10,193, 81,202, 81,170,102, 24,164, 20,105,181, 75,
+238, 38,166, 86,191, 23, 29, 33,134, 43,247,147,149, 87, 31,164,168, 40,199, 81,142, 82, 13, 33,120,170,211,113, 75,110, 38, 62,
+254,229,239, 80,223,204,216,125,231,188,253, 7,118, 59,119,233,230,180,162, 34,237,154,204,248,125,231,171, 93,175,114, 80, 74,
+117,132,144, 17, 33, 33, 33,239, 25, 12,134,117,148, 82,221, 75,104,105, 0,124, 66, 8,217, 27, 23, 23,183,235,252,249,243,233,
+168, 1,227, 10,192, 95,119,253,121,120,120,120,120,254, 53, 84, 43, 15, 86, 77, 26, 87,127, 71,226,238, 61, 10,250, 43,116,111,
+222,123,212,250,175,208,173,233,250, 62,141,223,123, 21,192,208,154,212, 52, 66, 41, 61, 6,224, 88, 13,234, 93, 33,132, 52, 2,
+ 32,168, 17,227, 10,127,221,245,231,225,225,225,225,249,247, 80, 45, 3,139,135,231,239, 4, 45,137,184,172, 17,227,138,135,135,
+135,135,135,167, 38, 32, 0,122, 90, 90, 65, 41, 61, 97,183, 8, 33, 22, 53,108, 81,153, 62,175,201,107,242,154,188, 38,175,201,
+107,242,154,255, 60,205,127, 13,127,101, 23, 69,252,143,116, 13,229, 53,121, 77, 94,147,215,228, 53,121, 77, 94,243,255, 87,243,
+159, 54, 49, 53,109,176,241,240,240,240,240,240, 24, 33,132, 72, 74, 7,120,175,214,122, 30,158,255, 85,170, 28,131, 69, 8,105,
+ 6,148,116,149,175,249,234,152,246, 49,201,199,199,103,108, 64, 64,128, 31,203,178, 76, 65, 65,193,194, 83,167, 78, 45, 40, 95,
+174,123, 43,209, 85, 1,131,186,102, 91, 2, 68, 0, 48, 12, 12, 20,169,103,110, 20, 7,255, 85,117,228,121,121, 8, 33, 13,100,
+206, 30,191, 18, 70, 32, 54,232,181, 48,232,180, 0, 94, 12,155,196,113,250, 36,189, 70,245,154,181,237,125,218, 14,172,175, 55,
+208,104,128, 91, 75,192,140,167,224,190, 37,148, 25, 79, 25,172, 37, 28, 62,132, 80,183, 12,122,209, 12, 33, 43,156,155,118,109,
+119,202,127,227,152,254,106,246,236,217, 35,120,153,237, 7, 15, 30,108,113,128,207, 58,117,234, 28,116,112,112,104,106,109,187,
+162,162,162,244,180,180,180,240,151,217,247,223, 29, 66, 72,119, 0, 95, 3,104, 85,110, 85, 2,128, 41,148,210,147, 47,187,143,
+ 48, 66,132, 94,192, 56, 22,152, 5, 0, 90, 96,105, 6,176,254,247, 26,234,160, 81, 19,120,122,122,158, 17, 10,133,190, 69, 69,
+ 69, 69,249,249,249, 77,156,157,157, 19,229,114,185, 92,175,215,223,123,246,236, 89,247,170,104, 17, 66, 38,160,116,200, 43, 66,
+200, 76, 74,233,218,170,172,231,225,249, 95,166, 82, 3,139, 16,210, 28, 64,104,233,212,189,125,251,246, 94, 69, 69, 69, 32,132,
+100, 0, 56, 3, 32, 6, 64, 12,165,244,110, 77, 84, 72, 32, 16,124,185,106,213,170,233,147, 39, 79, 54, 13,210, 28, 27, 27,107,
+185, 44,131,186,167, 15,158,244,188, 18,123, 7,237,123, 14, 70,137,129,197, 0,197, 79, 17,222,179,125,181,246, 79, 8,113,114,
+115,115, 91, 72, 8, 25,194, 48, 76,165, 15, 51,142,227, 12,148,210,221, 57, 57, 57,243, 41,165, 5, 85,217,151,163, 92,170,211,
+ 27, 12, 22,247, 33, 20, 8, 12,133, 69, 42,171,233, 43,220,221,221,207, 51, 12,211,216,124, 32,235,210,250, 91,252,110, 62,175,
+215,235, 83, 51, 51, 51, 43, 53, 62, 9, 33, 82, 70,200, 78, 33,132,237, 5,134,107, 14, 16, 16, 48,119, 57,131,230, 56,167,215,
+174,162,148,218, 30,101,219,182,118, 3,159,122, 77,206,126, 60, 55,186,238,205,219, 9,136,156, 52, 28, 95,124,189, 5,115,166,
+188,135, 85, 27,118, 96,202,216, 97,240,247, 47,255,156, 43,139,129,146,133,243,166,140, 8, 95,188,106,123,251,185, 83,134,203,
+ 23,175,218,222,126,238,212,225,142,139, 87,111, 15,158, 59,117,132,227,231,171,127, 12,254,207,212, 17,206,139, 87,111,215, 2,
+ 24, 83,157,122,142,104, 94,167, 8,122,189,229,183,107,161, 80,253,227,221, 39,242,234,232,190, 44, 17, 17, 17, 1, 74,165,242,
+218,240, 94,237,162,219, 54,175,243,196, 82,153,172,167, 79,234, 36,222,185, 62, 91,196,202,130,222,154,189,197,242,159,168, 20,
+137, 68,210, 56, 33, 33,193,151,227, 56, 24, 12, 6,232,245,122,211,167, 70,163, 65,247,238,221,107,164, 67, 12, 33,164, 31,128,
+133, 40,137,255,140,162,148,238,122, 9, 45, 71,161, 80,248,177, 88, 44, 14,213,235,245,126, 0, 32, 18,137,110,171,213,234, 24,
+189, 94,191,130, 82, 90, 88, 69,201,149, 79,158, 60,241,119,116,116,132, 86,171, 53, 13, 12, 47, 16, 8, 90,214,175, 95,255, 27,
+ 0,190,213,173,171, 17, 47, 96, 92,231,174, 93, 87,141,158, 62, 93,160, 60,115, 6,171, 54,111, 94,137,252,124, 0,248,166,178,
+109, 37, 18,201, 81,134, 97, 26, 84,101,127, 28,199, 37,169,213,106,171, 47, 41,150, 16, 10,133,190,105,105,105,158, 10,133, 2,
+ 0, 32,151,203,229,230,243,246, 82,234,149, 90, 70, 41,149, 1, 0,195, 48,171, 58,119,238, 28, 66, 8,209, 3,160, 28,199, 49,
+132,144, 97, 28,199, 9, 75,203, 47, 35,132,108,166,148,170,171,180, 35, 30,158,191, 41, 86,111,154,132,144, 67, 0, 66,219,183,
+111, 47, 27, 58,116, 40, 66, 67, 67,225,235,235, 11,169, 84, 10, 0,200,202,202,242,250,243,207, 63,223, 62,115,230,204,219, 7,
+ 14, 28, 0, 33, 68, 9,224, 15, 74,169,197, 63,115,207,126,221, 38, 75, 29, 37,171, 1, 32, 51, 53, 43, 61,245,225,179,213,233,
+233,233,203,168,217, 40,209,132,144, 38,163, 71,143,158,246,209, 71, 31,225,224,193,131,216,177, 99, 7,212,106, 53, 10, 10, 10,
+112,234,212, 41,203, 21, 45,122,134,156, 83,209,128,252, 49,144,252, 59,224,224, 9,200,189,170,125, 66,220,220,220, 22, 78,153,
+ 50,101,170,191,191, 63, 40, 45,201, 58,174,211,233,160,215,235,161,211,233,144,147,147,131,105,211,166, 1, 40,137, 95,227, 56,
+ 14,135, 15, 31,158, 60,118,236, 88, 0,248,216,146,102, 72,112,253,171, 12, 97,234, 26,125, 51,212, 96, 72,189,112, 61, 37, 88,
+111, 48, 8, 84, 42,173,197,145,195,165, 82,214,166,113, 39, 18,137,234,198,255,250,171, 39, 35, 22,131, 26, 12, 0,199,129,114,
+ 28, 0,179,137,150, 44,163, 6, 14, 84,103, 0,167,231,160, 87,170,209, 97,194,132, 74,207, 3, 33,164,179, 72, 44,219, 49,226,
+131,233,222, 29, 59,117, 18, 53,172,167,128,222,192,225,193,163, 84,239,107, 87, 47,118,217,189,245,155,241,132,144, 97,148,210,
+106,229,201, 18, 59, 56, 31, 91,243,237,119,117,175,252,121, 19, 39, 79,159,193,137, 83, 49, 0,128,163,167, 75,228, 24,198,118,
+235, 53, 33,196,205,221, 55, 60, 96,242,123,253,229,159,127,181, 81, 50,249,189,254,194, 23,159,223, 73, 38,191,247,150,112,241,
+138,239, 36,147,223,123, 75,244,217,210, 53,109, 9, 33,110,148,210, 28,107,122,214,174, 17,244,122,201,143,137, 25, 2, 0,200,
+ 92,183, 14,186,103,207,160,152, 63, 31, 0, 48,162,137,151,221,205, 26, 30, 30, 30, 87, 69, 34, 81,221,202,202,233,116,186, 74,
+141,223,136,136,136, 64,165, 82,121, 85,175,215, 83,161, 80, 56,123,248,128, 87,247,247,238, 22,152,101, 94, 38, 54,246,134,251,
+146, 37,191,246,223,117,173,128,190, 29,228,116,237,224,151, 17,193,125,103,108,177, 58, 98, 60,199,113,140, 90,173,198,189,123,
+247,140,241, 21,229,177,232,249,170, 12, 66, 8, 3, 96,149,187,187,123,199,172,172,172, 17, 0, 34,243,243,243, 3, 4, 2, 1,
+106,213,170, 21, 73, 8,121,224,226,226,178, 49, 47, 47,239, 60, 74,188, 68,118,165,248, 39,132,116,119,118,118,222,182,111,223,
+ 62,183,118,237,218, 49,153,153,153,104,220,184, 49,178,179,179, 59,156, 57,115, 38,104,204,152, 49, 99, 8, 33,163, 40,165,103,
+170, 80,221, 22, 14, 14, 14,116,244,232,209,196, 96,120,113,184,155, 54,109,194,107,173,245, 77, 63,236, 45, 47, 86,105,104,222,
+201,123, 46, 31,178, 44,251,199,227,199,143,243,170,116, 50, 0,176,192,172,209,211,167, 11, 28, 31, 63,134,227,141, 27, 24,145,
+159, 47,252,162,196,155, 85,169,129,197, 48, 76,131,109, 59,191,247, 21,139,197,166,251,146,181,201, 96, 48, 64,171,209, 34,250,
+115,139,227,165,219,133,131,131,131,131, 66,161,200,112,112,112,112,168,182,136, 25, 18,137, 68,184,117,235,214, 97, 98,177, 24,
+ 0,160,209,104,208,186,117,107,139,247, 63, 30,158,127, 2,182,222,221, 69, 37,160, 0, 0, 32, 0, 73, 68, 65, 84, 74, 95,207,
+207,207,135,193, 96,128,147,147, 19, 4,130,178,207,123,119,119,119,244,234,213, 11,221,187,119,199,208,161, 67, 17, 31, 31, 47,
+ 27, 58,116,104, 47,107, 98,195,167,247, 69, 61,223, 18,195, 71,167,227,124,206,253,246,103,244,166,207,246,120, 0,152,110, 86,
+108,204,184,113,227, 72, 86, 86, 22,134, 12, 25,114, 70,173, 86,191, 73, 41,205,183,166,105,224,144, 26, 62,116, 56, 56, 74,100,
+ 43, 46,109, 32, 26,149,146, 50, 12,163, 52, 54, 17,218,117, 6,202, 65, 8, 25,162, 80, 40,176,115,231, 78,104, 52, 21,211,125,
+ 57, 59, 59,227,214,173, 91,166,121,129, 64,128, 78,157, 58, 9, 8, 33, 67, 96,197,192, 34,132,169,123,238,202, 99, 79,227,124,
+223, 94,173,216,144,224, 6, 25, 30,238, 78, 20, 0,153, 59,119, 46, 0,152, 30,108, 11, 23, 46,180,167,158, 96, 68, 34,100,198,
+196,152,150, 49, 66, 6, 12, 75, 64, 68, 0, 35, 44,105, 45, 5, 5,168, 1,224,244, 0,167, 3,164, 62,245,236,209,238, 80,167,
+190,239,193, 37,203,215,186,170,117, 20, 59,127, 57,137, 71,143, 30, 66,192, 48,104,210,212, 23,175,134,117, 19, 5,181, 15,169,
+183,116,193,244, 3,132,144,215, 41,165,118, 13, 76, 93, 6,142, 74,155,214,175,141,141,155,174,193,195,205, 17, 67,250,191, 1,
+153, 84,130, 47,190,254, 30,159,207,153, 4,223, 38, 13,176,126,229, 98,171,155,187,184,184, 44,106,215,166,101,147,239,119, 29,
+ 65,104,247,206,194, 45,187,142, 34,172,123, 23,225,247,187,142, 32, 44,180,155,112,203,174, 35, 8,235,222, 85,180,101,215, 17,
+116, 10,110,211,244,124, 86,236, 34, 0,147,172, 31,115,185,107,244,106,201, 53,242, 21,178,166, 7,192,227,241,227, 1,192,100,
+ 96, 85, 5,145, 72, 84, 55, 45, 45,205,179,178,114,149,121, 9, 74, 61, 87, 87,245,122, 61,158, 61,123, 70,114,115,115,169,171,
+171,107,255, 35,235, 35,247,189,214, 53, 48, 27, 0,110,220,184, 81, 43, 42,106, 73,255,159,174,230, 67,121,113, 13,249,241,215,
+ 24,110,196,155,161, 87,127,137,142, 8, 26, 60,120,240,117, 75,186,106,181,250, 81,219,182,109,105,233,247, 58, 18,137,132, 53,
+ 95, 79, 8, 81,248,250,250, 86,240, 82,219,209,116,184,234,194,133, 11,147,252,253,253,209,178,101,203,243, 29, 59,118,116,150,
+203,229, 56,114,228, 8,252,252,252, 90, 57, 59, 59, 95,218,189,123,183,232,147, 79, 62, 9,220,188,121, 51, 0, 76,182,125,134,
+ 74,122, 53,133,135,135,239, 60,120,240,160,148,101, 89, 40,149, 74,220,186,117, 11,174,174,174, 16,139,197,120,235,173,183, 4,
+ 93,186,116,113, 15, 11, 11,251,185,244, 37,192,238, 30, 77, 42,149,138, 70, 70, 70,194,193,193, 1, 14, 14, 14,144,203,229,144,
+203,229,112,148,130,172,155, 82, 95,246,209,134, 92,217,199,243,215, 69,111, 91,187,224,116,253,250,245, 63, 77, 78, 78,206,181,
+ 87,219,136,242,204, 25, 56,222,184, 1,152,253,119,237,197,197,161, 22,102,207,158,109,179,140, 80, 40, 4,203,178,232,220,185,
+115,165,122,238,238,238,123,133, 66, 97,153, 55, 82, 74,169,116,246,236,217,134,187,119,239,202, 25,134,145,115, 28,135,217,179,
+103, 27,244,122,189,212,203,203,235, 60,199,113, 25,153,153,153, 3, 43,211,166,148,170, 9, 33, 51, 25,134, 89, 37,145, 72,132,
+ 13, 27, 54, 76,154, 55,111,222, 5,148,120, 47, 65, 41,101, 26, 54,108,216, 65, 38,147, 53, 80,171,213,122, 0, 51,121,239, 21,
+143, 13,130, 0,152,255, 86, 53, 0,196,165,223,179, 80, 18, 95, 82,187,220,114, 0,120,142,146, 23, 68, 47, 43,243, 89, 0,226,
+ 1,180, 0,224, 89,186,238, 10,128,236,151,173,176,209, 53,107,122,101,165,148,154, 30, 40, 78, 78, 78,184,114,229, 10, 8, 33,
+112,114,114,130,179,179, 51, 92, 92, 92,144,159,159,143,248,248,120, 36, 36, 36,224,241,227,199, 32,132,160, 73,147, 38, 64,233,
+ 31,199, 76,203,116, 99,219,254,213, 65, 72, 29, 37, 32, 4,104,215, 35, 0, 1,221, 91,163,253,229,196, 41, 10,133, 98, 67, 90,
+ 90,218, 61, 66,136,176,117,235,214, 99, 58,117,234,132,229,203,151, 67,173, 86, 47,183,100, 92,153,107,158,185,165, 11, 6, 0,
+133, 66, 49,227,135, 35, 15, 28, 70,246,110, 90,156,150,150,246,101, 85, 79, 66,249, 27,240,243,231,207,237, 30, 43,143,227, 56,
+228,228, 84,116,140,152,107,150,247, 8,172, 88,181,198,181, 32, 47, 3,159,125,241, 3,116, 58, 29,166, 79,159, 14,142,227, 76,
+ 83,110,174,229,123,118,249,122, 82, 67, 57,167, 2, 83, 50, 17, 6, 32, 66,160,254, 59, 37,246, 68,242,206, 53, 32, 20, 32, 6,
+ 0,229,142,171,188, 38, 33, 68, 42, 96,101, 63, 45,248, 98,181,235,245,132, 84,252,114,242, 58,180,249, 79,144,126, 99, 31, 0,
+160, 73,231, 97,216,165, 22,160, 99, 64, 83, 76,157,187,212,237, 63, 83, 71,253, 68, 8,105,105,222, 92,104,207, 3,141, 82, 3,
+ 62, 91,180, 8, 27, 86, 47,199,210,229,171,145,159,151, 11,145,168, 54, 0, 64,175, 55,192, 80,238,216, 42, 28, 59,165,189,255,
+ 51, 99, 28, 89,245,221,207,104,221,204, 27, 7,142,159, 71,112,171, 6, 56,124,234, 50, 58,181,105,132,163, 49,215,208, 41,160,
+ 49, 98, 46,222,194,244,137,163,201,185,195, 91,122,219, 58,159,229,175,209,202,149,107, 92, 11,242, 51,112,112,241, 86, 60,251,
+230, 27, 36, 77,154,132, 14,165,101, 46, 19, 2,182,110, 93,128, 69, 5, 42, 59,246,219,183,111, 67,173,174,248, 12,145, 72, 36,
+240,243,243,179,184,141,185,166, 82,169,188,166,215,235,105, 70, 70, 6,201,200,200,128, 92, 46, 39,183,110,221, 52,180,106,213,
+122, 0, 77,216,243, 29, 0, 68, 69, 45, 25,176,235, 90, 62,138,207,175,134,242,194,215, 96, 27,197, 50, 27, 22,142,211,142,157,
+191,254, 26, 94, 60,220,202,212, 51, 61, 61,253,117,227,247, 38, 77,154, 36,220,189,123,183,133,177, 73,185,180,169,144,213,235,
+245,190,198,102, 67,189, 94, 15,181, 90,141,158, 61,123,154,222,188, 44, 29,187,155,155, 91, 39, 63, 63, 63, 92,191,126, 29,171,
+ 87,175,174, 21, 30, 30,142,251,247,239,131, 16,130, 37, 75,150, 16,127,127,127,209,243,231,207,241,218,107,175, 97,239,222,189,
+ 21, 44, 2, 11,191, 79, 39,185, 92,190,249,192,129, 3, 82,134, 97, 80, 80, 80, 0,142,227,208,181,107, 87, 48, 12,131,155, 55,
+111, 98,238,220,185,216,187,119, 47,246,239,223, 47, 11, 10, 10,218, 76, 8,241, 51,111,190,183,113,141,168, 74,165,162, 18,137,
+ 4, 18,137, 4, 82,169, 20, 82,169, 20, 98,177, 24,133, 42, 96,236,138, 36,181, 64, 90,155,107,213,182,107,211,119, 63, 90,194,
+124, 57,239,189, 83, 0,126,169, 68,179, 12, 90, 96,233,170,239,191, 95, 61, 34, 47,143, 1,128,141,132,112, 90, 74,151, 90,172,
+140, 5,205, 2, 85, 46, 26, 52,173,139,159,119,238,199,160,161,253, 43,108, 35, 20, 10, 33, 18,177, 96, 69, 34, 56,213,170,232,
+120, 42,175,201,178,172, 87, 66, 66,130,187, 72, 36, 50,121,228,117, 58, 93,198,188,121,243, 60,250,244,233,227,116,248,240, 97,
+166, 79,159, 62, 92,237,218,181,139,174, 95,191,254, 76,171,213,186,119,233,210,165,210,122,154,173, 91,219,182,109,219,118,251,
+246,237,123,111,246,236,217, 87,103,204,152,241,153,249,250,101,203,150, 45, 58,116,232, 80,131, 1, 3, 6,108,251,243,207, 63,
+215,154,109, 87,227,221,252,121,205,191,191,166, 53, 91,164, 20, 47, 66,200, 65,179,245,125,141,243,179,103,207,142,140,138,138,
+186, 69, 8, 57,104,190,220, 88,174, 84,251,160,165,249,210,109,107,205,153, 51,167,117,116,116,244,146,144,144,144,157,231,207,
+159,127,136,154, 50,176,140, 7, 98,126,112,230, 80, 74,145,159,159,143,252,252,124,164,164,164, 96,221,186,117,165,127,100, 17,
+132, 66, 33,132, 66,161, 41, 94,193, 26, 39, 14,156,253, 26,192,215, 65, 65, 65,162,184, 11,187, 15,207,218,240,209, 43,193, 61,
+219, 9,174,157,140, 27, 12,224,115, 0,175,143, 30, 61,186, 54, 0,108,221,186,245, 57,128,195, 47,123,112,213,129, 82,186,251,
+222,189,123, 83,125,124,124, 76, 49, 40,230,205,132,122,189, 30, 82,169, 20,198, 88, 21,149, 74,133,117,235,214,233, 41,165,187,
+109,104,226,238,173, 83,184,119,235,116,201,118, 28, 7,206,240, 98,251, 5, 11, 22,152,119,125,197,248, 82, 79, 73,101,112,150,
+206, 57, 45,247, 89,110,121, 5,163,172, 28, 12,195,126, 52,120,212, 36, 31,142, 8,241,235,169, 63, 33, 18,137,192,153,121, 47,
+ 69,130,146,183,227, 91,247,211,160,240,106,133, 55,135,141,243,222,183,109,205, 71, 0,190,176,171,210,102,180, 12, 12,193,148,
+169, 83,241,221,134, 13,152, 59,127,145,201, 58,215, 27, 12,208, 87, 90, 79,134,233, 18,236,143,194,172, 84, 8, 4, 2,116,110,
+219, 20, 2,129, 0,221,130,155, 67, 32, 16,160,107,251, 22, 16, 10,133, 8,235,228,143,102,205,154, 65, 40, 20,218,108,115, 44,
+185, 70, 39,113,239,214,239,102,198,110,201, 53,209,166,167, 87, 40,175, 75, 79, 7,173,239, 94,165,227,165,148, 98,204,152, 49,
+185, 41, 41, 41,218,242,235,234,213,171,199,158, 57,115,198,213, 74,243,156, 9,153, 76, 22, 36, 20, 10,175,101,103,103,115, 14,
+ 14, 14, 12,199, 25,184, 86,173, 90, 11,142,172,143,220,103, 44, 51,103, 78,228,190,183,131,156, 7,252,176,251, 32,101, 27,118,
+ 37, 68, 36,209,127, 48,127, 61, 43, 98,101,118,101,168, 55, 54, 23,222,185,115,199, 90,115,161,249, 49,217,108,226,201,201,201,
+ 25,237,231,231,119,230,235,175,191,174, 69, 8,193,217,179,103, 33, 16, 8, 76, 83, 98, 98, 34, 24,134,193,172, 89,179,180,249,
+249,249,239, 87, 86, 55,161, 80, 56,245,231,159,127,118, 17,139,197, 40, 40, 40, 48,253,111, 4, 2, 1, 18, 18, 18,240,229,151,
+ 95, 98,244,232,209, 72, 78, 78,134, 66,161,192,244,233,211, 29,163,163,163,167, 2, 88,100,199,161,199,106, 52,154, 96, 7, 7,
+ 7, 72,165, 82, 24, 13, 45, 0, 56,118, 75,116,179,184,184,184, 77,237,218,181,189, 61, 98, 14,254,218, 57,252,205, 64,119, 15,
+159, 16,148, 26, 88,246,242, 0,216,240, 80,175,255,207,235,251,246,121,158,219,183,143,187,240,235,175,169,210,194,194,245,118,
+ 11,232, 4, 72,122,144,138,160,160, 32, 92,187,118, 13, 65, 65, 47, 46, 41,203,178, 16,139,197, 96, 89, 22, 44,203,162,182,171,
+ 93,161, 18,148, 97, 24,156, 59, 87,118,184,209,110,221,186,101,159, 62,125,218, 17, 0,146,146,146,104,223,190,125,115,227,227,
+227,225,235,107, 59, 12,205,219,219,251,140, 64, 32,104,104,190,140, 97, 24,183,129, 3, 7, 34, 39, 39,231,141,129, 3, 7,118,
+ 45, 93,246,100,207,158, 61, 35, 1, 64, 44, 22,131, 97,152,106, 53, 65,243,252,179,168,204, 22, 41, 45,211,183,252, 60, 33,228,
+ 96, 84, 84, 84,223,242,203,204,141, 41, 75,223,205,183,141,142,142, 94, 98,166,173,172,137,227, 49, 53, 17, 18, 66,104,101, 55,
+ 75, 91, 84,102, 96, 25,185,118,237,154,174, 78,157, 58,223,221,251,243,241, 43, 77, 3,154, 64, 38,151,188, 74, 8,249, 90, 34,
+145, 76, 27, 53,106, 20, 46, 94,188,136,155, 55,111,110,162, 47,217,171,166, 77,155, 54, 71, 37, 18, 73, 3, 75,235,212,106,117,
+ 82, 92, 92,156,197, 88,177,156,156,156,249,165, 49,101, 86,131,220,205,227,193,204,131,220,173,213,133,114, 20, 58,173, 14, 69,
+197,202, 23, 15,239, 82, 3,171,168,168, 8,239,188,243, 78, 25, 15,214,179,103,207, 42, 61, 62, 66, 8,190,252,229, 23, 28,223,
+189, 27,111, 4, 6, 98,239,229,203,136, 30, 53, 28, 45, 27,212, 1, 53, 16, 80, 2, 36,239, 88,131,172,252, 66,108, 63,121, 14,
+217, 5,197, 24,209,173, 27,124,157,107,219,214, 21,177,189, 58,116, 10, 97, 79,156,143,135, 72, 36, 4, 3, 14, 84, 87, 12,133,
+ 95, 24, 4, 12, 3, 23,175, 70, 96, 69, 34,136, 68, 66, 36,166, 60,135, 95,235,246,226,131, 98,105, 47, 84,195,192,170,223,160,
+ 49, 56,131, 1,163, 71,143,198,206,157, 59,225,238,221, 0, 46,245, 90,227,243,229, 27,240, 70,207,110,149, 30, 63, 0,147,129,
+ 47, 16, 8, 42,124, 26,191,219,227,141,164, 28,133,182,252, 53,226, 40, 40,128,186,139, 23,163,238,226,197,184, 92,186, 79,255,
+162, 34, 40,149, 74,160,163,237, 32,252, 50,250,148, 66,163,209, 32, 37, 37, 69,155,158,158, 94,225,201,231,237,237,157,161,209,
+104, 42, 53,104,182,108,217, 18, 27, 17, 17, 17, 92,171, 86,173,171,177, 55,110,232, 2, 2, 3, 69,135,215, 69,238, 55, 54, 15,
+ 2, 64, 96, 96, 96,118,100,100,228,254,145, 67,250,246, 95, 59,123,168, 97,194,162,109, 66,137, 76, 22,220,119,134,237, 64,119,
+ 35,106,181,250, 81, 64, 64,128,237,138,148, 82, 92, 92,252,212,218, 58, 99, 64,123,187,118,237,156,195,195,195,113,230,204, 25,
+ 12, 26, 52, 72,173,213,106,239, 1, 64,159, 62,125,154,111,223,190, 93, 28, 31, 31, 15, 15, 15, 15, 81, 82, 82,210,102, 66,136,
+205,192,119,177, 88, 28,214,190,125,123, 70,173, 86, 87, 48,174,162,163,163, 49,108,216, 48, 52,111,222, 28, 28,199,161,176,176,
+ 16,225,225,225,162,213,171, 87,135,193, 62, 3,107, 74,203,150, 45,191, 68, 73, 47, 66,243,123,225,109, 0, 51, 1,224,249,243,
+231, 79,251, 14, 26,125,171, 91,207,129,193, 13,155,181,246,169, 76,208,203,203,107, 14,195, 48,111,115, 28, 39,200,207,207, 79,
+209, 16,210,204,191, 97, 67,175, 46,253,251, 35, 79, 36, 18,172, 58,121,146,201, 40, 44,116, 4, 96, 87, 83,163, 82, 87,136, 6,
+ 77, 75, 66,249, 6, 13,237,143,107,215,174, 97,240,176, 1, 96, 89, 22, 66,161,168,228,191,201,150,120,176, 92,107, 59,217, 35,
+ 9,157,174,236,144,160,198,243,234,236,236, 12,160,164, 37,195,184, 76,167,211,217,124,248, 1,240,221,181,104,158,167,204,217,
+ 5, 6,157, 14,173,250, 15, 54,253,166, 47,109, 92, 43, 3,199,201,114,147, 30, 97,242,238, 3, 53, 58,254, 44,207, 63,135,202,
+108, 17,115, 3,169, 6,246,117,112,246,236,217,145, 0,232,236,217,179, 35,141,243, 81, 81, 81, 74, 0, 22, 59, 15, 85, 5, 83,
+ 19,225,203, 24, 87, 0, 42, 52,233,148,167, 71,143, 30,147,157,156,156, 86, 3, 64,112,112, 48, 82, 46, 62, 65,202,197, 39,240,
+107,209,170, 75,187,192,224,188, 97,195,134,193,221,221, 29, 51,102,204,160, 0, 54, 85,117,255,137,119,111, 57, 2,160, 10,133,
+ 98, 6, 0, 40, 20,138,192,203,151, 47,123, 92,185,114, 5,237,219,191,232, 81,168,213,106,209,181,107, 87,171, 58,165, 77, 9,
+ 31,195, 74, 60, 85,117,160,148,131, 86,171, 69,113,177, 18, 26,141, 22,122, 29, 7,189, 94,143,160, 86, 78,216,182, 97,118,201,
+ 50,189,209, 91, 86,226, 37,171,235,237,132,160, 54,222, 58,134, 33,202, 43, 55,210,157, 45,233,106, 52, 26,196, 38, 37,225,198,
+227,199, 0,128, 55,163, 44,182, 52,152,216,118,242, 12,252,253,253, 43,171,109,211,186, 10,111,164, 29,143, 45,185,105, 43, 83,
+112,229,143, 93,112,114,114, 4, 0,180, 10, 29, 1,150, 45, 49,176,138,148, 90,212,110, 81, 15,132, 82,171,221,251,229,181,124,
+142, 10, 89,105, 3,106,224, 64, 41, 7,202, 25, 64, 41, 7,137,147,187,195,164, 15,223, 5,199, 25,208,161, 67, 7, 16,129, 0,
+ 6,157, 26, 67,250,245, 66, 78, 94, 1,220, 93, 45, 30,114, 5, 88,150, 69,104,104,168,204,218,250,251,247,239, 43,129,138, 61,
+ 42, 43, 28, 53,229, 74, 12,172, 34, 37,212,106, 53,180, 26, 61,180, 58, 61,184,198, 44, 62,251,207,112,232,181,122, 20, 15, 13,
+ 41, 89, 54,117, 0,180, 26, 29,146, 29, 24, 38,208,223, 67,199,128, 40,175,199, 63,179, 89, 97, 74, 41,140, 70,129, 53, 44,197,
+252, 89, 98,203,150, 45, 55, 34, 34, 34,130, 2, 2, 3,175,189,221, 51,240,171,184,155,183,210,226,110,222,170, 80,174, 65,243,
+192, 71, 19,162,119, 78, 23,177,178, 32,123,141, 43,160,108,115,225, 75, 18, 89, 80, 80, 16,224,232,232,136,187,119,239, 66, 32,
+ 16,128, 16,114,159, 82, 26, 0, 0,227,198,141,123, 32, 20, 10,155, 8, 4, 2,124,243,205, 55, 68, 40, 20,182, 9, 9, 9,137,
+ 4, 96,213,192,210,235,245,126, 78, 78, 78,101,188, 87, 44,203, 98,246,236,217, 24, 57,114,164,201,184, 98, 89, 22, 91,182,108,
+ 65,112,112, 48, 52, 26,141,229,182,215,114,208,146, 65,226,109, 91,246, 0, 56,142, 43,105,102,229, 42,177,134, 75,234, 27,145,
+245,246,219,205, 16, 19,131, 46, 77,154,248, 7, 5, 5, 65,171,125,225,192,108,220,184,113,189,130,130,130,167,132,144, 31, 1,
+172,165,148,254,105, 83, 79, 69,145,244,160, 36,188,244,218,181,107,232,208,161,131,201, 99,101,238,189, 98, 89, 22, 50,214,177,
+178,234, 1, 40,107, 96, 81, 74, 81, 84, 84,196, 28, 57,114,164,182,159,159, 31, 1, 0,127,127,127,114,241,226,197, 90, 50,153,
+236,185, 66,161,168,244,197, 87,230,236,130, 45, 17,239, 0, 0, 62,237, 89,210, 50, 79, 8,193,145,133,145, 16,137, 68,120,101,
+ 70,100,153,242, 26,141, 6, 28,199,189, 84,250, 17,158,127, 6,246,216, 34, 53,101, 92, 25,181,140, 30,172,168,168,168, 91, 81,
+ 81, 81, 21,188, 97, 47, 67, 25, 15, 86,233, 14,171,101,104,149,127, 11, 42,207,242,229,203,209,166, 77, 27,171,235, 41,165, 88,
+189,122, 53,126,248,225,135,229,148,210,196,170,238,191,239, 43,237, 90, 97,197,190, 91, 77,154,183, 34, 0,176,104,106, 63,166,
+168,168, 8,231,206,157,131,139,139, 11,238,223,183, 47,109, 23, 33,196,201,197,197,101, 33,195, 48, 67, 4,229, 35,251, 45, 96,
+ 48, 24, 12, 28,199,237,206,203,203,179,154,166,129, 82, 64,171,211,163,168, 88, 5,141, 70,131,169,179,214, 84, 90,143, 40,128,
+104, 53, 5,194,208,238, 33, 22,141, 7, 66, 8, 58,180, 14,197,196,145,242, 10, 15,109, 65, 73, 42, 48,180,237, 80, 50,182,244,
+245, 75, 55, 65, 41, 96, 48, 0,181, 61,107, 97,211,206,175,108,237,154,232, 13, 92,233,219,176, 1,133,106, 3,252, 58,245, 69,
+234,237, 24, 0, 37, 30, 35, 49, 91,210, 52,204,138, 68,224, 40, 41,201,222, 96, 5, 86, 44,107,144,147,158,232,187,225, 96, 28,
+198,246,109,131, 61, 39, 98, 49,184,103, 0, 78, 95,138, 71,120, 71,127,220,186,247, 24,173,124, 27,226,155,205,187, 65, 41, 10,
+190, 93,241,185,201, 35,194,113,250, 36,171,149, 52,243, 96, 93,188,120, 81, 89,222,107,101,254, 89,153, 87, 8, 40,249,253, 25,
+ 61, 88, 74,149, 26, 51,230,216,149,142,167,228, 26,117,235,100,213,192, 51,199,150,135,202, 30, 3,204,156, 45, 91,182,196,162,
+146, 52, 43,141, 1, 4, 3,159,216, 37,248, 23, 97, 48, 24,240,219,111,191,153,174, 71,121, 8, 33,101, 60,142,149,193,113, 28,
+146,146,146,112,243,230, 77,132,132,132, 32, 47, 47, 15, 34,134,193,244,184, 56,248,143, 26, 5, 13,203,130,227, 56,136,197, 98,
+140, 27, 55,206,238,243, 89, 37, 74,239,145,148, 26,108,138, 19, 66,190,234,219,183,111,179,187, 69, 69,184,149,144,128,158, 11,
+ 22, 0, 0,126,251,237, 55, 83, 25,141, 70,131,105,211,166,137,227,227,227,199, 92,189,122,117, 12, 33,100, 57,165,116,186, 21,
+ 73,104,169,202, 20,131,245,246,136, 65,104,230,215, 24, 63,108,222, 97, 90, 63,109,214, 20,136, 68, 44, 68, 34, 17, 92, 93, 93,
+237, 58, 26,243,123,119,113,113, 49,179,103,207,158,186, 97, 97, 97,236,216,177, 99, 9, 0,108,216,176,129,217,184,113,163,252,
+216,177, 99,172,139,139, 75,197,246,242,114,232,181,101, 91,192, 9, 33, 32,132, 64, 36, 18,129, 21,179, 0,199,129, 16, 34, 95,
+182,108,217,162, 91,183,110,181,111,217,178, 37,212,106,245, 40, 66,200,117,202,231,193,250,215, 83,153, 45, 98, 41,150,170,212,
+ 11,101,141, 76,243,184, 44,107, 6,154,121, 76, 22,128, 26,233,108, 81, 38, 6,203, 18, 2,129,160, 82,239, 20,195, 48,149, 54,
+ 17, 78,155, 54, 13, 78, 78,150, 93,214, 26,141,134,198,197,197,197,167,167,167,111,160,148, 86,110,125, 88,224,224,201,235,183,
+ 22,126, 60,160, 0,165,109,167,174,174,174,207,123,244,232, 81, 8, 64,187,107, 87,217, 23, 98,181, 90,157,100, 77,199,197,197,
+101,225,198,141, 27, 63,234,223,191, 63, 83, 62, 85,128,121, 51,158,113,210,233,116,216,181,107,215, 71,159,124,242, 9, 96,197,
+235,101,124,120, 23, 23, 41,161, 44, 13,112,126,112,115,143,125, 7,102,227, 1,225,232,166, 64,221, 38, 6,171, 15, 17,134, 45,
+137, 17,242,110, 16,104, 90,230,228, 36,133,193,134, 38, 33, 76,226,227,228,180, 58,245,188,107,225, 65, 74, 38,188, 26,182, 65,
+206,147, 23,231, 65, 40, 20, 64, 84,218, 68,232,234, 44, 71,230,179,103, 96, 24,129, 77,131,248,243,237,215,113,233,230, 99,252,
+124,226, 79,104, 85, 69, 88,177,245, 8,180,234, 66,104, 85, 69,208,170, 74, 62,151,124,242, 1, 8,193, 83,173,170,176,185, 45,
+173,242, 8,133, 66,116,236,216,209,170,129,243,228,201, 19, 59, 61, 88,212,228,193, 82,170,170,120,141,236,192,216, 68, 88,217,
+250,234, 26, 4,198,212, 13, 50,153, 44,120,203, 22,235,233, 24, 44,225,227,227,115,216,209,209,177,145,189,229,171,144,116,116,
+137,171,171,235,194,150, 45, 91,250,173, 88,177, 66, 36, 16, 8,240,202, 43,175, 52,255,224,131, 15,146, 0,160, 77,155, 54, 10,
+160,228, 30, 51, 97,194, 4,122,241,226,197,155, 0,162,108, 9,138,197,226, 4, 23, 23,151,224, 30, 61,122, 32, 47, 47, 15, 41,
+ 41, 41,144,203,229,240,255,234, 43,196, 77,152,128,192,117,235,192,244,232, 1, 66, 8,196, 98, 49,226,226,226, 32,147,201, 18,
+172,233, 17, 66, 58, 2, 88, 10,160, 11, 94, 52, 11, 82, 0,231, 0,204,162,148, 94, 42,191,141,241,198, 96,224,184,202, 46,214,
+240, 25, 51,102, 32, 87, 36, 2,250,244, 1,155,152, 8,173, 86,139,144,144, 16, 4, 7,151,100,226, 8, 9, 9,129, 80, 40, 68,
+ 64, 64, 0, 20, 10, 5,190,249,230,155,225, 40,219,179,186, 12,234, 66, 29,146, 30,164, 34, 36, 36,196,228,169,234,211,167,143,
+201,131, 37, 18,137, 76,158, 44, 98, 57,197, 94,249,227, 47, 99, 96,233,116, 58,194,178,172,240,195, 15, 63, 36,239,191,255, 62,
+213,233,116, 28,203,178,204,119,223,125, 71, 46, 94,188, 40, 84, 42,149,149,190,128,183, 30, 48, 4,159,246, 42,113,130,126,222,
+200, 3, 34, 86, 4, 49,203, 98, 70, 66,170,233,186, 56,111,217, 41,142,142,142, 30,220,178,101,203,146,230,118, 64,200,231,193,
+226,169,196,193,147, 89,206, 56,210,152,205,103, 2, 32,165,243,153,165, 90,198,239, 87, 0,180, 47, 87,214,184, 94, 83,238,211,
+184,190, 74,247, 80,107,216,122, 3,190,119,225,194, 5,223,160,160, 32, 36, 39, 39, 87,232,217,102,124, 96,201,229,114,200,100,
+ 50,156, 63,127, 30, 0,238, 89, 19, 59,117,234,212,215, 40,201,146, 12, 0, 80, 40, 20, 33,225,111,135,157,239,208,187, 61,182,
+ 71,237,200, 75, 79, 79, 15,160,165, 57,112, 8, 33, 68,161, 80,140, 20,137,133,239, 52,105, 93, 63, 20, 28,183,244,196,175,127,
+ 44,176,117, 32, 77,154,183, 42, 4,160, 52,235, 69, 88,229,222,132, 0,192, 48,204,144,254,253,251, 51,241,241,241,120,231,157,
+119,240,195, 15, 63, 88, 45, 59,114,228, 72,236,220,185, 19,253,251,247,103,230,204,153, 99, 53, 77, 67, 89,239,136,125,205, 64,
+246,112,247,222, 13,108,219,241,157,213, 24, 35, 79, 79, 15, 0,192,179,103,153,166,101,193,193,182, 19, 49,115,122,205,241,235,
+ 87, 47,135,116,238,254, 10,155,146,145, 11, 78,175,134,170,224,185,105,125,113,110, 6,168, 94, 5,214,161, 22,188,107,187,224,
+218,133, 99, 26,173, 70,117,220,150,230, 71,253, 91, 97, 66, 63, 63,128,114, 24, 48,125, 19, 14,174,153,108,106,222,233, 58,104,
+ 10, 78,238, 90,101,119, 12, 95,121, 68, 34, 17,226,226,226,148,214,188, 87, 2,129,160,210,156, 90,128,209,203,168, 67,113,177,
+ 18,197,202,106,231, 79,173, 0, 33,196,195,203,203,235,219, 90,181,106, 73, 45, 25, 80,132, 16, 15, 15, 15,143,111,221,221,221,
+165,246, 54, 17,150,167, 92, 94,172,171, 17, 17, 17, 85, 50,178, 36, 18, 73,163,123,247,238,153,146,140,218,250,212,104, 52, 8,
+ 15, 15,183, 43,233, 40,165,244, 0, 33,228,161,143,143,207, 57,127,127,127,151, 7, 15, 30, 96,199,142, 29,172, 72, 36,170,111,
+188,127, 20, 20, 20, 64, 32, 16,224,217,179,103, 58, 0,239, 85,214, 68,166, 86,171, 99, 98, 98, 98,218,246,235,215, 79,144,144,
+144, 0,129, 64, 80, 82,175,144, 16, 4,174, 91,135,155, 31,127,140,208,199,143,161,210,106, 33,149, 74,113,244,232, 81,109,113,
+113,113,140, 53, 61,153, 76,182,225,209,163, 71,173,164, 82, 41,180, 90, 45, 56,142, 3,195, 48, 68, 40, 20,118,117,117,117, 93,
+ 13,160, 76,198, 98, 79, 79, 79,207,113,211,190,104, 97,208,235, 13,233,201, 15, 50,173,200,154,200,202,202,194,129, 3, 7,208,
+169, 83, 39,132,134,134,226,201,147, 39, 72, 76, 76, 68,159, 62,125, 76,101,110,220,184,129,235,215,175,163,105, 83,171, 45,237,
+ 38, 56,129, 14, 77, 91, 54, 2, 43, 98, 33, 98, 69, 37,159, 34, 81,233, 84,242,221,184,204,152,179,176, 18,104,249,214, 7, 71,
+199,146,166, 69,137, 68,194, 53,106,212, 40, 61, 61, 61,221, 7,128,192,152,128,213,158,151, 21,160,228, 25, 97, 52,174, 88, 49,
+107,242,100, 1, 64,110,110,174,170,127,255,254, 63,170,213,234,119, 81,141, 17, 69,120,254,149, 92,249,127,218,182,218,216,250,
+ 97,191,209,185,115,231,117,195,134, 13,123,101,229,202,149,112,116,116, 68,122,122,186,233, 65, 40, 22,139, 81,175, 94, 61,100,
+103,103, 99,253,250,245, 72, 77, 77, 61, 5, 96,156,189, 59, 78, 79, 79,191,120,255,207,123, 89,225,131, 59,187,183,234,220,194,
+ 53,229, 94,106, 39, 0,231, 75,141,171, 77,195,166,189,241,110,248,192, 14, 96,197, 34,164,220,183, 26, 71, 91,227, 8, 4, 2,
+ 1, 33, 4,239,188,243,142, 93,229,135, 14, 29,138,152,152, 24,216,106, 78,228,140, 30,172, 98, 21,138,148, 53,247,114, 54,241,
+163,145,152,248,209, 72,147, 17, 97, 79, 19, 11, 0, 40, 20, 63, 89, 93,199,233,181, 43, 15,254,180,126,108,187, 14, 33, 13,130,
+ 91, 53,194,165,171,127, 98,251,186, 23, 78,133,205, 95, 47,194, 23,155, 79,161,158,151, 27,180,234, 34, 28,222,243,221, 83,173,
+186,120,165,173,253, 85,230,148, 97, 8,129,157,249, 37, 95,108, 83,106, 52,137, 68, 34,180,110,221,218,170, 7, 43, 59, 59, 91,
+ 89,217, 3, 1, 40,189, 70, 26, 29, 10,139,148, 80, 22,215,140,129, 69, 8, 9,236,218,181,235,241,221,187,119,187,123,122,122,
+ 34, 45, 45,173,140,129, 69, 8, 9,236,210,165,203,241,221,187,119,187,123,121,121, 33, 37, 37,197,238,244, 32, 70,204,140, 43,
+100,102,102,146,156,156, 28,206,205,205,173, 74, 70, 22,195, 48, 80,171,213,184,125,251,182,189,187,181,187,199,151,139,139,203,
+150,157, 59,119,186, 60,127,254, 28, 2,129, 0,183,111,223, 46,211,139,208, 56,109,218,180,137, 29, 48, 96,192, 70, 0,109,109,
+233,233,245,250,229, 35, 71,142, 28,243,228,201, 19, 55, 79, 79, 79,164,167,167, 67, 44, 22,131, 82, 10, 18, 30,142,110, 15, 31,
+ 66,107, 48, 64, 38,147,225,238,221,187,216,176, 97, 67,145, 90,173, 94,110, 73,139, 16, 34,118,112,112,240,101, 89, 22, 35, 70,
+140, 40,179,110,235,214,173,120, 51, 88, 16, 60,182,151,164, 80, 15,169, 58, 67,246,250, 97,129, 64, 64,198,205, 88,218,188, 99,
+247, 62,173,239,220,188,244, 32, 51, 35,245,156, 37, 93, 51,116, 26,141, 6, 45, 91,182,196,149, 43, 87,112,226,196, 9,244,232,
+209, 3,161,161,161,136,141,141,197,177, 99,199,112,253,250,117, 16, 66,224,238,238,110, 12,179,176, 25,107,161, 41,210,227,217,
+147,172, 10,222,170,242,243, 44,203, 66, 45,174,208, 89,213, 34, 9, 9, 9,184,114,165,228,249, 83, 92, 92, 12,161, 80,168,159,
+ 49, 99, 6, 24,134,161, 55,111,222,132,167,167, 39,157, 53,107,150, 65, 40, 20,234,147,147,147,237,210, 52, 26, 83, 70,227, 74,
+200,138,202, 24,102, 28,199, 21,220,184,113, 99, 44, 33, 36,150, 16, 98,204,134,202,231,193,226,249, 71, 97,213,192,162,148, 62,
+ 4,208,147, 16, 50,124,255,254,253,203, 87,175, 94,237,209,183,111, 95,228,228,228,160, 65,131, 6,240,241,241,193,193,131, 7,
+113,232,208,161,231, 6,131, 97, 58,165,180,130,171,135, 16,210,211, 90,174, 12, 74, 41, 85, 40, 20,187,213,133,133, 19,130, 66,
+253,112,106,215,217, 40, 31, 31,159,113,117,234,212,153, 26, 17,249,214,187, 97,253,219,227,238,245, 71,184,120, 44, 14, 25,201,
+207, 17,209,109,150, 77,205,242, 65,238,174,174,174, 99, 28, 28, 28,196, 0, 42,220,101,202,247, 34, 52,215, 52, 24, 12, 6,141,
+ 70,131,159,126,250,201, 46, 35,107,199,142, 29, 80,169, 84, 48,148,107, 71, 53,215,164, 28, 37, 66,145, 4,138,122, 45,161,213,
+ 22,129,227,170,231,173, 49,215, 36,132,128, 97, 24, 60, 16,139,225,249,252, 57, 46, 93,170,208,146, 97, 17,243, 55,231,242,154,
+ 0, 64, 41, 85, 17, 66, 70,172, 90, 60,227,224,164,217, 75, 93,123,116,110,139, 79,191,218, 10,173,118, 51, 24, 1, 3,153,132,
+ 69, 80,135, 46, 16, 64,141,111,163,103,230, 22,231,231,140,160,229,134,204,169,160,105,171, 37,133, 2, 6,142,195,137, 51,182,
+115,149, 90,186,238, 6,131, 1, 66,161, 16,247,239,223, 87, 90,234, 61, 40, 16,148, 52,103, 50, 12, 99,241,173,187,236, 53,226,
+136,136,149,162, 94, 3,127,104,212,133, 53,114,141, 60, 61, 61,103,238,219,183,207,221,152,242, 32, 54, 54, 22,132, 16,147, 21,
+ 99, 92,175, 84, 42,113,243,230, 77,227,144, 80, 21,172, 28, 91,255, 35,163,231, 42, 51, 51,147,164,167,167,195,193,193,129,137,
+141,141, 85, 7, 4, 4, 92,133,237,145, 26, 76,154, 42,149,234,177,181,248, 72,149, 74, 85, 71, 42,149,138,202,109,171,240,245,
+245,189, 91,190,169,208, 82, 61,243,242,242, 46,125,242,201, 39, 65,189,123,247,198,204,153, 51,179,221,220,220,156,190,253,246,
+ 91,161, 64, 32, 32,147, 38, 77, 50, 60,123,246,172,240,187,239,190,115,217,191,127, 63,114,115,115, 43,140, 10, 96,225,247, 89,
+ 64, 8, 25,219,185,115,231,173, 71,142, 28,113,240,245,245, 69,126,126, 62, 40,165,216,178,101, 11, 38, 77,154, 4,169, 84,138,
+187,119,239,226,205, 55,223, 44, 46, 46, 46, 30, 91, 62, 54,210, 76,147, 16, 66, 40,199,113,152, 55,111,158, 41,169,168, 49,201,
+168,147,140, 96,195,180,198,242, 41,223,229,201,135,127,250,221, 40, 0, 48,232,245,134, 59, 55, 47, 61,216,178,230,211,211, 44,
+203,158,177, 86,207, 82,230, 78,153, 50,229,219, 62,125,250,200, 28, 29, 29,145,157,157,141,115,231,206,225,194,133, 11,184,120,
+241, 34, 52, 26, 13,220,221,221,225,230,230,134,244,244,116, 36, 36, 36, 40, 1,204,181,165, 41,150,139,208,164,133,177, 39,239,
+ 11,239,149,105,158, 21, 65, 36,124,209,147,176,178,243, 9, 0,221,187,119, 71,199,142, 29, 1,148,244,138, 78, 74, 74, 74, 87,
+171,213,196,204,216,127, 2,148, 24,226,245,235,215,215,111,218,180,137,218,210,188,184,225, 27, 28,249,108, 46,196, 44,139,233,
+183, 83, 76,198,214,214, 30,237, 32, 18,179,240,235, 55,200,180, 45,165,116, 45, 33,100,115,233,119,181, 53,205,154,128,215,252,
+251,107,254,211,168,212, 53, 75, 41,221, 78, 8, 57,252,193, 7, 31, 68, 7, 6, 6,126,176, 98,197, 10,194,178, 44, 22, 44, 88,
+ 64,211,210,210,190, 71,201, 91,135,213, 33, 72, 42,209,254,254,247,189,231,199,143,158,221,159, 76, 91, 25,209,245,234,201,155,
+ 9,109, 58,251,162, 77,103, 95, 92, 61, 21,143, 53,145, 59,126, 48,232, 12,243,210,211,211, 43,123,109, 82,247,236,210,162,124,
+144,187,123,204,233,147,238, 85,237, 69,200,113,220,238, 29, 59,118,124, 52,112,224, 64,230,242,229,203, 21, 98,174,104,105, 50,
+ 62,142,227,112,252,248,113,104,181, 90,124,255,253,247, 28,199,113,214,243, 96,129,254,178,106,101,244,232,239,183,253, 34, 22,
+179, 4, 23,206,252,140,188, 28,219, 94, 57,150, 21, 97,211,150,189, 90,150, 21,221,177,180, 94,171,213,166,156, 60,121,210,235,
+ 53,131, 65,196, 48, 76, 5,195,201, 26,187,119,239,214,113, 28,151,100,171, 12,165,244, 60, 33,162,126,159,207,124,111, 71,159,
+183, 63,240,234,220,185,171,168,182,167, 23, 8, 33,120,150,241, 12,119,111, 94,214, 29,254,121, 99, 70, 81,113,129, 93, 67,229,
+188,247,229,239,166,152, 43, 0,232, 59,105,181, 41,254, 10, 0,250, 69,124,130,240, 78,173, 64,236,113, 53,149, 98, 48, 24, 56,
+189, 94, 15,185, 92, 14,189, 94,111, 49, 85,131,139,139,139, 76,165, 82, 41, 41,165, 48, 24, 12, 54, 93, 67, 20,168,241,107,100,
+ 48, 24,252,114,114,114, 80, 84, 84,132, 11, 23, 46,208,197,139, 23,103,102,102,102,154,130, 49,117, 58,157, 95,118,118, 54, 10,
+ 11, 11,113,254,252,121, 26, 29, 29,157,153,149,149,101, 43, 88,179, 2, 50,153, 44, 88, 40, 20, 94,205,201,201,225, 28, 28, 28,
+ 24,157, 78,167, 11, 8, 8,144,200,100, 50,187, 7, 58, 79, 75, 75,171,144,132,213, 72,211,166, 77,239,221,187,119,175,153,193,
+ 96, 48, 31,163,144, 85,169, 84,190,157, 59,119,182,167,105,103,202,230,205,155,177,119,239,222, 14,249,249,249, 35,147,146,146,
+182, 2,232, 32, 20, 10,241,231,159,127,222, 86,169, 84,195, 6, 14, 28,184, 37, 39, 39,231, 18,128, 41,246,212,151, 82,122,132,
+ 16, 50,194,207,207,111,243,194,133, 11, 29, 67, 67, 67,133, 10,133, 2,237,219,183,199,221,187,119,241,219,111,191,233,214,174,
+ 93, 91, 84, 92, 92,252, 30,165,212, 86,243, 53, 5, 64,244,122, 61,196, 98,177,105,146, 72, 36, 96, 89, 22, 5, 74,138,247,191,
+ 74, 84,234, 33, 83, 46, 95, 48,246, 55, 10,144,167, 41,137,207,159, 61, 77,185, 68, 8, 57,147,150,150,102,113,168,156,166, 77,
+155,138, 85, 42, 85, 91, 31, 31, 31, 33, 33,100,165, 86,171,125,119,242,228,201,222, 75,150, 44, 65,139, 22, 45,240,252,249,115,
+200,229,114,248,250,250, 34, 51, 51, 19,151, 47, 95, 54, 20, 23, 23,175, 3,176,136, 82,106,179,217, 49, 55, 51, 31,117,189,234,
+151,241,116, 82, 74, 65,245,128,206, 96,128, 65, 75,161, 33, 58,136, 68, 58,176,172,133, 76,184,229, 48, 26,152, 57, 62, 62,120,
+114,244, 40, 74, 71,149,176,234, 69, 59,120,240,160,181, 85, 47,160, 28,196, 18,113,153,102, 65, 66, 8, 88,177, 24, 34, 49, 91,
+161, 71, 12,239,181,226,249,167, 98,111, 44, 69, 46,128,113,132,144,173, 97, 97, 97, 7, 41,165, 34, 0,125, 40,165,103, 95,102,
+231,233,233,233,215, 20, 10,197, 28,175,186,110,209,175,143,236,138, 22,109, 27,192,160, 55,224,220,161, 63,241,253,146,253, 59,
+159,164, 60,137,160,118,180, 29,113, 28,119,186, 75,112, 11, 6,102,185,181, 21, 10, 5, 87,157, 94,132,121,121,121,243,167, 79,
+159,142,153, 51,103, 86,185, 23,161,181, 50,177,183,159,141, 11,244,243,168,219,239,245,110,175,129, 48, 84,163,177,126, 63, 33,
+ 4,166,140,163, 44, 43,186,115,249, 70, 90,128,165,114,153,153,153,175,189,251,238,187,199,133, 66,161,221,193,201, 64,201,224,
+175, 25, 25, 25,175, 84, 86,142, 82,221, 57, 66,136,239,129,157,235, 63, 62,178,119,243,107, 28,103,104, 74, 0, 8,132,236, 3,
+157, 86,123, 84,173,204, 95, 81,222,115,101,141,101,227, 66, 48,101,213, 49,124, 51,179, 31, 38, 71,239,194,198,121,239, 99,206,
+ 87, 59,176,116,230, 20, 44, 94,253, 35, 62,157, 50, 2,131,135,191,203, 81,194,252, 97,239,113, 8, 4,130, 35,235,215,175, 31,
+253,254,251,239,155, 58, 35, 80, 74,203,220,208,117, 58,157,146,227, 56,172, 91,183,142, 3,112,196,150, 94,217,107, 68,168,173,
+120, 40,123,175, 81,126,126,254,123, 33, 33, 33, 91, 0, 72, 40,165,247,115,114,114, 62,164,148,154,134,112, 42, 44, 44,124,175,
+115,231,206, 91, 40,165, 18, 66, 72,133,245,246, 80,154,178, 33,216,205,205,237,106,169,231, 74, 82,157, 64,119, 27, 8,108, 52,
+ 31, 86,218, 84, 88,250,255, 53, 13,127, 67, 8, 89,210,161, 67, 7,243,193,158,111, 3,176,219, 24, 52,211, 61, 78, 8,105, 53,
+111,222,188,143,165, 82,105,120,113,113,113,115, 0,144,203,229,119,213,106,245,105,165, 82,185,162,244,190,101, 75, 67,227,224,
+224,112, 87,175,215,183,246,240,240, 40,233, 33, 91,106,100, 1,192,175, 87, 13, 87, 41,213, 87,121,212,248, 67,135, 14, 53,116,
+115,115,123,149, 16, 50,152, 82,218,178,160,160, 64,253,159,255,252,231,194,222,189,123,115, 27, 52,104,240,122,159, 62,125, 72,
+173, 90,181,112,229,202, 21,154,149,149,245, 51,128, 72,123,122, 78,115, 28,151,180,108, 89,213,198, 22,172,236,101, 57, 55, 16,
+215, 0, 0, 32, 0, 73, 68, 65, 84, 74,171,213, 62, 61,116,232, 80,237,222,207,158, 9,107,113, 92,153, 30,142,150, 58, 92,220,
+185,115, 7,106,181,218,102, 18, 70,117, 94, 14,122,124,252, 9, 80,218,155,211, 72,137,231,138,130,218,184,255,241,240,252,147,
+ 32,127, 73, 55,102,163,184,157, 46, 68,133, 66,241,142, 84, 46,153,216,160,185, 79, 64, 90,226,179,248,130,188,226, 31,210,211,
+211,215, 83, 74, 43,220,192,237,213,172, 74,162,209,255, 21,247,233,255,162,230,139, 60, 88, 6, 80,106, 0,229, 40, 40,229,192,
+113,134,146,129,168, 41, 7,106, 48, 16, 66,240,135,186, 56,207,106, 38,239,242,245, 36,132,184,213,174, 93,123, 17,165,180,183,
+ 64, 32, 96,204,157, 95,230,223, 75, 61, 87, 71, 50, 51, 51, 63, 45,239,105,253, 95, 60,159,123,246,236,177,104,244,219,219,139,
+112,240,224,193,134,170,212, 83,161, 80,156,150,203,229, 22, 19,106, 22, 21, 21, 37,167,165,165,189,106,169,158, 53,133,189,154,
+ 70,239, 39,181,227,134, 86,174,169,189,202,189, 8, 43,211,108,216,176,161, 68,171,213,182, 3,208, 28,128, 43,128,108,157, 78,
+119, 36, 51, 51, 51,131, 16, 18, 12, 96, 94,233,102,159, 81, 74,175,218,163, 89, 83, 88,248, 31,201,106,215,174,189,153, 97,152,
+ 74, 7, 34, 7, 0,189, 94,175,201,206,206, 30,109,254, 34, 96,174, 89,187,118,237,171, 66,161,176, 82, 45,189, 94,159,250,252,
+249,115,171,134,245,255,226,127,147,215,228, 41,207,223,162,247, 70, 90, 90,218, 79, 0,172, 71, 94, 87, 3,107,153,218,121,254,
+187, 20,101,167,255, 37,215,161,212, 88,178, 58,120,243, 63, 21,163,129,100, 97,185,105,156,193,154,196,206,116, 12,255,239,216,
+ 99, 88, 89,217,238, 18,236, 72, 46, 90, 21, 30, 63,126,172, 6,112,190,116, 42,191,191,171, 0,250,213,228,254, 94, 6, 74,169,
+ 18,128,125, 61,122,236,192,150,209,196,195,243,111,163,242,254,235, 60, 60, 60, 60, 60, 60, 60, 60, 60, 85,130, 0,232,105,105,
+ 69, 85, 92,127,132, 16,139, 26,182,168, 76,159,215,228, 53,121, 77, 94,147,215,228, 53,121,205,127,158,230,191, 6, 90,154,240,
+241,175,152, 0,244,228, 53,121, 77, 94,147,215,228, 53,121, 77, 94,147,215,252,183, 77,124, 19, 33, 15, 15, 15, 15, 15, 15, 15,
+ 79, 13, 99,183,129,229,232,237,231,231,209, 48,112, 75,173,122, 1,177,181,234, 5,196,122, 52, 12,220,226,232,237,103,215, 40,
+245,255, 52, 8, 33, 50, 66,200,112,145, 72,116,220,199,199, 39,159, 16, 98,113,136,156,255,117, 8, 33,206,132,144,193,132,144,
+ 69,132,144, 1,132, 16,135,154,212, 15, 35, 68, 56,148,144,137,163, 9, 73, 30, 77, 72,242, 80, 66, 38,134, 17,242,183,232,120,
+ 81,147, 44,156,162, 8, 57,123,100,196,225,133, 83, 20, 33, 22,215,207, 80,184, 95, 58,254,246,170,168, 73,117,106,213,196,254,
+ 8, 33, 78, 94, 94, 94, 27,188,189,189, 31,123,121,121, 37,121,121,121,109, 38,132,184,212,132, 54, 15, 15, 15, 15,143,125, 8,
+ 1,128, 16, 18, 10,224,119, 0, 97,148,210,152,242,133,106, 53,104,243,190, 95,203, 22, 51, 63, 95, 48,151,120,212,118,147,233,
+116, 6,109, 74,106,186,255,252,207,163,246,212,106,208,102,121,118, 82,220,198,170,238,152, 16, 66, 4, 2,193, 59, 18,137,164,
+ 47, 0,163,161,118, 91,173, 86, 31, 52, 24, 12, 63,209, 82, 31,100,101,120,123,123,159, 17, 8, 4, 13,171,178,111,131,193,144,
+252,244,233, 83,235,217, 70,109, 64, 8, 25, 82,191,126,253,205,161,161,161, 14, 29, 58,116,128, 88, 44,198,188,121,243,166, 3,
+ 88, 97,175, 70,173, 90, 77,157,180, 18,233, 84,161, 88,220,139,254, 31,123,223, 29, 22,213,181,189,253,238, 51,125,152,161, 13,
+189,216, 0, 65,154,130,189,247, 18,149,216, 34, 26, 99,143,137,122, 53, 38,150,196,222,141, 26, 91,212,104,172,177,107,108,216,
+107, 20,123, 55, 88, 16,176,128, 32, 8, 2, 67, 25, 6,152, 62,103,246,247, 7, 37, 72, 40,131,201,253,238,239,230,206,251, 60,
+243,204, 41,251,188,103,157, 51,195,225,157,181,214, 94,203,160, 11,166,160, 0, 35,140, 54, 25,181,151,249, 90,237,154,156,156,
+248,252,234, 89, 0, 66,200, 44, 0, 35, 81, 52,173,124, 59,165,180,102, 69,114,202, 97,100, 99, 98, 48,176, 69,223, 9, 62, 23,
+172,173,173,237,213,217,179,103,115,195,194,194,176,125,251,246,182, 91,183,110,253,146, 16,114, 25,192, 73, 74,105,252, 95, 57,
+ 23, 0,184, 0, 99, 91,183,109,187,110,196,212,169, 28,245,245,235, 88,183, 99,199, 90, 40,149, 0,176,177, 38, 60,132, 16,194,
+231, 99,160,163, 35, 47,140, 82, 52, 38, 0, 33,192, 35,121,182,233,172, 94,207, 30,164, 53,237,195,243, 62,247,103,120,127, 90,
+253,254,154,114,228,197,211, 57,194,143, 3,218,229,197, 95,153, 3,160,103,249,253, 70,141,104, 4,229,212, 10, 83,211,168, 20,
+ 0,171, 63,212,214, 98,123,173,156,156,156,158,156, 56,113,194,179,121,243,230, 92, 0,120,248,240,225,240,176,176,176,206,132,
+144, 96, 74,169,242,175,240,255, 5,187, 68, 92,134,153, 32,224,241,186,177, 44,219, 16, 0, 56, 28,206, 83,157,193,240,155,209,
+100,218, 72,205,172,169,102,129, 5, 22,252,115, 81,157, 22,249,111, 67,137,183,224, 42,165,148, 16, 66, 40,202, 77,245,150,186,
+248, 7, 6, 5, 5, 76, 61,127,108,119,173,188, 28,133,230,167,213,123,162, 10, 56,252, 66,191, 0, 95,193, 79, 63,174,180,155,
+240,245,148,111,164, 46,254,247, 10, 50,226, 98,204, 61, 41, 33,164,182, 88, 44,142, 88,181,106, 85,112,167, 78,157,120,206,206,
+206,200,200,200, 64,108,108,108,112,100,100,100,191,221,187,119, 79, 37,132, 12,160,148,154,211,248,202,247,242,158, 29,206, 18,
+153, 3, 88,131, 1,238,141, 26,151,196,135,241, 42,242, 34,140,122, 61, 76, 6, 3, 2,194,250, 1, 0, 76, 38, 19, 2, 3, 3,
+205,107,218,247,103,187,221,131,130,130,246, 46, 93,186,148,175,213,106,113,239,222, 61, 92,185,114,197,244,238,221,187,229,230,
+114, 72, 93,252, 58, 49, 98,201,193,193, 67,191,176,237, 27,230,197,171,237,226, 4,192, 10,207, 19,141,173,207, 93,140,108,118,
+236,224,206,127, 73, 93,252, 6, 23,100,188,184, 82, 21,143, 76, 38,107, 73, 8,249,190,164,162, 51, 33,100, 69,189,122,245,230,
+149, 29, 83,190,175, 29,165, 20, 92, 46, 55, 35, 63, 63,127,112, 86, 86, 86, 84,121, 78, 3, 11,238,254,253, 69,250, 97,206,132,
+207, 56, 55,111,222,148, 4, 6, 6,106, 1, 96,229,202,149, 88,180,104,145,224,194,133, 11,189,246,236,217,211,139, 16,178,150,
+ 82,122,210,220,235,174, 8,124,224,187, 17, 83,167,114,164, 73, 73,144, 62,126,140,161, 74, 37,247, 7,224, 59,212, 64, 96, 17,
+ 66,188, 92, 93,121, 71,166, 78, 25, 21,224,237,211,146,207,231, 59,130, 82, 10,189, 46,203, 47, 57, 57,106,224,242, 31,182,206,
+ 32,132,124, 66, 41, 53,171,210, 44, 41,242,160, 45, 4, 32, 2, 48, 7,192, 92,185, 92,238,203,178, 44, 92, 93, 93,231, 18, 66,
+142, 3, 88,226,228,228, 68,229,114,249,116, 74,105,165, 61,117, 22,126,237,222, 74, 25, 79,231,164, 19,239,143, 26, 52, 25,129,
+116,114,254,163, 41, 61,221,206,217,248,144, 37,243,215,165,221, 1,128,158, 62, 62,214,222,254,146,233, 82,155,134, 50,101,234,
+165,233, 61,125,124,182,157,139, 55, 79, 96,151,179,155, 0,128,187,187,251,202, 61,123,246,212,106,209,162, 69,233,119, 60, 52,
+ 52,148,179,114,229, 74,143,201,147, 39,175, 5, 48,202, 76, 62, 63, 39, 39,167, 11, 44,203,106,179,179,179,253, 74,182, 59,135,
+ 12,104,237, 96, 45,233, 34,207,205,191,158,245,236,248, 53, 51,185,154,139,248,252,163, 39,247,174,115, 11,109,209,138,145, 58,
+ 58, 67,147,154,134, 2,131,190,235,149, 91,119, 59,126, 57,225,187,175,139, 63,163,170,251, 37, 89, 96,129, 5,255,116, 84,170,
+ 69,254, 27, 81, 26,142, 41,190,160, 63, 65, 40, 20,204,152, 63,123, 58, 81,100, 43,212,218,252, 2,157, 81,163, 81, 51, 60,147,
+230, 73,236,235, 76,134,203, 81, 76,153, 52,201,122,250,172,217, 51, 0, 12,173,232,248,242, 32,132,212, 14, 9, 9,185, 31, 17,
+ 17,225, 44,147,201,144,151,151,135,236,236,108,220,191,127, 31,148, 82, 12, 24, 48, 64,216,162, 89,179,198,115,230,206,189, 67,
+ 8,105,101,142,200,146,200, 28,177,178,109, 81,143,216,121, 73,217, 37,231,193,214,240,176,210, 49,139,222, 22,117,181, 16,137,
+ 68,165,141,130, 63, 0,173,186,116,233,194, 7,128,207, 63,255, 92,153,159,159,191, 12,192,126, 74,105,170, 57, 7, 75, 93,252,
+ 58, 57,186,185,159,222,180,121,165,184,161,143, 47,244, 6, 35,222,164,167,129,203,179,131,167, 39, 31,163,134,118,227,181,111,
+ 45,115,252,126,241,214, 51, 18, 39,191,254,133,242, 23, 23, 42,227,178,179,179,219,125,240,224, 65, 28, 58,116, 8, 0,240,226,
+197, 11,248,250,250, 74,170,179, 33, 58, 58,218,187, 79,159, 62,191, 2,168, 95,221,216,242,133,236,133, 66, 33,218,182,109,139,
+192,192, 64,156, 56,113,162, 35,128,191, 36,176, 0, 64,125,253, 58,164,143, 31, 3,215,174,213,248, 88, 66,136, 87,147, 38,117,
+238,158, 61,179,215,241,204,217, 88,172, 94,189, 3,241,241, 69,142, 53,111,111,111,124, 54, 36,156,247,244,233,237,160,129, 3,
+ 63,187, 77, 8,105, 75, 41,125, 97, 6,237,194,109,219,182,205,170, 87,175, 30, 6, 14, 28, 24, 30, 20, 20,228,106, 99, 99,131,
+ 45, 91,182,192,205,205,205, 91,167,211,189, 58,113,226,132,123,122,122, 58, 38, 77,154, 4, 0, 83, 43, 35,234,216,163,227, 28,
+225,199, 1,237, 26, 52, 25, 1,169,141, 27,182, 29, 56,136,231,191,239,110,167,213,199,206, 89, 54,209, 99,152,154, 10, 71,122,
+250, 90,207,168,219,180,131, 67,253,160, 62,168,211, 36,202, 81,195,222,120, 61,119,130,247,114,174, 72,179,123,254,170,180,236,
+ 63, 93,115,248, 17, 78,176, 50, 78, 22,253, 27,178, 41,157,111, 42, 22, 86,165, 15, 34,150,162, 79,251,246,237, 75, 63,184,164,
+164, 36,104,181, 90, 4, 4, 4, 48, 58,157,206,172,154, 86,132, 16,191,238,221,187,223, 60,123,246,172,131,159,159,223,123,173,
+ 91, 92, 29,236,122, 92,139, 88, 59,233,251,117,251,252,157, 3,251, 43, 50, 99,142, 61,173,134,171,121,155,150, 77, 46,157,139,
+216, 43, 37, 5, 41, 16,216,101, 1,166,108, 36,252,250, 11,136,149, 12,131,199, 79,225,118,234,210,217,163, 91,207, 79, 46, 17,
+ 66,186, 80, 74,255, 35, 93,239, 45,176,192,130,255, 27,168, 76,139,252, 55,162, 84, 96,149, 81,141,239,193, 68, 77,141, 92,157,
+ 29,196,107, 87,237,122,192,209,235,116, 86,118, 54,122, 91, 27, 91, 10,107, 27,142,222,160, 47,168,237, 91,143,111,162,166, 10,
+ 91,133,208,114, 83, 53, 9, 33, 68, 44, 22, 71,156, 60,121,210,153,199,227,193,100, 50,193,201,201, 9,137,137,137, 80, 40, 20,
+200,207,207, 71,124,108, 44,234,213,174,133, 5, 51,166,187, 77,154, 62, 35,130, 16,210,180,108,184,176, 60, 39, 0,176,134,247,
+251, 57,151,180, 74, 41,143,146,109,229,247, 85,196, 89, 9, 18,147,147,147, 33,149, 74, 17, 28, 28, 44,189,117,235,214,141,202,
+196, 85,121, 78,153,204,199,154, 43, 21, 31,250,121,211, 92,177,222, 16,141,152,132, 28, 52,168,215, 14, 46, 14,181,145,150,163,
+195,221,251, 39, 17,253,100, 63,124, 60,106, 99,226,248,206,162,229, 43,143, 28,180,183,247,170,157,155,251, 90, 89, 17,167, 82,
+169,148,122,121,121,161,118,237,162,190,100, 44,203, 34, 38, 38, 6, 44,203,150,174,151,125,223,117, 52, 18, 70,229, 27,140, 24,
+ 62, 28,217,217,217,210,138, 56,121, 28, 24,167,124,249, 25, 87,204, 3, 4, 18,153,174,160,160,160,212, 27,168,215,235,241,232,
+209, 35,180,106,213,170,195,225,195,135,175, 85,117,147,204,189,159,122, 96,197,186,157, 59,215, 15,205,203, 99, 0, 96, 59, 33,
+ 38, 61,165, 43,204,225, 36,132, 16,103,103,222,209,243,231,246, 56,114,152, 56,200,108,127,192,253,251,111,160,215, 23,217,155,
+157,157,137,175, 38, 40,193,231, 89,227,196,137,125, 14, 1, 1,109,143, 22,135,200, 76,149,113, 22, 67,116,238,220, 57,124,245,
+213, 87,136,137,137,113,231,112, 56,184,119,239, 30,196, 98, 49, 86,173, 90,197, 9, 8, 8,112,151, 72, 36, 56,127,254, 60, 50,
+ 50, 50,254,244, 37, 43,203,121,245,194,213, 37,121,241, 87,230,164,147,243, 31,109, 59,112, 16, 95, 12, 25, 12, 87,154,112,195,
+214,135, 44,233,254,113,155,121,148, 83, 43, 76, 98,221,200,222, 55,248, 99,240, 5, 82, 76,252,110, 17, 94, 68,159,178, 87,229,
+ 63,153, 64,216,148, 90, 40,238,205, 87,150,147, 30, 30,200,174, 63,112,187,201,111,181, 31,212,113,111, 50,246, 30,128, 39, 40,
+ 21, 88,222, 92,194,176,182,197,199,224,213,171, 87,136,143,143, 7,151,203,133, 90,173,134,209,104,172,208, 78, 15, 15,143,177,
+ 70,163,113, 30, 0,232,245,250, 93,110,110,110,163,247,238,221,235, 80, 86, 96,151,120,174,114, 20,202,220,219, 15,158, 61,159,
+ 50,118, 96,199,235,119,163, 83,236, 66,250, 37, 43, 30, 31,207,171,228, 51, 18,137, 5,130,163,231,143,237,147, 26, 94, 71, 66,
+ 18,208, 17, 60,169, 47, 88, 67, 42, 84,185,133,200,143,127, 7,237,166, 13, 8,157, 48, 25,167,142, 31,145, 6, 53,108,122,152,
+ 16,226, 75, 41, 45,237, 83, 84,131,191, 77,179, 97,225,180,112, 90, 56,255,111,114, 22,243, 86,168, 69, 0, 52, 1,224, 82,188,
+156,141,162,212, 24, 71, 0, 89, 40,106,219,229, 2, 64, 7, 64, 80,230,152,242,235,101,199,150, 95, 47,187,156, 93,188,236, 92,
+252,254, 0, 64, 78, 77,175,165,218,132, 98, 66, 24,165,209,100, 18, 10,156,156,180,163, 7,117, 13,190,120,233,225, 35,137,131,
+ 45,183,123,167, 38, 29,238, 63,141,191,195,128, 49, 16,194,152,149,215,193,225,112, 6,175, 93,187,182,161,141,141, 13, 76, 38,
+ 19,108,109,109, 33,151,203,161,211,233,144,151,151, 7,109,190, 18,250,124, 37, 30,167, 36,161, 77,135,142,248,228,163,238, 1,
+251,142,159, 28, 12,224,215,170,120,221, 27, 53, 46,245, 92, 45,170,235, 80,186,125, 97,138,162, 84,108,253,208,216, 23,124,169,
+ 20,221,166,204, 48,199,212, 10, 65, 41,141, 18, 8, 4,231, 6, 12, 24,208,115,218,180,105,204,187,119,239,206, 19, 66,218, 80,
+ 74,171, 13,143,234,133,162,111,254,245, 77,152,189,189,148,226,240,111, 39,209,190,241, 16, 88, 9, 56,200, 86,234, 65, 8, 16,
+251, 44, 2,132,200,240,228,197, 59,180, 11,181, 65,247, 30, 1,210,227, 71, 98,167,225,143,252,159,242, 32,185,185,185,200,204,
+204,132,193, 96,128,193, 96,192,192,240,112,236,217,189, 27,133,133,133, 80,171,213,208,233,116, 96, 89, 22, 12,195,224,183,211,
+135,145,242, 58, 22,173, 91,181, 2, 42,113,189,238,138,162, 60, 66,200,221,231,207,159, 35, 54, 54, 22,111,223,190,133, 72, 36,
+130,171,171, 43, 22, 45, 90, 4,173,182,168,135, 88,120,120,120, 7, 0, 85,122, 46,204, 65, 60,176,245,181,209, 56,167,231,177,
+ 99,206,183,142, 29, 51,221, 57,121,242,173,168,160, 96,139, 57,199,242,249, 24,184,114,197,248, 6, 18,137, 4,111,147,215,194,
+223,159,143,169,147, 29,176,236,135, 44, 0,192,164,175, 60,209,172,169, 35,148,138, 35,112,116,158,133,245,235,191,246, 25, 57,
+114,205,112, 0,187,170,161,158,115,242,228,201, 79,124,125,125, 61,162,162,162,136, 64, 32,128, 88, 44,134, 88, 44,134, 72, 36,
+ 66,102,102, 38, 18, 19, 19,233,202,149, 43, 83, 81, 20, 66,172, 20,197, 97,192,158, 83,122,186,157,123,254,251,238,118, 30,156,
+215,143, 63,153,216, 54,233,201,221,168,252,139,191,221, 90,108,212,136, 82, 20,111, 47, 77,247,106, 22,229, 56,225,219,133,216,
+176,114, 62,158,223,187,158,227, 82, 91,185, 81, 76,180,187, 90,116,251, 51,103,199,142, 11,185, 19,230, 14, 50,142, 29,249,137,
+221, 41,151,219, 99,207,114,137, 60, 61,235,247, 85, 72,140, 82, 11,235, 55, 30,230,231,205,232, 34, 35, 35,197,237,219,183,135,
+ 70, 83,148,214,196,225,112,176,119,239, 94,147,209,104,172, 48,236,172,215,235,231,165,166,166,186,169,213,106,124,244,209, 71,
+147, 86,173, 90, 37, 41,233, 33,199,178, 69,133,227, 75, 60, 87, 75,126,220,115,225,155,121, 27,175, 92,248,245, 7,247, 37, 51,
+ 70,119, 28, 58,241,251, 43,168,164,207, 35,151, 97, 38,156, 58,182,195, 85,100,111,128, 88,214, 29,154, 12, 53,158,111,253, 2,
+ 42,165, 6,205,150, 44, 4, 32,128,206,192, 96,203,199, 3,193,115,112,199,252, 49,163,221,103,111,217, 54, 30,192,218,106, 62,
+ 35, 11, 44,176,224,127, 15, 46,132,144,211, 0, 48, 99,198,140, 89,203,150, 45,123, 70, 8, 57, 77, 41, 13, 3,128,146,229,146,
+ 49, 0, 80,209,122,201,216,242,235,229,151,103,206,156, 25,180,124,249,242,165,173, 90,181,250,245,246,237,219,175,241, 1, 2,
+139, 41, 62, 9, 41,251, 94, 22, 38,147,233,250,171,132, 36, 85,143,110, 45, 61, 78, 93,125,250,112,212,168,222, 93, 6,245,105,
+215,253,117, 74,102,156, 79, 29, 87,199,232,103,143,109, 76, 38,211,117,115, 78, 38, 20, 10,195, 58,119,238,204,205,205,205,133,
+149,149, 21,228,114, 57, 82, 83, 83,161,215,235,161,201, 83, 64,155,167,128, 70,145, 11,125, 94, 46,226, 31,222, 71, 35, 31,111,
+ 97,113, 18,124,149, 40,241,178,148,247, 76,149,245,100, 9,172,173, 33,180,182, 6,169, 97,120,144, 16,210,215,222,222,254, 46,
+ 33,100, 14, 0,232,245,250, 9,211,167, 79,207, 50,153, 76,248,254,251,239,109,164, 82,233, 97, 66,136,176, 58, 30,107, 39, 78,
+ 88,171,208, 96, 38, 46,241, 9,218,134,140,128,159, 87, 47, 36,102,168,145,149,175, 71,166, 66,143,102,237,127, 66,221,144,133,
+168, 21,186, 12,177,111,114,224,238,225,203,128, 43,172,178, 41,115, 70, 70,198,123,235,191, 30, 56, 0,149, 74, 5, 31, 31, 31,
+ 12, 25, 50, 4,211,167, 79,199,144, 33, 67,224,238,238,142,161,131,250, 96,254,252,249,200,204,204,172,206, 84,173,159,159,159,
+182, 78,157, 58,218, 58,117,234,104,245,122, 61, 10, 10, 10,160, 80,252,209, 55,183,248,126,127, 93, 29, 81,121,184,184,184,204,
+116,115,115,123,226,226,226,242, 76, 36, 18,157,125, 68, 72,156,182,110, 93,151, 54,253,250,145,192, 65,131, 56,201, 86, 86,228,
+ 26, 32,173,150, 8,128,163,140,215,187, 83,231,158, 2, 69,238, 14, 0, 69, 78,169,209,163,156,112,243, 90, 16,110,221,104,138,
+175, 38,248,128, 48, 34, 16, 70, 0, 85, 97, 36, 90, 52,111,197,183,179, 35, 85,126,151,138, 19,218, 31,181,105,211,198,125,226,
+196,137, 68, 40, 20, 98,210,164, 73,250, 49, 99,198,188, 28, 50,100,200,203,203,151, 47,179,117,234,212, 65,173, 90,181, 72,173,
+ 90,181,220, 0, 60, 42, 62,166, 74,216,248,144, 37, 90,125,236, 13, 59, 95,201,107, 22,142,173, 11, 12,194,129,243, 87,165,101,
+ 47,222,152,176, 58,241,185,202,251,249,189,235,217, 47,163, 79,153, 18, 31, 92,205, 74,123,153,239,189,120, 99,194,234,153, 27,
+ 82, 43,252, 99,190,118, 13,166,136,211,215,244,170, 66, 21,183,223,199,157, 84, 99, 63, 31,236, 39,147, 6,237,133, 71,247,144,
+186,181, 61,135,206, 95,186, 94, 63,102,252, 55,250,237,191,236,160,249,249,249, 80, 42,149, 88,191,126,189,241,212,169, 83,169,
+ 44,203,126, 83,137,137, 28, 0, 48, 24, 12, 24, 59,118,172,196,198,198, 6, 41, 41, 41,165, 30, 80, 0,120, 39,207,126,122,235,
+ 65,116,220,148,113,225, 29, 10,181, 90,237,133,171, 15, 99, 3,125,235,120, 18, 66, 43,157, 96, 34,224,241,186, 53,109,209,130,
+ 67,169, 2,132, 91, 27,241,187, 87, 66,153,158, 3,101,102, 14, 56, 60, 9,140, 16,194, 96, 18,192,174, 81,115,188,120, 16, 5,
+ 15, 39, 23,174,144,199,179,180,184,178,192,130,255, 81, 84,165, 69,202,140, 9, 91,190,124,249,210,170,246,151,121,215,149, 91,
+ 47, 21, 80,229,197, 87,217,101, 0, 88,190,124,249, 82, 74,105,216,237,219,183, 15, 0,168,178,193,121,101,168, 86,109,112, 52,
+186,101,211,166,207,129,173,141,216,182, 69, 99, 95,215,227,231,175,254,126,253,246,195,216,186,158,142, 78,212,160,179, 95,177,
+102,131, 39, 81,169,205, 77,242, 14,112,116,116,132, 94,175,199,171, 87,175,240,246,237, 91,232,245,122, 24, 11, 11,161, 85, 40,
+160,201,205, 5, 91,152, 15, 62,203, 66, 45,207,132,131,149, 8,248, 99,134, 97,149,168, 40, 44, 88, 54, 36, 40,178,177,129,208,
+218, 6, 12,143, 87, 97,248,176, 18,206, 38,205,155, 55, 63, 20, 29, 29,221,162,107,215,174,139, 9, 33,182,148,210, 55,169,169,
+169, 93,230,206,157,171,117,113,113,193,216,177, 99, 27, 0, 24, 81, 29,151, 80,160, 11,168,227,218, 0,126,222, 35, 80,183, 86,
+103, 40, 10, 13,144, 43, 13,200, 84,232,177,229,167, 86, 56,186,189, 57,110, 30,109,135,232, 11,221,160, 48,184, 66,234,222, 23,
+148,213, 5, 85,197,121,251,246,109,108,222,188, 25,155, 55,111,198,166, 77,155,176, 97,195, 6,228,230,230, 34, 56, 56, 24,201,
+201,201, 56,119,238, 28,222,189,123, 7, 71, 71, 71, 60,122,244, 8, 91,182,108,193,253,251,213,231, 17,155, 51,129,147, 82, 90,
+227, 88,185,209,104, 28,249,174, 95,191,134, 25, 50, 89, 96,227,198,141,123, 78,154, 52,201,187, 77,155, 54,165,251,189,188,188,
+106,139,197,226,116, 66,200,118, 66, 72,104, 85, 92, 38,160,177,147, 83, 48,116,218, 56, 0, 0, 33, 60, 16, 34, 66,231,110,177,
+104,211,238, 33,244, 6, 62, 24, 34, 4,195,136, 96, 52,102,195,222,222, 29,148,146,224,106, 76,156, 43,151,203,125, 47, 93,186,
+196, 36, 38, 38, 66, 36, 18, 1, 64,210,130, 5, 11, 54,172, 94,189, 58,198,193,193,129, 61,125,250, 52,142, 31, 63,142,176,176,
+ 48,206,152, 49, 99,124,107,213,170,181,185,186,235,158,191, 46,237,206,254, 53,231, 62,229, 25,236, 67, 69,226,186,245, 80, 40,
+237, 59,161,163,147, 4, 0,206,197,199,231, 59,215, 86, 46, 47,204,127,146,108,231, 89,240, 67,117, 9,238,148,206, 55,253,254,
+ 50,238,238,254, 99,231,243, 50, 51,114,121,141, 27, 6,169,151, 45,250,150, 95,183, 94,253, 21,243,167,143,115, 77, 85,138, 20,
+221, 38,157,139,139, 56,127,191, 96,216,168, 47,140,159,127, 57, 81,115,238,252,111,199, 76, 38, 83,195,202,102, 16,154, 76, 38,
+188,123,247, 14,207,158, 61, 67, 66, 66, 2,228,114, 57,178,178,178,144,159,159, 95, 26, 86,180,202, 87,158,217,176,243,212, 99,
+137, 88,108,213,162,161,111,237,123, 81, 49,153, 18,177,216,202,183, 94,109, 63, 66, 22, 86,248, 28, 97, 89,182,161,200, 74, 12,
+128, 64, 17,125, 29, 5,185, 5, 40, 80, 20, 32, 63,167, 0, 90, 61, 7, 26, 45, 3,181,142, 65,157, 14,221, 81, 80,168, 65, 65,
+118, 30, 76, 44, 27, 82,221,253,180,192, 2, 11,254,119, 65, 8, 57, 61, 99,198,140, 89,102, 14, 55, 59,140, 89, 94,112,205,152,
+ 49, 99, 22, 33,228,244,204,153, 51,131, 96, 70,206,114, 69,168,182, 76, 67, 86,214,139, 2, 27,167,192, 1,147,191,155,119,238,
+192, 47, 27,157,116, 58,117,178,163,189,148,181,182, 18,218,143, 25,251, 61,242, 11,114,251, 23,152, 89, 86, 0, 0,114,115,115,
+241,250,245,107,136,197, 98,240,121, 60,176,106, 53, 88,117, 33,212,185,217, 96,244, 90,240, 89, 22, 50, 43, 49,234,184,187,162,
+174,139,171, 89,156,175, 34, 47,150, 38,180,151, 13, 11,174,108, 30, 0,129, 68, 10,129,181, 20,255, 58,125, 21, 0,192,231,243,
+129,185,139,171,229, 36,132, 56,122,120,120,156,220,191,127, 63, 95, 46,151,227,209,163, 71,143, 41,165,121,132, 16,107, 0,166,
+216,216,216, 75,209,209,209, 97,190,190,190, 0,224, 83, 29,159, 50,139, 97, 13, 70,138,148,244, 36, 36,190,141,130,204,214, 11,
+ 60, 43, 63,100, 42,244, 16,138,189, 96,208,254, 17,101,212, 40,223, 64,173, 55,111,162,163, 94,175,135, 94,175,135,193, 96,128,
+ 86,171,197,176, 97,195,112,235,246,109,252,122,252, 50, 94,199,191, 64,131,122,174, 24, 62,124, 24, 66, 67, 67,241,224, 65,213,
+249,195, 35, 27, 19,195,236,246,224,174,233,201, 64, 32,117,208,182,156,126,225, 94, 85,227, 75, 68, 86, 85,191, 54, 74, 64, 8,
+ 89, 29, 22, 22, 86,255, 69, 97, 33,158,197,197,161,235,130, 5, 0,128, 51,103,206,148,142,209,233,116,152, 50,101,138, 32, 38,
+ 38,230,243,135, 15, 31,126, 78, 8, 89, 67, 41,173, 56,137,156, 2,103,206,220,193,184,113, 49,144,203,139,242,176, 15, 30,248,
+ 67,143, 38,190,214,227,163,222, 69,145, 43, 59, 59, 59,172, 89, 83,157,182, 42, 2,203,178,216,186,117,107,105, 88, 16, 0,184,
+ 92,110,155, 41, 83,166, 12,168,104,124,253,250,245,249,213,113, 78, 9,247, 20, 61,122, 35,158, 96, 91,191,110,144,141, 99, 35,
+100, 27,162,130,163, 82,223,125, 53, 37,220,115,237,154,195,111, 53, 98,162,221, 69,216,148, 90, 92,145,102,183, 57, 54,198,159,
+ 91,175,179,171, 59,106,119,186, 92, 57,123,226, 23,159, 57,216,216, 57, 23,110,223,176,204,158,225, 48,244,228, 67,189, 34,200,
+219,193,174,111,203,117, 5,227, 38,207,141,210, 25, 83, 38, 34,229,228,139,170, 74, 85,176, 44,139,180,180, 52,200,229,114, 36,
+ 39, 39, 35, 43,171, 40,204,154,149,149,245,167,153,168, 53, 1, 33, 4,234,228,100,188, 57,182, 29,117,135, 13, 67,179,197,139,
+192,154,184, 80,171, 88,172,105,221, 5,185,121,106,104, 77, 4,238, 77, 90,227,139,179, 55,192, 80, 22,216, 82,163, 10, 29, 22,
+ 88, 96,193, 63, 8,230,148,105, 40, 17, 66,203,150, 45,171, 54,186, 85, 83,148, 21, 89,203,150, 45,123,182,108,217,178,191,116,
+174,106,203, 52, 0,128, 82, 30,147,224, 80,167, 81, 90,161,186,192,202,217,197, 81, 39, 21, 9, 77,121,202, 66, 78,212,211,199,
+250,130,119,175,158,215,224,124,177,209,209,209,193,105,105,105, 72,126,243, 6, 70,117, 33, 24,173, 14, 84,163, 66,215,182,173,
+ 33, 2, 32, 98, 8,248, 38, 61,184, 28, 1,242, 11,148, 0, 16, 91, 29, 41,107, 48,148, 46,151,136, 43, 66, 8, 4,214,214, 16,
+ 72, 36, 16, 72,173, 75,247, 1,230,121,104,132, 66,225,254,195,135, 15,187,121,120,120, 96,209,162, 69,240,244,244,244,111,216,
+176,161,170, 93,187,118, 98, 23, 23, 23, 4, 6, 6,162,117,235,214, 56,119,238, 28, 0, 84, 91, 19,202, 96, 20, 61,121,158,132,
+ 54, 89, 57,183,113,227,234, 38,232,212, 90, 52,238,176, 9,122,110, 93, 56, 5, 45,132,233,213, 94,168,210, 79, 0, 0,172, 92,
+ 63,198,219,228, 36, 16,142,224, 89,181,134,150, 1,165, 20, 79,158, 60,193,129, 19,215,224, 86, 39, 0,201, 47,227, 16,119,229,
+ 18,110, 57, 57,160,110, 96, 16, 12, 6, 67,149,215,110, 96,193, 93,178,177,180, 76,131, 48, 39, 39, 71, 40,147,201,180, 64,209,
+189,115,115,115,171,240,156,102,138,172,207,166, 77,155, 6, 5,143, 7,244,238, 13,126, 66, 2,244,122, 61, 90,181,106,133,166,
+ 77,155, 2, 0, 90,181,106, 5, 46,151,139, 70,141, 26,193,221,221, 29, 27, 55,110,252, 12,149,204,210, 99, 8, 30, 25,141,217,
+254,222,222,222,165, 2,107,247, 30, 57,162, 30,118, 3,129, 0,235, 55,252, 81,149,161,118,237,218, 72,127,151, 0, 66,104,116,
+ 53, 54, 46,118,117,117,157,235,230,230,230,189,122,245,106,142, 72, 36,194,248,241,227,189, 10, 10, 10,234, 2,192,242,229,203,
+ 49,115,230, 76, 0,192,252,249,243,177, 96,193, 2,104,181, 90, 85,101,100,123,126,108,228,158,153, 99,250,220,197,213,163,127,
+ 39,199,186, 13, 59,247,232, 10, 47,223,206,232,220, 35, 25, 0,150,202,184, 73,131, 86,206, 9, 62,230, 88, 75,182,227,226,249,
+223,230,183,237,208,121,246,140,177,246, 75,150,111,201,173, 54,167, 49,239,205,174,252,231,130,193, 63,254,180,121,207,143,243,
+102,126, 45, 74,150,235,114, 83,115,105,129, 84,200,149,250,184, 16,233, 87,223, 45,126,157,150,150, 48, 21, 41,231,171,157, 57,
+105, 50,153,144,144,144, 80,154,179,167,209,104, 80, 88, 88,136,148,148,148,210, 16,161, 90, 98,243,209,196, 81, 31,135, 20,170,
+213,170,123, 79, 95, 38,207,153, 52,180, 85,161, 90,173,122,153,152,252,130,210,117, 21,170, 48,134, 97,158,170,242, 85, 93, 85,
+ 10, 13,228,143,158,195,179, 75, 29, 24,140, 4, 58, 35, 11,121,118, 62,180, 70,128,101,120, 8, 26, 52, 28, 44,225, 34, 43, 45,
+ 21, 12,135,243,184, 58,123, 45,176,192,130,127, 44,170, 45,211, 64, 8, 57,221,170, 85,171, 95,129, 63,188, 76, 37,203, 0,180,
+ 0,170, 74,217,145,151, 21, 81, 37, 97,195,202,206, 83,142,183,198,168,182, 76, 67,241, 62, 18,210,176,142,251,202,249,159,121,
+154,140,198, 6,153, 89, 25, 70, 46, 87,200,171,101,171,126, 87,147,147,105,181,218,211,151, 46, 93,234,215,173, 91, 55,225,203,
+167,143,161,203,203,131, 46, 79, 1,158,201, 8,153,184, 41, 24,189, 22, 68,167,131,135,191, 9,154,124, 49,174,221,138, 54,104,
+181,218,211,213,241,150, 8, 44,134,195,121, 63,239, 74, 42,133,208,218, 6, 66,169,180,124, 8,177, 74, 49, 64, 8,177,234,211,
+167, 79,151,150, 45, 91,130, 82,138,173, 91,183, 66,175,215, 11,244,122, 61,116, 58, 29,244,122, 61,148, 74, 37,246,236,217,131,
+159,127,254,249, 22,128,157,213,217,104, 50,234, 46, 93,248, 45,178,249,232,161, 97,188,179,167,215,192,168, 99,161, 38,158, 40,
+ 44, 52,160, 64,103, 5,214, 97, 24,144,113, 6, 28,174, 8,173, 26,121,225,196,145, 8, 61,140,218,203,213,241,150, 23, 76, 26,
+141, 6, 41,201, 73,120, 27,255, 2, 82,101, 58,156,108,172,160, 74,120,129,208,225, 35,160,211,233, 42, 97,169, 28,181,106,213,
+130,201,100, 66,167, 78,157, 74,147,166, 43,178,193, 28,145,149,157,157,141, 83,167, 78,161,101,203,150,232,208,161, 3, 82, 83,
+ 83,145,144,144,128,222,189,123,151,142,121,252,248, 49,162,162,162,224,227, 83,181, 83, 48, 43,199,112,246,109,202,163,240,190,
+125,251,242,239,222,189, 11, 74, 41,124,125,109, 96, 99, 45, 1, 97,132, 8, 8,112, 6, 80,164,253, 59,118,236, 8,165, 50,193,
+152,155, 75,207, 86,197, 73, 41,221, 79, 8, 57,174,211,233, 94,181,111,223,222, 61, 62, 62, 30,147, 39, 79,230, 30, 60,120, 16,
+ 0, 48, 99,198, 12,204,152,241,254, 36, 9,181,186,242,208,124,131,134,254,223,122, 25,237, 59,136,196,117,235,217, 56, 54,130,
+151,111,103, 0, 64,183,176,209,240,170, 95, 27,202,172, 39,245, 52,234,164,254,124,110,174,253,147,245,169, 49,226,222,193,163,
+ 52,153, 87, 95, 2, 48,167,112, 47, 85,191, 60,152,145,204, 27,118,232,248,201,115, 99,123,133,245,225, 25, 88,163, 49,184, 14,
+207,238,240,177, 51,153,169,111,146,215, 33,249,124,137,160,172,242, 23, 5,203,178,172, 82,169,132, 68, 34, 65,116,116,180,182,
+119,239,222, 66,134, 97,240,234,213,171, 82,129,229,236, 40, 11,108,211, 44,216,127,201,143,123, 46, 72,132, 66, 97,143,142, 77,
+ 3, 98, 94,190,121, 75, 41, 73,170,140, 87,103, 48,252,246,244,209,227, 78, 78,238,245, 57, 9, 87,239,194,161, 93, 47,104,181,
+ 12,212, 58, 19,180, 70,192,200,225,195, 45,180, 5,236,124, 2, 64, 1, 60,184,123,203,160, 53, 24, 42, 45, 77, 98,129, 5, 22,
+252,243, 81,133, 22,145,151, 17, 68, 57, 0,146,150, 45, 91,150, 85,198,187, 36, 7,240, 24, 64, 72,241, 56,121,185,227,228, 40,
+154, 13,216,172, 12,143, 28, 40, 21, 90,101,151,117,229,198,124,208, 15,191,106,203, 52, 0,128,163,163,163,115,227,198, 77,125,
+182,253,114, 8,148, 82, 60,143, 90,133,220,204, 56,204, 93,122,199,199,211,211,179,195,219,183,111,175,153,115, 50,150,101, 15,
+238,216,177, 99,106,139, 38,141, 27,215,243,244,196,227,164, 68,240, 41, 11, 62,203,130,209,107,193,101,117,240, 12,102,193, 16,
+ 41,210,210,242,176,124,255,161,104,150,101, 15, 86,199,235,223,171, 15, 22,189,205, 3, 33, 4,171, 91, 5, 67, 96, 45, 5, 95,
+ 34,197,191, 78, 70,150,138,170,211,139,102, 66, 32,149,194,167, 69,245, 5,220, 41,165, 42,107,107,235,135, 79,159, 62,109, 22,
+ 28, 28,140,169, 83,167, 34, 41, 41, 9, 38,147, 9, 25, 25, 25,154,119,239,222,165,202,229,242, 36, 0,199, 0,108, 51,167, 82,
+ 56, 95,171, 89,123,250,232,238,137,173,218,118,112,236,219,255,103, 28, 63, 50, 5,138, 60, 37, 84, 70, 49, 10, 53, 70, 20,106,
+ 57,144, 57, 52, 68,139, 70,141,144,150,154,137,103,119, 47, 20,112,181,170, 85,213,223,213, 82,155,193, 48, 12, 30, 63,126, 12,
+111,119,107,188,184,113, 13,142, 86, 60,132,184,187,194,189, 77, 91, 36, 36, 36, 84,203,193,227,192,248,217,103,159,149, 86,114,
+239,222,189,123,226,176, 97,195,220,166, 76,153,130, 95,126,249, 5,183,110,221,250, 83,226,117,135, 14, 29,112,253,250,245,133,
+ 0,230, 87, 67,111,208,233,116,240,247,247,199,131, 7, 15,112,233,210, 37,116,238,220, 25, 29, 58,116,192,147, 39, 79,112,241,
+226, 69, 68, 69, 69,129, 16, 2, 7, 7, 7, 24,138, 68,179,161, 50, 50,189, 30,135,127, 88,177, 99,214,143, 63,254, 28, 52,116,
+232, 80, 28, 61,250, 43, 70,143,106, 0,194, 8, 65,136, 16,125, 62,110,128, 69,139, 31,160, 69,139,142,112,116,228,225,199, 53,
+ 39, 94,171,213,236,158,106,111, 2,176,228,226,197,139,238, 26,141, 6, 10,133,130, 74,165, 82,146,157, 93, 52, 67,181, 34, 15,
+150, 74,165, 18, 85, 70,244,244,247,216, 85,138,124,154, 75, 11,162,250,231, 24,163, 26,118,238,145,130,110, 97,163,240,219,233,
+157,136,188,112, 9, 50,110, 82, 34, 36,249,231,178, 18,179,148,239, 10,125, 55, 7, 52, 25,195,121, 91,120, 97,243,164,190,246,
+ 28, 55, 55,211,225, 25, 63,231, 41, 42,227,166,197,127,176, 57, 49,123, 79, 30,163,232,211,186, 85,139,250,193,181,221, 4,185,
+ 89,153,244,200,137,115,209,250,196,163,167, 80, 44,172,104, 53, 46, 91, 74,233,162, 25, 51,102,204, 43, 94,222, 53,103,206,156,
+ 49,203,151, 47,119, 74, 79, 79, 47,205,193,202,204,202,137,108,221,251, 43, 54, 91,145,167,219,241,227,119, 3,197, 34,161, 96,
+206,242, 29, 87, 13, 28,220,173,140,215,104, 50,109, 28, 52,121,238,215, 47,159, 71,121,212, 21, 11,112,226,187,249,120,124,241,
+ 10, 12, 12, 31,227, 46,221,131, 86,207, 66,145,149,141,203,159, 79,128,212,197, 30, 63, 95, 61,154, 97, 50,153, 54, 85,101,171,
+ 5, 22, 88,240,207, 70, 21, 90,164,162, 28,151,140, 10,182,149, 31, 87,221,250,191, 13,102, 77,169,203,202,202,202,188,126,253,
+ 30,174,158, 94,130,107,167,151,224, 89,212, 99,164,165,234,144,154,161,129,141,141,205,157,202,142, 35,132,116, 45,187, 78, 41,
+165, 42,149,106,192,156,185,243,210, 69, 98, 43,180,239,210, 5,174, 78,206,176,226,243,192, 49,154,192, 33, 60, 20,200,237,240,
+226,137, 10,211,119,236,205, 44, 80,169, 6,148,255,231, 80,158,179,204,118, 16, 66, 32,180,177,134, 64,106, 13,161,181,205,123,
+225, 66,145,141, 13, 68,214, 54,224, 10, 4, 21, 37,195,255,137,179,160,160,224,147,129, 3, 7,230,230,229,229, 97,204,152, 49,
+184,118,237, 90,212,133, 11, 23,108, 30, 63,126, 44,206,204,204,172, 79, 41,237, 78, 41,221, 82,153,184, 42,207,153,147, 19,159,
+ 79,141,218,193,203,230,125,163,214, 24, 29, 16, 62,226, 32, 36, 76, 10,140,172, 9, 20,128,187, 76,128, 54, 93, 23, 35, 83,215,
+ 26, 7, 55,127,175, 50,233, 53, 67,203,214,192, 42,207, 73, 41,165, 14, 14, 14,239, 93, 11,195, 48,184,122,245, 42,194, 7,126,
+130, 30,253,251,193,169,158, 55,156,187,246, 66,143, 49,227,176,101,203, 22, 48, 12, 3,153, 76, 6,148,241,104,148,229,220, 21,
+ 69,121,251,159, 80,178,255, 9, 37, 59,127,167, 92, 0,195,247,238,221,251, 67, 72, 72,200,149, 91,183,110,173, 2, 48,184,236,
+253, 46, 99,203,130,178,222,171, 74, 62,163,217, 95,127,253,181,250,229,203,151,144, 72, 36, 48, 26,141,184,117,235, 22,126,254,
+249,103,172, 94,189, 26, 81, 81, 81,112,112,112,128,143,143, 15,180, 90, 45, 30, 60,120,160, 6, 48,187, 50, 78, 74,169, 73, 46,
+ 55,126,178,126,253,242,236,176,176,118,216,177, 99, 3, 92, 93, 91,131,199,117, 5,151,231, 4,137,212, 31,219,183,253,128,158,
+ 61, 27,227,228,137, 67, 57, 89,217,198, 79,104,185,170,235,149,216,169,185,119,239, 30, 54,111,222,140,129, 3, 7,166,134,135,
+135,179,121,121, 69, 69,106,103,204,152, 81,218, 37,125, 65,113, 14,153, 86,171,125,207, 29, 93,150,115,204,119, 79, 83,191, 93,
+ 18,189, 40, 35, 61,181,229,181, 43,119, 62,139,188,112, 9,175, 95, 70, 34,242,194, 37,220,136,188, 61, 35, 35, 61,181,101,227,
+230,126,252, 1, 99, 38,126,187, 59,219,243,196,221, 0, 0, 32, 0, 73, 68, 65, 84,226, 40, 71,106,227,134,221, 17, 71, 57, 67,
+190,250,230,251,166, 61, 58, 87,122,237,101,111, 3, 0, 90,144,153, 49,115,233,170,159, 10,140,122, 13,179,114,221,198, 52,181,
+252,221,108,148, 76,173,172,196,123, 85,150, 83,165, 82,109, 81,171,213,238,106,181,218, 93,163,209,204, 78, 74, 74,106, 63,117,
+234, 84, 57,203,178,165, 30,210,204,103, 39,238,196,222,216,185,212,217,209, 94,220,186, 89, 80,131, 53, 91,142, 92, 77, 78,201,
+216, 87, 82, 3,171,146,207, 72, 83,160,214,124,210,111,192,176, 66, 69,174, 22,173,190,153, 1,147, 72, 10, 45, 11, 24, 40, 7,
+ 70,194,197,211, 37,107, 32,150, 89, 99,127,226,239,170, 60,131,254,147,178, 53,176,170,185,246, 15,134,133,211,194,105,225,252,
+191,201,249, 79, 3, 23,168,126,106,164,135,135, 71,251,190,125,186,162, 99,216, 28, 80, 74, 17,247,251, 10,228,202,159,195,195,
+ 85,136,132,100,101, 43, 0,215,204, 61, 33,165, 52,153, 16,210,242,235,217,115, 34,194,187,119, 9, 8,174, 87, 79, 88,183,110,
+ 29, 72,156,157,145,149, 37,199,205,187, 49,134,239, 15, 28,142, 46, 22, 87,230,180,202,129,201,100, 42, 74, 94, 7,208,229,235,
+233, 32, 28, 14, 80, 92,142,161,228, 31, 98,189,102,173, 65,184, 92,176,212, 4,173, 86, 91,109, 18, 22,165,244, 45, 33,228,147,
+161, 67,135, 94, 62,125,250, 52,211,163, 71,143,208, 99,199,142,125,120,198, 47,128,130,140, 23, 87,164, 46,126, 97,223,207, 28,
+123,176,101,231,126, 54,190, 65, 77,249, 77,235,114,160, 55, 16,164,165,190,193,233,136,251,250,152,123, 23,148,212,168, 25, 92,
+ 40,175,186, 85,142, 94,175, 79,118,113,113,113, 89,184,112, 33,140, 70, 35,140, 70, 35, 88,150, 69, 86, 86, 22,238,220,185,131,
+134,205, 90, 32, 96,212,231,144,203,229, 88,191,126, 61, 60, 61, 61,177,116,233, 82,228,228,228,192,104, 52,154,117, 95, 41,165,
+ 44,128, 11,197, 47, 0,127, 8,217,146, 95, 25,213,133, 7,125,124,124, 4, 26,141, 38,212,205,205,141, 75, 8, 89,171,211,233,
+ 70,205,156, 57,211,117,233,210,165,104,208,160, 1,178,178,178, 32,145, 72,224,235,235, 11,185, 92,142,251,247,239,179, 42,149,
+106, 51,128, 69,148, 82,121, 69,156,101,236,123, 69, 8,105, 57,105,210,191, 34,126, 88, 62,214, 87,163,237, 40,144,201,218,130,
+ 82, 35,228,242, 36,228, 43,111,233, 23, 47,218, 25,159,145,105, 24, 64, 41,125,105,206, 53, 3,152, 63,113,226, 68,160,184, 85,
+ 78, 66, 66,194,163,128,128, 0, 95,160, 98, 15,150, 57, 88,115,248,173, 6,192,129,149,147, 91, 79, 86,102, 61,241,149,113,147,
+ 18, 91, 6,155,214,175, 57,252, 86,179,112,178,221,146,172,164,107, 47,222, 21, 94,216,188, 59,226, 40,103, 68,255, 79, 88, 79,
+233,203, 25, 34,103,122,164,243,199, 85,243, 82, 74,105,104,104,104, 45, 66,114,188, 50,179,159, 63, 28, 61,102,236, 32, 91,190,
+250,108,136,103,182, 15, 83,187,177, 40, 42, 42, 42,177, 58,239, 85, 37,188, 47, 8, 33,237,103,206,156,121,129, 82,250, 94,238,
+ 65,102, 86, 78,100,171,176,137, 84,161,200,123,148, 25,115,162,218, 90,104,148,210,251,132,144, 46,193, 13, 27, 31,253, 97,233,
+114,151,142, 95, 79,229,190,184,114, 21, 96, 13,120,115,237, 42, 88,161,206,180,230,246,111, 25,121,122,125,127,106,169,226,110,
+129, 5,255,211, 48,167, 76,195,127, 19,170, 45, 52, 10, 0,111,223,190,189,230,227,237,121,241,197,139,246,221,107,123, 58, 1,
+ 0, 18, 18,211,144,154,161,189,104,110,120,176, 44,138, 69, 86,211,189,167,206, 14, 22, 10,133, 97,164,184, 20, 3,253,128,102,
+207, 70,163,241,109,189,122,245, 42,217, 91,113,169, 38,150,101, 43,114, 43, 86,100,231, 85, 66,200, 48, 31, 31,159,229,111,222,
+188,137,160,148, 22,154,115, 92, 85, 40,200,120,113, 69, 38,243,241,190,125,233,232, 55,119,175,158,238, 74,141,186,134, 0, 64,
+184,130, 26, 53,123, 46, 40, 40, 24, 59,126,252,248, 45, 60, 30,175, 54,138,115,202, 74,102,124,177, 44,203,209,235,245, 34,150,
+101, 57, 0, 8,195, 48, 70, 30,143,167,137,136,136, 48, 26,141,198,100,173, 86, 59,246, 67,237,175,233, 23,255,236,217,179,117,
+237,237,237,187, 19, 66, 6, 82, 74,253,243,243,243,181,115,230,204,185, 19, 17, 17,145, 87,167, 78,157,143,122,247,238, 77,100,
+ 50, 25, 30, 60,120, 64,179,179,179,143, 0,152, 77, 41,173, 62,158,249,135, 61, 9,132,144,144,177,227, 54,125, 42,147,109,233,
+ 77, 41, 66, 64, 65, 8,131,167,121,121,166,179, 42, 21,187,175, 88, 40,154,203,103,196,251,158,179,197,209,209,209, 59, 1,240,
+ 42,202,193,170, 17,172, 10, 78,106,212, 73,159, 16,169,234,216,154,117,111, 53, 0, 48,255, 71, 69, 30,128,237,147,250,203, 76,
+177,191,111, 95,225, 97,243,242,187,117,199,114,118,152, 67,215,184,113, 99,111,134, 97, 6, 3, 8,118, 22, 42,234, 59, 9,242,
+ 88, 66,104, 39, 66, 24, 71, 0, 79, 2, 3, 3, 79, 3,120,251, 33,166,210,162,182, 66,117,202,111,207,124,118,226, 14,128, 74,
+189,214,149,112,221, 39,132,212,159, 60,109,202, 4, 1,143,215, 13, 44,219,104,241,241,195,212,210,236,217, 2, 11, 44,248, 39,
+195, 44,129, 5, 0,241, 9,111,123, 0,128,159,159, 31,125,249,242,229, 95, 86,152,197, 2,234, 87, 84, 83,165,189, 58,100,101,
+101, 53,253, 43,199, 87, 7, 74,233, 1, 0, 7,254, 78,206, 98, 1,181,168,248,245, 65,160,148, 62, 5,208,226,111, 51,234,195,
+108, 40,137,149, 47,172,108, 76,247,238,221,223,232,245,250, 75, 40,250, 71,111, 7, 32,199, 96, 48,156,215,233,116, 25,132,144,
+166,107,214,172, 41,169, 84,191,152, 82,250,240, 3,237, 48, 1,216, 95,252,250, 91, 65, 41,221,239,238,238, 62,197,193,193,193,
+ 71,163,209, 8, 52, 26, 13,191,172,246, 23,139,197, 85,122,217,202,194,206,154,236,226,115,115, 29,236,172,201,159, 4,148,204,
+ 3, 71,213,133,209, 13,100, 30, 56,106, 46, 95, 84, 84, 84, 66,104,104,232, 94,134, 97,234, 81, 74, 93, 0,106, 75, 41,228,148,
+210, 44, 46,151,155, 26, 19, 19, 99, 86,143,204,255, 31, 40, 22, 80,171,138, 95, 22, 88, 96,129, 5,255,120,152, 45,176, 74,240,
+226,197,139,127,132,235,206,130,191, 7,213, 9,237,164,164, 36, 45,128,219,197,175,242,199, 62, 4, 80, 77, 32,236, 63,143,180,
+180,180,198,127, 7,207,152,239,158,166, 2,248,166,105, 5, 45,151,231,175,207,201, 7,240,109,167, 62, 53,227,124,244,232, 81,
+ 50, 0,179, 66,190, 22, 88, 96,129, 5, 22,252,255, 67,205,250,198, 88, 96,129, 5, 22, 88, 96,129, 5, 22, 88, 80, 45, 8,128,
+ 10,103, 2,208, 26,116,202,254,144,217, 4,213,241, 91, 56, 45,156, 22, 78, 11,167,133,211,194,105,225,252,231,113,254,207,160,
+100,150,221,191,227, 5,160,171,133,211,194,105,225,180,112, 90, 56, 45,156, 22, 78, 11,231,255,218,171,198, 57, 88, 22, 88, 96,
+129, 5,255, 20, 28, 57,114,196,172,166,159,159,126,183, 61, 76, 42,181,159, 91,160,204, 91,254,235,170,209,199, 74,182, 15, 28,
+ 56,208,236, 25,170, 22, 88, 96,193,255, 22, 42, 21, 88,222,222,181, 2, 25,214,212,134, 82,134, 67, 25,106, 32, 74,245,193,248,
+156,156,247,202, 7,212,174, 93,219,142,199,224, 99, 66,169,132, 16, 19,107,226, 48,183, 18, 18, 82, 98, 42,227, 44, 15, 66,136,
+192,222,222,126, 34,159,207,239,170,211,233, 60, 25,134,121,171,213,106, 47,169, 84,170, 13,180, 92,193,193,255, 36, 26, 52,104,
+ 48,228,234,213,171,118,109,219,182,213,138,197, 98,163, 90,173,230,158, 63,127, 94,216,179,103, 79,197,171, 87,175, 62,104,134,
+161,135,135, 71,231,237,219,183,123,245,232,209, 3,245,235,215, 47, 28, 60,120, 48,191, 85,171, 86,252, 49, 99,198,188, 78, 77,
+ 77,141,172, 9, 23, 33, 36,144, 16,178,135, 16,194, 49,153, 76,195,105,209, 12,195,191, 29,132, 16, 6,192,151, 0,250, 1,240,
+ 6,144, 0,224, 56,128,173,212,140,106,246, 21,240,125, 2,160, 23,128,144,226, 77,143, 1,156,165,148,154, 61,147,174, 50, 78,
+ 66, 72, 40, 0, 80, 74, 31,253, 93,156, 60, 30, 47, 20, 0, 12, 6,195,223,198,249, 87,237, 36,132,140, 18,139,197, 95, 0,128,
+ 90,173,222, 70, 41,173,182,109,211,159,176, 37,128, 2, 64,224,138, 56, 0, 64,204,119,254, 48,119, 61,230,117, 13,103, 19, 87,
+114, 46,140,141,253,224,201, 51,132,144, 94, 67,135, 14, 93,186,111,223,190,249,148,210, 19, 31,202, 83, 21, 92, 93,107,109, 88,
+189,110,171,251, 55, 19, 63, 95,142,162, 14, 14, 85, 34,136,144,110, 2, 14,167,143,142,101,111,196, 0,135, 1,112,101, 50,217,
+ 16,129, 64,208, 94,167,211,185,113,185,220,119, 58,157,238,122, 94, 94,222, 1, 74,105,165, 29, 11,204, 70, 28,177,215,171,224,
+ 74, 76,127,244, 97,163, 12,180,124, 43,164,195,159,230, 86,117, 40,135,195, 89,229,225,225,241,165, 66,161, 40, 96, 24,134,146,
+ 34, 0, 69, 93,210, 74,106,223, 17,147,201,148,154,147,147,243, 65,179,182, 9, 33, 34, 0, 11, 80,212,211,109, 29,165, 85,219,
+ 84,137,157,223,184,187,187,247, 87, 42,149, 42, 14,135, 67,203,216, 71, 0,128, 97, 24, 98, 50,153, 50,179,179,179,135,127,136,
+141, 22, 88,240,119,131, 11,188,215,251,167, 35,165,244,154,183,119,173,192,129,253, 6, 44, 29, 55,118, 60,225,112, 24, 68, 63,
+123,198,253,108,248,168,238, 50,153,204, 67,170,213, 6,128, 16,147, 74, 36,138, 54, 24,244,169,135, 15,236,179,246,111,208,128,
+101, 89, 19, 54,111,217,212,211,219,187,214, 44,115, 68, 22, 33,196,207,213,213,117,207,140, 25, 51, 92,251,244,233,195,113,117,
+117, 69, 82, 82,146,221,175,191,254,218,224,167,159,126, 26, 68, 8, 25, 78,139,106,241,212, 8,132,144,118,174, 50,166,187,181,
+152,116, 65, 62,139,124, 3, 46,167,171,113,145, 82,122,163,166, 92, 37, 80,169, 84, 95,169, 84,170, 22,205,154, 53,163,191,252,
+242, 11, 25, 57,114, 36, 37,132, 16,181, 90,189, 11, 31, 88,194, 65, 34,145,108,236,209,163,135,175,175,175,111, 66,124,124,124,
+175, 67,135, 14,157, 29, 49, 98,132,183, 68, 34,121, 9,192,175,134,116, 59,179,179,179, 67,212,106, 53, 60, 61, 61,127, 1,208,
+228, 67,108,170, 10,197, 15,177,163, 50,153, 76,179,104,209,162,109, 29, 59,118,244, 72, 75, 75, 99,167, 79,159,222,230,209,163,
+ 71, 31, 17, 66,250,153, 43,178, 8, 33,246, 0, 54, 75,165, 82,171,233,211,167, 95,239,214,173, 91,162, 84, 42, 21, 61,121,242,
+132, 55,125,250,244, 47, 9, 33,225, 0,198,213,228, 33, 92,194,233,228,228,100, 55,127,254,252,167,173, 91,183,190,198,231,243,
+249,207,159, 63,231,205,152, 49, 99,194, 95,225,244,245,245,181,158, 55,111,222,131,208,208,208, 12,145, 72,196,143,143,143,231,
+205,154, 53,107, 28,135,195, 9, 55,153, 76, 31,196, 41,147,201,108,102,205,154,245,176, 67,135, 14,114,161, 80, 40,136,137,137,
+225,206,156, 57,115, 92, 77,236,116,112,112,232,228,224,224,176, 53, 61, 61,157, 11, 0,110,110,110,205,125,124,124,126, 42,169,
+135, 6,252,209,171,210, 96, 48,228,107, 52,154,161,217,217,217,127, 42, 96, 27,184, 34, 14,223,206,219, 53,228,219,121, 69,235,
+187,139,183, 87,183, 14,140, 52,251,187, 31,232, 85,244,140,153, 48,237,231, 97, 69,239, 69,219, 55, 21,155,186,209,139,208,154,
+136, 53, 66, 72,223,206,157, 59, 47,136,140,140,220,212,177, 99,199,233,123,247,238,117, 78, 73, 73,249,129, 16, 82,235,211, 79,
+ 63, 29,121,249,242,229,101,114,185,252,136,185,124,213, 65,192, 23, 10, 9, 67, 32, 22, 89,217,152, 51,158,199, 48, 97,183,251,
+246,253, 98,219,243,231,141,127,138,139,243, 42,116,115,107, 49,105,210, 36,151, 1, 3, 6, 48,181,106,213,194,171, 87,175, 28,
+246,238,221, 27,176,109,219,182,254,132,144,175, 41,165,111, 62,216,184, 56, 98, 95,168, 64, 67,173, 14,141, 41,133, 93,201,102,
+ 66,160, 16,234, 17, 37,137, 35, 79, 43, 19, 89,132,144, 31,251,246,237, 59,252,248,241,227,210,189,123,247, 74, 91,183,110, 13,
+ 23, 23, 23, 16, 66,192,178, 44, 76, 38, 19, 76, 38, 19, 40,165,240,245,245,253, 43, 51,200,215,222,184,113,227,203, 87,175, 94,
+ 97,204,152, 49, 28, 0,115,106,114, 48, 33,100, 74,255,254,253,123, 71, 68, 68,136, 15, 31, 62, 44,110,214,172, 25, 92, 93, 93,
+ 1,160,212, 62, 74, 41,188,188,188,254,130,137, 22,252,167, 81, 94,139,252, 39,109,249, 59, 80, 81, 47, 66,194,176,166, 54,227,
+198,142, 39,131,135,124,154,254, 42,225,181,137,203, 19, 12, 57,127,225,130, 85, 96, 96, 32,163,221,176, 1, 70,185, 28,134,201,
+147, 91, 95,186,116,201, 16, 62,100,152,154,199, 33, 59,189,189,234, 89, 29, 60,240,171,107,196,209, 35,109, 0, 84, 41,176, 8,
+ 33, 2, 87, 87,215, 61, 87,175, 94,245,240,242,242,130, 66,161, 64, 82, 82, 18, 10, 11, 11, 49,104,208, 32, 94,155, 54,109, 60,
+ 6, 14, 28,184,135, 16,210,214, 92, 79, 22, 33,196,165,190, 39,247,244,234,121,131,252,122,118,111, 35,241,168,229, 3,154,174,
+ 65, 74,124, 92,179,211, 87,239, 78,242,181, 99, 94,188,202,163, 97,148, 82,179,138,140,150, 69, 86, 86,214,119,253,251,247, 63,
+218,169, 83, 39, 39,161, 80, 8,119,119,119,210,167, 79,159,204,180,180,180, 74,235, 63,153, 97, 47, 0,128, 97, 24,182,236, 59,
+ 33, 31,244, 12,243,180,183,183,135,189,189, 61, 0,120,124,168, 77, 0, 16, 30, 30,206, 73, 78, 78,254,194,100, 50, 5,148,221,
+238,236,236,220,128,101,217,220, 55,111,146, 27,168,117,250,128,241, 19,103, 45, 24, 60,176,171,221,237,219,183, 77, 61,122,244,
+208, 94,191,126,253, 75, 0,155,205, 60,205,230, 70,141, 26,197,175, 93,187, 86,251, 50, 33,177, 94,116,236, 75, 72, 68,124,182,
+ 86,173, 90,194,152,152, 24,237,220,185,115, 11,215,173, 91,183, 25, 64,120, 13, 76,223,220,179,103,207,220, 57,115,230,100,190,
+136, 79,116,123, 28,243,130, 74,133,124,131,139,139, 51,231,225,195,135,154, 31,126,248,193,180,108,217,178, 26,115, 14, 27, 54,
+ 44,109,250,244,233,137,242,108,133, 71,174, 34,159, 10, 84, 42,189,167,167, 39,247,202,149, 43, 5, 63,255,252,179,118,250,244,
+233, 53,230,236,216,177, 99,250,226,197,139,147,227, 94, 38,184, 71, 69, 63,135, 84,200, 51,184,186, 58,115,162,162,162, 84,203,
+150, 45,211,175, 88,177,194, 44, 78,137, 68,178,251,208,161, 67,220, 19, 39,138,156, 54,119,238,220, 97,188,189,189,173,202,142,
+ 81,107,180, 96, 8,144,149,149,101,213,170, 85,171,221, 0, 60, 43,227, 27, 49, 98, 68,122, 13,174, 3, 35,180, 43,204, 27,184,
+ 37,128,150, 8,171,241,227,199, 87, 86,155,107, 88, 96, 13, 68, 86,175, 94,189,102,159, 57,115,198,103,239,222,189,107,246,239,
+223,175, 3, 0,145, 72,228,248,235,175,191, 46, 27, 52,104, 16, 6, 13, 26, 52, 23,192,223, 38,176, 88,202,234, 1, 64, 40, 18,
+ 10,227,226,226,136,191,191,127,149,133,144,245, 38,211,195,109,207,159, 55,253,151,191,127,179, 28,147,169, 62,191,103,207,130,
+ 41, 83,166,100, 41,149, 74, 36, 37, 37, 65,175,215, 99,228,200,145,156,142, 29, 59,186, 15, 26, 52,104, 61, 33,228, 19, 74,169,
+190, 58, 59, 74,188, 77,121,121,121, 5, 37, 94,156,128,122,214,220,246,161, 70, 97,163,250, 6, 1,159, 99,228,127, 60,217, 68,
+ 46,110, 32,133,254, 94,184, 9, 0,124, 21,228,124,224, 79, 2,139, 16,178,162,111,223,190,131,142, 31, 63,110, 15, 0, 71,142,
+ 28,129, 74,165, 66,157, 58,117,192,231,243,193,227,241,192,227,241, 74,151,107,242,108, 34,132, 76,147, 74,165,189, 10, 10, 10,
+142, 83, 74,215, 3,240,109,219,182, 45,188,189,189, 1,160, 77,241,152,225, 28, 14,231, 83,150,101,183, 82, 74,143, 87,193, 53,
+169,111,223,190,221, 34, 34, 34,172, 75,236, 52, 24, 12,240,246,246, 6,159,207,135, 64, 32, 40,181,211,130,255,126,148,213, 34,
+255,105, 91,254, 42, 74,203, 52, 20, 95, 80, 71, 0,160,148,225,112, 56, 12, 94, 39, 36, 25, 58,117,234, 50, 34, 57, 57, 89,218,
+162, 69, 11,134,199,227,161, 48, 50, 18,154, 7, 15, 32,149, 74,209,191,127,127,222,245,235,215,109,108,164, 54, 99, 18, 95, 39,
+230,115, 56, 12, 40,101,170,205,105,176,183,183,159, 56,107,214, 44, 87, 95, 95, 95, 24,141,198,210, 10,228, 70,163, 17, 41, 41,
+ 41,144, 74,165, 24, 62,124,184,179,149,149,213, 68,115, 46,130, 16, 82,215,207,219, 57,234,234,217, 45, 77,166,140,235, 37,241,
+179,250, 13,146,148,175, 33, 61,242, 47, 4,164,157,199,140,126, 45, 36, 23, 55,206,109,236,227, 46,139, 34,132,212,173,233, 77,
+210,104, 52, 55,163,163,163,199, 92,187,118,205, 4, 0, 87,174, 92,161,177,177,177, 99,255,202,175, 78,147,201, 4,133, 66, 1,
+147,201,196, 41, 94, 47,121,255, 80,202,191,140,240,240,112, 78, 74, 74,202,216,128,128, 0,191,123,247,238,225,228,201,147,184,
+116,233, 18, 46, 92,184, 0,129, 64, 80,123,224,192,129,114,121,182,194, 94,161,200, 19,189,123, 27,223,252,215,173, 91,221,211,
+ 18, 19,111,239,219,183,175, 0, 69, 97,195,106, 65, 8,249, 68, 42,149,138,215,172, 89, 83,104,109,231,218,187, 69,203,118,205,
+120, 34, 27, 71,190, 80,234,148,151,167,212, 63,126,252, 56,110,229,202,149,126, 13, 26, 52,176, 47, 14,163,153,197,233,232,232,
+104, 59,123,246,108,189,149,181, 83,187,102, 45, 90, 6, 11, 68, 54, 50,158,192, 74,214,166, 77,155,254,113,113,113,137,243,231,
+207,247, 8, 13, 13,117,174, 9,167,151,151,151,245,244,233,211,181, 54,182,178,110,129, 1,129,141, 91,183,106, 62,184, 73,147,
+ 38,195,185, 92, 46,155,145,145,241,114,202,148, 41, 30, 29, 58,116,112,168, 9,167,189,189,189,245,226,197,139,117,245,188, 27,
+124,242,241,199, 97,157, 68, 86,118, 50,129,216, 90,166, 86,171,217,216,216,216, 87,139, 22, 45,242, 8, 9, 9,113, 52,135, 83,
+165, 82,241, 28, 29, 29, 17, 28, 28,140, 64,111,111,228,229,229, 33, 34, 34, 2, 59,119,238,196,246,237,219,113,224,192, 1, 52,
+109,219, 29,214,214,214, 72, 75, 75,131, 82,169,228, 85,196, 83, 26,166,251,119, 96, 75, 0,221,100,154, 56,108,252,248,241,169,
+ 85,136, 43,140, 31, 63, 62,117,194,180,159,135,149,132, 16, 43, 3, 33,164,111,151, 46, 93,158,156, 61,123, 54,126,239,222,189,
+ 8, 12, 12, 68,143, 30, 61, 4, 0, 48,113,226, 68,193,160, 65,131,112,232,208, 33, 28, 57,114, 36,198,207,207,239, 22, 33,164,
+175, 57,102, 14, 31, 62,188,109,120,120,248,141,240,240,240, 71,131, 7, 15,222, 58,118,236, 88,247,178,251,223,165,189,125,168,
+211,233, 16,210,184,153,213,226, 95,238, 13,173,142, 47, 22,216,187, 53, 46,110,231,242,103,207,222,204, 13, 12,180,171,147,152,
+ 40,219,181,106,149, 99, 73,243,108,131,193,128,148,148, 20,216,219,219, 99,232,208,161,142, 66,161,176,218,176, 86,177,183,105,
+ 84,114,114,178,116,219,182,109,110,143, 30, 61,114,127,247,238,157,219,229, 75, 23,156,190,157, 58,209,218, 86, 42, 16,164,201,
+139, 4,106, 98, 26, 36,113,175,209,150, 82,216,149, 13, 27,150,133,167,167,231,151,199,143, 31,119, 45, 89,183,183,183,127, 79,
+ 80,149, 95, 6, 67, 25, 89, 16,217, 81,183, 47,201,180, 11, 36,223, 84, 97,103,239,195,135, 15,175, 76, 76, 76,236, 16, 22, 22,
+182,142, 16, 82,167,130, 49, 78,157, 58,117,218,246,252,249,243, 30,125,251,246, 61, 70, 8,233, 94, 25,159,167,167,103,255,227,
+199,143, 59,148,172, 59, 58, 58, 66, 36, 18,253, 73, 92,241,249,124, 48,140,165,242,208,127, 59,202,106,145,255,118,148,126, 27,
+105, 81,193,200,171, 0, 64, 9, 41,124, 18, 29,205,227, 8, 4,195,246,237,223, 47,228,243,249,120,243,230, 13, 98, 98, 98,160,
+186,124, 25,234,219,183,145,145,145,129,130,130, 2,184,184,184, 96,203, 47,191, 72,116, 44, 29,253,252,197, 11, 14,101,254,200,
+ 39,160,149, 76,213, 20, 10,133, 93, 7, 12, 24, 80,169, 16, 75, 75, 75, 67,175, 94,189,120, 28, 14,231, 79,211, 67,203,115, 18,
+ 66,136,187, 19, 57,117,249,232, 98, 55, 55, 65, 12,240,106, 10,144, 31, 5, 80, 45, 96,212, 1,169, 79,129, 51, 11, 81,167, 32,
+142, 92, 88, 60,194,213,195,138,123,138,148,251, 41, 86,153,157,101,206,225,237,239,239,191,125,216,176, 97, 12, 0,116,238,220,
+153,248,251,251,111, 37,132,120, 87,118, 76,117,156, 42,149,234,110,110,110, 46, 6, 13, 26,228,224,227,227,115,105,208,160, 65,
+ 14, 37,219, 63,148,179, 24, 14, 65, 65, 65,217, 98,177,248, 0, 33,164,194, 7,107,101,156,201,201,201, 95,248,251,251,215,223,
+182,109, 27,135,195,225, 96,219,182,109, 56,120,240, 32,110,222,188,137,236,236,108,233,148, 41, 83,108, 79, 95,186,123,254,214,
+205,251, 39, 87,205,153,230,208,191, 75, 71,111,251, 60,185,210,195,195,163, 43,138,114,178,204,177,179,215, 87, 95,125,117,241,
+ 81,108,130, 51,135,199,231, 11,120, 92,177,147,163, 93, 29, 87, 39,251,250, 30, 14,246,245,173, 5, 60, 59,165, 82,249,250,208,
+161, 67, 5, 40,202,207, 50,139,115,222,188,121,143,227, 18, 82, 28, 24, 30,151,203,231,242, 5,118,182, 82,135, 62, 97,221, 59,
+ 1,128,152, 67,132, 74,165, 50,101,247,238,221,133, 53,225,156, 59,119,238,157,119,242, 92,103,190, 72,196, 17, 10,121,165,247,
+210,222, 70,234, 34, 17, 10,197, 42,149,234,205,246,237,219,243,106,194, 57,115,230,204, 7,207, 94,190,113, 36, 12, 56, 12, 8,
+207,222,222,218,217,201,206,218,213,217, 70,234, 42, 98, 32, 82, 42,149, 73,187,119,239, 86,154,195,169,215,235,121,153,153,153,
+136,139,139, 67,173,102,205,112,233,210, 37,212,174, 93, 27,131, 6, 13,194,167,159,126, 10,177, 88,140,206,173, 26, 98,214,172,
+ 89,136,143,143,135,209,104, 20,152,105,103, 41,220,221,221,175, 86,182,175, 36,143,170, 50,206, 64, 47, 82, 42,174,204,225,174,
+104, 92,121,206, 94,189,122,205,190,124,249,178,207,158, 61,123,250, 12, 31, 62,252,230,158, 61,123,208,178,101, 75,196,198,198,
+162, 94,189,122,216,181,107, 23, 62,253,244,211,155,235,215,175,239,243,251,239,191,135,120,121,121,205,170,142,115,240,224,193,
+ 19, 66, 67, 67, 35,211,211,211, 91,229,228,228, 4, 71, 68, 68,140,238,223,191,255,235, 33, 67,134,116, 41, 25,195, 26, 12,251,
+207,156, 60,138,222,125, 6,160, 65, 80,240,230,145,179,246, 54,172,138,147, 82, 74,159, 1, 91,119,190,123, 39,223,175,209,168,
+ 6,241,120, 86, 86,247,238,201,142,108,218,228, 88, 18,182, 5,128,212,212, 84,124,252,241,199, 60, 62,159,223,174, 42, 59, 9,
+ 33, 43,250,245,235, 55, 40, 34, 34,162,212,219,116,251,246,109, 60,125,250, 20, 73, 73, 73, 80, 40, 20,232, 50,182, 0,227,151,
+ 21,113,143, 95, 70,209,125, 34,149, 84,197, 89, 80, 80,160, 62,118,236, 24,194,195,195,241,229,151, 95,194,203,203,171, 84,100,
+149, 23, 87,215,238,255, 6, 65,112,142,172,237, 86,140,234,118, 2, 78, 18, 79,204,172,196, 78,126,215,174, 93,183,244,233,211,
+ 7, 44,203, 66,163,209,152, 0,228,148,183, 3, 0,167, 94,189,122,188, 90,181,106, 97,201,146, 37,176,179,179, 91, 75, 8,225,
+ 84,196, 89, 88, 88,168, 61,123,246, 44,134, 15, 31,142,175,191,254, 26,245,235,215, 47,181,115,247,222,131,142,159,142, 30,231,
+215,164,109,251,144,192, 38, 45, 27,229,107, 57,205,248, 86,178, 47,202, 63,227, 43,250,140,254, 14, 88, 56,255,126,148,213, 34,
+255,237, 40, 13, 17,150,109,121, 98, 48,225,212,176, 17,163, 63,190,116,249,178,149, 64, 32, 64, 98, 98, 34, 50, 50, 50,112,240,
+192, 1,246,176,179,179,138,199,227,209,161, 59,119, 90,127,254,197, 23,132,199,227,193,223,223, 31, 3, 7, 14, 20,127, 50,104,
+ 72,166, 19,143,119,176,186,147, 18, 66,220, 74,226,231,163, 71,143,198,143, 63,254,248,222,254,111,191,253, 22, 7, 14, 28, 0,
+ 33,196,181,162,227,203, 33,124,210,194,126,158,246, 94,118, 25, 52,106, 55,143,112,172,100,224, 88, 1, 12, 31, 16,113,138, 68,
+ 22,195,129,246,247,200, 28,166,229, 33,229,128,118, 42,143,117,231,183,132, 3, 56,100,238, 77,114,119,119,159, 27, 25, 25,233,
+ 52,101,202, 20,170, 84, 42,201,187,119,239,232,210,165, 75,157, 38, 76,152, 48, 23,192, 8,115,121,202, 34, 45, 45,109,113,239,
+222,189,123,156, 57,115,198,101,196,136, 17,182, 0,208,187,119,239,140,180,180,180,197, 31,194, 87, 2, 62,159,207,121,246,236,
+153,108,205,154, 53,159, 78,157, 58, 53, 40, 56, 56,216, 85,161, 80, 36,165,166,166, 14,172,206,227,102, 50,153, 2,182,109,219,
+ 6, 14,167,232, 57,199, 48, 12, 4, 2, 1, 4, 2, 1,108,108,108,114, 19, 18, 18, 76,117, 93,196,130,194,140,119,121,246, 92,
+123, 30,113,115,117,176,115,117,235,152,157,157,125, 15,128,173,153, 38,134,124,244,209, 71, 79,110, 63,122,197,142, 27,209,169,
+190, 21,159,225, 89,139, 69, 28,177,128, 71, 8,165,172,222,160,107,181,113,247,149, 29,126,126,126,129, 48,211, 69, 76, 8, 9,
+109,217,178,229,229, 71,177,111,240,232,105,252, 91, 39,153,149,195, 71,157,219, 52, 40,217,223,168,121,203, 79,203, 12, 87,152,
+195,201,229,114, 67,154, 53,107,246, 54, 35,167, 16,206, 50,219,247,132,180,189,163,115, 87, 0, 40,204,203,219, 88,171, 86, 45,
+127, 46,151, 91, 89, 51,204, 63,217,217,174, 93,187,119,191,199, 36,195,213, 73, 38, 43,222,252, 94, 78, 79,214,187,119,155,125,
+125,125,253,205,241,180,234,116, 58,225,241,227,199,241,251,239,191, 99,113, 80, 16,190,173, 91, 23, 78, 78, 78,184,124,249, 50,
+ 40,165,144, 74,165, 80, 40, 20, 56,116,232, 16,186,116,233, 2,157, 78,247,167,127,184, 64, 73, 14, 86,229,231,113,119,119,191,
+154,150,150,246,111,249, 69, 89,158, 59,112, 69, 28, 98,170,232,148,121,246,236,217,189,123,247,238, 93, 22, 24, 24,136,111,190,
+249,166,237,218,181,107,111, 6, 7, 7,183,237,220,185, 51, 34, 35, 35, 49,122,244,232,155,235,215,175,111, 59,110,220, 56,108,
+222,188, 25,175, 95,191,254,165,170,243, 15, 30, 60,120,193,152, 49, 99,230,108,216,176,161,200, 75, 3,160, 95,191,126, 64,209,
+179,113, 71,120,120,120,118,201,216,195,219,223,222,246,242,246,109, 61, 97,210, 52,193,196,113,195,103, 0,248,180, 66,210, 98,
+ 80, 74,169,187,187,123,190,177,125,251,156, 67,119,238, 96, 48,159,111,181,255,209, 35,156,210,104,208,174,127,255, 44, 0,152,
+ 57,115, 38,246,236,217, 3, 0, 46, 85,113,121,122,122,126,121,236,216,177,210,239,138,131,131, 3, 4, 2, 65,145, 8,226,242,
+192, 97, 57,184,180, 89,130,132,100, 21,198, 47,163,216, 52,147,160,158, 59, 10, 67, 27, 84,206, 73, 8, 65,155, 54,109,160, 84,
+ 42,193,225,112, 96,109,109, 13,153, 76,246,158,184, 82, 22, 40,176,242,151, 5,200,108,112, 21,221, 78,130, 33, 28,224,241,247,
+ 64,254,171, 74, 91, 58,125,188,102,205, 26, 55,141, 70,131, 43, 87,174,224,242,229,203, 63, 81, 74, 11,202,235, 29, 74,105, 58,
+135,195,217,185, 98,197,138,209,238,238,238, 24, 63,126,188,223,210,165, 75,251, 1,127,230, 37,132,160,105,211,166,208,104, 52,
+224,241,120,176,177,177,129, 78,111,228,133, 15,251,210,187,142, 79,176,112,233,170,165,140,139,140, 11, 46, 35,195,203, 55,106,
+219,117, 63, 46, 89,119,247,198,245,207,137,149, 99,127,170,202,122, 87,213,125,181,224,255, 30, 72, 53,237,215,254,155,192, 5,
+254,220,238, 36, 57, 57, 89, 33,147,201, 60, 26, 52,104,192,232,116,186,162,208,195,145, 35,236,246, 29, 59,206,104, 52,154, 73,
+ 0,248, 27,126,254,121,179,135,167,103,167, 97,195,135, 19,131,193,128,222,189,123, 11, 78,159, 62,237, 16,159,145, 81,109,163,
+226,242,191, 46, 70,142, 28,137,181,107,215, 2, 0,190,250,234, 43, 0, 69, 46,244,138,126,133,148,135,212, 22,189,122,132, 53,
+181, 73,145,252,100,163,111,109, 40,168, 27,111,125, 87, 82, 32,110, 10, 70,192,133,136, 3,147,222, 96,124,153,217,255, 97,252,
+203,128, 64,113, 78,118,189,174, 65, 29,176,253,183, 61,189, 80, 3,129,101,101,101,213,220,218,218, 26, 15, 31, 62,204,105,218,
+180,169,130, 82,106,187,120,241, 98, 71, 43, 43,171,230,230,114,148, 7,165, 52,145, 16,210,190, 77,155, 54, 19, 25,134,233,106,
+ 50,153, 46,101,100,100,108,160,148, 38,154,115, 60, 33,100, 60,128,249, 40,147,103,162,211,233,192, 48, 12, 40,165, 24, 60,120,
+ 48,102,206,156, 25,248,244,233, 83, 68, 70, 70,202,186,118,237,122,151, 16,162, 0,240, 57,165,180, 82, 47, 89,118,118, 54, 54,
+109,218, 4, 14,135, 3, 59, 59, 59, 88, 91, 91, 67, 36, 18,161,109,219,182,233,203,151, 47, 15, 56,122,244,168, 74,145,153, 73,
+196,249,121, 90,226,224, 32,130,123,237,143, 70,246, 31, 16,141,162,217,132,102, 65, 34,145, 88, 9,160,205,103, 88, 13,179,114,
+193, 70,174, 21,159, 79, 68,124, 46,132, 38, 21,103,214,242, 37, 84, 68, 40, 15, 69,222, 85,179, 26,126, 3,128, 72, 36,226, 75,
+ 4, 84,203, 19, 50, 6, 43,166,230, 51, 26, 43,130, 64, 32,224, 11,121,133,234,202,246,243, 25,194,225,112, 56,213,122, 9,203,
+ 66, 44, 22,243,165, 2, 86, 91,217,126, 17, 3, 14,195, 48,149,114,134, 7, 17,122,120, 98,105, 72,175,212, 54,163,209,136,230,
+205,155,227,215, 19, 87,112,246,242,109,100,189,121,130, 73,227, 71,195,215,215, 23, 23, 46, 92,168,137,137,127, 66, 90, 90, 90,
+133, 34,171,202,208, 98,113,222, 85, 85, 97,193,247,184,231,217, 86, 59, 43,145, 16,210,183, 93,187,118, 19,246,239,223,175,251,
+232,163,143, 4,131, 7, 15, 70,112,112,112,219, 81,163, 70, 1, 0,186,118,237,138,181,107,215,182, 29, 53,106, 20, 14, 30, 60,
+136,136,136, 8,109,199,142, 29,167, 19, 66, 82, 41,165,103, 43,226, 52,153, 76, 31,111,217,178,229,189,109,122,189, 30, 70,163,
+ 17, 6,131,193,205,104, 52,186, 21, 63,139,176,110,221,250,172,139, 23, 78, 99,250,172,133,112,118,114, 13,173,234,186, 74,192,
+225,112,200,200,105,211,178,118,173, 90,133, 85, 7, 15, 98, 90,189,122, 86,123, 98, 98,112, 81,163,193,161,200,200,172,226,243,
+ 84,155,223, 84, 88, 88,168, 62,123,246,172,205,161, 67,135, 96,103,103,135,250,245,235,151,138, 33,134, 35, 6,135,111,143, 6,
+ 65,205, 1,220, 7, 0,212,115, 71,161,191, 23,110, 18, 2, 5,101, 80,233,247, 77, 44, 22,195,213,213, 21, 92, 46, 23,143,158,
+223,135,181,194, 6, 77,130, 90,128,199,227, 33,191, 48, 15, 19, 86, 13,132,239, 18, 57, 26,250, 3,234, 12,224,222, 20, 24,210,
+111, 99,141, 42, 5, 27, 43,161,108, 92,187,118,109,104,181, 90,108,219,182,141,162,232, 25, 85, 33, 76, 38,211,236,213,171, 87,
+143,152, 55,111, 30,167, 89,179,102, 0, 16,138, 10, 4, 22, 0, 72, 36, 18,120,120,120,148, 10,191,193, 35,198,121,143,157, 50,
+ 78,220,191,123, 39,112,185,142, 80, 20, 26,144,157,111,128,189,163, 20,211,167,132,139, 46, 53,245,104,182,101,253,190,147,132,
+144,102,180,172,203,208,130,255,211, 40,175, 69,254,219, 81,105,153, 6,161,193,208, 64,187,121, 51, 10, 47, 93,130,224,226, 69,
+ 28,114,119, 47,208,104, 52, 83, 41,165, 41, 0, 64, 8,249,102,231,174, 93,183,250,220,185, 99,163,139,139,131,247,211,167,224,
+217,217,153,245,208, 41,139, 29, 59,118, 64,169, 84, 34, 47, 47, 15, 0,240,211, 79, 63, 65,169, 84,162, 36, 87,161,218, 11,224,
+163,173,171,115, 61,164,227, 37, 76, 92, 70,154,212, 64,213, 82,170,177, 78,243, 72,118, 41,204, 99, 60, 16,247,166,133, 68,157,
+173,107, 73, 56, 58,104,178, 84,240,104, 83, 31, 92,112,219,214,196,198,146,184, 62,151,203,205,121,241,226,197,199,126,126,126,
+167, 0, 56,254,213,120, 63,165,244, 21,128, 73, 31,114, 44,135,195,153,255,250,245,107,231, 95,126,249,101,226,226,197,139, 41,
+240,135,192, 42, 89,230,114,185,160,148,194,214,214, 22, 60, 30,207,229,246,237,219, 46, 45, 90,180,216,136,162, 7, 89,133,176,
+178,178,130,139,139, 11,120, 60, 30,108,109,109, 81,168,204,149,108, 90, 58,167,163,149,189,139,108,218,180,105,204,200,145, 35,
+227, 55,110,220, 88,219,181, 65, 3,255, 39, 79,158,188,233, 51, 48,252,247,179,103,207, 2,192, 86, 51, 77,127,252,244,233, 83,
+129,175, 79, 93,174,201,160, 54, 73,248,128,232,241, 58,147,192,218, 21, 34, 14, 7, 92, 2, 42,182,146, 56,191, 74, 74, 74, 3,
+144,105, 14, 33,165,244,209,203,151, 47,121,158,238, 46,220,252, 66,141, 66,194, 53, 9, 94, 63,184, 31,235,213,172,121, 0, 0,
+104, 30,220, 62, 38,108, 16,100,253, 58, 83,110,227,237,237,157,100, 14,167,209,104,124,156,152,152,200,247,240,240,224,189,124,
+249,106,159,131,141,181,187,204,197,165, 35, 0,232,114,228,215,137, 90,147,198,227,241, 60,210,210,211,229, 70,163, 49,205, 92,
+ 59, 95,188,120,193,247,116,119,225,158, 58,115,246, 87, 87,137,149,155,157, 88,104, 43, 98, 64, 68,212,148, 39, 48, 26,211,197,
+ 86, 18,247,215,201,201, 89,148,210,183,149,241,108, 50, 77, 28, 6, 0, 28,206,180,237,101,183,223,188,121, 19, 87, 30,190,134,
+ 45,135, 5,207, 80,136,187, 17,135, 48,224,171,201,213,254, 45,197,124,231, 15,104, 87, 28, 8,244, 26,249,199, 58, 74, 66,128,
+110, 0,254, 44,132,202,142,251, 32,108, 9, 40, 13, 1, 20,115, 35, 45,173,234,135,235,208,161, 67, 23,238,221,187,183,116, 18,
+ 71,108,108, 44, 58,119,238, 12, 0, 88,184,112, 33,122,244,232,129, 22, 45, 90, 32, 54, 54, 22,190,190,190,136,140,140, 20,114,
+ 56, 28,225,176, 97,195,150, 2,168, 80, 96,149,197,214,173, 91, 49,122,244,232,138, 18,166,227, 1,104,136,189,127,193,204,229,
+187, 29,115,178,179,144, 41, 79,127,100,238,165, 18, 66, 48,114,218,180,172, 45, 58, 29,246,223,187,135,225, 18,137,213,174, 87,
+175,208,187, 69, 11, 52,236,220, 57,203,156,103, 93, 69, 94, 28, 7, 7, 7,240,249,124,112,120,238,224, 10, 66,192,240,249,104,
+220, 46, 4,171,166, 74, 84, 35,122, 98, 61, 33, 80, 8, 5,136,226, 91,161,194,201, 11,132, 16, 24,141, 70,240,120, 60, 28, 58,
+191, 11, 79,236,246, 1,249,192,173,168,190,152, 60,122, 54,190, 91,251, 37,252,150,202, 97,235, 7,100,222, 5,238, 79, 97, 76,
+121,137,166, 49, 90, 57,206, 81, 74,179, 43,226, 20,139,197, 1, 98,177, 24,133,133,133,120,249,242,229, 27, 74,169,178,178,107,
+162,148,102,116,237,218, 53,147,195,225,184,121,120,120, 0, 64,237, 74,236, 36, 38,147,169, 52,207,106,207,254,195,142,161,237,
+189, 69,221,218, 6, 98,247,169,239,241,175,240,245,224,113, 8, 88, 86,143, 53,107,195,192,106, 11, 16,222,231, 75,210,161,171,
+111,200,165, 83,186, 49, 0,182, 85,123,131, 45,176,224,223, 0, 6, 0, 8, 33, 29, 8, 33,148, 16,210,161,100,135,137, 82,147,
+ 49, 39, 7, 84, 91,244,227,135,199,227, 81, 0,101,103, 40, 89,217,217,217, 17,158,167, 39,136,176,232, 7, 55, 5,254,182,162,
+123, 6,131,121,165, 97, 76, 44, 56, 32,122,208, 50,206,142, 66, 17,193,247,142, 93, 48, 73, 48, 23,233, 2,187, 63, 6, 83, 10,
+ 24, 41, 88,152,204, 42, 46, 88, 6,180,160,160, 0, 70,163,209,222,199,199,231,140,209,104,180, 47,162,251,207,253, 50, 98, 89,
+ 54,129,195,225, 96,226,196,137, 64,113, 40, 77,167,211, 33, 61, 61, 29, 90,173, 22, 58,157, 14,175, 95,191, 70, 94, 94, 30,116,
+ 58, 29,158, 61,123, 6, 47, 47, 47,112, 56, 28,183,170,120, 77, 38, 19,156,156,156,224,230,230, 6,109,161, 82,114,116,235,218,
+222, 43, 22,206,116, 28,226, 67,153, 95,214,175, 54,121,122,122,102, 7, 5, 5,185, 10,133, 66,125,147, 38, 77,180,167, 78,157,
+186, 8, 96, 64, 13,234, 96,157, 93,180,104, 81,139, 22, 45, 90,212,181,147, 74,244, 66, 1, 7, 66, 99, 33, 21,106,179, 41, 87,
+157, 69,235,120,214,213, 67, 34,109, 62,120,240, 96, 1,204,248,167, 88,194,249,221,119,223,213, 15, 8, 8,112,180,179,145, 40,
+185, 12, 82,249, 44,155,154,251,240,246,111, 0,192,119,116, 86, 67, 34,109, 94,156, 67,103, 54,231,244,233,211,131, 60, 60, 60,
+ 28, 24,134, 40,140,122,253,155,146, 29, 68,163,206,224, 8, 69,133, 16,138,218,125,254,249,231,188, 26,114, 6, 52,106,212,200,
+193,222,214, 70,193, 99, 72, 50,159, 53,166,136, 41,251, 86, 96,208,203,133,206, 46, 5,144, 72,219, 12, 25, 50,132, 91, 25,103,
+137,247,170,188,103,136,203,229, 34, 53, 53, 21,170,180, 39,224,167,198, 33, 68,202, 79, 61,231, 46, 0, 0, 32, 0, 73, 68, 65,
+ 84, 67, 75, 87, 71, 72, 36,146,234,127,172,140,141, 37, 24, 27, 75, 98, 94, 83, 18,243,154,146,178,235,101,135,165,165,165,193,
+125, 81, 30,222, 27, 87, 9,202,231,103,189,135, 45, 1, 87,203, 31, 91, 44,178,170,252,123,218,183,111,223,172, 78,157, 58,101,
+246,232,209, 67,119,230,204, 25, 16, 66, 16, 25, 25,137,212,212, 84,244,232,209, 3,148, 82,220,189, 91,228,156,125,244,232, 17,
+186,118,237,170,107,223,190,125,234,190,125,251, 42,245,162,148,197,232,209,163, 97, 48, 24, 80, 80, 80,128,156,156, 28,156, 62,
+125, 26, 33, 33, 33,212,202,202,106, 0,167, 86,247,239,195,199,204,106, 29,220, 40, 20, 27,215,175,210, 9,184,188,229,230,112,
+150,128, 16,130, 17, 83,167,102,229, 53,110,156,179,167,176, 80, 53,210,198,198,202, 39, 37, 69,246,240,194, 5, 71,189,190,218,
+201,131, 0,254,240,226,120,122,122,150,138, 43, 62,159, 15,174,192, 9, 28, 73, 67, 8, 28,122,192,202,117, 0,174, 68, 9,181,
+182, 18, 28,179,150,226,188,196, 14,149,150,104, 0, 64,140, 70, 35,248,124, 62,174,254,126, 14, 33,179,129,144,217, 64, 90,243,
+ 19,248,116,242, 71,112,156,244, 2,182,126, 64,250, 13, 64,177, 42, 4,134,215,182, 74,173, 28,135, 42, 19, 87, 0,160,213,106,
+ 53, 44,203,130, 16, 2, 62,159, 47, 40,179,235,214,213,171, 87,113,249,242,101, 0,120, 89,178, 49, 55, 55,151, 50, 12, 3,137,
+ 68, 2, 0, 21,134,176, 1,128,101,217,210,124,176,171,119,175, 59,124,250, 73, 24,185,253,248, 55,180, 9, 25,130,236, 2, 61,
+ 50,242,244, 80,168,128,160,102,115, 16,220,245, 24,158,188,206, 71,104,163, 96, 14, 71, 32,249,160, 20, 14, 11,254, 51,168, 72,
+139,252, 55,163,196, 5,115,181,124, 98,153, 81, 40,124,102,156, 48, 1,118, 39, 79,130,247,242, 37, 70,141, 24, 97, 99,101,101,
+181,158, 16,210,132, 16,210, 70, 42,149,110, 92,176, 96,129,181,227,178,101,112,191,126, 29, 73,167, 79,195,192,227, 61,248, 16,
+ 35,212,106, 53,184,220, 34,103,154, 78,167,131, 68, 34, 1,203,178,128, 25, 33, 34,214,136, 59,169, 25,113, 16,160, 46, 76,160,
+ 5,231,149,237,239, 13, 73,152,227,124, 90,233,229,251,170,144,239,187,200,169,165,243,250, 58,109,239, 21, 18,110,129,192, 78,
+132,228,228, 20,176, 48,221,169,137,125, 26,141, 38,175,176,176, 16,161,161,161, 14, 15, 31, 62,244, 9, 9, 9,145, 21,111,191,
+255, 1,151, 91, 10, 66, 72, 43, 15, 15,143,195,158,158,158,137, 30, 30, 30,135, 9, 33,173,106,112,248, 47, 55,110,220, 0,135,
+195,193,130, 5, 11,144,159,159, 15,189, 94,143,236,236,108, 36, 39, 39, 67,167,211,225,237,219,183,120,254,252, 57,116, 58, 29,
+146,146,146,160,213, 86, 26, 41, 40,133,193, 96,128,181,181, 53, 20,217,153,146,131,155, 86,247,254,126,225, 92,113,222,171,223,
+241, 54, 45, 3, 38, 86,157,182,114,229,202,231,190,190,190,151,245,122,125, 45,147,201,212,129, 82,186,197, 92,161, 73,138, 10,
+149,222,244,247,247,111,177,114,229,202, 14,115,151,111, 23, 90,115,242,169,192, 90,104, 18, 88, 11,168,192,191, 37,198,204,223,
+ 32, 90,190,116,241,163,199,143, 31,231,152, 83,116,179,132,179,101,203,150, 65,233,233,233,109, 67, 66, 66, 66, 93,235,251,137,
+132, 30,238, 89, 2,247, 58,217, 84,173,186,196,212,174,247,241,250,245,235, 31,222,189,123, 55,163, 38,156, 30, 30, 30, 13,127,
+254,249,231,102,181,107,215,110, 38,178,181, 21, 23, 40, 20, 91,181,138,156,237, 60, 71, 87, 49,227,224, 24,190,103,207,158, 59,
+ 23, 47, 94,204,170, 9,103, 96, 96, 96,240,210,165, 75,155, 52,110,220,184,137,155, 95, 3,145,216,195, 83,206,247,168,147, 41,
+110,212, 84,196,212,241, 30,184,118,237,218,123, 15, 30, 60,144,155,195,201,229,114, 89,134, 97,192,227,241, 32,145, 72,112,237,
+218, 53, 12, 25,240, 17, 92,157,109,224,215,160, 1, 58,142,253, 10,103,206,156,129, 64, 32, 0,195, 48, 96, 24,230, 47, 23,180,
+ 52, 71, 8, 85,135,202,196, 87,117,220,148,210,179, 87,175, 94,253, 97,228,200,145,130, 94,189,122,225,222,189,123, 24, 61,122,
+244,205,136,136, 8, 0,192,189,123,247, 48,121,242,228,155,151, 47, 95,198,184,113,227,208,185,115,103,193,141, 27, 55, 54,154,
+ 83,124,212,104, 52, 98,199,142, 29, 48, 26,141,144, 74,165,144,201,100, 8, 11, 11, 67,116,116,244,184,157, 59,119,198,113,120,
+188,207,122,247,249, 4,103, 78, 70,224,249,179,232,113,187,150, 14,171,113, 49, 95,134, 97,208,107,196,136,172,172,160,160,156,
+ 93, 74,165,234,115,123,123, 43,255,244,116,217,149,195,135, 29,171, 59,150, 16, 66, 88,150, 45, 21, 85, 37, 98,163,228,197, 21,
+ 56,129, 43, 9, 6,215,186, 25,158,188,226, 27,120,205,105, 20,191, 41,141,173,170,200, 40, 33, 4, 38,147, 9, 60, 30, 15,141,
+235,183,249,127,236,157,119,120, 20, 85,219,198,239, 51,179,125, 55,187, 73, 54,189, 64, 18, 2, 73,232,129, 64, 66, 47,130,130,
+ 4,165, 72,121,177,208,148, 34, 42,168,136, 8, 72,111, 2,175, 32, 82, 4, 1, 1,145,106, 69,122,145, 72, 7, 65,145, 94, 19,
+ 72,111,155,182, 73,182,206,156,239,143,100,215, 37,108,146,221, 0, 2,239,183,191,235,154,107,203, 76,238, 61, 51,217,157,185,
+231, 57,231, 60, 15,110,126, 91,246,126,189,215,129,152, 13,185,240,109, 83,214, 45,120,119,161, 47, 62, 26, 62, 3, 66, 86,100,
+170, 46,109, 14,207,243,151,114,115,115, 33, 16, 8, 16, 25, 25,233, 79, 8,177, 68,165, 62,239,220,185,243,204, 55,222,120, 99,
+ 1,128,113,229,159, 31,210,191,127,255, 64,163,209,136, 63,255,252, 19, 0,206, 85,166, 75, 41,181,206, 26,212, 20, 38, 73,194,
+ 2,155, 32,186,193, 72,120,122, 54, 69,170,198,128, 52,141, 1,107, 86,246,198,185,163,179,241,199,254, 55,112, 55, 35, 3, 50,
+255, 62,224,204,250,198,213, 29, 91, 23, 79, 21, 15,120,145,103,153,138,105, 26, 0, 0,117,213,106,165,201,100, 76, 57,112,224,
+128,145, 97, 24,200,229,114, 12, 25, 54,140, 89,185, 98, 69,251, 65,173, 91, 31, 30,241,252,243,123, 14, 31, 58,212, 60, 46, 46,
+ 14,148, 82, 48, 12,131,173, 91,183,150,234,116,165,185,181,107,215,246,176,255, 81,255, 96, 59,182,138, 82,138,194,194, 66,171,
+193, 42, 40, 40,128,159,159,159,195, 93,132,197,133, 56,120,104,239,185, 60,202,189,125,175,199,205,197,198,249, 25,189,227,242,
+121, 78, 80,192,153, 80, 80, 74, 81,164,131,224, 52,163,142, 27, 18,209,199,120,167,107,220,181,132,171, 39,114,117,156,206,169,
+217, 15, 89, 89, 89,147,251,247,239,159, 27, 16, 16, 64, 84, 42, 21,130,130,130,152, 94,189,122,229, 36, 39, 39,207,116, 70,199,
+ 22,111,111,239,255,116,238,220,121,103,106,106,106,191,132,132,132,208,223,127,255,189, 95,231,206,157,119,122,123,123, 87, 57,
+112,214,134,109,147, 38, 77, 42, 22,139,197,104,213,170, 21,138,138,138, 96, 48, 24,170, 93,170,131,231,121, 72,165, 82,108, 95,
+179,228,133, 57, 51, 62,149,229, 94, 57,137, 11,199, 14, 96,111,162,190,100,218,252, 47, 78, 73,165,210, 26,237,111,132,175,162,
+ 73,147, 64,229,149,247,135, 13, 76,251,100,226, 68,229,223,127,255, 45,123,111,236, 56, 36,101,230, 83,113,143,207, 89,116,252,
+148,249,171,216,155,196,191,248, 28, 62,155, 59,181, 35,128, 81,213,105, 54,244, 85, 52,105, 28,168,188, 60,126,196,160,219, 99,
+199,142,149,205,159, 63, 95, 23, 27, 27,107, 74, 79, 79,119,119,243,246,109, 33,244,242,110,157,152,145,233,209,162,101,203,155,
+ 99,199,142,213, 57,171, 57,117,234, 84,249,241,227,199, 69, 93,186,116,161, 89, 89, 89,158, 34,153,172,141, 80,233,222, 49, 45,
+ 39, 71,221,181,107,215,155, 67,135, 14,229,106,162,121,253,250,117, 81,139, 22, 45,104,122,122,186,167,220,203,167,149,200,203,
+167,195,157,244, 12,207,102,205,155,223,120,255,253,247, 77, 85,105,246, 95,246,143, 57,113,115,115, 75,143,142,142,198,180,105,
+211, 48,107,214, 44, 12, 24, 48, 0,137, 73,137,232, 56,116, 4,234, 12, 25,133, 95, 79,157, 65, 90, 90, 26, 38, 79,158,140,136,
+136, 8, 8,133,194, 27,149,233, 58,131, 35, 38,171,178,238,195,134,117,200,145,170,198, 89, 85,167,221,175, 95,191, 49,150, 84,
+ 12,195,135, 15, 63,182,116,233,210,118,195,135, 15, 7, 0,180,106,213, 10,179,103,207,110, 55,101,202,148, 99,115,230,204, 65,
+151, 46, 93, 16, 30, 30, 94,109, 62, 49,142,227, 96, 54,155, 49,104,208, 32,152,205,102,100,103,103,227,250,245,235, 88,189,122,
+ 53, 40,165, 82, 0, 8, 8, 12,110, 33, 22,139,241,215,249,179, 37,159, 14,143,219, 84,157,166, 5,219,115, 29,207,243,208,106,
+181,232, 55,122,116, 78, 74,189,122,154,175,114,114, 74,222,244,244,148,135,221,189,171, 86, 26, 12, 65, 85,141, 57,181, 53, 67,
+182,105, 9, 42, 46,150, 9, 42,142, 98,209, 28, 53,232,125, 72,247,182,183,154, 44,183, 16,128, 55, 3,231, 38, 10,241, 78,159,
+105,136,110,210, 12, 12,195, 56, 98,172, 79,157, 62,125, 26, 98,177, 24,239,191,255, 62, 97, 89,118, 9, 33,132, 80, 74,243, 40,
+165,211, 40,165, 31, 83, 74,117,132, 16, 34,145, 72, 86, 13, 27, 54, 12,122,189, 30,199,142, 29, 3,128, 67,246, 4, 45,227, 74,
+ 45,251,174,213, 16,112,188, 24,199,207,239,197,254,223,119, 32, 49, 53, 27,119,179,116,128,192, 29,186,226, 20, 24, 75, 83, 97,
+200, 63,143, 66,189,220,158,156,139,167, 28, 91, 47,242,172, 99, 47,209, 40,168, 74, 54,112,199,242,149,238,253, 7,189, 94, 28,
+ 29, 29,237, 25, 20, 20, 4, 66, 8,122,247,233, 67, 58, 39, 36, 40,133,129,129,240,138,137,177,102,207, 61,120,224, 0,246,238,
+221, 91,188,235,167, 31,131,134,189,249,230, 75,176, 77,246, 92, 1, 66,136,160,110,221,186,214,207, 77, 79, 79,135, 68, 34,177,
+142,121, 40, 44, 44,132,143,143, 15,210,211,211,225, 96, 96,100,227, 39, 19, 79, 77,204,138,155, 92, 39, 78, 41, 36,123,138, 51,
+192, 81, 10, 33,225,128, 82, 10, 19, 7,232, 77, 20, 45,194, 88,245,254, 82,179,231,175,167,127,184, 3, 96,163, 51, 7, 73,167,
+211,253, 70, 8, 25,201,243,252, 14, 0, 76, 66, 66, 2,127,249,242,229, 49,142, 14, 72,183,135, 92, 46,159,112,248,240, 97,245,
+132, 9, 19,242,126,253,245,215,130,158, 61,123,186,175, 94,189, 90,253,220,115,207, 77, 0,176,165,186,191,167,148,150, 18, 66,
+ 54, 36, 39, 39,143,105,217,178, 37, 52, 26, 13,140, 70, 35,206,157, 59,135,136,136, 8,252,241,199, 31,136,140,140,196,217,179,
+103, 17, 21, 21,101,153, 50, 13,158,231,171,237,198, 77, 75,190,235, 38,215,231,169,210, 78,239,198,181, 11,127, 96,247,109,125,
+201,194,117, 91,119, 55,105,214,162,216,217, 19, 56, 0, 68,249, 41, 26, 5,249,122,237,159, 63, 99,170,111,210,111, 91,241,195,
+186,101,252,145, 61,123, 26,138,149, 24,217,233, 63, 99, 95, 49,152, 80, 27,128,164, 77, 92, 75,250,162,199,117, 94, 22,138,140,
+ 67,151,170,206,100, 30,229,167,104, 20,232,227,181,111,225,252, 89,202, 91,123,190,193,182, 85,159,211,239,191,221, 28,173, 3,
+226,154, 52,105,210,131, 16, 18, 0,192, 92,254, 63,114,168, 4,141, 61,205, 67,191,254,218, 92, 7,196,213,173, 91,183,135, 80,
+ 40, 12, 5, 0,147,201,148,250, 40, 52,155, 54,109,218,163,252, 14,159,150,143,185,114,170, 84,206,240,225,195, 23,141, 31, 63,
+254,125,147,201,100,205, 17,100, 50,153,216,213,171, 87, 11, 56,142, 99, 40,165, 70,134, 97,140,251,246,237,227,204,102,115,154,
+ 78,167, 27,237,168,118,101,188,242,202, 43, 56,117,234,212, 12, 84, 49,120,217, 22,141, 70, 35, 80,171,213,214,187,165,170,198,
+109, 57,162,157,144,144, 48,235,213, 87, 95,253,100,203,150, 45,215,151, 46, 93,250,242,168, 81,163,176,117,235, 86,212,171, 87,
+ 15,127,253,245, 23, 38, 79,158, 12, 0,237,166, 76,153,242,203,218,181,107,195,147,146,146, 22, 85,215, 70,147,201, 4,179,217,
+140,205,155, 55,163,119,239,222,240,241,241, 65, 96, 96, 32, 8, 33,191,189,249,230,155, 43, 0,128, 37,172, 8, 0,244, 58,189,
+190,126,253,150, 14, 71,108,195,195,195,173,231,186,140,140, 12,235,204,191, 23, 94,125, 53,103,205,252,249,216, 84, 90,138, 55,
+ 61, 61,229, 41,193,193, 1,191,220,186, 53,130, 16,178,186,178,136,176, 37,138, 83,157,185,114, 34,162, 12,203,216, 38, 63, 63,
+ 63, 76,121,103, 30,230,173,156,130,155, 56,130,122,175, 1,151, 22, 3,189,195,223, 69,203,232, 86, 8, 12, 12,172, 94,176,140,
+223,222,126,251,237,179,151, 47, 95,110,217,180,105, 83,204,156, 57,179,215,244,233,211,247, 19, 66, 70, 88,102, 49, 19, 66,194,
+ 88,150, 93,114,224,192,129,231, 85, 42, 21,174, 92,185,130,237,219,183,223,132,101,132,190,157,118, 2,176,230,188,170, 93, 43,
+ 82,119, 45, 73, 43,207, 74, 61,142, 99, 71,127, 66,189,232,113,144,249,191, 4,117,253, 57, 48, 94,253, 2,134,220,253, 80,215,
+234,137,148,164, 91, 96, 5,146,139,142, 54,220,197,211,129,173, 23,121,214,177, 59, 74,155,240, 68, 24, 21, 25,201,137, 24,124,
+211,251,165,151, 74,254,252,243, 79,235, 93,158,238,204, 25, 20,239,221, 11,142,227, 64, 41,197,239, 9, 9,120,227,245,215,181,
+ 66,150,172, 9, 11, 11,165,132,254,147,123,133, 16,242, 64, 30, 43,145, 72,212,191,127,255,254,214,147, 78,114,114, 50, 20, 10,
+ 5,196, 98, 49,120,158,135,217,108, 6,203,178,112,119,119,135,217,108,126, 32,228, 82, 81,147, 82,106,226, 52,197,253,214,198,
+191,150, 30,168, 53,210,145, 30, 97, 8, 17,201,172, 63, 74,127, 21,193,203,209, 66,120, 11,178,232,161, 69,207,167,241,250,220,
+126,180, 66,237, 47,123,237,172,176, 62,178,105,211,166, 43,222,120,227, 13, 6, 0,186,118,237,202, 52,109,218,244, 75, 66, 72,
+165, 37,109,170,211,148, 74,165, 18, 0,216,185,115,167,230,250,245,235,221,119,238,220,169,177,125,223, 65,205,213, 11, 22, 44,
+128, 92, 46,135,217,108,134,193, 96,176,142,191,178,125, 52, 26,141,240,246,246,198,174, 93,187,192,113,220,174,234,218,217,160,
+113, 83,109,129,192, 35,115,253, 47,135,176, 39,201,168,117,214, 92,217,106,214, 11,112,139,242,247,246, 58,176,112,238, 44,159,
+188,155,231,144,146,146, 66,247,237,221,117,178,148,210,212,252, 66,250,105,158,150, 70,149,232,169, 44, 54, 28,247, 14,172,250,
+152, 78,233, 0, 19,200,131, 93,195,182,154,141, 2,220,162,130,124,188,246,125,190,104,190, 50,255,198, 31, 72,207,200,192,238,
+ 93, 59,255, 44,165, 52,149, 82,250, 61,165,116, 40,207,243, 77,120,158,111, 66, 41, 29, 90,153,105,113, 86,211,104, 52, 54, 49,
+ 26,141,143, 84,211,217,118,218,204, 32,196,140, 25, 51,110,164,164,164,140,202,204,204,124,197,178,104, 52,154,222, 69, 69, 69,
+ 61, 75, 74, 74,122,148, 46, 14,117, 47, 46, 46,246, 45, 42, 42, 10, 40, 45, 45,109, 65, 41, 61,103, 79,211, 17,108, 47,176,105,
+105,105,211,211,210,210, 30,136,182,220,167, 57,242, 10, 89,190,232,237,111,183,111,223, 94,101,250,129,234,180, 43,182, 51, 59,
+ 59,123,199,230,205,155,155,213,169, 83, 39,124,232,208,161,248,234,171,175,176,116,233, 82, 61, 0,172, 93,187, 86,111, 19,185,
+170,149,152,152,216,210, 94,247,160,173, 38,195, 48, 27, 95,120,225, 5,250,251,239,191,163,119,239,222,214, 4,160, 95,127,253,
+ 53,204,102,115, 97,151, 46, 93,120, 0, 40,213,149, 20, 82,158,194, 96,180,223,207,110,239,120,138,197,226, 23,109,243,253, 89,
+146, 40,139,197, 98, 80, 74, 17,213,174, 93, 78,126,116,180,102, 93, 65, 65,201,244, 38, 77, 84, 35,234,215, 31,218, 0,120,221,
+158, 38, 33,228,190, 40, 78,197,165, 38,191, 77, 11, 22,141,224,224, 96,204,250,240,115, 4,159,121, 5,191,181,247, 66,179,220,
+161,232,214,254,101, 68, 69, 85,145,235,161,130, 38,165,148,102,101,101,141,154, 58,117, 42, 47, 22,139,241,214, 91,111,225,135,
+ 31,126,232,218,179,103,207,164,160,160,160,164, 70,141, 26,101,140, 25, 51,230,118, 78, 78, 78,207, 86,173, 90, 65,163,209, 96,
+244,232,209, 70,141, 70,211,223,118, 28,103,197,118, 18, 66,172,145,187, 94,241, 93, 53, 43,191,252,156,239,210,113, 12,228, 50,
+ 21, 76,194, 90,208,104, 77,200, 43,166, 48, 72,226, 32, 22, 73,208,173,117, 35,156,218,183,190,132, 51, 20,111,168, 76,243, 81,
+224,210,116, 81, 21,247,165,105,176, 60, 18,194,115, 28,199, 35,172, 78,152, 50, 41,241,222,178, 1, 3,250, 15,239,209, 35, 94,
+ 30, 31, 31, 47,109,116,181,172,139, 98,231,206,157,248,225,135, 31, 74,246,239,223, 95, 40, 17,178,107,107,213,174,229,199,113,
+ 60, 8,169, 58, 66,162, 84, 42,199, 78,154, 52, 73, 86, 80, 80,128,165, 75,151,242,205,154, 53, 99, 20, 10, 5,140, 70, 35,214,
+174, 93,107,106,212,168,145,144, 97, 24, 20, 20, 20,128, 97,152,107,142,236, 4,165,244, 2, 33,164,219,138,206,125,127,104,249,
+206, 48,175,134,157,219,120,118,170, 21, 4, 83, 12, 69, 90,114, 34,174, 31,218,159,119,105,223,146, 92,232, 50,251, 82, 74, 29,
+ 46, 70,109, 33, 48, 48,112,218,254,253,251,125,223,125,247, 93,170,211,233,200,189,123,247,232,220,185,115,125,223,122,235,173,
+105,168, 38, 23, 78, 21,144,252,252,124, 16, 66,120, 0,214, 71, 56, 81, 30,128, 82,122,145, 16,242,115,159, 62,125,122,117,233,
+210, 5, 87,175, 94,181,118, 5,218, 26, 44,203,108,194,121,243,230,229, 3,255, 36, 8,172, 12,137, 68,130,175,119,236,221,147,
+150,114, 87, 30, 22, 86, 87,231,238,233,201,215, 36,114, 5, 0, 98,134,153,254,217,172,169,190, 57, 87, 78,145,139, 39, 15,243,
+219, 47,100,102,153, 57,106, 63, 67,127, 81, 26, 5, 0,166,186,177,119, 12, 59,125,193,188, 89,238,150,238,203, 45,231,211, 11,
+ 9, 71,223,173, 81, 3,159, 53,205, 39, 64,217, 12,191, 52, 18, 24, 24, 72, 45, 93,120,246, 12, 86,117,216,235, 30,172,169,246,
+157, 59,119,230,198,196,196,140,191,113,227,198,246,134, 13, 27,142, 2, 80, 91,175,215,231, 79,153, 50,101,225,218,181,107,135,
+ 59, 18,185, 2,128,173, 91,183, 46, 25, 54,108,216,222,151, 94,122,233, 99,158,231,155, 90,222, 39,132,220,241,245,245,181,102,
+228,202,206,204,152, 56,114,248,160,137, 90,109,158,195,121,234,220,220,220, 70, 76,153, 50, 69, 90, 92, 92,140,229,203,151,243,
+141, 26, 53, 98, 44, 55, 67,223,126,251,173, 57, 50, 50, 82,208,127,204,152,156,197, 25, 25,152,125,244,104,241,196,198,141,155,
+173,187,126,189, 5,236, 68,216, 45, 55,140,246, 34, 87,150,225, 21,206, 98,209,180, 53,106,193,193,193,152,246,254,124,164,166,
+166, 66, 36, 18, 33, 34, 34, 2, 98,177,184, 26,165,251,161,148,254, 69, 8, 25,116,239,222,189, 13,203,151, 47, 23,183,106,213,
+ 10,177,177,177, 16, 10,133, 33,150,246, 26, 12, 6, 92,184,112, 1,147, 38, 77,162,103,206,156,121,139, 86, 81,160,158,227,184,
+172,200,200, 72, 75,155, 41, 33, 36,183, 80, 79,220,183, 53,136,115, 27, 58,114, 59, 57,118,246, 4,210,140, 60,244, 38, 30, 97,
+117,154,163, 83,247,197,248,101,207,223, 92, 90,210,229,203,166,210,188, 53,149,233,186,120,250,168,232, 69,158,117,236,254, 50,
+121,150, 57,254,213,170,149, 47,110,221,188,197,159,101, 25,255, 91,183,111,159,125,185,111,191,212, 3, 7, 14,168, 69,238,238,
+177, 0,120,195,168, 81, 39,141,250, 82,205,175, 63,255, 28, 18, 22, 22, 26, 93, 94,236,153,242, 44,115,188,170, 15,212,106,181,
+197, 71,143, 30, 45,249,228,147, 79, 72,114,114,242,119,126,126,126, 3,247,236,217,227,214,183,111,223,210,171, 87,175,126,239,
+239,239,223,171,115,231,206,202,241,227,199,235,181, 90,237, 50, 71,119,132, 82,122,153, 16,210,224,204,212, 69,175,158, 89,176,
+242,121, 8,216,182,208, 11, 1,222,116, 28,198,162, 3, 0,190,163,148, 58, 54,176,171, 2, 10,133, 34, 90,161, 80,224,207, 63,
+255,204,139,139,139, 51,232,116, 58,209,156, 57,115,188, 20, 10, 69,116, 77,244,202,219, 75,243,242,242,192,243,188, 0, 0, 41,
+127, 4,239,124,173,156,255,188,252,242,203, 63,111,219,182,237,133,248,248,120,132,135,135,195,100, 50, 33, 50, 50, 18, 6,131,
+ 1, 17, 17, 17,208,235,245,152, 49, 99, 6, 10, 10, 10, 62,160, 14, 20, 17,150, 74,165, 16,139,197,136,106,208,184, 68, 42,149,
+ 58, 61,174,195, 22,133,144, 9,191,246,235, 58,100,229,230,240,219,254,202,204, 44, 49,114,221,110,100, 21, 95,170,184, 93, 9,
+135,226,206, 67,223, 75, 5, 0, 61, 15,109,149,154, 98,132, 95,251,117, 53, 50,179,114,176,245,124,122,126,177,145,239,126,205,
+142,166, 83,237,124, 70, 52,251, 47,187,138, 78,111, 59,190,237,246, 42,146,118, 58, 66, 77,140,148,133,203,119, 40,193,170, 6,
+ 20,171,150,217,205,113,245, 48,218,229,145,169,159, 1,128, 16,146, 60,104,208,160,137,137,137,137,179,202,243, 93,173,170,250,
+175,239,103,221,186,117, 55, 0, 12,171,106,155, 45,139,134,253, 8,224, 71,103,116,139,138,138,116,231,206,157,211,141, 31, 63,
+158, 36, 39, 39,239,241,247,247,127, 97,239,222,189,242,190,125,251,234, 47, 94,188,120, 40, 48, 48,176, 67,215,174, 93,221,118,
+159, 62,157, 90,114,235,214,175,191, 38, 38, 6,155,120,254,215,202,244,202,103,230, 61, 18,115,101,209,179,141, 12, 89, 76, 86,
+ 96, 96, 32, 66, 66, 66, 30,234,119, 79, 41,221, 70, 8,185,210,174, 93,187, 31,134, 14, 29, 90, 47, 46, 46, 14,145,145,145,208,
+104, 52, 72, 73, 73,193,177, 99,199,176,122,245,234,211,165,165,165,239,218, 70, 86,237,145,155,155,251, 64, 25, 33, 34,243, 10,
+ 92,191,124,250,206,179,199, 98, 35,219,199, 15,145, 53, 14,228, 97, 48, 82, 36,223,189,133, 25,159,174, 41, 73,191,123,227,178,
+209,108,236,227,202,129,229,226, 73, 98,247,215,121,251,118,242,229,240,240, 90,147,126,248,126, 71, 91, 74, 25,150, 18, 82,236,
+225,225,185,243,222,189,123,247,101,193,174,171, 86, 43,135,189, 53,108, 32,225,137,144, 16,158,227, 89,230,248,237,219,201, 85,
+ 70,136, 12, 6,195,200,129, 3, 7, 46,149,203,229, 83, 52, 26,205,159, 30, 30, 30,127, 69, 71, 71,207,162,148,126, 90, 90, 90,
+250,179, 82,169, 60,221,166, 77,155, 57, 33, 33, 33, 75, 40,165,127, 56,179, 51,229, 6,106, 3,170, 24, 3, 86, 19, 8, 33, 51,
+ 1,184, 11, 4,130,130,191,255,254,123,115, 84, 84,212, 32, 74,169, 59, 33,164,160,166,154, 58,157,238,221,252,252,124,239, 17,
+ 35, 70,152, 86,175, 94, 29, 53,100,200,144,137,151, 46, 93, 18,234,116,186,219,206,232, 80, 74,245,132,144, 94, 3, 6, 12, 88,
+ 35, 20, 10,187, 48, 12, 67,120,158,167, 54,235, 65, 41, 5,199,113,191,160,154,227, 34, 20, 10,181, 47,190,248,162, 91,117,159,
+ 41, 22,139,171, 52, 64,182, 20, 25,184,113, 43, 15, 95,154,167, 51, 81,106,230,233,200,107,153,197,118,167,144,157,185, 70, 27,
+ 57,172,169,227,199, 45,221,119,121,158,222,196,243,102,158,142,170, 76,211, 25,158, 21, 77, 0, 24,205, 44,251, 22,171,150, 89,
+ 7,188, 91,186, 13, 43,190,126,212, 88, 34, 77,112, 38,203,114,121, 58,134,170,178,179,215, 88,187, 28, 91,179,229, 44,253,250,
+245,123,100,169,101, 42, 98, 52, 26, 39,191,252,242,203,179, 60, 60, 60, 22,102,103,103,255,233,225,225,113,185,126,253,250,227,
+120,158, 95, 82, 82, 82,178, 83,169, 84,190,212,178,101,203, 15, 66, 67, 67,215, 39, 81,186,190, 42, 45,142,227, 82, 45, 81, 28,
+ 0,212, 18,125,178, 24, 8, 91, 35, 97, 50,153, 42,205,161, 86, 81, 51, 58, 58,186,188,215,162, 76,175,226,163, 45,142,234, 90,
+ 27, 89,118,211, 91,127,214,172, 89,109, 0, 60, 7, 32, 26, 64, 33,128,187, 0, 78, 82, 74,247, 58,163,119,159,118,105,110, 26,
+ 33, 36,230,202,249,163,163,174, 95, 62,255,170,101,182, 32,203,138, 47,114,198,146, 13,166,210,188, 53, 46,115,229,226,137, 99,
+185, 0, 63,142, 5, 64, 87,151,166, 75,211,165,233,210,116,105,186, 52, 93,154, 46,205,255,111,139,171,244,184, 11, 23, 46, 92,
+184,112,225,194,197, 35,134, 0,176, 59, 19,128, 58, 81, 41,187, 38,179, 9,170,211,119,105,186, 52, 93,154, 46, 77,151,166, 75,
+211,165,249,191,167,249,255,134,199, 25, 30,195, 51, 18,150,116,105,186, 52, 93,154, 46, 77,151,166, 75,211,165,249,100, 53,255,
+215, 22, 87, 23,161, 11, 23, 46, 92,184,112,225,194,197, 35,166,230,115,124,255,159, 82, 94, 83,238,109, 0,253, 0,212, 5,112,
+ 11,192, 14, 0, 43,168,227, 5,143,109,245, 84, 0, 38, 2,104, 11,160, 14,128, 59, 0,142, 2,152, 79, 41,117,120,182,222,255,
+ 55,124,124,124, 38, 9,133, 66, 15,160,172,220,135,229,209,246, 57,199,113,249, 5, 5, 5,115, 31,199,231, 19, 66, 88, 74,169,
+ 67, 51,208, 44,109,181,109,155,237,163,201,100,122,108,237,116,241,116, 66, 8,137, 84,171,213,155, 52, 26,205,107,148,210,235,
+ 79,186, 61, 46, 92, 60, 74,124,125,125, 71, 25,141,198, 41, 34,145,104, 78, 86, 86,214,202, 39,221,158, 39,133,213, 96, 17, 66,
+ 18, 0,128, 82,218, 17, 0,148, 74,229, 9,134, 97,234,148,175, 3, 80, 86, 19,202,246,117,197, 71,158,231,239,228,230,230,182,
+169,236,195,228,114,249, 9,150,101,235, 16, 66, 44,197,103,193, 48, 12, 76, 38,147,146,101,217,162, 74, 52, 83, 52, 26, 77,139,
+ 71,180,191, 15, 69,121,173,176, 95, 61, 61, 61,117,179,102,205, 90,209,169, 83,167, 90,105,105,105,230, 9, 19, 38,116,248,235,
+175,191,226, 9, 33, 47, 58, 99,178, 8, 33,173, 9, 33,235,155, 53,107,246,227,224,193,131,183,197,197,197,137,115,115,115,149,
+ 59,118,236, 8,218,176, 97,195, 57, 66,200,107,212,201, 84, 21, 79, 59,132, 16, 1,173, 36, 31, 89, 85,235, 42, 34, 20, 10, 61,
+ 82, 82, 82,148, 64, 89, 55,119,185,161,130,201,100,130,201,100, 66,113,113, 49,162,163,107,156,166,172, 82, 2, 2, 2,154, 19,
+ 66,150, 69, 68, 68,180, 8, 12, 12, 60, 11, 96, 76, 90, 90,218, 95,206,180,213,108, 54,131, 82,106,109,103,195,134, 13, 31,121,
+ 59,255,151, 33,132,188, 41, 22,139,187, 71, 68, 68,196,234,245,250,188, 59,119,238,156,225, 56,110, 42,165, 52,227, 17,233,187,
+ 3,152, 42,145, 72,226,234,214,173, 91,235,198,141, 27,201, 70,163,241, 52,128,153,148,210, 26,167,102,177,209,143,236,216,177,
+227,177,229,203,151,123,141, 30, 61,250, 24, 33,164,157,203,100,185,120, 82,212,174, 93,219,163,184,184,120, 13,128,230, 66,161,
+208, 95, 42,149, 66, 38,147,101, 72, 36,146, 63,101, 50,217,240, 99,199,142,229, 87, 43, 82, 1,142,227,166, 38, 37, 37,249,183,
+106,213,106, 65,227,198,141,103,228,228,228,232,140, 70,227,161,188,188,188, 15, 40,165,133, 85,253,109, 69, 47,242, 44, 35, 0,
+172,197, 21, 59,221,183, 66, 32, 8, 78, 74, 74,242, 85, 42,149,224, 56,206, 26, 29,176, 92,204,202,251, 96, 1,148, 93, 52, 56,
+142, 67,253,250,245,141, 85,125,152, 80, 40,172,149,146,146,226,235,230,246, 79,170, 37,163,209, 8,127,127,127, 62, 53, 53,213,
+183, 98, 33, 97,131,193,128,224,224,224,167, 41,151,201,219,106,181,186,224,222,189,228,104,157,222, 56,243,173,119, 63,153,244,
+ 90,191,231, 61, 79,156, 56,193,191,248,226,139,250,132,132,132,183, 1, 56,148, 28,149, 16,226, 78, 8,217, 48, 97,194,132, 25,
+ 82,185,202,235,240,137,203,250, 13, 59,118,165, 54,139, 12, 35, 31,124,240, 1,251,222,123,239,253,222,188,121,243, 77,132,144,
+ 24,103, 34, 89, 74,165,114,175, 68, 34, 9,101, 89, 22, 70,163,241,158, 70,163,121,161,198,123,251,136, 33,132, 52, 3,112,158,
+ 16,210,156, 82,250,167,163,235,170, 34, 55, 55, 23,165,165,165, 15, 44, 13, 27, 54,188,239, 59,250,136,218, 47,168, 85,171,214,
+207,243,230,205, 11,202, 72, 79,199,231,139, 23,183, 2,176, 2, 64, 43, 71,254, 62, 43, 43,235,129,118,214,175,255,120,114, 86,
+253,175, 66, 8,153, 56, 99,198,140,121,175,190,250, 42, 56,142, 67,105,105,105,224,205,155, 55, 27, 77,153, 50,165, 15, 33, 36,
+150, 82,234, 84, 30, 57, 59,250, 62, 17, 17, 17, 87,199,141, 27,167,142,141,141, 69,121, 85,137,192,163, 71,143,182, 90,187,118,
+237, 27,132,144,250,148,210,236,135,249, 12,181, 90,189,233,235,175,191,246,146,203,229,248,229,151, 95,188,186,116,233,114,148,
+ 16,210,190,166, 38,139, 16,194,120,121,121,189, 7,224, 57,158,231,197, 0, 78,231,229,229,205,166,148, 86,121, 62,118,225,194,
+219,219,251,205,162,162,162,229, 18,137, 68,228,233,233, 9,185, 92, 14,129, 64, 0,129, 64, 80, 91, 34,145,212,150, 72, 36, 61,
+158,123,238,185, 49,135, 15, 31,174, 50, 35,126,155,230,254, 67,193,144,153, 44, 97, 88, 0,104, 24,225,165,114,119,119,199,204,
+153, 51, 21,189,122,245, 82, 0,192,177, 99,199, 6, 15, 25, 50,164, 11, 33,164,113,101, 38,203,158, 23,121,150,177, 45,246,156,
+ 96,187,130, 16, 2,153, 76,134,109,219,182,129,101,217,251,170,184,219,123, 94,187,118,237,106, 63,204, 18, 1,219,185,115, 39,
+ 84, 42, 21,220,221,221,173, 23, 24,137, 68,130, 67,135, 14, 65, 40, 20, 66, 32, 16, 64, 40, 20,162, 69,139, 22,118, 19,222, 61,
+ 78,250, 55, 42, 43, 50,105, 47,121, 99,251,186, 50,244,123,111,250,192, 18,157,177, 37,128,226,252,188,188,188,179, 63,252,144,
+214, 44, 50, 82,180,105,211,166,216,160,160,160,126,112,208, 96, 1,152, 24, 19, 19,243, 61, 43,115,247, 30, 60,100,232,224,225,
+ 2,198,248,198,200,241,115,146,211,115,138, 71,140, 24,241,195, 47,191,252, 50,248,179,207, 62,187,242,209, 71, 31, 77, 4, 48,
+217,209,246,139,197,226,208,155, 55,111, 70,240, 60,143, 38, 77,154, 60, 53,229, 6, 44, 6,138, 82, 10, 66,200,125, 70,170,170,
+117,213, 97,137, 88,217, 91, 30, 53, 65, 65, 65,245, 95,127,253,117,111, 77, 78, 14, 62, 95,188,216,242,118,139,234,186, 11, 45,
+ 93,129, 6,131, 1,175,188,242,202,235, 28,199, 9, 44,230, 79,175,215, 27, 10, 10, 10,116, 54, 51,117,178, 41,165,207, 87,215,
+ 22, 66, 72, 29,133, 66,177, 16, 64,243,210,210,210, 32, 0, 80, 40, 20,169, 60,207,255, 88, 92, 92, 60,153, 82, 90, 90,147,125,
+ 36,132,212, 2,208, 8,149,151,108,162,243,230,205,187, 49,113,226, 68,135,141,204,163,210, 36,132,132,250,249,249,205,237,223,
+191, 63,118,237,218,133,221,187,119,155,100, 50,153, 96,200,144, 33,100,204,152, 49,158,227,198,141,235, 1,224, 11, 71,219, 85,
+ 9, 61,102,204,152,161,110,208,160, 1,118,236,216,129, 11, 23, 46,148, 70, 68, 68,200, 58,117,234, 4,129, 64,160,158, 52,105,
+210,139, 0,214, 63,204, 7,104, 52,154,217,227,199,143,223,176,121,243,102,229,157, 59,119,176,108,217, 50,239,129, 3, 7, 38,
+ 16, 66, 58, 58,106,178, 8, 33, 18, 0,239, 1,232,204,178,108,251, 33, 67,134,152,223,125,247, 93, 33,195, 48,166,197,139, 23,
+251,172, 93,187,118,160,183,183,119,243,156,156, 28,215, 48,131, 42, 96, 89,214,200,243,188, 16,128,148, 82,170,175,238,245, 19,
+110,238, 35,197,203,203,107,116, 94, 94,222, 10,127,127,127,248,249,249, 61,112,173,213,235,245,144, 74,165, 34,127,127,255,175,
+123,247,238, 45,252,233,167,159, 42,237,234, 35, 44,153,250,203,150, 89, 65,106, 79, 37, 0, 96,201, 87,251, 74, 0,224,167,159,
+126, 66, 90, 90, 26, 60, 61, 61,209,184,113, 99,118,214,172, 89, 1, 31,124,240,193,231, 0,134, 87,166, 85,209,139, 60,203, 84,
+ 57, 6,139,231,121,107, 33, 81,139,145,178,152,159,138,207,129, 7,179,255,210, 10, 83, 53, 9, 33, 68,171,213, 90,205,149, 74,
+165, 66,249, 69, 21, 38,147,233, 1, 93,142,227, 44,142,182, 82, 77,123, 16, 66, 70, 3, 56, 68, 41,189,229,200, 65,176,213,220,
+254, 78,125,108,144, 76, 24,100, 73,121,222, 99,124,217,227, 6, 0, 39, 18,135, 47, 91,222,177, 99,208,123,159, 46,157, 94,154,
+155,150, 51,233,245,151, 66, 35,252,189,100,138,252,172, 2,117, 84, 84, 55, 0,102,123,154,149,208, 97,240,224,193, 27,247,159,
+ 74, 34, 82,169, 72, 36, 96, 89, 97,187, 38,145, 94,181,220, 89,119, 37,224,158,124,251,198,137,161, 67,135, 54,249,232,163,143,
+218, 59,179,239, 12,195, 64,165, 82, 97,227,198,141, 96, 44,142,214,193,125,127, 84,216,249,191, 11, 80,110,160, 52, 26, 13,118,
+237,218,133,248,248,248,243,132,144,230,229,155,156,167,148,162,176,176, 16,233,233,233, 8, 8, 8, 56, 79, 8, 17,218,118, 23,
+ 86,212,180, 68, 81, 45,102,106,200,144, 33,175,155,205,102,235,247,217,142,113, 1, 42,152, 23, 71,247, 61, 48, 48,112, 63,128,
+231, 89,150,133, 65,167, 51, 44,252,239,127,109, 87,255, 97,107,174, 42,211,180,180,149,227, 56,193,249,243,231,133,150,223, 12,
+ 0, 33, 0, 5, 0,111, 74, 41, 24,134,121,160, 38,155,157,227, 89, 95, 46,151,159,216,185,115,167,170, 69,139, 22, 68, 44, 22,
+195,108, 54,227,226,197,139,181, 62,251,236,179,145, 7, 15, 30,124,145, 16,210,144, 86, 40,106, 94,149,166, 13,141,142, 30, 61,
+ 90, 28, 30, 30,110,215, 48, 22, 22, 22, 10, 34, 35, 35, 59, 2,120,192, 12,253, 11,154, 41,153,153,153,189,159,127,254,249, 81,
+ 25, 25, 25, 87,205,102,243,199, 0, 26,123,123,123,159,239,219,183, 47,100, 50, 89,103, 56, 96,176,170,250,191,251,250,250,246,
+106,211,166, 13,150, 45, 91,134,207, 62,251,172, 43,165,244, 16, 33,164, 75, 97, 97,225,193,151, 95,126, 25, 30, 30, 30,189, 97,
+199, 96, 57,250, 93, 34,132, 68,118,232,208,225,235,153, 51,103, 42,119,237,218,133,136,136, 8, 20, 21, 21,225,195, 15, 63,244,
+157, 54,109,218, 17, 66, 72, 39,139,201,170, 76,147, 16,210, 80, 34,145,172,223,188,121,179, 91,120,120,120,184, 72, 36, 98,194,
+195,195,161,209,104,160,211,233, 36,115,230,204,105, 34,147,201,254,250,226,139, 47,214, 3,232, 91,147,118, 58, 67, 85,154,229,
+213, 46, 84, 0, 60,156,233, 94,173, 98,223, 11, 0, 72, 44,175,133, 66, 33,164, 82, 41,164, 82, 41, 36, 18, 9,110,220,184,241,
+169, 88, 44, 94, 12,155,115,113, 85,154,228,159,139, 86, 52, 33,228, 12,203,178, 85,190,174, 56, 4,228,223, 62,158, 0, 64, 8,
+ 9, 38,132, 44, 1,208, 25, 0,195, 48, 76,130,183,183,247,216,140,140,140,187,142,106, 6, 6, 6,122,105,181,218, 47, 2, 2,
+ 2,224,231, 87, 86,143,157, 97, 24, 4, 5, 5,193,100, 50, 33, 51, 51, 19,148, 82,228,231,231, 67, 46,151, 35, 48, 48,240,139,
+145, 35, 71,238, 88,181,106, 85,174, 93, 77, 30,159,189, 60,112,202, 84,150,101, 25, 0, 96, 5,110,110,227, 62, 1, 66, 67, 67,
+209,174, 93, 59,232,116, 58, 20, 20, 20,160, 81,163, 70, 2, 66,200, 96,134, 97, 84,148,210,149,148,210,195, 78, 31,160,103, 8,
+203, 5,105, 70,197,126, 79, 66, 8,120,158,135, 64, 32,184,207, 96, 85, 92, 44,102,168,252,123, 90,101,196,132, 16,194, 24, 12,
+ 6,171,185,114,119,119,183,154, 51,179,217, 92,153,193,114,122,167,188,188,188,154,242, 60, 95,135, 16,178,202, 81,147, 85,145,
+193,131, 7, 63, 48,158,227,131, 15, 62, 72,201,202,202,162,175,116,139, 86, 92,221,147,150, 94,215,211, 77,230,163, 84,134, 73,
+ 61,213, 30,185,185,185, 39, 1,120, 56,241, 17,245, 98, 98, 98,100, 27,126, 56,154,242,214,251,243,102,181, 8,247, 82, 53, 13,
+246,246,244,119,151,137,221, 24, 82, 44, 53,155, 82,212,106,117,132,179,237,182,212, 15,243,240,240,128, 64, 32,120, 42, 34, 88,
+148, 82, 51, 33,164, 57, 33,228,252,174, 93,187, 16, 23, 23,103, 53, 89,229,235, 81, 80, 80,128,139, 23, 47,162, 67,135, 14, 0,
+208,220,145,177, 88, 60,207,195,104, 52,194,104, 52, 90,141,139, 72, 36,178,172,182, 26, 23,203,182, 44,203, 86, 90, 80,182, 26,
+102,121,122,122,118,232,220,185,179,120,203,182,109, 98, 74,105, 49,202, 10, 82,107, 41,173,164,112,117, 5,204,102,179, 53,170,
+ 38, 20, 10,113,239,222, 61,107, 20,216, 18, 9,174,216, 69, 94, 25, 18,137,100,252,214,173, 91, 85,177,177,177, 36, 55, 55, 23,
+ 60,207, 91, 79,142, 43, 86,172,144,246,235,215, 47,232,220,185,115,147, 80,131,178, 51, 0, 72,101, 70, 8, 0, 84, 42,149, 25,
+112,122,246,177, 93, 77,179,217, 76,218,182,109,251, 81, 78, 78, 78,147,210,210,210, 57,213,137,148,127, 39,126, 41, 95,202,132,
+ 9,249,235,234,213,171,165, 3, 6, 12,144,133,133,133,197, 57,217,174, 7,136,140,140,108, 45, 20, 10,113,250,244,105, 61,128,
+132, 13, 52, 89,147, 0, 0, 32, 0, 73, 68, 65, 84,242,183, 19, 46, 92,184,160,239,219,183,175,164, 86,173, 90,173, 29,213, 34,
+132, 68,214,175, 95,255,128,175,175,175,204, 18,177,236,223,191,191,112,245,234,213,202,212,212, 84, 24,141, 70, 76,156, 56, 17,
+ 61,123,246,132,183,183, 55, 62,248,224, 3,191, 5, 11, 22,108, 2, 16, 83,133,166, 84, 44, 22,111,188,121,243,102, 68, 64, 64,
+128,236,212,169, 83,104,218,180, 41,114,114,114,144,145,145, 1,173, 86,139,140,140, 12, 12, 31, 62,220,247,243,207, 63, 15,124,
+136, 67,241,168,201, 23,137, 68,144,203,229, 30,249,249,249, 15, 51,142, 77, 2, 64, 12,252, 99,174, 36, 18, 9, 36, 18, 9,164,
+ 82, 41,120,158,127, 42,206,121,143, 11, 66, 72, 16, 33,228,178, 72, 36,146,200,229,114, 17,195, 48,144, 72, 36,221,212,106,245,
+165, 23, 94,120,161,241,254,253,251,147, 28,209,209,233,116, 27, 37, 18,137,208,215,215, 23, 0, 16, 17, 17,129,166, 77,155,162,
+184,184,152, 47, 40, 40,128,135,135, 7,115,247,238, 93,148,150,150, 34, 61, 61, 29, 33, 33, 33, 66,134, 97, 54, 2,120,209,158,
+222,241,115,233, 95, 1,248,202,242,218,199,199, 39, 19,128,204,242, 90, 42,149, 34, 40, 40, 8,169,169,169, 80, 42,149,236,180,
+105,211,250,110,219,182,173, 15, 33,100, 48,165,244, 91, 27,169, 7,188,200,179,140, 0, 0, 40,165,211, 9, 33, 29, 43,174,180,
+ 24, 44,203, 98, 47,114,101, 89, 28, 49, 66,132, 16,112, 28, 7, 63, 63, 63,200,229,114,200,229,114,107,193, 81,142,227, 30,208,
+ 47,191,163,119,122,167, 20, 10, 5, 94,125,245, 85,186,114,229,202, 81,229, 38,235,166,163,127,219,127,217, 85,107,212,170, 34,
+ 13, 27, 54, 60, 49,105,210,164, 94,191,253,246, 91,106,139,240, 48,129, 34,237,174, 86,170,242,240, 64,112,237,248, 33,189,251,
+ 94, 64,217,108, 66, 71,185, 89, 84, 84, 36,171, 27, 44, 55, 48,140,142,212,150, 8,148, 1, 10,145,196,223,211, 51, 72,100,208,
+103,169, 60, 61,197,122,189, 62, 31, 64,149,197,153, 85, 42,213, 62,137, 68, 18,194,178, 44, 88,150,133,183,183,183, 59,165, 20,
+ 30, 30, 30, 8, 14, 14,118,139,138,138,186, 46, 16, 8,192, 48, 12,180, 90,237,221,196,196,196,110,213, 53,204,211,211,115,159,
+ 68, 34, 9, 97, 24, 6,132, 16,176, 44,107,157,144, 96,121,206,178, 44, 8, 33, 40, 41, 41,113, 72,147, 82,250, 39, 33,164,121,
+124,124,188,213,100,237,217,179, 7,221,187,119, 71,126,126, 62, 46, 93,186,100,107,174, 28,234, 30,180, 29,212, 78, 41,133, 72,
+ 36,194,181,107,215,238,235,186,182, 44, 74,165,210, 17, 73,187,168,213,234, 99,253,251,247,199,215, 95,127, 77,105, 89,149,119,
+ 5, 33,164,169,187,187,251,181,203,151, 47, 59, 52,206,133, 82, 10,163,241,159, 77, 45,223,113,219,223,151,163,176, 44,219, 45,
+ 38, 38,134, 20, 20, 20, 88,140,163,245, 70,136,101, 89, 44, 95,190, 92, 22, 27, 27, 59, 69, 42,149,126, 36, 18,137, 10, 77, 38,
+211, 22,157, 78, 55,135, 82,234,244, 96,213,199, 73,251,246,237,223, 79, 78, 78,238, 25, 18, 18,178,179,166, 26,148, 82,218,178,
+101, 75, 3, 0, 25,203,178,194,106,255,160, 26, 8, 33, 44, 0,112, 28,167,179,152,124, 74,169, 57, 38, 38, 70,135,178,139,187,
+195, 21,144,189,189,189, 55,237,222,189, 59, 56, 36, 36, 4, 38,147, 9,102,179, 25, 90,173, 22, 9, 9, 9,208,235,245, 48,155,
+205,136,136,136,192,212,169, 83,117, 99,199,142,149,174, 90,181, 42, 75,171,213,190, 86,141,236,216, 29, 59,118, 40, 2, 2, 2,
+100,165,165,165,184,125,251, 54, 98, 98, 98, 80, 84, 84,132,226,226, 98,148,148,148,192,104, 52,162,176,176,208,131,227, 56, 67,
+141, 15,196, 35, 70, 32, 16, 64, 34,145, 64, 36, 18,229,135,132,132,128, 16, 34, 77, 74, 74,170, 73,151,155, 10, 64,161, 80, 40,
+ 20,219, 26, 43,137, 68,130,211,167, 79, 79,150, 74,165,159,195, 78,244,170, 50,104,133,129,154,213,189,126,210, 16, 66,150,136,
+ 68, 34,137, 90,173,182,222, 73,242, 60, 47,114,115,115,131,175,175,239, 50, 0, 61, 28,209,161,148, 54, 83,171,213,214,243,123,
+116,116, 52,146,147,147,127, 44, 40, 40,120, 35, 43, 43, 11, 12,195,108,100, 24,166, 79,185, 62,242,242,242, 80,171, 86,173,102,
+149,233,181,141, 9, 24, 5, 66,173, 17,172,134,245,212,247,213,180, 85,169, 84, 80,169, 84, 72, 76, 76, 68,113,113, 49,189,113,
+227, 6, 25, 61,122, 52, 49, 24, 12,223, 16, 66, 78, 82, 74,239,148,183,203,174, 23,121, 86,169,116, 12, 22,240, 79, 23,161, 61,
+ 67, 85,209,112, 57, 98,132, 12, 6,131, 91, 76, 76, 12,111,185,112, 91, 22, 0,164, 50,131,133,178, 72,129,211, 8,133, 66,229,
+232,209,163,139, 86,174, 92, 57,146, 16,178,154, 82,122,163, 38, 58, 0,176,243,251,205,126,159, 77,157, 56, 85, 29, 24, 86,247,
+163,143, 62, 21,188,244,210, 75,167, 54,108,216,192,169, 27,244,232,114,120,223,183,126, 95,124, 56, 97,207,238,221,187,129,178,
+ 1,207,142,114,236,215, 95,127,245,255,224,189, 49,152, 58,126,236, 94, 85,132,183,216,141,168, 21, 82,125,113,182, 27,104,169,
+164, 94,253,158, 63,236,220,153, 14,160,202, 74,243, 50,153, 44,228,198,141, 27, 17,182, 6,194,104, 52,194,195,195, 3, 27, 54,
+108,240, 81, 42,149, 62,110,110,110, 16, 8, 4,104,218,180,169, 67, 13,147, 72, 36, 33,215,175, 95,143, 80, 42,149, 40, 41, 41,
+129, 94,175,135,201,100, 2,207,243, 32,132, 64, 40, 20, 66, 44, 22, 67,161, 80, 56, 53, 83,207,214,100,237,217,179, 7,141, 26,
+ 53, 66, 94, 94, 30,174, 94,189,234,180,185, 2,254,137, 10,217,142,183, 18, 8, 4,216, 20, 30,142,183,210,210,172,198,101,137,
+187, 59,166,242, 78,103,208, 0, 0, 52,105,210,132, 30, 63,126, 28,123,247,238,197,203, 47,191, 76,126,254,249,103, 35,199,113,
+162,212,212, 84,135,163, 97, 60,207, 91,219,106, 57, 95,219, 26, 43,103, 13,150,217,108, 86,138,197, 98,232,116, 58,107, 23,190,
+237, 82,167, 78, 29,104, 52, 26, 65, 97, 97,161, 32, 45, 45, 77, 62,123,246,236,119,143, 28, 57, 18, 0, 96,144,211, 7,224, 17,
+178,114,229,202,144,183,222,122,235,158, 64, 32,160,221,187,119,127,253,238,221,187,189, 3, 2, 2, 14,253,246,219,111,255, 5,
+ 16, 89,173, 64, 5,124,124,124,254, 16, 8, 4,193,110,110,110,162,237,219,183,155,138,138,138, 68,190,190,190,153,192, 63, 9,
+148,129,178, 34,197, 5, 5, 5,213,206, 68,246,241,241,249,195,199,199, 71,244,229,151, 95,154,114,115,115, 69,254,254,254,153,
+ 22, 29,133, 66, 33,218,190,125,187,169,176,176, 80,228,225,225,241, 71,126,126,126,181,122, 57, 57, 57,175, 13, 30, 60,248,232,
+161, 67,135,188, 89,150,197,221,187,119,145,155,155, 11, 15, 15, 15,108,220,184, 17, 33, 33, 33,216,177, 99,135, 70,163,209,188,
+185,112,225,194, 41, 90,173,214,145,148, 13, 29,226,226,226, 66,242,243,243,225,225,225,129,226,226, 98,252,241,199, 31,104,216,
+176, 33,210,210,210,192, 48, 12, 60, 60, 60,176, 98,197,138, 18, 66,136,198,145,227,248,184, 97, 89,214, 26,101,178, 49, 69,186,
+214,173, 91,227,240,225,195, 31, 59, 99,138, 40,165, 6,161, 80,120,159,177,178, 60, 23,137, 68, 14, 27, 43, 11, 28,199,137,202,
+199,128, 18, 71, 94, 63, 5,116,148,201,100,162,138,111,150,148,148,136, 2, 2, 2,218,219,251, 3,123, 8, 4, 2, 47,153,172,
+ 44,192, 20, 18, 18,130,130,130, 2,206, 96, 48, 12,220,184,113,163, 9, 0, 98, 98, 98, 6,114, 28,167, 51,155,205,172, 88, 44,
+ 70,113,113, 49,124,125,125,189, 42, 21,100,240,241, 47, 91,102,251, 87, 28,131, 21, 16, 16,128,230,205,155, 67,175,215, 35, 61,
+ 61, 29, 9, 9, 9, 38,142,227,190, 91,185,114, 37,239,227,227, 51,236,149, 87, 94, 97,207,157, 59,247, 14,128,247, 45, 82,255,
+115, 99,176,202, 29,227, 17, 0,157, 44, 59,103,219, 69, 88, 85,228,170, 66, 4,171,202, 47, 33,203,178,249, 41, 41, 41, 10,133,
+ 66, 97,125,207,100, 50, 33, 48, 48,144,231,121,158, 84,252, 28, 75, 59,106,138, 80, 40, 84,126,242,201, 39,249, 43, 86,172,120,
+ 3, 14, 14, 20,223,254, 78,125,108,176,121,189,243,251,205,126, 95,125, 54,115,217,151, 11,102,171,111,237,249, 6,107,150, 46,
+226, 56, 14,231,154, 52,105,210, 94,171,213, 10,220, 21, 38,228,228, 99, 15,202,242, 96, 57,100, 6, 73, 89, 46,173,117,103,206,
+156, 57,215,163, 71,143,227,235,182,254,160, 78,187,125,251,164,164, 48, 39, 93, 85, 47, 66, 32, 10, 10,233, 83,164,211,137, 6,
+ 14, 28,232, 3,224,149,170,180, 24,134,193,237,219,183,145,148,148, 4, 55, 55, 55, 40,149, 74,184,185,185, 65,165, 82, 65,169,
+ 84, 66,169, 84, 58,125, 12, 25,134, 1,199,113,248,254,251,239, 33,151,203,161, 80, 40,238, 91, 44,230,234, 97,254, 55,221,187,
+119,135, 70,163,129,155,155,155,181, 91,211, 25, 44, 99,176, 12, 6, 3, 12, 6, 3,140, 70, 35, 7, 64, 40, 16, 8, 48, 60, 37,
+197, 26,213,113,198,184, 84,164,105,211,166,244,228,201,147, 56,126,252, 56,138,139,139,241,229,151, 95, 34, 32, 32,224, 57, 0,
+159, 58,170, 65, 8, 9,247,247,247,239,254,194, 11, 47, 4,154, 76, 38,104,181, 90,230,239,191,255,134, 84, 42, 5,203,178, 72,
+ 73, 73,193,230,205,155,145,152,152, 8, 0,240,244,244, 12, 38,132,132, 81, 74, 19, 43,211,228, 56, 78, 36, 16, 8,172,119,159,
+150,197, 54,138,197,178, 44,252,252,252,224,239,239,143,175,190,250, 74, 20, 22, 22,214,179,198, 7,226, 17,176, 96,193,130,122,
+ 75,150, 44, 89,187, 97,195,134, 61,175,189,246,218,182,139, 23, 47, 14,117,119,119,255,251,240,225,195,179, 37, 18, 73,141,220,
+175, 80, 40, 12, 78, 75, 75,243,181,125,139,231,121,185,217,108,182, 26,218,146,146, 18, 52,110,220,216, 97,189,203,151, 47,203,
+ 1, 96,246,236,217, 66, 0,114, 75,250, 15,139,102, 73, 73,137,176, 97,195,134,193,142,232, 81, 74,175, 19, 66,218,119,237,218,
+245,196,129, 3, 7, 60, 67, 66, 66,144,154,154,138,212,212, 84,212,171, 87, 15,115,231,206, 45, 46, 44, 44,108, 91,110,170,126,
+118,112,183, 3, 61, 61, 61,133,247,238,221,131,217,108, 70,179,102,205,176, 98,197, 10, 12, 28, 56, 16,141, 27, 55, 70, 97, 97,
+ 33, 46, 95,190,140,245,235,215,123,138, 68,162, 42,207, 29,255, 6,229, 93, 88,149, 46, 53,193,108, 54,171,164, 82,105,161, 68,
+ 34, 17, 91,198, 95, 37, 36, 36, 56, 29,189,178, 80,241,166,174,186,215, 79, 18,139, 89,173,136, 88, 44,134,191,191,191,195, 58,
+ 18,137,132, 88,206,141,102,179, 25, 5, 5, 5, 92, 64, 64,128,181, 27,255,252,249,243, 92,104,104, 40,199,178, 44, 43, 22,139,
+ 65, 8,129, 92, 46,175,244,132, 79, 57, 58,243,165,129,159, 90,103, 17, 50, 66,133,106,220, 39,101, 55,251,231,207,159,135,209,
+104, 68, 66, 66,130,105,225,194,133,105,249,249,249,227, 0, 8,246,237,219, 55,120,194,132, 9,172,175,175,175,117,156,172, 61,
+ 47,242, 44, 99,185,250, 28,161,148,146,242, 1,229,101, 78,137, 16, 80, 74, 31, 48, 85,149, 25,174,242, 8, 86,149, 87, 92, 75,
+215,210,222,189,123,173, 70,192, 50,139,144, 82,250,128,174,165, 29, 53,197,203,203,171, 56, 46, 46, 78,149,156,156,188,185, 38,
+127,111, 49, 87,243,103, 79, 87,231, 94, 57,137,148,180,116,104,178, 76,231,142,253,157,248, 35,128, 31, 1, 0,171, 26, 28,193,
+200, 43,203, 29,213,108,224, 35,143,110, 18,168,252,241,249, 30, 61,107, 13, 24,241, 62,243,246,219,111,183, 27, 60,120,112,193,
+107,175,189,246,158,155,155, 91,164,209,104,204,251, 97,215,174,164, 1, 3, 6,132,113, 28, 55,184,178,233,172, 22, 76, 38,211,
+221,190,125,251, 90,143,173,191,191,191,106,203,150, 45,126, 74,165, 18,175,191,254,122,118, 82, 82,146,181, 91,168,168,168,232,
+174, 35,109, 52, 26,141,119,163,163,163, 43,237, 22,180, 68, 32,157,209, 4,238,159, 45,152,155,155,139,107,215,174, 65, 32, 16,
+160, 85,171, 86, 56,118,236, 24,218,181,107,231,212, 12, 66,157, 78,135,144,144, 16,232,116, 58, 20, 23, 23,151, 0,144,108, 12,
+ 11, 3, 0,188,147,155,139, 63, 22, 46,196,169,121,243, 44,159,237,104, 51, 1, 0,209,209,209,244,244,233,211,248,251,239,191,
+161,215,235,241,230,155,111,162,188,123, 16, 0, 28, 74,125, 65, 8,105, 92,191,126,253,131,135, 15, 31,246, 81, 42,149,208,106,
+181,208,106,181, 24, 54,108, 24, 70,141, 26, 5,147,201,132,149, 43, 87,226,167,159,126,130, 74,165,130, 86,171, 69,113,113,177,
+103,124,124,252, 9, 66, 72,135,202,186,182, 41,165, 36, 49, 49, 17,243,231,207, 7,207,243,152, 48, 97, 2, 34, 34, 34,172,198,
+234,238,221,187,152, 61,123, 54, 56,142,195,180,105,211, 80,175, 94, 61,152, 76, 38, 41,113, 34,207,216,163,230,131, 15, 62,184,
+245,227,143, 63,238, 73, 78, 78,126,241,179,207, 62,235, 72, 8,225, 63,250,232,163,249, 42,149,202,161,100,173,149,145, 87, 80,
+132,107, 55,239, 90, 13, 80,197,197,199, 91,237,180,222,141,219,201,214,191,231, 56, 91, 61, 14, 94,106, 79,103,155, 88, 98, 50,
+153,138,251,244,233,227,241,253,247,223,147,122,245,234,225,206,157, 59,150,155,210, 18, 71,103, 13,218,144,170,209,104, 34, 88,
+150, 21,221,188,121, 19,161,161,161,136,139,139,195,156, 57,115,144,147,147, 3,179,217, 12, 95, 95, 95,222,100, 50,157, 55, 24,
+ 12,191, 59,219,216, 71,141,109,148,201,118,249,237,183,223, 62,150, 74,165, 20,192,105, 0, 78, 25,108, 74,169,161,118,237,218,
+247,105,215, 36,122,245,184,120,156, 51, 19, 3, 2, 2, 18,148, 74,101,207,188,188,188,251,162, 88,109,219,182, 53,250,249,249,
+ 29,117, 84,199,205,205, 45,143,101, 89, 47, 0, 72, 77, 77,133, 66,161, 16,221,190,125,123, 30, 33,100, 34, 0,132,133,133,205,
+211,104, 52,162,176,242,243,169,191,191, 63, 12, 6, 67,165,195, 85, 78,156,207,248, 6,192, 55,150,215, 94, 94, 94,233, 5, 5,
+ 5,178, 69,139, 22,105,231,205,155, 87,202,113,156, 30,192,225,252,252,124,107, 30,172,208,208,208, 2,161, 80,168,246,240,240,
+ 8,178,145,122,192,139, 60,203,216, 38, 26,125, 32,250, 98, 49, 61,142,152, 44, 71,162, 16,132, 16,148,150,150,222, 23, 13,177,
+204, 34,180,103,176,202, 47,228, 53,234, 34, 44, 55, 87,178, 45, 91,182,124,183,116,233,210,227,142,254,157,237, 24,172, 85,255,
+157,245,153,197, 92, 93, 56,118, 0, 63, 95, 45,200,153, 48,111,241,146,154,180, 7, 0, 26,250, 40,154,250,251,121, 31, 89, 56,
+111,150,234,214,158,111,176,109,213,231,244,194,217,179,177,103,207,158,125, 99,204,152, 49,181, 81,246,133,210, 0,248, 11,192,
+ 0, 71,102,221,100,103,103,223, 55,254, 41, 34, 34,226,186,135,135,135,159, 84, 42,197,237,219,183,181,151, 46, 93,114,186,235,
+165,162,230,163,160,162,185,186,116,233, 18, 58,119,238, 12, 0, 56,118,236, 24,218,182,109,235,148,201, 50,153, 76,249, 13, 26,
+ 52, 0, 80, 22,205, 42, 40, 40,224, 1, 96, 68,122, 58, 86, 7, 4, 64, 32, 16,224,212,188,121,152,108, 50, 97,142,208,185,161,
+ 57,205,154, 53,163,103,207,158, 69, 82, 82, 18,204,102, 51,122,245,234,101,107,174, 28,198,223,223,127,252,225,195,135,125, 86,
+175, 94,173,223,180,105,147,158,231,121,166, 89,179,102,202,230,205,155, 99,201,146,178,175,209,128, 1, 3, 48, 97,194, 4, 92,
+186,116, 9,114,185, 28,237,219,183,231,166, 79,159,238, 59,110,220,184,119, 80, 54, 13,255, 1, 40,165,180, 91,183,110, 56,122,
+244, 40, 88,150, 69,108,108, 44,114,115,173,147,123,224,231,231,103,111, 29,139,178,223,251, 19,185, 16, 9, 4, 2,154,144,144,
+240, 89,199,142, 29,145,156,156,252, 98, 76, 76,204,151, 67,135, 14, 77,125, 88, 93, 79,119, 37,162, 27,134, 67,175,215, 67,175,
+215, 35, 48, 48, 16, 69, 69, 69,184,117,235, 22,244,122, 61,252,124,157,153,119, 82,166,215,188,113, 61,171,158,175,175, 47,138,
+139,139,145,152,152, 8,131,193, 0,111,111,199, 13, 22, 33,164, 86,183,110,221,126,251,238,187,239,188,214,175, 95,111,232,212,
+169,147,248,203, 47,191, 36, 42,149, 10, 89, 89, 89,206,238,170,133,132, 99,199,142,133,116,237,218, 53,234,202,149, 43, 72, 72,
+ 72,128,193, 96, 64,243,230,205,113,227,198, 13,180,110,221, 26, 90,173,246,244,217,179,103,127,169, 94,234,241, 99,233,190,179,
+ 44, 71,143, 30,157,172, 82,169, 76, 0,236,206,244,115,148,123,247,238, 73,154, 54,109,170,151, 74,165,226,114,179, 86,163,232,
+213,227,224, 97,103, 38, 86,133,191,191,255, 56,111,111,239,174,117,234,212, 65,102,102,166, 72, 44, 22,163,109,219,182,198,150,
+ 45, 91, 26,253,253,253, 29,154,112, 3, 0, 18,137,228,138, 72, 36,234, 80,118, 19,193,225,222,189,123,160,148, 78,104,220,184,
+241,216,162,162, 34,228,230,230,138, 85, 42,149,245,102, 58, 42, 42, 10,122,189,254,138,163,250, 44,203,206, 12, 13, 13,157, 34,
+ 18,137,230,100,103,103, 63,144,222,129, 16, 34,142,142,142, 86,137, 68, 34, 24,141, 70,125,133,117, 79,213,184,183,135,193,118,
+ 12, 22,177,183, 99,142,116, 15, 58, 58, 6,139, 16, 2,131,193, 0,133, 66, 97,237,122,178,124, 23, 45, 99,123, 42, 26,172,154,
+ 80,171, 86, 45,196,197,197,201,182,109,219,182,105,209,162, 69, 39,106,162,177,227,187,111, 3,220,249,146, 90,105,167,119,227,
+218,133, 63,240,227,229,252,156, 9,243, 22,191,247,210, 43,131, 50,109,183,235,191,236, 42,182,143,172, 94, 47,210, 87,209, 56,
+200,207,235,200,231, 11,231,171,114,175,156, 68,122, 70, 6,118,159, 62,123,206, 64,233,101, 0, 19,106,210, 70,123,216,206, 70,
+123, 90,190,168,182,105, 26,114,114,114,112,249,242,101,139,185,106, 14, 0,237,218,181, 59,111, 49, 89,231,206,157, 67, 76, 76,
+204, 3,105, 26, 42,146,151,151,119, 95,105,153,242,116, 12,222, 22,163, 47, 16, 8,208,118,202, 20,167,205, 21, 33,132,114, 28,
+ 7,141,166,108,248, 74,219,182,109,107,100,174,202,181,218,150,148,148, 96,211,166, 77, 57, 55,111,222,172, 85,167, 78,157,113,
+223,124,243,205, 98,185, 92,126,223,118, 37, 37, 37,232,218,181, 43, 70,143, 30,141,169, 83,167,242, 67,135, 14,101, 25,134,169,
+180,130, 61,199,113,162,176,176,176, 67, 0,158,187,114,229, 10, 0,156,160,148,182,181,172,175,106,157, 3,240, 69, 69, 69, 66,
+165, 82,105, 55,197,131,168,108,154,166,179, 93,122, 86,205,227,199,143,207,255,239,127,255,251,227,135, 31,126,104,141,206,213,
+ 80, 19,192,131, 17,172,158, 61,123, 66,167, 55, 33, 37,179, 0, 28,103, 70,169,209, 57, 35, 83, 49,130,213,179,103, 79,148,234,
+ 12,184,151,174,129,217,204,161,168,212,177,107, 56, 33, 68,254,252,243,207,239,219,178,101,139,255,201,147, 39,193,113, 28,127,
+227,198,141,196, 62,125,250,168, 62,250,232, 35, 47,155, 49,166,206,178,116,208,160, 65,253,142, 31, 63,174,137,138,138, 82,159,
+ 62,125, 26, 89, 89, 89, 48,155,205,120,238,185,231, 32, 22,139,239,205,155, 55, 79, 4, 96,105, 77,196, 31, 53,150, 8,211, 31,
+127,252,241, 72,140,149, 45, 98,177,184,198,221,140,207, 42,167, 79,159, 78, 29, 51,102, 76, 67,149, 74,181,164,125,251,246,157,
+189,188,188, 24, 79, 79,207,132,160,160,160,177, 77,155, 54,189,235,168,142, 80, 40, 28,170, 80, 40,110,153,205,102,182, 60,114,
+ 14, 0, 48,155,205, 98,134, 97, 16, 22, 22,102, 13,154,196,198,198,194,223,223,159,187,122,245,234, 80, 71,245,179,178,178,238,
+155, 85,104,135,145,109,219,182, 21,232,245,122, 36, 37, 37, 29,179, 93, 81,153, 23,121, 22,169,116,128, 10,195, 48,160,148, 66,
+218,162, 5,210, 15, 28,192,247,223,127, 95,165,208,170, 85,171,128, 10, 33, 61, 66, 72, 87,219, 92, 25,150,217,130,111,189,245,
+150,117,155,115,231,206, 89, 7,187,247,234,213,235, 62,205, 51,103,206, 60, 96,178, 42,106,218, 35, 43, 43,235,202,246,237,219,
+207, 46, 88,176,224,116,149,141,182,163,105, 25,131,213,239,213,215,211,151,205,159,122,113,253, 47,135, 26,167,151,210,244, 9,
+243, 22,127, 88,209, 92, 57,170,217,192,223,173, 65,176,175, 87,194,127, 23,206,119,183, 68,195,182,156,207, 40,128,153, 58, 96,
+205,236,107, 86,134,109, 36,145, 16, 82,237, 69,203, 17, 77,103,169,168,105,155,166, 33, 61, 61,221,106,174,232, 63,137, 70,155,
+183,107,215,238,124,185,185,178,172, 51, 87,165, 89, 25, 2,129, 0, 31,106,181, 16, 8, 4,232, 52, 99, 6,158,155, 53,203,225,
+118, 90,224, 56, 14, 2,129, 0, 17, 17, 17, 78,155, 43, 91, 77, 74,233,241,139, 23, 47,134, 14, 25, 50, 68, 25, 17, 17,113,155,
+ 16, 34, 28, 54,108, 24, 31, 16, 16,192,156, 58,117, 10,148, 82,180,107,215, 14,153,153,153,224,121, 30, 27, 55,110,196,144, 33,
+ 67,200, 95,127,253, 69,121,158, 63,104, 79,211, 66, 82, 82,210,200, 46, 93,186,172,210,233,116,130,220,220,220,145,142,174,171,
+110,223,183,111,223,126, 51, 34, 34,162, 35, 42, 79,197,192, 3, 56,249, 48,154,229,209,187,168,135,209,180, 80, 49,130,181,117,
+235, 86,240, 60,143, 90,254, 30,208,235,245,168,104,102,171,211,172, 24,193,218,182,109, 27,120,158, 71,237, 0, 53, 12, 6, 3,
+ 44, 3,131,171,211,244,242,242,250,124,195,134, 13,193, 87,175, 94, 69, 74, 74, 10, 22, 47, 94,124, 55, 63, 63,191, 71,126,126,
+190,100,250,244,233, 71, 94,125,245, 85, 63,158,231,171,236, 30,178,215, 78, 74,169,158, 16, 50,180, 77,155, 54, 27,103,207,158,
+125,167,126,253,250,181,219,182,109,235,145,155,155,155,253,231,159,127, 38,174, 90,181,202,205,108, 54, 15,173,172,235,233,223,
+248,189,219,146,154,154, 58, 3,101,215, 25,167,140,149, 35,237, 60,115,230,204, 39,229,218,103, 28,209,254,183,246,253, 97,103,
+ 38, 86,215,206,229,203,151,167,160, 66,126, 51,103,219,121,230,204,153,164,174, 93,187,206,242,243,243,155, 46,149, 74,145,157,
+ 93, 86,156,192, 18,105, 44,255, 27,180,104,209, 2,221,186,117,195,245,235,215,103, 77,153, 50, 37,169, 42, 77, 7,218, 32, 0,
+ 16, 14,224,141, 46, 93,186,124,212,175, 95, 63, 44, 95,190, 28,148,210,181,206,236,203,179,132, 37, 77, 3,177,125, 4, 0,147,
+201,148,124,235,214,173,128,122,121,121,108, 32, 33,136,141,141,181,142,191,177, 29,151, 99, 25, 40,247,251,239,191,155,121,158,
+175, 50,231, 20,199,113,201,199,143, 31,247, 59,112,224,128,208,242,143, 44, 31,172,201,167,165,165, 49, 71,142, 28,177, 70,195,
+ 4, 2, 1, 18, 18, 18,204, 70,163,241,158,179, 59,117,253,250,245, 71,114,247,246,251,165,164,177,251,118,255,228,221, 42,174,
+125,190, 74,173,182,251, 3,182,100,124,175, 10, 34, 96,230, 44,152, 55,203,195, 98,174,182,158,207,200,215,233,185,206, 87,178,
+ 75, 46, 60,138,118,218, 82, 84, 84,148,100,153, 45,168,213,106,157, 62,118,143, 11,203, 12,194,128,128,128,243,168, 48, 91,208,
+178, 46, 38, 38,230,129,117,206,192,243, 60,220,221,221, 1,192,118,134,170,195, 16, 66,168,165,203,186,188, 93, 15, 53, 6, 32,
+ 35, 35, 99,209,148, 41, 83, 94,152, 59,119,174,207,158, 61,123, 84,229,154,232,219,183,111,214,197,139, 23,219, 3,144, 20, 23,
+ 23, 31,156, 59,119,174,143, 77, 61, 66, 65,124,124,124,102,102,102,102,149, 21, 1,202,167, 53,119,113,118, 93,117,244,235,215,
+239, 54,236, 36,252,124, 24, 30,135,166, 5, 77,126, 33,110, 39,165,150,215,162,228,193,221,205,180,142,155, 50,153,204,208, 20,
+230, 86, 47, 98, 67, 94, 65, 17,110, 37,166,150,151, 6,227,192,113,105,229,122,101, 3,221,105, 94, 73,181, 26, 66,161,176,221,
+146, 37, 75,122, 48, 12,195,156, 58,117, 74,191, 96,193,130,228,236,236,236, 94,148,210,123, 0, 64, 8,233,180,126,253,250, 77,
+ 14,164,100,176, 11,165,244, 50, 33,164,245,199, 31,127,252, 30,128,118, 0,106, 3,184, 7,224, 24,128,165,206,142,235,121,204,
+ 44,174,126,147,167, 82,187,198, 60, 43, 51, 19, 15, 30, 60, 56,163,119,239,222,130,144,144,144, 73, 33, 33, 33, 76, 94, 94, 30,
+180, 90, 45, 24,134,129,191,191, 63, 26, 53,106, 4,127,127,127,254,202,149, 43,115, 63,254,248,227,106,115,234, 53,108,216, 48,
+220,100, 50,213,101, 24, 38, 28, 64, 56,165, 52,156, 16, 18, 14, 64, 13, 0,177,177,177,170,208,208, 80, 65,171, 86,173, 16, 23,
+ 23,135, 35, 71,142, 96,199,142, 29,223, 80, 74,247, 89, 52,236,121,145,103,153, 74, 35, 88,121,121,121,221,122,244,232,113,128,
+101,217, 48,224,193, 11,150,109,215, 30, 0,240, 60,159,148,153,153,105, 55, 9,153,173,230,216,177, 99, 15,176, 44, 27,102,137,
+ 76,153,205,102,189, 70,163,121,187, 83,167, 78, 43,132, 66,161,196, 86,151,231,249,187,153,153,153,255,106, 45,189,138,121,176,
+186,245,232,157,243,176,154,110, 34,166,238,181, 95, 87, 35, 51, 43, 7, 91,207,103,228, 21, 25,184, 78,215,179,139, 47, 62,172,
+174, 61,146,146,146,186, 63, 14,221, 71, 65,185,145,178,219,245, 87,213, 58, 7,201,118, 32,145,104,149, 53,228, 44,161,233, 71,
+245,227,166,148, 94, 36,132,180, 25, 51,102,204,167,114,185, 60, 22, 0, 74, 74, 74, 78,165,165,165,205,178,204, 18,172,110,189,
+139,202, 49,153, 76, 41,141, 26,148, 5,194, 44,233, 20, 44,193, 1,219,231,102,179, 57,197, 25, 61,123, 58,182,175, 57,142,171,
+ 82,143,101,217, 15,227,226,226,216, 15, 63,252, 48,115,207,158, 61,150, 2,183, 86,103, 86, 62,176,189,210,100,162,142, 80,110,
+162, 22,148, 47, 46,158, 50,170,155,137, 88,211,155,200, 71,205, 79, 63,253,244,233,192,129, 3,215,171,213,234,111,195,195,195,
+163,252,252,252, 84, 50,153, 12,122,189,190,200, 96, 48, 92,187,126,253,250,107, 83,166, 76,185,227,136,214,250,245,235, 89, 0,
+ 34,158,231,165, 12,195, 40, 0,168, 8, 33,158, 40, 55, 88,132, 16, 24,141, 70, 36, 37, 37, 97,242,228,201,220,161, 67,135, 22,
+ 2,152,230, 68,115, 91, 2,240,193, 63,231,113, 31, 0, 6,148, 37,158,205, 6,112,214, 9,173,127,133, 74, 13, 22, 45,203, 86,
+237,112,214, 98, 71,168, 70, 51,228, 81,126,214,195, 48, 88,191, 96, 51, 86, 45,184,175, 14, 33,128,202, 95, 87,211,209, 87, 80,
+106, 30,179,116,223,165, 69,122, 51,229,141,102,126,216,245,172,226,203,143,169,233, 79, 61, 85, 25,168,135,153,225, 70, 29,168,
+223,231,160,206, 35,189,115,162,101,197,135, 7,215,116,189,139,202,201,206,206,174, 54, 23,213,147,208, 51, 24, 12, 99,219,180,
+105,243, 5,199,113,255, 53,153, 76,199,170,255, 11, 23, 46,158, 28, 91,183,110,189,131,242,235,114,255,254,253, 89, 0,216,190,
+125,187,211,179,123,135, 12, 25,194,209,178, 2,227, 58, 0,197, 0, 10, 81,150, 40,155, 0, 64,113,113,113, 94, 90, 90,218, 21,
+142,227,174, 0,216, 84,131, 25,180, 62,132,144, 95, 41,165, 61, 1,192,242,220,246,189,167,141,154, 39, 9,250, 31,101,251,165,
+127, 46,176, 21,141, 83,117,175, 43,227, 90,134, 54, 1, 15,121,199,234,194,133,139,103,131,242,174,192, 94,213,110,232,194,197,
+ 83, 70, 77,140,149,133,203,151, 47, 63,182,161, 0,207, 42, 53,155,166,231,194,133, 11, 23, 46, 92,184,112,225,162, 82, 8, 0,
+187,211,193,157,156, 29, 80,233,148,242,202,168, 78,223,165,233,210,116,105,186, 52, 93,154, 46, 77,151,230,255,158,102, 13,137,
+175,166,139,112,215, 99,248,204,135,195,118, 16,231,163, 94, 0,116,117,105,186, 52, 93,154, 46, 77,151,166, 75,211,165,233,210,
+124,200,165,243,196,137, 19, 63, 65, 89,125, 98, 58,113,226,196, 79, 40,165,241,101, 54,134,198,255,203,109,113,104,113,141,193,
+114,225,194,133, 11, 23, 46, 92, 60,237,156,152, 55,111, 94,201,188,121,243, 44, 3,218,179, 1, 16, 90, 22,189,170,114,134,248,
+147,226,137, 25, 44, 66, 72, 32, 35, 16,189, 46, 20, 73, 58,131,242,141, 0, 0, 12,123,137, 51,232,126, 51,155,141,223, 82, 74,
+211, 28,208,176, 59,227, 43, 10,104, 16,225, 33,251, 89,207,113,162,123, 69,134,254,215,202, 18,209, 61, 0, 45,183,225,149,209,
+159,144,182, 82,177,120,191,216,195,195,110,118, 65, 67,126,126,169,206, 96,120, 97, 59,165, 14,151,226,113,225,194,133, 11, 23,
+ 46,158, 36,132, 16,133,167,167,231, 33,134, 97, 66,108,222,131,189,231, 0,192,113, 92,186, 70,163,121,129, 82, 90,105,218,162,
+199,161, 89, 1, 3, 42,185,150, 63,173, 8,128,251, 74,170, 84, 91,193,186,126,128, 91,251,168,240,144,239,210, 50, 50,207, 23,
+234, 12,195,175,165, 22,105,156,254, 80,145,244, 45, 15,111,255, 57,255, 25, 58,214, 43, 34, 50,138,212,170, 21, 4, 80,224, 94,
+114,138,223,173,155, 55,186,108,219,176,244, 3,145, 84, 58,217,168,211,125,237,172,118, 4,160, 8,117,147, 28,253,122,226,171,
+ 30, 2,152, 49,104,246,119,123,120,173,177,246,141,178,105,163, 14,211,159,144,182,158,106,245,190, 5, 7, 14,200,148,205,154,
+221,183,142, 82, 10,158,231,161, 61,127, 94, 54,177,123,247,125,253, 9,233,230, 50, 89,255,123, 16, 66,252, 85, 42,213, 56,161,
+ 80,216,201,104, 52,134,136,197,226,100,142,227, 18,242,242,242,150, 80, 74, 31,186,142,158, 11, 23,255,235,144, 42, 10,140, 87,
+181,238,223, 64,169, 84,254,193, 48, 76,112,121, 91, 0,192, 90, 57,164, 98,158, 71,155,124,143,119,114,115,115,219, 84,166, 73,
+ 8, 9, 87,171,213, 43, 0,180,172, 46,209,113,249,253,253, 89,141, 70,243, 54, 45, 75,215, 98, 79, 79,233,233,233, 57,131, 16,
+210,159, 97,152,106, 11,254,242, 60,207, 81, 74,183,231,229,229, 77,163,148, 22, 85,182,157,167,167,231,193,171, 87,175,182,244,
+245,245,173, 54, 45,141,217,108,198,189,123,247,124, 98, 99, 99,127, 7, 80,105,102,237, 71,161,233,140, 23,121, 22,176, 87,139,
+176,202,131,195,243,120,125,221,156,183,131,210,239,222, 12, 26, 57,119,115,100,125,111,121,167,171, 57, 37, 25,142,126,160, 88,
+166,252,165,221,115, 61, 59,143,126,239, 67,197,159, 23,175, 97,255,145,147, 40, 44,214,131,101, 24,120, 40,229,136,140,172, 75,
+ 22,175,254,222,251,155,175, 22,255, 87,230,230, 17, 95,170,205,127,217,153, 29,114,151, 11, 38, 77,232, 19,171,240, 82,115, 0,
+207, 97,124,143,104,197,164, 95,207, 79, 66,137,121,146,163, 26, 86,115,117,240,160, 60, 43, 51, 19, 11,189,188, 32, 48,153, 32,
+ 37, 4, 50, 66, 32, 5,224, 38,145,160,253,119,223, 97,206,174, 93,242,201,241,241, 46,147,245, 63,134, 82,169, 28, 26, 25, 25,
+185, 96,205,154, 53, 94,117,234,212,129, 66,161,128, 70,163,241,190,126,253,122,179,247,223,127,127,176,187,187,251,148,130,130,
+130, 85, 79,186,157, 46, 92, 60,173,148,103, 43,183, 91,188,189,170,117,255, 22, 12,195, 4,167,166,166,250,202,229,114,112, 28,
+ 87,158,189,159,183,222, 64,219,118,112, 80, 74,193,113, 28,234,215,175,111,172, 74, 83,169, 84, 46,207,202,202,234,106, 91,178,
+172,170,142,146,212,212,212,174, 13, 27, 54, 92, 14,192,110, 66,109, 79, 79,207, 25,239,189,247,222,184,198,141, 27, 3,128,181,
+157,150,199,156,156, 28,140, 25, 51,198,250, 25, 60,207,227,192,129, 3,239, 13, 29, 58, 20, 0,222,175, 98,223, 67,124,125,125,
+201,200,145, 85,231, 26,154, 62,125, 58,166, 79,159,142,165, 75,151, 18,161, 80, 88,101,229,244, 71,165,233,168, 23,121, 22,112,
+186,139,144,161,252,238,217, 75,214, 12,159, 57,164, 29, 89,247,126,215,136, 81, 75, 15,158,108, 24, 40,235,112, 57,173, 52,185,
+218, 15, 19, 73,135,181,234,240, 98,167, 49,227, 38, 40, 54,255,116, 24,215,175, 92,192,213, 99, 91,238,219,166,197, 11, 67,145,
+145, 83,132,161,163,199,187, 17, 86,208, 73, 36,149, 15, 51,234, 74,214, 57,210,182, 40,192, 47, 68, 34,126,183,117, 92, 35, 33,
+106,167, 0, 20,104, 23, 83, 79, 88,107,223,223,239, 22,193,188,244, 26, 80,109, 45,193,138,230,106,243, 43,175,160,123,105, 41,
+252, 80,150,211,194,178,148, 0,184,214,187, 55,234,255,248, 35,102,252,252,179,124, 90,175, 94, 78,155, 44,185, 92,254, 77,105,
+105,233,103,212,249,132,107, 79, 12, 66, 72,164, 82,169,156, 92, 88, 88,248,250,147,110,139, 5, 66, 72, 0,128,236,138,119,195,
+132, 16, 17, 0, 15, 74,169, 83, 21,127,165, 82,233, 91,131, 6, 13, 90,188,108,217, 50,121,102,102, 38,210,210,210,192,113, 28,
+164, 82, 41, 34, 34, 34,200,193,131, 7,189, 38, 76,152,176, 72,165, 82, 73, 10, 11, 11,191,112,162,157,140, 80, 40, 28,162, 86,
+171,123,251,249,249,249,102,103,103,103,231,229,229,237,212,235,245,235,106,122, 39, 95,174,249, 90,104,104,104,239,192,192, 64,
+191,212,212,212,156,148,148,148, 95,244,122,253, 55,148,210, 26, 21, 80, 46,215, 13, 0,208, 20,128, 87,249, 91,233,161,161,161,
+151, 18, 19, 19,157,171,158, 92,181,102, 90,104,104,232,101,103, 53, 9, 33, 10, 0,219, 0, 4, 86,179,105, 26,128, 1,180, 44,
+193,177,139,127, 17,139,129,162,148,130, 16,114,159,145,170,106,221,191,141, 76, 38,195,150, 45, 91, 32, 20, 10, 33, 20, 10,145,
+151,151,135,224,224, 96,235,107,145, 72,100,125, 94,187,118,237,106,245, 56,142,139,101, 89, 22, 90,173, 22, 28,199, 89,151,252,
+252,124, 80, 74, 33,145, 72,192,113,101,101,151,108,214,199, 86,166, 71, 8,233, 31, 24, 24,136,205,155, 55,195, 96, 48, 60,176,
+ 94,165, 82,225,226,197,127,138,130,176, 44,139,184,184, 56,134, 16,210, 31, 85, 24, 44, 75,164,104,196,136, 17, 96, 89,214, 90,
+250,206,242,220,178,112, 28,135,233,211,167,163,252,127, 85,229,190, 63, 14,205,103, 29, 82,190,147,148,218, 41, 19, 82,223,223,
+237,237,110,157, 91, 45,148, 73, 68, 50,222,108, 2,103, 54,130, 51, 25, 32, 32, 28, 94,104, 26,128,214,117,228,200,214, 20, 98,
+228,170, 51,133,169,169,250,184,139,185, 69,149, 26, 5, 66, 72,160,210,195,247,175,175, 54,254,228,189,255,228, 85, 92,186,112,
+ 30,231,247,172,176,187,109,215, 65, 19,209,176,105, 75, 52,169,231,143,143, 70,245,203,201,205, 74,139,182, 55, 38,171,226, 24,
+172, 54, 74,209,198,101,175,117, 30,212,180,153, 7,131,142,229,215,171,131,102,156, 59,153,193,141,253,229,207,205, 39,139,140,
+247,101,204,182, 55, 6,107,176, 68, 82,242,229,201,147,178,172,172, 44,108,126,229, 21,196,148,150, 34, 71, 40, 68, 3,147,201,
+106,178,242, 1,228, 10, 4,240, 55,155,161, 83,169,224,255,253,247,224, 24, 6, 19,187,119, 47,221,104, 48, 60, 88, 93,182, 18,
+220,220,220,178, 89,150,229, 10, 11, 11, 59, 61, 11, 38,171,220, 92, 29, 33,132,136, 10, 10, 10,212, 79, 65,123, 24, 0, 51,135,
+ 15, 31, 62,236,232,209,163,183,110,221,186,213,149,150,101, 18, 6, 33, 68, 80,183,110,221,195,237,219,183, 15, 95,187,118,237,
+215, 0,102, 58, 98, 56, 8, 33, 65,117,234,212,249,243,210,165, 75,222, 55,110,220,128, 86,171,133, 80, 40,196,107,175,189,134,
+239,191,255, 30, 34,145, 8, 18,137, 4, 34,145, 8, 29, 58,116,200, 73, 76, 76,108, 73, 41,189,235,128, 46,235,238,238,254,205,
+138, 21, 43,234,245,234,213, 75,160,215,235,193,113, 28,182,111,223,110,154, 54,109, 90, 82,110,110,238, 27,206,154, 44, 66, 8,
+ 19, 16, 16,176,238,235,175,191,142,124,238,185,231, 4,165,165,165,224,121, 30,187,118,237, 50, 77,154, 52,233, 78,122,122,250,
+ 96, 74,169,211,137, 3, 9, 33,205,228,114,121,195,183,223,126, 59,187, 87,175, 94, 70, 0, 56,123,246, 44,115,225,194, 5, 85,
+157, 58,117,238,126,250,233,167,231,107,160, 25,163, 84, 42,163, 70,142, 28,153,211,179,103, 79,147, 72, 36,226,143, 31, 63, 46,
+184,126,253,186, 42, 52, 52,244,246,164, 73,147, 28,174,203, 73, 8,217,125,226,196,137,142,193,193,193,124,249, 73,157,150,191,
+ 79, 25,134,161,229,143,184,118,237,154,160, 99,199,142, 71, 40,165, 78, 69,193, 93, 60, 28,164,172,168,175,137, 82, 10,141, 70,
+131,211,167, 79, 35, 62, 62, 30, 0,154,151,111,114,158, 82,138,194,194, 66,148,150,150, 34, 32, 32, 0, 0, 30,166, 76, 86,141,
+240,240,240,200,204,206,206,246,253,249,231,159, 33, 20, 10,113,224,192, 1,172, 92,185, 18, 91,182,108,177,107,178, 2, 2, 2,
+ 16, 17, 17,145,146,150,150, 86,171, 50, 77, 55, 55,183, 2,173, 86,171, 42, 40, 40, 0,199,113, 56,125,250, 52,214,172, 89, 3,
+ 95, 95, 95,120,123,123,195,199,199, 7,177,177,177, 80, 40, 20, 86,147,213,190,125,251, 66,173, 86,235,110, 79,207,203,203, 43,
+237,195, 15, 63, 12, 56,119,238, 28, 76, 38,211, 3, 8, 4,196,136, 0, 0, 25,215, 73, 68, 65, 84,235, 85, 42, 21,198,141, 27,
+103,125,205, 48, 12,228,114, 57, 90,183,110,157,158,155,155, 91,233, 13,136,143,143, 79,122,118,118,182,255,133, 11, 23,238, 51,
+ 63,246, 12, 17,203,178, 80, 42,149, 8, 11, 11,203, 76, 79, 79,247,127,156,154,149,121,145,103, 21,107, 4,171,252, 68,213,201,
+118,101, 84,168,255,228, 5,227,250,203,192, 25, 65, 77,165,128,177, 4, 48,106,193, 27, 74, 64, 68, 50,192, 84, 10, 31,137, 6,
+219, 70, 71,169, 62,222,124,251, 74, 3, 31, 85,252,149,236,194,189,246, 62,136, 17,136, 94,235, 63,228, 61,175,148,172, 66,164,
+102, 22,128,101,254,201,113,218,188,235, 16, 8, 88, 6,103,246,149, 5,170, 24,150, 69, 65,177, 30,249, 90, 35,250, 13, 25,167,
+254,122,241,212,215, 0,124, 86,213,142, 52, 2, 34, 26,185,185,245,105,220, 40,132, 65,189,116,144,240,157, 0, 0,122,244, 37,
+ 52,203,243,101,235,239, 23,247,209, 22, 25,231, 94, 2,110, 84,165, 35,246,240,144, 41,155, 53,195, 2, 47, 47,244, 40, 45,197,
+ 45,129, 0,131, 52, 26,252, 62,110, 28, 4,235,214, 65, 0, 64, 63,108, 24,218, 46, 89,130,139,106, 53, 2, 11, 11, 97, 28, 54,
+ 12,226,115,231, 32,114,119,183, 59, 24,190, 50, 68, 34,145,113,205,154, 53,129,111,190,249,230, 17, 66,200, 83,109,178, 8, 33,
+145,106,181,250,200,252,249,243,253, 62,253,244,211,244, 71,164,233,167, 80, 40,182, 23, 23, 23,143,115,246, 14,182,220, 92,205,
+ 94,181,106,213,168, 17, 35, 70,120,188,249,230,155,244,214,173, 91, 30, 0, 44,209, 16,159,246,237,219,215, 93,179,102,141,127,
+203,150, 45,223, 27, 57,114,164,136, 16, 50,165, 58,147,229,230,230, 54,122,205,154, 53,222, 57, 57, 57, 86,115, 37, 20, 10,145,
+146,146, 2,153, 76,102, 45,118, 46, 20, 10, 49,127,254,124,175,209,163, 71,143, 3, 48,174, 42, 77, 0,144, 72, 36, 67, 86,172,
+ 88, 81,175, 91,183,110,130,164,164, 36, 48, 12, 3,137, 68,130, 87, 95,125, 85, 88, 82, 82, 18, 50,115,230,204, 17, 0,236,223,
+113, 84,130, 80, 40,124,109,245,234,213,145,109,219,182, 21, 92,189,122, 21,173, 91,183,198,153, 51,103,240,202, 43,175, 8,139,
+138,138,194, 38, 76,152, 48, 28,192,106,103, 52, 9, 33, 1,114,185,188,241,111,191,253,150, 92,171, 86, 45,235, 13, 72, 88, 88,
+ 24, 23, 31, 31,175,185,122,245,106,212,201,147, 39,115, 91,183,110,237,112, 33,113, 66, 72,144, 92, 46,175,191,123,247,238,244,
+153, 51,103,118, 89,181,106, 85, 47, 0,136,141,141,253,101,214,172, 89,135, 53, 26, 77,163,163, 71,143,106,218,183,111,239, 80,
+205, 64, 0,129, 1, 1, 1,220,152, 49, 99,220,170,218,104,237,218,181,249, 0,106, 19, 66,234,208,178, 2,216, 46,254, 5, 40,
+165,102, 66, 72,115, 66,200,249, 93,187,118, 33, 46, 46, 14,187,118,237, 66,124,124,252,249,242,245, 40, 40, 40,192,197,139, 23,
+209,161, 67, 7,160,172,192,251, 19, 25,139,197,113, 28, 4, 2, 1, 82, 82, 82,176,118,237, 90,204,157, 59, 23, 17, 17, 17, 48,
+153, 76,214,223,190, 64, 32,128, 80, 40,180, 68, 91, 28,186,232,155,205,102,156, 61,123, 22,223,110,220,136, 41,147, 39, 67,169,
+ 84, 2, 0,140, 70, 35, 52,121,121,144, 74,165,214, 8, 86, 85, 80, 74,183,223,188,121,115, 92,112,112,240,125, 93,131,150, 71,
+ 0,112,115,115, 3,207,243, 48,155,205,208,233,116, 88,188,120,177,153, 82,186,189, 42, 93, 75,108,130,101, 89,140, 27, 55, 14,
+122,253, 63,245,193,155, 54,109, 10, 0, 8, 13, 13, 69,116,116,180,245, 53,195, 48, 85, 78, 10,179,213,252,186, 77, 99,148,218,
+108, 29, 53,125, 17, 0, 32, 56, 56, 24, 81, 81, 81, 22, 83,109, 87,211,158, 23,121, 86, 17, 0,149,215, 95,187,146,152,241,217,
+155, 19, 22, 45, 82, 72, 89,225,216,222, 77, 80,219, 67, 4,200,212, 16,117,248, 24,196, 35, 4, 0, 64, 53,119,128,253, 31,227,
+191,125, 52,204,136, 77,186,159,234,170,213, 62,183, 52,154, 7, 6,215, 9, 69,210,206,225,245, 34,201,189,116, 13, 4, 2, 1,
+ 20,238,222,104,211,251,125,176, 44, 3, 55, 15,111, 16,174,212,186, 45,203,176, 16,176, 2,104,138, 74, 17, 90,167, 30, 35,145,
+202, 58,163, 26,131,229,238, 46, 92,254,209,192, 54, 82, 70,154, 3, 4,138,255, 89, 17, 40, 6,227, 85,132, 15,187, 71,200, 70,
+252,242,247,114, 20,152,186, 56,116, 96, 44, 17, 43,179, 25,191,143, 27,135, 46,171, 87,227, 20, 0, 33,128,152,213,171,113,109,
+196, 8,248,154, 76,144, 0, 96,245,122,152, 43,244,217, 59, 2, 33, 4,189,123,247, 70, 78, 78,142,223,228,201,147,107,108,178,
+100, 50,217,183,132,144, 30, 66,161,208, 72, 8, 1,195, 48,214,226,220,150,231, 70,163, 81,196,178,236,238,156,156, 28,167,187,
+246, 8, 33,145,158,158,158, 71, 78,156, 56,225,167, 80, 40, 48,125,250,116,103, 37,236,105,250, 41,149,202, 83,195,135, 15,175,
+253,237,183,223,238, 37,132,116,119,212,100, 85, 52, 87,171, 87,175,206, 95,187,118,237,215,182, 93,129,148,210,116, 66,200,186,
+150, 45, 91,190, 61, 98,196, 8, 15, 0,163, 70,142, 28,137,234, 76,150, 68, 34,233, 20, 30, 30, 14,141, 70, 99, 61,193, 74, 36,
+ 18, 0,128, 66,161,128,187,187, 59, 68, 34, 17,244,122, 61,154, 55,111, 78,196, 98,113, 59, 71,218,172, 84, 42,123,244,233,211,
+ 71,112,252,248,113,100,100,100,192,221,221, 29, 10,133, 2, 28,199,225,173,183,222, 18, 45, 89,178,228, 69, 56,105,176,106,213,
+170,213,171, 75,151, 46,130, 75,151, 46, 33, 49, 49, 17,122,189, 30,215,175, 95,135, 74,165,194, 27,111,188, 33, 90,176, 96,193,
+ 75,112,210, 96, 1,104, 60, 98,196,136, 76, 91,115,101, 65,161, 80,144,200,200, 72,141,151,151, 87, 12, 0,135, 13, 22,128,198,
+239,188,243, 78,214,188,121,243, 58, 28, 60,120,240, 99,203,155, 7, 15, 30,156, 0, 0, 95,124,241,197, 81, 31, 31,159, 24, 0,
+142, 26, 44, 80, 74,249,255,252,231, 63,119,197, 98, 49,132, 66, 33,196, 98,241,125,139, 72, 36, 2,195, 48,202,242,205,171, 29,
+ 28,252,172, 66, 8,105, 9,224,115,148,205,176,154, 76, 41, 61,253,132,155, 4,192, 90,188,189,121,124,124,188,213,100,237,217,
+179, 7,221,187,119, 71,126,126, 62, 46, 93,186,100,107,174,158,212, 24, 44,240, 60, 15,161, 80,136, 69,139, 22,193,104, 52, 98,
+211,166, 77,216,177, 99,199,125,231, 80,149, 74,133,165, 75,151, 58,213,157,197,113, 28,214,175, 95,143,143, 39, 76,176,154, 43,
+ 0, 16,137, 68,240,247,243,131,151,183, 55,110,223,190, 93,173,193,202,203,203,155,182,115,231, 78, 84, 53,200,125,231,206,157,
+214,231,182,131,220, 29,105, 39,203,178,208,235,245,120,254,249,127, 74,185,190,243,206, 59,214,231, 26,141, 6, 44,203, 90,142,
+133, 67, 7,128,101, 89,148, 82,160,183,244,159,247,122,124,248,161,245,121, 78, 78, 78,165,154,255, 11, 81, 43, 91,170, 28,131,
+117, 35,171,120,153,128,164, 71,207, 27,243,194,144,218,190,238,160,218, 76,136,158,155,134,191,178,101, 88,180,120, 55, 0, 96,
+252,171, 45,208,180,235,108, 24,190,121, 1,227, 90,179,226,215, 83,244, 31, 1,248,180,162, 22,165,124,253,224,160, 64,252,117,
+235, 34, 4, 44, 11,177,187, 55,220,213,126,224,205, 6, 20,100, 37,226,200, 15,203, 1, 0,171,214,111, 7,195, 48, 16, 8, 88,
+232, 13, 28, 34,106, 7,130,231,249, 74,103, 46, 0, 64, 3,160, 77, 39, 63,239,184,208, 80, 53, 65,195,124, 60, 80, 1,168,153,
+ 4, 17,105,110,164,181,155, 44, 54,175,160,176,205, 21,224, 68,117, 7, 70, 90,174, 18, 0, 64,180,110, 29, 78, 1,104,181,186,
+236, 90,117,125,196, 8,184,173, 91, 7, 69,249, 54, 18, 66, 80, 88,205, 15,197, 30,150, 25, 43, 81, 81, 81, 88,181,106,149,223,
+232,209,163,107,100,178,116, 58,221, 28,149, 74,213,101,221,186,117,126,125,250,244,121, 96,253,173, 91,183,208,161, 67,135,204,
+140,140,140, 57,206,182,209,214, 92,121,120,120, 32, 57, 57,249,161,251,205, 45,230,234,192,129, 3, 33,193,193,193,104,222,188,
+185,207,248,241,227,157, 49, 89,159,218,154,171,145, 35, 71,254, 13,192,151, 16, 82,209,160,144,242,117, 77,108, 76, 86, 1,128,
+ 5,149, 9,155,205,230, 16,133, 66,129,172,172, 44, 12, 25, 50, 4, 55,110,252, 19,240, 12, 12, 44,139,184,135,134,134,226,246,
+237,219,240,241,241, 1, 33,196,215,145,125,246,241,241,241, 51, 24, 12, 24, 54,108, 24,146,147,255, 25,174, 24, 20, 20,100, 57,
+166,222,142,232,216,226,231,231,231, 87, 90, 90,138,246,237,219, 67,167,211, 1, 0, 6, 12, 24, 0,161, 80,136,172,172, 44, 8,
+133, 66,167, 53, 1,120,199,199,199, 87,154, 34, 69,165, 82, 25, 61, 61, 61, 27, 56,169,233,245,210, 75, 47,165,174, 94,189,250,
+129,174,186, 51,103,206,188,172, 86,171, 15,170,213,234, 72, 39, 53,121, 91, 51, 37, 18,137,238, 51, 88, 66,161, 16, 12,195,212,
+120, 12,218, 51,196, 66, 0,150, 89,109, 43, 1, 68, 63,193,182,220,135,173,201,218,179,103, 15, 26, 53,106,132,188,188, 60, 92,
+189,122,245,137,155, 43, 11, 60,207, 67, 32, 16, 88,111,142,165, 82, 41,154, 55,111,110, 53, 87,132, 16,148,148,148, 64, 32, 16,
+ 88,206,215, 14,157,252,242,243,243, 17,224,239, 15,165, 82,137,122, 17, 17,184, 89,126, 30,177, 60,151, 72, 36, 32,132,192,108,
+174, 58,112, 87, 62, 19,240,125, 84, 49,158,170,134, 80,160,204, 12, 85, 69, 96, 96, 32,120,158,183,156,243,171,139, 32, 56,164,
+233,237,237, 13,173, 86,235,168,230, 51,141, 37, 77, 67, 71, 0, 71, 96, 51, 53,146, 16,194, 52,240,115, 91, 59,111,116,151, 33,
+ 47, 52,242, 70,105,118, 34,164, 74,111, 16,143, 80, 44, 90,188, 27,151,238,228, 2, 0, 22,125,247, 7, 54,207,236, 1,200,212,
+136,114,207,129,191, 82,208, 7,118, 12, 22, 1, 37, 60,165, 16,176,101,253,177, 2, 1, 11,150,101,160,201, 78,199,146,105,163,
+ 0, 0,171,214,239,192,174,163, 87, 17, 28,222,200,218, 79, 11, 66, 0, 90,245,151,218,199, 93,180,106,116,223, 86, 50,226,145,
+ 15,120, 8, 31,220,192, 83, 4, 18,202,252, 95,123, 87, 30, 29, 85,149,167,191,251,222,171, 74, 45,169,164, 18, 66,165, 32, 36,
+ 4, 1,219,168, 96,156, 0, 14, 52, 25,150,145, 70,156,227,204,208,200, 34, 10, 2,129, 34,168,199, 33,216, 14,112, 20, 8,105,
+192,214, 99, 88, 6,161, 33,131,136, 44, 42, 58,200, 98,219,224, 8, 39,172,118, 11, 97, 80,130, 1, 73, 32, 97, 73, 82, 73,165,
+178, 84,146, 74,106,189,243, 71,213,171, 84,202, 90, 83,175,144,104,190,115,238,169,229,189,250,222, 93,235,125,239,119,127,247,
+119,241,242,184,100,249,249, 35,109,219,127,104, 52, 63, 26,168, 98,100,132,184, 28,218, 57, 0, 98,183, 99, 98, 56, 44, 89, 12,
+156,143,198,206, 85, 39,161,130, 23, 42, 10,133, 2,106,181, 26,235,214,173, 83, 47, 91,182,108, 47, 66,220, 24,154, 82,122,141,
+ 16, 50,110,193,130, 5,133,117,117,117,234,180,180, 52, 40, 20, 10, 40, 20, 10,104,181, 90, 76,157, 58, 85, 91, 93, 93,221, 85,
+235,216,238,172,172, 44,181, 88, 44, 70,105,105, 41,122,245,234,229, 18,134, 93, 1, 33, 68, 29, 27, 27,251,183,175,191,254, 58,
+117,240,224,193,184,122,245, 42, 30,121,228, 17,236,223,191, 95, 53,115,230,204,160, 68,150, 76, 38,155,236, 20, 76,208,104, 52,
+113, 26,141,102, 44,128,177,129,174,173,209,104,226,114,114,114,254, 21,126, 4,150, 72, 36,186,173,215,235,251,200,100, 50, 28,
+ 56,112, 0, 10,133, 2,114,185, 28, 73, 73, 73,208,235,245,144,203,229,160,148,194, 98,177,240,127, 18,117,193,148,187,182,182,
+ 86,107,179,217, 82,142, 30, 61,138,218,218,142,152,120,169,169,169,112,250,107, 4, 27, 11,198,133,202,202, 74, 45, 33, 36,229,
+210,165, 75, 40, 47, 47,199,164, 73,147,112,240,224, 65, 12, 31, 62, 28, 0, 96, 50,153,186, 18,124,207,198,178,172,207, 63, 61,
+231, 19,103,188,144,156,112,220,180, 66,226,180,219,237,118, 94, 92,185,191,186,139,174, 0,215,252,165,192,221,119,231,103, 11,
+121, 16, 8,147, 38, 77,130, 94,175,135, 66,161, 8,120, 3,190,151,224, 45, 88,171, 87,175, 70,118,118, 54,212,106, 53,150, 46,
+ 93, 10,142,227, 92,201,125, 38, 32, 20, 36,170,213,126,143,243, 62, 88,254, 64, 8,137, 81, 42,149,171, 25,134,153,198, 6, 81,
+113, 54,155,205,102,183,219, 63,109,108,108,244, 27,166,129,119, 72, 15,166, 45,220,235, 32, 64, 94,195,230,244,166, 69,186, 51,
+248,210, 21, 58, 77,115,133, 64,135,184,250, 83,246,248, 57, 19,135,196,227,240,241,191, 67,108,110, 0, 76, 62,219, 11,176, 89,
+ 64,196,209, 80, 43, 69,201,222, 14, 19,134,189,122,231,110, 37, 18,226, 21, 78,113,229, 76, 12,131,244, 33,142,135,215,191,156,
+ 46, 65,242,192, 33,224, 88, 22, 28,203, 66, 33,147, 64, 91, 93, 5,142, 99,174,250,186,236, 80, 22, 83,166, 60,148, 50, 64,157,
+ 24, 5, 12,245, 51, 0,134,197, 32,185,111, 20,158, 74,144,166, 14,101, 49,197, 95,165, 80, 74, 33,113, 10, 44, 3, 0,211,188,
+121,200, 40, 40,192, 53,141, 6, 55, 53, 26, 60, 80, 80, 0,204,155, 7, 59, 58, 86, 21, 6, 26, 40,222,192,119, 68, 94, 8,173,
+ 88,177, 66, 91, 87, 87,247, 66,200, 68,142, 60, 95,171,175,175, 31,247,198, 27,111,104,117, 58, 29,228,114, 57,170,170,170,194,
+ 18, 87, 0, 96, 52, 26,103, 23, 20, 20,104, 11, 11, 11,161, 80, 40, 16, 19, 19,211,101,129,197, 91,174, 86,173, 90,213, 63, 37,
+ 37, 5,101,101,101, 80, 42,149, 72, 72, 72, 64,122,122, 58,206,158, 61,171, 74, 73, 73, 57,234, 92,101,228, 47, 79,135, 10, 10,
+ 10, 26, 0,160,160,160,160,129, 16,114,146, 16,178,141, 16,242,103,143,180,141, 16,114,210,253, 92,163,209,248,185, 63,110,147,
+201,116,178,164,164,132,202,229,114,176, 44, 11,179,217, 12,169,212, 97,235,102, 89,214,229,152, 11, 0, 78,199,211, 51,193,148,
+221, 96, 48,252,245,131, 15, 62,176,164,164,164,224,177,199, 30,195,176, 97,195, 48,106,212, 40,164,166,166, 98,245,234,213,166,
+150,150,150,191, 6,195,227,142,202,202,202,191,236,223,191,223,146,146,146,130, 97,195,134, 65, 34,145, 32, 61, 61, 29, 73, 73,
+ 73, 88,183,110,157,169,177,177, 49,100, 78, 0,183, 46, 95,190,236,243, 31, 82, 38,147,197, 34,136,213,184, 30,184,125,254,252,
+121,118,228,200,145,135, 61, 15, 60,241,196, 19,135, 21, 10,133, 18, 64,168,126,125,212, 93, 84, 73, 36, 18, 87,226,191,231, 56,
+238,215, 96,193, 90, 12,224,123, 0,101, 0,150, 6, 56,247,158,194,125,181, 96, 93, 93, 29, 74, 74, 74, 80, 84, 84,132,145, 35,
+ 71,226,204,153, 51,128, 35, 76,131,223,177, 30,225,252,129, 82, 10,145, 72,132,180,180, 52,228,228,228,224,203, 47,191,196,181,
+107,215, 96,177, 88, 92, 2,136,247,185, 12,197,130, 37, 22,139,161, 86,171, 97,177, 88, 92,214, 43, 0,184,254,227,143,224, 56,
+ 14,118,187, 29, 38,147, 41,160, 5, 75,169, 84,174,222,177, 99,199,171, 58,157,174,111,109,109,109,162,123,210,106,181,137, 85,
+ 85, 85,137,119,239,222, 77,188,125,251,118, 98, 69, 69, 69,226,205,155, 55,251,190,253,246,219,175, 42,149,202,213,193,228,147,
+101, 89,164,167,167,227,149, 87, 94,113,165,247,222,123,207,149, 10, 11, 11, 59,140, 29, 65,130,101, 89,164,229,190,139,127,169,
+165,174,244,165,138,184, 82,241, 31, 22,250,227,236,164, 69,186, 59, 60,157,220, 1, 0, 15,247,145,175,249,211,130, 49,115,126,
+247,136, 18,135,142, 95, 64,222,231, 55,174,254,102,142, 42,109,112,124, 45,236,181, 37,248,195,243,195,241,238,190, 11, 0, 28,
+ 83,132,246,154, 98,208,250, 50,208,152, 20,220,212,235,188, 78, 47, 88, 77,109, 39,110,148,254, 56, 62,109,232, 8,166, 90,215,
+220,105,133, 65,198,184,169, 32,132,160,223,192, 33, 96, 57, 14, 44,203,128, 99, 89,196,197, 74, 81,114,233,146,189,221,104, 60,
+225,141, 51, 3,224, 18,100, 81,155,159,127, 42, 93,138,190,205,128, 76,226, 58, 70,111, 76,237,124,178,140, 3,134,198, 96,238,
+221, 4,217, 9,109,219,102, 81,139,249, 48,128,159, 46,203,128,227,169, 38, 70, 34, 65, 43, 0,157, 72,132, 81, 27, 55,226, 71,
+141, 6, 49, 59,119,130,133,195,139, 90,181,113, 35, 12,187,119,131,177, 90, 65,165,210,176, 44, 88, 90,173, 22,211,167, 79, 15,
+ 75, 8, 1, 29,150,172, 69,139, 22, 21,174, 91,183, 78,189, 98,197, 10,193, 56,151, 46, 93, 90,184,111,223, 62,245, 3, 15, 60,
+208, 85, 42, 40, 20,138,255,180,219,237,113,239,188,243, 78,117,126,126,126,167, 39, 67,190, 46, 76, 38,147, 36, 46, 46,238, 93,
+ 0,227,253, 80,229, 45, 92,184, 80, 12, 32,219,105,201,122,108,225,194,133,231, 40,165,111,186,159, 68, 8,201,221,190,125,251,
+116,183,169,196,109, 0, 54,250,203, 99, 83, 83,211,159,115,114,114,230,157, 58,117,170,183, 84, 42, 5, 33, 4, 98,177, 24, 15,
+ 62,248,160,211,242,234,112,120,165,148,226,181,215, 94,211,213,212,212, 4, 21,166,161,189,189,125, 87, 94, 94,222,120,163,209,
+152, 58,119,238, 92,113,124,124, 60,180, 90, 45,214,175, 95,111,218,181,107,215,237,150,150,150, 80,125,165, 96,177, 88,118,173,
+ 92,185,114, 92,115,115,243,192,249,243,231,139, 27, 27, 27, 97, 52, 26,241,250,235,175,155,118,238,220,121,199,104, 52,134, 28,
+168,119,212,168, 81,165, 21, 21, 21,153,173,173,173,245,114,121,231, 5,177, 34,145,136, 68, 71, 71,143, 0,176, 59, 20,206,140,
+140,140,178, 91,183,110,141, 92,179,102,205, 73,139,197, 34,250,246,219,111, 93, 78,238,155, 55,111, 46,148, 74,165, 79, 34,116,
+103,124,187, 68, 34,233,100,177,242,124,207,113,220, 47,222,130, 69, 41, 45,132, 35,244,197,125, 5, 79,113, 85, 92, 92,140,241,
+227, 29, 67,250,204,153, 51, 24, 61,122, 52,206,156, 57,131,204,204,204,159, 53, 76, 3, 47,176, 56,142,195,204,153, 51, 49, 97,
+194, 4,244,239,223,223, 53,206,221,157,220, 67, 17, 25, 86,171, 21, 67,135, 14, 69,187,201, 4,177, 88,236,154,130,228, 56, 14,
+170,196, 68,148,150,150, 6,101,193, 98, 24,102,218,228,201,147,153, 43, 87,174, 96,198,140, 25,216,179,103,143,207,115,103,205,
+154,133,143, 63,254, 24,147, 39, 79,102,150, 47, 95,238, 55, 76, 3,239, 92, 30, 76,153,248,251,116, 32, 11,158, 80,156,238, 90,
+164,187,195, 91,160, 81, 12, 84,201,231, 78,120,144,195,161, 19, 23,144,119,232,214, 46, 27,165, 7, 14, 92,172,255, 98,233,104,
+192,252,233,243, 72,159,186,219, 49, 45, 8,192, 94, 83, 12,243,167,179, 64,228,189,113,250,174, 8,141, 70,179,215, 29,173,173,
+ 86,243,158,131,123,183,228,140,220,154,169,234,155,168,132,190,209,232, 18, 89, 23, 11, 63, 3, 0, 76, 89,184, 22, 28,235,152,
+ 58,140, 85, 72, 33, 19,179,248,159, 15, 55,233,204,230, 54,175,189,202, 46, 98,178,231,255,246, 65,165, 82, 73,129, 71,197,157,
+142,145,129, 14,206, 78, 66,235, 31,226,209,187,184, 30,207, 15, 86,196,110,188,210,144, 13, 96,179, 39,167,169,161,193,104, 40,
+ 42,146,253,211,222,189, 40,249,253,239,209,207, 96, 64,113,124, 60, 84, 86, 43, 20,112, 90,171,118,238,132, 97,207, 30, 72,173,
+ 86, 64,169, 68,221,150, 45,176, 94,190, 12,107, 83,147,209,147,207, 31, 8, 33,184,126,253,122,216, 86, 38,119,240,130,104,217,
+178,101,123,235,234,234, 94, 16,146,115,246,236,217,133,199,143, 31,247,111,247,246, 3,131,193,176, 4,192, 18, 1,242, 99, 39,
+132,188,233, 12,104,151,173,209,104,226,206,159, 63, 63,143, 16,178,149, 82, 90, 5, 0,132,144,196,172,172,172, 5, 30,226, 42,
+224, 42, 66, 74,233, 45,133, 66,241,199, 37, 75,150,172,205,207,207, 87,240, 14,237,223,125,247, 29,172, 86, 43, 68, 34, 17,108,
+ 54, 27,178,178,178,154,235,234,234,222,245, 21,129,217, 11,175,149, 16, 50,107,237,218,181, 89,155, 54,109,122,134,101, 89,149,
+205,102,171, 53, 26,141, 71,141, 70, 99, 65, 87, 86, 81, 57,235,225,197, 21, 43, 86,188,184, 97,195,134,201, 12,195, 36, 90,173,
+ 86,157,193, 96, 56, 98, 52, 26,187, 20, 91,235,220,185,115,181, 91,183,110,189, 81, 91, 91,251,112,114,114,114,163, 66,161, 48,
+153, 76, 38, 86, 38,147,197, 70, 71, 71,103, 0,248, 6,192, 15,161,112, 22, 21, 21, 85,111,219,182,173,188,189,189, 61,109,219,
+182,109,167, 99, 99, 99,143, 19, 66,136, 88, 44,142,151,201,100,227, 1,156, 4,112, 61, 20, 78,134, 97,236,238,214, 42, 79,255,
+171,168,168,168, 95,139, 15,214,125, 7,103,152,134,139,148, 82,232,116, 58, 92,185,114,133, 23, 87, 25, 0,144,153,153,121,145,
+ 23, 89, 69, 69, 69, 24, 54,108,216, 69, 66,200, 61, 15,211,224,110,193,226,133, 84,255,254,253, 93,159,221,147,155, 15, 86, 80,
+176,217,108, 16,139,197,224, 56, 14,125,147,146, 92,215,162,148,162,180,180, 20,122,189, 62, 40,129,197,178, 44, 75, 8,193,140,
+ 25, 51,130,186,238,115,207, 61,135,147, 39, 79, 34,152,233, 68, 39, 63, 6, 12, 24, 16,240, 28, 39,130, 18, 62, 44,203, 34, 57,
+217,235, 68, 86, 80,156,238, 90,164,187,195,171,147,123, 89,141,113,205,172,245,103,151,255, 80,221,118,160, 68,219,154, 3,128,
+126, 90, 44,255, 42, 93,197, 78,156,248,208, 29,180, 23,100,130,196, 58,130,174,209,230, 42,144,104, 53,238,216,251, 33,247,240,
+213,106, 43,136, 87,255, 22, 74,105,165, 88, 42,127,243,195, 29,155,243,179, 22,189,166, 40, 46,211,162,177,185, 29, 44,219,209,
+105,121,231,246,216,104, 41, 82,250, 40,177,239,191,215, 27, 12, 77, 13, 43,188,197,192, 2,128,212, 24,177,230,201, 17,131, 37,
+232,211, 2,180, 73,129,182,142,206, 74, 47,253,187,227,141,193,195, 72, 53, 36, 14, 79,223,106,145, 30,188,213,162,129, 23,129,
+213,102, 50, 77, 92,254,244,211,199,214,124,241,133,252,225, 3, 7,160,125,246, 89, 36, 53, 53, 65, 2,116,242,201, 98, 44, 22,
+ 64,169,132,110,207, 30,180,218,108,200,159, 59,183,181,205,108,126,202, 71, 61,123,133,197, 98, 17,143, 29, 59, 86, 48,113,197,
+195,201, 21,146, 31, 87, 48,156,132,144,113, 19, 38, 76, 40,164,148, 74, 2,255, 34,178,112, 19, 89,230,243,231,207, 47, 56,125,
+250,116, 25, 58,111,248,217,112,250,244,233,178,249,243,231,147,247,223,127,127, 39,128,149,193, 6,222,108,110,110,222, 28, 23,
+ 23,135, 49, 99,198,172,124,235,173,183, 18,134, 15, 31,142,196,196, 68, 24, 12, 6, 20, 21, 21, 97,241,226,197,250,166,166,166,
+183,234,235,235,243, 67,204,179, 13, 14, 75, 77,200,214, 42, 63,156,118, 0, 31, 56,147, 32,120,233,165,151,190, 43, 43, 43,171,
+ 83,169, 84,255, 40, 22,139, 31,131,195,207,167, 26,192, 78,132, 40,132,120,100,103,103, 95, 42, 43, 43,211,245,235,215,111,164,
+147, 51, 14,192, 93, 0, 59,186,192, 89,121,225,194,133,228, 17, 35, 70, 48, 34,145,136,178, 44, 11,145, 72, 68, 57,142,163, 78,
+191, 25, 10, 0, 71,142, 28,145, 0, 8,121, 43,175, 30,132, 7,247, 48, 13, 85, 85, 85, 46,113,229, 22,104, 52, 35, 51, 51,243,
+162, 83, 92,241,199,126, 22,255, 49, 74, 41,242,242,242,176,125,251,118, 4,138, 64,238, 92,173,231,215,140,195, 91,170,120,241,
+100, 54,155, 81, 92, 92, 12, 66, 8,108, 54,155,107, 90,144, 15,209, 96,181, 90,253,174, 62,183,217,108, 54,147,201,132, 79, 62,
+249, 36, 40,145,245,209, 71, 31,161,173,173, 13,182, 0,202,205, 61,164,194,227,143, 63, 14,189, 94,239, 90,196,147,145,145,225,
+ 58,207,108,246, 27,184,222, 39,103, 90, 90, 26,116, 58, 29,122,247,118,172,179, 73,153,173,113,157,103,109,249,245,196,253, 37,
+193,134, 22,120, 60, 46, 78,217, 30,101,249,252,223,134, 72,198, 77,203, 80, 98, 96,159, 24,136,196, 82, 84, 54, 89,241,245, 15,
+ 77,216, 81, 88,125,219,104,177, 61,115,173,166,229,178, 63, 30,105,180,242,232,240,223, 78, 24, 61,123,193,226,232,230,118, 27,
+202,203, 43, 80, 91, 83, 5,134, 48,232,219, 47, 25,169,169, 3, 32,139, 98,176,167, 32,191,229,226,185,227,103, 13, 77,250, 73,
+190,184,158,137,139, 58,183,225,217,209, 35, 7, 13,138, 33,176, 90, 0,155, 5,176, 90, 0,187,243,149,255,206,222,185,175, 93,
+185,210, 64,151,255,159,254,111, 95, 52,152,188,238, 41, 53,141,144,209,241,241,241,199,242, 14, 29,146,219, 77, 38,152,230,205,
+131,172,189, 29, 50, 66, 64, 40, 5, 3,128, 72,165,168,219,178,197, 33,174,230,204,105,109,104,108, 12,121,171, 28,149, 74,245,
+129, 78,167,235,118,145,220, 19, 18, 18,222,232, 74,184,135, 72,193,185,146,175,129, 15, 50,234,246, 61, 7, 64,197, 91,181,186,
+192, 59, 64,165, 82, 45,103, 24,102, 20,165, 52,129, 97,152,122,187,221,254, 77, 77, 77,205,219,148,210, 82, 33,242,222,131,208,
+ 65, 58, 34,185, 7,154,175,174, 1,240, 31, 0, 12,148,210,242,136,103,172, 7,157,192, 79, 19,194,203,106, 65,127,199,238, 21,
+ 18, 18, 18,254,126,236,216,177,225, 3, 7, 14,100,220,221, 21,248, 88,119,252, 52, 22,199, 57,236, 16,167, 78,157,178,206,152,
+ 49,227,155,234,234,234, 49,190, 56, 99, 99, 99,191,250,254,251,239,127,215,216,216,248, 19, 33,229, 30,217,157,255,220,210,210,
+130, 69,139, 22,253,111, 83, 83,147,215,173,114,226,226,226, 54,228,231,231,191, 58,101,202, 20,134, 15, 43,225,158,168,115,129,
+ 21,159,204,102, 51,118,239,222,109,223,180,105,211,127, 53, 52, 52,248,156, 34, 76, 74, 74,186, 93, 89, 89,153,204,135, 76,240,
+149,220, 49, 96,192,128,170,242,242,114,159,193, 75, 35,193,217,221, 17,180,192, 2, 28, 43,136,210, 18,163,167, 83, 96, 26, 3,
+251, 80,134,144, 40, 43,197, 53, 80,124, 37,231, 90,183, 22, 85,210,160,166,200,196,114,249,203, 49,138,248, 85, 83, 94,120, 37,
+ 97,192,160,223, 16,117,223,126, 32, 96,160,173,190,139,138, 27, 63,210,207,247,110,169,107,105,210,175,110,109,109,222,226,143,
+231, 97, 66, 6, 15,138, 21,239,143,178,225, 33,240,229,240,216, 63,202, 19, 20,128, 89,196, 92,189, 97,176,204, 40,241,115,147,
+228, 69,214,202,207, 62,147,115,143, 62,250,147, 0,111,118,187, 29,214,203,151,145, 63,119,110,151,196, 85, 15,122,208,131,240,
+ 64, 8, 25,136,192, 49,174, 44, 0,238,252, 92, 22,146, 95, 59,200,125,188,217, 51, 33, 36,186, 87,175, 94,199, 89,150, 77,117,
+126,238,228, 19,196,191,231, 95,237,118,123,185, 86,171,125,146, 82,218,234,135,115, 80, 76, 76,204, 22,155,205,246, 68, 32,159,
+ 37, 74, 41, 88,150,253,214, 96, 48,188,236,203,213, 32, 82,171, 8,123,247,238, 93, 90, 81, 81, 49,136, 95, 21,237,126,175,244,
+172, 7, 0,184,126,253, 58,198,142, 29, 91, 81, 85, 85,229,115, 62, 49, 18,156,221, 29, 33, 9, 44, 65, 47, 76, 72,146, 88,162,
+120, 49, 74, 38,253,103,187,197,154, 6, 2,112, 34,209, 85, 83,155,241, 68,187,177,249, 67, 95,211,130, 30, 28, 97, 5,100,162,
+ 1, 10, 63,141,144,209, 18,177,248, 43,177, 82, 41,243,118,170,181,169,201,216,102, 54, 79,236, 17, 87, 61,232, 65, 15,122,208,
+131,238, 2,226,216,153,227,152, 72, 36,146, 56, 63,187, 31,251,201,249, 86,171,181,173,182,182,118,146,191,217,150, 72,112,118,
+123,240, 74, 51,216, 4,167, 46, 9,242,220, 9,193,114, 58,211,216,251,157, 51,130,101, 15,200, 29, 2,231, 88, 39,103,110, 55,
+201,167,144,109, 36, 40, 39, 58,116,120, 80,188,161,112, 6,219,167, 66,204,103, 80,253,254,126,224, 12,178, 61,187,146, 79,191,
+220, 93,108,247,220,110,146, 79, 33,219, 72, 16, 78,207,254, 19, 12,111,168,156,193,244,169, 46,228, 51, 96,191,191, 95, 56,131,
+104,211,174,230,211, 39,119,176,125,201, 71,219,231, 6,250,237, 47, 33,249,141,228,238,137, 72,121,246, 83,103,120,124, 39,191,
+ 32,161,242, 35,193,201,131, 8,188, 17,165,144, 92, 78, 20, 10,205,233, 81,159, 66, 33,151, 58, 86,140,156, 68, 16,129, 66,131,
+ 68, 33,237, 88,133, 18, 86, 29,120,148, 85, 16, 94,119, 78,161,234,210,157, 71,168,126, 31,105, 78,247,239,194,233,171,158,156,
+ 66,244,123,111,237, 46, 36,167, 80, 99,201,227,247,130,140,165, 72,244,121, 47,253, 39,108, 94, 79, 78, 33,198,146, 39,167, 16,
+253,254, 94,112,242,223,135, 51,150,188,113, 10,209,239,125,181,125,184,188,221, 5, 33, 69,140,140,100,197,144, 8,108,240, 40,
+180, 16,226, 57,133,228,227, 57,137, 35,130,237,125,207, 9, 97,219, 40,215,201,153, 43, 32,231, 56,161,218, 40, 18,253,221,157,
+ 83, 40,126, 79, 30, 33,218,201, 27,103,184,249,245,145,207,176,224,141, 51,220,126,127,175, 56, 33,108, 27, 9, 50,150, 60, 56,
+ 5, 27, 75,158,229, 37,132,228, 10,201, 41,212, 88,242,146,207,176,219,201, 27,103,184,249,245,145,207,176,224,141, 83,136,123,
+ 72,164,120,187, 3, 66,178, 96, 69, 10,145, 16, 66, 64, 71, 60, 13,161,111,100, 66,138,172, 72, 89,218,132,178,226,120,225, 61,
+ 41, 32,157, 96,214, 38, 30,206,252, 9,242, 68,219, 29,209, 51,150,122,198, 18,238,179,177,228,173,223, 80, 74,115, 9, 33,171,
+132,228, 12, 23,158,156, 66, 9, 33, 47,101, 15,107, 44,121,254, 86,136,177, 20,128, 51, 44, 11,179,175,242,135,195,219, 93,208,
+245, 77,229, 4,134, 83,213, 10,246,103,235,198, 39,168, 85, 76,104, 68, 40,159,227,186, 67,217, 17,129,124, 18, 66,114, 35, 84,
+246,238, 82,167, 61, 99,169,103, 44, 9, 2, 33,199,146, 71,159, 20, 36,175, 66,247,115,111,156, 66, 92,195,157, 67,168, 62, 26,
+233,178, 11, 57,150, 34,209,246,221, 5,255, 15,195, 78,238,106,137,168,169,119, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130,
0};
diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c
index d33ad16dfb1..6237e193a13 100644
--- a/source/blender/editors/gpencil/gpencil_ops.c
+++ b/source/blender/editors/gpencil/gpencil_ops.c
@@ -45,10 +45,10 @@
/* ****************************************** */
/* Generic Editing Keymap */
-void ED_keymap_gpencil(wmWindowManager *wm)
+void ED_keymap_gpencil(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Grease Pencil", 0, 0);
- wmKeymapItem *kmi;
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "Grease Pencil", 0, 0);
+ wmKeyMapItem *kmi;
/* Draw */
/* draw */
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 99b85d62026..92ae2400666 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1341,7 +1341,7 @@ static int gpencil_draw_invoke (bContext *C, wmOperator *op, wmEvent *event)
}
/* add a modal handler for this operator, so that we can then draw continuous strokes */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h
index deee3e3c8b4..e394de613e4 100644
--- a/source/blender/editors/include/BIF_glutil.h
+++ b/source/blender/editors/include/BIF_glutil.h
@@ -197,6 +197,7 @@ void gla2DSetMap(gla2DDrawInfo *di, struct rctf *rect);
/* use this for platform hacks. glPointSize is solved here */
void bglBegin(int mode);
void bglEnd(void);
+int bglPointHack();
void bglVertex3fv(float *vec);
void bglVertex3f(float x, float y, float z);
void bglVertex2fv(float *vec);
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 799829a6e87..271827c2aba 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -34,7 +34,7 @@ struct ListBase;
struct AnimData;
struct bContext;
-struct wmWindowManager;
+struct wmKeyConfig;
struct ScrArea;
struct ARegion;
struct View2D;
@@ -42,11 +42,14 @@ struct View2D;
struct Scene;
struct Object;
+struct bDopeSheet;
+
struct bActionGroup;
struct FCurve;
struct FModifier;
struct uiBlock;
+struct uiLayout;
/* ************************************************ */
/* ANIMATION CHANNEL FILTERING */
@@ -119,6 +122,8 @@ typedef enum eAnim_ChannelType {
ANIMTYPE_ANIMDATA,
ANIMTYPE_SPECIALDATA,
+ ANIMTYPE_SUMMARY,
+
ANIMTYPE_SCENE,
ANIMTYPE_OBJECT,
ANIMTYPE_GROUP,
@@ -137,6 +142,7 @@ typedef enum eAnim_ChannelType {
ANIMTYPE_DSWOR,
ANIMTYPE_DSPART,
ANIMTYPE_DSMBALL,
+ ANIMTYPE_DSARM,
ANIMTYPE_SHAPEKEY, // XXX probably can become depreceated???
@@ -157,6 +163,7 @@ typedef enum eAnim_KeyType {
ALE_GPFRAME, /* Grease Pencil Frames */
ALE_NLASTRIP, /* NLA Strips */
+ ALE_ALL, /* All channels summary */
ALE_SCE, /* Scene summary */
ALE_OB, /* Object summary */
ALE_ACT, /* Action summary */
@@ -180,6 +187,9 @@ typedef enum eAnimFilter_Flags {
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 */
ANIMFILTER_SELEDIT = (1<<11), /* link editability with selected status */
+
+ /* all filters - the power inside the bracket must be the last power for left-shifts + 1 */
+ ANIMFILTER_ALLFILTERS = ((1<<12) - 1)
} eAnimFilter_Flags;
@@ -206,6 +216,7 @@ typedef enum eAnimFilter_Flags {
#define FILTER_CUR_OBJD(cu) ((cu->flag & CU_DS_EXPAND))
#define FILTER_PART_OBJD(part) ((part->flag & PART_DS_EXPAND))
#define FILTER_MBALL_OBJD(mb) ((mb->flag2 & MB_DS_EXPAND))
+#define FILTER_ARM_OBJD(arm) ((arm->flag & ARM_DS_EXPAND))
/* 'Sub-object/Action' channels (flags stored in Action) */
#define SEL_ACTC(actc) ((actc->flag & ACT_SELECTED))
#define EXPANDED_ACTC(actc) ((actc->flag & ACT_COLLAPSED)==0)
@@ -392,11 +403,14 @@ void ANIM_draw_cfra(const struct bContext *C, struct View2D *v2d, short flag);
/* main call to draw preview range curtains */
void ANIM_draw_previewrange(const struct bContext *C, struct View2D *v2d);
+/* ------------- Preview Range Drawing -------------- */
+
+/* standard header buttons for Animation Editors */
+short ANIM_headerUI_standard_buttons(const struct bContext *C, struct bDopeSheet *ads, struct uiBlock *block, short xco, short yco);
+
/* ************************************************* */
/* 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);
@@ -479,11 +493,11 @@ void ANIM_pose_to_action_sync(struct Object *ob, struct ScrArea *sa);
/* generic animation channels */
void ED_operatortypes_animchannels(void);
-void ED_keymap_animchannels(struct wmWindowManager *wm);
+void ED_keymap_animchannels(struct wmKeyConfig *keyconf);
/* generic time editing */
void ED_operatortypes_anim(void);
-void ED_keymap_anim(struct wmWindowManager *wm);
+void ED_keymap_anim(struct wmKeyConfig *keyconf);
/* ************************************************ */
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 8bdfe41ef80..6479030bcd1 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -35,7 +35,7 @@ struct Bone;
struct bArmature;
struct bPoseChannel;
struct wmOperator;
-struct wmWindowManager;
+struct wmKeyConfig;
struct ListBase;
struct View3D;
struct ViewContext;
@@ -92,7 +92,7 @@ typedef struct EditBone
/* armature_ops.c */
void ED_operatortypes_armature(void);
-void ED_keymap_armature(struct wmWindowManager *wm);
+void ED_keymap_armature(struct wmKeyConfig *keyconf);
/* editarmature.c */
void ED_armature_from_edit(struct Object *obedit);
diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h
index 4149c6a9cca..fea684971b2 100644
--- a/source/blender/editors/include/ED_curve.h
+++ b/source/blender/editors/include/ED_curve.h
@@ -36,11 +36,11 @@ struct Scene;
struct Text;
struct View3D;
struct wmOperator;
-struct wmWindowManager;
+struct wmKeyConfig;
/* curve_ops.c */
void ED_operatortypes_curve(void);
-void ED_keymap_curve (struct wmWindowManager *wm);
+void ED_keymap_curve (struct wmKeyConfig *keyconf);
/* editcurve.c */
void undo_push_curve (struct bContext *C, char *name);
diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h
index 57ab6a5f8f6..221b377dd25 100644
--- a/source/blender/editors/include/ED_fileselect.h
+++ b/source/blender/editors/include/ED_fileselect.h
@@ -51,21 +51,21 @@ typedef enum FileListColumns {
typedef struct FileLayout
{
/* view settings - XXX - move into own struct */
- short prv_w;
- short prv_h;
- short tile_w;
- short tile_h;
- short tile_border_x;
- short tile_border_y;
- short prv_border_x;
- short prv_border_y;
- short rows;
- short columns;
- short width;
- short height;
- short flag;
- short dirty;
- short textheight;
+ int prv_w;
+ int prv_h;
+ int tile_w;
+ int tile_h;
+ int tile_border_x;
+ int tile_border_y;
+ int prv_border_x;
+ int prv_border_y;
+ int rows;
+ int columns;
+ int width;
+ int height;
+ int flag;
+ int dirty;
+ int textheight;
float column_widths[MAX_FILE_COLUMN];
} FileLayout;
@@ -84,7 +84,7 @@ FileLayout* ED_fileselect_get_layout(struct SpaceFile *sfile, struct ARegion *ar
int ED_fileselect_layout_numfiles(FileLayout* layout, struct ARegion *ar);
int ED_fileselect_layout_offset(FileLayout* layout, int x, int y);
-void ED_fileselect_layout_tilepos(FileLayout* layout, int tile, short *x, short *y);
+void ED_fileselect_layout_tilepos(FileLayout* layout, int tile, int *x, int *y);
#endif /* ED_FILES_H */
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 388da9a2acc..ff95f8ce6eb 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -41,7 +41,7 @@ struct bGPDframe;
struct PointerRNA;
struct Panel;
struct ImBuf;
-struct wmWindowManager;
+struct wmKeyConfig;
/* ------------- Grease-Pencil Helpers ---------------- */
@@ -62,7 +62,7 @@ struct bGPdata *gpencil_data_get_active(struct bContext *C);
/* ----------- Grease Pencil Operators ----------------- */
-void ED_keymap_gpencil(struct wmWindowManager *wm);
+void ED_keymap_gpencil(struct wmKeyConfig *keyconf);
void ED_operatortypes_gpencil(void);
/* ------------ Grease-Pencil Drawing API ------------------ */
diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h
index 566105109b2..41a83a34ee4 100644
--- a/source/blender/editors/include/ED_image.h
+++ b/source/blender/editors/include/ED_image.h
@@ -38,7 +38,10 @@ struct uiBlock;
struct Image *ED_space_image(struct SpaceImage *sima);
void ED_space_image_set(struct bContext *C, struct SpaceImage *sima, struct Scene *scene, struct Object *obedit, struct Image *ima);
-struct ImBuf *ED_space_image_buffer(struct SpaceImage *sima);
+struct ImBuf *ED_space_image_acquire_buffer(struct SpaceImage *sima, void **lock_r);
+void ED_space_image_release_buffer(struct SpaceImage *sima, void *lock);
+int ED_space_image_has_buffer(struct SpaceImage *sima);
+
void ED_space_image_size(struct SpaceImage *sima, int *width, int *height);
void ED_space_image_aspect(struct SpaceImage *sima, float *aspx, float *aspy);
void ED_space_image_zoom(struct SpaceImage *sima, struct ARegion *ar, float *zoomx, float *zoomy);
@@ -53,9 +56,6 @@ int ED_space_image_show_paint(struct SpaceImage *sima);
int ED_space_image_show_uvedit(struct SpaceImage *sima, struct Object *obedit);
int ED_space_image_show_uvshadow(struct SpaceImage *sima, struct Object *obedit);
-void ED_image_uiblock_panel(const struct bContext *C, struct uiBlock *block, struct Image **ima_pp,
- struct ImageUser *iuser, short redraw, short imagechanged);
-
/* image_render.c, export for screen_ops.c, render operator */
void ED_space_image_output(struct bContext *C);
diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h
index 0969398f1e2..699502eb9eb 100644
--- a/source/blender/editors/include/ED_keyframes_draw.h
+++ b/source/blender/editors/include/ED_keyframes_draw.h
@@ -30,6 +30,7 @@
#ifndef ED_KEYFRAMES_DRAW_H
#define ED_KEYFRAMES_DRAW_H
+struct bAnimContext;
struct AnimData;
struct BezTriple;
struct FCurve;
@@ -109,6 +110,7 @@ void draw_agroup_channel(struct View2D *v2d, struct AnimData *adt, struct bActio
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_summary_channel(struct View2D *v2d, struct bAnimContext *ac, float ypos);
void draw_gpl_channel(struct View2D *v2d, struct bDopeSheet *ads, struct bGPDlayer *gpl, float ypos);
/* Keydata Generation */
@@ -117,7 +119,12 @@ void agroup_to_keylist(struct AnimData *adt, struct bActionGroup *agrp, struct D
void action_to_keylist(struct AnimData *adt, struct bAction *act, struct DLRBT_Tree *keys, struct DLRBT_Tree *blocks);
void ob_to_keylist(struct bDopeSheet *ads, struct Object *ob, struct DLRBT_Tree *keys, struct DLRBT_Tree *blocks);
void scene_to_keylist(struct bDopeSheet *ads, struct Scene *sce, struct DLRBT_Tree *keys, struct DLRBT_Tree *blocks);
+void summary_to_keylist(struct bAnimContext *ac, struct DLRBT_Tree *keys, struct DLRBT_Tree *blocks);
void gpl_to_keylist(struct bDopeSheet *ads, struct bGPDlayer *gpl, struct DLRBT_Tree *keys, struct DLRBT_Tree *blocks);
+/* Keyframe Finding */
+ActKeyColumn *cfra_find_actkeycolumn(ActKeyColumn *ak, float cframe);
+ActKeyColumn *cfra_find_nearest_next_ak(ActKeyColumn *ak, float cframe, short next);
+
#endif /* ED_KEYFRAMES_DRAW_H */
diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h
index b2bf05ea5ea..57a6c5fc773 100644
--- a/source/blender/editors/include/ED_keyframes_edit.h
+++ b/source/blender/editors/include/ED_keyframes_edit.h
@@ -73,6 +73,7 @@ typedef enum eEditKeyframes_Snap {
SNAP_KEYS_NEARSEC,
SNAP_KEYS_NEARMARKER,
SNAP_KEYS_HORIZONTAL,
+ SNAP_KEYS_VALUE,
} eEditKeyframes_Snap;
/* mirroring tools */
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index 20c2301d2ac..802ceff1c07 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -97,26 +97,6 @@ short insert_keyframe(struct ID *id, struct bAction *act, const char group[], co
*/
short delete_keyframe(struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag);
-/* -------- */
-
-/* Main Keyframe Management operators:
- * These handle keyframes management from various spaces. They only make use of
- * Keying Sets.
- */
-void ANIM_OT_insert_keyframe(struct wmOperatorType *ot);
-void ANIM_OT_delete_keyframe(struct wmOperatorType *ot);
-
-/* Main Keyframe Management operators:
- * These handle keyframes management from various spaces. They will handle the menus
- * required for each space.
- */
-void ANIM_OT_insert_keyframe_menu(struct wmOperatorType *ot);
-void ANIM_OT_delete_keyframe_v3d(struct wmOperatorType *ot);
-
-/* Keyframe managment operators for UI buttons. */
-void ANIM_OT_insert_keyframe_button(struct wmOperatorType *ot);
-void ANIM_OT_delete_keyframe_button(struct wmOperatorType *ot);
-
/* ************ Keying Sets ********************** */
/* temporary struct to gather data combos to keyframe
@@ -142,7 +122,7 @@ enum {
} eModifyKey_Modes;
/* Keyframing Helper Call - use the provided Keying Set to Add/Remove Keyframes */
-int modify_keyframes(struct bContext *C, struct ListBase *dsources, struct bAction *act, struct KeyingSet *ks, short mode, float cfra);
+int modify_keyframes(struct Scene *scene, struct ListBase *dsources, struct bAction *act, struct KeyingSet *ks, short mode, float cfra);
/* -------- */
@@ -155,14 +135,17 @@ struct KeyingSet *ANIM_builtin_keyingset_get_named(struct KeyingSet *prevKS, cha
/* Initialise builtin KeyingSets on startup */
void init_builtin_keyingsets(void);
+
/* -------- */
-/* KeyingSet managment operators for UI buttons. */
-void ANIM_OT_add_keyingset_button(struct wmOperatorType *ot);
-void ANIM_OT_remove_keyingset_button(struct wmOperatorType *ot);
+/* Get the active KeyingSet for the given scene */
+struct KeyingSet *ANIM_scene_get_active_keyingset(struct Scene *scene);
/* ************ Drivers ********************** */
+/* Returns whether there is a driver in the copy/paste buffer to paste */
+short ANIM_driver_can_paste(void);
+
/* Main Driver Management API calls:
* Add a new driver for the specified property on the given ID block
*/
@@ -171,11 +154,18 @@ short ANIM_add_driver (struct ID *id, const char rna_path[], int array_index, sh
/* Main Driver Management API calls:
* Remove the driver for the specified property on the given ID block (if available)
*/
-short ANIM_remove_driver (struct ID *id, const char rna_path[], int array_index, short flag);
+short ANIM_remove_driver(struct ID *id, const char rna_path[], int array_index, short flag);
-/* Driver management operators for UI buttons */
-void ANIM_OT_add_driver_button(struct wmOperatorType *ot);
-void ANIM_OT_remove_driver_button(struct wmOperatorType *ot);
+/* Main Driver Management API calls:
+ * Make a copy of the driver for the specified property on the given ID block
+ */
+short ANIM_copy_driver(struct ID *id, const char rna_path[], int array_index, short flag);
+
+/* Main Driver Management API calls:
+ * Add a new driver for the specified property on the given ID block or replace an existing one
+ * with the driver + driver-curve data from the buffer
+ */
+short ANIM_paste_driver(struct ID *id, const char rna_path[], int array_index, short flag);
/* ************ Auto-Keyframing ********************** */
/* Notes:
diff --git a/source/blender/editors/include/ED_markers.h b/source/blender/editors/include/ED_markers.h
index 4b7a2954206..58ca85bb74c 100644
--- a/source/blender/editors/include/ED_markers.h
+++ b/source/blender/editors/include/ED_markers.h
@@ -28,7 +28,7 @@
#ifndef ED_MARKERS_H
#define ED_MARKERS_H
-struct wmWindowManager;
+struct wmKeyConfig;
struct bContext;
struct TimeMarker;
@@ -56,7 +56,7 @@ void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short sel);
/* called in screen_ops.c:ED_operatortypes_screen() */
void ED_operatortypes_marker(void);
/* called in screen_ops.c:ED_keymap_screen() */
-void ED_marker_keymap(struct wmWindowManager *wm);
+void ED_marker_keymap(struct wmKeyConfig *keyconf);
#endif /* ED_MARKERS_H */
diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h
index 49c1d856a27..6708a73e088 100644
--- a/source/blender/editors/include/ED_mball.h
+++ b/source/blender/editors/include/ED_mball.h
@@ -28,10 +28,10 @@
struct bContext;
struct Object;
-struct wmWindowManager;
+struct wmKeyConfig;
void ED_operatortypes_metaball(void);
-void ED_keymap_metaball(struct wmWindowManager *wm);
+void ED_keymap_metaball(struct wmKeyConfig *keyconf);
struct MetaElem *add_metaball_primitive(struct bContext *C, int type, int newname);
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 5d034420cda..d4b695e1b7f 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -37,6 +37,8 @@ struct EditEdge;
struct EditFace;
struct bContext;
struct wmWindowManager;
+struct wmKeyConfig;
+struct ReportList;
struct EditSelection;
struct ViewContext;
struct bDeformGroup;
@@ -55,6 +57,8 @@ struct BMEdge;
struct BMFace;
struct UvVertMap;
struct UvMapVert;
+struct Material;
+struct Object;
// edge and face flag both
#define EM_FGON 2
@@ -70,7 +74,7 @@ struct UvMapVert;
#define B_AUTOFGON 32
#define B_KNIFE 0x80
#define B_PERCENTSUBD 0x40
-#define B_MESH_X_MIRROR 0x100
+//#define B_MESH_X_MIRROR 0x100 // deprecated, use mesh
#define B_JOINTRIA_UV 0x200
#define B_JOINTRIA_VCOL 0X400
#define B_JOINTRIA_SHARP 0X800
@@ -148,17 +152,18 @@ int *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em);
/* mesh_ops.c */
void ED_operatortypes_mesh(void);
-void ED_keymap_mesh(struct wmWindowManager *wm);
+void ED_operatormacros_mesh(void);
+void ED_keymap_mesh(struct wmKeyConfig *keyconf);
/* editmesh.c */
void ED_spacetypes_init(void);
-void ED_keymap_mesh(struct wmWindowManager *wm);
+void ED_keymap_mesh(struct wmKeyConfig *keyconf);
-struct EditMesh *make_editMesh(struct Scene *scene, Object *ob);
-void load_editMesh(struct Scene *scene, Object *ob, struct EditMesh *em);
-void remake_editMesh(struct Scene *scene, Object *ob);
+struct EditMesh *make_editMesh(struct Scene *scene, struct Object *ob);
+void load_editMesh(struct Scene *scene, struct Object *ob, struct EditMesh *em);
+void remake_editMesh(struct Scene *scene, struct Object *ob);
void free_editMesh(struct EditMesh *em);
void recalc_editnormals(struct EditMesh *em);
@@ -186,6 +191,7 @@ void EM_select_face(struct EditFace *efa, int sel);
void EM_select_face_fgon(struct EditMesh *em, struct EditFace *efa, int val);
void EM_select_swap(struct EditMesh *em);
void EM_toggle_select_all(struct EditMesh *em);
+void EM_select_all(struct EditMesh *em);
void EM_selectmode_flush(struct EditMesh *em);
void EM_deselect_flush(struct EditMesh *em);
void EM_selectmode_set(struct EditMesh *em);
@@ -216,6 +222,8 @@ int EM_init_backbuf_circle(struct ViewContext *vc, short xs, short ys, short r
void EM_hide_mesh(struct EditMesh *em, int swap);
void EM_reveal_mesh(struct EditMesh *em);
+void EM_automerge(struct Scene *scene, struct Object *obedit, int update);
+
/* editface.c */
struct MTFace *EM_get_active_mtface(struct EditMesh *em, struct EditFace **act_efa, struct MCol **mcol, int sloppy);
@@ -251,4 +259,25 @@ struct BMVert *EDBM_findnearestvert(struct ViewContext *vc, int *dist, short sel
struct BMEdge *EDBM_findnearestedge(struct ViewContext *vc, int *dist);
struct BMFace *EDBM_findnearestface(struct ViewContext *vc, int *dist);
+/*needed by edge slide*/
+struct EditVert *editedge_getOtherVert(struct EditEdge *eed, struct EditVert *eve);
+struct EditVert *editedge_getSharedVert(struct EditEdge *eed, struct EditEdge *eed2);
+int editedge_containsVert(struct EditEdge *eed, struct EditVert *eve);
+int editface_containsVert(struct EditFace *efa, struct EditVert *eve);
+int editface_containsEdge(struct EditFace *efa, struct EditEdge *eed);
+short sharesFace(struct EditMesh *em, struct EditEdge *e1, struct EditEdge *e2);
+
+/* mesh_data.c */
+
+void ED_mesh_geometry_add(struct Mesh *mesh, struct ReportList *reports, int verts, int edges, int faces);
+void ED_mesh_transform(struct Mesh *me, float *mat);
+void ED_mesh_calc_normals(struct Mesh *me);
+void ED_mesh_material_add(struct Mesh *me, struct Material *ma);
+void ED_mesh_update(struct Mesh *mesh, struct bContext *C, int calc_edges);
+
+int ED_mesh_uv_texture_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me);
+int ED_mesh_uv_texture_remove(struct bContext *C, struct Object *ob, struct Mesh *me);
+int ED_mesh_color_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me);
+int ED_mesh_color_remove(struct bContext *C, struct Object *ob, struct Mesh *me);
+
#endif /* ED_MESH_H */
diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h
index bf4632dc3da..667a4ecb144 100644
--- a/source/blender/editors/include/ED_node.h
+++ b/source/blender/editors/include/ED_node.h
@@ -31,10 +31,16 @@
struct Material;
struct Scene;
struct Tex;
+struct bContext;
+struct bNode;
+struct ID;
/* drawnode.c */
void ED_init_node_butfuncs(void);
+/* node_draw.c */
+void ED_node_changed_update(struct ID *id, struct bNode *node);
+
/* node_edit.c */
void ED_node_shader_default(struct Material *ma);
void ED_node_composit_default(struct Scene *sce);
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index 67dc6dada5f..8f74752ec8c 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -28,7 +28,8 @@
#ifndef ED_OBJECT_H
#define ED_OBJECT_H
-struct wmWindowManager;
+struct wmKeyConfig;
+struct wmKeyMap;
struct Scene;
struct Object;
struct bContext;
@@ -44,7 +45,11 @@ struct ModifierData;
/* object_edit.c */
void ED_operatortypes_object(void);
-void ED_keymap_object(struct wmWindowManager *wm);
+void ED_operatormacros_object(void);
+void ED_keymap_object(struct wmKeyConfig *keyconf);
+
+/* generic editmode keys like pet */
+void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int do_pet);
/* send your own notifier for select! */
void ED_base_object_select(struct Base *base, short mode);
@@ -70,6 +75,7 @@ void ED_object_exit_editmode(struct bContext *C, int flag);
void ED_object_enter_editmode(struct bContext *C, int flag);
void ED_object_base_init_from_view(struct bContext *C, struct Base *base);
+struct Object *ED_object_add_type(struct bContext *C, int type);
void ED_object_single_users(struct Scene *scene, int full);
@@ -88,6 +94,8 @@ 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);
+void ED_object_constraint_update(struct Object *ob);
+void ED_object_constraint_dependency_update(struct Scene *scene, struct Object *ob);
/* object_lattice.c */
void mouse_lattice(struct bContext *C, short mval[2], int extend);
diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h
index 28807caa255..fcdaf8cb59d 100644
--- a/source/blender/editors/include/ED_particle.h
+++ b/source/blender/editors/include/ED_particle.h
@@ -36,8 +36,9 @@ struct ParticleEditSettings;
struct ParticleSystem;
struct RadialControl;
struct rcti;
-struct wmWindowManager;
+struct wmKeyConfig;
struct PTCacheEdit;
+struct Scene;
/* particle edit mode */
void PE_free_ptcache_edit(struct PTCacheEdit *edit);
@@ -45,8 +46,10 @@ int PE_start_edit(struct PTCacheEdit *edit);
/* access */
struct PTCacheEdit *PE_get_current(struct Scene *scene, struct Object *ob);
+struct PTCacheEdit *PE_create_current(struct Scene *scene, struct Object *ob);
+void PE_current_changed(struct Scene *scene, struct Object *ob);
int PE_minmax(struct Scene *scene, float *min, float *max);
-struct ParticleEditSettings *PE_settings(Scene *scene);
+struct ParticleEditSettings *PE_settings(struct Scene *scene);
/* update calls */
void PE_hide_keys_time(struct Scene *scene, struct PTCacheEdit *edit, float cfra);
@@ -59,15 +62,11 @@ int PE_circle_select(struct bContext *C, int selecting, short *mval, float rad);
int PE_lasso_select(struct bContext *C, short mcords[][2], short moves, short select);
/* undo */
-void PE_undo_push(Scene *scene, char *str);
-void PE_undo_step(Scene *scene, int step);
-void PE_undo(Scene *scene);
-void PE_redo(Scene *scene);
-void PE_undo_menu(Scene *scene, Object *ob);
-
-/* operators */
-void ED_operatortypes_particle(void);
-void ED_keymap_particle(struct wmWindowManager *wm);
+void PE_undo_push(struct Scene *scene, char *str);
+void PE_undo_step(struct Scene *scene, int step);
+void PE_undo(struct Scene *scene);
+void PE_redo(struct Scene *scene);
+void PE_undo_menu(struct Scene *scene, struct Object *ob);
#endif /* ED_PARTICLE_H */
diff --git a/source/blender/editors/include/ED_physics.h b/source/blender/editors/include/ED_physics.h
index 6ab804230d0..df303d7c9f1 100644
--- a/source/blender/editors/include/ED_physics.h
+++ b/source/blender/editors/include/ED_physics.h
@@ -30,12 +30,11 @@
#ifndef ED_PHYSICS_H
#define ED_PHYSICS_H
-/* operators */
+struct wmKeyConfig;
-void ED_operatortypes_boids(void);
-void ED_operatortypes_pointcache(void);
-void ED_operatortypes_fluid(void);
-//void ED_keymap_pointcache(struct wmWindowManager *wm);
+/* operators */
+void ED_operatortypes_physics(void);
+void ED_keymap_physics(struct wmKeyConfig *keyconf);
#endif /* ED_PHYSICS_H */
diff --git a/source/blender/editors/include/ED_previewrender.h b/source/blender/editors/include/ED_render.h
index 7e0d71db7e1..13028dac1a2 100644
--- a/source/blender/editors/include/ED_previewrender.h
+++ b/source/blender/editors/include/ED_render.h
@@ -21,22 +21,29 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef ED_PREVIEWRENDER_H
-#define ED_PREVIEWRENDER_H
+#ifndef ED_RENDER_H
+#define ED_RENDER_H
#include "DNA_vec_types.h"
-struct View3D;
-struct SpaceButs;
-struct RenderInfo;
-struct Scene;
-struct Image;
-struct Render;
struct bContext;
struct ID;
+struct Main;
struct MTex;
+struct Render;
+struct RenderInfo;
+
+/* render_ops.c */
+
+void ED_operatortypes_render(void);
+
+/* render_shading.c */
+
+void ED_render_id_flush_update(struct Main *bmain, struct ID *id);
+
+/* render_preview.c */
-#define PREVIEW_RENDERSIZE 140
+#define _RENDERSIZE 140
/* stores rendered preview - is also used for icons */
typedef struct RenderInfo {
@@ -57,22 +64,20 @@ typedef struct RenderInfo {
/* Render the preview
pr_method:
-- PR_DRAW_RENDER: preview is rendered and drawn, as indicated by called context (buttons panel)
-- PR_ICON_RENDER: the preview is not drawn and the function is not dynamic,
- so no events are processed. Hopefully fast enough for at least 32x32
-- PR_DO_RENDER: preview is rendered, not drawn, but events are processed for afterqueue,
- in use for node editor now.
+- PR_BUTS_RENDER: preview is rendered for buttons window
+- PR_ICON_RENDER: preview is rendered for icons. hopefully fast enough for at least 32x32
+- PR_NODE_RENDER: preview is rendered for node editor.
*/
-#define PR_DRAW_RENDER 0
+#define PR_BUTS_RENDER 0
#define PR_ICON_RENDER 1
-#define PR_DO_RENDER 2
+#define PR_NODE_RENDER 2
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, struct ID *parent, struct MTex *slot, int sizex, int sizey);
-void ED_preview_iconrender(struct Scene *scene, struct ID *id, unsigned int *rect, int sizex, int sizey);
+void ED_preview_shader_job(const struct bContext *C, void *owner, struct ID *id, struct ID *parent, struct MTex *slot, int sizex, int sizey, int method);
+void ED_preview_icon_job(const struct bContext *C, void *owner, struct ID *id, unsigned int *rect, int sizex, int sizey);
void ED_preview_draw(const struct bContext *C, void *idp, void *parentp, void *slot, rcti *rect);
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 63b6a067389..18c86306e44 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -37,6 +37,7 @@ struct wmWindowManager;
struct wmWindow;
struct wmNotifier;
struct wmEvent;
+struct wmKeyConfig;
struct bContext;
struct SpaceType;
struct Scene;
@@ -63,7 +64,7 @@ void region_scissor_winrct(struct ARegion *ar, struct rcti *winrct);
/* spaces */
void ED_spacetypes_init(void);
-void ED_spacetypes_keymap(struct wmWindowManager *wm);
+void ED_spacetypes_keymap(struct wmKeyConfig *keyconf);
int ED_area_header_switchbutton(const struct bContext *C, struct uiBlock *block, int yco);
int ED_area_header_standardbuttons(const struct bContext *C, struct uiBlock *block, int yco);
void ED_area_overdraw(struct bContext *C);
@@ -107,7 +108,7 @@ void ED_screen_new_window(struct bContext *C, struct rcti *position, int type);
void ED_update_for_newframe(const struct bContext *C, int mute);
void ED_operatortypes_screen(void);
-void ED_keymap_screen(struct wmWindowManager *wm);
+void ED_keymap_screen(struct wmKeyConfig *keyconf);
/* operators; context poll callbacks */
int ED_operator_screenactive(struct bContext *C);
diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h
index c6a8881a0c6..764efb4ef0c 100644
--- a/source/blender/editors/include/ED_sculpt.h
+++ b/source/blender/editors/include/ED_sculpt.h
@@ -29,14 +29,14 @@
#define ED_SCULPT_H
struct bContext;
-struct wmWindowManager;
+struct wmKeyConfig;
/* sculpt.c */
void ED_operatortypes_sculpt(void);
-void ED_keymap_sculpt(struct wmWindowManager *wm);
/* paint_ops.c */
void ED_operatortypes_paint(void);
+void ED_keymap_paint(struct wmKeyConfig *keyconf);
/* paint_image.c */
void undo_imagepaint_step(int step);
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index 984def760ae..e07cbff429a 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -41,8 +41,10 @@ struct Object;
struct uiLayout;
struct EnumPropertyItem;
struct wmOperatorType;
+struct wmKeyMap;
+struct wmKeyConfig;
-void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *keymap, int spaceid);
+void transform_keymap_for_space(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int spaceid);
void transform_operatortypes(void);
/* ******************** Macros & Prototypes *********************** */
@@ -74,7 +76,8 @@ enum {
TFM_BAKE_TIME,
TFM_BEVEL,
TFM_BWEIGHT,
- TFM_ALIGN
+ TFM_ALIGN,
+ TFM_EDGE_SLIDE
} TfmMode;
/* TRANSFORM CONTEXTS */
@@ -109,10 +112,12 @@ int BIF_snappingSupported(struct Object *obedit);
struct TransformOrientation;
struct bContext;
+struct ReportList;
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);
+void BIF_removeTransformOrientationIndex(struct bContext *C, int index);
+void BIF_createTransformOrientation(struct bContext *C, struct ReportList *reports, char *name, int use, int overwrite);
int BIF_menuselectTransformOrientation(void);
void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
void BIF_selectTransformOrientationValue(struct bContext *C, int orientation);
@@ -161,10 +166,10 @@ typedef enum 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);
+int peelObjectsTransForm(struct TransInfo *t, struct ListBase *depth_peels, float mval[2]);
+int peelObjectsContext(struct bContext *C, struct ListBase *depth_peels, float mval[2]);
+int snapObjectsTransform(struct TransInfo *t, float mval[2], int *dist, float *loc, float *no, SnapMode mode);
+int snapObjectsContext(struct bContext *C, float mval[2], int *dist, float *loc, float *no, SnapMode mode);
#endif
diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h
index e75eb751a0b..bf9b95d49d8 100644
--- a/source/blender/editors/include/ED_uvedit.h
+++ b/source/blender/editors/include/ED_uvedit.h
@@ -34,11 +34,11 @@ struct Object;
struct MTFace;
struct EditFace;
struct Image;
-struct wmWindowManager;
+struct wmKeyConfig;
/* uvedit_ops.c */
void ED_operatortypes_uvedit(void);
-void ED_keymap_uvedit(struct wmWindowManager *wm);
+void ED_keymap_uvedit(struct wmKeyConfig *keyconf);
void ED_uvedit_assign_image(struct Scene *scene, struct Object *obedit, struct Image *ima, struct Image *previma);
void ED_uvedit_set_tile(struct bContext *C, struct Scene *scene, struct Object *obedit, struct Image *ima, int curtile, int dotile);
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 07890d88c22..307dbd74872 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -88,8 +88,8 @@ void project_int_noclip(struct ARegion *ar, float *vec, int *adr);
void project_float(struct ARegion *ar, float *vec, float *adr);
void project_float_noclip(struct ARegion *ar, float *vec, float *adr);
-void viewline(struct ARegion *ar, struct View3D *v3d, short mval[2], float ray_start[3], float ray_end[3]);
-void viewray(struct ARegion *ar, struct View3D *v3d, short mval[2], float ray_start[3], float ray_normal[3]);
+void viewline(struct ARegion *ar, struct View3D *v3d, float mval[2], float ray_start[3], float ray_end[3]);
+void viewray(struct ARegion *ar, struct View3D *v3d, float mval[2], float ray_start[3], float ray_normal[3]);
int get_view3d_viewplane(struct View3D *v3d, struct RegionView3D *rv3d, int winxi, int winyi, rctf *viewplane, float *clipsta, float *clipend, float *pixsize);
int get_view3d_ortho(struct View3D *v3d, struct RegionView3D *rv3d);
@@ -134,5 +134,7 @@ int lasso_inside_edge(short mcords[][2], short moves, int x0, int y0, int x1, in
/* get 3d region from context, also if mouse is in header or toolbar */
struct RegionView3D *ED_view3d_context_rv3d(struct bContext *C);
+void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d);
+
#endif /* ED_VIEW3D_H */
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index f16fc9ebe05..e8c99a51bf8 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -33,7 +33,7 @@
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_CANCEL)
DEF_ICON(ICON_TRIA_RIGHT)
DEF_ICON(ICON_TRIA_DOWN)
DEF_ICON(ICON_TRIA_LEFT)
@@ -66,9 +66,9 @@ DEF_ICON(ICON_VIEWZOOM)
DEF_ICON(ICON_ZOOMIN)
DEF_ICON(ICON_ZOOMOUT)
DEF_ICON(ICON_PANEL_CLOSE)
-DEF_ICON(ICON_BLANK009)
+DEF_ICON(ICON_COPY_ID) //ICON_BLANK009
DEF_ICON(ICON_EYEDROPPER)
-DEF_ICON(ICON_BLANK010)
+DEF_ICON(ICON_LINK_AREA) //ICON_BLANK010
DEF_ICON(ICON_AUTO)
DEF_ICON(ICON_CHECKBOX_DEHLT)
DEF_ICON(ICON_CHECKBOX_HLT)
@@ -83,11 +83,11 @@ DEF_ICON(ICON_DOTSUP)
DEF_ICON(ICON_DOTSDOWN)
DEF_ICON(ICON_LINK)
DEF_ICON(ICON_INLINK)
-DEF_ICON(ICON_BLANK012b)
+DEF_ICON(ICON_PLUGIN)
/* various ui */
DEF_ICON(ICON_HELP)
-DEF_ICON(ICON_GHOSTDRAW)
+DEF_ICON(ICON_GHOST_ENABLED)
DEF_ICON(ICON_COLOR)
DEF_ICON(ICON_LINKED)
DEF_ICON(ICON_UNLINKED)
@@ -102,16 +102,16 @@ DEF_ICON(ICON_BORDER_RECT)
DEF_ICON(ICON_BORDER_LASSO)
DEF_ICON(ICON_FREEZE)
DEF_ICON(ICON_STYLUS_PRESSURE)
-DEF_ICON(ICON_BLANK032)
-DEF_ICON(ICON_BLANK033)
-DEF_ICON(ICON_BLANK034)
-DEF_ICON(ICON_BLANK035)
-DEF_ICON(ICON_BLANK036)
+DEF_ICON(ICON_GHOST_DISABLED)
+DEF_ICON(ICON_NEW)
+DEF_ICON(ICON_FILE_TICK)
+DEF_ICON(ICON_QUIT)
+DEF_ICON(ICON_URL)
DEF_ICON(ICON_BLANK037)
DEF_ICON(ICON_BLANK038)
DEF_ICON(ICON_BLANK039)
DEF_ICON(ICON_BLANK040)
-DEF_ICON(ICON_BLANK040b)
+DEF_ICON(ICON_BLANK1) // Not actually blank - this is used all over the place
/* BUTTONS */
DEF_ICON(ICON_LAMP)
@@ -127,7 +127,7 @@ DEF_ICON(ICON_SCRIPT)
DEF_ICON(ICON_PARTICLES)
DEF_ICON(ICON_PHYSICS)
DEF_ICON(ICON_SPEAKER)
-DEF_ICON(ICON_BLANK041)
+DEF_ICON(ICON_TEXTURE_SHADED) //ICON_BLANK041
DEF_ICON(ICON_BLANK042)
DEF_ICON(ICON_BLANK043)
DEF_ICON(ICON_BLANK044)
@@ -236,7 +236,7 @@ DEF_ICON(ICON_SURFACE_DATA)
DEF_ICON(ICON_EMPTY_DATA)
DEF_ICON(ICON_SETTINGS)
DEF_ICON(ICON_RENDER_ANIMATION)
-DEF_ICON(ICON_BLANK080E)
+DEF_ICON(ICON_RENDER_STILL)
DEF_ICON(ICON_BLANK080F)
DEF_ICON(ICON_BOIDS)
DEF_ICON(ICON_STRANDS)
@@ -251,7 +251,7 @@ DEF_ICON(ICON_GROUP_UVS)
DEF_ICON(ICON_BLANK089)
DEF_ICON(ICON_BLANK090)
DEF_ICON(ICON_RNA)
-DEF_ICON(ICON_BLANK090b)
+DEF_ICON(ICON_RNA_ADD)
/* available */
DEF_ICON(ICON_BLANK092)
@@ -665,9 +665,9 @@ 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_BLANK221)
DEF_ICON(ICON_BLANK224)
DEF_ICON(ICON_BLANK225)
DEF_ICON(ICON_BLANK226)
@@ -685,12 +685,12 @@ DEF_ICON(ICON_BLANK230)
DEF_ICON(ICON_BLANK231)
DEF_ICON(ICON_BLANK232)
DEF_ICON(ICON_BLANK233)
-DEF_ICON(ICON_BLANK234)
+DEF_ICON(ICON_RETOPO)
DEF_ICON(ICON_UV_VERTEXSEL)
DEF_ICON(ICON_UV_EDGESEL)
DEF_ICON(ICON_UV_FACESEL)
DEF_ICON(ICON_UV_ISLANDSEL)
-DEF_ICON(ICON_BLANK239)
+DEF_ICON(ICON_UV_SYNC_SELECT)
DEF_ICON(ICON_BLANK240)
DEF_ICON(ICON_BLANK241)
DEF_ICON(ICON_BLANK242)
@@ -801,8 +801,8 @@ 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_BACK)
+DEF_ICON(ICON_FORWARD)
DEF_ICON(ICON_BLANK309)
DEF_ICON(ICON_BLANK310)
DEF_ICON(ICON_BLANK311)
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 77c4e4d3475..bd8214db29b 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -147,6 +147,7 @@ typedef struct uiLayout uiLayout;
#define UI_BUT_INACTIVE (1<<23)
#define UI_BUT_LAST_ACTIVE (1<<24)
#define UI_BUT_UNDO (1<<25)
+#define UI_BUT_IMMEDIATE (1<<26)
#define UI_PANEL_WIDTH 340
#define UI_COMPACT_PANEL_WIDTH 160
@@ -256,6 +257,7 @@ void uiPupMenuSaveOver(struct bContext *C, struct wmOperator *op, char *filename
void uiPupMenuNotice(struct bContext *C, char *str, ...);
void uiPupMenuError(struct bContext *C, char *str, ...);
void uiPupMenuReports(struct bContext *C, struct ReportList *reports);
+void uiPupMenuInvoke(struct bContext *C, const char *idname); /* popup registered menu */
/* Popup Blocks
*
@@ -418,13 +420,13 @@ typedef void (*uiIDPoinFunc)(struct bContext *C, struct ID *id, int event);
uiBut *uiDefIDPoinBut(uiBlock *block, uiIDPoinFuncFP func, short blocktype, int retval, char *str,
short x1, short y1, short x2, short y2, void *idpp, char *tip);
-int uiDefIDPoinButs(uiBlock *block, struct Main *main, struct ID *parid, struct ID *id, int id_code, short *pin_p, int x, int y, uiIDPoinFunc func, int events);
int uiIconFromID(struct ID *id);
uiBut *uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, char *str, short x1, short y1, short x2, short y2, char *tip);
uiBut *uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, char *str, short x1, short y1, short x2, short y2, char *tip);
uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, char *str, short x1, short y1, short x2, short y2, char *tip);
+uiBut *uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, short x1, short y1, short x2, short y2, char *tip);
uiBut *uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *func_arg1, char *str, short x1, short y1, short x2, short y2, char *tip);
uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, char *str, short x1, short y1, short x2, short y2, char *tip);
@@ -432,7 +434,7 @@ uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, char *
uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, short x1, short y1, short x2, short y2, char *tip);
uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int icon, char *str, short x1, short y1, short x2, short y2, char *tip);
-void uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip);
+uiBut *uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip);
uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *keypoin, short *modkeypoin, char *tip);
uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, short x1, short y1, short x2, short y2, char *tip);
@@ -487,6 +489,7 @@ int uiSearchBoxhHeight(void);
void uiBlockSetHandleFunc(uiBlock *block, uiBlockHandleFunc func, void *arg);
void uiBlockSetButmFunc (uiBlock *block, uiMenuHandleFunc func, void *arg);
void uiBlockSetFunc (uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2);
+void uiBlockSetNFunc (uiBlock *block, uiButHandleFunc func, void *argN, void *arg2);
void uiButSetRenameFunc (uiBut *but, uiButHandleRenameFunc func, void *arg1);
void uiButSetFunc (uiBut *but, uiButHandleFunc func, void *arg1, void *arg2);
@@ -530,29 +533,6 @@ void UI_add_region_handlers(struct ListBase *handlers);
void UI_add_area_handlers(struct ListBase *handlers);
void UI_add_popup_handlers(struct bContext *C, struct ListBase *handlers, uiPopupBlockHandle *menu);
-/* Legacy code
- * Callbacks and utils to get 2.48 work */
-
-void test_idbutton_cb(struct bContext *C, void *namev, void *arg2);
-void test_scriptpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_actionpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_obpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_meshobpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_meshpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_matpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_scenepoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_grouppoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_texpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_imapoin_but(struct bContext *C, char *name, struct ID **idpp);
-void autocomplete_bone(struct bContext *C, char *str, void *arg_v);
-void autocomplete_vgroup(struct bContext *C, char *str, void *arg_v);
-
-struct rctf;
-void curvemap_buttons(uiBlock *block, struct CurveMapping *cumap, char labeltype, short event, short redraw, struct rctf *rect);
-void curvemap_layout(uiLayout *layout, struct CurveMapping *cumap, char labeltype, short event, short redraw, struct rctf *rect);
-void colorband_buttons(uiBlock *block, struct ColorBand *coba, struct rctf *rect, int small);
-
-
/* Module
*
* init and exit should be called before using this module. init_userdef must
@@ -593,10 +573,12 @@ void UI_exit(void);
#define UI_ITEM_R_SLIDER 4
#define UI_ITEM_R_TOGGLE 8
#define UI_ITEM_R_ICON_ONLY 16
+#define UI_ITEM_R_EVENT 32
+#define UI_ITEM_R_FULL_EVENT 64
uiLayout *uiBlockLayout(uiBlock *block, int dir, int type, int x, int y, int size, int em, struct uiStyle *style);
void uiBlockSetCurLayout(uiBlock *block, uiLayout *layout);
-void uiBlockLayoutResolve(const struct bContext *C, uiBlock *block, int *x, int *y);
+void uiBlockLayoutResolve(uiBlock *block, int *x, int *y);
uiBlock *uiLayoutGetBlock(uiLayout *layout);
@@ -632,19 +614,24 @@ uiLayout *uiLayoutListBox(uiLayout *layout);
uiLayout *uiLayoutFree(uiLayout *layout, int align);
uiLayout *uiLayoutSplit(uiLayout *layout, float percentage);
-uiBlock *uiLayoutFreeBlock(uiLayout *layout);
+uiBlock *uiLayoutAbsoluteBlock(uiLayout *layout);
/* templates */
void uiTemplateHeader(uiLayout *layout, struct bContext *C, int menus);
void uiTemplateID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
char *newop, char *openop, char *unlinkop);
+void uiTemplateAnyID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
+ char *proptypename, char *text);
+void uiTemplatePathBuilder(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
+ struct PointerRNA *root_ptr, char *text);
uiLayout *uiTemplateModifier(uiLayout *layout, struct PointerRNA *ptr);
uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr);
void uiTemplatePreview(uiLayout *layout, struct ID *id, struct ID *parent, struct MTex *slot);
-void uiTemplateColorRamp(uiLayout *layout, struct ColorBand *coba, int expand);
-void uiTemplateCurveMapping(uiLayout *layout, struct CurveMapping *cumap, int type, int compact);
+void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand);
+void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, char *propname, int type, int levels);
void uiTemplateTriColorSet(uiLayout *layout, struct PointerRNA *ptr, char *propname);
void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, char *propname);
+void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, struct PointerRNA *userptr, int compact);
void uiTemplateImageLayers(uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser);
void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C);
void uiTemplateOperatorSearch(uiLayout *layout);
@@ -691,6 +678,7 @@ void uiItemMenuEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *
/* Helpers for Operators */
void uiAnimContextProperty(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index);
void uiFileBrowseContextProperty(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop);
+void uiIDContextProperty(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop);
/* Styled text draw */
void uiStyleFontSet(struct uiFontStyle *fs);
diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h
index bf160b4ad68..afe6a2b9dcb 100644
--- a/source/blender/editors/include/UI_interface_icons.h
+++ b/source/blender/editors/include/UI_interface_icons.h
@@ -57,9 +57,9 @@ int UI_icon_get_height(int icon_id);
void UI_icon_draw(float x, float y, int icon_id);
void UI_icon_draw_preview(float x, float y, int icon_id, int nocreate);
-void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect);
-void UI_icon_draw_aspect_blended(float x, float y, int icon_id, float aspect, int shade);
-void UI_icon_draw_size_blended(float x, float y, int size, int icon_id, int shade);
+void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect, float alpha);
+void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, float *rgb);
+void UI_icon_draw_size(float x, float y, int size, int icon_id, float alpha);
void UI_icons_free();
void UI_icons_free_drawinfo(void *drawinfo);
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index 38c4d82e6da..8fbff25589d 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -128,7 +128,7 @@ struct View2D;
struct View2DGrid;
struct View2DScrollers;
-struct wmWindowManager;
+struct wmKeyConfig;
struct bScreen;
struct ScrArea;
struct ARegion;
@@ -196,7 +196,7 @@ void UI_view2d_text_cache_draw(struct ARegion *ar);
/* operators */
void ui_view2d_operatortypes(void);
-void UI_view2d_keymap(struct wmWindowManager *wm);
+void UI_view2d_keymap(struct wmKeyConfig *keyconf);
#endif /* UI_VIEW2D_H */
diff --git a/source/blender/editors/interface/SConscript b/source/blender/editors/interface/SConscript
index e44de5410f1..bca0350d4fc 100644
--- a/source/blender/editors/interface/SConscript
+++ b/source/blender/editors/interface/SConscript
@@ -16,4 +16,7 @@ defs = []
if env['WITH_BF_INTERNATIONAL']:
defs.append('INTERNATIONAL')
-env.BlenderLib ( 'bf_editors_interface', sources, Split(incs), Split(defs), libtype=['core'], priority=[110] )
+if not env['WITH_BF_PYTHON']:
+ defs.append('DISABLE_PYTHON')
+
+env.BlenderLib ( 'bf_editors_interface', sources, Split(incs), defs, libtype=['core'], priority=[110] )
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 221618b340e..fcc41e4f533 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -597,7 +597,7 @@ void uiEndBlock(const bContext *C, uiBlock *block)
if(but->context)
CTX_store_set((bContext*)C, but->context);
- if(ot==NULL || (ot->poll && ot->poll((bContext *)C)==0)) {
+ if(ot == NULL || WM_operator_poll((bContext*)C, ot)==0) {
but->flag |= UI_BUT_DISABLED;
but->lock = 1;
}
@@ -622,7 +622,7 @@ void uiEndBlock(const bContext *C, uiBlock *block)
}
/* handle pending stuff */
- if(block->layouts.first) uiBlockLayoutResolve(C, block, NULL, NULL);
+ if(block->layouts.first) uiBlockLayoutResolve(block, NULL, NULL);
ui_block_do_align(block);
if(block->flag & UI_BLOCK_LOOP) ui_menu_block_set_keymaps(C, block);
@@ -1684,6 +1684,9 @@ void uiFreeBlock(const bContext *C, uiBlock *block)
ui_free_but(C, but);
}
+ if(block->func_argN)
+ MEM_freeN(block->func_argN);
+
CTX_store_free_list(&block->contexts);
BLI_freelistN(&block->saferct);
@@ -1955,7 +1958,10 @@ void ui_check_but(uiBut *but)
if (but->flag & UI_SELECT) {
short *sp= (short *)but->func_arg3;
- strcpy(but->drawstr, but->str);
+ if(but->flag & UI_BUT_IMMEDIATE)
+ strcpy(but->drawstr, but->str);
+ else
+ strcpy(but->drawstr, "");
if(*sp) {
char *str= but->drawstr;
@@ -1971,10 +1977,10 @@ void ui_check_but(uiBut *but)
}
else
strcat(but->drawstr, "Press a key ");
- } else {
- /* XXX todo, button currently only used temporarily */
- strcpy(but->drawstr, WM_key_event_string((short) ui_get_but_val(but)));
}
+ else
+ strcpy(but->drawstr, but->str);
+
break;
case BUT_TOGDUAL:
@@ -2232,6 +2238,10 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short
but->func= block->func;
but->func_arg1= block->func_arg1;
but->func_arg2= block->func_arg2;
+
+ but->funcN= block->funcN;
+ if(block->func_argN)
+ but->func_argN= MEM_dupallocN(block->func_argN);
but->pos= -1; /* cursor invisible */
@@ -2264,8 +2274,9 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short
}
}
- if(!ELEM7(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, SEARCH_MENU))
- but->flag |= UI_BUT_UNDO;
+ if(ELEM8(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, SEARCH_MENU, BUTM));
+ else if(ELEM5(but->type, SCROLL, SEPR, LINK, INLINK, FTPREVIEW));
+ else but->flag |= UI_BUT_UNDO;
BLI_addtail(&block->buttons, but);
@@ -2945,6 +2956,16 @@ void uiBlockSetFunc(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2
block->func_arg2= arg2;
}
+void uiBlockSetNFunc(uiBlock *block, uiButHandleFunc func, void *argN, void *arg2)
+{
+ if(block->func_argN)
+ MEM_freeN(block->func_argN);
+
+ block->funcN= func;
+ block->func_argN= argN;
+ block->func_arg2= arg2;
+}
+
void uiButSetRenameFunc(uiBut *but, uiButHandleRenameFunc func, void *arg1)
{
but->rename_func= func;
@@ -2967,6 +2988,9 @@ void uiButSetFunc(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2)
void uiButSetNFunc(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2)
{
+ if(but->func_argN)
+ MEM_freeN(but->func_argN);
+
but->funcN= funcN;
but->func_argN= argN;
but->func_arg2= arg2;
@@ -3003,6 +3027,8 @@ uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, char *
{
uiBut *but= ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, NULL, 0.0, 0.0, 0.0, 0.0, tip);
but->block_create_func= func;
+ if(but->func_argN)
+ MEM_freeN(but->func_argN);
but->func_argN= argN;
ui_check_but(but);
return but;
@@ -3041,6 +3067,20 @@ uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, in
return but;
}
+uiBut *uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, short x1, short y1, short x2, short y2, char *tip)
+{
+ uiBut *but= ui_def_but(block, PULLDOWN, 0, "", x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip);
+
+ but->icon= (BIFIconID) icon;
+ but->flag |= UI_HAS_ICON;
+ but->flag &=~ UI_ICON_LEFT;
+
+ but->menu_create_func= func;
+ ui_check_but(but);
+
+ return but;
+}
+
/* Block button containing both string label and icon */
uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int icon, char *str, short x1, short y1, short x2, short y2, char *tip)
{
@@ -3076,10 +3116,11 @@ uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int
return but;
}
-void uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip)
+uiBut *uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip)
{
uiBut *but= ui_def_but(block, KEYEVT|SHO, retval, str, x1, y1, x2, y2, spoin, 0.0, 0.0, 0.0, 0.0, tip);
ui_check_but(but);
+ return but;
}
/* short pointers hardcoded */
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index 8c41726b81b..ca7401c36be 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -209,6 +209,18 @@ void ui_but_anim_remove_driver(bContext *C)
WM_operator_name_call(C, "ANIM_OT_remove_driver_button", WM_OP_INVOKE_DEFAULT, NULL);
}
+void ui_but_anim_copy_driver(bContext *C)
+{
+ /* this operator calls uiAnimContextProperty above */
+ WM_operator_name_call(C, "ANIM_OT_copy_driver_button", WM_OP_INVOKE_DEFAULT, NULL);
+}
+
+void ui_but_anim_paste_driver(bContext *C)
+{
+ /* this operator calls uiAnimContextProperty above */
+ WM_operator_name_call(C, "ANIM_OT_paste_driver_button", WM_OP_INVOKE_DEFAULT, NULL);
+}
+
void ui_but_anim_add_keyingset(bContext *C)
{
/* this operator calls uiAnimContextProperty above */
@@ -264,6 +276,10 @@ void ui_but_anim_menu(bContext *C, uiBut *but)
}
else
uiItemBooleanO(layout, "Delete Driver", 0, "ANIM_OT_remove_driver_button", "all", 0);
+
+ uiItemO(layout, "Copy Driver", 0, "ANIM_OT_copy_driver_button");
+ if (ANIM_driver_can_paste())
+ uiItemO(layout, "Paste Driver", 0, "ANIM_OT_paste_driver_button");
}
else if(but->flag & UI_BUT_ANIMATED_KEY);
else if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) {
@@ -275,6 +291,9 @@ void ui_but_anim_menu(bContext *C, uiBut *but)
}
else
uiItemBooleanO(layout, "Add Driver", 0, "ANIM_OT_add_driver_button", "all", 0);
+
+ if (ANIM_driver_can_paste())
+ uiItemO(layout, "Paste Driver", 0, "ANIM_OT_paste_driver_button");
}
if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) {
@@ -290,7 +309,11 @@ void ui_but_anim_menu(bContext *C, uiBut *but)
uiItemO(layout, "Remove from Keying Set", 0, "ANIM_OT_remove_keyingset_button");
}
}
-
+
+ uiItemS(layout);
+
+ uiItemO(layout, "Copy Data Path", 0, "ANIM_OT_copy_clipboard_button");
+
uiPupMenuEnd(C, pup);
}
}
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 152695c9162..479c72304b2 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -230,6 +230,15 @@ static uiBut *ui_but_last(uiBlock *block)
return NULL;
}
+static int ui_is_a_warp_but(uiBut *but)
+{
+ if(U.uiflag & USER_CONTINUOUS_MOUSE)
+ if(ELEM(but->type, NUM, NUMABS))
+ return TRUE;
+
+ return FALSE;
+}
+
/* ********************** button apply/revert ************************/
static ListBase UIAfterFuncs = {NULL, NULL};
@@ -246,7 +255,13 @@ static void ui_apply_but_func(bContext *C, uiBut *but)
if(but->func || but->funcN || block->handle_func || but->rename_func || (but->type == BUTM && block->butm_func) || but->optype || but->rnaprop) {
after= MEM_callocN(sizeof(uiAfterFunc), "uiAfterFunc");
- after->func= but->func;
+ if(but->func && ELEM(but, but->func_arg1, but->func_arg2)) {
+ /* exception, this will crash due to removed button otherwise */
+ but->func(C, but->func_arg1, but->func_arg2);
+ }
+ else
+ after->func= but->func;
+
after->func_arg1= but->func_arg1;
after->func_arg2= but->func_arg2;
after->func_arg3= but->func_arg3;
@@ -849,6 +864,7 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
ui_apply_but_CHARTAB(C, but, data);
break;
#endif
+ case KEYEVT:
case HOTKEYEVT:
ui_apply_but_BUT(C, but, data);
break;
@@ -1653,7 +1669,7 @@ static void ui_do_but_textedit_select(bContext *C, uiBlock *block, uiBut *but, u
break;
}
case LEFTMOUSE:
- if(event->val == 0)
+ if(event->val == KM_RELEASE)
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
retval= WM_UI_HANDLER_BREAK;
break;
@@ -1842,6 +1858,7 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data
if(data->state == BUTTON_STATE_HIGHLIGHT) {
if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
but->drawstr[0]= 0;
+ *(short *)but->func_arg3= 0;
button_activate_state(C, but, BUTTON_STATE_WAIT_KEY_EVENT);
return WM_UI_HANDLER_BREAK;
}
@@ -1852,9 +1869,12 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data
if(event->type == MOUSEMOVE)
return WM_UI_HANDLER_CONTINUE;
- if(ELEM(event->type, ESCKEY, LEFTMOUSE)) {
+ if(event->type == ESCKEY) {
/* data->cancel doesnt work, this button opens immediate */
- ui_set_but_val(but, 0);
+ if(but->flag & UI_BUT_IMMEDIATE)
+ ui_set_but_val(but, 0);
+ else
+ data->cancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
}
@@ -1964,6 +1984,51 @@ static int ui_do_but_EXIT(bContext *C, uiBut *but, uiHandleButtonData *data, wmE
return WM_UI_HANDLER_CONTINUE;
}
+/* var names match ui_numedit_but_NUM */
+static float ui_numedit_apply_snapf(float tempf, float softmin, float softmax, float softrange, int snap)
+{
+ if(tempf==softmin || tempf==softmax)
+ return tempf;
+
+ switch(snap) {
+ case 0:
+ break;
+ case 1:
+ if(tempf==softmin || tempf==softmax) { }
+ else if(softrange < 2.10) tempf= 0.1*floor(10*tempf);
+ else if(softrange < 21.0) tempf= floor(tempf);
+ else tempf= 10.0*floor(tempf/10.0);
+ break;
+ case 2:
+ if(tempf==softmin || tempf==softmax) { }
+ else if(softrange < 2.10) tempf= 0.01*floor(100.0*tempf);
+ else if(softrange < 21.0) tempf= 0.1*floor(10.0*tempf);
+ else tempf= floor(tempf);
+ break;
+ }
+
+ return tempf;
+}
+
+static float ui_numedit_apply_snap(int temp, float softmin, float softmax, int snap)
+{
+ if(temp==softmin || temp==softmax)
+ return temp;
+
+ switch(snap) {
+ case 0:
+ break;
+ case 1:
+ temp= 10*(temp/10);
+ break;
+ case 2:
+ temp= 100*(temp/100);
+ break;
+ }
+
+ return temp;
+}
+
static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, int snap, int mx)
{
float deler, tempf, softmin, softmax, softrange;
@@ -1986,84 +2051,101 @@ static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, i
softmax= but->softmax;
softrange= softmax - softmin;
- deler= 500;
- if(!ui_is_but_float(but)) {
- if((softrange)<100) deler= 200.0;
- if((softrange)<25) deler= 50.0;
- }
- deler /= fac;
- if(ui_is_but_float(but) && softrange > 11) {
- /* non linear change in mouse input- good for high precicsion */
- data->dragf+= (((float)(mx-data->draglastx))/deler) * (fabs(data->dragstartx-mx)*0.002);
- } else if (!ui_is_but_float(but) && softrange > 129) { /* only scale large int buttons */
- /* non linear change in mouse input- good for high precicsionm ints need less fine tuning */
- data->dragf+= (((float)(mx-data->draglastx))/deler) * (fabs(data->dragstartx-mx)*0.004);
- } else {
- /*no scaling */
- data->dragf+= ((float)(mx-data->draglastx))/deler ;
- }
+ if(ui_is_a_warp_but(but)) {
+ /* Mouse location isn't screen clamped to the screen so use a linear mapping
+ * 2px == 1-int, or 1px == 1-ClickStep */
+ if(ui_is_but_float(but)) {
+ tempf = data->startvalue + ((mx - data->dragstartx) * fac * 0.01*but->a1);
+ tempf= ui_numedit_apply_snapf(tempf, softmin, softmax, softrange, snap);
+ CLAMP(tempf, softmin, softmax);
- if(data->dragf>1.0) data->dragf= 1.0;
- if(data->dragf<0.0) data->dragf= 0.0;
- data->draglastx= mx;
- tempf= (softmin + data->dragf*softrange);
-
- if(!ui_is_but_float(but)) {
- temp= floor(tempf+.5);
-
- if(tempf==softmin || tempf==softmax);
- else if(snap) {
- if(snap == 2) temp= 100*(temp/100);
- else temp= 10*(temp/10);
+ if(tempf != data->value) {
+ data->dragchange= 1;
+ data->value= tempf;
+ changed= 1;
+ }
}
+ else {
+ temp= data->startvalue + (mx - data->dragstartx)/2; /* simple 2px == 1 */
+ temp= ui_numedit_apply_snap(temp, softmin, softmax, snap);
+ CLAMP(temp, softmin, softmax);
- CLAMP(temp, softmin, softmax);
- lvalue= (int)data->value;
-
- if(temp != lvalue) {
- data->dragchange= 1;
- data->value= (double)temp;
- changed= 1;
+ if(temp != data->value) {
+ data->dragchange= 1;
+ data->value= temp;
+ changed= 1;
+ }
}
}
else {
- temp= 0;
+ /* Use a non-linear mapping of the mouse drag especially for large floats (normal behavior) */
+ deler= 500;
+ if(!ui_is_but_float(but)) {
+ if((softrange)<100) deler= 200.0;
+ if((softrange)<25) deler= 50.0;
+ }
+ deler /= fac;
- if(snap) {
- if(snap == 2) {
- if(tempf==softmin || tempf==softmax);
- else if(softrange < 2.10) tempf= 0.01*floor(100.0*tempf);
- else if(softrange < 21.0) tempf= 0.1*floor(10.0*tempf);
- else tempf= floor(tempf);
- }
- else {
- if(tempf==softmin || tempf==softmax);
- else if(softrange < 2.10) tempf= 0.1*floor(10*tempf);
- else if(softrange < 21.0) tempf= floor(tempf);
- else tempf= 10.0*floor(tempf/10.0);
+ if(ui_is_but_float(but) && softrange > 11) {
+ /* non linear change in mouse input- good for high precicsion */
+ data->dragf+= (((float)(mx-data->draglastx))/deler) * (fabs(data->dragstartx-mx)*0.002);
+ } else if (!ui_is_but_float(but) && softrange > 129) { /* only scale large int buttons */
+ /* non linear change in mouse input- good for high precicsionm ints need less fine tuning */
+ data->dragf+= (((float)(mx-data->draglastx))/deler) * (fabs(data->dragstartx-mx)*0.004);
+ } else {
+ /*no scaling */
+ data->dragf+= ((float)(mx-data->draglastx))/deler ;
+ }
+
+ if(data->dragf>1.0) data->dragf= 1.0;
+ if(data->dragf<0.0) data->dragf= 0.0;
+ data->draglastx= mx;
+ tempf= (softmin + data->dragf*softrange);
+
+
+ if(!ui_is_but_float(but)) {
+ temp= floor(tempf+.5);
+
+ temp= ui_numedit_apply_snap(temp, softmin, softmax, snap);
+
+ CLAMP(temp, softmin, softmax);
+ lvalue= (int)data->value;
+
+ if(temp != lvalue) {
+ data->dragchange= 1;
+ data->value= (double)temp;
+ changed= 1;
}
}
+ else {
+ temp= 0;
+ tempf= ui_numedit_apply_snapf(tempf, softmin, softmax, softrange, snap);
- CLAMP(tempf, softmin, softmax);
+ CLAMP(tempf, softmin, softmax);
- if(tempf != data->value) {
- data->dragchange= 1;
- data->value= tempf;
- changed= 1;
+ if(tempf != data->value) {
+ data->dragchange= 1;
+ data->value= tempf;
+ changed= 1;
+ }
}
}
+
return changed;
}
static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event)
{
- int mx, my, click= 0;
+ int mx, my; /* mouse location scaled to fit the UI */
+ int screen_mx, screen_my; /* mouse location kept at screen pixel coords */
+ int click= 0;
int retval= WM_UI_HANDLER_CONTINUE;
- mx= event->x;
- my= event->y;
+ mx= screen_mx= event->x;
+ my= screen_my= event->y;
+
ui_window_to_block(data->region, block, &mx, &my);
if(data->state == BUTTON_STATE_HIGHLIGHT) {
@@ -2082,8 +2164,7 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
retval= WM_UI_HANDLER_BREAK;
}
else if(event->type == LEFTMOUSE) {
- data->dragstartx= mx;
- data->draglastx= mx;
+ data->dragstartx= data->draglastx= ui_is_a_warp_but(but) ? screen_mx:mx;
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
retval= WM_UI_HANDLER_BREAK;
}
@@ -2116,13 +2197,13 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
wmTabletData *wmtab= event->customdata;
/* de-sensitise based on tablet pressure */
- if (ELEM(wmtab->Active, DEV_STYLUS, DEV_ERASER))
+ if (wmtab->Active != EVT_TABLET_NONE)
fac *= wmtab->Pressure;
}
snap= (event->ctrl)? (event->shift)? 2: 1: 0;
- if(ui_numedit_but_NUM(but, data, fac, snap, mx))
+ if(ui_numedit_but_NUM(but, data, fac, snap, (ui_is_a_warp_but(but) ? screen_mx:mx)))
ui_numedit_apply(C, block, but, data);
}
retval= WM_UI_HANDLER_BREAK;
@@ -2297,6 +2378,15 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
retval= WM_UI_HANDLER_BREAK;
}
+ /* alt-click on sides to get "arrows" like in NUM buttons, and match wheel usage above */
+ else if(event->type == LEFTMOUSE && event->alt) {
+ int halfpos = (but->x1 + but->x2) / 2;
+ click = 2;
+ if (mx < halfpos)
+ mx = but->x1;
+ else
+ mx = but->x2;
+ }
else if(event->type == LEFTMOUSE) {
data->dragstartx= mx;
data->draglastx= mx;
@@ -2349,6 +2439,7 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
tempf= data->value;
temp= (int)data->value;
+ /* XXX useles "if", same result for f, uh??? */
if(but->type==SLI) f= (float)(mx-but->x1)/(but->x2-but->x1);
else f= (float)(mx- but->x1)/(but->x2-but->x1);
@@ -3247,6 +3338,7 @@ static uiBlock *menu_change_hotkey(bContext *C, ARegion *ar, void *arg_but)
strcat(buf, " |");
but= uiDefHotKeyevtButS(block, 0, buf, 0, 0, 200, 20, dummy, dummy+1, "");
+ uiButSetFlag(but, UI_BUT_IMMEDIATE);
uiButSetFunc(but, do_menu_change_hotkey, arg_but, dummy);
uiPopupBoundsBlock(block, 6.0f, 50, -10);
@@ -3264,7 +3356,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
retval= WM_UI_HANDLER_CONTINUE;
if(but->flag & UI_BUT_DISABLED)
- return WM_UI_HANDLER_BREAK;
+ return WM_UI_HANDLER_CONTINUE;
if(data->state == BUTTON_STATE_HIGHLIGHT) {
/* handle copy-paste */
@@ -3629,11 +3721,15 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
ui_textedit_end(C, but, data);
/* number editing */
- if(state == BUTTON_STATE_NUM_EDITING)
+ if(state == BUTTON_STATE_NUM_EDITING) {
+ if(ui_is_a_warp_but(but))
+ WM_cursor_grab(CTX_wm_window(C), TRUE);
ui_numedit_begin(but, data);
- else if(data->state == BUTTON_STATE_NUM_EDITING)
+ } else if(data->state == BUTTON_STATE_NUM_EDITING) {
ui_numedit_end(but, data);
-
+ if(ui_is_a_warp_but(but))
+ WM_cursor_ungrab(CTX_wm_window(C), FALSE);
+ }
/* menu open */
if(state == BUTTON_STATE_MENU_OPEN)
ui_blockopen_begin(C, but, data);
@@ -3654,11 +3750,11 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
if(!(but->block->handle && but->block->handle->popup)) {
if(button_modal_state(state)) {
if(!button_modal_state(data->state))
- WM_event_add_ui_handler(C, &data->window->handlers, ui_handler_region_menu, NULL, data);
+ WM_event_add_ui_handler(C, &data->window->modalhandlers, ui_handler_region_menu, NULL, data);
}
else {
if(button_modal_state(data->state))
- WM_event_remove_ui_handler(&data->window->handlers, ui_handler_region_menu, NULL, data);
+ WM_event_remove_ui_handler(&data->window->modalhandlers, ui_handler_region_menu, NULL, data);
}
}
@@ -3700,8 +3796,11 @@ static void button_activate_init(bContext *C, ARegion *ar, uiBut *but, uiButtonA
button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT);
/* activate right away */
- if(but->type==HOTKEYEVT)
- button_activate_state(C, but, BUTTON_STATE_WAIT_KEY_EVENT);
+ if(but->flag & UI_BUT_IMMEDIATE) {
+ if(but->type==HOTKEYEVT)
+ button_activate_state(C, but, BUTTON_STATE_WAIT_KEY_EVENT);
+ /* .. more to be added here */
+ }
if(type == BUTTON_ACTIVATE_OPEN) {
button_activate_state(C, but, BUTTON_STATE_MENU_OPEN);
@@ -4223,28 +4322,20 @@ int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu,
if(event->val==KM_PRESS) {
but= ui_but_find_activated(ar);
if(but) {
- if(ELEM(event->type, DOWNARROWKEY, WHEELDOWNMOUSE)) {
- if(block->direction & UI_TOP) but= ui_but_prev(but);
- else but= ui_but_next(but);
- }
- else {
- if(block->direction & UI_TOP) but= ui_but_next(but);
- else but= ui_but_prev(but);
- }
+ if(ELEM(event->type, DOWNARROWKEY, WHEELDOWNMOUSE))
+ but= ui_but_next(but);
+ else
+ but= ui_but_prev(but);
if(but)
ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE);
}
if(!but) {
- if(ELEM(event->type, UPARROWKEY, WHEELUPMOUSE)) {
- if(block->direction & UI_TOP) bt= ui_but_first(block);
- else bt= ui_but_last(block);
- }
- else {
- if(block->direction & UI_TOP) bt= ui_but_last(block);
- else bt= ui_but_first(block);
- }
+ if(ELEM(event->type, UPARROWKEY, WHEELUPMOUSE))
+ bt= ui_but_last(block);
+ else
+ bt= ui_but_first(block);
if(bt)
ui_handle_button_activate(C, ar, bt, BUTTON_ACTIVATE);
@@ -4594,7 +4685,7 @@ static int ui_handler_popup(bContext *C, wmEvent *event, void *userdata)
uiPopupBlockHandle temp= *menu;
ui_popup_block_free(C, menu);
- WM_event_remove_ui_handler(&CTX_wm_window(C)->handlers, ui_handler_popup, ui_handler_remove_popup, menu);
+ WM_event_remove_ui_handler(&CTX_wm_window(C)->modalhandlers, ui_handler_popup, ui_handler_remove_popup, menu);
if(temp.menuretval == UI_RETURN_OK) {
if(temp.popup_func)
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 6c4110c8c37..1153c475339 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -47,6 +47,7 @@
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
+#include "BKE_context.h"
#include "BKE_image.h"
#include "BKE_icons.h"
#include "BKE_utildefines.h"
@@ -58,7 +59,7 @@
#include "BIF_glutil.h"
#include "ED_datafiles.h"
-#include "ED_previewrender.h"
+#include "ED_render.h"
#include "UI_interface.h"
#include "UI_interface_icons.h"
@@ -85,23 +86,45 @@ typedef struct IconImage {
typedef void (*VectorDrawFunc)(int x, int y, int w, int h, float alpha);
+#define ICON_TYPE_PREVIEW 0
+#define ICON_TYPE_TEXTURE 1
+#define ICON_TYPE_BUFFER 2
+#define ICON_TYPE_VECTOR 3
+
typedef struct DrawInfo {
+ int type;
+
+ union {
+ /* type specific data */
+ struct {
+ VectorDrawFunc func;
+ } vector;
+ struct {
+ IconImage* image;
+ } buffer;
+ struct {
+ int x, y, w, h;
+ } texture;
+ } data;
+} DrawInfo;
+
+typedef struct IconTexture {
+ GLuint id;
int w;
int h;
- float aspect;
- VectorDrawFunc drawFunc; /* If drawFunc is defined then it is a vector icon, otherwise use rect */
- IconImage* icon;
-} DrawInfo;
+ float invw;
+ float invh;
+} IconTexture;
/* ******************* STATIC LOCAL VARS ******************* */
/* static here to cache results of icon directory scan, so it's not
* scanning the filesystem each time the menu is drawn */
static struct ListBase iconfilelist = {0, 0};
-
+static IconTexture icongltex = {0, 0, 0, 0.0f, 0.0f};
/* **************************************************** */
-static void def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int size)
+static void def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int size, int type)
{
Icon *new_icon = NULL;
IconImage *iimg = NULL;
@@ -115,23 +138,28 @@ static void def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int
new_icon->type = 0;
di = MEM_callocN(sizeof(DrawInfo), "drawinfo");
- di->drawFunc = 0;
- di->w = size;
- di->h = size;
- di->aspect = 1.0f;
-
- iimg = MEM_mallocN(sizeof(IconImage), "icon_img");
- iimg->rect = MEM_mallocN(size*size*sizeof(unsigned int), "icon_rect");
- iimg->w = size;
- iimg->h = size;
-
- /* Here we store the rect in the icon - same as before */
- imgsize = bbuf->x;
- for (y=0; y<size; y++) {
- memcpy(&iimg->rect[y*size], &bbuf->rect[(y+yofs)*imgsize+xofs], size*sizeof(int));
- }
+ di->type= type;
+
+ if(type == ICON_TYPE_TEXTURE) {
+ di->data.texture.x= xofs;
+ di->data.texture.y= yofs;
+ di->data.texture.w= size;
+ di->data.texture.h= size;
+ }
+ else if(type == ICON_TYPE_BUFFER) {
+ iimg = MEM_mallocN(sizeof(IconImage), "icon_img");
+ iimg->rect = MEM_mallocN(size*size*sizeof(unsigned int), "icon_rect");
+ iimg->w = size;
+ iimg->h = size;
+
+ /* Here we store the rect in the icon - same as before */
+ imgsize = bbuf->x;
+ for (y=0; y<size; y++) {
+ memcpy(&iimg->rect[y*size], &bbuf->rect[(y+yofs)*imgsize+xofs], size*sizeof(int));
+ }
- di->icon = iimg;
+ di->data.buffer.image = iimg;
+ }
new_icon->drawinfo_free = UI_icons_free_drawinfo;
new_icon->drawinfo = di;
@@ -150,11 +178,8 @@ static void def_internal_vicon( int icon_id, VectorDrawFunc drawFunc)
new_icon->type = 0;
di = MEM_callocN(sizeof(DrawInfo), "drawinfo");
- di->drawFunc =drawFunc;
- di->w = ICON_DEFAULT_HEIGHT;
- di->h = ICON_DEFAULT_HEIGHT;
- di->aspect = 1.0f;
- di->icon = NULL;
+ di->type= ICON_TYPE_VECTOR;
+ di->data.vector.func =drawFunc;
new_icon->drawinfo_free = 0;
new_icon->drawinfo = di;
@@ -430,7 +455,7 @@ static void init_internal_icons()
{
bTheme *btheme= U.themes.first;
ImBuf *bbuf= NULL;
- int x, y;
+ int x, y, icontype;
char iconfilestr[FILE_MAXDIR+FILE_MAXFILE];
char filenamestr[FILE_MAXFILE+16]; // 16 == strlen(".blender/icons/")+1
@@ -450,17 +475,54 @@ static void init_internal_icons()
printf("\n***WARNING***\nIcons file %s too small.\nUsing built-in Icons instead\n", iconfilestr);
IMB_freeImBuf(bbuf);
bbuf= NULL;
+ }
}
}
- }
if(bbuf==NULL)
bbuf = IMB_ibImageFromMemory((int *)datatoc_blenderbuttons, datatoc_blenderbuttons_size, IB_rect);
+ if(bbuf) {
+ /* free existing texture if any */
+ if(icongltex.id) {
+ glDeleteTextures(1, &icongltex.id);
+ icongltex.id= 0;
+ }
+
+ /* we only use a texture for cards with non-power of two */
+ if(GLEW_ARB_texture_non_power_of_two) {
+ glGenTextures(1, &icongltex.id);
+
+ if(icongltex.id) {
+ icongltex.w = bbuf->x;
+ icongltex.h = bbuf->y;
+ icongltex.invw = 1.0f/bbuf->x;
+ icongltex.invh = 1.0f/bbuf->y;
+
+ glBindTexture(GL_TEXTURE_2D, icongltex.id);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bbuf->x, bbuf->y, 0, GL_RGBA, GL_UNSIGNED_BYTE, bbuf->rect);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glBindTexture(GL_TEXTURE_2D, 0);
+
+ if(glGetError() == GL_OUT_OF_MEMORY) {
+ glDeleteTextures(1, &icongltex.id);
+ icongltex.id= 0;
+ }
+ }
+ }
+ }
+
+ if(icongltex.id)
+ icontype= ICON_TYPE_TEXTURE;
+ else
+ icontype= ICON_TYPE_BUFFER;
+
for (y=0; y<ICON_GRID_ROWS; y++) {
for (x=0; x<ICON_GRID_COLS; x++) {
def_internal_icon(bbuf, BIFICONID_FIRST + y*ICON_GRID_COLS + x,
x*(ICON_GRID_W+ICON_GRID_MARGIN)+ICON_GRID_MARGIN,
- y*(ICON_GRID_H+ICON_GRID_MARGIN)+ICON_GRID_MARGIN, ICON_GRID_W);
+ y*(ICON_GRID_H+ICON_GRID_MARGIN)+ICON_GRID_MARGIN, ICON_GRID_W,
+ icontype);
}
}
@@ -587,6 +649,11 @@ ListBase *UI_iconfile_list(void)
void UI_icons_free()
{
+ if(icongltex.id) {
+ glDeleteTextures(1, &icongltex.id);
+ icongltex.id= 0;
+ }
+
free_iconfile_list(&iconfilelist);
BKE_icons_free();
}
@@ -595,12 +662,14 @@ void UI_icons_free_drawinfo(void *drawinfo)
{
DrawInfo *di = drawinfo;
- if (di)
- {
- if (di->icon) {
- MEM_freeN(di->icon->rect);
- MEM_freeN(di->icon);
+ if(di) {
+ if(di->type == ICON_TYPE_BUFFER) {
+ if(di->data.buffer.image) {
+ MEM_freeN(di->data.buffer.image->rect);
+ MEM_freeN(di->data.buffer.image);
+ }
}
+
MEM_freeN(di);
}
}
@@ -610,12 +679,7 @@ static DrawInfo *icon_create_drawinfo()
DrawInfo *di = NULL;
di = MEM_callocN(sizeof(DrawInfo), "di_icon");
-
- di->drawFunc = 0;
- di->w = ICON_DEFAULT_HEIGHT;
- di->h = ICON_DEFAULT_HEIGHT;
- di->icon = NULL;
- di->aspect = 1.0f;
+ di->type= ICON_TYPE_PREVIEW;
return di;
}
@@ -639,7 +703,7 @@ int UI_icon_get_width(int icon_id)
}
if (di)
- return di->w;
+ return ICON_DEFAULT_HEIGHT;
return 0;
}
@@ -664,7 +728,7 @@ int UI_icon_get_height(int icon_id)
}
if (di)
- return di->h;
+ return ICON_DEFAULT_HEIGHT;
return 0;
}
@@ -676,56 +740,6 @@ void UI_icons_init(int first_dyn_id)
init_internal_icons();
}
-static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned int *rect)
-{
- struct ImBuf *ima;
- unsigned int *drect, *srect;
- float scaledx, scaledy;
- short ex, ey, dx, dy;
-
- /* paranoia test */
- if(ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL))
- return;
-
- /* waste of cpu cyles... but the imbuf API has no other way to scale fast (ton) */
- ima = IMB_dupImBuf(ibuf);
-
- if (!ima)
- return;
-
- if (ima->x > ima->y) {
- scaledx = (float)w;
- scaledy = ( (float)ima->y/(float)ima->x )*(float)w;
- }
- else {
- scaledx = ( (float)ima->x/(float)ima->y )*(float)h;
- scaledy = (float)h;
- }
-
- ex = (short)scaledx;
- ey = (short)scaledy;
-
- dx = (w - ex) / 2;
- dy = (h - ey) / 2;
-
- IMB_scalefastImBuf(ima, ex, ey);
-
- /* if needed, convert to 32 bits */
- if(ima->rect==NULL)
- IMB_rect_from_float(ima);
-
- srect = ima->rect;
- drect = rect;
-
- drect+= dy*w+dx;
- for (;ey > 0; ey--){
- memcpy(drect,srect, ex * sizeof(int));
- drect += w;
- srect += ima->x;
- }
- IMB_freeImBuf(ima);
-}
-
/* Render size for preview images at level miplevel */
static int preview_render_size(int miplevel)
{
@@ -751,113 +765,39 @@ static void icon_create_mipmap(struct PreviewImage* prv_img, int miplevel)
}
}
-/* create single icon from jpg, png etc. */
-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;
-
- /* 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, &iuser);
- if(ibuf==NULL || ibuf->rect==NULL) {
- return;
- }
-
- pi = BKE_previewimg_get((ID*)img);
-
- if(!pi) {
- printf("preview image could'nt be allocated");
- return;
- }
- /* we can only create the preview rect here, since loading possibly deallocated
- old preview */
- icon_create_mipmap(pi, miplevel);
-
- pr_size = img->preview->w[miplevel]*img->preview->h[miplevel]*sizeof(unsigned int);
-
- image_loaded = 1;
- icon_copy_rect(ibuf, img->preview->w[miplevel], img->preview->h[miplevel], img->preview->rect[miplevel]);
-}
-
-static void set_alpha(char* cp, int sizex, int sizey, char alpha)
-{
- int x,y;
- for(y=0; y<sizey; y++) {
- for(x=0; x<sizex; x++, cp+=4) {
- cp[3]= alpha;
- }
- }
-}
-
/* only called when icon has changed */
/* only call with valid pointer from UI_icon_draw */
-static void icon_set_image(Scene *scene, ID *id, PreviewImage* prv_img, int miplevel)
+static void icon_set_image(bContext *C, ID *id, PreviewImage* prv_img, int miplevel)
{
- RenderInfo ri;
- unsigned int pr_size = 0;
-
if (!prv_img) {
printf("No preview image for this ID: %s\n", id->name);
return;
}
- /* 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(scene, (struct Image*)id, miplevel);
- else {
- /* create the preview rect */
- icon_create_mipmap(prv_img, miplevel);
-
- ri.curtile= 0;
- ri.tottile= 0;
- 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");
-
- 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 */
- if (GS(id->name) == ID_WO) {
- set_alpha( (char*) ri.rect, ri.pr_rectx, ri.pr_recty, 255);
- }
- else if (GS(id->name) == ID_MA) {
- Material* mat = (Material*)id;
- if (mat->material_type == MA_TYPE_HALO) {
- set_alpha( (char*) ri.rect, ri.pr_rectx, ri.pr_recty, 255);
- }
- }
+ /* create the preview rect */
+ icon_create_mipmap(prv_img, miplevel);
- memcpy(prv_img->rect[miplevel], ri.rect, pr_size);
-
- /* and clean up */
- MEM_freeN(ri.rect);
- }
+ ED_preview_icon_job(C, prv_img, id, prv_img->rect[miplevel],
+ prv_img->w[miplevel], prv_img->h[miplevel]);
}
-static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw, int rh, unsigned int *rect)
+static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw, int rh, unsigned int *rect, float alpha, float *rgb)
{
-
+ /* modulate color */
+ if(alpha != 1.0f)
+ glPixelTransferf(GL_ALPHA_SCALE, alpha);
+
+ if(rgb) {
+ glPixelTransferf(GL_RED_SCALE, rgb[0]);
+ glPixelTransferf(GL_GREEN_SCALE, rgb[1]);
+ glPixelTransferf(GL_BLUE_SCALE, rgb[2]);
+ }
+
+ /* position */
glRasterPos2f(x, y);
// XXX ui_rasterpos_safe(x, y, aspect);
+ /* draw */
if((w<1 || h<1)) {
// XXX - TODO 2.5 verify whether this case can happen
// and only print in debug
@@ -865,23 +805,68 @@ static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw,
}
/* rect contains image in 'rendersize', we only scale if needed */
else if(rw!=w && rh!=h) {
- ImBuf *ima;
if(w>2000 || h>2000) { /* something has gone wrong! */
printf("insane icon size w=%d h=%d\n",w,h);
- return;
}
- /* first allocate imbuf for scaling and copy preview into it */
- ima = IMB_allocImBuf(rw, rh, 32, IB_rect, 0);
- memcpy(ima->rect, rect, rw*rh*sizeof(unsigned int));
-
- /* scale it */
- IMB_scaleImBuf(ima, w, h);
- glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, ima->rect);
-
- IMB_freeImBuf(ima);
+ else {
+ ImBuf *ima;
+
+ /* first allocate imbuf for scaling and copy preview into it */
+ ima = IMB_allocImBuf(rw, rh, 32, IB_rect, 0);
+ memcpy(ima->rect, rect, rw*rh*sizeof(unsigned int));
+
+ /* scale it */
+ IMB_scaleImBuf(ima, w, h);
+ glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, ima->rect);
+
+ IMB_freeImBuf(ima);
+ }
}
else
glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, rect);
+
+ /* restore color */
+ if(alpha != 0.0f)
+ glPixelTransferf(GL_ALPHA_SCALE, 1.0f);
+
+ if(rgb) {
+ glPixelTransferf(GL_RED_SCALE, 1.0f);
+ glPixelTransferf(GL_GREEN_SCALE, 1.0f);
+ glPixelTransferf(GL_BLUE_SCALE, 1.0f);
+ }
+}
+
+static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy, int iw, int ih, float alpha, float *rgb)
+{
+ float x1, x2, y1, y2;
+
+ if(rgb) glColor4f(rgb[0], rgb[1], rgb[2], alpha);
+ else glColor4f(1.0f, 1.0f, 1.0f, alpha);
+
+ x1= ix*icongltex.invw;
+ x2= (ix + ih)*icongltex.invw;
+ y1= iy*icongltex.invh;
+ y2= (iy + ih)*icongltex.invh;
+
+ glEnable(GL_TEXTURE_2D);
+ glBindTexture(GL_TEXTURE_2D, icongltex.id);
+
+ glBegin(GL_QUADS);
+ glTexCoord2f(x1, y1);
+ glVertex2f(x, y);
+
+ glTexCoord2f(x2, y1);
+ glVertex2f(x+w, y);
+
+ glTexCoord2f(x2, y2);
+ glVertex2f(x+w, y+h);
+
+ glTexCoord2f(x1, y2);
+ glVertex2f(x, y+h);
+ glEnd();
+
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glDisable(GL_TEXTURE_2D);
}
/* Drawing size for preview images at level miplevel */
@@ -894,10 +879,12 @@ static int preview_size(int miplevel)
return 0;
}
-static void icon_draw_size(float x, float y, int icon_id, float aspect, int miplevel, int draw_size, int nocreate)
+static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, float *rgb, int miplevel, int draw_size, int nocreate)
{
Icon *icon = NULL;
DrawInfo *di = NULL;
+ IconImage *iimg;
+ int w, h;
icon = BKE_icon_get(icon_id);
@@ -905,7 +892,7 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, int mipl
printf("icon_draw_mipmap: Internal error, no icon for icon ID: %d\n", icon_id);
return;
}
-
+
di = (DrawInfo*)icon->drawinfo;
if (!di) {
@@ -915,36 +902,43 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, int mipl
icon->drawinfo_free = UI_icons_free_drawinfo;
}
- di->aspect = aspect;
/* scale width and height according to aspect */
- di->w = (int)(draw_size/di->aspect + 0.5f);
- di->h = (int)(draw_size/di->aspect + 0.5f);
+ w = (int)(draw_size/aspect + 0.5f);
+ h = (int)(draw_size/aspect + 0.5f);
- if (di->drawFunc) {
+ if(di->type == ICON_TYPE_VECTOR) {
/* vector icons use the uiBlock transformation, they are not drawn
with untransformed coordinates like the other icons */
- di->drawFunc(x, y, ICON_DEFAULT_HEIGHT, ICON_DEFAULT_HEIGHT, 1.0f);
+ di->data.vector.func(x, y, ICON_DEFAULT_HEIGHT, ICON_DEFAULT_HEIGHT, 1.0f);
}
- else if (di->icon) {
+ else if(di->type == ICON_TYPE_TEXTURE) {
+ icon_draw_texture(x, y, w, h, di->data.texture.x, di->data.texture.y,
+ di->data.texture.w, di->data.texture.h, alpha, rgb);
+ }
+ else if(di->type == ICON_TYPE_BUFFER) {
/* it is a builtin icon */
- if (!di->icon->rect) return; /* something has gone wrong! */
+ iimg= di->data.buffer.image;
+
+ if(!iimg->rect) return; /* something has gone wrong! */
- icon_draw_rect(x,y,di->w, di->h, di->aspect, di->icon->w, di->icon->h, di->icon->rect);
+ icon_draw_rect(x, y, w, h, aspect, iimg->w, iimg->h, iimg->rect, alpha, rgb);
}
- else {
+ else if(di->type == ICON_TYPE_PREVIEW) {
PreviewImage* pi = BKE_previewimg_get((ID*)icon->obj);
- if (pi) {
+ if(pi) {
/* no create icon on this level in code */
+ if(!pi->rect[miplevel]) return; /* something has gone wrong! */
- if (!pi->rect[miplevel]) return; /* something has gone wrong! */
-
- icon_draw_rect(x,y,di->w, di->h, di->aspect, pi->w[miplevel], pi->h[miplevel], pi->rect[miplevel]);
+ /* preview images use premul alpha ... */
+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ icon_draw_rect(x, y, w, h, aspect, pi->w[miplevel], pi->h[miplevel], pi->rect[miplevel], 1.0f, NULL);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
}
}
-void ui_id_icon_render(Scene *scene, ID *id)
+void ui_id_icon_render(bContext *C, ID *id)
{
PreviewImage *pi = BKE_previewimg_get(id);
@@ -952,13 +946,13 @@ void ui_id_icon_render(Scene *scene, ID *id)
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);
+ icon_set_image(C, id, pi, 0);
pi->changed[0] = 0;
}
}
}
-int ui_id_icon_get(Scene *scene, ID *id)
+int ui_id_icon_get(bContext *C, ID *id)
{
int iconid= 0;
@@ -972,7 +966,7 @@ int ui_id_icon_get(Scene *scene, ID *id)
case ID_LA: /* fall through */
iconid= BKE_icon_getid(id);
/* checks if not exists, or changed */
- ui_id_icon_render(scene, id);
+ ui_id_icon_render(C, id);
break;
default:
break;
@@ -981,50 +975,35 @@ int ui_id_icon_get(Scene *scene, ID *id)
return iconid;
}
-static void icon_draw_mipmap(float x, float y, int icon_id, float aspect, int miplevel, int nocreate)
+static void icon_draw_mipmap(float x, float y, int icon_id, float aspect, float alpha, int miplevel, int nocreate)
{
int draw_size = preview_size(miplevel);
- icon_draw_size(x,y,icon_id, aspect, miplevel, draw_size, nocreate);
+ icon_draw_size(x, y, icon_id, aspect, alpha, NULL, miplevel, draw_size, nocreate);
}
+void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect, float alpha)
+{
+ icon_draw_mipmap(x, y, icon_id, aspect, alpha, PREVIEW_MIPMAP_ZERO, 0);
+}
-void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect)
+void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, float *rgb)
{
- icon_draw_mipmap(x,y,icon_id, aspect, PREVIEW_MIPMAP_ZERO, 0);
+ int draw_size = preview_size(PREVIEW_MIPMAP_ZERO);
+ icon_draw_size(x, y, icon_id, aspect, 1.0f, rgb, PREVIEW_MIPMAP_ZERO, draw_size, 0);
}
void UI_icon_draw(float x, float y, int icon_id)
{
- UI_icon_draw_aspect(x, y, icon_id, 1.0f);
+ UI_icon_draw_aspect(x, y, icon_id, 1.0f, 1.0f);
}
-void UI_icon_draw_size_blended(float x, float y, int size, int icon_id, int shade)
+void UI_icon_draw_size(float x, float y, int size, int icon_id, float alpha)
{
- if(shade < 0) {
- float r= (128+shade)/128.0f;
- glPixelTransferf(GL_ALPHA_SCALE, r);
- }
-
- icon_draw_size(x,y,icon_id, 1.0f, 0, size, 1);
-
- if(shade < 0)
- glPixelTransferf(GL_ALPHA_SCALE, 1.0f);
+ icon_draw_size(x, y, icon_id, 1.0f, alpha, NULL, 0, size, 1);
}
void UI_icon_draw_preview(float x, float y, int icon_id, int nocreate)
{
- icon_draw_mipmap(x,y,icon_id, 1.0f, PREVIEW_MIPMAP_LARGE, nocreate);
+ icon_draw_mipmap(x, y, icon_id, 1.0f, 1.0f, PREVIEW_MIPMAP_LARGE, nocreate);
}
-void UI_icon_draw_aspect_blended(float x, float y, int icon_id, float aspect, int shade)
-{
- if(shade < 0) {
- float r= (128+shade)/128.0f;
- glPixelTransferf(GL_ALPHA_SCALE, r);
- }
-
- UI_icon_draw_aspect(x, y, icon_id, aspect);
-
- if(shade < 0)
- glPixelTransferf(GL_ALPHA_SCALE, 1.0f);
-}
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 2e623114fe9..97bbee0a1c3 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -72,6 +72,7 @@ typedef enum {
/* menus */
UI_WTYPE_MENU_RADIO,
+ UI_WTYPE_MENU_ICON_RADIO,
UI_WTYPE_MENU_POINTER_LINK,
UI_WTYPE_PULLDOWN,
@@ -263,6 +264,9 @@ struct uiBlock {
void *func_arg1;
void *func_arg2;
+ uiButHandleNFunc funcN;
+ void *func_argN;
+
uiMenuHandleFunc butm_func;
void *butm_func_arg;
@@ -447,8 +451,8 @@ void ui_draw_menu_item(struct uiFontStyle *fstyle, rcti *rect, char *name, int i
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);
+void ui_id_icon_render(struct bContext *C, struct ID *id);
+int ui_id_icon_get(struct bContext *C, struct ID *id);
/* resources.c */
void init_userdef_do_versions(void);
@@ -467,6 +471,8 @@ void ui_but_anim_insert_keyframe(struct bContext *C);
void ui_but_anim_delete_keyframe(struct bContext *C);
void ui_but_anim_add_driver(struct bContext *C);
void ui_but_anim_remove_driver(struct bContext *C);
+void ui_but_anim_copy_driver(struct bContext *C);
+void ui_but_anim_paste_driver(struct bContext *C);
void ui_but_anim_add_keyingset(struct bContext *C);
void ui_but_anim_remove_keyingset(struct bContext *C);
void ui_but_anim_menu(struct bContext *C, uiBut *but);
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index b6afc4daa9b..233d3b214ae 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -96,7 +96,7 @@ typedef enum uiItemType {
ITEM_LAYOUT_COLUMN_FLOW,
ITEM_LAYOUT_ROW_FLOW,
ITEM_LAYOUT_BOX,
- ITEM_LAYOUT_FREE,
+ ITEM_LAYOUT_ABSOLUTE,
ITEM_LAYOUT_SPLIT,
ITEM_LAYOUT_ROOT
@@ -290,7 +290,7 @@ static int ui_layout_local_dir(uiLayout *layout)
case ITEM_LAYOUT_COLUMN:
case ITEM_LAYOUT_COLUMN_FLOW:
case ITEM_LAYOUT_SPLIT:
- case ITEM_LAYOUT_FREE:
+ case ITEM_LAYOUT_ABSOLUTE:
case ITEM_LAYOUT_BOX:
default:
return UI_LAYOUT_VERTICAL;
@@ -476,11 +476,24 @@ static void ui_item_enum_row(uiLayout *layout, uiBlock *block, PointerRNA *ptr,
MEM_freeN(item);
}
+/* callback for keymap item change button */
+static void ui_keymap_but_cb(bContext *C, void *but_v, void *key_v)
+{
+ uiBut *but= but_v;
+ short modifier= *((short*)key_v);
+
+ RNA_boolean_set(&but->rnapoin, "shift", (modifier & KM_SHIFT) != 0);
+ RNA_boolean_set(&but->rnapoin, "ctrl", (modifier & KM_CTRL) != 0);
+ RNA_boolean_set(&but->rnapoin, "alt", (modifier & KM_ALT) != 0);
+ RNA_boolean_set(&but->rnapoin, "oskey", (modifier & KM_OSKEY) != 0);
+}
+
/* create label + button for RNA property */
-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, int icon_only)
+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, int flag)
{
uiLayout *sub;
- uiBut *but;
+ uiBut *but=NULL;
+ PropertyType type;
PropertySubType subtype;
int labelw;
@@ -491,11 +504,12 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, char *name, i
/* XXX UI_GetStringWidth is not accurate
labelw= UI_GetStringWidth(name);
CLAMP(labelw, w/4, 3*w/4);*/
- labelw= w/2;
+ labelw= w/3;
uiDefBut(block, LABEL, 0, name, x, y, labelw, h, NULL, 0.0, 0.0, 0, 0, "");
w= w-labelw;
}
+ type= RNA_property_type(prop);
subtype= RNA_property_subtype(prop);
if(subtype == PROP_FILEPATH || subtype == PROP_DIRPATH) {
@@ -505,8 +519,26 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, char *name, i
/* BUTTONS_OT_file_browse calls uiFileBrowseContextProperty */
but= uiDefIconButO(block, BUT, "BUTTONS_OT_file_browse", WM_OP_INVOKE_DEFAULT, ICON_FILESEL, x, y, UI_UNIT_X, h, "Browse for file or directory.");
}
+ else if(subtype == PROP_DIRECTION) {
+ uiDefButR(block, BUT_NORMAL, 0, name, x, y, 100, 100, ptr, RNA_property_identifier(prop), index, 0, 0, -1, -1, NULL);
+ }
+ else if(flag & UI_ITEM_R_EVENT) {
+ uiDefButR(block, KEYEVT, 0, name, x, y, w, h, ptr, RNA_property_identifier(prop), index, 0, 0, -1, -1, NULL);
+ }
+ else if(flag & UI_ITEM_R_FULL_EVENT) {
+ if(RNA_struct_is_a(ptr->type, &RNA_KeyMapItem)) {
+ static short dummy = 0;
+ char buf[128];
+
+ WM_keymap_item_to_string(ptr->data, buf, sizeof(buf));
+
+ but= uiDefButR(block, HOTKEYEVT, 0, buf, x, y, w, h, ptr, RNA_property_identifier(prop), 0, 0, 0, -1, -1, NULL);
+ but->func_arg3= &dummy; // XXX abuse
+ uiButSetFunc(but, ui_keymap_but_cb, but, &dummy);
+ }
+ }
else
- but= uiDefAutoButR(block, ptr, prop, index, (!icon_only)? "": NULL, icon, x, y, w, h);
+ but= uiDefAutoButR(block, ptr, prop, index, (type == PROP_ENUM && !(flag & UI_ITEM_R_ICON_ONLY))? NULL: "", icon, x, y, w, h);
uiBlockSetCurLayout(block, layout);
return but;
@@ -529,7 +561,7 @@ void uiFileBrowseContextProperty(const bContext *C, PointerRNA *ptr, PropertyRNA
prevbut= but->prev;
/* find the button before the active one */
- if((but->flag & UI_BUT_LAST_ACTIVE) && prevbut && prevbut->rnapoin.id.data) {
+ if((but->flag & UI_BUT_LAST_ACTIVE) && prevbut && prevbut->rnapoin.data) {
if(RNA_property_type(prevbut->rnaprop) == PROP_STRING) {
*ptr= prevbut->rnapoin;
*prop= prevbut->rnaprop;
@@ -840,9 +872,6 @@ void uiItemFullR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, Proper
char namestr[UI_MAX_NAME_STR];
int len, w, h, slider, toggle, expand, icon_only;
- if(!ptr->data || !prop)
- return;
-
uiBlockSetCurLayout(block, layout);
/* retrieve info */
@@ -896,7 +925,7 @@ void uiItemFullR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, Proper
ui_item_enum_row(layout, block, ptr, prop, name, 0, 0, w, h, icon_only);
/* property with separate label */
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, icon_only);
+ but= ui_item_with_label(layout, block, name, icon, ptr, prop, index, 0, 0, w, h, flag);
ui_but_add_search(but, ptr, prop, NULL, NULL);
}
/* single button */
@@ -913,12 +942,7 @@ void uiItemFullR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, Proper
void uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *propname, int flag)
{
- PropertyRNA *prop;
-
- if(!ptr->data || !propname)
- return;
-
- prop= RNA_struct_find_property(ptr, propname);
+ PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
if(!prop) {
ui_item_disabled(layout, propname);
@@ -931,12 +955,7 @@ void uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *prop
void uiItemEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int value)
{
- PropertyRNA *prop;
-
- if(!ptr->data || !propname)
- return;
-
- prop= RNA_struct_find_property(ptr, propname);
+ PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
if(!prop || RNA_property_type(prop) != PROP_ENUM) {
ui_item_disabled(layout, propname);
@@ -949,15 +968,10 @@ void uiItemEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr,
void uiItemEnumR_string(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, char *value)
{
- PropertyRNA *prop;
+ PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
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);
@@ -1035,7 +1049,6 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, char *propname)
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;
@@ -1044,7 +1057,7 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, char *str, ui
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);
+ iconid= ui_id_icon_get((bContext*)C, itemptr.data);
name= RNA_struct_name_get_alloc(&itemptr, NULL, 0);
@@ -1123,9 +1136,6 @@ void uiItemPointerR(uiLayout *layout, char *name, int icon, struct PointerRNA *p
int w, h;
/* validate arguments */
- if(!ptr->data || !searchptr->data)
- return;
-
prop= RNA_struct_find_property(ptr, propname);
if(!prop) {
@@ -1200,8 +1210,10 @@ static void ui_item_menu(uiLayout *layout, char *name, int icon, uiMenuCreateFun
if(layout->root->type == UI_LAYOUT_HEADER) /* ugly .. */
w -= 10;
- if(icon)
+ if(name[0] && icon)
but= uiDefIconTextMenuBut(block, func, arg, icon, (char*)name, 0, 0, w, h, "");
+ else if(icon)
+ but= uiDefIconMenuBut(block, func, arg, icon, 0, 0, w, h, "");
else
but= uiDefMenuBut(block, func, arg, (char*)name, 0, 0, w, h, "");
@@ -1218,24 +1230,21 @@ static void ui_item_menu(uiLayout *layout, char *name, int icon, uiMenuCreateFun
void uiItemM(uiLayout *layout, bContext *C, char *name, int icon, char *menuname)
{
- ARegion *ar= CTX_wm_region(C);
MenuType *mt;
- if(!menuname)
- return;
+ mt= WM_menutype_find(menuname, FALSE);
- for(mt=ar->type->menutypes.first; mt; mt=mt->next) {
- if(strcmp(menuname, mt->idname) == 0) {
- if(!name)
- name= mt->label;
- if(layout->root->type == UI_LAYOUT_MENU && !icon)
- icon= ICON_BLANK1;
- ui_item_menu(layout, name, icon, ui_item_menutype_func, mt, NULL);
- return;
- }
+ if(mt==NULL) {
+ printf("uiItemM: not found %s\n", menuname);
+ return;
}
- printf("uiItemM: not found %s\n", menuname);
+ if(!name)
+ name= mt->label;
+ if(layout->root->type == UI_LAYOUT_MENU && !icon)
+ icon= ICON_BLANK1;
+
+ ui_item_menu(layout, name, icon, ui_item_menutype_func, mt, NULL);
}
/* label item */
@@ -1722,7 +1731,7 @@ static void ui_litem_layout_column_flow(uiLayout *litem)
}
/* free layout */
-static void ui_litem_estimate_free(uiLayout *litem)
+static void ui_litem_estimate_absolute(uiLayout *litem)
{
uiItem *item;
int itemx, itemy, itemw, itemh, minx, miny;
@@ -1747,7 +1756,7 @@ static void ui_litem_estimate_free(uiLayout *litem)
litem->h -= miny;
}
-static void ui_litem_layout_free(uiLayout *litem)
+static void ui_litem_layout_absolute(uiLayout *litem)
{
uiItem *item;
float scalex=1.0f, scaley=1.0f;
@@ -1953,7 +1962,7 @@ uiLayout *uiLayoutFree(uiLayout *layout, int align)
uiLayout *litem;
litem= MEM_callocN(sizeof(uiLayout), "uiLayoutFree");
- litem->item.type= ITEM_LAYOUT_FREE;
+ litem->item.type= ITEM_LAYOUT_ABSOLUTE;
litem->root= layout->root;
litem->align= align;
litem->active= 1;
@@ -1966,7 +1975,7 @@ uiLayout *uiLayoutFree(uiLayout *layout, int align)
return litem;
}
-uiBlock *uiLayoutFreeBlock(uiLayout *layout)
+uiBlock *uiLayoutAbsoluteBlock(uiLayout *layout)
{
uiBlock *block;
@@ -2127,8 +2136,8 @@ static void ui_item_estimate(uiItem *item)
case ITEM_LAYOUT_ROOT:
ui_litem_estimate_root(litem);
break;
- case ITEM_LAYOUT_FREE:
- ui_litem_estimate_free(litem);
+ case ITEM_LAYOUT_ABSOLUTE:
+ ui_litem_estimate_absolute(litem);
break;
case ITEM_LAYOUT_SPLIT:
ui_litem_estimate_split(litem);
@@ -2152,7 +2161,7 @@ static void ui_item_align(uiLayout *litem, int nr)
if(!bitem->but->alignnr)
bitem->but->alignnr= nr;
}
- else if(item->type == ITEM_LAYOUT_FREE);
+ else if(item->type == ITEM_LAYOUT_ABSOLUTE);
else if(item->type == ITEM_LAYOUT_BOX) {
box= (uiLayoutItemBx*)item;
box->roundbox->alignnr= nr;
@@ -2212,8 +2221,8 @@ static void ui_item_layout(uiItem *item)
case ITEM_LAYOUT_ROOT:
ui_litem_layout_root(litem);
break;
- case ITEM_LAYOUT_FREE:
- ui_litem_layout_free(litem);
+ case ITEM_LAYOUT_ABSOLUTE:
+ ui_litem_layout_absolute(litem);
break;
case ITEM_LAYOUT_SPLIT:
ui_litem_layout_split(litem);
@@ -2227,18 +2236,13 @@ static void ui_item_layout(uiItem *item)
}
}
-static void ui_layout_items(const bContext *C, uiBlock *block, uiLayout *layout)
-{
- ui_item_estimate(&layout->item);
- ui_item_layout(&layout->item);
-}
-
-static void ui_layout_end(const bContext *C, uiBlock *block, uiLayout *layout, int *x, int *y)
+static void ui_layout_end(uiBlock *block, uiLayout *layout, int *x, int *y)
{
if(layout->root->handlefunc)
uiBlockSetButmFunc(block, layout->root->handlefunc, layout->root->argv);
- ui_layout_items(C, block, layout);
+ ui_item_estimate(&layout->item);
+ ui_item_layout(&layout->item);
if(x) *x= layout->x;
if(y) *y= layout->y;
@@ -2346,7 +2350,7 @@ void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv)
layout->root->argv= argv;
}
-void uiBlockLayoutResolve(const bContext *C, uiBlock *block, int *x, int *y)
+void uiBlockLayoutResolve(uiBlock *block, int *x, int *y)
{
uiLayoutRoot *root;
@@ -2357,7 +2361,7 @@ void uiBlockLayoutResolve(const bContext *C, uiBlock *block, int *x, int *y)
for(root=block->layouts.first; root; root=root->next) {
/* NULL in advance so we don't interfere when adding button */
- ui_layout_end(C, block, root->layout, x, y);
+ ui_layout_end(block, root->layout, x, y);
ui_layout_free(root->layout);
}
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 776122380bf..fa24aa72b9f 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -963,6 +963,7 @@ static void check_panel_overlap(ARegion *ar, Panel *panel)
}
}
+#if 0 // XXX panel docking/tabbing code that's no longer used
static void test_add_new_tabs(ARegion *ar)
{
Panel *pa, *pasel=NULL, *palap=NULL;
@@ -1016,6 +1017,7 @@ static void test_add_new_tabs(ARegion *ar)
pa= pa->next;
}
}
+#endif
/************************ panel dragging ****************************/
@@ -1382,7 +1384,12 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat
if(state == PANEL_STATE_EXIT || state == PANEL_STATE_ANIMATION) {
if(data && data->state != PANEL_STATE_ANIMATION) {
- test_add_new_tabs(ar); // also copies locations of tabs in dragged panel
+ /* XXX:
+ * - the panel tabbing function call below (test_add_new_tabs()) has been commented out
+ * "It is too easy to do by accident when reordering panels, is very hard to control and use, and has no real benefit." - BillRey
+ * Aligorith, 2009Sep
+ */
+ //test_add_new_tabs(ar); // also copies locations of tabs in dragged panel
check_panel_overlap(ar, NULL); // clears
}
@@ -1400,14 +1407,14 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat
MEM_freeN(data);
pa->activedata= NULL;
- WM_event_remove_ui_handler(&win->handlers, ui_handler_panel, ui_handler_remove_panel, pa);
+ WM_event_remove_ui_handler(&win->modalhandlers, ui_handler_panel, ui_handler_remove_panel, pa);
}
else {
if(!data) {
data= MEM_callocN(sizeof(uiHandlePanelData), "uiHandlePanelData");
pa->activedata= data;
- WM_event_add_ui_handler(C, &win->handlers, ui_handler_panel, ui_handler_remove_panel, pa);
+ WM_event_add_ui_handler(C, &win->modalhandlers, ui_handler_panel, ui_handler_remove_panel, pa);
}
if(ELEM(state, PANEL_STATE_ANIMATION, PANEL_STATE_DRAG))
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index dfcdea59f68..c837599baf3 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -2192,7 +2192,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
block->direction= direction;
- uiBlockLayoutResolve(C, block, NULL, NULL);
+ uiBlockLayoutResolve(block, NULL, NULL);
if(pup->popup) {
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT|UI_BLOCK_RET_1);
@@ -2226,7 +2226,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
}
block->minbounds= minwidth;
- uiTextBoundsBlock(block, 40);
+ uiTextBoundsBlock(block, 50);
}
/* if menu slides out of other menu, override direction */
@@ -2275,7 +2275,7 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut
if(!but) {
handle->popup= 1;
- UI_add_popup_handlers(C, &window->handlers, handle);
+ UI_add_popup_handlers(C, &window->modalhandlers, handle);
WM_event_add_mousemove(C);
}
@@ -2332,7 +2332,7 @@ void uiPupMenuEnd(bContext *C, uiPopupMenu *pup)
menu= ui_popup_block_create(C, NULL, NULL, NULL, ui_block_func_POPUP, pup);
menu->popup= 1;
- UI_add_popup_handlers(C, &window->handlers, menu);
+ UI_add_popup_handlers(C, &window->modalhandlers, menu);
WM_event_add_mousemove(C);
MEM_freeN(pup);
@@ -2481,6 +2481,33 @@ void uiPupMenuReports(bContext *C, ReportList *reports)
BLI_dynstr_free(ds);
}
+void uiPupMenuInvoke(bContext *C, const char *idname)
+{
+ uiPopupMenu *pup;
+ uiLayout *layout;
+ Menu menu;
+ MenuType *mt= WM_menutype_find(idname, TRUE);
+
+ if(mt==NULL) {
+ printf("uiPupMenuInvoke: named menu \"%s\" not found\n", idname);
+ return;
+ }
+
+ if(mt->poll && mt->poll(C, mt)==0)
+ return;
+
+ pup= uiPupMenuBegin(C, mt->label, 0);
+ layout= uiPupMenuLayout(pup);
+
+ menu.layout= layout;
+ menu.type= mt;
+
+ mt->draw(C, &menu);
+
+ uiPupMenuEnd(C, pup);
+}
+
+
/*************************** Popup Block API **************************/
void uiPupBlockO(bContext *C, uiBlockCreateFunc func, void *arg, char *opname, int opcontext)
@@ -2493,7 +2520,7 @@ void uiPupBlockO(bContext *C, uiBlockCreateFunc func, void *arg, char *opname, i
handle->optype= (opname)? WM_operatortype_find(opname, 0): NULL;
handle->opcontext= opcontext;
- UI_add_popup_handlers(C, &window->handlers, handle);
+ UI_add_popup_handlers(C, &window->modalhandlers, handle);
WM_event_add_mousemove(C);
}
@@ -2516,7 +2543,7 @@ void uiPupBlockOperator(bContext *C, uiBlockCreateFunc func, wmOperator *op, int
handle->cancel_func= confirm_cancel_operator;
handle->opcontext= opcontext;
- UI_add_popup_handlers(C, &window->handlers, handle);
+ UI_add_popup_handlers(C, &window->modalhandlers, handle);
WM_event_add_mousemove(C);
}
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 2b7d6f383bf..7965a4c3b53 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -36,10 +36,11 @@
#include "BKE_icons.h"
#include "BKE_global.h"
#include "BKE_library.h"
+#include "BKE_main.h"
#include "BKE_utildefines.h"
#include "ED_screen.h"
-#include "ED_previewrender.h"
+#include "ED_render.h"
#include "RNA_access.h"
@@ -60,7 +61,7 @@ void uiTemplateHeader(uiLayout *layout, bContext *C, int menus)
{
uiBlock *block;
- block= uiLayoutFreeBlock(layout);
+ block= uiLayoutAbsoluteBlock(layout);
if(menus) ED_area_header_standardbuttons(C, block, 0);
else ED_area_header_switchbutton(C, block, 0);
}
@@ -75,7 +76,7 @@ typedef struct TemplateID {
} TemplateID;
/* Search browse menu, assign */
-static void id_search_call_cb(struct bContext *C, void *arg_template, void *item)
+static void id_search_call_cb(bContext *C, void *arg_template, void *item)
{
TemplateID *template= (TemplateID*)arg_template;
@@ -90,10 +91,9 @@ static void id_search_call_cb(struct bContext *C, void *arg_template, void *item
}
/* ID Search browse menu, do the search */
-static void id_search_cb(const struct bContext *C, void *arg_template, char *str, uiSearchItems *items)
+static void id_search_cb(const 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;
@@ -101,7 +101,7 @@ static void id_search_cb(const struct bContext *C, void *arg_template, char *str
/* ID listbase */
for(id= lb->first; id; id= id->next) {
if(BLI_strcasestr(id->name+2, str)) {
- iconid= ui_id_icon_get(scene, id);
+ iconid= ui_id_icon_get((bContext*)C, id);
if(!uiSearchItemAdd(items, id->name+2, id, iconid))
break;
@@ -152,6 +152,37 @@ static uiBlock *search_menu(bContext *C, ARegion *ar, void *arg_litem)
}
/************************ ID Template ***************************/
+/* This is for browsing and editing the ID-blocks used */
+
+/* for new/open operators */
+void uiIDContextProperty(bContext *C, PointerRNA *ptr, PropertyRNA **prop)
+{
+ TemplateID *template;
+ ARegion *ar= CTX_wm_region(C);
+ uiBlock *block;
+ uiBut *but;
+
+ memset(ptr, 0, sizeof(*ptr));
+ *prop= NULL;
+
+ if(!ar)
+ return;
+
+ for(block=ar->uiblocks.first; block; block=block->next) {
+ for(but=block->buttons.first; but; but= but->next) {
+ /* find the button before the active one */
+ if((but->flag & (UI_BUT_LAST_ACTIVE|UI_ACTIVE))) {
+ if(but->func_argN) {
+ template= but->func_argN;
+ *ptr= template->ptr;
+ *prop= template->prop;
+ return;
+ }
+ }
+ }
+ }
+}
+
static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
{
@@ -167,11 +198,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_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);
- }
+ /* these call uiIDContextPropertySet */
break;
case UI_ID_DELETE:
memset(&idptr, 0, sizeof(idptr));
@@ -291,7 +318,7 @@ static void template_ID(bContext *C, uiBlock *block, TemplateID *template, Struc
int w= id?UI_UNIT_X: (flag & UI_ID_OPEN)? UI_UNIT_X*3: UI_UNIT_X*6;
if(newop) {
- but= uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_REGION_WIN, ICON_ZOOMIN, (id)? "": "New", 0, 0, w, UI_UNIT_Y, NULL);
+ but= uiDefIconTextButO(block, BUT, newop, WM_OP_EXEC_DEFAULT, ICON_ZOOMIN, (id)? "": "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 {
@@ -307,7 +334,7 @@ static void template_ID(bContext *C, uiBlock *block, TemplateID *template, Struc
int w= id?UI_UNIT_X: (flag & UI_ID_ADD_NEW)? UI_UNIT_X*3: UI_UNIT_X*6;
if(openop) {
- but= uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_REGION_WIN, ICON_FILESEL, (id)? "": "Open", 0, 0, w, UI_UNIT_Y, NULL);
+ but= uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id)? "": "Open", 0, 0, w, UI_UNIT_Y, NULL);
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN));
}
else {
@@ -344,9 +371,6 @@ void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname
StructRNA *type;
int flag;
- if(!ptr->data)
- return;
-
prop= RNA_struct_find_property(ptr, propname);
if(!prop || RNA_property_type(prop) != PROP_POINTER) {
@@ -367,7 +391,10 @@ void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname
type= RNA_property_pointer_type(ptr, prop);
template->idlb= wich_libbase(CTX_data_main(C), RNA_type_to_ID_code(type));
-
+
+ /* create UI elements for this template
+ * - template_ID makes a copy of the template data and assigns it to the relevant buttons
+ */
if(template->idlb) {
uiLayoutRow(layout, 1);
block= uiLayoutGetBlock(layout);
@@ -377,6 +404,77 @@ void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname
MEM_freeN(template);
}
+/************************ ID Chooser Template ***************************/
+
+/* This is for selecting the type of ID-block to use, and then from the relevant type choosing the block to use
+ *
+ * - propname: property identifier for property that ID-pointer gets stored to
+ * - proptypename: property identifier for property used to determine the type of ID-pointer that can be used
+ */
+void uiTemplateAnyID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname, char *proptypename, char *text)
+{
+ PropertyRNA *propID, *propType;
+ uiLayout *row;
+
+ /* get properties... */
+ propID= RNA_struct_find_property(ptr, propname);
+ propType= RNA_struct_find_property(ptr, proptypename);
+
+ if (!propID || RNA_property_type(propID) != PROP_POINTER) {
+ printf("uiTemplateAnyID: pointer property not found: %s\n", propname);
+ return;
+ }
+ if (!propType || RNA_property_type(propType) != PROP_ENUM) {
+ printf("uiTemplateAnyID: pointer-type property not found: %s\n", proptypename);
+ return;
+ }
+
+ /* Start drawing UI Elements using standard defines */
+ row= uiLayoutRow(layout, 1);
+
+ /* Label - either use the provided text, or will become "ID-Block:" */
+ if (text)
+ uiItemL(row, text, 0);
+ else
+ uiItemL(row, "ID-Block:", 0);
+
+ /* ID-Type Selector - just have a menu of icons */
+ // FIXME: the icon-only setting doesn't work when we supply a blank name
+ uiItemFullR(row, "", 0, ptr, propType, 0, 0, UI_ITEM_R_ICON_ONLY);
+
+ /* ID-Block Selector - just use pointer widget... */
+ uiItemFullR(row, "", 0, ptr, propID, 0, 0, 0);
+}
+
+/********************* RNA Path Builder Template ********************/
+
+/* This is creating/editing RNA-Paths
+ *
+ * - ptr: struct which holds the path property
+ * - propname: property identifier for property that path gets stored to
+ * - root_ptr: struct that path gets built from
+ */
+void uiTemplatePathBuilder(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname, PointerRNA *root_ptr, char *text)
+{
+ PropertyRNA *propPath;
+ uiLayout *row;
+
+ /* check that properties are valid */
+ propPath= RNA_struct_find_property(ptr, propname);
+ if (!propPath || RNA_property_type(propPath) != PROP_STRING) {
+ printf("uiTemplatePathBuilder: path property not found: %s\n", propname);
+ return;
+ }
+
+ /* Start drawing UI Elements using standard defines */
+ row= uiLayoutRow(layout, 1);
+
+ /* Path (existing string) Widget */
+ uiItemR(row, text, ICON_RNA, ptr, propname, 0);
+
+ // TODO: attach something to this to make allow searching of nested properties to 'build' the path
+}
+
/************************ Modifier Template *************************/
#define ERROR_LIBDATA_MESSAGE "Can't edit external libdata"
@@ -407,10 +505,12 @@ void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname
static void modifiers_setOnCage(bContext *C, void *ob_v, void *md_v)
{
Object *ob = ob_v;
- ModifierData *md;
-
+ ModifierData *md= md_v;
int i, cageIndex = modifiers_getCageIndex(ob, NULL );
+ /* undo button operation */
+ md->mode ^= eModifierMode_OnCage;
+
for(i = 0, md=ob->modifiers.first; md; ++i, md=md->next) {
if(md == md_v) {
if(i >= cageIndex)
@@ -433,6 +533,8 @@ static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v)
nmd->mode &= ~eModifierMode_Virtual;
BLI_addhead(&ob->modifiers, nmd);
+
+ modifier_unique_name(&ob->modifiers, nmd);
ob->partype = PAROBJECT;
@@ -519,9 +621,10 @@ static uiLayout *draw_modifier(uiLayout *layout, Object *ob, ModifierData *md, i
/* XXX uiBlockSetEmboss(block, UI_EMBOSSR); */
if(ob->type==OB_MESH && modifier_couldBeCage(md) && index<=lastCageIndex) {
-
/* XXX uiBlockSetCol(block, color); */
- but = uiDefIconBut(block, BUT, 0, ICON_MESH_DATA, 0, 0, 16, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Apply modifier to editing cage during Editmode");
+ but = uiDefIconButBitI(block, TOG, eModifierMode_OnCage, 0, ICON_MESH_DATA, 0, 0, 16, 20, &md->mode, 0.0, 0.0, 0.0, 0.0, "Apply modifier to editing cage during Editmode");
+ if(index < cageIndex)
+ uiButSetFlag(but, UI_BUT_DISABLED);
uiButSetFunc(but, modifiers_setOnCage, ob, md);
uiBlockEndAlign(block);
/* XXX uiBlockSetCol(block, TH_AUTO); */
@@ -532,14 +635,14 @@ static uiLayout *draw_modifier(uiLayout *layout, Object *ob, ModifierData *md, i
if(!isVirtual) {
/* XXX uiBlockSetCol(block, TH_BUT_ACTION); */
uiBlockBeginAlign(block);
- uiItemO(row, "", VICON_MOVE_UP, "OBJECT_OT_modifier_move_up");
- uiItemO(row, "", VICON_MOVE_DOWN, "OBJECT_OT_modifier_move_down");
+ uiItemO(row, "", ICON_TRIA_UP, "OBJECT_OT_modifier_move_up");
+ uiItemO(row, "", ICON_TRIA_DOWN, "OBJECT_OT_modifier_move_down");
uiBlockEndAlign(block);
uiBlockSetEmboss(block, UI_EMBOSSN);
if(modifier_can_delete(md))
- uiItemO(row, "", VICON_X, "OBJECT_OT_modifier_remove");
+ uiItemO(row, "", ICON_X, "OBJECT_OT_modifier_remove");
/* XXX uiBlockSetCol(block, TH_AUTO); */
}
@@ -575,7 +678,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Object *ob, ModifierData *md, i
}
result= uiLayoutColumn(box, 0);
- block= uiLayoutFreeBlock(box);
+ block= uiLayoutAbsoluteBlock(box);
}
if(md->error) {
@@ -675,6 +778,8 @@ void do_constraint_panels(bContext *C, void *arg, int event)
if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
else DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
// XXX allqueue(REDRAWVIEW3D, 0);
// XXX allqueue(REDRAWBUTSOBJECT, 0);
@@ -686,19 +791,15 @@ static void constraint_active_func(bContext *C, void *ob_v, void *con_v)
ED_object_constraint_set_active(ob_v, con_v);
}
-static void verify_constraint_name_func (bContext *C, void *con_v, void *name_v)
+static void verify_constraint_name_func (bContext *C, void *con_v, void *dummy)
{
Object *ob= CTX_data_active_object(C);
bConstraint *con= con_v;
- char oldname[32];
if (!con)
return;
- /* put on the stack */
- BLI_strncpy(oldname, (char *)name_v, 32);
-
- ED_object_constraint_rename(ob, con, oldname);
+ ED_object_constraint_rename(ob, con, NULL);
ED_object_constraint_set_active(ob, con);
// XXX allqueue(REDRAWACTION, 0);
}
@@ -764,6 +865,22 @@ static void draw_constraint_spaceselect (uiBlock *block, bConstraint *con, short
}
}
+static void test_obpoin_but(bContext *C, char *name, ID **idpp)
+{
+ ID *id;
+
+ id= CTX_data_main(C)->object.first;
+ while(id) {
+ if( strcmp(name, id->name+2)==0 ) {
+ *idpp= id;
+ id_lib_extern(id); /* checks lib data, sets correct flag for saving then */
+ return;
+ }
+ id= id->next;
+ }
+ *idpp= NULL;
+}
+
/* draw panel showing settings for a constraint */
static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
{
@@ -881,16 +998,17 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
uiBlockSetEmboss(block, UI_EMBOSS);
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");
+ uiDefIconButO(block, BUT, "CONSTRAINT_OT_move_up", WM_OP_INVOKE_DEFAULT, ICON_TRIA_UP, xco+width-50, yco, 16, 18, "Move constraint up in constraint stack");
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");
+ uiDefIconButO(block, BUT, "CONSTRAINT_OT_move_down", WM_OP_INVOKE_DEFAULT, ICON_TRIA_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);
+ uiDefIconButBitS(block, ICONTOGN, CONSTRAINT_OFF, B_CONSTRAINT_TEST, ICON_CHECKBOX_DEHLT, xco+243, yco, 19, 19, &con->flag, 0.0, 0.0, 0.0, 0.0, "enable/disable constraint");
+
uiDefIconButO(block, BUT, "CONSTRAINT_OT_delete", WM_OP_INVOKE_DEFAULT, ICON_X, xco+262, yco, 19, 19, "Delete constraint");
uiBlockSetEmboss(block, UI_EMBOSS);
}
@@ -905,7 +1023,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
}
else {
box= uiLayoutBox(col);
- block= uiLayoutFreeBlock(box);
+ block= uiLayoutAbsoluteBlock(box);
switch (con->type) {
#ifndef DISABLE_PYTHON
@@ -958,11 +1076,11 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
/* subtarget */
if (is_armature_target(ct->tar)) {
but= uiDefBut(block, TEX, B_CONSTRAINT_CHANGETARGET, "BO:", xco+120, yco-(66+yoffset),150,18, &ct->subtarget, 0, 24, 0, 0, "Subtarget Bone");
- uiButSetCompleteFunc(but, autocomplete_bone, (void *)ct->tar);
+ //uiButSetCompleteFunc(but, autocomplete_bone, (void *)ct->tar);
}
else if (is_geom_target(ct->tar)) {
but= uiDefBut(block, TEX, B_CONSTRAINT_CHANGETARGET, "VG:", xco+120, yco-(66+yoffset),150,18, &ct->subtarget, 0, 24, 0, 0, "Name of Vertex Group defining 'target' points");
- uiButSetCompleteFunc(but, autocomplete_vgroup, (void *)ct->tar);
+ //uiButSetCompleteFunc(but, autocomplete_vgroup, (void *)ct->tar);
}
else {
strcpy(ct->subtarget, "");
@@ -1141,7 +1259,7 @@ uiLayout *uiTemplateGroup(uiLayout *layout, Object *ob, Group *group)
xco = 290;
if(group->id.lib==0) { /* cant remove objects from linked groups */
- but = uiDefIconBut(block, BUT, B_NOP, VICON_X, xco, 120-yco, 20, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Remove Group membership");
+ but = uiDefIconBut(block, BUT, B_NOP, ICON_X, xco, 120-yco, 20, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Remove Group membership");
uiButSetFunc(but, group_ob_rem, group, ob);
}
}
@@ -1241,54 +1359,501 @@ void uiTemplatePreview(uiLayout *layout, ID *id, ID *parent, MTex *slot)
/********************** ColorRamp Template **************************/
-void uiTemplateColorRamp(uiLayout *layout, ColorBand *coba, int expand)
+#include "BKE_texture.h"
+
+typedef struct RNAUpdateCb {
+ PointerRNA ptr;
+ PropertyRNA *prop;
+} RNAUpdateCb;
+
+static void rna_update_cb(bContext *C, void *arg_cb, void *arg_unused)
+{
+ RNAUpdateCb *cb= (RNAUpdateCb*)arg_cb;
+
+ /* we call update here on the pointer property, this way the
+ owner of the curve mapping can still define it's own update
+ and notifier, even if the CurveMapping struct is shared. */
+ RNA_property_update(C, &cb->ptr, cb->prop);
+}
+
+#define B_BANDCOL 1
+
+static int vergcband(const void *a1, const void *a2)
+{
+ const CBData *x1=a1, *x2=a2;
+
+ if( x1->pos > x2->pos ) return 1;
+ else if( x1->pos < x2->pos) return -1;
+ return 0;
+}
+
+static void colorband_pos_cb(bContext *C, void *cb_v, void *coba_v)
+{
+ ColorBand *coba= coba_v;
+ int a;
+
+ if(coba->tot<2) return;
+
+ for(a=0; a<coba->tot; a++) coba->data[a].cur= a;
+ qsort(coba->data, coba->tot, sizeof(CBData), vergcband);
+ for(a=0; a<coba->tot; a++) {
+ if(coba->data[a].cur==coba->cur) {
+ coba->cur= a;
+ break;
+ }
+ }
+
+ rna_update_cb(C, cb_v, NULL);
+}
+
+static void colorband_add_cb(bContext *C, void *cb_v, void *coba_v)
+{
+ ColorBand *coba= coba_v;
+
+ if(coba->tot < MAXCOLORBAND-1) coba->tot++;
+ coba->cur= coba->tot-1;
+
+ colorband_pos_cb(C, cb_v, coba_v);
+
+ ED_undo_push(C, "Add colorband");
+}
+
+static void colorband_del_cb(bContext *C, void *cb_v, void *coba_v)
+{
+ ColorBand *coba= coba_v;
+ int a;
+
+ if(coba->tot<2) return;
+
+ for(a=coba->cur; a<coba->tot; a++) {
+ coba->data[a]= coba->data[a+1];
+ }
+ if(coba->cur) coba->cur--;
+ coba->tot--;
+
+ ED_undo_push(C, "Delete colorband");
+
+ rna_update_cb(C, cb_v, NULL);
+}
+
+
+/* offset aligns from bottom, standard width 300, height 115 */
+static void colorband_buttons_large(uiBlock *block, ColorBand *coba, int xoffs, int yoffs, RNAUpdateCb *cb)
+{
+
+ uiBut *bt;
+
+ if(coba==NULL) return;
+
+ bt= uiDefBut(block, BUT, 0, "Add", 0+xoffs,100+yoffs,50,20, 0, 0, 0, 0, 0, "Add a new color stop to the colorband");
+ uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba);
+
+ bt= uiDefBut(block, BUT, 0, "Delete", 60+xoffs,100+yoffs,50,20, 0, 0, 0, 0, 0, "Delete the active position");
+ uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba);
+
+ uiDefButS(block, NUM, 0, "", 120+xoffs,100+yoffs,80, 20, &coba->cur, 0.0, (float)(MAX2(0, coba->tot-1)), 0, 0, "Choose active color stop");
+
+ bt= uiDefButS(block, MENU, 0, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4",
+ 210+xoffs, 100+yoffs, 90, 20, &coba->ipotype, 0.0, 0.0, 0, 0, "Set interpolation between color stops");
+ uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
+ uiBlockEndAlign(block);
+
+ bt= uiDefBut(block, BUT_COLORBAND, 0, "", xoffs,65+yoffs,300,30, coba, 0, 0, 0, 0, "");
+ uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
+
+ if(coba->tot) {
+ CBData *cbd= coba->data + coba->cur;
+
+ bt= uiDefButF(block, NUM, 0, "Pos:", 0+xoffs,40+yoffs,100, 20, &cbd->pos, 0.0, 1.0, 10, 0, "The position of the active color stop");
+ uiButSetNFunc(bt, colorband_pos_cb, MEM_dupallocN(cb), coba);
+ bt= uiDefButF(block, COL, 0, "", 110+xoffs,40+yoffs,80,20, &(cbd->r), 0, 0, 0, B_BANDCOL, "The color value for the active color stop");
+ uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
+ bt= uiDefButF(block, NUMSLI, 0, "A ", 200+xoffs,40+yoffs,100,20, &cbd->a, 0.0, 1.0, 10, 0, "The alpha value of the active color stop");
+ uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
+ }
+
+}
+
+static void colorband_buttons_small(uiBlock *block, ColorBand *coba, rctf *butr, RNAUpdateCb *cb)
+{
+ uiBut *bt;
+ float unit= (butr->xmax-butr->xmin)/14.0f;
+ float xs= butr->xmin;
+
+
+ bt= uiDefBut(block, BUT, 0, "Add", xs,butr->ymin+20.0f,2.0f*unit,20, NULL, 0, 0, 0, 0, "Add a new color stop to the colorband");
+ uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba);
+ bt= uiDefBut(block, BUT, 0, "Delete", xs+2.0f*unit,butr->ymin+20.0f,2.0f*unit,20, NULL, 0, 0, 0, 0, "Delete the active position");
+ uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba);
+
+ if(coba->tot) {
+ CBData *cbd= coba->data + coba->cur;
+ bt= uiDefButF(block, COL, 0, "", xs+4.0f*unit,butr->ymin+20.0f,2.0f*unit,20, &(cbd->r), 0, 0, 0, B_BANDCOL, "The color value for the active color stop");
+ uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
+ bt= uiDefButF(block, NUMSLI, 0, "A:", xs+6.0f*unit,butr->ymin+20.0f,4.0f*unit,20, &(cbd->a), 0.0f, 1.0f, 10, 2, "The alpha value of the active color stop");
+ uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
+ }
+
+ bt= uiDefButS(block, MENU, 0, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4",
+ xs+10.0f*unit, butr->ymin+20.0f, unit*4, 20, &coba->ipotype, 0.0, 0.0, 0, 0, "Set interpolation between color stops");
+ uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
+
+ bt= uiDefBut(block, BUT_COLORBAND, 0, "", xs,butr->ymin,butr->xmax-butr->xmin,20.0f, coba, 0, 0, 0, 0, "");
+ uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
+
+ uiBlockEndAlign(block);
+}
+
+static void colorband_buttons_layout(uiBlock *block, ColorBand *coba, rctf *butr, int small, RNAUpdateCb *cb)
+{
+ if(small)
+ colorband_buttons_small(block, coba, butr, cb);
+ else
+ colorband_buttons_large(block, coba, 0, 0, cb);
+}
+
+void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, char *propname, int expand)
{
+ PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
+ PointerRNA cptr;
+ RNAUpdateCb *cb;
uiBlock *block;
rctf rect;
- if(coba) {
- rect.xmin= 0; rect.xmax= 200;
- rect.ymin= 0; rect.ymax= 190;
-
- block= uiLayoutFreeBlock(layout);
- colorband_buttons(block, coba, &rect, !expand);
- }
+ if(!prop || RNA_property_type(prop) != PROP_POINTER)
+ return;
+
+ cptr= RNA_property_pointer_get(ptr, prop);
+ if(!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_ColorRamp))
+ return;
+
+ cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb");
+ cb->ptr= *ptr;
+ cb->prop= prop;
+
+ rect.xmin= 0; rect.xmax= 200;
+ rect.ymin= 0; rect.ymax= 190;
+
+ block= uiLayoutAbsoluteBlock(layout);
+ colorband_buttons_layout(block, cptr.data, &rect, !expand, cb);
+
+ MEM_freeN(cb);
}
/********************* CurveMapping Template ************************/
#include "DNA_color_types.h"
+#include "BKE_colortools.h"
-void uiTemplateCurveMapping(uiLayout *layout, CurveMapping *cumap, int type, int compact)
+static void curvemap_buttons_zoom_in(bContext *C, void *cumap_v, void *unused)
{
- rctf rect;
+ CurveMapping *cumap = cumap_v;
+ float d;
+
+ /* we allow 20 times zoom */
+ if( (cumap->curr.xmax - cumap->curr.xmin) > 0.04f*(cumap->clipr.xmax - cumap->clipr.xmin) ) {
+ d= 0.1154f*(cumap->curr.xmax - cumap->curr.xmin);
+ cumap->curr.xmin+= d;
+ cumap->curr.xmax-= d;
+ d= 0.1154f*(cumap->curr.ymax - cumap->curr.ymin);
+ cumap->curr.ymin+= d;
+ cumap->curr.ymax-= d;
+ }
+
+ ED_region_tag_redraw(CTX_wm_region(C));
+}
+
+static void curvemap_buttons_zoom_out(bContext *C, void *cumap_v, void *unused)
+{
+ CurveMapping *cumap = cumap_v;
+ float d, d1;
+
+ /* we allow 20 times zoom, but dont view outside clip */
+ if( (cumap->curr.xmax - cumap->curr.xmin) < 20.0f*(cumap->clipr.xmax - cumap->clipr.xmin) ) {
+ d= d1= 0.15f*(cumap->curr.xmax - cumap->curr.xmin);
+
+ if(cumap->flag & CUMA_DO_CLIP)
+ if(cumap->curr.xmin-d < cumap->clipr.xmin)
+ d1= cumap->curr.xmin - cumap->clipr.xmin;
+ cumap->curr.xmin-= d1;
+
+ d1= d;
+ if(cumap->flag & CUMA_DO_CLIP)
+ if(cumap->curr.xmax+d > cumap->clipr.xmax)
+ d1= -cumap->curr.xmax + cumap->clipr.xmax;
+ cumap->curr.xmax+= d1;
+
+ d= d1= 0.15f*(cumap->curr.ymax - cumap->curr.ymin);
+
+ if(cumap->flag & CUMA_DO_CLIP)
+ if(cumap->curr.ymin-d < cumap->clipr.ymin)
+ d1= cumap->curr.ymin - cumap->clipr.ymin;
+ cumap->curr.ymin-= d1;
+
+ d1= d;
+ if(cumap->flag & CUMA_DO_CLIP)
+ if(cumap->curr.ymax+d > cumap->clipr.ymax)
+ d1= -cumap->curr.ymax + cumap->clipr.ymax;
+ cumap->curr.ymax+= d1;
+ }
+
+ ED_region_tag_redraw(CTX_wm_region(C));
+}
+
+static void curvemap_buttons_setclip(bContext *C, void *cumap_v, void *unused)
+{
+ CurveMapping *cumap = cumap_v;
+
+ curvemapping_changed(cumap, 0);
+}
+
+static void curvemap_buttons_delete(bContext *C, void *cb_v, void *cumap_v)
+{
+ CurveMapping *cumap = cumap_v;
+
+ curvemap_remove(cumap->cm+cumap->cur, SELECT);
+ curvemapping_changed(cumap, 0);
+
+ rna_update_cb(C, cb_v, NULL);
+}
+
+/* NOTE: this is a block-menu, needs 0 events, otherwise the menu closes */
+static uiBlock *curvemap_clipping_func(bContext *C, struct ARegion *ar, void *cumap_v)
+{
+ CurveMapping *cumap = cumap_v;
+ uiBlock *block;
+ uiBut *bt;
+
+ block= uiBeginBlock(C, ar, "curvemap_clipping_func", UI_EMBOSS);
+
+ /* use this for a fake extra empy space around the buttons */
+ uiDefBut(block, LABEL, 0, "", -4, 16, 128, 106, NULL, 0, 0, 0, 0, "");
+
+ bt= uiDefButBitI(block, TOG, CUMA_DO_CLIP, 1, "Use Clipping",
+ 0,100,120,18, &cumap->flag, 0.0, 0.0, 10, 0, "");
+ uiButSetFunc(bt, curvemap_buttons_setclip, cumap, NULL);
+
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, 0, "Min X ", 0,74,120,18, &cumap->clipr.xmin, -100.0, cumap->clipr.xmax, 10, 0, "");
+ uiDefButF(block, NUM, 0, "Min Y ", 0,56,120,18, &cumap->clipr.ymin, -100.0, cumap->clipr.ymax, 10, 0, "");
+ uiDefButF(block, NUM, 0, "Max X ", 0,38,120,18, &cumap->clipr.xmax, cumap->clipr.xmin, 100.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "Max Y ", 0,20,120,18, &cumap->clipr.ymax, cumap->clipr.ymin, 100.0, 10, 0, "");
+
+ uiBlockSetDirection(block, UI_RIGHT);
+
+ uiEndBlock(C, block);
+ return block;
+}
+
+static void curvemap_tools_dofunc(bContext *C, void *cumap_v, int event)
+{
+ CurveMapping *cumap = cumap_v;
+ CurveMap *cuma= cumap->cm+cumap->cur;
+
+ switch(event) {
+ case 0:
+ curvemap_reset(cuma, &cumap->clipr);
+ curvemapping_changed(cumap, 0);
+ break;
+ case 1:
+ cumap->curr= cumap->clipr;
+ break;
+ case 2: /* set vector */
+ curvemap_sethandle(cuma, 1);
+ curvemapping_changed(cumap, 0);
+ break;
+ case 3: /* set auto */
+ curvemap_sethandle(cuma, 0);
+ curvemapping_changed(cumap, 0);
+ break;
+ case 4: /* extend horiz */
+ cuma->flag &= ~CUMA_EXTEND_EXTRAPOLATE;
+ curvemapping_changed(cumap, 0);
+ break;
+ case 5: /* extend extrapolate */
+ cuma->flag |= CUMA_EXTEND_EXTRAPOLATE;
+ curvemapping_changed(cumap, 0);
+ break;
+ }
+ ED_region_tag_redraw(CTX_wm_region(C));
+}
+
+static uiBlock *curvemap_tools_func(bContext *C, struct ARegion *ar, void *cumap_v)
+{
+ uiBlock *block;
+ short yco= 0, menuwidth=120;
+
+ block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS);
+ uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset View", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Vector Handle", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Auto Handle", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Horizontal", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Extrapolated", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset Curve", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiBlockSetDirection(block, UI_RIGHT);
+ uiTextBoundsBlock(block, 50);
+
+ uiEndBlock(C, block);
+ return block;
+}
+
+static void curvemap_buttons_redraw(bContext *C, void *arg1, void *arg2)
+{
+ ED_region_tag_redraw(CTX_wm_region(C));
+}
+
+static void curvemap_buttons_reset(bContext *C, void *cb_v, void *cumap_v)
+{
+ CurveMapping *cumap = cumap_v;
+ int a;
+
+ for(a=0; a<CM_TOT; a++)
+ curvemap_reset(cumap->cm+a, &cumap->clipr);
+
+ cumap->black[0]=cumap->black[1]=cumap->black[2]= 0.0f;
+ cumap->white[0]=cumap->white[1]=cumap->white[2]= 1.0f;
+ curvemapping_set_black_white(cumap, NULL, NULL);
+
+ curvemapping_changed(cumap, 0);
+
+ rna_update_cb(C, cb_v, NULL);
+}
+
+/* still unsure how this call evolves... we use labeltype for defining what curve-channels to show */
+static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labeltype, int levels, RNAUpdateCb *cb)
+{
+ CurveMapping *cumap= ptr->data;
+ uiLayout *row, *sub, *split;
+ uiBlock *block;
+ uiBut *bt;
+ float dx= UI_UNIT_X;
+ int icon, size;
+
+ block= uiLayoutGetBlock(layout);
+
+ /* curve chooser */
+ row= uiLayoutRow(layout, 0);
- if(cumap) {
- if(compact) {
- rect.xmin= 0; rect.xmax= 150;
- rect.ymin= 0; rect.ymax= 140;
+ if(labeltype=='v') {
+ /* vector */
+ sub= uiLayoutRow(row, 1);
+ uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT);
+
+ if(cumap->cm[0].curve) {
+ bt= uiDefButI(block, ROW, 0, "X", 0, 0, dx, 16, &cumap->cur, 0.0, 0.0, 0.0, 0.0, "");
+ uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
}
- else {
- rect.xmin= 0; rect.xmax= 200;
- rect.ymin= 0; rect.ymax= 190;
+ if(cumap->cm[1].curve) {
+ bt= uiDefButI(block, ROW, 0, "Y", 0, 0, dx, 16, &cumap->cur, 0.0, 1.0, 0.0, 0.0, "");
+ uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
}
-
- curvemap_layout(layout, cumap, type, 0, 0, &rect);
+ if(cumap->cm[2].curve) {
+ bt= uiDefButI(block, ROW, 0, "Z", 0, 0, dx, 16, &cumap->cur, 0.0, 2.0, 0.0, 0.0, "");
+ uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
+ }
+ }
+ else if(labeltype=='c') {
+ /* color */
+ sub= uiLayoutRow(row, 1);
+ uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT);
+
+ if(cumap->cm[3].curve) {
+ bt= uiDefButI(block, ROW, 0, "C", 0, 0, dx, 16, &cumap->cur, 0.0, 3.0, 0.0, 0.0, "");
+ uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
+ }
+ if(cumap->cm[0].curve) {
+ bt= uiDefButI(block, ROW, 0, "R", 0, 0, dx, 16, &cumap->cur, 0.0, 0.0, 0.0, 0.0, "");
+ uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
+ }
+ if(cumap->cm[1].curve) {
+ bt= uiDefButI(block, ROW, 0, "G", 0, 0, dx, 16, &cumap->cur, 0.0, 1.0, 0.0, 0.0, "");
+ uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
+ }
+ if(cumap->cm[2].curve) {
+ bt= uiDefButI(block, ROW, 0, "B", 0, 0, dx, 16, &cumap->cur, 0.0, 2.0, 0.0, 0.0, "");
+ uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
+ }
+ }
+ else
+ uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_RIGHT);
+
+ /* operation buttons */
+ sub= uiLayoutRow(row, 1);
+
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+
+ bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, 0, 0, dx, 14, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom in");
+ uiButSetFunc(bt, curvemap_buttons_zoom_in, cumap, NULL);
+
+ bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMOUT, 0, 0, dx, 14, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom out");
+ uiButSetFunc(bt, curvemap_buttons_zoom_out, cumap, NULL);
+
+ bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, 18, "Tools");
+ uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
+
+ if(cumap->flag & CUMA_DO_CLIP) icon= ICON_CLIPUV_HLT; else icon= ICON_CLIPUV_DEHLT;
+ bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, 0, icon, 0, 0, dx, 18, "Clipping Options");
+ uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
+
+ bt= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, dx, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Delete points");
+ uiButSetNFunc(bt, curvemap_buttons_delete, MEM_dupallocN(cb), cumap);
+
+ uiBlockSetEmboss(block, UI_EMBOSS);
+
+ uiBlockSetNFunc(block, rna_update_cb, MEM_dupallocN(cb), NULL);
+
+ /* curve itself */
+ size= uiLayoutGetWidth(layout);
+ row= uiLayoutRow(layout, 0);
+ uiDefBut(block, BUT_CURVE, 0, "", 0, 0, size, MIN2(size, 200), cumap, 0.0f, 1.0f, 0, 0, "");
+
+ /* black/white levels */
+ if(levels) {
+ split= uiLayoutSplit(layout, 0);
+ uiItemR(uiLayoutColumn(split, 0), NULL, 0, ptr, "black_level", UI_ITEM_R_EXPAND);
+ uiItemR(uiLayoutColumn(split, 0), NULL, 0, ptr, "white_level", UI_ITEM_R_EXPAND);
+
+ uiLayoutRow(layout, 0);
+ bt=uiDefBut(block, BUT, 0, "Reset", 0, 0, UI_UNIT_X*10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Reset Black/White point and curves");
+ uiButSetNFunc(bt, curvemap_buttons_reset, MEM_dupallocN(cb), cumap);
}
+
+ uiBlockSetNFunc(block, NULL, NULL, NULL);
+}
+
+void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, char *propname, int type, int levels)
+{
+ RNAUpdateCb *cb;
+ PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
+ PointerRNA cptr;
+
+ if(!prop || RNA_property_type(prop) != PROP_POINTER)
+ return;
+
+ cptr= RNA_property_pointer_get(ptr, prop);
+ if(!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_CurveMapping))
+ return;
+
+ cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb");
+ cb->ptr= *ptr;
+ cb->prop= prop;
+
+ curvemap_buttons_layout(layout, &cptr, type, levels, cb);
+
+ MEM_freeN(cb);
}
/********************* TriColor (ThemeWireColorSet) Template ************************/
void uiTemplateTriColorSet(uiLayout *layout, PointerRNA *ptr, char *propname)
{
+ PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
uiLayout *row;
- PropertyRNA *prop;
PointerRNA csPtr;
-
- if (!ptr->data)
- return;
-
- prop= RNA_struct_find_property(ptr, propname);
+
if (!prop) {
printf("uiTemplateTriColorSet: property not found: %s\n", propname);
return;
@@ -1319,9 +1884,6 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, char *propname)
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);
@@ -1382,6 +1944,36 @@ static void list_item_add(ListBase *lb, ListBase *itemlb, uiLayout *layout, Poin
}
#endif
+static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon)
+{
+ ID *id= NULL;
+ int icon;
+
+ if(!itemptr->data)
+ return rnaicon;
+
+ /* try ID, material or texture slot */
+ if(RNA_struct_is_ID(itemptr->type)) {
+ id= itemptr->id.data;
+ }
+ else if(RNA_struct_is_a(itemptr->type, &RNA_MaterialSlot)) {
+ id= RNA_pointer_get(itemptr, "material").data;
+ }
+ else if(RNA_struct_is_a(itemptr->type, &RNA_TextureSlot)) {
+ id= RNA_pointer_get(itemptr, "texture").data;
+ }
+
+ /* get icon from ID */
+ if(id) {
+ icon= ui_id_icon_get(C, id);
+
+ if(icon)
+ return icon;
+ }
+
+ return rnaicon;
+}
+
ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname, PointerRNA *activeptr, char *activepropname, int rows, int listtype)
{
//Scene *scene= CTX_data_scene(C);
@@ -1394,7 +1986,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr
Panel *pa;
ListBase lb, *itemlb;
char *name, str[32];
- int icon=0, i= 0, activei= 0, len= 0, items, found, min, max;
+ int rnaicon=0, icon=0, i= 0, activei= 0, len= 0, items, found, min, max;
lb.first= lb.last= NULL;
@@ -1441,7 +2033,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr
/* get icon */
if(ptr->data && prop) {
ptype= RNA_property_pointer_type(ptr, prop);
- icon= RNA_struct_ui_icon(ptype);
+ rnaicon= RNA_struct_ui_icon(ptype);
}
/* get active data */
@@ -1461,15 +2053,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr
if(i == 9)
row= uiLayoutRow(col, 0);
- if(RNA_struct_is_a(itemptr.type, &RNA_TextureSlot)) {
-#if 0
- MTex *mtex= itemptr.data;
-
- if(mtex && mtex->tex)
- icon= ui_id_icon_get(scene, &mtex->tex->id);
-#endif
- }
-
+ icon= list_item_icon_get(C, &itemptr, rnaicon);
uiDefIconButR(block, LISTROW, 0, icon, 0,0,UI_UNIT_X*10,UI_UNIT_Y, activeptr, activepropname, 0, 0, i, 0, 0, "");
//list_item_add(&lb, itemlb, uiLayoutRow(row, 1), &itemptr);
@@ -1493,6 +2077,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr
if(found) {
/* create button */
name= RNA_struct_name_get_alloc(&itemptr, NULL, 0);
+ icon= list_item_icon_get(C, &itemptr, rnaicon);
uiItemL(row, (name)? name: "", icon);
if(name)
@@ -1546,6 +2131,8 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr
name= RNA_struct_name_get_alloc(&itemptr, NULL, 0);
subrow= uiLayoutRow(col, 0);
+
+ icon= list_item_icon_get(C, &itemptr, rnaicon);
/* create button */
if(!icon || icon == ICON_DOT)
@@ -1560,6 +2147,10 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr
uiDefIconButR(block, TOG, 0, ICON_SCENE, 0, 0, UI_UNIT_X, UI_UNIT_Y, &itemptr, "active_render", 0, 0, 0, 0, 0, NULL);
uiBlockSetEmboss(block, UI_EMBOSS);
}
+ else if (itemptr.type == &RNA_MaterialTextureSlot) {
+ uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, ptr, "use_textures", i, 0, 0, 0, 0, NULL);
+ }
+ /* XXX - end hardcoded cruft */
if(name)
MEM_freeN(name);
@@ -1593,7 +2184,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr
/************************* Operator Search Template **************************/
-static void operator_call_cb(struct bContext *C, void *arg1, void *arg2)
+static void operator_call_cb(bContext *C, void *arg1, void *arg2)
{
wmOperatorType *ot= arg2;
@@ -1601,14 +2192,14 @@ static void operator_call_cb(struct bContext *C, void *arg1, void *arg2)
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)
+static void operator_search_cb(const 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(WM_operator_poll((bContext*)C, ot)) {
char name[256];
int len= strlen(ot->name);
@@ -1675,24 +2266,11 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
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");
+ uiDefIconTextBut(block, BUT, B_STOPRENDER, ICON_CANCEL, "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");
+ uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_CANCEL, "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");
+ uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_CANCEL, "Anim Player", 0,0,100,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Stop animation playback");
}
-/************************* Image Template **************************/
-
-#include "ED_image.h"
-
-void uiTemplateTextureImage(uiLayout *layout, bContext *C, Tex *tex)
-{
- uiBlock *block;
-
- if(tex) {
- block= uiLayoutFreeBlock(layout);
- ED_image_uiblock_panel(C, block, &tex->ima, &tex->iuser, 0, 0);
- }
-}
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index 539c71cc497..eca4eef230c 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -23,31 +23,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#include <math.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "MEM_guardedalloc.h"
-
-#include "DNA_action_types.h"
-#include "DNA_color_types.h"
-#include "DNA_listBase.h"
-#include "DNA_material_types.h"
-#include "DNA_lamp_types.h""
#include "DNA_object_types.h"
-#include "DNA_screen_types.h"
-#include "DNA_texture_types.h"
-#include "DNA_windowmanager_types.h"
-
-#include "BLI_blenlib.h"
-#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"
#include "BKE_utildefines.h"
#include "RNA_access.h"
@@ -55,18 +37,6 @@
#include "UI_interface.h"
#include "UI_resources.h"
-#include "ED_screen.h"
-#include "ED_util.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "interface_intern.h"
-
-#define DEF_BUT_WIDTH 150
-#define DEF_ICON_BUT_WIDTH 20
-#define DEF_BUT_HEIGHT 20
-
/*************************** RNA Utilities ******************************/
uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int index, char *name, int icon, int x1, int y1, int x2, int y2)
@@ -103,7 +73,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
if(RNA_property_subtype(prop) == PROP_COLOR)
but= uiDefButR(block, COL, 0, name, x1, y1, x2, y2, ptr, propname, 0, 0, 0, -1, -1, NULL);
}
- else if(RNA_property_subtype(prop) == PROP_PERCENTAGE)
+ else if(RNA_property_subtype(prop) == PROP_PERCENTAGE || RNA_property_subtype(prop) == PROP_FACTOR)
but= uiDefButR(block, NUMSLI, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
else
but= uiDefButR(block, NUM, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
@@ -156,10 +126,12 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
void uiDefAutoButsRNA(const bContext *C, uiLayout *layout, PointerRNA *ptr, int columns)
{
uiLayout *split, *col;
+ int flag;
char *name;
RNA_STRUCT_BEGIN(ptr, prop) {
- if(strcmp(RNA_property_identifier(prop), "rna_type") == 0)
+ flag= RNA_property_flag(prop);
+ if(flag & PROP_HIDDEN)
continue;
name= (char*)RNA_property_ui_name(prop);
@@ -177,1047 +149,38 @@ void uiDefAutoButsRNA(const bContext *C, uiLayout *layout, PointerRNA *ptr, int
else
col= NULL;
- /* temp hack to show normal button for spin/screw */
- if(strcmp(name, "Axis")==0) {
- uiDefButR(uiLayoutGetBlock(col), BUT_NORMAL, 0, name, 0, 0, 100, 100, ptr, "axis", -1, 0, 0, -1, -1, NULL);
- }
- else uiItemFullR(col, "", 0, ptr, prop, -1, 0, 0);
+ uiItemFullR(col, "", 0, ptr, prop, -1, 0, 0);
}
RNA_STRUCT_END;
}
/***************************** ID Utilities *******************************/
-/* note, C code version, will be replaced with version in interface_templates.c */
-
-typedef struct uiIDPoinParams {
- uiIDPoinFunc func;
- ListBase *lb;
- ID *id;
- short id_code;
- short browsenr;
-} uiIDPoinParams;
-
-static void idpoin_cb(bContext *C, void *arg_params, void *arg_event)
-{
- uiIDPoinParams *params= (uiIDPoinParams*)arg_params;
- ListBase *lb= params->lb;
- uiIDPoinFunc func= params->func;
- ID *id= params->id, *idtest;
- int nr, event= GET_INT_FROM_POINTER(arg_event);
-
- if(event == UI_ID_BROWSE && params->browsenr == 32767)
- event= UI_ID_ADD_NEW;
- else if(event == UI_ID_BROWSE && params->browsenr == 32766)
- event= UI_ID_OPEN;
-
- switch(event) {
- case UI_ID_RENAME:
- if(id) test_idbutton(id->name+2);
- else return;
- break;
- case UI_ID_BROWSE: {
- /* ID can be NULL, if nothing was assigned yet */
- if(lb->first==NULL) return;
-
- if(params->browsenr== -2) {
- /* XXX implement or find a replacement (ID can be NULL!)
- * activate_databrowse((ID *)G.buts->lockpoin, GS(id->name), 0, B_MESHBROWSE, &params->browsenr, do_global_buttons); */
- return;
- }
- if(params->browsenr < 0)
- return;
-
- for(idtest=lb->first, nr=1; idtest; idtest=idtest->next, nr++) {
- if(nr==params->browsenr) {
- if(id == idtest)
- return;
-
- id= idtest;
-
- break;
- }
- }
- break;
- }
- case UI_ID_DELETE:
- id= NULL;
- break;
- case UI_ID_FAKE_USER:
- if(id) {
- if(id->flag & LIB_FAKEUSER) id->us++;
- else id->us--;
- }
- else return;
- break;
- case UI_ID_PIN:
- break;
- case UI_ID_ADD_NEW:
- break;
- case UI_ID_OPEN:
- break;
- case UI_ID_ALONE:
- if(!id || id->us < 1)
- return;
- break;
- case UI_ID_LOCAL:
- if(!id || id->us < 1)
- return;
- break;
- case UI_ID_AUTO_NAME:
- break;
- }
-
- if(func)
- func(C, id, event);
-}
-
-/* ***************************** ID Search browse menu ********************** */
-
-static void id_search_call_cb(struct bContext *C, void *arg_params, void *item)
-{
- uiIDPoinParams *params= (uiIDPoinParams*)arg_params;
-
- if(item && params->func)
- params->func(C, item, UI_ID_BROWSE);
-
-}
-
-static void id_search_cb(const struct bContext *C, void *arg_params, char *str, uiSearchItems *items)
-{
- uiIDPoinParams *params= (uiIDPoinParams*)arg_params;
- 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, iconid))
- break;
- }
- }
-}
-
-static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_params)
-{
- static char search[256];
- static uiIDPoinParams params;
- wmEvent event;
- wmWindow *win= CTX_wm_window(C);
- uiBlock *block;
- uiBut *but;
-
- /* clear initial search string, then all items show */
- search[0]= 0;
- /* params is malloced, can be freed by parent button */
- params= *((uiIDPoinParams*)arg_params);
-
- 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, &params, id_search_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;
-}
-
-/* ****************** */
-
-int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code, short *pin_p, int x, int y, uiIDPoinFunc func, int events)
-{
- uiBut *but;
- uiIDPoinParams *params, *dup_params;
- char str1[10];
- int len, add_addbutton=0;
-
- /* setup struct that we will pass on with the buttons */
- params= MEM_callocN(sizeof(uiIDPoinParams), "uiIDPoinParams");
- params->lb= wich_libbase(bmain, id_code);
- params->id= id;
- params->id_code= id_code;
- params->func= func;
-
- /* create buttons */
- uiBlockBeginAlign(block);
-
- /* XXX solve?
- if(id && id->us>1)
- uiBlockSetCol(block, TH_BUT_SETTING1);
-
- if((events & UI_ID_PIN) && *pin_p)
- uiBlockSetCol(block, TH_BUT_SETTING2);
- */
-
- /* pin button */
- if(id && (events & UI_ID_PIN)) {
- but= uiDefIconButS(block, ICONTOG, (events & UI_ID_PIN), ICON_KEY_DEHLT, x, y ,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, pin_p, 0, 0, 0, 0, "Keeps this view displaying the current data regardless of what object is selected");
- uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_PIN));
- x+= DEF_ICON_BUT_WIDTH;
- }
-
- /* browse menu */
- if(events & UI_ID_BROWSE) {
- uiDefBlockButN(block, id_search_menu, MEM_dupallocN(params), "", x, y, DEF_ICON_BUT_WIDTH, DEF_BUT_HEIGHT, "Browse ID data");
- x+= DEF_ICON_BUT_WIDTH;
- }
-
-
-
- /* text button with name */
- if(id) {
- /* XXX solve?
- if(id->us > 1)
- uiBlockSetCol(block, TH_BUT_SETTING1);
- */
- /* pinned data?
- if((events & UI_ID_PIN) && *pin_p)
- uiBlockSetCol(block, TH_BUT_SETTING2);
- */
- /* redalert overrides pin color
- if(id->us<=0)
- uiBlockSetCol(block, TH_REDALERT);
- */
- uiBlockSetButLock(block, id->lib!=0, "Can't edit external libdata");
-
- /* name button */
- text_idbutton(id, str1);
-
- if(GS(id->name)==ID_IP) len= 110;
- else if((y) && (GS(id->name)==ID_AC)) len= 100; // comes from button panel (poselib)
- else if(y) len= 140; // comes from button panel
- else len= 120;
-
- but= uiDefBut(block, TEX, 0, str1,x, y, (short)len, DEF_BUT_HEIGHT, id->name+2, 0.0, 21.0, 0, 0, "Displays current Datablock name. Click to change.");
- uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_RENAME));
-
- x+= len;
-
- uiBlockClearButLock(block);
-
- /* lib make local button */
- if(id->lib) {
- if(id->flag & LIB_INDIRECT) uiDefIconBut(block, BUT, 0, 0 /* XXX ICON_DATALIB */,x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, 0, 0, 0, 0, 0, "Indirect Library Datablock. Cannot change.");
- else {
- but= uiDefIconBut(block, BUT, 0, 0 /* XXX ICON_PARLIB */, x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, 0, 0, 0, 0, 0,
- (events & UI_ID_LOCAL)? "Direct linked Library Datablock. Click to make local.": "Direct linked Library Datablock, cannot make local.");
- uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_ALONE));
- }
-
- x+= DEF_ICON_BUT_WIDTH;
- }
-
- /* number of users / make local button */
- if((events & UI_ID_ALONE) && id->us>1) {
- int butwidth;
-
- uiBlockSetButLock(block, (events & UI_ID_PIN) && *pin_p, "Can't make pinned data single-user");
-
- sprintf(str1, "%d", id->us);
- butwidth= (id->us<10)? DEF_ICON_BUT_WIDTH: DEF_ICON_BUT_WIDTH+10;
-
- but= uiDefBut(block, BUT, 0, str1, x, y, butwidth, DEF_BUT_HEIGHT, 0, 0, 0, 0, 0, "Displays number of users of this data. Click to make a single-user copy.");
- uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_ALONE));
- x+= butwidth;
-
- uiBlockClearButLock(block);
- }
-
- /* add button */
- if(events & UI_ID_ADD_NEW) {
- uiBlockSetButLock(block, (events & UI_ID_PIN) && *pin_p, "Can't unlink pinned data");
- if(parid && parid->lib);
- else {
- dup_params= MEM_dupallocN(params);
- but= uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, &dup_params->browsenr, params->browsenr, 32767.0, 0, 0, "Add new data block");
- uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
- x+= DEF_ICON_BUT_WIDTH;
- }
-
- uiBlockClearButLock(block);
- }
-
- /* delete button */
- if(events & UI_ID_DELETE) {
- uiBlockSetButLock(block, (events & UI_ID_PIN) && *pin_p, "Can't unlink pinned data");
- if(parid && parid->lib);
- else {
- but= uiDefIconBut(block, BUT, 0, ICON_X, x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, 0, 0, 0, 0, 0, "Deletes link to this Datablock");
- uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_DELETE));
- x+= DEF_ICON_BUT_WIDTH;
- }
-
- uiBlockClearButLock(block);
- }
-
- /* auto name button */
- if(events & UI_ID_AUTO_NAME) {
- if(parid && parid->lib);
- else {
- but= uiDefIconBut(block, BUT, 0, ICON_AUTO,x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, 0, 0, 0, 0, 0, "Generates an automatic name");
- uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_AUTO_NAME));
- x+= DEF_ICON_BUT_WIDTH;
- }
- }
-
- /* fake user button */
- if(events & UI_ID_FAKE_USER) {
- but= uiDefButBitS(block, TOG, LIB_FAKEUSER, 0, "F", x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, &id->flag, 0, 0, 0, 0, "Saves this datablock even if it has no users");
- uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_FAKE_USER));
- x+= DEF_ICON_BUT_WIDTH;
- }
- }
- /* add new button */
- else if(add_addbutton) {
- if(parid) uiBlockSetButLock(block, parid->lib!=0, "Can't edit external libdata");
- dup_params= MEM_dupallocN(params);
- but= uiDefButS(block, TOG, 0, "Add New", x, y, 110, DEF_BUT_HEIGHT, &dup_params->browsenr, params->browsenr, 32767.0, 0, 0, "Add new data block");
- uiButSetNFunc(but, idpoin_cb, dup_params, SET_INT_IN_POINTER(UI_ID_ADD_NEW));
- x+= 110;
- }
-
- uiBlockEndAlign(block);
-
- MEM_freeN(params);
- return x;
-}
-
-/* currently only object-data types */
int uiIconFromID(ID *id)
{
- if (id==NULL)
- return 0;
-
- switch(GS(id->name)) {
- case ID_OB:
- {
- Object *ob= (Object *)id;
-
- switch(ob->type) {
- case OB_EMPTY:
- return ICON_EMPTY_DATA;
- case OB_CURVE:
- return ICON_CURVE_DATA;
- case OB_SURF:
- return ICON_SURFACE_DATA;
- case OB_FONT:
- return ICON_FONT_DATA;
- }
-
- return uiIconFromID(ob->data);
- }
- case ID_ME:
- return ICON_MESH_DATA;
- case ID_AR:
- return ICON_ARMATURE_DATA;
- case ID_MB:
- return ICON_META_DATA;
- case ID_CA:
- return ICON_CAMERA_DATA;
- case ID_LT:
- return ICON_LATTICE_DATA;
- case ID_CU:
- return ICON_CURVE_DATA;
- case ID_LA:
- {
- Lamp *la= (Lamp *)id;
- switch(la->type) {
- case LA_LOCAL:
- return ICON_LAMP_POINT;
- case LA_SUN:
- return ICON_LAMP_SUN;
- case LA_SPOT:
- return ICON_LAMP_SPOT;
- case LA_HEMI:
- return ICON_LAMP_HEMI;
- case LA_AREA:
- return ICON_LAMP_AREA;
- }
- return ICON_LAMP_DATA;
- }
- }
-
- return 0;
-}
-
-/* ****************************** default button callbacks ******************* */
-/* ************ LEGACY WARNING, only to get things work with 2.48 code! ****** */
-
-void test_idbutton_cb(struct bContext *C, void *namev, void *arg2)
-{
- char *name= namev;
-
- test_idbutton(name+2);
-}
-
-
-void test_scriptpoin_but(struct bContext *C, char *name, ID **idpp)
-{
- ID *id;
-
- id= CTX_data_main(C)->text.first;
- while(id) {
- if( strcmp(name, id->name+2)==0 ) {
- *idpp= id;
- return;
- }
- id= id->next;
- }
- *idpp= NULL;
-}
-
-void test_actionpoin_but(struct bContext *C, char *name, ID **idpp)
-{
- ID *id;
-
- id= CTX_data_main(C)->action.first;
- while(id) {
- if( strcmp(name, id->name+2)==0 ) {
- id_us_plus(id);
- *idpp= id;
- return;
- }
- id= id->next;
- }
- *idpp= NULL;
-}
-
-
-void test_obpoin_but(struct bContext *C, char *name, ID **idpp)
-{
- ID *id;
-
-// XXX if(idpp == (ID **)&(emptytex.object)) {
-// error("You must add a texture first");
-// *idpp= 0;
-// return;
-// }
-
- id= CTX_data_main(C)->object.first;
- while(id) {
- if( strcmp(name, id->name+2)==0 ) {
- *idpp= id;
- id_lib_extern(id); /* checks lib data, sets correct flag for saving then */
- return;
- }
- id= id->next;
- }
- *idpp= NULL;
-}
-
-/* tests for an object of type OB_MESH */
-void test_meshobpoin_but(struct bContext *C, char *name, ID **idpp)
-{
- ID *id;
-
- id = CTX_data_main(C)->object.first;
- while(id) {
- Object *ob = (Object *)id;
- if(ob->type == OB_MESH && strcmp(name, id->name + 2) == 0) {
- *idpp = id;
- /* checks lib data, sets correct flag for saving then */
- id_lib_extern(id);
- return;
- }
- id = id->next;
- }
- *idpp = NULL;
-}
-
-void test_meshpoin_but(struct bContext *C, char *name, ID **idpp)
-{
- ID *id;
-
- if( *idpp ) (*idpp)->us--;
-
- id= CTX_data_main(C)->mesh.first;
- while(id) {
- if( strcmp(name, id->name+2)==0 ) {
- *idpp= id;
- id_us_plus(id);
- return;
- }
- id= id->next;
- }
- *idpp= NULL;
-}
-
-void test_matpoin_but(struct bContext *C, char *name, ID **idpp)
-{
- ID *id;
-
- if( *idpp ) (*idpp)->us--;
-
- id= CTX_data_main(C)->mat.first;
- while(id) {
- if( strcmp(name, id->name+2)==0 ) {
- *idpp= id;
- id_us_plus(id);
- return;
- }
- id= id->next;
- }
- *idpp= NULL;
-}
-
-void test_scenepoin_but(struct bContext *C, char *name, ID **idpp)
-{
- ID *id;
-
- if( *idpp ) (*idpp)->us--;
-
- id= CTX_data_main(C)->scene.first;
- while(id) {
- if( strcmp(name, id->name+2)==0 ) {
- *idpp= id;
- id_us_plus(id);
- return;
- }
- id= id->next;
- }
- *idpp= NULL;
-}
-
-void test_grouppoin_but(struct bContext *C, char *name, ID **idpp)
-{
- ID *id;
-
- if( *idpp ) (*idpp)->us--;
-
- id= CTX_data_main(C)->group.first;
- while(id) {
- if( strcmp(name, id->name+2)==0 ) {
- *idpp= id;
- id_us_plus(id);
- return;
- }
- id= id->next;
- }
- *idpp= NULL;
-}
-
-void test_texpoin_but(struct bContext *C, char *name, ID **idpp)
-{
- ID *id;
-
- if( *idpp ) (*idpp)->us--;
-
- id= CTX_data_main(C)->tex.first;
- while(id) {
- if( strcmp(name, id->name+2)==0 ) {
- *idpp= id;
- id_us_plus(id);
- return;
- }
- id= id->next;
- }
- *idpp= NULL;
-}
-
-void test_imapoin_but(struct bContext *C, char *name, ID **idpp)
-{
- ID *id;
-
- if( *idpp ) (*idpp)->us--;
-
- id= CTX_data_main(C)->image.first;
- while(id) {
- if( strcmp(name, id->name+2)==0 ) {
- *idpp= id;
- id_us_plus(id);
- return;
- }
- id= id->next;
- }
- *idpp= NULL;
-}
-
-/* autocomplete callback for buttons */
-void autocomplete_bone(struct bContext *C, char *str, void *arg_v)
-{
- Object *ob= (Object *)arg_v;
-
- if(ob==NULL || ob->pose==NULL) return;
-
- /* search if str matches the beginning of name */
- if(str[0]) {
- AutoComplete *autocpl= autocomplete_begin(str, 32);
- bPoseChannel *pchan;
-
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next)
- autocomplete_do_name(autocpl, pchan->name);
-
- autocomplete_end(autocpl, str);
- }
-}
-
-/* autocomplete callback for buttons */
-void autocomplete_vgroup(struct bContext *C, char *str, void *arg_v)
-{
- Object *ob= (Object *)arg_v;
-
- if(ob==NULL) return;
-
- /* search if str matches the beginning of a name */
- if(str[0]) {
- AutoComplete *autocpl= autocomplete_begin(str, 32);
- bDeformGroup *dg;
-
- for(dg= ob->defbase.first; dg; dg= dg->next)
- if(dg->name!=str)
- autocomplete_do_name(autocpl, dg->name);
-
- autocomplete_end(autocpl, str);
- }
-}
-
-
-/* ----------- custom button group ---------------------- */
-
-static void curvemap_buttons_zoom_in(bContext *C, void *cumap_v, void *unused)
-{
- CurveMapping *cumap = cumap_v;
- float d;
-
- /* we allow 20 times zoom */
- if( (cumap->curr.xmax - cumap->curr.xmin) > 0.04f*(cumap->clipr.xmax - cumap->clipr.xmin) ) {
- d= 0.1154f*(cumap->curr.xmax - cumap->curr.xmin);
- cumap->curr.xmin+= d;
- cumap->curr.xmax-= d;
- d= 0.1154f*(cumap->curr.ymax - cumap->curr.ymin);
- cumap->curr.ymin+= d;
- cumap->curr.ymax-= d;
- }
-}
-
-static void curvemap_buttons_zoom_out(bContext *C, void *cumap_v, void *unused)
-{
- CurveMapping *cumap = cumap_v;
- float d, d1;
-
- /* we allow 20 times zoom, but dont view outside clip */
- if( (cumap->curr.xmax - cumap->curr.xmin) < 20.0f*(cumap->clipr.xmax - cumap->clipr.xmin) ) {
- d= d1= 0.15f*(cumap->curr.xmax - cumap->curr.xmin);
-
- if(cumap->flag & CUMA_DO_CLIP)
- if(cumap->curr.xmin-d < cumap->clipr.xmin)
- d1= cumap->curr.xmin - cumap->clipr.xmin;
- cumap->curr.xmin-= d1;
-
- d1= d;
- if(cumap->flag & CUMA_DO_CLIP)
- if(cumap->curr.xmax+d > cumap->clipr.xmax)
- d1= -cumap->curr.xmax + cumap->clipr.xmax;
- cumap->curr.xmax+= d1;
-
- d= d1= 0.15f*(cumap->curr.ymax - cumap->curr.ymin);
-
- if(cumap->flag & CUMA_DO_CLIP)
- if(cumap->curr.ymin-d < cumap->clipr.ymin)
- d1= cumap->curr.ymin - cumap->clipr.ymin;
- cumap->curr.ymin-= d1;
-
- d1= d;
- if(cumap->flag & CUMA_DO_CLIP)
- if(cumap->curr.ymax+d > cumap->clipr.ymax)
- d1= -cumap->curr.ymax + cumap->clipr.ymax;
- cumap->curr.ymax+= d1;
- }
-}
-
-static void curvemap_buttons_setclip(bContext *C, void *cumap_v, void *unused)
-{
- CurveMapping *cumap = cumap_v;
-
- curvemapping_changed(cumap, 0);
-}
-
-static void curvemap_buttons_delete(bContext *C, void *cumap_v, void *unused)
-{
- CurveMapping *cumap = cumap_v;
-
- curvemap_remove(cumap->cm+cumap->cur, SELECT);
- curvemapping_changed(cumap, 0);
-}
-
-/* NOTE: this is a block-menu, needs 0 events, otherwise the menu closes */
-static uiBlock *curvemap_clipping_func(struct bContext *C, struct ARegion *ar, void *cumap_v)
-{
- CurveMapping *cumap = cumap_v;
- uiBlock *block;
- uiBut *bt;
-
- block= uiBeginBlock(C, ar, "curvemap_clipping_func", UI_EMBOSS);
-
- /* use this for a fake extra empy space around the buttons */
- uiDefBut(block, LABEL, 0, "", -4, 16, 128, 106, NULL, 0, 0, 0, 0, "");
-
- bt= uiDefButBitI(block, TOG, CUMA_DO_CLIP, 1, "Use Clipping",
- 0,100,120,18, &cumap->flag, 0.0, 0.0, 10, 0, "");
- uiButSetFunc(bt, curvemap_buttons_setclip, cumap, NULL);
-
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, 0, "Min X ", 0,74,120,18, &cumap->clipr.xmin, -100.0, cumap->clipr.xmax, 10, 0, "");
- uiDefButF(block, NUM, 0, "Min Y ", 0,56,120,18, &cumap->clipr.ymin, -100.0, cumap->clipr.ymax, 10, 0, "");
- uiDefButF(block, NUM, 0, "Max X ", 0,38,120,18, &cumap->clipr.xmax, cumap->clipr.xmin, 100.0, 10, 0, "");
- uiDefButF(block, NUM, 0, "Max Y ", 0,20,120,18, &cumap->clipr.ymax, cumap->clipr.ymin, 100.0, 10, 0, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
-
- uiEndBlock(C, block);
- return block;
-}
-
-
-static void curvemap_tools_dofunc(bContext *C, void *cumap_v, int event)
-{
- CurveMapping *cumap = cumap_v;
- CurveMap *cuma= cumap->cm+cumap->cur;
-
- switch(event) {
- case 0:
- curvemap_reset(cuma, &cumap->clipr);
- curvemapping_changed(cumap, 0);
- break;
- case 1:
- cumap->curr= cumap->clipr;
- break;
- case 2: /* set vector */
- curvemap_sethandle(cuma, 1);
- curvemapping_changed(cumap, 0);
- break;
- case 3: /* set auto */
- curvemap_sethandle(cuma, 0);
- curvemapping_changed(cumap, 0);
- break;
- case 4: /* extend horiz */
- cuma->flag &= ~CUMA_EXTEND_EXTRAPOLATE;
- curvemapping_changed(cumap, 0);
- break;
- case 5: /* extend extrapolate */
- cuma->flag |= CUMA_EXTEND_EXTRAPOLATE;
- curvemapping_changed(cumap, 0);
- break;
- }
- ED_region_tag_redraw(CTX_wm_region(C));
-}
-
-static uiBlock *curvemap_tools_func(struct bContext *C, struct ARegion *ar, void *cumap_v)
-{
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS);
- uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset View", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Vector Handle", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Auto Handle", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Horizontal", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Extrapolated", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset Curve", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 50);
-
- uiEndBlock(C, block);
- return block;
-}
-
-/* still unsure how this call evolves... we use labeltype for defining what curve-channels to show */
-void curvemap_buttons(uiBlock *block, CurveMapping *cumap, char labeltype, short event, short redraw, rctf *rect)
-{
- uiBut *bt;
- float dx, fy= rect->ymax-18.0f;
- int icon;
- short xco, yco;
-
- yco= (short)(rect->ymax-18.0f);
-
- /* curve choice options + tools/settings, 8 icons + spacer */
- dx= (rect->xmax-rect->xmin)/(9.0f);
-
- uiBlockBeginAlign(block);
- if(labeltype=='v') { /* vector */
- xco= (short)rect->xmin;
- if(cumap->cm[0].curve)
- uiDefButI(block, ROW, redraw, "X", xco, yco+2, dx, 16, &cumap->cur, 0.0, 0.0, 0.0, 0.0, "");
- xco= (short)(rect->xmin+1.0f*dx);
- if(cumap->cm[1].curve)
- uiDefButI(block, ROW, redraw, "Y", xco, yco+2, dx, 16, &cumap->cur, 0.0, 1.0, 0.0, 0.0, "");
- xco= (short)(rect->xmin+2.0f*dx);
- if(cumap->cm[2].curve)
- uiDefButI(block, ROW, redraw, "Z", xco, yco+2, dx, 16, &cumap->cur, 0.0, 2.0, 0.0, 0.0, "");
- }
- else if(labeltype=='c') { /* color */
- xco= (short)rect->xmin;
- if(cumap->cm[3].curve)
- uiDefButI(block, ROW, redraw, "C", xco, yco+2, dx, 16, &cumap->cur, 0.0, 3.0, 0.0, 0.0, "");
- xco= (short)(rect->xmin+1.0f*dx);
- if(cumap->cm[0].curve)
- uiDefButI(block, ROW, redraw, "R", xco, yco+2, dx, 16, &cumap->cur, 0.0, 0.0, 0.0, 0.0, "");
- xco= (short)(rect->xmin+2.0f*dx);
- if(cumap->cm[1].curve)
- uiDefButI(block, ROW, redraw, "G", xco, yco+2, dx, 16, &cumap->cur, 0.0, 1.0, 0.0, 0.0, "");
- xco= (short)(rect->xmin+3.0f*dx);
- if(cumap->cm[2].curve)
- uiDefButI(block, ROW, redraw, "B", xco, yco+2, dx, 16, &cumap->cur, 0.0, 2.0, 0.0, 0.0, "");
- }
- /* else no channels ! */
- uiBlockEndAlign(block);
-
- xco= (short)(rect->xmin+4.5f*dx);
- uiBlockSetEmboss(block, UI_EMBOSSN);
- bt= uiDefIconBut(block, BUT, redraw, ICON_ZOOMIN, xco, yco, dx, 14, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom in");
- uiButSetFunc(bt, curvemap_buttons_zoom_in, cumap, NULL);
-
- xco= (short)(rect->xmin+5.25f*dx);
- bt= uiDefIconBut(block, BUT, redraw, ICON_ZOOMOUT, xco, yco, dx, 14, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom out");
- uiButSetFunc(bt, curvemap_buttons_zoom_out, cumap, NULL);
-
- xco= (short)(rect->xmin+6.0f*dx);
- bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, event, ICON_MODIFIER, xco, yco, dx, 18, "Tools");
-
- xco= (short)(rect->xmin+7.0f*dx);
- if(cumap->flag & CUMA_DO_CLIP) icon= ICON_CLIPUV_HLT; else icon= ICON_CLIPUV_DEHLT;
- bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, event, icon, xco, yco, dx, 18, "Clipping Options");
-
- xco= (short)(rect->xmin+8.0f*dx);
- bt= uiDefIconBut(block, BUT, event, ICON_X, xco, yco, dx, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Delete points");
- uiButSetFunc(bt, curvemap_buttons_delete, cumap, NULL);
-
- uiBlockSetEmboss(block, UI_EMBOSS);
-
- uiDefBut(block, BUT_CURVE, event, "",
- rect->xmin, rect->ymin, rect->xmax-rect->xmin, fy-rect->ymin,
- cumap, 0.0f, 1.0f, 0, 0, "");
-}
-
-/* still unsure how this call evolves... we use labeltype for defining what curve-channels to show */
-void curvemap_layout(uiLayout *layout, CurveMapping *cumap, char labeltype, short event, short redraw, rctf *rect)
-{
- uiLayout *row;
- uiBlock *block;
- uiBut *bt;
- float dx, fy= rect->ymax-18.0f;
- int icon;
-
- block= uiLayoutGetBlock(layout);
-
- /* curve choice options + tools/settings, 8 icons + spacer */
- dx= UI_UNIT_X;
-
- row= uiLayoutRow(layout, 0);
- uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_RIGHT);
-
- if(labeltype=='v') { /* vector */
- row= uiLayoutRow(layout, 1);
-
- if(cumap->cm[0].curve)
- uiDefButI(block, ROW, redraw, "X", 0, 0, dx, 16, &cumap->cur, 0.0, 0.0, 0.0, 0.0, "");
- if(cumap->cm[1].curve)
- uiDefButI(block, ROW, redraw, "Y", 0, 0, dx, 16, &cumap->cur, 0.0, 1.0, 0.0, 0.0, "");
- if(cumap->cm[2].curve)
- uiDefButI(block, ROW, redraw, "Z", 0, 0, dx, 16, &cumap->cur, 0.0, 2.0, 0.0, 0.0, "");
- }
- else if(labeltype=='c') { /* color */
- row= uiLayoutRow(layout, 1);
-
- if(cumap->cm[3].curve)
- uiDefButI(block, ROW, redraw, "C", 0, 0, dx, 16, &cumap->cur, 0.0, 3.0, 0.0, 0.0, "");
- if(cumap->cm[0].curve)
- uiDefButI(block, ROW, redraw, "R", 0, 0, dx, 16, &cumap->cur, 0.0, 0.0, 0.0, 0.0, "");
- if(cumap->cm[1].curve)
- uiDefButI(block, ROW, redraw, "G", 0, 0, dx, 16, &cumap->cur, 0.0, 1.0, 0.0, 0.0, "");
- if(cumap->cm[2].curve)
- uiDefButI(block, ROW, redraw, "B", 0, 0, dx, 16, &cumap->cur, 0.0, 2.0, 0.0, 0.0, "");
- }
-
- row= uiLayoutRow(row, 1);
-
- uiBlockSetEmboss(block, UI_EMBOSSN);
- bt= uiDefIconBut(block, BUT, redraw, ICON_ZOOMIN, 0, 0, dx, 14, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom in");
- uiButSetFunc(bt, curvemap_buttons_zoom_in, cumap, NULL);
-
- bt= uiDefIconBut(block, BUT, redraw, ICON_ZOOMOUT, 0, 0, dx, 14, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom out");
- uiButSetFunc(bt, curvemap_buttons_zoom_out, cumap, NULL);
-
- bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, event, ICON_MODIFIER, 0, 0, dx, 18, "Tools");
-
- if(cumap->flag & CUMA_DO_CLIP) icon= ICON_CLIPUV_HLT; else icon= ICON_CLIPUV_DEHLT;
- bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, event, icon, 0, 0, dx, 18, "Clipping Options");
-
- bt= uiDefIconBut(block, BUT, event, ICON_X, 0, 0, dx, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Delete points");
- uiButSetFunc(bt, curvemap_buttons_delete, cumap, NULL);
-
- uiBlockSetEmboss(block, UI_EMBOSS);
-
- row= uiLayoutRow(layout, 0);
- uiDefBut(block, BUT_CURVE, event, "",
- rect->xmin, rect->ymin, rect->xmax-rect->xmin, fy-rect->ymin,
- cumap, 0.0f, 1.0f, 0, 0, "");
-}
-
-
-#define B_BANDCOL 1
-
-static int vergcband(const void *a1, const void *a2)
-{
- const CBData *x1=a1, *x2=a2;
+ Object *ob;
+ PointerRNA ptr;
+ short idcode;
- if( x1->pos > x2->pos ) return 1;
- else if( x1->pos < x2->pos) return -1;
- return 0;
-}
-
-static void colorband_pos_cb(bContext *C, void *coba_v, void *unused_v)
-{
- ColorBand *coba= coba_v;
- int a;
-
- if(coba->tot<2) return;
+ if(id==NULL)
+ return 0;
- for(a=0; a<coba->tot; a++) coba->data[a].cur= a;
- qsort(coba->data, coba->tot, sizeof(CBData), vergcband);
- for(a=0; a<coba->tot; a++) {
- if(coba->data[a].cur==coba->cur) {
- // XXX if(coba->cur!=a) addqueue(curarea->win, REDRAW, 0); /* button cur */
- coba->cur= a;
- break;
- }
- }
-
- WM_event_add_notifier(C, NC_TEXTURE, NULL);
-}
+ idcode= GS(id->name);
-static void colorband_cb(bContext *C, void *coba_v, void *unused_v)
-{
- WM_event_add_notifier(C, NC_TEXTURE, NULL);
-}
-
-static void colorband_add_cb(bContext *C, void *coba_v, void *unused_v)
-{
- ColorBand *coba= coba_v;
-
- if(coba->tot < MAXCOLORBAND-1) coba->tot++;
- coba->cur= coba->tot-1;
-
- colorband_pos_cb(C, coba, NULL);
- ED_undo_push(C, "Add colorband");
- WM_event_add_notifier(C, NC_TEXTURE, NULL);
-}
+ /* exception for objects */
+ if(idcode == ID_OB) {
+ ob= (Object*)id;
-static void colorband_del_cb(bContext *C, void *coba_v, void *unused_v)
-{
- ColorBand *coba= coba_v;
- int a;
-
- if(coba->tot<2) return;
-
- for(a=coba->cur; a<coba->tot; a++) {
- coba->data[a]= coba->data[a+1];
+ if(ob->type == OB_EMPTY)
+ return ICON_EMPTY_DATA;
+ else
+ return uiIconFromID(ob->data);
}
- if(coba->cur) coba->cur--;
- coba->tot--;
-
- ED_undo_push(C, "Delete colorband");
- // XXX BIF_preview_changed(ID_TE);
- WM_event_add_notifier(C, NC_TEXTURE, NULL);
-}
-
-/* offset aligns from bottom, standard width 300, height 115 */
-static void colorband_buttons_large(uiBlock *block, ColorBand *coba, int xoffs, int yoffs, int redraw)
-{
- CBData *cbd;
- uiBut *bt;
-
- if(coba==NULL) return;
-
- bt= uiDefBut(block, BUT, redraw, "Add", 0+xoffs,100+yoffs,50,20, 0, 0, 0, 0, 0, "Add a new color stop to the colorband");
- uiButSetFunc(bt, colorband_add_cb, coba, NULL);
- bt= uiDefBut(block, BUT, redraw, "Delete", 60+xoffs,100+yoffs,50,20, 0, 0, 0, 0, 0, "Delete the active position");
- uiDefButS(block, NUM, redraw, "", 120+xoffs,100+yoffs,80, 20, &coba->cur, 0.0, (float)(coba->tot-1), 0, 0, "Choose active color stop");
-
- uiButSetFunc(bt, colorband_del_cb, coba, NULL);
-
- bt= uiDefButS(block, MENU, redraw, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4",
- 210+xoffs, 100+yoffs, 90, 20, &coba->ipotype, 0.0, 0.0, 0, 0, "Set interpolation between color stops");
- uiButSetFunc(bt, colorband_cb, coba, NULL);
- uiBlockEndAlign(block);
-
- bt= uiDefBut(block, BUT_COLORBAND, redraw, "", xoffs,65+yoffs,300,30, coba, 0, 0, 0, 0, "");
- uiButSetFunc(bt, colorband_cb, coba, NULL);
-
- cbd= coba->data + coba->cur;
-
- bt= uiDefButF(block, NUM, redraw, "Pos:", 0+xoffs,40+yoffs,100, 20, &cbd->pos, 0.0, 1.0, 10, 0, "The position of the active color stop");
- uiButSetFunc(bt, colorband_pos_cb, coba, NULL);
- bt= uiDefButF(block, COL, redraw, "", 110+xoffs,40+yoffs,80,20, &(cbd->r), 0, 0, 0, B_BANDCOL, "The color value for the active color stop");
- uiButSetFunc(bt, colorband_cb, coba, NULL);
- bt= uiDefButF(block, NUMSLI, redraw, "A ", 200+xoffs,40+yoffs,100,20, &cbd->a, 0.0, 1.0, 10, 0, "The alpha value of the active color stop");
- uiButSetFunc(bt, colorband_cb, coba, NULL);
-
-}
+ /* otherwise get it through RNA, creating the pointer
+ will set the right type, also with subclassing */
+ RNA_id_pointer_create(id, &ptr);
-static void colorband_buttons_small(uiBlock *block, ColorBand *coba, rctf *butr, int event)
-{
- CBData *cbd;
- uiBut *bt;
- float unit= (butr->xmax-butr->xmin)/14.0f;
- float xs= butr->xmin;
-
- cbd= coba->data + coba->cur;
-
-
- bt= uiDefBut(block, BUT, event, "Add", xs,butr->ymin+20.0f,2.0f*unit,20, NULL, 0, 0, 0, 0, "Add a new color stop to the colorband");
- uiButSetFunc(bt, colorband_add_cb, coba, NULL);
- bt= uiDefBut(block, BUT, event, "Delete", xs+2.0f*unit,butr->ymin+20.0f,2.0f*unit,20, NULL, 0, 0, 0, 0, "Delete the active position");
- uiButSetFunc(bt, colorband_del_cb, coba, NULL);
-
- uiDefButF(block, COL, event, "", xs+4.0f*unit,butr->ymin+20.0f,2.0f*unit,20, &(cbd->r), 0, 0, 0, B_BANDCOL, "The color value for the active color stop");
- uiDefButF(block, NUMSLI, event, "A:", xs+6.0f*unit,butr->ymin+20.0f,4.0f*unit,20, &(cbd->a), 0.0f, 1.0f, 10, 2, "The alpha value of the active color stop");
-
- uiDefButS(block, MENU, event, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4",
- xs+10.0f*unit, butr->ymin+20.0f, unit*4, 20, &coba->ipotype, 0.0, 0.0, 0, 0, "Set interpolation between color stops");
-
- uiDefBut(block, BUT_COLORBAND, event, "", xs,butr->ymin,butr->xmax-butr->xmin,20.0f, coba, 0, 0, 0, 0, "");
- uiBlockEndAlign(block);
-}
-
-void colorband_buttons(uiBlock *block, ColorBand *coba, rctf *butr, int small)
-{
- if(small)
- colorband_buttons_small(block, coba, butr, 0);
- else
- colorband_buttons_large(block, coba, 0, 0, 0);
+ return (ptr.type)? RNA_struct_ui_icon(ptr.type): 0;
}
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 90b2c920613..246da9ddf4c 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -697,7 +697,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
/* icons have been standardized... and this call draws in untransformed coordinates */
#define ICON_HEIGHT 16.0f
-static void widget_draw_icon(uiBut *but, BIFIconID icon, int blend, rcti *rect)
+static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect)
{
int xs=0, ys=0;
float aspect, height;
@@ -724,7 +724,7 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, int blend, rcti *rect)
if ELEM4(but->type, TOG, ROW, TOGN, LISTROW) {
if(but->flag & UI_SELECT);
else if(but->flag & UI_ACTIVE);
- else blend= -60;
+ else alpha= 0.5f;
}
glEnable(GL_BLEND);
@@ -757,14 +757,14 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, int blend, rcti *rect)
ys= (rect->ymin+rect->ymax- height)/2;
}
- UI_icon_draw_aspect_blended(xs, ys, icon, aspect, blend);
+ UI_icon_draw_aspect(xs, ys, icon, aspect, alpha);
}
if(but->flag & UI_ICON_SUBMENU) {
xs= rect->xmax-17;
ys= (rect->ymin+rect->ymax- height)/2;
- UI_icon_draw_aspect_blended(xs, ys, ICON_RIGHTARROW_THIN, aspect, blend);
+ UI_icon_draw_aspect(xs, ys, ICON_RIGHTARROW_THIN, aspect, alpha);
}
glDisable(GL_BLEND);
@@ -773,7 +773,8 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, int blend, rcti *rect)
/* sets but->ofs to make sure text is correctly visible */
static void ui_text_leftclip(uiFontStyle *fstyle, uiBut *but, rcti *rect)
{
- int okwidth= rect->xmax-rect->xmin;
+ int border= (but->flag & UI_BUT_ALIGN_RIGHT)? 8: 10;
+ int okwidth= rect->xmax-rect->xmin - border;
/* need to set this first */
uiStyleFontSet(fstyle);
@@ -842,11 +843,8 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
but->drawstr[selend_tmp]= ch;
- /* if at pos 0, leave a bit more to the left */
- t= (pos == 0)? 0: 1;
-
glColor3ubv((unsigned char*)wcol->item);
- glRects(rect->xmin+selsta_draw+1, rect->ymin+2, rect->xmin+selwidth_draw+1, rect->ymax-2);
+ glRects(rect->xmin+selsta_draw, rect->ymin+2, rect->xmin+selwidth_draw, rect->ymax-2);
}
} else {
/* text cursor */
@@ -861,9 +859,6 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
but->drawstr[pos]= ch;
}
- /* if at pos 0, leave a bit more to the left */
- t += (pos == 0)? 0: 1;
-
glColor3ub(255,0,0);
glRects(rect->xmin+t, rect->ymin+2, rect->xmin+t+2, rect->ymax-2);
}
@@ -907,7 +902,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
/* check for button text label */
if (but->type == ICONTEXTROW) {
- widget_draw_icon(but, (BIFIconID) (but->icon+but->iconadd), 0, rect);
+ widget_draw_icon(but, (BIFIconID) (but->icon+but->iconadd), 1.0f, rect);
}
else {
@@ -918,14 +913,14 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
else if(but->pointype==INT)
dualset= BTST( *(((int *)but->poin)+1), but->bitnr);
- widget_draw_icon(but, ICON_DOT, dualset?0:-100, rect);
+ widget_draw_icon(but, ICON_DOT, dualset?1.0f:0.25f, rect);
}
/* If there's an icon too (made with uiDefIconTextBut) then draw the icon
and offset the text label to accomodate it */
if (but->flag & UI_HAS_ICON) {
- widget_draw_icon(but, but->icon+but->iconadd, 0, rect);
+ widget_draw_icon(but, but->icon+but->iconadd, 1.0f, rect);
rect->xmin += UI_icon_get_width(but->icon+but->iconadd);
@@ -1267,6 +1262,35 @@ static void widget_state(uiWidgetType *wt, int state)
}
}
+/* sliders use special hack which sets 'item' as inner when drawing filling */
+static void widget_state_numslider(uiWidgetType *wt, int state)
+{
+ uiWidgetStateColors *wcol_state= wt->wcol_state;
+ float blend= wcol_state->blend - 0.2f; // XXX special tweak to make sure that bar will still be visible
+
+ /* call this for option button */
+ widget_state(wt, state);
+
+ /* now, set the inner-part so that it reflects state settings too */
+ // TODO: maybe we should have separate settings for the blending colors used for this case?
+ if(state & UI_SELECT) {
+ if(state & UI_BUT_ANIMATED_KEY)
+ widget_state_blend(wt->wcol.item, wcol_state->inner_key_sel, blend);
+ else if(state & UI_BUT_ANIMATED)
+ widget_state_blend(wt->wcol.item, wcol_state->inner_anim_sel, blend);
+ else if(state & UI_BUT_DRIVEN)
+ widget_state_blend(wt->wcol.item, wcol_state->inner_driven_sel, blend);
+ }
+ else {
+ if(state & UI_BUT_ANIMATED_KEY)
+ widget_state_blend(wt->wcol.item, wcol_state->inner_key, blend);
+ else if(state & UI_BUT_ANIMATED)
+ widget_state_blend(wt->wcol.item, wcol_state->inner_anim, blend);
+ else if(state & UI_BUT_DRIVEN)
+ widget_state_blend(wt->wcol.item, wcol_state->inner_driven, blend);
+ }
+}
+
/* labels use theme colors for text */
static void widget_state_label(uiWidgetType *wt, int state)
{
@@ -1978,7 +2002,19 @@ static void widget_menubut(uiWidgetColors *wcol, rcti *rect, int state, int roun
/* text space */
rect->xmax -= (rect->ymax-rect->ymin);
+}
+
+static void widget_menuiconbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
+{
+ uiWidgetBase wtb;
+
+ widget_init(&wtb);
+
+ /* half rounded */
+ round_box_edges(&wtb, roundboxalign, rect, 4.0f);
+ /* decoration */
+ widgetbase_draw(&wtb, wcol);
}
static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
@@ -2185,6 +2221,7 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
case UI_WTYPE_SLIDER:
wt.wcol_theme= &btheme->tui.wcol_numslider;
wt.custom= widget_numslider;
+ wt.state= widget_state_numslider;
break;
case UI_WTYPE_EXEC:
@@ -2214,13 +2251,17 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
wt.wcol_theme= &btheme->tui.wcol_menu;
wt.draw= widget_menubut;
break;
+
+ case UI_WTYPE_MENU_ICON_RADIO:
+ wt.wcol_theme= &btheme->tui.wcol_menu;
+ wt.draw= widget_menuiconbut;
+ break;
case UI_WTYPE_MENU_POINTER_LINK:
wt.wcol_theme= &btheme->tui.wcol_menu;
wt.draw= widget_menubut;
break;
-
case UI_WTYPE_PULLDOWN:
wt.wcol_theme= &btheme->tui.wcol_pulldown;
wt.draw= widget_pulldownbut;
@@ -2410,7 +2451,10 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
case MENU:
case BLOCK:
case ICONTEXTROW:
- wt= widget_type(UI_WTYPE_MENU_RADIO);
+ if(!but->str[0] && but->icon)
+ wt= widget_type(UI_WTYPE_MENU_ICON_RADIO);
+ else
+ wt= widget_type(UI_WTYPE_MENU_RADIO);
break;
case PULLDOWN:
@@ -2567,7 +2611,7 @@ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, char *name, int 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? */
+ UI_icon_draw_aspect(xs, ys, iconid, 1.2f, 0.5f); /* XXX scale weak get from fstyle? */
glDisable(GL_BLEND);
}
}
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index eaa42fc887f..5e148717963 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -460,7 +460,7 @@ void ui_theme_init_userdef(void)
SETCOL(btheme->tv3d.lamp, 0, 0, 0, 40);
SETCOL(btheme->tv3d.select, 241, 88, 0, 255);
SETCOL(btheme->tv3d.active, 255, 140, 25, 255);
- SETCOL(btheme->tv3d.group, 16, 64, 16, 255);
+ SETCOL(btheme->tv3d.group, 8, 48, 8, 255);
SETCOL(btheme->tv3d.group_active, 85, 187, 85, 255);
SETCOL(btheme->tv3d.transform, 0xff, 0xff, 0xff, 255);
SETCOL(btheme->tv3d.vertex, 0, 0, 0, 255);
@@ -524,10 +524,12 @@ void ui_theme_init_userdef(void)
/* space file */
/* to have something initialized */
btheme->tfile= btheme->tv3d;
- SETCOL(btheme->tfile.back, 90, 90, 90, 255);
+ SETCOLF(btheme->tfile.back, 0.3, 0.3, 0.3, 1);
+ SETCOLF(btheme->tfile.panel, 0.3, 0.3, 0.3, 1);
+ SETCOLF(btheme->tfile.list, 0.4, 0.4, 0.4, 1);
SETCOL(btheme->tfile.text, 250, 250, 250, 255);
SETCOL(btheme->tfile.text_hi, 15, 15, 15, 255);
- SETCOL(btheme->tfile.panel, 180, 180, 180, 255); // bookmark/ui regions
+ SETCOL(btheme->tfile.panel, 145, 145, 145, 255); // bookmark/ui regions
SETCOL(btheme->tfile.active, 130, 130, 130, 255); // selected files
SETCOL(btheme->tfile.hilite, 255, 140, 25, 255); // selected files
@@ -611,11 +613,11 @@ void ui_theme_init_userdef(void)
/* space node, re-uses syntax color storage */
btheme->tnode= btheme->tv3d;
SETCOL(btheme->tnode.edge_select, 255, 255, 255, 255);
- SETCOL(btheme->tnode.syntaxl, 150, 150, 150, 255); /* TH_NODE, backdrop */
- SETCOL(btheme->tnode.syntaxn, 129, 131, 144, 255); /* in/output */
- SETCOL(btheme->tnode.syntaxb, 127,127,127, 255); /* operator */
- SETCOL(btheme->tnode.syntaxv, 142, 138, 145, 255); /* generator */
- SETCOL(btheme->tnode.syntaxc, 120, 145, 120, 255); /* group */
+ SETCOL(btheme->tnode.syntaxl, 155, 155, 155, 160); /* TH_NODE, backdrop */
+ SETCOL(btheme->tnode.syntaxn, 100, 100, 100, 255); /* in/output */
+ SETCOL(btheme->tnode.syntaxb, 108, 105, 111, 255); /* operator */
+ SETCOL(btheme->tnode.syntaxv, 104, 106, 117, 255); /* generator */
+ SETCOL(btheme->tnode.syntaxc, 105, 117, 110, 255); /* group */
/* space logic */
btheme->tlogic= btheme->tv3d;
@@ -1023,7 +1025,7 @@ void init_userdef_do_versions(void)
}
/* Group theme colors */
if(btheme->tv3d.group[3]==0) {
- SETCOL(btheme->tv3d.group, 0x10, 0x40, 0x10, 255);
+ SETCOL(btheme->tv3d.group, 0x0C, 0x30, 0x0C, 255);
SETCOL(btheme->tv3d.group_active, 0x66, 0xFF, 0x66, 255);
}
/* Sequence editor theme*/
@@ -1264,6 +1266,9 @@ void init_userdef_do_versions(void)
if(U.audiorate == 0)
U.audiorate = 44100;
}
+
+ if (G.main->versionfile < 250 || (G.main->versionfile == 250 && G.main->subversionfile < 5))
+ U.gameflags |= USER_DISABLE_VBO;
/* GL Texture Garbage Collection (variable abused above!) */
if (U.textimeout == 0) {
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index f9fb7a9306f..0bd0435362f 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -700,7 +700,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
void UI_view2d_curRect_validate(View2D *v2d)
{
- return UI_view2d_curRect_validate_resize(v2d, 0);
+ UI_view2d_curRect_validate_resize(v2d, 0);
}
/* ------------------ */
@@ -831,6 +831,7 @@ void UI_view2d_totRect_set_resize (View2D *v2d, int width, int height, int resiz
height= abs(height);
/* hrumf! */
+ /* XXX: there are work arounds for this in the panel and file browse code. */
if(scroll & V2D_SCROLL_HORIZONTAL)
width -= V2D_SCROLL_WIDTH;
if(scroll & V2D_SCROLL_VERTICAL)
@@ -973,8 +974,8 @@ void UI_view2d_view_ortho(const bContext *C, View2D *v2d)
/* XXX brecht: instead of zero at least use a tiny offset, otherwise
* pixel rounding is effectively random due to float inaccuracy */
- xofs= 0.001f;
- yofs= 0.001f;
+ xofs= 0.001f*(v2d->cur.xmax - v2d->cur.xmin)/(v2d->mask.xmax - v2d->mask.xmin);
+ yofs= 0.001f*(v2d->cur.ymax - v2d->cur.ymin)/(v2d->mask.ymax - v2d->mask.ymin);
/* apply mask-based adjustments to cur rect (due to scrollers), to eliminate scaling artifacts */
view2d_map_cur_using_mask(v2d, &curmasked);
@@ -1351,7 +1352,7 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short
vert= v2d->vert;
hor= v2d->hor;
- /* slider rects smaller than region */
+ /* slider rects need to be smaller than region */
hor.xmin+=4;
hor.xmax-=4;
if (scroll & V2D_SCROLL_BOTTOM)
@@ -1393,13 +1394,24 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short
else
scrollers->hor_max= (int)(hor.xmin + (fac2 * scrollsize));
+ /* prevent inverted sliders */
if (scrollers->hor_min > scrollers->hor_max)
scrollers->hor_min= scrollers->hor_max;
+ /* prevent sliders from being too small, and disappearing */
+ if ((scrollers->hor_max - scrollers->hor_min) < V2D_SCROLLER_HANDLE_SIZE) {
+ scrollers->hor_max= scrollers->hor_min + V2D_SCROLLER_HANDLE_SIZE;
+
+ if(scrollers->hor_max > hor.xmax) {
+ scrollers->hor_max= hor.xmax;
+ scrollers->hor_min= MAX2(scrollers->hor_max - V2D_SCROLLER_HANDLE_SIZE, hor.xmin);
+ }
+ }
/* check whether sliders can disappear */
- if(v2d->keeptot)
+ if(v2d->keeptot) {
if(fac1 <= 0.0f && fac2 >= 1.0f)
scrollers->horfull= 1;
+ }
}
/* vertical scrollers */
@@ -1420,13 +1432,24 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short
else
scrollers->vert_max= (int)(vert.ymin + (fac2 * scrollsize));
+ /* prevent inverted sliders */
if (scrollers->vert_min > scrollers->vert_max)
scrollers->vert_min= scrollers->vert_max;
+ /* prevent sliders from being too small, and disappearing */
+ if ((scrollers->vert_max - scrollers->vert_min) < V2D_SCROLLER_HANDLE_SIZE) {
+ scrollers->vert_max= scrollers->vert_min + V2D_SCROLLER_HANDLE_SIZE;
+
+ if(scrollers->vert_max > vert.ymax) {
+ scrollers->vert_max= vert.ymax;
+ scrollers->vert_min= MAX2(scrollers->vert_max - V2D_SCROLLER_HANDLE_SIZE, vert.ymin);
+ }
+ }
/* check whether sliders can disappear */
- if(v2d->keeptot)
+ if(v2d->keeptot) {
if(fac1 <= 0.0f && fac2 >= 1.0f)
scrollers->vertfull= 1;
+ }
}
/* grid markings on scrollbars */
@@ -1550,14 +1573,6 @@ static void scroll_printstr(View2DScrollers *scrollers, Scene *scene, float x, f
BLF_draw_default(x, y, 0.0f, str);
}
-/* local defines for scrollers drawing */
- /* radius of scroller 'button' caps */
-#define V2D_SCROLLCAP_RAD 5
- /* shading factor for scroller 'bar' */
-#define V2D_SCROLLBAR_SHADE 0.1f
- /* shading factor for scroller 'button' caps */
-#define V2D_SCROLLCAP_SHADE 0.2f
-
/* Draw scrollbars in the given 2d-region */
void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *vs)
{
@@ -1571,7 +1586,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
/* horizontal scrollbar */
if (scroll & V2D_SCROLL_HORIZONTAL) {
-
+ /* only draw scrollbar when it doesn't fill the entire space */
if(vs->horfull==0) {
bTheme *btheme= U.themes.first;
uiWidgetColors wcol= btheme->tui.wcol_scroll;
@@ -1584,13 +1599,15 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
slider.ymax= hor.ymax;
state= (v2d->scroll_ui & V2D_SCROLL_H_ACTIVE)?UI_SCROLL_PRESSED:0;
+
+ // TODO: disable this for button regions...
if (!(v2d->keepzoom & V2D_LOCKZOOM_X))
state |= UI_SCROLL_ARROWS;
+
uiWidgetScrollDraw(&wcol, &hor, &slider, state);
}
/* scale indicators */
- // XXX will need to update the font drawing when the new stuff comes in
if ((scroll & V2D_SCROLL_SCALE_HORIZONTAL) && (vs->grid)) {
View2DGrid *grid= vs->grid;
float fac, dfac, fac2, val;
@@ -1667,7 +1684,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
/* vertical scrollbar */
if (scroll & V2D_SCROLL_VERTICAL) {
-
+ /* only draw scrollbar when it doesn't fill the entire space */
if(vs->vertfull==0) {
bTheme *btheme= U.themes.first;
uiWidgetColors wcol= btheme->tui.wcol_scroll;
@@ -1680,14 +1697,16 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
slider.ymax= vs->vert_max;
state= (v2d->scroll_ui & V2D_SCROLL_V_ACTIVE)?UI_SCROLL_PRESSED:0;
- if (!(v2d->keepzoom & V2D_LOCKZOOM_Y))
+
+ // TODO: disable this for button regions...
+ 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)) {
View2DGrid *grid= vs->grid;
float fac, dfac, val;
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 3e009884dee..ef37f6e530a 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -210,7 +210,7 @@ static int view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event)
WM_cursor_modal(window, BC_NSEW_SCROLLCURSOR);
/* add temp handler */
- WM_event_add_modal_handler(C, &window->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -237,7 +237,7 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
case LEFTMOUSE:
case MIDDLEMOUSE:
- if (event->val==0) {
+ if (event->val==KM_RELEASE) {
/* calculate overall delta mouse-movement for redo */
RNA_int_set(op->ptr, "deltax", (vpd->startx - vpd->lastx));
RNA_int_set(op->ptr, "deltay", (vpd->starty - vpd->lasty));
@@ -764,7 +764,7 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, wmEvent *event)
WM_cursor_modal(window, BC_NSEW_SCROLLCURSOR);
/* add temp handler */
- WM_event_add_modal_handler(C, &window->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -836,7 +836,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event)
case LEFTMOUSE:
case MIDDLEMOUSE:
- if (event->val==0) {
+ if (event->val==KM_RELEASE) {
/* for redo, store the overall deltas - need to respect zoom-locks here... */
if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0)
RNA_float_set(op->ptr, "deltax", vzd->dx);
@@ -1244,7 +1244,7 @@ static int scroller_activate_modal(bContext *C, wmOperator *op, wmEvent *event)
break;
case LEFTMOUSE:
- if (event->val==0) {
+ if (event->val==KM_RELEASE) {
scroller_activate_exit(C, op);
return OPERATOR_FINISHED;
}
@@ -1292,7 +1292,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event)
v2d->scroll_ui |= V2D_SCROLL_V_ACTIVE;
/* still ok, so can add */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
else {
@@ -1407,9 +1407,9 @@ void ui_view2d_operatortypes(void)
WM_operatortype_append(VIEW2D_OT_reset);
}
-void UI_view2d_keymap(wmWindowManager *wm)
+void UI_view2d_keymap(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "View2D", 0, 0);
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "View2D", 0, 0);
/* pan/scroll */
WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MIDDLEMOUSE, KM_PRESS, 0, 0);
@@ -1445,7 +1445,7 @@ void UI_view2d_keymap(wmWindowManager *wm)
WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", LEFTMOUSE, KM_PRESS, 0, 0);
/* Alternative keymap for buttons listview */
- keymap= WM_keymap_listbase(wm, "View2D Buttons List", 0, 0);
+ keymap= WM_keymap_find(keyconf, "View2D Buttons List", 0, 0);
WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MIDDLEMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", WHEELDOWNMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", WHEELUPMOUSE, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/mesh/SConscript b/source/blender/editors/mesh/SConscript
index 80536b5e431..ac46ee157cc 100644
--- a/source/blender/editors/mesh/SConscript
+++ b/source/blender/editors/mesh/SConscript
@@ -9,4 +9,11 @@ incs += ' #/intern/guardedalloc ../../gpu'
incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern'
incs += ' ../../bmesh '
+if env['OURPLATFORM'] == 'linux2':
+ cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( 'bf_editors_mesh', sources, Split(incs), [], libtype=['core'], priority=[45] )
diff --git a/source/blender/editors/mesh/bmesh_select.c b/source/blender/editors/mesh/bmesh_select.c
index af48457a2ff..3e1d5034328 100644
--- a/source/blender/editors/mesh/bmesh_select.c
+++ b/source/blender/editors/mesh/bmesh_select.c
@@ -87,6 +87,8 @@ BMEditMesh_mods.c, UI level access, no geometry changes
#include "BIF_gl.h"
#include "BIF_glutil.h"
+#include "UI_resources.h"
+
#include "mesh_intern.h"
#include "BLO_sys_types.h" // for intptr_t support
@@ -116,22 +118,24 @@ void EDBM_select_mirrored(Object *obedit, BMEditMesh *em)
#endif
}
-void EDBM_automerge(int update)
+void EDBM_automerge(Scene *scene, Object *obedit, int update)
{
-// XXX int len;
-
-// if ((scene->automerge) &&
-// (obedit && obedit->type==OB_MESH) &&
-// (((Mesh*)obedit->data)->mr==NULL)
-// ) {
-// len = removedoublesflag(1, 1, scene->toolsettings->doublimit);
-// if (len) {
-// em->totvert -= len; /* saves doing a countall */
-// if (update) {
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
-// }
-// }
-// }
+ BMEditMesh *em;
+ int len;
+
+ if ((scene->toolsettings->automerge) &&
+ (obedit && obedit->type==OB_MESH) &&
+ (((Mesh*)obedit->data)->mr==NULL))
+ {
+ em = ((Mesh*)obedit->data)->edit_btmesh;
+ if (!em)
+ return;
+
+ BMO_CallOpf(em->bm, "automerge verts=%hv dist=%f", BM_SELECT, scene->toolsettings->doublimit);
+ if (update) {
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ }
+ }
}
/* ****************************** SELECTION ROUTINES **************** */
@@ -417,6 +421,9 @@ BMVert *EDBM_findnearestvert(ViewContext *vc, int *dist, short sel, short strict
data.closestIndex = 0;
data.pass = 0;
+
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d);
+
mesh_foreachScreenVert(vc, findnearestvert__doClosest, &data, 1);
if (data.dist>3) {
@@ -505,6 +512,7 @@ BMEdge *EDBM_findnearestedge(ViewContext *vc, int *dist)
data.mval[1] = vc->mval[1];
data.dist = *dist;
data.closest = NULL;
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d);
mesh_foreachScreenEdge(vc, findnearestedge__doClosest, &data, 2);
@@ -588,12 +596,14 @@ BMFace *EDBM_findnearestface(ViewContext *vc, int *dist)
data.dist = *dist;
data.closest = NULL;
data.closestIndex = 0;
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d);
data.pass = 0;
mesh_foreachScreenFace(vc, findnearestface__doClosest, &data);
if (data.dist>3) {
data.pass = 1;
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d);
mesh_foreachScreenFace(vc, findnearestface__doClosest, &data);
}
@@ -644,20 +654,31 @@ static int unified_findnearest(ViewContext *vc, BMVert **eve, BMEdge **eed, BMFa
/* **************** SIMILAR "group" SELECTS. FACE, EDGE AND VERTEX ************** */
-/* selects new faces/edges/verts based on the existing selection */
+static EnumPropertyItem prop_similar_types[] = {
+ {SIMVERT_NORMAL, "NORMAL", 0, "Normal", ""},
+ {SIMVERT_FACE, "FACE", 0, "Amount of Adjacent Faces", ""},
+ {SIMVERT_VGROUP, "VGROUP", 0, "Vertex Groups", ""},
-/* FACES GROUP */
+ {SIMEDGE_LENGTH, "LENGTH", 0, "Length", ""},
+ {SIMEDGE_DIR, "DIR", 0, "Direction", ""},
+ {SIMEDGE_FACE, "FACE", 0, "Amount of Faces Around an Edge", ""},
+ {SIMEDGE_FACE_ANGLE, "FACE_ANGLE", 0, "Face Angles", ""},
+ {SIMEDGE_CREASE, "CREASE", 0, "Crease", ""},
+ {SIMEDGE_SEAM, "SEAM", 0, "Seam", ""},
+ {SIMEDGE_SHARP, "SHARP", 0, "Sharpness", ""},
-static EnumPropertyItem prop_simface_types[] = {
{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}
};
+/* selects new faces/edges/verts based on the existing selection */
+
static int similar_face_select_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
@@ -698,17 +719,6 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
/* EDGE GROUP */
-static EnumPropertyItem prop_simedge_types[] = {
- {SIMEDGE_LENGTH, "LENGTH", 0, "Length", ""},
- {SIMEDGE_DIR, "DIR", 0, "Direction", ""},
- {SIMEDGE_FACE, "FACE", 0, "Amount of Faces Around an Edge", ""},
- {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}
-};
-
/* wrap the above function but do selection flushing edge to face */
static int similar_edge_select_exec(bContext *C, wmOperator *op)
{
@@ -756,13 +766,6 @@ VERT GROUP
mode 3: same vertex groups
*/
-static EnumPropertyItem prop_simvertex_types[] = {
- {SIMVERT_NORMAL, "NORMAL", 0, "Normal", ""},
- {SIMVERT_FACE, "FACE", 0, "Amount of Adjacent Faces", ""},
- {SIMVERT_VGROUP, "VGROUP", 0, "Vertex Groups", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
static int similar_vert_select_exec(bContext *C, wmOperator *op)
{
@@ -814,32 +817,26 @@ static int select_similar_exec(bContext *C, wmOperator *op)
static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *ptr, int *free)
{
- Object *obedit;
+ Object *obedit = CTX_data_edit_object(C);
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);
+ int a, totitem= 0;
if(obedit && obedit->type == OB_MESH) {
BMEditMesh *em= ((Mesh*)obedit->data)->edit_btmesh;
- 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);
+ if(em->selectmode & SCE_SELECT_VERTEX) {
+ for (a=SIMVERT_NORMAL; a<SIMEDGE_LENGTH; a++) {
+ RNA_enum_items_add_value(&item, &totitem, prop_similar_types, a);
+ }
+ } else if(em->selectmode & SCE_SELECT_EDGE) {
+ for (a=SIMEDGE_LENGTH; a<SIMFACE_MATERIAL; a++) {
+ RNA_enum_items_add_value(&item, &totitem, prop_similar_types, a);
+ }
+ } else if(em->selectmode & SCE_SELECT_FACE) {
+ for (a=SIMFACE_MATERIAL; a<=SIMFACE_COPLANAR; a++) {
+ RNA_enum_items_add_value(&item, &totitem, prop_similar_types, a);
+ }
+ }
RNA_enum_item_end(&item, &totitem);
*free= 1;
@@ -868,7 +865,7 @@ void MESH_OT_select_similar(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "type", prop_simvertex_types, 0, "Type", "");
+ prop= RNA_def_enum(ot->srna, "type", prop_similar_types, SIMVERT_NORMAL, "Type", "");
RNA_def_enum_funcs(prop, select_similar_type_itemf);
}
@@ -1134,6 +1131,9 @@ static void mouse_mesh_loop(bContext *C, short mval[2], short extend, short ring
vc.mval[1]= mval[1];
em= vc.em;
+ /* no afterqueue (yet), so we check it now, otherwise the bm_xxxofs indices are bad */
+ view3d_validate_backbuf(&vc);
+
eed= EDBM_findnearestedge(&vc, &dist);
if(eed) {
if(extend==0) EDBM_clear_flag_all(em, BM_SELECT);
diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c
index eb1c84a382f..9b31a06edb3 100644
--- a/source/blender/editors/mesh/bmesh_tools.c
+++ b/source/blender/editors/mesh/bmesh_tools.c
@@ -2672,7 +2672,7 @@ void MESH_OT_remove_doubles(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_float(ot->srna, "mergedist", 0.0001, 0.0001, 100.0,
+ RNA_def_float(ot->srna, "mergedist", 0.0001f, 0.000001f, 50.0f,
"Merge Distance",
"Minimum distance between elements to merge.", 0.00001, 10.0);
}
@@ -2985,24 +2985,70 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
else BMINDEX_SET(e, 0);
}
- /*expand edge selection*/
- BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+ /*handle case of one vert selected. we identify
+ the closest edge around that vert to the mouse cursor,
+ then rip the two adjacent edges in the vert fan.*/
+ if (em->bm->totvertsel == 1 && em->bm->totedgesel == 0 && em->bm->totfacesel == 0) {
+ /*find selected vert*/
+ BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL)
+ if (BM_TestHFlag(v, BM_SELECT))
+ break;
+
+ /*this should be impossible, but sanity checks are a good thing*/
+ if (!v)
+ return OPERATOR_CANCELLED;
+
+ /*find closest edge to mouse cursor*/
e2 = NULL;
- i = 0;
- BM_ITER(e, &eiter, em->bm, BM_EDGES_OF_VERT, v) {
- if (BMINDEX_GET(e)) {
+ BM_ITER(e, &iter, em->bm, BM_EDGES_OF_VERT, v) {
+ d = mesh_rip_edgedist(ar, projectMat, e->v1->co, e->v2->co, event->mval);
+ if (d < dist) {
+ dist = d;
e2 = e;
- i++;
}
}
-
- if (i == 1 && e2->loop) {
- l = BM_OtherFaceLoop(e2, e2->loop->f, v);
- l = (BMLoop*)l->radial.next->data;
- l = BM_OtherFaceLoop(l->e, l->f, v);
- if (l)
- BM_Select(em->bm, l->e, 1);
+ if (!e2)
+ return OPERATOR_CANCELLED;
+
+ /*rip two adjacent edges*/
+ if (BM_Edge_FaceCount(e2) == 1) {
+ l = e2->loop;
+ e = BM_OtherFaceLoop(e2, l->f, v);
+
+ BMINDEX_SET(e, 1);
+ BM_SetHFlag(e, BM_SELECT);
+ } else if (BM_Edge_FaceCount(e2) == 2) {
+ l = e2->loop;
+ e = BM_OtherFaceLoop(e2, l->f, v);
+ BMINDEX_SET(e, 1);
+ BM_SetHFlag(e, BM_SELECT);
+
+ l = e2->loop->radial.next->data;
+ e = BM_OtherFaceLoop(e2, l->f, v);
+ BMINDEX_SET(e, 1);
+ BM_SetHFlag(e, BM_SELECT);
+ }
+ } else {
+ /*expand edge selection*/
+ BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+ e2 = NULL;
+ i = 0;
+ BM_ITER(e, &eiter, em->bm, BM_EDGES_OF_VERT, v) {
+ if (BMINDEX_GET(e)) {
+ e2 = e;
+ i++;
+ }
+ }
+
+ if (i == 1 && e2->loop) {
+ l = BM_OtherFaceLoop(e2, e2->loop->f, v);
+ l = (BMLoop*)l->radial.next->data;
+ l = BM_OtherFaceLoop(l->e, l->f, v);
+
+ if (l)
+ BM_Select(em->bm, l->e, 1);
+ }
}
}
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index a6c5e5beccf..bb69ab16a45 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -89,6 +89,34 @@ static int pupmenu() {return 0;}
/* ***************** XXX **************** */
+/* copy the face flags, most importantly selection from the mesh to the final derived mesh,
+ * use in object mode when selecting faces (while painting) */
+void object_facesel_flush_dm(Object *ob)
+{
+ Mesh *me= get_mesh(ob);
+ DerivedMesh *dm= ob->derivedFinal;
+ MFace *faces, *mf, *mf_orig;
+ int *index_array = NULL;
+ int totface;
+ int i;
+
+
+ if(me==NULL || dm==NULL || !CustomData_has_layer( &dm->faceData, CD_ORIGINDEX))
+ return;
+
+ faces = dm->getTessFaceArray(dm);
+ totface = dm->getNumTessFaces(dm);
+
+ index_array = dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
+
+ mf= faces;
+
+ for (i= 0; i<totface; i++, mf++) { /* loop over derived mesh faces */
+ mf_orig= me->mface + index_array[i];
+ mf->flag= mf_orig->flag;;
+ }
+}
+
/* returns 0 if not found, otherwise 1 */
int facesel_face_pick(View3D *v3d, Mesh *me, short *mval, unsigned int *index, short rect)
{
@@ -163,6 +191,7 @@ void reveal_tface(Scene *scene)
mface++;
}
+ object_facesel_flush_dm(OBACT);
// XXX notifier! object_tface_flags_changed(OBACT, 0);
}
@@ -197,7 +226,8 @@ void hide_tface(Scene *scene)
mface++;
}
-
+
+ object_facesel_flush_dm(OBACT);
// XXX notifier! object_tface_flags_changed(OBACT, 0);
}
@@ -237,7 +267,10 @@ void deselectall_tface(Scene *scene)
sel= 0;
while(a--) {
if(mface->flag & ME_HIDE);
- else if(mface->flag & ME_FACE_SEL) sel= 1;
+ else if(mface->flag & ME_FACE_SEL) {
+ sel= 1;
+ break;
+ }
mface++;
}
@@ -252,6 +285,7 @@ void deselectall_tface(Scene *scene)
mface++;
}
+ object_facesel_flush_dm(OBACT);
// XXX notifier! object_tface_flags_changed(OBACT, 0);
}
@@ -274,7 +308,8 @@ void selectswap_tface(Scene *scene)
}
mface++;
}
-
+
+ object_facesel_flush_dm(OBACT);
// XXX notifier! object_tface_flags_changed(OBACT, 0);
}
@@ -655,11 +690,11 @@ void face_select(Scene *scene, View3D *v3d)
/* image window redraw */
-
+ object_facesel_flush_dm(OBACT);
// XXX notifier! object_tface_flags_changed(OBACT, 1);
}
-void face_borderselect(Scene *scene, ARegion *ar)
+void face_borderselect(Scene *scene, ScrArea *sa, ARegion *ar)
{
Mesh *me;
MFace *mface;
@@ -675,13 +710,15 @@ void face_borderselect(Scene *scene, ARegion *ar)
// XXX val= get_border(&rect, 3);
- /* why readbuffer here? shouldn't be necessary (maybe a flush or so) */
- glReadBuffer(GL_BACK);
-#ifdef __APPLE__
- glReadBuffer(GL_AUX0); /* apple only */
-#endif
-
if(val) {
+ /* without this border select often fails */
+#if 0 /* XXX untested in 2.5 */
+ if (v3d->flag & V3D_NEEDBACKBUFDRAW) {
+ check_backbuf();
+ persp(PERSP_VIEW);
+ }
+#endif
+
selar= MEM_callocN(me->totface+1, "selar");
sx= (rect.xmax-rect.xmin+1);
@@ -722,6 +759,8 @@ void face_borderselect(Scene *scene, ARegion *ar)
#ifdef __APPLE__
glReadBuffer(GL_BACK);
#endif
+
+ object_facesel_flush_dm(OBACT);
}
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index d2fd5a309e1..e2bbb63f5c5 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -735,7 +735,6 @@ EditMesh *make_editMesh(Scene *scene, Object *ob)
tot= actkey->totelem;
}
-
/* make editverts */
CustomData_copy(&me->vdata, &em->vdata, CD_MASK_EDITMESH, CD_CALLOC, 0);
mvert= me->mvert;
@@ -745,10 +744,14 @@ EditMesh *make_editMesh(Scene *scene, Object *ob)
co= mvert->co;
+ /* edit the shape key coordinate if available */
+ if(actkey && a < actkey->totelem)
+ co= (float*)actkey->data + 3*a;
+
eve= addvertlist(em, co, NULL);
evlist[a]= eve;
- // face select sets selection in next loop
+ /* face select sets selection in next loop */
if(!paint_facesel_test(ob))
eve->f |= (mvert->flag & 1);
@@ -931,6 +934,8 @@ void load_editMesh(Scene *scene, Object *ob, EditMesh *em)
CustomData_add_layer(&me->fdata, CD_MFACE, CD_ASSIGN, mface, me->totface);
mesh_update_customdata_pointers(me);
+ em->mat_nr= ob->actcol-1;
+
/* the vertices, use ->tmp.l as counter */
eve= em->verts.first;
a= 0;
@@ -1241,6 +1246,7 @@ static EnumPropertyItem prop_separate_types[] = {
/* return 1: success */
static int mesh_separate_selected(Scene *scene, Base *editbase)
{
+#if 0
EditMesh *em, *emnew;
EditVert *eve, *v1;
EditEdge *eed, *e1;
@@ -1285,10 +1291,14 @@ static int mesh_separate_selected(Scene *scene, Base *editbase)
ED_base_object_select(basenew, BA_DESELECT);
/* 2 */
- basenew->object->data= menew= add_mesh(me->id.name); /* empty */
+ basenew->object->data= menew= add_mesh(me->id.name+2); /* empty */
+ assign_matarar(basenew->object, give_matarar(obedit), *give_totcolp(obedit)); /* new in 2.5 */
me->id.us--;
emnew = make_editMesh(scene, basenew->object);
//emnew= menew->edit_mesh;
+ CustomData_copy(&em->vdata, &emnew->vdata, CD_MASK_EDITMESH, CD_DEFAULT, 0);
+ CustomData_copy(&em->edata, &emnew->edata, CD_MASK_EDITMESH, CD_DEFAULT, 0);
+ CustomData_copy(&em->fdata, &emnew->fdata, CD_MASK_EDITMESH, CD_DEFAULT, 0);
/* 3 */
/* SPLIT: first make duplicate */
@@ -1331,6 +1341,8 @@ static int mesh_separate_selected(Scene *scene, Base *editbase)
/* 5 */
load_editMesh(scene, basenew->object, emnew);
free_editMesh(emnew);
+ MEM_freeN(menew->edit_mesh);
+ menew->edit_mesh= NULL;
/* hashedges are invalid now, make new! */
editMesh_set_hash(em);
@@ -1341,11 +1353,13 @@ static int mesh_separate_selected(Scene *scene, Base *editbase)
BKE_mesh_end_editmesh(me, em);
return 1;
+#endif
}
/* return 1: success */
static int mesh_separate_material(Scene *scene, Base *editbase)
{
+#if 0
Mesh *me= editbase->object->data;
EditMesh *em= BKE_mesh_get_editmesh(me);
unsigned char curr_mat;
@@ -1364,6 +1378,7 @@ static int mesh_separate_material(Scene *scene, Base *editbase)
BKE_mesh_end_editmesh(me, em);
return 1;
+#endif
}
/* return 1: success */
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index b84ba39fc8e..e6baa6d9db8 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -71,6 +71,7 @@
#include "ED_transform.h"
#include "ED_util.h"
#include "ED_view3d.h"
+#include "ED_object.h"
#include "bmesh.h"
@@ -1080,14 +1081,14 @@ static void make_prim(Object *obedit, int type, float mat[4][4], int tot, int se
/* center vertices */
/* type PRIM_CONE can only have 1 one side filled
* if the cone has no capping, dont add vtop */
- if((fill && type>1) || type == PRIM_CONE) {
+ if(type == PRIM_CONE || (fill && !ELEM(type, PRIM_PLANE, PRIM_CUBE))) {
vec[0]= vec[1]= 0.0f;
- vec[2]= -depth;
+ vec[2]= type==PRIM_CONE ? depth : -depth;
Mat4MulVecfl(mat, vec);
vdown= addvertlist(em, vec, NULL);
if((ext || type==PRIM_CONE) && fill) {
vec[0]= vec[1]= 0.0f;
- vec[2]= depth;
+ vec[2]= type==PRIM_CONE ? -depth : depth;
Mat4MulVecfl(mat,vec);
vtop= addvertlist(em, vec, NULL);
}
@@ -1100,7 +1101,7 @@ static void make_prim(Object *obedit, int type, float mat[4][4], int tot, int se
/* top and bottom face */
if(fill || type==PRIM_CONE) {
- if(tot==4 && (type==0 || type==1)) {
+ if(tot==4 && ELEM(type, PRIM_PLANE, PRIM_CUBE)) {
v3= v1->next->next;
if(ext) v4= v2->next->next;
@@ -1119,7 +1120,7 @@ static void make_prim(Object *obedit, int type, float mat[4][4], int tot, int se
v4= v4->next;
}
}
- if(type>1) {
+ if(!ELEM(type, PRIM_PLANE, PRIM_CUBE)) {
addfacelist(em, vdown, v3, v1, 0, NULL, NULL);
if(ext) addfacelist(em, vtop, v4, v2, 0, NULL, NULL);
}
@@ -1144,7 +1145,7 @@ static void make_prim(Object *obedit, int type, float mat[4][4], int tot, int se
}
addfacelist(em, v3, v1, v2, v4, NULL, NULL);
}
- else if(type==PRIM_CONE && fill) {
+ else if(fill && type==PRIM_CONE) {
/* add the bottom flat area of the cone
* if capping is disabled dont bother */
v3= v1;
@@ -1160,7 +1161,7 @@ static void make_prim(Object *obedit, int type, float mat[4][4], int tot, int se
/* simple selection flush OK, based on fact it's a single model */
EM_select_flush(em); /* flushes vertex -> edge -> face selection */
- if(type!=0 && type!=13)
+ if(type!=PRIM_PLANE && type!=PRIM_MONKEY)
righthandfaces(em, 1); /* otherwise monkey has eyes in wrong direction */
BKE_mesh_end_editmesh(obedit->data, em);
@@ -1203,20 +1204,41 @@ static float new_primitive_matrix(bContext *C, float primmat[][4])
/* ********* add primitive operators ************* */
-static int add_primitive_plane_exec(bContext *C, wmOperator *op)
+static void make_prim_ext(bContext *C, int type, int tot, int seg,
+ int subdiv, float dia, float depth, int ext, int fill)
{
Object *obedit= CTX_data_edit_object(C);
- float dia, mat[4][4];
-
- dia= new_primitive_matrix(C, mat);
- /* plane (diameter of 1.41 makes it unit size) */
- dia*= sqrt(2.0f);
-
- make_prim(obedit, PRIM_PLANE, mat, 4, 0, 0, dia, 0.0f, 0, 1);
-
+ int newob;
+ float mat[4][4];
+
+ if(obedit==NULL || obedit->type!=OB_MESH) {
+ /* create editmode */
+ ED_object_add_type(C, OB_MESH);
+ ED_object_enter_editmode(C, EM_DO_UNDO);
+ obedit= CTX_data_edit_object(C);
+ newob = 1;
+ }
+ else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
+
+ dia *= new_primitive_matrix(C, mat);
+
+ make_prim(obedit, type, mat, tot, seg, subdiv, dia, depth, ext, fill);
+
DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
-
+
+
+ /* userdef */
+ if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
+ ED_object_exit_editmode(C, EM_FREEDATA); /* adding EM_DO_UNDO messes up operator redo */
+ }
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
+}
+
+static int add_primitive_plane_exec(bContext *C, wmOperator *op)
+{
+ /* sqrt(2.0f) - plane (diameter of 1.41 makes it unit size) */
+ make_prim_ext(C, PRIM_PLANE, 4, 0, 0, sqrt(2.0f), 0.0f, 0, 1);
return OPERATOR_FINISHED;
}
@@ -1229,7 +1251,7 @@ void MESH_OT_primitive_plane_add(wmOperatorType *ot)
/* api callbacks */
ot->exec= add_primitive_plane_exec;
- ot->poll= ED_operator_editmesh;
+ ot->poll= ED_operator_scene_editable;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1237,19 +1259,9 @@ void MESH_OT_primitive_plane_add(wmOperatorType *ot)
static int add_primitive_cube_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- float dia, mat[4][4];
-
- dia= new_primitive_matrix(C, mat);
- /* plane (diameter of 1.41 makes it unit size) */
- dia*= sqrt(2.0f);
-
- make_prim(obedit, PRIM_CUBE, mat, 4, 0, 0, dia, 1.0f, 1, 1);
-
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
-
- return OPERATOR_FINISHED;
+ /* sqrt(2.0f) - plane (diameter of 1.41 makes it unit size) */
+ make_prim_ext(C, PRIM_CUBE, 4, 0, 0, sqrt(2.0f), 1.0f, 1, 1);
+ return OPERATOR_FINISHED;
}
void MESH_OT_primitive_cube_add(wmOperatorType *ot)
@@ -1261,7 +1273,7 @@ void MESH_OT_primitive_cube_add(wmOperatorType *ot)
/* api callbacks */
ot->exec= add_primitive_cube_exec;
- ot->poll= ED_operator_editmesh;
+ ot->poll= ED_operator_scene_editable;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1269,18 +1281,10 @@ void MESH_OT_primitive_cube_add(wmOperatorType *ot)
static int add_primitive_circle_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- float dia, mat[4][4];
-
- dia= new_primitive_matrix(C, mat);
- dia *= RNA_float_get(op->ptr,"radius");
-
- make_prim(obedit, PRIM_CIRCLE, mat, RNA_int_get(op->ptr, "vertices"), 0, 0, dia, 0.0f, 0,
- RNA_boolean_get(op->ptr, "fill"));
-
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
-
+ make_prim_ext(C, PRIM_CIRCLE, RNA_int_get(op->ptr, "vertices"), 0, 0,
+ RNA_float_get(op->ptr,"radius"), 0.0f, 0,
+ RNA_boolean_get(op->ptr, "fill"));
+
return OPERATOR_FINISHED;
}
@@ -1293,32 +1297,24 @@ void MESH_OT_primitive_circle_add(wmOperatorType *ot)
/* api callbacks */
ot->exec= add_primitive_circle_exec;
- ot->poll= ED_operator_editmesh;
+ ot->poll= ED_operator_scene_editable;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 3, 500);
- RNA_def_float(ot->srna, "radius", 1.0f, -FLT_MAX, FLT_MAX, "Radius", "", 0.001, 100.00);
+ RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00);
RNA_def_boolean(ot->srna, "fill", 0, "Fill", "");
}
static int add_primitive_cylinder_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- float dia, mat[4][4];
-
- dia= new_primitive_matrix(C, mat);
- dia *= RNA_float_get(op->ptr, "radius");
-
- make_prim(obedit, PRIM_CYLINDER, mat, RNA_int_get(op->ptr, "vertices"), 0, 0, dia,
- RNA_float_get(op->ptr, "depth"), 1, 1);
-
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
-
- return OPERATOR_FINISHED;
+ make_prim_ext(C, PRIM_CYLINDER, RNA_int_get(op->ptr, "vertices"), 0, 0,
+ RNA_float_get(op->ptr,"radius"),
+ RNA_float_get(op->ptr, "depth"), 1, 1);
+
+ return OPERATOR_FINISHED;
}
void MESH_OT_primitive_cylinder_add(wmOperatorType *ot)
@@ -1330,31 +1326,23 @@ void MESH_OT_primitive_cylinder_add(wmOperatorType *ot)
/* api callbacks */
ot->exec= add_primitive_cylinder_exec;
- ot->poll= ED_operator_editmesh;
+ ot->poll= ED_operator_scene_editable;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 2, 500);
- RNA_def_float(ot->srna, "radius", 1.0f, -FLT_MAX, FLT_MAX, "Radius", "", 0.001, 100.00);
- RNA_def_float(ot->srna, "depth", 1.0f, -FLT_MAX, FLT_MAX, "Depth", "", 0.001, 100.00);
+ RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00);
+ RNA_def_float(ot->srna, "depth", 1.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00);
}
static int add_primitive_tube_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- float dia, mat[4][4];
-
- dia= new_primitive_matrix(C, mat);
- dia *= RNA_float_get(op->ptr, "radius");
-
- make_prim(obedit, PRIM_CYLINDER, mat, RNA_int_get(op->ptr, "vertices"), 0, 0, dia,
- RNA_float_get(op->ptr, "depth"), 1, 0);
-
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
-
+ make_prim_ext(C, PRIM_CYLINDER, RNA_int_get(op->ptr, "vertices"), 0, 0,
+ RNA_float_get(op->ptr,"radius"),
+ RNA_float_get(op->ptr, "depth"), 1, 0);
+
return OPERATOR_FINISHED;
}
@@ -1367,32 +1355,24 @@ void MESH_OT_primitive_tube_add(wmOperatorType *ot)
/* api callbacks */
ot->exec= add_primitive_tube_exec;
- ot->poll= ED_operator_editmesh;
+ ot->poll= ED_operator_scene_editable;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 2, 500);
- RNA_def_float(ot->srna, "radius", 1.0f, -FLT_MAX, FLT_MAX, "Radius", "", 0.001, 100.00);
- RNA_def_float(ot->srna, "depth", 1.0f, -FLT_MAX, FLT_MAX, "Depth", "", 0.001, 100.00);
+ RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00);
+ RNA_def_float(ot->srna, "depth", 1.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00);
}
static int add_primitive_cone_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- float dia, mat[4][4];
-
- dia= new_primitive_matrix(C, mat);
- dia *= RNA_float_get(op->ptr, "radius");
-
- make_prim(obedit, PRIM_CONE, mat, RNA_int_get(op->ptr, "vertices"), 0, 0, dia,
- RNA_float_get(op->ptr, "depth"), 0, RNA_boolean_get(op->ptr, "cap_end"));
-
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
-
- return OPERATOR_FINISHED;
+ make_prim_ext(C, PRIM_CONE, RNA_int_get(op->ptr, "vertices"), 0, 0,
+ RNA_float_get(op->ptr,"radius"), RNA_float_get(op->ptr, "depth"),
+ 0, RNA_boolean_get(op->ptr, "cap_end"));
+
+ return OPERATOR_FINISHED;
}
void MESH_OT_primitive_cone_add(wmOperatorType *ot)
@@ -1404,34 +1384,26 @@ void MESH_OT_primitive_cone_add(wmOperatorType *ot)
/* api callbacks */
ot->exec= add_primitive_cone_exec;
- ot->poll= ED_operator_editmesh;
+ ot->poll= ED_operator_scene_editable;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 2, 500);
- RNA_def_float(ot->srna, "radius", 1.0f, -FLT_MAX, FLT_MAX, "Radius", "", 0.001, 100.00);
- RNA_def_float(ot->srna, "depth", 1.0f, -FLT_MAX, FLT_MAX, "Depth", "", 0.001, 100.00);
+ RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00);
+ RNA_def_float(ot->srna, "depth", 1.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00);
RNA_def_boolean(ot->srna, "cap_end", 0, "Cap End", "");
}
static int add_primitive_grid_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- float dia, mat[4][4];
-
- dia= new_primitive_matrix(C, mat);
- dia*= RNA_float_get(op->ptr, "size");
-
- make_prim(obedit, PRIM_GRID, mat, RNA_int_get(op->ptr, "x_subdivisions"),
- RNA_int_get(op->ptr, "y_subdivisions"), 0, dia, 0.0f, 0, 1);
-
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
-
- return OPERATOR_FINISHED;
+ make_prim_ext(C, PRIM_GRID, RNA_int_get(op->ptr, "x_subdivisions"),
+ RNA_int_get(op->ptr, "y_subdivisions"), 0,
+ RNA_float_get(op->ptr,"size"), 0.0f, 0, 1);
+
+ return OPERATOR_FINISHED;
}
void MESH_OT_primitive_grid_add(wmOperatorType *ot)
@@ -1443,30 +1415,21 @@ void MESH_OT_primitive_grid_add(wmOperatorType *ot)
/* api callbacks */
ot->exec= add_primitive_grid_exec;
- ot->poll= ED_operator_editmesh;
+ ot->poll= ED_operator_scene_editable;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_int(ot->srna, "x_subdivisions", 10, INT_MIN, INT_MAX, "X Subdivisions", "", 3, 1000);
- RNA_def_int(ot->srna, "y_subdivisions", 10, INT_MIN, INT_MAX, "Y Subdivisons", "", 3, 1000);
- RNA_def_float(ot->srna, "size", 1.0f, -FLT_MAX, FLT_MAX, "Size", "", 0.001, FLT_MAX);
+ RNA_def_int(ot->srna, "y_subdivisions", 10, INT_MIN, INT_MAX, "Y Subdivisions", "", 3, 1000);
+ RNA_def_float(ot->srna, "size", 1.0f, 0.0, FLT_MAX, "Size", "", 0.001, FLT_MAX);
}
static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- float mat[4][4];
-
- new_primitive_matrix(C, mat);
-
- make_prim(obedit, PRIM_MONKEY, mat, 0, 0, 2, 0.0f, 0.0f, 0, 0);
-
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
-
- return OPERATOR_FINISHED;
+ make_prim_ext(C, PRIM_MONKEY, 0, 0, 2, 0.0f, 0.0f, 0, 0);
+ return OPERATOR_FINISHED;
}
void MESH_OT_primitive_monkey_add(wmOperatorType *ot)
@@ -1478,7 +1441,7 @@ void MESH_OT_primitive_monkey_add(wmOperatorType *ot)
/* api callbacks */
ot->exec= add_primitive_monkey_exec;
- ot->poll= ED_operator_editmesh;
+ ot->poll= ED_operator_scene_editable;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1486,18 +1449,10 @@ void MESH_OT_primitive_monkey_add(wmOperatorType *ot)
static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- float dia, mat[4][4];
-
- dia= new_primitive_matrix(C, mat);
- dia*= RNA_float_get(op->ptr, "size");
+ make_prim_ext(C, PRIM_UVSPHERE, RNA_int_get(op->ptr, "rings"),
+ RNA_int_get(op->ptr, "segments"), 0,
+ RNA_float_get(op->ptr,"size"), 0.0f, 0, 0);
- make_prim(obedit, PRIM_UVSPHERE, mat, RNA_int_get(op->ptr, "rings"),
- RNA_int_get(op->ptr, "segments"), 0, dia, 0.0f, 0, 0);
-
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
-
return OPERATOR_FINISHED;
}
@@ -1510,7 +1465,7 @@ void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot)
/* api callbacks */
ot->exec= add_primitive_uvsphere_exec;
- ot->poll= ED_operator_editmesh;
+ ot->poll= ED_operator_scene_editable;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1518,23 +1473,14 @@ void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot)
/* props */
RNA_def_int(ot->srna, "segments", 32, INT_MIN, INT_MAX, "Segments", "", 3, 500);
RNA_def_int(ot->srna, "rings", 24, INT_MIN, INT_MAX, "Rings", "", 3, 500);
- RNA_def_float(ot->srna, "size", 1.0f, -FLT_MAX, FLT_MAX, "Size", "", 0.001, 100.00);
+ RNA_def_float(ot->srna, "size", 1.0f, 0.0, FLT_MAX, "Size", "", 0.001, 100.00);
}
static int add_primitive_icosphere_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- float dia, mat[4][4];
-
- dia= new_primitive_matrix(C, mat);
- dia*= RNA_float_get(op->ptr, "size");
-
- make_prim(obedit, PRIM_ICOSPHERE, mat, 0, 0,
- RNA_int_get(op->ptr, "subdivisions"), dia, 0.0f, 0, 0);
-
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
-
+ make_prim_ext(C, PRIM_ICOSPHERE, 0, 0, RNA_int_get(op->ptr, "subdivisions"),
+ RNA_float_get(op->ptr,"size"), 0.0f, 0, 0);
+
return OPERATOR_FINISHED;
}
@@ -1547,7 +1493,7 @@ void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot)
/* api callbacks */
ot->exec= add_primitive_icosphere_exec;
- ot->poll= ED_operator_editmesh;
+ ot->poll= ED_operator_scene_editable;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index b240896ec9c..a57d56ec1eb 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -1047,26 +1047,6 @@ static int loop_multiselect(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-#if 0 //moved to bmeshutils_mods.c
-void MESH_OT_loop_multi_select(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Multi Select Loops";
- ot->description= "Select a loop of connected edges by connection type.";
- ot->idname= "MESH_OT_loop_multi_select";
-
- /* api callbacks */
- ot->exec= loop_multiselect;
- ot->poll= ED_operator_editmesh;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- RNA_def_boolean(ot->srna, "ring", 0, "Ring", "");
-}
-#endif
-
/* ************************* */
/* ************************* */
@@ -1668,6 +1648,11 @@ void EM_toggle_select_all(EditMesh *em) /* exported for UV */
EM_set_flag_all(em, SELECT);
}
+void EM_select_all(EditMesh *em)
+{
+ EM_set_flag_all(em, SELECT);
+}
+
void MESH_OT_bmesh_test(wmOperatorType *ot)
{
/* identifiers */
@@ -1851,7 +1836,7 @@ void MESH_OT_select_random(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "Percentage of vertices to select randomly.", 0.0001f, 1.0f);
+ RNA_def_float_percentage(ot->srna, "percent", 50.0f, 0.0f, 100.0f, "Percent", "Percentage of vertices to select randomly.", 0.0001f, 1.0f);
}
void EM_select_by_material(EditMesh *em, int index)
diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c
index 686f0fd9348..9a2a953f643 100644
--- a/source/blender/editors/mesh/loopcut.c
+++ b/source/blender/editors/mesh/loopcut.c
@@ -51,6 +51,7 @@
#include "BKE_blender.h"
#include "BKE_context.h"
+#include "BKE_depsgraph.h"
#include "BKE_scene.h"
#include "BKE_utildefines.h"
#include "BKE_mesh.h"
@@ -132,7 +133,7 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
float (*edges)[2][3] = NULL;
BLI_array_declare(edges);
float co[2][3];
- int looking=1, i, j=0, tot=0;
+ int looking=1, i, tot=0;
if (!startedge)
return;
@@ -246,28 +247,29 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
lcd->totedge = tot;
}
-static void ringsel_find_edge(tringselOpData *lcd, const bContext *C, ARegion *ar)
+static void ringsel_find_edge(tringselOpData *lcd, const bContext *C, ARegion *ar, int cuts)
{
if (lcd->eed)
- edgering_sel(lcd, 1, 0);
+ edgering_sel(lcd, cuts, 0);
}
static void ringsel_finish(bContext *C, wmOperator *op)
{
tringselOpData *lcd= op->customdata;
+ int cuts= RNA_int_get(op->ptr,"number_cuts");
if (lcd->eed) {
- edgering_sel(lcd, 0, 1);
+ edgering_sel(lcd, cuts, 1);
if (lcd->do_cut) {
BMEditMesh *em = lcd->em;
-
BM_esubdivideflag(lcd->ob, em->bm, BM_SELECT, 0.0f,
- 0.0f, 0, 1, SUBDIV_SELECT_LOOPCUT,
+ 0.0f, 0, cuts, SUBDIV_SELECT_LOOPCUT,
SUBD_PATH, 0, 0);
WM_event_add_notifier(C, NC_GEOM|ND_SELECT|ND_DATA, lcd->ob->data);
DAG_id_flush_update(lcd->ob->data, OB_RECALC_DATA);
}
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, lcd->ob->data);
}
}
@@ -320,7 +322,6 @@ static int ringsel_cancel (bContext *C, wmOperator *op)
static int ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt)
{
- ScrArea *sa = CTX_wm_area(C);
tringselOpData *lcd;
BMEdge *edge;
int dist = 75;
@@ -331,7 +332,7 @@ static int ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt)
return OPERATOR_CANCELLED;
/* add a modal handler for this operator - handles loop selection */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
lcd = op->customdata;
lcd->vc.mval[0] = evt->mval[0];
@@ -340,7 +341,7 @@ static int ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt)
edge = EDBM_findnearestedge(&lcd->vc, &dist);
if (edge != lcd->eed) {
lcd->eed = edge;
- ringsel_find_edge(lcd, C, lcd->ar);
+ ringsel_find_edge(lcd, C, lcd->ar, 1);
}
return OPERATOR_RUNNING_MODAL;
@@ -349,7 +350,6 @@ static int ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt)
static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt)
{
- ScrArea *sa = CTX_wm_area(C);
tringselOpData *lcd;
BMEdge *edge;
int dist = 75;
@@ -360,7 +360,7 @@ static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt)
return OPERATOR_CANCELLED;
/* add a modal handler for this operator - handles loop selection */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
lcd = op->customdata;
lcd->vc.mval[0] = evt->mval[0];
@@ -369,7 +369,7 @@ static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt)
edge = EDBM_findnearestedge(&lcd->vc, &dist);
if (edge != lcd->eed) {
lcd->eed = edge;
- ringsel_find_edge(lcd, C, lcd->ar);
+ ringsel_find_edge(lcd, C, lcd->ar, 1);
}
return OPERATOR_RUNNING_MODAL;
@@ -377,23 +377,49 @@ static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt)
static int ringsel_modal (bContext *C, wmOperator *op, wmEvent *event)
{
+ int cuts= RNA_int_get(op->ptr,"number_cuts");
tringselOpData *lcd= op->customdata;
view3d_operator_needs_opengl(C);
+
switch (event->type) {
- case RIGHTMOUSE:
case LEFTMOUSE: /* confirm */ // XXX hardcoded
- if (event->val == 0) {
+ if (event->val == KM_RELEASE) {
/* finish */
ED_region_tag_redraw(lcd->ar);
-
+
ringsel_finish(C, op);
ringsel_exit(C, op);
return OPERATOR_FINISHED;
}
-
+
+ ED_region_tag_redraw(lcd->ar);
+ break;
+ case RIGHTMOUSE: /* abort */ // XXX hardcoded
+ case ESCKEY:
+ if (event->val == KM_RELEASE) {
+ /* cancel */
+ ED_region_tag_redraw(lcd->ar);
+
+ return ringsel_cancel(C, op);
+ }
+
+ ED_region_tag_redraw(lcd->ar);
+ break;
+ case WHEELUPMOUSE: /* change number of cuts */
+ cuts++;
+ RNA_int_set(op->ptr,"number_cuts",cuts);
+ ringsel_find_edge(lcd, C, lcd->ar, cuts);
+
+ ED_region_tag_redraw(lcd->ar);
+ break;
+ case WHEELDOWNMOUSE: /* change number of cuts */
+ cuts=MAX2(cuts-1,1);
+ RNA_int_set(op->ptr,"number_cuts",cuts);
+ ringsel_find_edge(lcd, C, lcd->ar,cuts);
+
ED_region_tag_redraw(lcd->ar);
break;
case MOUSEMOVE: { /* mouse moved somewhere to select another loop */
@@ -406,12 +432,12 @@ static int ringsel_modal (bContext *C, wmOperator *op, wmEvent *event)
if (edge != lcd->eed) {
lcd->eed = edge;
- ringsel_find_edge(lcd, C, lcd->ar);
+ ringsel_find_edge(lcd, C, lcd->ar, cuts);
}
ED_region_tag_redraw(lcd->ar);
break;
- }
+ }
}
/* keep going until the user confirms */
@@ -452,4 +478,7 @@ void MESH_OT_loopcut (wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+
+ /* properties */
+ RNA_def_int(ot->srna, "number_cuts", 1, 1, 10, "Number of Cuts", "", 1, INT_MAX);
}
diff --git a/source/blender/editors/mesh/mesh_layers.c b/source/blender/editors/mesh/mesh_data.c
index be476b07a3f..848930e156b 100644
--- a/source/blender/editors/mesh/mesh_layers.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -26,12 +26,14 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#include <stdlib.h>
#include <math.h>
+#include <stdlib.h>
+#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_customdata_types.h"
+#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
@@ -43,10 +45,14 @@
#include "BKE_depsgraph.h"
#include "BKE_displist.h"
#include "BKE_global.h"
+#include "BKE_material.h"
#include "BKE_mesh.h"
+#include "BKE_report.h"
#include "BKE_tessmesh.h"
+#include "BLI_arithb.h"
#include "BLI_editVert.h"
+#include "BLI_edgehash.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -59,23 +65,20 @@
#include "ED_view3d.h"
#include "mesh_intern.h"
-#include "bmesh.h"
-static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *layer, int loop)
+static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *layer)
{
- CustomData *data;
Mesh *me = ob->data;
+ 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;
- int i, actindex, rndindex, cloneindex, maskindex;
+ int index= CustomData_get_layer_index(data, type);
+ int i, actindex, rndindex, cloneindex, maskindex, tot = me->totpoly;
- if (loop)
+ if (layer->type == CD_MLOOPCOL) {
data = (me->edit_btmesh)? &me->edit_btmesh->bm->ldata: &me->ldata;
- else
- data = (me->edit_btmesh)? &me->edit_btmesh->bm->pdata: &me->pdata;
-
- index = CustomData_get_layer_index(data, type);
+ tot = me->totloop;
+ }
/* 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,
@@ -94,7 +97,7 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la
BM_free_data_layer(me->edit_btmesh->bm, data, type);
}
else {
- CustomData_free_layer_active(data, type, loop ? me->totloop : me->totpoly);
+ CustomData_free_layer_active(data, type, tot);
mesh_update_customdata_pointers(me);
}
@@ -157,67 +160,140 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la
/* set index */
CustomData_set_layer_mask(data, type, maskindex);
}
+}
+
+int ED_mesh_uv_texture_add(bContext *C, Scene *scene, Object *ob, Mesh *me)
+{
+ BMEditMesh *em;
+ int layernum;
+
+ if(me->edit_btmesh) {
+ 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, MAX_MTFACE);
+ CustomData_set_layer_active(&em->bm->pdata, MAX_MTFACE, layernum);
+ }
+ else {
+ layernum= CustomData_number_of_layers(&me->pdata, MAX_MTFACE);
+ if(layernum >= MAX_MTFACE)
+ return OPERATOR_CANCELLED;
- if (!me->edit_btmesh) {
- /*recalc mesh tesselation*/
- me->totface = mesh_recalcTesselation(&me->fdata, &me->ldata,
- &me->pdata, me->mvert, me->totface, me->totloop, me->totpoly);
+ if(me->mtface)
+ CustomData_add_layer(&me->pdata, MAX_MTFACE, CD_DUPLICATE, me->mtpoly, me->totpoly);
+ else
+ CustomData_add_layer(&me->pdata, MAX_MTFACE, CD_DEFAULT, NULL, me->totpoly);
+ CustomData_set_layer_active(&me->pdata, MAX_MTFACE, layernum);
mesh_update_customdata_pointers(me);
}
-}
-/*********************** UV texture operators ************************/
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
-static int layers_poll(bContext *C)
+ return 1;
+}
+
+int ED_mesh_uv_texture_remove(bContext *C, Object *ob, Mesh *me)
{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- ID *data= (ob)? ob->data: NULL;
- return (ob && !ob->id.lib && ob->type==OB_MESH && data && !data->lib);
+ CustomDataLayer *cdl;
+ int index;
+
+ index= CustomData_get_active_layer_index(&me->pdata, CD_MTEXPOLY);
+ cdl= (index == -1)? NULL: &me->pdata.layers[index];
+
+ if(!cdl)
+ return 0;
+
+ delete_customdata_layer(C, ob, cdl);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
+
+ return 1;
}
-static int uv_texture_add_exec(bContext *C, wmOperator *op)
+int ED_mesh_color_add(bContext *C, Scene *scene, Object *ob, Mesh *me)
{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me= ob->data;
BMEditMesh *em;
+ MLoopCol *mcol;
int layernum;
if(me->edit_btmesh) {
em= me->edit_btmesh;
- layernum= CustomData_number_of_layers(&em->bm->pdata, CD_MTEXPOLY);
- if(layernum >= MAX_MTFACE)
- return OPERATOR_CANCELLED;
+ layernum= CustomData_number_of_layers(&em->bm->ldata, CD_MLOOPCOL);
+ if(layernum >= MAX_MCOL)
+ return 0;
- 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);
+ BM_add_data_layer(em->bm, &em->bm->pdata, CD_MLOOPCOL);
+ CustomData_set_layer_active(&em->bm->ldata, CD_MLOOPCOL, layernum);
}
else {
- layernum= CustomData_number_of_layers(&me->pdata, CD_MTEXPOLY);
- if(layernum >= MAX_MTFACE)
- return OPERATOR_CANCELLED;
+ layernum= CustomData_number_of_layers(&me->ldata, CD_MLOOPCOL);
+ if(layernum >= CD_MLOOPCOL)
+ return 0;
- 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);
+ 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);
- /*recalc mesh tesselation*/
- me->totface = mesh_recalcTesselation(&me->fdata, &me->ldata,
- &me->pdata, me->mvert, me->totface, me->totloop, me->totpoly);
+ CustomData_set_layer_active(&me->ldata, CD_MLOOPCOL, layernum);
mesh_update_customdata_pointers(me);
+
+ /*BMESH_TODO
+ if(!mcol)
+ shadeMeshMCol(scene, ob, me);
+ */
}
DAG_id_flush_update(&me->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
+ return 1;
+}
+
+int ED_mesh_color_remove(bContext *C, Object *ob, Mesh *me)
+{
+ CustomDataLayer *cdl;
+ int index;
+
+ index= CustomData_get_active_layer_index(&me->pdata, CD_MLOOPCOL);
+ cdl= (index == -1)? NULL: &me->pdata.layers[index];
+
+ if(!cdl)
+ return 0;
+
+ delete_customdata_layer(C, ob, cdl);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
+
+ return 1;
+}
+
+/*********************** UV texture operators ************************/
+
+static int layers_poll(bContext *C)
+{
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ ID *data= (ob)? ob->data: NULL;
+ return (ob && !ob->id.lib && ob->type==OB_MESH && data && !data->lib);
+}
+
+static int uv_texture_add_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Mesh *me= ob->data;
+
+ if(!ED_mesh_uv_texture_add(C, scene, ob, me))
+ return OPERATOR_CANCELLED;
+
return OPERATOR_FINISHED;
}
@@ -240,24 +316,10 @@ static int uv_texture_remove_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
Mesh *me= ob->data;
- CustomDataLayer *cdl, *cdl2;
- int index;
-
- 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)
+ if(!ED_mesh_uv_texture_remove(C, ob, me))
return OPERATOR_CANCELLED;
- delete_customdata_layer(C, ob, cdl, 0);
- delete_customdata_layer(C, ob, cdl2, 1);
-
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
-
return OPERATOR_FINISHED;
}
@@ -283,46 +345,9 @@ static int vertex_color_add_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
Mesh *me= ob->data;
- BMEditMesh *em;
- MLoopCol *mcol;
- int layernum;
-
- if(me->edit_btmesh) {
- 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);
-
- /*recalc mesh tesselation*/
- me->totface = mesh_recalcTesselation(&me->fdata, &me->ldata,
- &me->pdata, me->mvert, me->totface, me->totloop, me->totpoly);
-
- mesh_update_customdata_pointers(me);
-
- //if(!mcol)
- // shadeMeshMCol(scene, ob, me);
- }
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
+ if(!ED_mesh_color_add(C, scene, ob, me))
+ return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
}
@@ -346,20 +371,10 @@ static int vertex_color_remove_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
Mesh *me= ob->data;
- CustomDataLayer *cdl;
- int index;
-
- index= CustomData_get_active_layer_index(&me->ldata, CD_MLOOPCOL);
- cdl= (index == -1)? NULL: &me->ldata.layers[index];
- if(!cdl)
+ if(!ED_mesh_color_remove(C, ob, me))
return OPERATOR_CANCELLED;
- delete_customdata_layer(C, ob, cdl, 1);
-
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
-
return OPERATOR_FINISHED;
}
@@ -443,3 +458,212 @@ void MESH_OT_sticky_remove(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
+/************************** Add Geometry Layers *************************/
+
+static void mesh_calc_edges(Mesh *mesh)
+{
+ CustomData edata;
+ EdgeHashIterator *ehi;
+ MFace *mf = mesh->mface;
+ MEdge *med;
+ EdgeHash *eh = BLI_edgehash_new();
+ int i, *index, totedge, totface = mesh->totface;
+
+ for (i = 0; i < totface; i++, mf++) {
+ if (!BLI_edgehash_haskey(eh, mf->v1, mf->v2))
+ BLI_edgehash_insert(eh, mf->v1, mf->v2, NULL);
+ if (!BLI_edgehash_haskey(eh, mf->v2, mf->v3))
+ BLI_edgehash_insert(eh, mf->v2, mf->v3, NULL);
+
+ if (mf->v4) {
+ if (!BLI_edgehash_haskey(eh, mf->v3, mf->v4))
+ BLI_edgehash_insert(eh, mf->v3, mf->v4, NULL);
+ if (!BLI_edgehash_haskey(eh, mf->v4, mf->v1))
+ BLI_edgehash_insert(eh, mf->v4, mf->v1, NULL);
+ } else {
+ if (!BLI_edgehash_haskey(eh, mf->v3, mf->v1))
+ BLI_edgehash_insert(eh, mf->v3, mf->v1, NULL);
+ }
+ }
+
+ totedge = BLI_edgehash_size(eh);
+
+ /* write new edges into a temporary CustomData */
+ memset(&edata, 0, sizeof(edata));
+ CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge);
+
+ ehi = BLI_edgehashIterator_new(eh);
+ med = CustomData_get_layer(&edata, CD_MEDGE);
+ for(i = 0; !BLI_edgehashIterator_isDone(ehi);
+ BLI_edgehashIterator_step(ehi), ++i, ++med, ++index) {
+ BLI_edgehashIterator_getKey(ehi, (int*)&med->v1, (int*)&med->v2);
+
+ med->flag = ME_EDGEDRAW|ME_EDGERENDER;
+ }
+ BLI_edgehashIterator_free(ehi);
+
+ /* free old CustomData and assign new one */
+ CustomData_free(&mesh->edata, mesh->totedge);
+ mesh->edata = edata;
+ mesh->totedge = totedge;
+
+ mesh->medge = CustomData_get_layer(&mesh->edata, CD_MEDGE);
+
+ BLI_edgehash_free(eh, NULL);
+}
+
+void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges)
+{
+ if(calc_edges || (mesh->totface && mesh->totedge == 0))
+ mesh_calc_edges(mesh);
+
+ mesh_calc_normals(mesh->mvert, mesh->totvert, mesh->mface, mesh->totface, NULL);
+
+ DAG_id_flush_update(&mesh->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, mesh);
+}
+
+static void mesh_add_verts(Mesh *mesh, int len)
+{
+ CustomData vdata;
+ MVert *mvert;
+ int i, totvert;
+
+ if(len == 0)
+ return;
+
+ totvert= mesh->totvert + len;
+ CustomData_copy(&mesh->vdata, &vdata, CD_MASK_MESH, CD_DEFAULT, totvert);
+ CustomData_copy_data(&mesh->vdata, &vdata, 0, 0, mesh->totvert);
+
+ if(!CustomData_has_layer(&vdata, CD_MVERT))
+ CustomData_add_layer(&vdata, CD_MVERT, CD_CALLOC, NULL, totvert);
+
+ CustomData_free(&mesh->vdata, mesh->totvert);
+ mesh->vdata= vdata;
+ mesh_update_customdata_pointers(mesh);
+
+ /* scan the input list and insert the new vertices */
+
+ mvert= &mesh->mvert[mesh->totvert];
+ for(i=0; i<len; i++, mvert++)
+ mvert->flag |= SELECT;
+
+ /* set final vertex list size */
+ mesh->totvert= totvert;
+}
+
+void ED_mesh_transform(Mesh *me, float *mat)
+{
+ int i;
+ MVert *mvert= me->mvert;
+
+ for(i= 0; i < me->totvert; i++, mvert++)
+ Mat4MulVecfl((float (*)[4])mat, mvert->co);
+
+ mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL);
+}
+
+static void mesh_add_edges(Mesh *mesh, int len)
+{
+ CustomData edata;
+ MEdge *medge;
+ int i, totedge;
+
+ if(len == 0)
+ return;
+
+ totedge= mesh->totedge+len;
+
+ /* update customdata */
+ CustomData_copy(&mesh->edata, &edata, CD_MASK_MESH, CD_DEFAULT, totedge);
+ CustomData_copy_data(&mesh->edata, &edata, 0, 0, mesh->totedge);
+
+ if(!CustomData_has_layer(&edata, CD_MEDGE))
+ CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge);
+
+ CustomData_free(&mesh->edata, mesh->totedge);
+ mesh->edata= edata;
+ mesh_update_customdata_pointers(mesh);
+
+ /* set default flags */
+ medge= &mesh->medge[mesh->totedge];
+ for(i=0; i<len; i++, medge++)
+ medge->flag= ME_EDGEDRAW|ME_EDGERENDER|SELECT;
+
+ mesh->totedge= totedge;
+}
+
+static void mesh_add_faces(Mesh *mesh, int len)
+{
+ CustomData fdata;
+ MFace *mface;
+ int i, totface;
+
+ if(len == 0)
+ return;
+
+ totface= mesh->totface + len; /* new face count */
+
+ /* update customdata */
+ CustomData_copy(&mesh->fdata, &fdata, CD_MASK_MESH, CD_DEFAULT, totface);
+ CustomData_copy_data(&mesh->fdata, &fdata, 0, 0, mesh->totface);
+
+ if(!CustomData_has_layer(&fdata, CD_MFACE))
+ CustomData_add_layer(&fdata, CD_MFACE, CD_CALLOC, NULL, totface);
+
+ CustomData_free(&mesh->fdata, mesh->totface);
+ mesh->fdata= fdata;
+ mesh_update_customdata_pointers(mesh);
+
+ /* set default flags */
+ mface= &mesh->mface[mesh->totface];
+ for(i=0; i<len; i++, mface++)
+ mface->flag= SELECT;
+
+ mesh->totface= totface;
+}
+
+void ED_mesh_geometry_add(Mesh *mesh, ReportList *reports, int verts, int edges, int faces)
+{
+ if(mesh->edit_btmesh) {
+ BKE_report(reports, RPT_ERROR, "Can't add geometry in edit mode.");
+ return;
+ }
+
+ if(verts)
+ mesh_add_verts(mesh, verts);
+ if(edges)
+ mesh_add_edges(mesh, edges);
+ if(faces)
+ mesh_add_faces(mesh, faces);
+}
+
+void ED_mesh_calc_normals(Mesh *me)
+{
+ mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL);
+}
+
+void ED_mesh_material_add(Mesh *me, Material *ma)
+{
+ int i;
+ int totcol = me->totcol + 1;
+ Material **mat;
+
+ /* don't add if mesh already has it */
+ for(i = 0; i < me->totcol; i++)
+ if(me->mat[i] == ma)
+ return;
+
+ mat= MEM_callocN(sizeof(void*)*totcol, "newmatar");
+
+ if(me->totcol) memcpy(mat, me->mat, sizeof(void*) * me->totcol);
+ if(me->mat) MEM_freeN(me->mat);
+
+ me->mat = mat;
+ me->mat[me->totcol++] = ma;
+ ma->id.us++;
+
+ test_object_materials((ID*)me);
+}
+
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index 1dce47a7419..4a1532af3b0 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -110,12 +110,6 @@ extern struct EditEdge *addedgelist(EditMesh *em, struct EditVert *v1, struct Ed
extern struct EditFace *addfacelist(EditMesh *em, struct EditVert *v1, struct EditVert *v2, struct EditVert *v3, struct EditVert *v4, struct EditFace *example, struct EditFace *exampleEdges);
extern struct EditEdge *findedgelist(EditMesh *em, struct EditVert *v1, struct EditVert *v2);
-EditVert *editedge_getOtherVert(EditEdge *eed, EditVert *eve);
-EditVert *editedge_getSharedVert(EditEdge *eed, EditEdge *eed2);
-int editedge_containsVert(struct EditEdge *eed, struct EditVert *eve);
-int editface_containsVert(struct EditFace *efa, struct EditVert *eve);
-int editface_containsEdge(struct EditFace *efa, struct EditEdge *eed);
-
void em_setup_viewcontext(struct bContext *C, struct ViewContext *vc);
void MESH_OT_separate(struct wmOperatorType *ot);
@@ -225,7 +219,7 @@ void MESH_OT_vertices_smooth(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);
+extern void EM_automerge(Scene *scene, Object *obedit, int update);
void editmesh_select_by_material(EditMesh *em, int index);
void righthandfaces(EditMesh *em, int select); /* makes faces righthand turning */
void EM_select_more(EditMesh *em);
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index e75781aab20..7b2522ac3d2 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -55,6 +55,7 @@
#include "WM_types.h"
#include "ED_mesh.h"
+#include "ED_object.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "ED_view3d.h"
@@ -63,186 +64,10 @@
#include "mesh_intern.h"
-/******************************** menus *************************************/
-
-static int vertex_specials_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- uiPopupMenu *pup;
- uiLayout *layout;
-
- pup= uiPupMenuBegin(C, "Vertex Specials", 0);
- layout= uiPupMenuLayout(pup);
- uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN);
-
- 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, "BMesh Test Operator", 0, "MESH_OT_bm_test");
- //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);
-
- return OPERATOR_CANCELLED;
-}
-
-static void MESH_OT_vertex_specials(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Vertex Specials";
- //ot->description= "Perform special vertex operations.";
- ot->idname= "MESH_OT_vertex_specials";
-
- /* 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->description= "Perform special edge operations.";
- ot->idname= "MESH_OT_edge_specials";
-
- /* api callbacks */
- ot->invoke= edge_specials_invoke;
- ot->poll= ED_operator_editmesh;
-}
-
-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_flat");
- 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");
- uiItemO(layout, NULL, 0, "MESH_OT_uvs_reverse");
- uiItemMenuEnumO(layout, NULL, 0, "MESH_OT_colors_rotate", "direction");
- //uiItemMenuEnumO(layout, NULL, 0, "MESH_OT_colors_mirror", "axis");
- uiItemO(layout, NULL, 0, "MESH_OT_colors_reverse");
-
- uiPupMenuEnd(C, pup);
-
- return OPERATOR_CANCELLED;
-}
-
-static void MESH_OT_face_specials(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Face Specials";
- //ot->description= "Perform special face operations.";
- ot->idname= "MESH_OT_face_specials";
-
- /* api callbacks */
- 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, "Pin", 0, "MESH_OT_pin");
- uiItemO(layout, "Unpin", 0, "MESH_OT_unpin");
- 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_flat");
- //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);
-
- return OPERATOR_CANCELLED;
-}
-
-static void MESH_OT_specials(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Specials";
- //ot->description= "Perform special vertice, edge or face operations.";
- ot->idname= "MESH_OT_specials";
-
- /* api callbacks */
- ot->invoke= specials_invoke;
- ot->poll= ED_operator_editmesh;
-}
-
/**************************** registration **********************************/
void ED_operatortypes_mesh(void)
{
- wmOperatorType *ot;
- wmOperatorTypeMacro *otm;
- static int constraint_axis[3] = {0, 0, 1};
-
WM_operatortype_append(MESH_OT_select_all_toggle);
WM_operatortype_append(MESH_OT_select_more);
WM_operatortype_append(MESH_OT_select_less);
@@ -325,11 +150,6 @@ void ED_operatortypes_mesh(void)
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);
WM_operatortype_append(MESH_OT_vert_connect);
WM_operatortype_append(MESH_OT_edge_split);
@@ -342,8 +162,12 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_edgering_select);
WM_operatortype_append(MESH_OT_loopcut);
+}
- /* macros */
+void ED_operatormacros_mesh(void)
+{
+ wmOperatorType *ot;
+ wmOperatorTypeMacro *otmacro;
/*combining operators with invoke and exec portions doesn't work yet.
@@ -354,16 +178,18 @@ void ED_operatortypes_mesh(void)
ot= WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "MESH_OT_duplicate");
- WM_operatortype_macro_define(ot, "TFM_OT_translate");
+ otmacro= WM_operatortype_macro_define(ot, "TFM_OT_translate");
+ RNA_enum_set(otmacro->ptr, "proportional", 0);
ot= WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", OPTYPE_UNDO|OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "MESH_OT_rip");
- WM_operatortype_macro_define(ot, "TFM_OT_translate");
+ otmacro= WM_operatortype_macro_define(ot, "TFM_OT_translate");
+ RNA_enum_set(otmacro->ptr, "proportional", 0);
/*ot= WM_operatortype_append_macro("MESH_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "MESH_OT_extrude");
- otm = WM_operatortype_macro_define(ot, "TFM_OT_translate");
-
+ otmacro= WM_operatortype_macro_define(ot, "TFM_OT_translate");
+ RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_enum_set(otm->ptr, "proportional", 0);
RNA_boolean_set(otm->ptr, "mirror", 0);
@@ -373,12 +199,15 @@ void ED_operatortypes_mesh(void)
}
/* note mesh keymap also for other space? */
-void ED_keymap_mesh(wmWindowManager *wm)
+void ED_keymap_mesh(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "EditMesh", 0, 0);
- wmKeymapItem *kmi;
+ wmKeyMap *keymap;
+ wmKeyMapItem *kmi;
+
+ keymap= WM_keymap_find(keyconf, "EditMesh", 0, 0);
+ keymap->poll= ED_operator_editmesh;
- WM_keymap_add_item(keymap, "MESH_OT_loopcut", ACTIONMOUSE, KM_PRESS, KM_CTRL, RKEY);
+ WM_keymap_add_item(keymap, "MESH_OT_loopcut", RKEY, KM_PRESS, KM_CTRL, 0);
/* selecting */
/* standard mouse selection goes via space_view3d */
@@ -463,26 +292,40 @@ void ED_keymap_mesh(wmWindowManager *wm)
/* add/remove */
WM_keymap_add_item(keymap, "MESH_OT_edge_face_add", FKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_skin", FKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); /* python */
WM_keymap_add_item(keymap, "MESH_OT_duplicate_move", 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);
+
+ kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", AKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(kmi->ptr, "name", "INFO_MT_mesh_add");
+
+ WM_keymap_add_item(keymap, "MESH_OT_separate", PKEY, KM_PRESS, 0, 0);
/* use KM_RELEASE because same key is used for tweaks */
WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", LEFTMOUSE, KM_RELEASE, KM_CTRL, 0);
WM_keymap_add_item(keymap, "MESH_OT_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_delete", DELKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "MESH_OT_fgon_make", FKEY, KM_PRESS, KM_ALT, 0);
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_CTRL, XKEY);
+ WM_keymap_add_item(keymap, "MESH_OT_knife_cut", LEFTMOUSE, KM_PRESS, 0, KKEY);
/* 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);
+ kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", WKEY, KM_PRESS, 0, 0);
+ RNA_string_set(kmi->ptr, "name", "VIEW3D_MT_edit_mesh_specials");
+
+ kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", FKEY, KM_PRESS, KM_CTRL, 0);
+ RNA_string_set(kmi->ptr, "name", "VIEW3D_MT_edit_mesh_faces");
+ kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", EKEY, KM_PRESS, KM_CTRL, 0);
+ RNA_string_set(kmi->ptr, "name", "VIEW3D_MT_edit_mesh_edges");
+
+ kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", VKEY, KM_PRESS, KM_CTRL, 0);
+ RNA_string_set(kmi->ptr, "name", "VIEW3D_MT_edit_mesh_vertices");
+
/* UV's */
WM_keymap_add_item(keymap, "UV_OT_mapping_menu", UKEY, KM_PRESS, 0, 0);
+
+ ED_object_generic_keymap(keyconf, keymap, TRUE);
}
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 4e356479f9e..629e7bacc20 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -588,7 +588,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
DAG_scene_sort(scene); // removed objects, need to rebuild dag before editmode call
ED_object_enter_editmode(C, EM_WAITCURSOR);
- ED_object_exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR|EM_DO_UNDO);
WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
@@ -687,7 +687,7 @@ void sort_faces(Scene *scene, View3D *v3d)
if (event == 1)
Mat4MulMat4(mat, OBACT->obmat, rv3d->viewmat); /* apply the view matrix to the object matrix */
else if (event == 2) { /* sort from cursor */
- if( v3d && v3d->localview ) {
+ if( v3d && v3d->localvd ) {
VECCOPY(cur, v3d->cursor);
} else {
VECCOPY(cur, scene->cursor);
diff --git a/source/blender/editors/metaball/mball_ops.c b/source/blender/editors/metaball/mball_ops.c
index b469bb3e400..01da90212a0 100644
--- a/source/blender/editors/metaball/mball_ops.c
+++ b/source/blender/editors/metaball/mball_ops.c
@@ -34,6 +34,8 @@
#include "DNA_listBase.h"
#include "DNA_windowmanager_types.h"
+#include "ED_screen.h"
+
#include "mball_intern.h"
void ED_operatortypes_metaball(void)
@@ -49,9 +51,12 @@ void ED_operatortypes_metaball(void)
WM_operatortype_append(MBALL_OT_select_random_metaelems);
}
-void ED_keymap_metaball(wmWindowManager *wm)
+void ED_keymap_metaball(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Metaball", 0, 0);
+ wmKeyMap *keymap;
+
+ keymap= WM_keymap_find(keyconf, "Metaball", 0, 0);
+ keymap->poll= ED_operator_editmball;
WM_keymap_add_item(keymap, "OBJECT_OT_metaball_add", AKEY, KM_PRESS, KM_SHIFT, 0);
diff --git a/source/blender/editors/object/Makefile b/source/blender/editors/object/Makefile
index 70ada46c80f..fd2af305d87 100644
--- a/source/blender/editors/object/Makefile
+++ b/source/blender/editors/object/Makefile
@@ -47,6 +47,7 @@ CPPFLAGS += -I../../makesdna
CPPFLAGS += -I../../makesrna
CPPFLAGS += -I../../python
CPPFLAGS += -I../../imbuf
+CPPFLAGS += -I../../ikplugin
# own include
diff --git a/source/blender/editors/object/SConscript b/source/blender/editors/object/SConscript
index 0b7a4e41192..a6f034c9c33 100644
--- a/source/blender/editors/object/SConscript
+++ b/source/blender/editors/object/SConscript
@@ -6,7 +6,7 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc'
incs += ' #/intern/guardedalloc'
-incs += ' ../../makesrna ../../python ../../bmesh'
+incs += ' ../../makesrna ../../python ../../ikplugin ../../bmesh'
defs = []
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index ee9af61f516..25ecb41a523 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -26,17 +26,20 @@
*/
#include <stdlib.h>
+#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_action_types.h"
#include "DNA_curve_types.h"
#include "DNA_group_types.h"
+#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
#include "DNA_object_fluidsim.h"
#include "DNA_object_types.h"
+#include "DNA_object_force.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_userdef_types.h"
@@ -55,6 +58,7 @@
#include "BKE_depsgraph.h"
#include "BKE_DerivedMesh.h"
#include "BKE_displist.h"
+#include "BKE_effect.h"
#include "BKE_global.h"
#include "BKE_group.h"
#include "BKE_lattice.h"
@@ -109,7 +113,7 @@ void ED_object_base_init_from_view(bContext *C, Base *base)
VECCOPY(ob->loc, scene->cursor);
}
else {
- if (v3d->localview) {
+ if (v3d->localvd) {
base->lay= ob->lay= v3d->layact | v3d->lay;
VECCOPY(ob->loc, v3d->cursor);
}
@@ -140,14 +144,14 @@ void add_object_draw(Scene *scene, View3D *v3d, int type) /* for toolbox or menu
}
/* for object add primitive operators */
-static Object *object_add_type(bContext *C, int type)
+Object *ED_object_add_type(bContext *C, int type)
{
Scene *scene= CTX_data_scene(C);
Object *ob;
/* for as long scene has editmode... */
if (CTX_data_edit_object(C))
- ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* freedata, and undo */
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO); /* freedata, and undo */
/* deselects all, sets scene->basact */
ob= add_object(scene, type);
@@ -165,7 +169,7 @@ static Object *object_add_type(bContext *C, int type)
/* for object add operator */
static int object_add_exec(bContext *C, wmOperator *op)
{
- object_add_type(C, RNA_int_get(op->ptr, "type"));
+ ED_object_add_type(C, RNA_enum_get(op->ptr, "type"));
return OPERATOR_FINISHED;
}
@@ -189,94 +193,92 @@ void OBJECT_OT_add(wmOperatorType *ot)
RNA_def_enum(ot->srna, "type", object_type_items, 0, "Type", "");
}
-/* ***************** add primitives *************** */
-/* ****** work both in and outside editmode ****** */
-
-static EnumPropertyItem prop_mesh_types[] = {
- {0, "PLANE", ICON_MESH_PLANE, "Plane", ""},
- {1, "CUBE", ICON_MESH_CUBE, "Cube", ""},
- {2, "CIRCLE", ICON_MESH_CIRCLE, "Circle", ""},
- {3, "UVSPHERE", ICON_MESH_UVSPHERE, "UVsphere", ""},
- {4, "ICOSPHERE", ICON_MESH_ICOSPHERE, "Icosphere", ""},
- {5, "CYLINDER", ICON_MESH_TUBE, "Cylinder", ""},
- {6, "CONE", ICON_MESH_CONE, "Cone", ""},
- {0, "", 0, NULL, NULL},
- {7, "GRID", ICON_MESH_GRID, "Grid", ""},
- {8, "MONKEY", ICON_MESH_MONKEY, "Monkey", ""},
- {0, NULL, 0, NULL, NULL}
-};
+/********************* Add Effector Operator ********************/
+/* copy from rna_object_force.c*/
+static EnumPropertyItem field_type_items[] = {
+ {0, "NONE", 0, "None", ""},
+ {PFIELD_FORCE, "FORCE", 0, "Force", ""},
+ {PFIELD_WIND, "WIND", 0, "Wind", ""},
+ {PFIELD_VORTEX, "VORTEX", 0, "Vortex", ""},
+ {PFIELD_MAGNET, "MAGNET", 0, "Magnetic", ""},
+ {PFIELD_HARMONIC, "HARMONIC", 0, "Harmonic", ""},
+ {PFIELD_CHARGE, "CHARGE", 0, "Charge", ""},
+ {PFIELD_LENNARDJ, "LENNARDJ", 0, "Lennard-Jones", ""},
+ {PFIELD_TEXTURE, "TEXTURE", 0, "Texture", ""},
+ {PFIELD_GUIDE, "GUIDE", 0, "Curve Guide", ""},
+ {PFIELD_BOID, "BOID", 0, "Boid", ""},
+ {PFIELD_TURBULENCE, "TURBULENCE", 0, "Turbulence", ""},
+ {PFIELD_DRAG, "DRAG", 0, "Drag", ""},
+ {0, NULL, 0, NULL, NULL}};
-static int object_add_mesh_exec(bContext *C, wmOperator *op)
+void add_effector_draw(Scene *scene, View3D *v3d, int type) /* for toolbox or menus, only non-editmode stuff */
{
- Object *obedit= CTX_data_edit_object(C);
- int newob= 0;
+ /* keep here to get things compile, remove later */
+}
+
+/* for effector add primitive operators */
+static Object *effector_add_type(bContext *C, int type)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob;
- if(obedit==NULL || obedit->type!=OB_MESH) {
- object_add_type(C, OB_MESH);
- ED_object_enter_editmode(C, EM_DO_UNDO);
- newob = 1;
+ /* for as long scene has editmode... */
+ if (CTX_data_edit_object(C))
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO); /* freedata, and undo */
+
+ /* deselects all, sets scene->basact */
+ if(type==PFIELD_GUIDE) {
+ ob = add_object(scene, OB_CURVE);
+ ((Curve*)ob->data)->flag |= CU_PATH|CU_3D;
+ ED_object_enter_editmode(C, 0);
+ BLI_addtail(curve_get_editcurve(ob), add_nurbs_primitive(C, CU_NURBS|CU_PRIM_PATH, 1));
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO);
}
- else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
+ else
+ ob= add_object(scene, OB_EMPTY);
- switch(RNA_enum_get(op->ptr, "type")) {
- case 0:
- WM_operator_name_call(C, "MESH_OT_primitive_plane_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 1:
- WM_operator_name_call(C, "MESH_OT_primitive_cube_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 2:
- WM_operator_name_call(C, "MESH_OT_primitive_circle_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 3:
- WM_operator_name_call(C, "MESH_OT_primitive_uv_sphere_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 4:
- WM_operator_name_call(C, "MESH_OT_primitive_ico_sphere_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 5:
- WM_operator_name_call(C, "MESH_OT_primitive_cylinder_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 6:
- WM_operator_name_call(C, "MESH_OT_primitive_cone_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 7:
- WM_operator_name_call(C, "MESH_OT_primitive_grid_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 8:
- WM_operator_name_call(C, "MESH_OT_primitive_monkey_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- }
- /* userdef */
- if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
- ED_object_exit_editmode(C, EM_FREEDATA);
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
+ ob->pd= object_add_collision_fields(type);
+
+ /* editor level activate, notifiers */
+ ED_base_object_activate(C, BASACT);
+
+ /* more editor stuff */
+ ED_object_base_init_from_view(C, BASACT);
+
+ DAG_scene_sort(scene);
+
+ return ob;
+}
+
+/* for object add operator */
+static int effector_add_exec(bContext *C, wmOperator *op)
+{
+ effector_add_type(C, RNA_int_get(op->ptr, "type"));
return OPERATOR_FINISHED;
}
-
-void OBJECT_OT_mesh_add(wmOperatorType *ot)
+void OBJECT_OT_effector_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Mesh";
- ot->description = "Add a mesh object to the scene.";
- ot->idname= "OBJECT_OT_mesh_add";
+ ot->name= "Add Effector";
+ ot->description = "Add an empty object with a physics effector to the scene.";
+ ot->idname= "OBJECT_OT_effector_add";
/* api callbacks */
ot->invoke= WM_menu_invoke;
- ot->exec= object_add_mesh_exec;
+ ot->exec= effector_add_exec;
ot->poll= ED_operator_scene_editable;
- /* flags: no register or undo, this operator calls operators */
- ot->flag= 0; //OPTYPE_REGISTER|OPTYPE_UNDO;
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_enum(ot->srna, "type", prop_mesh_types, 0, "Primitive", "");
+ RNA_def_enum(ot->srna, "type", field_type_items, 0, "Type", "");
}
+/* ***************** add primitives *************** */
+
static EnumPropertyItem prop_curve_types[] = {
{CU_BEZIER|CU_PRIM_CURVE, "BEZIER_CURVE", ICON_CURVE_BEZCURVE, "Bezier Curve", ""},
{CU_BEZIER|CU_PRIM_CIRCLE, "BEZIER_CIRCLE", ICON_CURVE_BEZCIRCLE, "Bezier Circle", ""},
@@ -294,7 +296,7 @@ static int object_add_curve_exec(bContext *C, wmOperator *op)
int newob= 0;
if(obedit==NULL || obedit->type!=OB_CURVE) {
- object_add_type(C, OB_CURVE);
+ ED_object_add_type(C, OB_CURVE);
ED_object_enter_editmode(C, 0);
newob = 1;
}
@@ -307,7 +309,7 @@ static int object_add_curve_exec(bContext *C, wmOperator *op)
/* userdef */
if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
- ED_object_exit_editmode(C, EM_FREEDATA);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO);
}
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
@@ -369,7 +371,7 @@ static int object_add_surface_exec(bContext *C, wmOperator *op)
int newob= 0;
if(obedit==NULL || obedit->type!=OB_SURF) {
- object_add_type(C, OB_SURF);
+ ED_object_add_type(C, OB_SURF);
ED_object_enter_editmode(C, 0);
newob = 1;
}
@@ -382,7 +384,7 @@ static int object_add_surface_exec(bContext *C, wmOperator *op)
/* userdef */
if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
- ED_object_exit_editmode(C, EM_FREEDATA);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO);
}
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
@@ -426,7 +428,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op)
int newob= 0;
if(obedit==NULL || obedit->type!=OB_MBALL) {
- object_add_type(C, OB_MBALL);
+ ED_object_add_type(C, OB_MBALL);
ED_object_enter_editmode(C, 0);
newob = 1;
}
@@ -439,7 +441,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op)
/* userdef */
if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
- ED_object_exit_editmode(C, EM_FREEDATA);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO);
}
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
@@ -467,7 +469,7 @@ static int object_metaball_add_invoke(bContext *C, wmOperator *op, wmEvent *even
void OBJECT_OT_metaball_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Metaball";
+ ot->name= "Add Metaball";
ot->description= "Add an metaball object to the scene.";
ot->idname= "OBJECT_OT_metaball_add";
@@ -488,7 +490,7 @@ static int object_add_text_exec(bContext *C, wmOperator *op)
if(obedit && obedit->type==OB_FONT)
return OPERATOR_CANCELLED;
- object_add_type(C, OB_FONT);
+ ED_object_add_type(C, OB_FONT);
obedit= CTX_data_active_object(C);
if(U.flag & USER_ADD_EDITMODE)
@@ -522,7 +524,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op)
int newob= 0;
if ((obedit==NULL) || (obedit->type != OB_ARMATURE)) {
- object_add_type(C, OB_ARMATURE);
+ ED_object_add_type(C, OB_ARMATURE);
ED_object_enter_editmode(C, 0);
newob = 1;
}
@@ -536,7 +538,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op)
/* userdef */
if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
- ED_object_exit_editmode(C, EM_FREEDATA);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO);
}
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
@@ -559,45 +561,112 @@ void OBJECT_OT_armature_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int object_primitive_add_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int object_lamp_add_exec(bContext *C, wmOperator *op)
{
- uiPopupMenu *pup= uiPupMenuBegin(C, "Add Object", 0);
- uiLayout *layout= uiPupMenuLayout(pup);
-
- uiItemMenuEnumO(layout, "Mesh", ICON_OUTLINER_OB_MESH, "OBJECT_OT_mesh_add", "type");
- uiItemMenuEnumO(layout, "Curve", ICON_OUTLINER_OB_CURVE, "OBJECT_OT_curve_add", "type");
- uiItemMenuEnumO(layout, "Surface", ICON_OUTLINER_OB_SURFACE, "OBJECT_OT_surface_add", "type");
- uiItemMenuEnumO(layout, NULL, ICON_OUTLINER_OB_META, "OBJECT_OT_metaball_add", "type");
- uiItemO(layout, "Text", ICON_OUTLINER_OB_FONT, "OBJECT_OT_text_add");
- uiItemS(layout);
- uiItemO(layout, "Armature", ICON_OUTLINER_OB_ARMATURE, "OBJECT_OT_armature_add");
- uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_LATTICE, "OBJECT_OT_add", "type", OB_LATTICE);
- uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_EMPTY, "OBJECT_OT_add", "type", OB_EMPTY);
- uiItemS(layout);
- uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_CAMERA, "OBJECT_OT_add", "type", OB_CAMERA);
- uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_LAMP, "OBJECT_OT_add", "type", OB_LAMP);
+ Object *ob;
+ int type= RNA_enum_get(op->ptr, "type");
+
+ ob= ED_object_add_type(C, OB_LAMP);
+ if(ob && ob->data)
+ ((Lamp*)ob->data)->type= type;
- uiPupMenuEnd(C, pup);
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_lamp_add(wmOperatorType *ot)
+{
+ static EnumPropertyItem lamp_type_items[] = {
+ {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}};
+
+ /* identifiers */
+ ot->name= "Add Lamp";
+ ot->description = "Add a lamp object to the scene.";
+ ot->idname= "OBJECT_OT_lamp_add";
- /* this operator is only for a menu, not used further */
+ /* api callbacks */
+ ot->invoke= WM_menu_invoke;
+ ot->exec= object_lamp_add_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", "");
+}
+
+/* add dupligroup */
+static EnumPropertyItem *add_dupligroup_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ EnumPropertyItem *item= NULL, item_tmp;
+ int totitem= 0;
+ int i= 0;
+ Group *group;
+
+ memset(&item_tmp, 0, sizeof(item_tmp));
+
+ for(group= CTX_data_main(C)->group.first; group; group= group->id.next) {
+ item_tmp.identifier= item_tmp.name= group->id.name+2;
+ item_tmp.value= i++;
+ RNA_enum_item_add(&item, &totitem, &item_tmp);
+ }
+
+ RNA_enum_item_end(&item, &totitem);
+ *free= 1;
+
+ return item;
+}
+
+static int group_instance_add_exec(bContext *C, wmOperator *op)
+{
+ /* XXX, using an enum for library lookups is a bit dodgy */
+ Group *group= BLI_findlink(&CTX_data_main(C)->group, RNA_enum_get(op->ptr, "type"));
+
+ if(group) {
+ Object *ob= ED_object_add_type(C, OB_EMPTY);
+ rename_id(&ob->id, group->id.name+2);
+ ob->dup_group= group;
+ ob->transflag |= OB_DUPLIGROUP;
+ id_us_plus(&group->id);
+
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+ }
+
return OPERATOR_CANCELLED;
}
/* only used as menu */
-void OBJECT_OT_primitive_add(wmOperatorType *ot)
+void OBJECT_OT_group_instance_add(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+ static EnumPropertyItem prop_group_dummy_types[] = {
+ {0, NULL, 0, NULL, NULL}
+ };
+
/* identifiers */
- ot->name= "Add Primitive";
- ot->description = "Add a primitive object.";
- ot->idname= "OBJECT_OT_primitive_add";
-
+ ot->name= "Add Group Instance";
+ ot->description = "Add a dupligroup instance.";
+ ot->idname= "OBJECT_OT_group_instance_add";
+
/* api callbacks */
- ot->invoke= object_primitive_add_invoke;
-
+ ot->exec= group_instance_add_exec;
+
ot->poll= ED_operator_scene_editable;
-
+
/* flags */
ot->flag= 0;
+
+ /* properties */
+ prop= RNA_def_enum(ot->srna, "type", prop_group_dummy_types, 0, "Type", "");
+ RNA_def_enum_funcs(prop, add_dupligroup_itemf);
}
/**************************** Delete Object *************************/
@@ -857,8 +926,8 @@ void OBJECT_OT_duplicates_make_real(wmOperatorType *ot)
/**************************** Convert **************************/
static EnumPropertyItem convert_target_items[]= {
- {OB_CURVE, "CURVE", 0, "Curve", ""},
- {OB_MESH, "MESH", 0, "Mesh", ""},
+ {OB_CURVE, "CURVE", ICON_OUTLINER_OB_CURVE, "Curve from Mesh/Text", ""},
+ {OB_MESH, "MESH", ICON_OUTLINER_OB_MESH, "Mesh from Curve/Meta/Surf/Mesh", ""},
{0, NULL, 0, NULL, NULL}};
static void curvetomesh(Scene *scene, Object *ob)
@@ -910,6 +979,25 @@ static int convert_exec(bContext *C, wmOperator *op)
if(ob->flag & OB_DONE)
continue;
+ else if (ob->type==OB_MESH && target == OB_CURVE) {
+ ob->flag |= OB_DONE;
+
+ ob1= copy_object(ob);
+ ob1->recalc |= OB_RECALC;
+
+ basen= MEM_mallocN(sizeof(Base), "duplibase");
+ *basen= *base;
+ BLI_addhead(&scene->base, basen); /* addhead: otherwise eternal loop */
+ basen->object= ob1;
+ basen->flag |= SELECT;
+ base->flag &= ~SELECT;
+ ob->flag &= ~SELECT;
+
+ mesh_to_curve(scene, ob1);
+
+ if(ob1->type==OB_CURVE)
+ object_free_modifiers(ob1); /* after derivedmesh calls! */
+ }
else if(ob->type==OB_MESH && ob->modifiers.first) { /* converting a mesh with no modifiers causes a segfault */
ob->flag |= OB_DONE;
basedel = base;
@@ -935,7 +1023,7 @@ static int convert_exec(bContext *C, wmOperator *op)
/* make new mesh data from the original copy */
dm= mesh_get_derived_final(scene, ob1, CD_MASK_MESH);
/* dm= mesh_create_derived_no_deform(ob1, NULL); this was called original (instead of get_derived). man o man why! (ton) */
-
+
DM_to_mesh(dm, ob1->data);
dm->release(dm);
@@ -1059,48 +1147,14 @@ static int convert_exec(bContext *C, wmOperator *op)
BASACT= basact;
DAG_scene_sort(scene);
- WM_event_add_notifier(C, NC_SCENE, scene);
+ WM_event_add_notifier(C, NC_SCENE|NC_OBJECT|ND_DRAW, scene); /* is NC_SCENE needed ? */
- return OPERATOR_FINISHED;
-}
-static int convert_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- Object *obact= CTX_data_active_object(C);
- uiPopupMenu *pup;
- uiLayout *layout;
- char *title;
-
- if(obact->type==OB_FONT) {
- pup= uiPupMenuBegin(C, "Convert Font to", 0);
- layout= uiPupMenuLayout(pup);
-
- uiItemEnumO(layout, "Curve", 0, op->type->idname, "target", OB_CURVE);
- }
- else {
- if(obact->type == OB_MBALL)
- title= "Convert Metaball to";
- else if(obact->type == OB_CURVE)
- title= "Convert Curve to";
- else if(obact->type == OB_SURF)
- title= "Convert Nurbs Surface to";
- else if(obact->type == OB_MESH)
- title= "Convert Modifiers to";
- else
- return OPERATOR_CANCELLED;
-
- pup= uiPupMenuBegin(C, title, 0);
- layout= uiPupMenuLayout(pup);
- }
- uiItemBooleanO(layout, "Mesh (keep original)", 0, op->type->idname, "keep_original", 1);
- uiItemBooleanO(layout, "Mesh (delete original)", 0, op->type->idname, "keep_original", 0);
-
- uiPupMenuEnd(C, pup);
-
- return OPERATOR_CANCELLED;
+ return OPERATOR_FINISHED;
}
+
void OBJECT_OT_convert(wmOperatorType *ot)
{
/* identifiers */
@@ -1109,7 +1163,7 @@ void OBJECT_OT_convert(wmOperatorType *ot)
ot->idname= "OBJECT_OT_convert";
/* api callbacks */
- ot->invoke= convert_invoke;
+ ot->invoke= WM_menu_invoke;
ot->exec= convert_exec;
ot->poll= convert_poll;
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 9b073ed5878..8c0da354938 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -56,6 +56,7 @@
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_utildefines.h"
+#include "BIK_api.h"
#ifndef DISABLE_PYTHON
#include "BPY_extern.h"
@@ -334,6 +335,7 @@ static void test_constraints (Object *owner, const char substring[])
* optional... otherwise poletarget must exist too or else
* the constraint is deemed invalid
*/
+ /* default IK check ... */
if (exist_object(data->tar) == 0) {
data->tar = NULL;
curcon->flag |= CONSTRAINT_DISABLE;
@@ -355,7 +357,8 @@ static void test_constraints (Object *owner, const char substring[])
}
}
}
-
+ /* ... can be overwritten here */
+ BIK_test_constraint(owner, curcon);
/* targets have already been checked for this */
continue;
}
@@ -702,6 +705,25 @@ void ED_object_constraint_set_active(Object *ob, bConstraint *con)
}
}
+void ED_object_constraint_update(Object *ob)
+{
+
+ if(ob->pose) update_pose_constraint_flags(ob->pose);
+
+ object_test_constraints(ob);
+
+ if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
+ else DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+}
+
+void ED_object_constraint_dependency_update(Scene *scene, Object *ob)
+{
+ ED_object_constraint_update(ob);
+
+ if(ob->pose) ob->pose->flag |= POSE_RECALC; // checks & sorts pose channels
+ DAG_scene_sort(scene);
+}
+
static int constraint_poll(bContext *C)
{
PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
@@ -717,6 +739,10 @@ static int constraint_delete_exec (bContext *C, wmOperator *op)
/* remove constraint itself */
lb= get_active_constraints(ob);
+ if (BLI_findindex(lb, con) == -1)
+ /* abnormal situation which happens on bone constraint when the armature is not in pose mode */
+ return OPERATOR_CANCELLED;
+
free_constraint_data(con);
BLI_freelinkN(lb, con);
@@ -823,17 +849,22 @@ void CONSTRAINT_OT_move_up (wmOperatorType *ot)
static int pose_constraints_clear_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_active_object(C);
+ Scene *scene= CTX_data_scene(C);
/* free constraints for all selected bones */
CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans)
{
free_constraints(&pchan->constraints);
+ pchan->constflag &= ~(PCHAN_HAS_IK|PCHAN_HAS_CONST);
}
CTX_DATA_END;
+ /* force depsgraph to get recalculated since relationships removed */
+ DAG_scene_sort(scene); /* sort order of objects */
+
/* do updates */
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE|ND_CONSTRAINT|NA_REMOVED, ob);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
return OPERATOR_FINISHED;
}
@@ -854,14 +885,18 @@ void POSE_OT_constraints_clear(wmOperatorType *ot)
static int object_constraints_clear_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_active_object(C);
+ Scene *scene= CTX_data_scene(C);
/* do freeing */
// TODO: we should free constraints for all selected objects instead (to be more consistent with bones)
free_constraints(&ob->constraints);
+ /* force depsgraph to get recalculated since relationships removed */
+ DAG_scene_sort(scene); /* sort order of objects */
+
/* do updates */
DAG_id_flush_update(&ob->id, OB_RECALC_OB);
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
return OPERATOR_FINISHED;
}
@@ -910,7 +945,6 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o
/* restricted target-type constraints -------------- */
/* NOTE: for these, we cannot try to add a target object if no valid ones are found, since that doesn't work */
/* curve-based constraints - set the only_curve and only_ob flags */
- case CONSTRAINT_TYPE_TRACKTO:
case CONSTRAINT_TYPE_CLAMPTO:
case CONSTRAINT_TYPE_FOLLOWPATH:
only_curve= 1;
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index dfda294561b..08689e9b62b 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -281,6 +281,8 @@ void OBJECT_OT_restrictview_set(wmOperatorType *ot)
void ED_object_exit_editmode(bContext *C, int flag)
{
+ /* Note! only in exceptional cases should 'EM_DO_UNDO' NOT be in the flag */
+
Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
int freedata = flag & EM_FREEDATA;
@@ -334,7 +336,7 @@ void ED_object_exit_editmode(bContext *C, int flag)
if(freedata) free_editMball(obedit);
}
- /* freedata only 0 now on file saves */
+ /* freedata only 0 now on file saves and render */
if(freedata) {
/* for example; displist make is different in editmode */
scene->obedit= NULL; // XXX for context
@@ -344,15 +346,16 @@ void ED_object_exit_editmode(bContext *C, int flag)
/* also flush ob recalc, doesn't take much overhead, but used for particles */
DAG_id_flush_update(&obedit->id, OB_RECALC_OB|OB_RECALC_DATA);
- ED_undo_push(C, "Editmode");
+ if(flag & EM_DO_UNDO)
+ ED_undo_push(C, "Editmode");
if(flag & EM_WAITCURSOR) waitcursor(0);
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene);
- }
- obedit->mode &= ~OB_MODE_EDIT;
- ED_object_toggle_modes(C, obedit->restore_mode);
+ obedit->mode &= ~OB_MODE_EDIT;
+ ED_object_toggle_modes(C, obedit->restore_mode);
+ }
}
@@ -472,7 +475,7 @@ static int editmode_toggle_exec(bContext *C, wmOperator *op)
if(!CTX_data_edit_object(C))
ED_object_enter_editmode(C, EM_WAITCURSOR);
else
- ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
return OPERATOR_FINISHED;
}
@@ -512,7 +515,7 @@ static int posemode_exec(bContext *C, wmOperator *op)
if(base->object->type==OB_ARMATURE) {
if(base->object==CTX_data_edit_object(C)) {
- ED_object_exit_editmode(C, EM_FREEDATA);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO);
ED_armature_enter_posemode(C, base);
}
else if(base->object->mode & OB_MODE_POSE)
@@ -549,7 +552,7 @@ void check_editmode(int type)
if (obedit==NULL || obedit->type==type) return;
-// XXX ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* freedata, and undo */
+// XXX ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO); /* freedata, and undo */
}
#if 0
@@ -839,6 +842,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
BooleanModifierData *bmd = NULL;
bmd = (BooleanModifierData *)modifier_new(eModifierType_Boolean);
BLI_addtail(&ob->modifiers, bmd);
+ modifier_unique_name(&ob->modifiers, (ModifierData*)bmd);
bmd->object = base_select->object;
bmd->modifier.mode |= eModifierMode_Realtime;
switch(nr){
@@ -969,9 +973,10 @@ static void object_flip_subdivison_particles(Scene *scene, Object *ob, int *set,
}
else if(depth == 0 && *set != 0) {
SubsurfModifierData *smd = (SubsurfModifierData*) modifier_new(eModifierType_Subsurf);
-
+
BLI_addtail(&ob->modifiers, smd);
-
+ modifier_unique_name(&ob->modifiers, (ModifierData*)smd);
+
if (level!=-1) {
smd->levels = level;
}
@@ -1188,6 +1193,7 @@ static void copymenu_modifiers(Scene *scene, View3D *v3d, Object *ob)
nmd = modifier_new(md->type);
modifier_copyData(md, nmd);
BLI_addtail(&base->object->modifiers, nmd);
+ modifier_unique_name(&base->object->modifiers, nmd);
}
copy_object_particlesystems(base->object, ob);
@@ -1211,6 +1217,7 @@ static void copymenu_modifiers(Scene *scene, View3D *v3d, Object *ob)
mdn = modifier_new(event);
BLI_addtail(&base->object->modifiers, mdn);
+ modifier_unique_name(&base->object->modifiers, mdn);
modifier_copyData(md, mdn);
}
@@ -1242,7 +1249,7 @@ static void copymenu_modifiers(Scene *scene, View3D *v3d, Object *ob)
static void copy_texture_space(Object *to, Object *ob)
{
float *poin1= NULL, *poin2= NULL;
- int texflag= 0;
+ short texflag= 0;
if(ob->type==OB_MESH) {
texflag= ((Mesh *)ob->data)->texflag;
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index c83f3022c7c..198838d6f05 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -275,18 +275,14 @@ static EnumPropertyItem group_items[]= {
static EnumPropertyItem *group_itemf(bContext *C, PointerRNA *ptr, int *free)
{
+ Main *bmain= CTX_data_main(C);
+ Group *group;
EnumPropertyItem tmp = {0, "", 0, "", ""};
EnumPropertyItem *item= NULL;
- Main *bmain;
- Group *group;
int a, totitem= 0;
- if(!C) /* needed for docs */
- return group_items;
-
RNA_enum_items_add_value(&item, &totitem, group_items, -1);
- bmain= CTX_data_main(C);
if(bmain->group.first)
RNA_enum_item_add_separator(&item, &totitem);
@@ -298,7 +294,6 @@ static EnumPropertyItem *group_itemf(bContext *C, PointerRNA *ptr, int *free)
}
RNA_enum_item_end(&item, &totitem);
-
*free= 1;
return item;
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index ab7bcbc989d..4643b875872 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -480,6 +480,7 @@ void add_hook(Scene *scene, View3D *v3d, int mode)
hmd = (HookModifierData*) modifier_new(eModifierType_Hook);
BLI_insertlinkbefore(&obedit->modifiers, md, hmd);
sprintf(hmd->modifier.name, "Hook-%s", ob->id.name+2);
+ modifier_unique_name(&obedit->modifiers, (ModifierData*)hmd);
}
else if (hmd->indexar) MEM_freeN(hmd->indexar); /* reassign, hook was set */
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index 315b6632051..dc7ae1490fd 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -83,13 +83,14 @@ void OBJECT_OT_select_name(struct wmOperatorType *ot);
/* object_add.c */
void OBJECT_OT_add(struct wmOperatorType *ot);
-void OBJECT_OT_mesh_add(struct wmOperatorType *ot);
void OBJECT_OT_curve_add(struct wmOperatorType *ot);
void OBJECT_OT_surface_add(struct wmOperatorType *ot);
void OBJECT_OT_metaball_add(struct wmOperatorType *ot);
void OBJECT_OT_text_add(struct wmOperatorType *ot);
void OBJECT_OT_armature_add(struct wmOperatorType *ot);
-void OBJECT_OT_primitive_add(struct wmOperatorType *ot); /* only used as menu */
+void OBJECT_OT_lamp_add(struct wmOperatorType *ot);
+void OBJECT_OT_effector_add(struct wmOperatorType *ot);
+void OBJECT_OT_group_instance_add(struct wmOperatorType *ot);
void OBJECT_OT_duplicates_make_real(struct wmOperatorType *ot);
void OBJECT_OT_duplicate(struct wmOperatorType *ot);
@@ -174,5 +175,9 @@ void OBJECT_OT_game_property_remove(struct wmOperatorType *ot);
void OBJECT_OT_shape_key_add(struct wmOperatorType *ot);
void OBJECT_OT_shape_key_remove(struct wmOperatorType *ot);
+/* object_group.c */
+void OBJECT_OT_group_add(struct wmOperatorType *ot);
+void OBJECT_OT_group_remove(struct wmOperatorType *ot);
+
#endif /* ED_OBJECT_INTERN_H */
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index bd8171e8593..b49c1eb5902 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -292,6 +292,7 @@ static BPoint *findnearestLattvert(ViewContext *vc, short mval[2], int sel)
data.mval[0]= mval[0];
data.mval[1]= mval[1];
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d);
lattice_foreachScreenVert(vc, findnearestLattvert__doClosest, &data);
return data.bp;
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index cc8cc420bf7..f58e8cfeb9d 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -76,7 +76,7 @@
int ED_object_modifier_add(ReportList *reports, Scene *scene, Object *ob, int type)
{
- ModifierData *md;
+ ModifierData *md=NULL, *new_md=NULL;
ModifierTypeInfo *mti = modifierType_getInfo(type);
if(mti->flags&eModifierTypeFlag_Single) {
@@ -87,19 +87,28 @@ int ED_object_modifier_add(ReportList *reports, Scene *scene, Object *ob, int ty
}
if(type == eModifierType_ParticleSystem) {
+ /* don't need to worry about the new modifier's name, since that is set to the number
+ * of particle systems which shouldn't have too many duplicates
+ */
object_add_particle_system(scene, ob);
}
else {
+ /* get new modifier data to add */
+ new_md= modifier_new(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));
+
+ BLI_insertlinkbefore(&ob->modifiers, md, new_md);
}
else
- BLI_addtail(&ob->modifiers, modifier_new(type));
+ BLI_addtail(&ob->modifiers, new_md);
+
+ /* make sure modifier data has unique name */
+ modifier_unique_name(&ob->modifiers, new_md);
/* special cases */
if(type == eModifierType_Softbody) {
@@ -110,8 +119,8 @@ int ED_object_modifier_add(ReportList *reports, Scene *scene, Object *ob, int ty
}
else if(type == eModifierType_Collision) {
if(!ob->pd)
- ob->pd= object_add_collision_fields();
-
+ ob->pd= object_add_collision_fields(0);
+
ob->pd->deflect= 1;
DAG_scene_sort(scene);
}
@@ -159,8 +168,8 @@ int ED_object_modifier_remove(ReportList *reports, Scene *scene, Object *ob, Mod
DAG_scene_sort(scene);
}
else if(md->type == eModifierType_Surface) {
- if(ob->pd)
- ob->pd->flag &= ~PFIELD_SURFACE;
+ if(ob->pd && ob->pd->shape == PFIELD_SHAPE_SURFACE)
+ ob->pd->shape = PFIELD_SHAPE_PLANE;
DAG_scene_sort(scene);
}
@@ -400,6 +409,7 @@ int ED_object_modifier_copy(ReportList *reports, Object *ob, ModifierData *md)
nmd = modifier_new(md->type);
modifier_copyData(md, nmd);
BLI_insertlink(&ob->modifiers, md, nmd);
+ modifier_unique_name(&ob->modifiers, nmd);
return 1;
}
@@ -430,12 +440,12 @@ static int modifier_add_exec(bContext *C, wmOperator *op)
static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *ptr, int *free)
{
+ Object *ob= CTX_data_active_object(C);
EnumPropertyItem *item= NULL, *md_item;
ModifierTypeInfo *mti;
- Object *ob;
int totitem= 0, a;
- if(!C || !(ob= CTX_data_active_object(C))) /* needed for docs */
+ if(!ob)
return modifier_type_items;
for(a=0; modifier_type_items[a].identifier; a++) {
@@ -456,7 +466,6 @@ static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *ptr, int *f
}
RNA_enum_item_end(&item, &totitem);
-
*free= 1;
return item;
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index dce09d47b2c..5c53e041f6e 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -63,8 +63,6 @@
void ED_operatortypes_object(void)
{
- wmOperatorType *ot;
-
WM_operatortype_append(OBJECT_OT_location_clear);
WM_operatortype_append(OBJECT_OT_rotation_clear);
WM_operatortype_append(OBJECT_OT_scale_clear);
@@ -110,14 +108,14 @@ void ED_operatortypes_object(void)
WM_operatortype_append(GROUP_OT_objects_remove_active);
WM_operatortype_append(OBJECT_OT_delete);
- WM_operatortype_append(OBJECT_OT_mesh_add);
WM_operatortype_append(OBJECT_OT_curve_add);
WM_operatortype_append(OBJECT_OT_text_add);
WM_operatortype_append(OBJECT_OT_surface_add);
WM_operatortype_append(OBJECT_OT_armature_add);
+ WM_operatortype_append(OBJECT_OT_lamp_add);
WM_operatortype_append(OBJECT_OT_add);
- WM_operatortype_append(OBJECT_OT_primitive_add);
- WM_operatortype_append(OBJECT_OT_mesh_add);
+ WM_operatortype_append(OBJECT_OT_effector_add);
+ WM_operatortype_append(OBJECT_OT_group_instance_add);
WM_operatortype_append(OBJECT_OT_metaball_add);
WM_operatortype_append(OBJECT_OT_duplicates_make_real);
WM_operatortype_append(OBJECT_OT_duplicate);
@@ -175,8 +173,15 @@ void ED_operatortypes_object(void)
WM_operatortype_append(LATTICE_OT_select_all_toggle);
WM_operatortype_append(LATTICE_OT_make_regular);
+
+ WM_operatortype_append(OBJECT_OT_group_add);
+ WM_operatortype_append(OBJECT_OT_group_remove);
+}
+
+void ED_operatormacros_object(void)
+{
+ wmOperatorType *ot;
- /* macros */
ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
if(ot) {
WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
@@ -184,10 +189,18 @@ void ED_operatortypes_object(void)
}
}
-void ED_keymap_object(wmWindowManager *wm)
+static int object_mode_poll(bContext *C)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Object Non-modal", 0, 0);
- wmKeymapItem *kmi;
+ Object *ob= CTX_data_active_object(C);
+ return (!ob || ob->mode == OB_MODE_OBJECT);
+}
+
+void ED_keymap_object(wmKeyConfig *keyconf)
+{
+ wmKeyMap *keymap;
+ wmKeyMapItem *kmi;
+
+ keymap= WM_keymap_find(keyconf, "Object Non-modal", 0, 0);
/* Note: this keymap works disregarding mode */
WM_keymap_add_item(keymap, "OBJECT_OT_editmode_toggle", TABKEY, KM_PRESS, 0, 0);
@@ -203,7 +216,8 @@ void ED_keymap_object(wmWindowManager *wm)
WM_keymap_add_item(keymap, "OBJECT_OT_center_set", CKEY, KM_PRESS, KM_ALT|KM_SHIFT|KM_CTRL, 0);
/* Note: this keymap gets disabled in non-objectmode, */
- keymap= WM_keymap_listbase(wm, "Object Mode", 0, 0);
+ keymap= WM_keymap_find(keyconf, "Object Mode", 0, 0);
+ keymap->poll= object_mode_poll;
WM_keymap_add_item(keymap, "OBJECT_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
@@ -227,13 +241,21 @@ void ED_keymap_object(wmWindowManager *wm)
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_add_item(keymap, "OBJECT_OT_move_to_layer", MKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_delete", DELKEY, KM_PRESS, 0, 0);
- WM_keymap_verify_item(keymap, "OBJECT_OT_primitive_add", AKEY, KM_PRESS, KM_SHIFT, 0);
+ kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", AKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(kmi->ptr, "name", "INFO_MT_add");
+
+ kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", AKEY, KM_PRESS, KM_CTRL, 0);
+ RNA_string_set(kmi->ptr, "name", "VIEW3D_MT_object_apply");
+
WM_keymap_add_item(keymap, "OBJECT_OT_duplicate_move", 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);
+ WM_keymap_add_item(keymap, "OBJECT_OT_convert", CKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_proxy_make", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
// XXX this should probably be in screen instead... here for testing purposes in the meantime... - Aligorith
@@ -246,8 +268,32 @@ void ED_keymap_object(wmWindowManager *wm)
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);
+ keymap= WM_keymap_find(keyconf, "Lattice", 0, 0);
+ keymap->poll= ED_operator_editlattice;
WM_keymap_add_item(keymap, "LATTICE_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
}
+void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int do_pet)
+{
+ wmKeyMapItem *km;
+
+ /* used by mesh, curve & lattice only */
+ if(do_pet) {
+ /* context ops */
+ km = WM_keymap_add_item(keymap, "WM_OT_context_cycle_enum", OKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(km->ptr, "path", "scene.tool_settings.proportional_editing_falloff");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", OKEY, KM_PRESS, 0, 0);
+ RNA_string_set(km->ptr, "path", "scene.tool_settings.proportional_editing");
+ RNA_string_set(km->ptr, "value_1", "DISABLED");
+ RNA_string_set(km->ptr, "value_2", "ENABLED");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", OKEY, KM_PRESS, KM_ALT, 0);
+ RNA_string_set(km->ptr, "path", "scene.tool_settings.proportional_editing");
+ RNA_string_set(km->ptr, "value_1", "DISABLED");
+ RNA_string_set(km->ptr, "value_2", "CONNECTED");
+ }
+
+}
+
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 12cb2b95e06..0c97b945037 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -566,8 +566,9 @@ static int parent_set_exec(bContext *C, wmOperator *op)
}
else cu->flag |= CU_FOLLOW;
- /* fall back on regular parenting now */
- partype= PAR_OBJECT;
+ /* fall back on regular parenting now (for follow only) */
+ if(partype == PAR_FOLLOW)
+ partype= PAR_OBJECT;
}
}
else if(partype==PAR_BONE) {
@@ -593,7 +594,9 @@ static int parent_set_exec(bContext *C, wmOperator *op)
/* apply transformation of previous parenting */
ED_object_apply_obmat(ob);
- ob->parent= par;
+ /* set the parent (except for follow-path constraint option) */
+ if(partype != PAR_PATH_CONST)
+ ob->parent= par;
/* handle types */
if (pchan)
@@ -602,7 +605,7 @@ static int parent_set_exec(bContext *C, wmOperator *op)
ob->parsubstr[0]= 0;
/* constraint */
- if(partype==PAR_PATH_CONST) {
+ if(partype == PAR_PATH_CONST) {
bConstraint *con;
bFollowPathConstraint *data;
float cmat[4][4], vec[3];
@@ -615,11 +618,12 @@ static int parent_set_exec(bContext *C, wmOperator *op)
add_constraint_to_object(con, ob);
- get_constraint_target_matrix(con, 0, CONSTRAINT_OBTYPE_OBJECT, NULL, cmat, scene->r.cfra - give_timeoffset(ob));
+ get_constraint_target_matrix(scene, con, 0, CONSTRAINT_OBTYPE_OBJECT, NULL, cmat, scene->r.cfra - give_timeoffset(ob));
VecSubf(vec, ob->obmat[3], cmat[3]);
ob->loc[0] = vec[0];
ob->loc[1] = vec[1];
+ ob->loc[2] = vec[2];
}
else if(pararm && ob->type==OB_MESH && par->type == OB_ARMATURE) {
if(partype == PAR_ARMATURE_NAME)
@@ -645,8 +649,12 @@ static int parent_set_exec(bContext *C, wmOperator *op)
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA;
+ if(partype == PAR_PATH_CONST)
+ ; /* don't do anything here, since this is not technically "parenting" */
if( ELEM(partype, PAR_CURVE, PAR_LATTICE) || pararm )
ob->partype= PARSKEL; /* note, dna define, not operator property */
+ else if (partype == PAR_BONE)
+ ob->partype= PARBONE; /* note, dna define, not operator property */
else
ob->partype= PAROBJECT; /* note, dna define, not operator property */
}
@@ -970,8 +978,14 @@ static unsigned int move_to_layer_init(bContext *C, wmOperator *op)
static int move_to_layer_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- move_to_layer_init(C, op);
- return WM_operator_props_popup(C, op, event);
+ View3D *v3d= CTX_wm_view3d(C);
+ if(v3d && v3d->localvd) {
+ return WM_operator_confirm_message(C, op, "Move from localview");
+ }
+ else {
+ move_to_layer_init(C, op);
+ return WM_operator_props_popup(C, op, event);
+ }
}
static int move_to_layer_exec(bContext *C, wmOperator *op)
@@ -986,7 +1000,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
if(lay==0) return OPERATOR_CANCELLED;
- if(v3d && v3d->localview) {
+ if(v3d && v3d->localvd) {
/* now we can move out of localview. */
// XXX if (!okee("Move from localview")) return;
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
@@ -1015,7 +1029,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
/* warning, active object may be hidden now */
- WM_event_add_notifier(C, NC_SCENE, scene);
+ WM_event_add_notifier(C, NC_SCENE|NC_OBJECT|ND_DRAW, scene); /* is NC_SCENE needed ? */
DAG_scene_sort(scene);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 432aaf2d2cb..90d1a9df93e 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -30,6 +30,8 @@
#include <stdlib.h>
#include <string.h>
+#include "MEM_guardedalloc.h"
+
#include "DNA_group_types.h"
#include "DNA_material_types.h"
#include "DNA_modifier_types.h"
@@ -80,7 +82,7 @@ void ED_base_object_select(Base *base, short mode)
if (base) {
if (mode==BA_SELECT) {
if (!(base->object->restrictflag & OB_RESTRICT_SELECT))
- if (mode==BA_SELECT) base->flag |= SELECT;
+ base->flag |= SELECT;
}
else if (mode==BA_DESELECT) {
base->flag &= ~SELECT;
@@ -103,13 +105,6 @@ void ED_base_object_activate(bContext *C, Base *base)
/* XXX old signals, remember to handle notifiers now! */
// select_actionchannel_by_name(base->object->action, "Object", 1);
- /* disable temporal locks */
- for(tbase=FIRSTBASE; tbase; tbase= tbase->next) {
- if(base!=tbase && (tbase->object->shapeflag & OB_SHAPE_TEMPLOCK)) {
- tbase->object->shapeflag &= ~OB_SHAPE_TEMPLOCK;
- DAG_id_flush_update(&tbase->object->id, OB_RECALC_DATA);
- }
- }
WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
}
else
@@ -169,7 +164,7 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot)
/*********************** Selection by Links *********************/
static EnumPropertyItem prop_select_linked_types[] = {
- {1, "IPO", 0, "Object IPO", ""}, // XXX depreceated animation system stuff...
+ //{1, "IPO", 0, "Object IPO", ""}, // XXX depreceated animation system stuff...
{2, "OBDATA", 0, "Ob Data", ""},
{3, "MATERIAL", 0, "Material", ""},
{4, "TEXTURE", 0, "Texture", ""},
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 2b207f2f27c..898d541d09d 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -27,6 +27,7 @@
#include <stdlib.h>
+#include "DNA_action_types.h"
#include "DNA_armature_types.h"
#include "DNA_curve_types.h"
#include "DNA_key_types.h"
@@ -115,13 +116,96 @@ static int object_rotation_clear_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
if(!(ob->mode & OB_MODE_WEIGHT_PAINT)) {
- /* eulers can only get cleared if they are not protected */
- if((ob->protectflag & OB_LOCK_ROTX)==0)
- ob->rot[0]= ob->drot[0]= 0.0f;
- if((ob->protectflag & OB_LOCK_ROTY)==0)
- ob->rot[1]= ob->drot[1]= 0.0f;
- if((ob->protectflag & OB_LOCK_ROTZ)==0)
- ob->rot[2]= ob->drot[2]= 0.0f;
+ if (ob->protectflag & (OB_LOCK_ROTX|OB_LOCK_ROTY|OB_LOCK_ROTZ|OB_LOCK_ROTW)) {
+ if (ob->protectflag & OB_LOCK_ROT4D) {
+ /* perform clamping on a component by component basis */
+ if (ob->rotmode == ROT_MODE_AXISANGLE) {
+ if ((ob->protectflag & OB_LOCK_ROTW) == 0)
+ ob->rotAngle= 0.0f;
+ if ((ob->protectflag & OB_LOCK_ROTX) == 0)
+ ob->rotAxis[0]= 0.0f;
+ if ((ob->protectflag & OB_LOCK_ROTY) == 0)
+ ob->rotAxis[1]= 0.0f;
+ if ((ob->protectflag & OB_LOCK_ROTZ) == 0)
+ ob->rotAxis[2]= 0.0f;
+
+ /* check validity of axis - axis should never be 0,0,0 (if so, then we make it rotate about y) */
+ if (IS_EQ(ob->rotAxis[0], ob->rotAxis[1]) && IS_EQ(ob->rotAxis[1], ob->rotAxis[2]))
+ ob->rotAxis[1] = 1.0f;
+ }
+ else if (ob->rotmode == ROT_MODE_QUAT) {
+ if ((ob->protectflag & OB_LOCK_ROTW) == 0)
+ ob->quat[0]= 1.0f;
+ if ((ob->protectflag & OB_LOCK_ROTX) == 0)
+ ob->quat[1]= 0.0f;
+ if ((ob->protectflag & OB_LOCK_ROTY) == 0)
+ ob->quat[2]= 0.0f;
+ if ((ob->protectflag & OB_LOCK_ROTZ) == 0)
+ ob->quat[3]= 0.0f;
+ }
+ else {
+ /* the flag may have been set for the other modes, so just ignore the extra flag... */
+ if ((ob->protectflag & OB_LOCK_ROTX) == 0)
+ ob->rot[0]= 0.0f;
+ if ((ob->protectflag & OB_LOCK_ROTY) == 0)
+ ob->rot[1]= 0.0f;
+ if ((ob->protectflag & OB_LOCK_ROTZ) == 0)
+ ob->rot[2]= 0.0f;
+ }
+ }
+ else {
+ /* perform clamping using euler form (3-components) */
+ float eul[3], oldeul[3], quat1[4];
+
+ if (ob->rotmode == ROT_MODE_QUAT) {
+ QUATCOPY(quat1, ob->quat);
+ QuatToEul(ob->quat, oldeul);
+ }
+ else if (ob->rotmode == ROT_MODE_AXISANGLE) {
+ AxisAngleToEulO(ob->rotAxis, ob->rotAngle, oldeul, EULER_ORDER_DEFAULT);
+ }
+ else {
+ VECCOPY(oldeul, ob->rot);
+ }
+
+ eul[0]= eul[1]= eul[2]= 0.0f;
+
+ if (ob->protectflag & OB_LOCK_ROTX)
+ eul[0]= oldeul[0];
+ if (ob->protectflag & OB_LOCK_ROTY)
+ eul[1]= oldeul[1];
+ if (ob->protectflag & OB_LOCK_ROTZ)
+ eul[2]= oldeul[2];
+
+ if (ob->rotmode == ROT_MODE_QUAT) {
+ EulToQuat(eul, ob->quat);
+ /* quaternions flip w sign to accumulate rotations correctly */
+ if ((quat1[0]<0.0f && ob->quat[0]>0.0f) || (quat1[0]>0.0f && ob->quat[0]<0.0f)) {
+ QuatMulf(ob->quat, -1.0f);
+ }
+ }
+ else if (ob->rotmode == ROT_MODE_AXISANGLE) {
+ EulOToAxisAngle(eul, EULER_ORDER_DEFAULT, ob->rotAxis, &ob->rotAngle);
+ }
+ else {
+ VECCOPY(ob->rot, eul);
+ }
+ }
+ }
+ else {
+ if (ob->rotmode == ROT_MODE_QUAT) {
+ ob->quat[1]=ob->quat[2]=ob->quat[3]= 0.0f;
+ ob->quat[0]= 1.0f;
+ }
+ else if (ob->rotmode == ROT_MODE_AXISANGLE) {
+ /* by default, make rotation of 0 radians around y-axis (roll) */
+ ob->rotAxis[0]=ob->rotAxis[2]=ob->rotAngle= 0.0f;
+ ob->rotAxis[1]= 1.0f;
+ }
+ else {
+ ob->rot[0]= ob->rot[1]= ob->rot[2]= 0.0f;
+ }
+ }
}
ob->recalc |= OB_RECALC_OB;
}
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index e8b683810c6..94a5ad6fa9f 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -407,20 +407,23 @@ static float get_vert_def_nr(Object *ob, int def_nr, int vertnum)
eve= BMIter_AtIndex(me->edit_btmesh->bm, BM_VERTS_OF_MESH, NULL, vertnum);
if(!eve) return 0.0f;
dvert= CustomData_bmesh_get(&me->edit_btmesh->bm->vdata, eve->head.data, CD_MDEFORMVERT);
+ vertnum= 0;
}
else
- dvert = me->dvert + vertnum;
+ dvert = me->dvert;
}
else if(ob->type==OB_LATTICE) {
Lattice *lt= vgroup_edit_lattice(ob);
if(lt->dvert)
- dvert = lt->dvert + vertnum;
+ dvert = lt->dvert;
}
if(dvert==NULL)
return 0.0f;
+ dvert += vertnum;
+
for(i=dvert->totweight-1 ; i>=0 ; i--)
if(dvert->dw[i].def_nr == def_nr)
return dvert->dw[i].weight;
@@ -1228,13 +1231,13 @@ static int set_active_group_exec(bContext *C, wmOperator *op)
static EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *ptr, int *free)
{
- Object *ob;
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
EnumPropertyItem tmp = {0, "", 0, "", ""};
EnumPropertyItem *item= NULL;
bDeformGroup *def;
int a, totitem= 0;
- if(!C || !(ob = CTX_data_pointer_get_type(C, "object", &RNA_Object).data)) /* needed for docs */
+ if(!ob)
return vgroup_items;
for(a=0, def=ob->defbase.first; def; def=def->next, a++) {
@@ -1245,7 +1248,6 @@ static EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *ptr, int *free)
}
RNA_enum_item_end(&item, &totitem);
-
*free= 1;
return item;
diff --git a/source/blender/editors/physics/SConscript b/source/blender/editors/physics/SConscript
index 5718ae0c217..60b992d2e07 100644
--- a/source/blender/editors/physics/SConscript
+++ b/source/blender/editors/physics/SConscript
@@ -8,4 +8,11 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' #/intern/guardedalloc ../../gpu'
incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern'
+if env['OURPLATFORM'] == 'linux2':
+ cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( 'bf_editors_physics', sources, Split(incs), [], libtype=['core'], priority=[45] )
diff --git a/source/blender/editors/physics/physics_boids.c b/source/blender/editors/physics/particle_boids.c
index 148359068ad..b7a97d1131a 100644
--- a/source/blender/editors/physics/physics_boids.c
+++ b/source/blender/editors/physics/particle_boids.c
@@ -25,35 +25,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-//#include <stdlib.h>
-//#include <string.h>
-//
+#include <stdlib.h>
+
#include "MEM_guardedalloc.h"
#include "DNA_boid_types.h"
#include "DNA_particle_types.h"
-//#include "DNA_curve_types.h"
#include "DNA_object_types.h"
-//#include "DNA_material_types.h"
-//#include "DNA_texture_types.h"
#include "DNA_scene_types.h"
-//#include "DNA_world_types.h"
#include "BKE_boids.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_particle.h"
-//#include "BKE_texture.h"
-//#include "BKE_utildefines.h"
-//#include "BKE_world.h"
-//#include "BLI_editVert.h"
#include "BLI_listbase.h"
-//
#include "RNA_access.h"
#include "RNA_enum_types.h"
#include "RNA_define.h"
@@ -61,15 +47,11 @@
#include "WM_api.h"
#include "WM_types.h"
-//#include "ED_curve.h"
-//#include "ED_mesh.h"
-//
-//#include "buttons_intern.h" // own include
+#include "physics_intern.h"
/************************ add/del boid rule operators *********************/
-static int boidrule_add_exec(bContext *C, wmOperator *op)
+static int rule_add_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;
@@ -95,29 +77,29 @@ static int boidrule_add_exec(bContext *C, wmOperator *op)
BLI_addtail(&state->rules, rule);
- psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET);
+ DAG_id_flush_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
return OPERATOR_FINISHED;
}
-void BOID_OT_boidrule_add(wmOperatorType *ot)
+void BOID_OT_rule_add(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Boid Rule";
ot->description = "Add a boid rule to the current boid state.";
- ot->idname= "BOID_OT_boidrule_add";
+ ot->idname= "BOID_OT_rule_add";
/* api callbacks */
ot->invoke= WM_menu_invoke;
- ot->exec= boidrule_add_exec;
+ ot->exec= rule_add_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", boidrule_type_items, 0, "Type", "");
}
-static int boidrule_del_exec(bContext *C, wmOperator *op)
+static int rule_del_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
@@ -146,30 +128,29 @@ static int boidrule_del_exec(bContext *C, wmOperator *op)
rule->flag |= BOIDRULE_CURRENT;
DAG_scene_sort(scene);
- psys_flush_particle_settings(scene, psys->part, PSYS_RECALC_RESET);
+ DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
return OPERATOR_FINISHED;
}
-void BOID_OT_boidrule_del(wmOperatorType *ot)
+void BOID_OT_rule_del(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Remove Boid Rule";
- ot->idname= "BOID_OT_boidrule_del";
+ ot->idname= "BOID_OT_rule_del";
/* api callbacks */
- ot->exec= boidrule_del_exec;
+ ot->exec= rule_del_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ move up/down boid rule operators *********************/
-static int boidrule_move_up_exec(bContext *C, wmOperator *op)
+static int rule_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;
@@ -185,7 +166,7 @@ static int boidrule_move_up_exec(bContext *C, wmOperator *op)
BLI_remlink(&state->rules, rule);
BLI_insertlink(&state->rules, rule->prev->prev, rule);
- psys_flush_particle_settings(scene, psys->part, PSYS_RECALC_RESET);
+ DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
break;
}
@@ -194,21 +175,20 @@ static int boidrule_move_up_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void BOID_OT_boidrule_move_up(wmOperatorType *ot)
+void BOID_OT_rule_move_up(wmOperatorType *ot)
{
ot->name= "Move Up Boid Rule";
ot->description= "Move boid rule up in the list.";
- ot->idname= "BOID_OT_boidrule_move_up";
+ ot->idname= "BOID_OT_rule_move_up";
- ot->exec= boidrule_move_up_exec;
+ ot->exec= rule_move_up_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int boidrule_move_down_exec(bContext *C, wmOperator *op)
+static int rule_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;
@@ -224,7 +204,7 @@ static int boidrule_move_down_exec(bContext *C, wmOperator *op)
BLI_remlink(&state->rules, rule);
BLI_insertlink(&state->rules, rule->next, rule);
- psys_flush_particle_settings(scene, psys->part, PSYS_RECALC_RESET);
+ DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
break;
}
@@ -233,13 +213,13 @@ static int boidrule_move_down_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void BOID_OT_boidrule_move_down(wmOperatorType *ot)
+void BOID_OT_rule_move_down(wmOperatorType *ot)
{
ot->name= "Move Down Boid Rule";
ot->description= "Move boid rule down in the list.";
- ot->idname= "BOID_OT_boidrule_move_down";
+ ot->idname= "BOID_OT_rule_move_down";
- ot->exec= boidrule_move_down_exec;
+ ot->exec= rule_move_down_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -247,7 +227,7 @@ void BOID_OT_boidrule_move_down(wmOperatorType *ot)
/************************ add/del boid state operators *********************/
-static int boidstate_add_exec(bContext *C, wmOperator *op)
+static int state_add_exec(bContext *C, wmOperator *op)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
ParticleSystem *psys= ptr.data;
@@ -273,20 +253,20 @@ static int boidstate_add_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void BOID_OT_boidstate_add(wmOperatorType *ot)
+void BOID_OT_state_add(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Boid State";
ot->description = "Add a boid state to the particle system.";
- ot->idname= "BOID_OT_boidstate_add";
+ ot->idname= "BOID_OT_state_add";
/* api callbacks */
- ot->exec= boidstate_add_exec;
+ ot->exec= state_add_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int boidstate_del_exec(bContext *C, wmOperator *op)
+static int state_del_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
@@ -320,28 +300,28 @@ static int boidstate_del_exec(bContext *C, wmOperator *op)
state->flag |= BOIDSTATE_CURRENT;
DAG_scene_sort(scene);
- psys_flush_particle_settings(scene, psys->part, PSYS_RECALC_RESET);
+ DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
return OPERATOR_FINISHED;
}
-void BOID_OT_boidstate_del(wmOperatorType *ot)
+void BOID_OT_state_del(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Remove Boid State";
- ot->idname= "BOID_OT_boidstate_del";
+ ot->idname= "BOID_OT_state_del";
/* api callbacks */
- ot->exec= boidstate_del_exec;
+ ot->exec= state_del_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ move up/down boid state operators *********************/
-static int boidstate_move_up_exec(bContext *C, wmOperator *op)
+static int state_move_up_exec(bContext *C, wmOperator *op)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
ParticleSystem *psys= ptr.data;
@@ -366,21 +346,20 @@ static int boidstate_move_up_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void BOID_OT_boidstate_move_up(wmOperatorType *ot)
+void BOID_OT_state_move_up(wmOperatorType *ot)
{
ot->name= "Move Up Boid State";
ot->description= "Move boid state up in the list.";
- ot->idname= "BOID_OT_boidstate_move_up";
+ ot->idname= "BOID_OT_state_move_up";
- ot->exec= boidstate_move_up_exec;
+ ot->exec= state_move_up_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int boidstate_move_down_exec(bContext *C, wmOperator *op)
+static int state_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;
BoidSettings *boids;
@@ -395,7 +374,7 @@ static int boidstate_move_down_exec(bContext *C, wmOperator *op)
if(state->flag & BOIDSTATE_CURRENT && state->next) {
BLI_remlink(&boids->states, state);
BLI_insertlink(&boids->states, state->next, state);
- psys_flush_particle_settings(scene, psys->part, PSYS_RECALC_RESET);
+ DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
break;
}
}
@@ -403,28 +382,15 @@ static int boidstate_move_down_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void BOID_OT_boidstate_move_down(wmOperatorType *ot)
+void BOID_OT_state_move_down(wmOperatorType *ot)
{
ot->name= "Move Down Boid State";
ot->description= "Move boid state down in the list.";
- ot->idname= "BOID_OT_boidstate_move_down";
+ ot->idname= "BOID_OT_state_move_down";
- ot->exec= boidstate_move_down_exec;
+ ot->exec= state_move_down_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-/*******************************************************************************/
-void ED_operatortypes_boids(void)
-{
- WM_operatortype_append(BOID_OT_boidrule_add);
- WM_operatortype_append(BOID_OT_boidrule_del);
- WM_operatortype_append(BOID_OT_boidrule_move_up);
- WM_operatortype_append(BOID_OT_boidrule_move_down);
-
- WM_operatortype_append(BOID_OT_boidstate_add);
- WM_operatortype_append(BOID_OT_boidstate_del);
- WM_operatortype_append(BOID_OT_boidstate_move_up);
- WM_operatortype_append(BOID_OT_boidstate_move_down);
-}
diff --git a/source/blender/editors/physics/editparticle.c b/source/blender/editors/physics/particle_edit.c
index 212d2047872..a1570810e94 100644
--- a/source/blender/editors/physics/editparticle.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -106,35 +106,32 @@ static void PTCacheUndo_clear(PTCacheEdit *edit);
/**************************** utilities *******************************/
-static int PE_poll(bContext *C)
+int PE_poll(bContext *C)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- PTCacheEdit *edit;
- if(!scene || !ob)
+ if(!scene || !ob || !(ob->mode & OB_MODE_PARTICLE_EDIT))
return 0;
- edit= PE_get_current(scene, ob);
-
- return (edit && (ob->mode & OB_MODE_PARTICLE_EDIT));
+ return (PE_get_current(scene, ob) != NULL);
}
-static int PE_hair_poll(bContext *C)
+int PE_hair_poll(bContext *C)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
PTCacheEdit *edit;
- if(!scene || !ob)
+ if(!scene || !ob || !(ob->mode & OB_MODE_PARTICLE_EDIT))
return 0;
edit= PE_get_current(scene, ob);
- return (edit && edit->psys && (ob->mode & OB_MODE_PARTICLE_EDIT));
+ return (edit && edit->psys);
}
-static int PE_poll_3dview(bContext *C)
+int PE_poll_3dview(bContext *C)
{
return PE_poll(C) && CTX_wm_area(C)->spacetype == SPACE_VIEW3D &&
CTX_wm_region(C)->regiontype == RGN_TYPE_WINDOW;
@@ -197,7 +194,7 @@ ParticleEditSettings *PE_settings(Scene *scene)
}
/* always gets atleast the first particlesystem even if PSYS_CURRENT flag is not set */
-PTCacheEdit *PE_get_current(Scene *scene, Object *ob)
+static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create)
{
ParticleEditSettings *pset= PE_settings(scene);
PTCacheEdit *edit = NULL;
@@ -235,18 +232,18 @@ PTCacheEdit *PE_get_current(Scene *scene, Object *ob)
if(psys->flag & PSYS_CURRENT) {
if(psys->part && psys->part->type == PART_HAIR) {
if(psys->flag & PSYS_HAIR_DYNAMICS && psys->pointcache->flag & PTCACHE_BAKED) {
- if(!psys->pointcache->edit)
+ if(create && !psys->pointcache->edit)
PE_create_particle_edit(scene, ob, pid->cache, NULL);
edit = pid->cache->edit;
}
else {
- if(!psys->edit && psys->flag & PSYS_HAIR_DONE)
+ if(create && !psys->edit && psys->flag & PSYS_HAIR_DONE)
PE_create_particle_edit(scene, ob, NULL, psys);
edit = psys->edit;
}
}
else {
- if(pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
+ if(create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
PE_create_particle_edit(scene, ob, pid->cache, psys);
edit = pid->cache->edit;
}
@@ -255,13 +252,13 @@ PTCacheEdit *PE_get_current(Scene *scene, Object *ob)
}
}
else if(pset->edittype == PE_TYPE_SOFTBODY && pid->type == PTCACHE_TYPE_SOFTBODY) {
- if(pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
+ if(create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
PE_create_particle_edit(scene, ob, pid->cache, NULL);
edit = pid->cache->edit;
break;
}
else if(pset->edittype == PE_TYPE_CLOTH && pid->type == PTCACHE_TYPE_CLOTH) {
- if(pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
+ if(create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
PE_create_particle_edit(scene, ob, pid->cache, NULL);
edit = pid->cache->edit;
break;
@@ -276,6 +273,22 @@ PTCacheEdit *PE_get_current(Scene *scene, Object *ob)
return edit;
}
+PTCacheEdit *PE_get_current(Scene *scene, Object *ob)
+{
+ return pe_get_current(scene, ob, 0);
+}
+
+PTCacheEdit *PE_create_current(Scene *scene, Object *ob)
+{
+ return pe_get_current(scene, ob, 1);
+}
+
+void PE_current_changed(Scene *scene, Object *ob)
+{
+ if(ob->mode == OB_MODE_PARTICLE_EDIT)
+ PE_create_current(scene, ob);
+}
+
void PE_hide_keys_time(Scene *scene, PTCacheEdit *edit, float cfra)
{
ParticleEditSettings *pset=PE_settings(scene);
@@ -675,6 +688,9 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys)
psmd= psys_get_modifier(ob, psys);
totpart= psys->totpart;
+ if(!psmd->dm)
+ return;
+
tree= BLI_kdtree_new(totpart);
/* insert particles into kd tree */
@@ -803,6 +819,9 @@ static void PE_apply_mirror(Object *ob, ParticleSystem *psys)
edit= psys->edit;
psmd= psys_get_modifier(ob, psys);
+ if(!edit->mirror_cache || !psmd->dm)
+ return;
+
/* we delay settings the PARS_EDIT_RECALC for mirrored particles
* to avoid doing mirror twice */
LOOP_POINTS {
@@ -841,6 +860,9 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit)
psys = edit->psys;
psmd = psys_get_modifier(ob,psys);
+ if(!psmd->dm)
+ return;
+
LOOP_EDITED_POINTS {
psys_mat_hair_to_object(ob, psmd->dm, psys->part->from, psys->particles + p, hairmat);
@@ -994,12 +1016,15 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys)
float *vec, *nor;
int i, totface, totvert;
+ if(!dm)
+ return;
+
if(edit->emitter_cosnos)
MEM_freeN(edit->emitter_cosnos);
BLI_kdtree_free(edit->emitter_field);
- totface=dm->getNumFaces(dm);
+ totface=dm->getNumTessFaces(dm);
totvert=dm->getNumVerts(dm);
edit->emitter_cosnos=MEM_callocN(totface*6*sizeof(float),"emitter cosnos");
@@ -1079,7 +1104,7 @@ static void update_world_cos(Object *ob, PTCacheEdit *edit)
POINT_P; KEY_K;
float hairmat[4][4];
- if(psys==0 || psys->edit==0)
+ if(psys==0 || psys->edit==0 || psmd->dm==NULL)
return;
LOOP_POINTS {
@@ -1184,7 +1209,8 @@ void PE_update_object(Scene *scene, Object *ob, int useflag)
point->flag &= ~PEP_EDIT_RECALC;
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ if(edit->psys)
+ edit->psys->flag &= ~PSYS_HAIR_UPDATED;
}
/************************************************/
@@ -1761,6 +1787,7 @@ static void rekey_particle(PEData *data, int pa_index)
{
PTCacheEdit *edit= data->edit;
ParticleSystem *psys= edit->psys;
+ ParticleSimulationData sim = {data->scene, data->ob, edit->psys, NULL};
ParticleData *pa= psys->particles + pa_index;
PTCacheEditPoint *point = edit->points + pa_index;
ParticleKey state;
@@ -1785,7 +1812,7 @@ static void rekey_particle(PEData *data, int pa_index)
/* interpolate new keys from old ones */
for(k=1,key++; k<data->totrekey-1; k++,key++) {
state.time= (float)k / (float)(data->totrekey-1);
- psys_get_particle_on_path(data->scene, data->ob, psys, pa_index, &state, 0);
+ psys_get_particle_on_path(&sim, pa_index, &state, 0);
VECCOPY(key->co, state.co);
key->time= sta + k * dval;
}
@@ -1853,6 +1880,7 @@ static void rekey_particle_to_time(Scene *scene, Object *ob, int pa_index, float
{
PTCacheEdit *edit= PE_get_current(scene, ob);
ParticleSystem *psys;
+ ParticleSimulationData sim = {scene, ob, edit ? edit->psys : NULL, NULL};
ParticleData *pa;
ParticleKey state;
HairKey *new_keys, *key;
@@ -1872,7 +1900,7 @@ static void rekey_particle_to_time(Scene *scene, Object *ob, int pa_index, float
/* interpolate new keys from old ones (roots stay the same) */
for(k=1, key++; k < pa->totkey; k++, key++) {
state.time= path_time * (float)k / (float)(pa->totkey-1);
- psys_get_particle_on_path(scene, ob, psys, pa_index, &state, 0);
+ psys_get_particle_on_path(&sim, pa_index, &state, 0);
VECCOPY(key->co, state.co);
}
@@ -2044,6 +2072,7 @@ static void subdivide_particle(PEData *data, int pa_index)
{
PTCacheEdit *edit= data->edit;
ParticleSystem *psys= edit->psys;
+ ParticleSimulationData sim = {data->scene, data->ob, edit->psys, NULL};
ParticleData *pa= psys->particles + pa_index;
PTCacheEditPoint *point = edit->points + pa_index;
ParticleKey state;
@@ -2083,7 +2112,7 @@ static void subdivide_particle(PEData *data, int pa_index)
if(ekey->flag & PEK_SELECT && (ekey+1)->flag & PEK_SELECT) {
nkey->time= (key->time + (key+1)->time)*0.5f;
state.time= (endtime != 0.0f)? nkey->time/endtime: 0.0f;
- psys_get_particle_on_path(data->scene, data->ob, psys, pa_index, &state, 0);
+ psys_get_particle_on_path(&sim, pa_index, &state, 0);
VECCOPY(nkey->co, state.co);
nekey->co= nkey->co;
@@ -2394,7 +2423,6 @@ static int delete_exec(bContext *C, wmOperator *op)
}
PE_update_object(data.scene, data.ob, 0);
-
DAG_id_flush_update(&data.ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, data.ob);
@@ -2438,6 +2466,8 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
return;
psmd= psys_get_modifier(ob, psys);
+ if(!psmd->dm)
+ return;
mirrorfaces= mesh_get_x_mirror_faces(ob, NULL);
@@ -2875,12 +2905,13 @@ static void brush_add(PEData *data, short number)
ParticleSystem *psys= edit->psys;
ParticleData *add_pars= MEM_callocN(number*sizeof(ParticleData),"ParticleData add");
ParticleSystemModifierData *psmd= psys_get_modifier(ob,psys);
+ ParticleSimulationData sim = {scene, ob, psys, psmd};
ParticleEditSettings *pset= PE_settings(scene);
int i, k, n= 0, totpart= psys->totpart;
- short mco[2];
+ float mco[2];
short dmx= 0, dmy= 0;
float co1[3], co2[3], min_d, imat[4][4];
- float framestep, timestep= psys_get_timestep(psys->part);
+ float framestep, timestep= psys_get_timestep(&sim);
short size= pset->brush[PE_BRUSH_ADD].size;
short size2= size*size;
DerivedMesh *dm=0;
@@ -2972,11 +3003,14 @@ static void brush_add(PEData *data, short number)
for(k=0, hkey=pa->hair; k<pa->totkey; k++, hkey++, key++) {
key->co= hkey->co;
key->time= &hkey->time;
+
+ if(!(psys->flag & PSYS_GLOBAL_HAIR))
+ key->flag |= PEK_USE_WCO;
}
pa->size= 1.0f;
- initialize_particle(pa,i,ob,psys,psmd);
- reset_particle(scene, pa,psys,psmd,ob,0.0,1.0,0,0,0);
+ initialize_particle(&sim, pa,i);
+ reset_particle(&sim, pa, 0.0, 1.0);
point->flag |= PEP_EDIT_RECALC;
if(pset->flag & PE_X_MIRROR)
point->flag |= PEP_TAG; /* signal for duplicate */
@@ -3013,18 +3047,18 @@ static void brush_add(PEData *data, short number)
hkey->time= pa->time + k * framestep;
key[0].time= hkey->time/ 100.0f;
- psys_get_particle_on_path(scene, ob, psys, ptn[0].index, key, 0);
+ psys_get_particle_on_path(&sim, ptn[0].index, key, 0);
VecMulf(key[0].co, weight[0]);
if(maxw>1) {
key[1].time= key[0].time;
- psys_get_particle_on_path(scene, ob, psys, ptn[1].index, key + 1, 0);
+ psys_get_particle_on_path(&sim, ptn[1].index, key + 1, 0);
VecMulf(key[1].co, weight[1]);
VECADD(key[0].co, key[0].co, key[1].co);
if(maxw>2) {
key[2].time= key[0].time;
- psys_get_particle_on_path(scene, ob, psys, ptn[2].index, key + 2, 0);
+ psys_get_particle_on_path(&sim, ptn[2].index, key + 2, 0);
VecMulf(key[2].co, weight[2]);
VECADD(key[0].co, key[0].co, key[2].co);
}
@@ -3345,7 +3379,7 @@ static int brush_edit_invoke(bContext *C, wmOperator *op, wmEvent *event)
brush_edit_apply_event(C, op, event);
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -3716,13 +3750,15 @@ int PE_minmax(Scene *scene, float *min, float *max)
/* initialize needed data for bake edit */
static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache, ParticleSystem *psys)
{
- PTCacheEdit *edit= psys ? psys->edit : cache->edit;
+ PTCacheEdit *edit= (psys)? psys->edit : cache->edit;
+ ParticleSystemModifierData *psmd= (psys)? psys_get_modifier(ob, psys): NULL;
POINT_P; KEY_K;
ParticleData *pa = NULL;
HairKey *hkey;
int totpoint;
- if(!psys && !cache)
+ /* no psmd->dm happens in case particle system modifier is not enabled */
+ if(!(psys && psmd && psmd->dm) && !cache)
return;
if(cache && cache->flag & PTCACHE_DISK_CACHE)
@@ -3832,10 +3868,12 @@ static int particle_edit_toggle_poll(bContext *C)
static int particle_edit_toggle_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
if(!(ob->mode & OB_MODE_PARTICLE_EDIT)) {
ob->mode |= OB_MODE_PARTICLE_EDIT;
+ PE_create_current(scene, ob);
toggle_particle_cursor(C, 1);
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_PARTICLE, NULL);
}
@@ -3911,7 +3949,6 @@ static int specials_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
Scene *scene= CTX_data_scene(C);
ParticleEditSettings *pset=PE_settings(scene);
- PTCacheEdit *edit = PE_get_current(scene, CTX_data_active_object(C));
uiPopupMenu *pup;
uiLayout *layout;
@@ -3942,58 +3979,3 @@ void PARTICLE_OT_specials_menu(wmOperatorType *ot)
ot->poll= PE_hair_poll;
}
-/**************************** registration **********************************/
-
-void ED_operatortypes_particle(void)
-{
- WM_operatortype_append(PARTICLE_OT_select_all_toggle);
- WM_operatortype_append(PARTICLE_OT_select_first);
- WM_operatortype_append(PARTICLE_OT_select_last);
- WM_operatortype_append(PARTICLE_OT_select_linked);
- WM_operatortype_append(PARTICLE_OT_select_less);
- WM_operatortype_append(PARTICLE_OT_select_more);
-
- WM_operatortype_append(PARTICLE_OT_hide);
- WM_operatortype_append(PARTICLE_OT_reveal);
-
- WM_operatortype_append(PARTICLE_OT_rekey);
- WM_operatortype_append(PARTICLE_OT_subdivide);
- WM_operatortype_append(PARTICLE_OT_remove_doubles);
- WM_operatortype_append(PARTICLE_OT_delete);
- WM_operatortype_append(PARTICLE_OT_mirror);
-
- WM_operatortype_append(PARTICLE_OT_brush_set);
- WM_operatortype_append(PARTICLE_OT_brush_edit);
- WM_operatortype_append(PARTICLE_OT_brush_radial_control);
-
- WM_operatortype_append(PARTICLE_OT_specials_menu);
-
- WM_operatortype_append(PARTICLE_OT_particle_edit_toggle);
- WM_operatortype_append(PARTICLE_OT_edited_clear);
-}
-
-void ED_keymap_particle(wmWindowManager *wm)
-{
- ListBase *keymap= WM_keymap_listbase(wm, "Particle", 0, 0);
-
- WM_keymap_add_item(keymap, "PARTICLE_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "PARTICLE_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "PARTICLE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "deselect", 1);
-
- WM_keymap_add_item(keymap, "PARTICLE_OT_delete", XKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "PARTICLE_OT_delete", DELKEY, KM_PRESS, 0, 0);
-
- WM_keymap_add_item(keymap, "PARTICLE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, 0, 0);
- RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
-
- WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", ACTIONMOUSE, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_brush_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE);
- RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_brush_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH);
-
- WM_keymap_add_item(keymap, "PARTICLE_OT_specials_menu", WKEY, KM_PRESS, 0, 0);
-}
-
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
new file mode 100644
index 00000000000..fd81e828bea
--- /dev/null
+++ b/source/blender/editors/physics/particle_object.c
@@ -0,0 +1,651 @@
+/**
+ * $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 <string.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_meshdata_types.h"
+#include "DNA_modifier_types.h"
+#include "DNA_object_types.h"
+#include "DNA_particle_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_windowmanager_types.h"
+
+#include "BLI_arithb.h"
+#include "BLI_listbase.h"
+
+#include "BKE_context.h"
+#include "BKE_depsgraph.h"
+#include "BKE_DerivedMesh.h"
+#include "BKE_cdderivedmesh.h"
+#include "BKE_main.h"
+#include "BKE_particle.h"
+#include "BKE_pointcache.h"
+#include "BKE_utildefines.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "ED_particle.h"
+
+#include "physics_intern.h"
+
+/********************** 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";
+ ot->description="Add a particle system.";
+
+ /* 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";
+ ot->description="Remove the selected particle system.";
+
+ /* api callbacks */
+ ot->exec= particle_system_remove_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/********************** new particle settings operator *********************/
+
+static int psys_poll(bContext *C)
+{
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
+ return (ptr.data != NULL);
+}
+
+static int new_particle_settings_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene = CTX_data_scene(C);
+ 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("ParticleSettings", bmain);
+
+ ob= ptr.id.data;
+
+ if(psys->part)
+ psys->part->id.us--;
+
+ psys->part = part;
+
+ psys_check_boid_data(psys);
+
+ DAG_scene_sort(scene);
+ DAG_id_flush_update(&ob->id, 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";
+ ot->description="Add new particle settings.";
+
+ /* api callbacks */
+ ot->exec= new_particle_settings_exec;
+ ot->poll= psys_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/********************** keyed particle target operators *********************/
+
+static int new_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;
+
+ ParticleTarget *pt;
+
+ if(!psys)
+ return OPERATOR_CANCELLED;
+
+ pt = psys->targets.first;
+ for(; pt; pt=pt->next)
+ pt->flag &= ~PTARGET_CURRENT;
+
+ pt = MEM_callocN(sizeof(ParticleTarget), "keyed particle target");
+
+ pt->flag |= PTARGET_CURRENT;
+ pt->psys = 1;
+
+ BLI_addtail(&psys->targets, pt);
+
+ DAG_scene_sort(scene);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void PARTICLE_OT_new_target(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "New Particle Target";
+ ot->idname= "PARTICLE_OT_new_target";
+ ot->description="Add a new particle target.";
+
+ /* api callbacks */
+ ot->exec= new_particle_target_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int remove_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;
+
+ ParticleTarget *pt;
+
+ if(!psys)
+ return OPERATOR_CANCELLED;
+
+ pt = psys->targets.first;
+ for(; pt; pt=pt->next) {
+ if(pt->flag & PTARGET_CURRENT) {
+ BLI_remlink(&psys->targets, pt);
+ MEM_freeN(pt);
+ break;
+ }
+
+ }
+ pt = psys->targets.last;
+
+ if(pt)
+ pt->flag |= PTARGET_CURRENT;
+
+ DAG_scene_sort(scene);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void PARTICLE_OT_remove_target(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove Particle Target";
+ ot->idname= "PARTICLE_OT_remove_target";
+ ot->description="Remove the selected particle target.";
+
+ /* api callbacks */
+ ot->exec= remove_particle_target_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/************************ move up particle target operator *********************/
+
+static int target_move_up_exec(bContext *C, wmOperator *op)
+{
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
+ ParticleSystem *psys= ptr.data;
+ Object *ob = ptr.id.data;
+ ParticleTarget *pt;
+
+ if(!psys)
+ return OPERATOR_CANCELLED;
+
+ pt = psys->targets.first;
+ for(; pt; pt=pt->next) {
+ if(pt->flag & PTARGET_CURRENT && pt->prev) {
+ BLI_remlink(&psys->targets, pt);
+ BLI_insertlink(&psys->targets, pt->prev->prev, pt);
+
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ break;
+ }
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void PARTICLE_OT_target_move_up(wmOperatorType *ot)
+{
+ ot->name= "Move Up Target";
+ ot->idname= "PARTICLE_OT_target_move_up";
+ ot->description= "Move particle target up in the list.";
+
+ ot->exec= target_move_up_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/************************ move down particle target operator *********************/
+
+static int target_move_down_exec(bContext *C, wmOperator *op)
+{
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
+ ParticleSystem *psys= ptr.data;
+ Object *ob = ptr.id.data;
+ ParticleTarget *pt;
+
+ if(!psys)
+ return OPERATOR_CANCELLED;
+ pt = psys->targets.first;
+ for(; pt; pt=pt->next) {
+ if(pt->flag & PTARGET_CURRENT && pt->next) {
+ BLI_remlink(&psys->targets, pt);
+ BLI_insertlink(&psys->targets, pt->next, pt);
+
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ break;
+ }
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void PARTICLE_OT_target_move_down(wmOperatorType *ot)
+{
+ ot->name= "Move Down Target";
+ ot->idname= "PARTICLE_OT_target_move_down";
+ ot->description= "Move particle target down in the list.";
+
+ ot->exec= target_move_down_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/************************ move up particle dupliweight operator *********************/
+
+static int dupliob_move_up_exec(bContext *C, wmOperator *op)
+{
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
+ ParticleSystem *psys= ptr.data;
+ ParticleSettings *part;
+ ParticleDupliWeight *dw;
+
+ if(!psys)
+ return OPERATOR_CANCELLED;
+
+ part = psys->part;
+ for(dw=part->dupliweights.first; dw; dw=dw->next) {
+ if(dw->flag & PART_DUPLIW_CURRENT && dw->prev) {
+ BLI_remlink(&part->dupliweights, dw);
+ BLI_insertlink(&part->dupliweights, dw->prev->prev, dw);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL);
+ break;
+ }
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void PARTICLE_OT_dupliob_move_up(wmOperatorType *ot)
+{
+ ot->name= "Move Up Dupli Object";
+ ot->idname= "PARTICLE_OT_dupliob_move_up";
+ ot->description= "Move dupli object up in the list.";
+
+ ot->exec= dupliob_move_up_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/************************ move down particle dupliweight operator *********************/
+
+static int dupliob_move_down_exec(bContext *C, wmOperator *op)
+{
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
+ ParticleSystem *psys= ptr.data;
+ ParticleSettings *part;
+ ParticleDupliWeight *dw;
+
+ if(!psys)
+ return OPERATOR_CANCELLED;
+
+ part = psys->part;
+ for(dw=part->dupliweights.first; dw; dw=dw->next) {
+ if(dw->flag & PART_DUPLIW_CURRENT && dw->next) {
+ BLI_remlink(&part->dupliweights, dw);
+ BLI_insertlink(&part->dupliweights, dw->next, dw);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL);
+ break;
+ }
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void PARTICLE_OT_dupliob_move_down(wmOperatorType *ot)
+{
+ ot->name= "Move Down Dupli Object";
+ ot->idname= "PARTICLE_OT_dupliob_move_down";
+ ot->description= "Move dupli object down in the list.";
+
+ ot->exec= dupliob_move_down_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/************************ connect/disconnect hair operators *********************/
+
+static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
+{
+ ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys);
+ ParticleData *pa;
+ PTCacheEdit *edit;
+ PTCacheEditPoint *point;
+ PTCacheEditKey *ekey = NULL;
+ HairKey *key;
+ int i, k;
+ float hairmat[4][4];
+
+ if(!ob || !psys || psys->flag & PSYS_GLOBAL_HAIR)
+ return;
+
+ if(!psys->part || psys->part->type != PART_HAIR)
+ return;
+
+ edit = psys->edit;
+ point= edit ? edit->points : NULL;
+
+ for(i=0, pa=psys->particles; i<psys->totpart; i++,pa++) {
+ if(point) {
+ ekey = point->keys;
+ point++;
+ }
+
+ psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
+
+ for(k=0,key=pa->hair; k<pa->totkey; k++,key++) {
+ Mat4MulVecfl(hairmat,key->co);
+
+ if(ekey) {
+ ekey->flag &= ~PEK_USE_WCO;
+ ekey++;
+ }
+ }
+ }
+
+ psys_free_path_cache(psys, psys->edit);
+
+ psys->flag |= PSYS_GLOBAL_HAIR;
+
+ PE_update_object(scene, ob, 0);
+}
+
+static int disconnect_hair_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
+ ParticleSystem *psys= NULL;
+ int all = RNA_boolean_get(op->ptr, "all");
+
+ if(!ob)
+ return OPERATOR_CANCELLED;
+
+ if(all) {
+ for(psys=ob->particlesystem.first; psys; psys=psys->next) {
+ disconnect_hair(scene, ob, psys);
+ }
+ }
+ else {
+ psys = ptr.data;
+ disconnect_hair(scene, ob, psys);
+ }
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void PARTICLE_OT_disconnect_hair(wmOperatorType *ot)
+{
+ ot->name= "Disconnect Hair";
+ ot->description= "Disconnect hair from the emitter mesh.";
+ ot->idname= "PARTICLE_OT_disconnect_hair";
+
+ ot->exec= disconnect_hair_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_boolean(ot->srna, "all", 0, "All hair", "Disconnect all hair systems from the emitter mesh");
+}
+
+static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
+{
+ ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys);
+ ParticleData *pa;
+ PTCacheEdit *edit;
+ PTCacheEditPoint *point;
+ PTCacheEditKey *ekey;
+ HairKey *key;
+ BVHTreeFromMesh bvhtree;
+ BVHTreeNearest nearest;
+ MFace *mface;
+ DerivedMesh *dm = NULL;
+ int numverts;
+ int i, k;
+ float hairmat[4][4], imat[4][4];
+ float v[4][3], vec[3];
+
+ if(!psys || !psys->part || psys->part->type != PART_HAIR)
+ return;
+
+ edit= psys->edit;
+ point= edit ? edit->points : NULL;
+
+ if(psmd->dm->deformedOnly)
+ dm= psmd->dm;
+ else
+ dm= mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
+
+ numverts = dm->getNumVerts (dm);
+
+ memset( &bvhtree, 0, sizeof(bvhtree) );
+
+ /* convert to global coordinates */
+ for (i=0; i<numverts; i++)
+ Mat4MulVecfl (ob->obmat, CDDM_get_vert(dm, i)->co);
+
+ bvhtree_from_mesh_faces(&bvhtree, dm, 0.0, 2, 6);
+
+ for(i=0, pa= psys->particles; i<psys->totpart; i++,pa++) {
+ key = pa->hair;
+
+ nearest.index = -1;
+ nearest.dist = FLT_MAX;
+
+ BLI_bvhtree_find_nearest(bvhtree.tree, key->co, &nearest, bvhtree.nearest_callback, &bvhtree);
+
+ if(nearest.index == -1) {
+ printf("No nearest point found for hair root!");
+ continue;
+ }
+
+ mface = CDDM_get_tessface(dm,nearest.index);
+
+ VecCopyf(v[0], CDDM_get_vert(dm,mface->v1)->co);
+ VecCopyf(v[1], CDDM_get_vert(dm,mface->v2)->co);
+ VecCopyf(v[2], CDDM_get_vert(dm,mface->v3)->co);
+ if(mface->v4) {
+ VecCopyf(v[3], CDDM_get_vert(dm,mface->v4)->co);
+ MeanValueWeights(v, 4, nearest.co, pa->fuv);
+ }
+ else
+ MeanValueWeights(v, 3, nearest.co, pa->fuv);
+
+ pa->num = nearest.index;
+ pa->num_dmcache = psys_particle_dm_face_lookup(ob,psmd->dm,pa->num,pa->fuv,NULL);
+
+ psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
+ Mat4Invert(imat,hairmat);
+
+ VECSUB(vec, nearest.co, key->co);
+
+ if(point) {
+ ekey = point->keys;
+ point++;
+ }
+
+ for(k=0,key=pa->hair; k<pa->totkey; k++,key++) {
+ VECADD(key->co, key->co, vec);
+ Mat4MulVecfl(imat,key->co);
+
+ if(ekey) {
+ ekey->flag |= PEK_USE_WCO;
+ ekey++;
+ }
+ }
+ }
+
+ free_bvhtree_from_mesh(&bvhtree);
+ if(!psmd->dm->deformedOnly)
+ dm->release(dm);
+
+ psys_free_path_cache(psys, psys->edit);
+
+ psys->flag &= ~PSYS_GLOBAL_HAIR;
+
+ PE_update_object(scene, ob, 0);
+}
+
+static int connect_hair_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
+ ParticleSystem *psys= NULL;
+ int all = RNA_boolean_get(op->ptr, "all");
+
+ if(!ob)
+ return OPERATOR_CANCELLED;
+
+ if(all) {
+ for(psys=ob->particlesystem.first; psys; psys=psys->next) {
+ connect_hair(scene, ob, psys);
+ }
+ }
+ else {
+ psys = ptr.data;
+ connect_hair(scene, ob, psys);
+ }
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void PARTICLE_OT_connect_hair(wmOperatorType *ot)
+{
+ ot->name= "Connect Hair";
+ ot->description= "Connect hair to the emitter mesh.";
+ ot->idname= "PARTICLE_OT_connect_hair";
+
+ ot->exec= connect_hair_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_boolean(ot->srna, "all", 0, "All hair", "Connect all hair systems to the emitter mesh");
+}
+
diff --git a/source/blender/editors/physics/ed_fluidsim.c b/source/blender/editors/physics/physics_fluid.c
index 093fa3f0a49..126c21a554b 100644
--- a/source/blender/editors/physics/ed_fluidsim.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -93,6 +93,8 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "physics_intern.h" // own include
+
/* enable/disable overall compilation */
#ifndef DISABLE_ELBEEM
@@ -1200,8 +1202,3 @@ void FLUID_OT_bake(wmOperatorType *ot)
ot->poll= ED_operator_object_active;
}
-void ED_operatortypes_fluid(void)
-{
- WM_operatortype_append(FLUID_OT_bake);
-}
-
diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h
index e03649575cb..3847ec8032a 100644
--- a/source/blender/editors/physics/physics_intern.h
+++ b/source/blender/editors/physics/physics_intern.h
@@ -33,6 +33,75 @@
#ifndef ED_PHYSICS_INTERN_H
#define ED_PHYSICS_INTERN_H
+struct wmOperatorType;
+
+/* particle_edit.c */
+int PE_poll(struct bContext *C);
+int PE_hair_poll(struct bContext *C);
+int PE_poll_3dview(struct bContext *C);
+
+void PARTICLE_OT_select_all_toggle(struct wmOperatorType *ot);
+void PARTICLE_OT_select_first(struct wmOperatorType *ot);
+void PARTICLE_OT_select_last(struct wmOperatorType *ot);
+void PARTICLE_OT_select_linked(struct wmOperatorType *ot);
+void PARTICLE_OT_select_less(struct wmOperatorType *ot);
+void PARTICLE_OT_select_more(struct wmOperatorType *ot);
+
+void PARTICLE_OT_hide(struct wmOperatorType *ot);
+void PARTICLE_OT_reveal(struct wmOperatorType *ot);
+
+void PARTICLE_OT_rekey(struct wmOperatorType *ot);
+void PARTICLE_OT_subdivide(struct wmOperatorType *ot);
+void PARTICLE_OT_remove_doubles(struct wmOperatorType *ot);
+void PARTICLE_OT_delete(struct wmOperatorType *ot);
+void PARTICLE_OT_mirror(struct wmOperatorType *ot);
+
+void PARTICLE_OT_brush_set(struct wmOperatorType *ot);
+void PARTICLE_OT_brush_edit(struct wmOperatorType *ot);
+void PARTICLE_OT_brush_radial_control(struct wmOperatorType *ot);
+
+void PARTICLE_OT_specials_menu(struct wmOperatorType *ot);
+
+void PARTICLE_OT_particle_edit_toggle(struct wmOperatorType *ot);
+void PARTICLE_OT_edited_clear(struct wmOperatorType *ot);
+
+/* particle_object.c */
+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_target(struct wmOperatorType *ot);
+void PARTICLE_OT_remove_target(struct wmOperatorType *ot);
+void PARTICLE_OT_target_move_up(struct wmOperatorType *ot);
+void PARTICLE_OT_target_move_down(struct wmOperatorType *ot);
+void PARTICLE_OT_connect_hair(struct wmOperatorType *ot);
+void PARTICLE_OT_disconnect_hair(struct wmOperatorType *ot);
+
+void PARTICLE_OT_dupliob_move_up(struct wmOperatorType *ot);
+void PARTICLE_OT_dupliob_move_down(struct wmOperatorType *ot);
+
+/* particle_boids.c */
+void BOID_OT_rule_add(struct wmOperatorType *ot);
+void BOID_OT_rule_del(struct wmOperatorType *ot);
+void BOID_OT_rule_move_up(struct wmOperatorType *ot);
+void BOID_OT_rule_move_down(struct wmOperatorType *ot);
+
+void BOID_OT_state_add(struct wmOperatorType *ot);
+void BOID_OT_state_del(struct wmOperatorType *ot);
+void BOID_OT_state_move_up(struct wmOperatorType *ot);
+void BOID_OT_state_move_down(struct wmOperatorType *ot);
+
+/* physics_fluid.c */
+void FLUID_OT_bake(struct wmOperatorType *ot);
+
+/* physics_pointcache.c */
+void PTCACHE_OT_bake_all(struct wmOperatorType *ot);
+void PTCACHE_OT_free_bake_all(struct wmOperatorType *ot);
+void PTCACHE_OT_bake(struct wmOperatorType *ot);
+void PTCACHE_OT_free_bake(struct wmOperatorType *ot);
+void PTCACHE_OT_bake_from_cache(struct wmOperatorType *ot);
+void PTCACHE_OT_add_new(struct wmOperatorType *ot);
+void PTCACHE_OT_remove(struct wmOperatorType *ot);
#endif /* ED_PHYSICS_INTERN_H */
diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c
new file mode 100644
index 00000000000..0ebbfa6b701
--- /dev/null
+++ b/source/blender/editors/physics/physics_ops.c
@@ -0,0 +1,176 @@
+/**
+ * $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 "DNA_windowmanager_types.h"
+
+#include "RNA_access.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "ED_physics.h"
+
+#include "physics_intern.h" // own include
+
+/***************************** particles ***********************************/
+
+static void operatortypes_particle(void)
+{
+ WM_operatortype_append(PARTICLE_OT_select_all_toggle);
+ WM_operatortype_append(PARTICLE_OT_select_first);
+ WM_operatortype_append(PARTICLE_OT_select_last);
+ WM_operatortype_append(PARTICLE_OT_select_linked);
+ WM_operatortype_append(PARTICLE_OT_select_less);
+ WM_operatortype_append(PARTICLE_OT_select_more);
+
+ WM_operatortype_append(PARTICLE_OT_hide);
+ WM_operatortype_append(PARTICLE_OT_reveal);
+
+ WM_operatortype_append(PARTICLE_OT_rekey);
+ WM_operatortype_append(PARTICLE_OT_subdivide);
+ WM_operatortype_append(PARTICLE_OT_remove_doubles);
+ WM_operatortype_append(PARTICLE_OT_delete);
+ WM_operatortype_append(PARTICLE_OT_mirror);
+
+ WM_operatortype_append(PARTICLE_OT_brush_set);
+ WM_operatortype_append(PARTICLE_OT_brush_edit);
+ WM_operatortype_append(PARTICLE_OT_brush_radial_control);
+
+ WM_operatortype_append(PARTICLE_OT_specials_menu);
+
+ WM_operatortype_append(PARTICLE_OT_particle_edit_toggle);
+ WM_operatortype_append(PARTICLE_OT_edited_clear);
+
+
+ WM_operatortype_append(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_target);
+ WM_operatortype_append(PARTICLE_OT_remove_target);
+ WM_operatortype_append(PARTICLE_OT_target_move_up);
+ WM_operatortype_append(PARTICLE_OT_target_move_down);
+ WM_operatortype_append(PARTICLE_OT_connect_hair);
+ WM_operatortype_append(PARTICLE_OT_disconnect_hair);
+
+ WM_operatortype_append(PARTICLE_OT_dupliob_move_up);
+ WM_operatortype_append(PARTICLE_OT_dupliob_move_down);
+}
+
+static void keymap_particle(wmKeyConfig *keyconf)
+{
+ wmKeyMap *keymap;
+
+ keymap= WM_keymap_find(keyconf, "Particle", 0, 0);
+ keymap->poll= PE_poll;
+
+ WM_keymap_add_item(keymap, "PARTICLE_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "PARTICLE_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "PARTICLE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "deselect", 1);
+
+ WM_keymap_add_item(keymap, "PARTICLE_OT_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "PARTICLE_OT_delete", DELKEY, KM_PRESS, 0, 0);
+
+ WM_keymap_add_item(keymap, "PARTICLE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, 0, 0);
+ RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
+
+ WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", ACTIONMOUSE, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0);
+ RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_brush_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE);
+ RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_brush_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH);
+
+ WM_keymap_add_item(keymap, "PARTICLE_OT_specials_menu", WKEY, KM_PRESS, 0, 0);
+}
+
+/******************************* boids *************************************/
+
+static void operatortypes_boids(void)
+{
+ WM_operatortype_append(BOID_OT_rule_add);
+ WM_operatortype_append(BOID_OT_rule_del);
+ WM_operatortype_append(BOID_OT_rule_move_up);
+ WM_operatortype_append(BOID_OT_rule_move_down);
+
+ WM_operatortype_append(BOID_OT_state_add);
+ WM_operatortype_append(BOID_OT_state_del);
+ WM_operatortype_append(BOID_OT_state_move_up);
+ WM_operatortype_append(BOID_OT_state_move_down);
+}
+
+/********************************* fluid ***********************************/
+
+static void operatortypes_fluid(void)
+{
+ WM_operatortype_append(FLUID_OT_bake);
+}
+
+/**************************** point cache **********************************/
+
+static void operatortypes_pointcache(void)
+{
+ WM_operatortype_append(PTCACHE_OT_bake_all);
+ WM_operatortype_append(PTCACHE_OT_free_bake_all);
+ WM_operatortype_append(PTCACHE_OT_bake);
+ WM_operatortype_append(PTCACHE_OT_free_bake);
+ WM_operatortype_append(PTCACHE_OT_bake_from_cache);
+ WM_operatortype_append(PTCACHE_OT_add_new);
+ WM_operatortype_append(PTCACHE_OT_remove);
+}
+
+//static void keymap_pointcache(wmWindowManager *wm)
+//{
+// wmKeyMap *keymap= WM_keymap_find(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);
+//}
+
+/****************************** general ************************************/
+
+void ED_operatortypes_physics(void)
+{
+ operatortypes_particle();
+ operatortypes_boids();
+ operatortypes_fluid();
+ operatortypes_pointcache();
+}
+
+void ED_keymap_physics(wmKeyConfig *keyconf)
+{
+ keymap_particle(keyconf);
+ //keymap_pointcache(keyconf);
+}
+
+
+
diff --git a/source/blender/editors/physics/ed_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index f2c7b64032f..26099a18966 100644
--- a/source/blender/editors/physics/ed_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -27,6 +27,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include <stdlib.h>
+
#include "MEM_guardedalloc.h"
#include "DNA_scene_types.h"
@@ -332,26 +334,4 @@ void PTCACHE_OT_remove(wmOperatorType *ot)
/* 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_bake);
- WM_operatortype_append(PTCACHE_OT_free_bake);
- WM_operatortype_append(PTCACHE_OT_bake_from_cache);
- WM_operatortype_append(PTCACHE_OT_add_new);
- WM_operatortype_append(PTCACHE_OT_remove);
-}
-
-//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/preview/SConscript b/source/blender/editors/preview/SConscript
deleted file mode 100644
index 922232822ff..00000000000
--- a/source/blender/editors/preview/SConscript
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/python
-Import ('env')
-
-sources = env.Glob('*.c')
-
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
-incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' #/intern/guardedalloc ../../gpu'
-incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern'
-incs += ' ../../blenloader'
-
-env.BlenderLib ( 'bf_editors_preview', sources, Split(incs), [], libtype=['core'], priority=[45] )
diff --git a/source/blender/editors/preview/Makefile b/source/blender/editors/render/Makefile
index 48e1dc64673..ed25f0be02a 100644
--- a/source/blender/editors/preview/Makefile
+++ b/source/blender/editors/render/Makefile
@@ -28,7 +28,7 @@
#
# Makes module object directory and bounces make to subdirectories.
-LIBNAME = ed_preview
+LIBNAME = ed_render
DIR = $(OCGDIR)/blender/$(LIBNAME)
include nan_compile.mk
diff --git a/source/blender/editors/render/SConscript b/source/blender/editors/render/SConscript
new file mode 100644
index 00000000000..3e1e99a7a6a
--- /dev/null
+++ b/source/blender/editors/render/SConscript
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+Import ('env')
+
+sources = env.Glob('*.c')
+
+incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
+incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
+incs += ' #/intern/guardedalloc ../../gpu'
+incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern'
+incs += ' ../../blenloader ../../bmesh'
+
+if env['OURPLATFORM'] == 'linux2':
+ cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
+env.BlenderLib ( 'bf_editors_render', sources, Split(incs), [], libtype=['core'], priority=[45] )
diff --git a/source/blender/editors/render/render_intern.h b/source/blender/editors/render/render_intern.h
new file mode 100644
index 00000000000..7b4c0194c5d
--- /dev/null
+++ b/source/blender/editors/render/render_intern.h
@@ -0,0 +1,53 @@
+/**
+ * $Id:
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2008 Blender Foundation.
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef RENDER_INTERN_H
+#define RENDER_INTERN_H
+
+struct wmOperatorType;
+
+/* render_shading.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 OBJECT_OT_material_slot_copy(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 SCENE_OT_render_layer_add(struct wmOperatorType *ot);
+void SCENE_OT_render_layer_remove(struct wmOperatorType *ot);
+
+void TEXTURE_OT_slot_move(struct wmOperatorType *ot);
+
+
+#endif /* RENDER_INTERN_H */
+
diff --git a/source/blender/editors/render/render_ops.c b/source/blender/editors/render/render_ops.c
new file mode 100644
index 00000000000..8c0c1b18fca
--- /dev/null
+++ b/source/blender/editors/render/render_ops.c
@@ -0,0 +1,57 @@
+/**
+ * $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 "DNA_windowmanager_types.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "render_intern.h" // own include
+
+/***************************** render ***********************************/
+
+void ED_operatortypes_render(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(OBJECT_OT_material_slot_copy);
+
+ WM_operatortype_append(MATERIAL_OT_new);
+ WM_operatortype_append(TEXTURE_OT_new);
+ WM_operatortype_append(WORLD_OT_new);
+
+ WM_operatortype_append(SCENE_OT_render_layer_add);
+ WM_operatortype_append(SCENE_OT_render_layer_remove);
+
+ WM_operatortype_append(TEXTURE_OT_slot_move);
+}
+
diff --git a/source/blender/editors/preview/previewrender.c b/source/blender/editors/render/render_preview.c
index 710ac3d6553..92380a56d3d 100644
--- a/source/blender/editors/preview/previewrender.c
+++ b/source/blender/editors/render/render_preview.c
@@ -88,12 +88,12 @@
#include "WM_api.h"
#include "WM_types.h"
-#include "ED_previewrender.h"
+#include "ED_render.h"
#include "ED_view3d.h"
#include "UI_interface.h"
-#include "previewrender_intern.h"
+#include "render_intern.h"
#define PR_XMIN 10
#define PR_YMIN 5
@@ -115,7 +115,7 @@ typedef struct ShaderPreview {
MTex *slot;
int sizex, sizey;
- int *pr_rect;
+ unsigned int *pr_rect;
int pr_method;
} ShaderPreview;
@@ -294,6 +294,14 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
}
sce->r.color_mgt_flag = scene->r.color_mgt_flag;
+ /* exception: don't color manage texture previews or icons */
+ if((sp && sp->pr_method==PR_ICON_RENDER) || id_type == ID_TE)
+ sce->r.color_mgt_flag &= ~R_COLOR_MANAGEMENT;
+ if((sp && sp->pr_method==PR_ICON_RENDER) && id_type != ID_WO)
+ sce->r.alphamode= R_ALPHAPREMUL;
+ else
+ sce->r.alphamode= R_ADDSKY;
+
sce->r.cfra= scene->r.cfra;
if(id_type==ID_MA) {
@@ -326,6 +334,19 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
}
}
}
+
+ /* turn off bounce lights for volume,
+ * doesn't make much visual difference and slows it down too */
+ if(mat->material_type == MA_TYPE_VOLUME) {
+ for(base= sce->base.first; base; base= base->next) {
+ if(base->object->type == OB_LAMP) {
+ /* if doesn't match 'Lamp.002' --> main key light */
+ if( strcmp(base->object->id.name+2, "Lamp.002") != 0 ) {
+ base->object->restrictflag |= OB_RESTRICT_RENDER;
+ }
+ }
+ }
+ }
if(sp->pr_method==PR_ICON_RENDER) {
@@ -338,7 +359,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
}
else {
sce->lay= 1<<mat->pr_type;
- if(mat->nodetree)
+ if(mat->nodetree && sp->pr_method==PR_NODE_RENDER)
ntreeInitPreview(mat->nodetree, sp->sizex, sp->sizey);
}
}
@@ -355,6 +376,8 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
if(matar && actcol < base->object->totcol)
(*matar)[actcol]= mat;
+ } else if (base->object->type == OB_LAMP) {
+ base->object->restrictflag &= ~OB_RESTRICT_RENDER;
}
}
}
@@ -364,9 +387,6 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
sce->lay= 1<<MA_TEXTURE;
- /* exception: don't color manage texture previews */
- sce->r.color_mgt_flag &= ~R_COLOR_MANAGEMENT;
-
for(base= sce->base.first; base; base= base->next) {
if(base->object->id.name[2]=='t') {
Material *mat= give_current_material(base->object, base->object->actcol);
@@ -388,6 +408,9 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
}
}
}
+
+ if(tex && tex->nodetree && sp->pr_method==PR_NODE_RENDER)
+ ntreeInitPreview(tex->nodetree, sp->sizex, sp->sizey);
}
else if(id_type==ID_LA) {
Lamp *la= (Lamp *)id;
@@ -426,6 +449,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
/* uses ROUNDBOX button in block to get the rect */
static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int first, rcti *rect, rcti *newrect)
{
+ Render *re;
RenderResult rres;
char name[32];
int gamma_correct=0;
@@ -450,7 +474,8 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
}
}
- RE_GetResultImage(RE_GetRender(name), &rres);
+ re= RE_GetRender(name);
+ RE_AcquireResultImage(re, &rres);
if(rres.rectf) {
@@ -462,10 +487,13 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
glTranslatef(offx, 0, 0);
glaDrawPixelsSafe_to32(rect->xmin, rect->ymin, rres.rectx, rres.recty, rres.rectx, rres.rectf, gamma_correct);
glPopMatrix();
+
+ RE_ReleaseResultImage(re);
return 1;
}
}
+ RE_ReleaseResultImage(re);
return 0;
}
@@ -504,11 +532,17 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r
}
if(ok==0) {
- ED_preview_shader_job(C, sa, id, parent, slot, newx, newy);
+ ED_preview_shader_job(C, sa, id, parent, slot, newx, newy, PR_BUTS_RENDER);
}
}
}
+/* ******************************** Icon Preview **************************** */
+
+void ED_preview_icon_draw(const bContext *C, void *idp, void *arg1, void *arg2, rcti *rect)
+{
+}
+
/* *************************** Preview for 3d window *********************** */
void view3d_previewrender_progress(RenderResult *rr, volatile rcti *renrect)
@@ -635,7 +669,6 @@ void BIF_view3d_previewrender_clear(ScrArea *sa)
/* afterqueue call */
void BIF_view3d_previewrender(Scene *scene, ScrArea *sa)
{
- bContext *C= NULL;
View3D *v3d= sa->spacedata.first;
RegionView3D *rv3d= NULL; // XXX
Render *re;
@@ -820,7 +853,7 @@ void BIF_view3d_previewdraw(struct ScrArea *sa, struct uiBlock *block)
}
-/* **************************** New preview system ****************** */
+/* **************************** new shader preview system ****************** */
/* inside thread, called by renderer, sets job update value */
static void shader_preview_draw(void *spv, RenderResult *rr, volatile struct rcti *rect)
@@ -850,11 +883,12 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
Render *re;
Scene *sce;
float oldlens;
+ short idtype= GS(id->name);
char name[32];
int sizex;
/* get the stuff from the builtin preview dbase */
- sce= preview_prepare_scene(sp->scene, id, GS(id->name), sp); // XXX sizex
+ sce= preview_prepare_scene(sp->scene, id, idtype, sp); // XXX sizex
if(sce==NULL) return;
if(!split || first) sprintf(name, "Preview %p", sp->owner);
@@ -866,14 +900,19 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
re= RE_NewRender(name);
/* sce->r gets copied in RE_InitState! */
- if(sp->pr_method==PR_DO_RENDER) {
- sce->r.scemode |= R_NODE_PREVIEW;
- sce->r.scemode &= ~R_NO_IMAGE_LOAD;
+ sce->r.scemode &= ~(R_MATNODE_PREVIEW|R_TEXNODE_PREVIEW);
+ sce->r.scemode &= ~R_NO_IMAGE_LOAD;
+
+ if(sp->pr_method==PR_ICON_RENDER) {
+ sce->r.scemode |= R_NO_IMAGE_LOAD;
+ }
+ else if(sp->pr_method==PR_NODE_RENDER) {
+ if(idtype == ID_MA) sce->r.scemode |= R_MATNODE_PREVIEW;
+ else if(idtype == ID_TE) sce->r.scemode |= R_TEXNODE_PREVIEW;
sce->r.mode |= R_OSA;
}
- else { /* PR_ICON_RENDER */
- sce->r.scemode &= ~R_NODE_PREVIEW;
- sce->r.scemode |= R_NO_IMAGE_LOAD;
+ else { /* PR_BUTS_RENDER */
+ sce->r.mode |= R_OSA;
}
/* in case of split preview, use border render */
@@ -887,7 +926,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
RE_InitState(re, NULL, &sce->r, sizex, sp->sizey, NULL);
/* callbacs are cleared on GetRender() */
- if(sp->pr_method==PR_DO_RENDER) {
+ if(sp->pr_method==PR_BUTS_RENDER) {
RE_display_draw_cb(re, sp, shader_preview_draw);
RE_test_break_cb(re, sp, shader_preview_break);
}
@@ -907,7 +946,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
/* handle results */
if(sp->pr_method==PR_ICON_RENDER) {
if(sp->pr_rect)
- RE_ResultGet32(re, (unsigned int *)sp->pr_rect);
+ RE_ResultGet32(re, sp->pr_rect);
}
else {
/* validate owner */
@@ -920,7 +959,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
preview_prepare_scene(sp->scene, NULL, GS(id->name), NULL);
}
-/* runs inside thread for material, in foreground for icons */
+/* runs inside thread for material and icons */
static void shader_preview_startjob(void *customdata, short *stop, short *do_update)
{
ShaderPreview *sp= customdata;
@@ -945,63 +984,180 @@ static void shader_preview_free(void *customdata)
MEM_freeN(sp);
}
-void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, MTex *slot, int sizex, int sizey)
+/* ************************* icon preview ********************** */
+
+static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned int *rect)
{
- wmJob *steve;
- ShaderPreview *sp;
+ struct ImBuf *ima;
+ unsigned int *drect, *srect;
+ float scaledx, scaledy;
+ short ex, ey, dx, dy;
- /* XXX ugly global still, but we can't do preview while rendering */
- if(G.rendering)
+ /* paranoia test */
+ if(ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL))
+ return;
+
+ /* waste of cpu cyles... but the imbuf API has no other way to scale fast (ton) */
+ ima = IMB_dupImBuf(ibuf);
+
+ if (!ima)
return;
- if(GS(id->name) == ID_TE) {
- ntreeTexSetPreviewFlag(1);
+ if (ima->x > ima->y) {
+ scaledx = (float)w;
+ scaledy = ( (float)ima->y/(float)ima->x )*(float)w;
}
+ else {
+ scaledx = ( (float)ima->x/(float)ima->y )*(float)h;
+ scaledy = (float)h;
+ }
+
+ ex = (short)scaledx;
+ ey = (short)scaledy;
+
+ dx = (w - ex) / 2;
+ dy = (h - ey) / 2;
- steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner);
+ IMB_scalefastImBuf(ima, ex, ey);
+
+ /* if needed, convert to 32 bits */
+ if(ima->rect==NULL)
+ IMB_rect_from_float(ima);
+
+ srect = ima->rect;
+ drect = rect;
+
+ drect+= dy*w+dx;
+ for (;ey > 0; ey--){
+ memcpy(drect,srect, ex * sizeof(int));
+ drect += w;
+ srect += ima->x;
+ }
+
+ IMB_freeImBuf(ima);
+}
+
+static void set_alpha(char *cp, int sizex, int sizey, char alpha)
+{
+ int a, size= sizex*sizey;
+
+ for(a=0; a<size; a++, cp+=4)
+ cp[3]= alpha;
+}
+
+static void icon_preview_startjob(void *customdata, short *stop, short *do_update)
+{
+ ShaderPreview *sp= customdata;
+ ID *id= sp->id;
+ short idtype= GS(id->name);
+
+ if(idtype == ID_IM) {
+ Image *ima= (Image*)id;
+ ImBuf *ibuf= NULL;
+ ImageUser iuser;
+
+ /* ima->ok is zero when Image cannot load */
+ if(ima==NULL || ima->ok==0)
+ return;
+
+ /* setup dummy image user */
+ memset(&iuser, 0, sizeof(ImageUser));
+ iuser.ok= iuser.framenr= 1;
+ iuser.scene= sp->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(ima, &iuser);
+ if(ibuf==NULL || ibuf->rect==NULL)
+ return;
+
+ icon_copy_rect(ibuf, sp->sizex, sp->sizey, sp->pr_rect);
+
+ *do_update= 1;
+ }
+ else {
+ /* re-use shader job */
+ shader_preview_startjob(customdata, stop, do_update);
+
+ /* world is rendered with alpha=0, so it wasn't displayed
+ this could be render option for sky to, for later */
+ if(idtype == ID_WO) {
+ set_alpha((char*)sp->pr_rect, sp->sizex, sp->sizey, 255);
+ }
+ else if(idtype == ID_MA) {
+ Material* ma = (Material*)id;
+
+ if(ma->material_type == MA_TYPE_HALO)
+ set_alpha((char*)sp->pr_rect, sp->sizex, sp->sizey, 255);
+ }
+ }
+}
+
+/* use same function for icon & shader, so the job manager
+ does not run two of them at the same time. */
+
+static void common_preview_startjob(void *customdata, short *stop, short *do_update)
+{
+ ShaderPreview *sp= customdata;
+
+ if(sp->pr_method == PR_ICON_RENDER)
+ icon_preview_startjob(customdata, stop, do_update);
+ else
+ shader_preview_startjob(customdata, stop, do_update);
+}
+
+/* exported functions */
+
+void ED_preview_icon_job(const bContext *C, void *owner, ID *id, unsigned int *rect, int sizex, int sizey)
+{
+ wmJob *steve;
+ ShaderPreview *sp;
+
+ steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner, WM_JOB_EXCL_RENDER);
sp= MEM_callocN(sizeof(ShaderPreview), "shader preview");
/* customdata for preview thread */
sp->scene= CTX_data_scene(C);
- sp->owner= owner;
+ sp->owner= id;
sp->sizex= sizex;
sp->sizey= sizey;
- sp->pr_method= PR_DO_RENDER;
+ sp->pr_method= PR_ICON_RENDER;
+ sp->pr_rect= rect;
sp->id = id;
- sp->parent= parent;
- sp->slot= slot;
/* setup job */
WM_jobs_customdata(steve, sp, shader_preview_free);
WM_jobs_timer(steve, 0.1, NC_MATERIAL, NC_MATERIAL);
- WM_jobs_callbacks(steve, shader_preview_startjob, NULL, shader_preview_updatejob);
+ WM_jobs_callbacks(steve, common_preview_startjob, NULL, NULL);
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, unsigned int *rect, int sizex, int sizey)
+void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, MTex *slot, int sizex, int sizey, int method)
{
+ wmJob *steve;
ShaderPreview *sp;
- short stop=0, do_update=0;
- sp= MEM_callocN(sizeof(ShaderPreview), "ShaderPreview");
-
+ steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner, WM_JOB_EXCL_RENDER);
+ sp= MEM_callocN(sizeof(ShaderPreview), "shader preview");
+
/* customdata for preview thread */
- sp->scene= scene;
+ sp->scene= CTX_data_scene(C);
+ sp->owner= owner;
sp->sizex= sizex;
sp->sizey= sizey;
- sp->pr_method= PR_ICON_RENDER;
- sp->pr_rect= (int *)rect; /* shouldnt pr_rect be unsigned int also? - Campbell */
+ sp->pr_method= method;
sp->id = id;
-
- shader_preview_startjob(sp, &stop, &do_update);
+ sp->parent= parent;
+ sp->slot= slot;
- MEM_freeN(sp);
+ /* setup job */
+ WM_jobs_customdata(steve, sp, shader_preview_free);
+ WM_jobs_timer(steve, 0.1, NC_MATERIAL, NC_MATERIAL);
+ WM_jobs_callbacks(steve, common_preview_startjob, NULL, shader_preview_updatejob);
+
+ WM_jobs_start(CTX_wm_manager(C), steve);
}
-
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
new file mode 100644
index 00000000000..e03a118e86e
--- /dev/null
+++ b/source/blender/editors/render/render_shading.c
@@ -0,0 +1,762 @@
+/**
+ * $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.
+ *
+ * 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 <string.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_curve_types.h"
+#include "DNA_lamp_types.h"
+#include "DNA_material_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_node_types.h"
+#include "DNA_object_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_icons.h"
+#include "BKE_library.h"
+#include "BKE_main.h"
+#include "BKE_material.h"
+#include "BKE_node.h"
+#include "BKE_scene.h"
+#include "BKE_texture.h"
+#include "BKE_utildefines.h"
+#include "BKE_world.h"
+#include "BKE_tessmesh.h"
+
+#include "BLI_arithb.h"
+#include "BLI_editVert.h"
+#include "BLI_listbase.h"
+
+#include "GPU_material.h"
+
+#include "RNA_access.h"
+#include "RNA_enum_types.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "ED_curve.h"
+#include "ED_mesh.h"
+#include "ED_render.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+
+#include "render_intern.h" // own include
+
+/***************************** Updates ***********************************
+ * ED_render_id_flush_update gets called from DAG_id_flush_update, to do *
+ * editor level updates when the ID changes. when these ID blocks are in *
+ * the dependency graph, we can get rid of the manual dependency checks */
+
+static int mtex_use_tex(MTex **mtex, int tot, Tex *tex)
+{
+ int a;
+
+ if(!mtex)
+ return 0;
+
+ for(a=0; a<tot; a++)
+ if(mtex[a] && mtex[a]->tex == tex)
+ return 1;
+
+ return 0;
+}
+
+static int nodes_use_tex(bNodeTree *ntree, Tex *tex)
+{
+ bNode *node;
+
+ for(node=ntree->nodes.first; node; node= node->next) {
+ if(node->id) {
+ if(node->id == (ID*)tex) {
+ return 1;
+ }
+ else if(node->type==NODE_GROUP) {
+ if(nodes_use_tex((bNodeTree *)node->id, tex))
+ return 1;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static void material_changed(Main *bmain, Material *ma)
+{
+ /* icons */
+ BKE_icon_changed(BKE_icon_getid(&ma->id));
+
+ /* glsl */
+ if(ma->gpumaterial.first)
+ GPU_material_free(ma);
+}
+
+static void texture_changed(Main *bmain, Tex *tex)
+{
+ Material *ma;
+ Lamp *la;
+ World *wo;
+
+ /* icons */
+ BKE_icon_changed(BKE_icon_getid(&tex->id));
+
+ /* find materials */
+ for(ma=bmain->mat.first; ma; ma=ma->id.next) {
+ if(mtex_use_tex(ma->mtex, MAX_MTEX, tex));
+ else if(ma->use_nodes && ma->nodetree && nodes_use_tex(ma->nodetree, tex));
+ else continue;
+
+ BKE_icon_changed(BKE_icon_getid(&ma->id));
+
+ if(ma->gpumaterial.first)
+ GPU_material_free(ma);
+ }
+
+ /* find lamps */
+ for(la=bmain->lamp.first; la; la=la->id.next) {
+ if(mtex_use_tex(la->mtex, MAX_MTEX, tex));
+ else continue;
+
+ BKE_icon_changed(BKE_icon_getid(&la->id));
+ }
+
+ /* find worlds */
+ for(wo=bmain->world.first; wo; wo=wo->id.next) {
+ if(mtex_use_tex(wo->mtex, MAX_MTEX, tex));
+ else continue;
+
+ BKE_icon_changed(BKE_icon_getid(&wo->id));
+ }
+}
+
+static void lamp_changed(Main *bmain, Lamp *la)
+{
+ Object *ob;
+ Material *ma;
+
+ /* icons */
+ BKE_icon_changed(BKE_icon_getid(&la->id));
+
+ /* glsl */
+ for(ob=bmain->object.first; ob; ob=ob->id.next)
+ if(ob->data == la && ob->gpulamp.first)
+ GPU_lamp_free(ob);
+
+ for(ma=bmain->mat.first; ma; ma=ma->id.next)
+ if(ma->gpumaterial.first)
+ GPU_material_free(ma);
+}
+
+static void world_changed(Main *bmain, World *wo)
+{
+ Material *ma;
+
+ /* icons */
+ BKE_icon_changed(BKE_icon_getid(&wo->id));
+
+ /* glsl */
+ for(ma=bmain->mat.first; ma; ma=ma->id.next)
+ if(ma->gpumaterial.first)
+ GPU_material_free(ma);
+}
+
+void ED_render_id_flush_update(Main *bmain, ID *id)
+{
+ switch(GS(id->name)) {
+ case ID_MA:
+ material_changed(bmain, (Material*)id);
+ break;
+ case ID_TE:
+ texture_changed(bmain, (Tex*)id);
+ break;
+ case ID_WO:
+ world_changed(bmain, (World*)id);
+ break;
+ case ID_LA:
+ lamp_changed(bmain, (Lamp*)id);
+ break;
+ default:
+ break;
+ }
+}
+
+/********************** 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";
+ ot->description="Add a new material slot or duplicate the selected one.";
+
+ /* 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";
+ ot->description="Remove the selected material slot.";
+
+ /* 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)
+{
+ 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_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_material_slot_assign(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Assign Material Slot";
+ ot->idname= "OBJECT_OT_material_slot_assign";
+ ot->description="Assign the material in the selected material slot to the selected vertices.";
+
+ /* 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) {
+ BMEditMesh *em= ((Mesh*)ob->data)->edit_btmesh;
+/*BMESH_TODO
+ if(em) {
+ if(select)
+ EM_select_by_material(em, ob->actcol-1);
+ else
+ EM_deselect_by_material(em, ob->actcol-1);
+ }
+*/
+ }
+ 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_GEOM|ND_SELECT, ob->data);
+
+ 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";
+ ot->description="Select vertices assigned to the selected material slot.";
+
+ /* 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";
+ ot->description="Deselect vertices assigned to the selected material slot.";
+
+ /* api callbacks */
+ ot->exec= material_slot_deselect_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+
+static int material_slot_copy_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Material ***matar;
+
+ if(!ob || !(matar= give_matarar(ob)))
+ return OPERATOR_CANCELLED;
+
+ CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ if(ob != ob_iter && give_matarar(ob_iter)) {
+ assign_matarar(ob_iter, matar, ob->totcol);
+ if(ob_iter->totcol==ob->totcol) {
+ ob_iter->actcol= ob->actcol;
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob_iter);
+ }
+ }
+ }
+ CTX_DATA_END;
+
+ return OPERATOR_FINISHED;
+}
+
+
+void OBJECT_OT_material_slot_copy(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Copy Material to Others";
+ ot->idname= "OBJECT_OT_material_slot_copy";
+ ot->description="Copies materials to other selected objects.";
+
+ /* api callbacks */
+ ot->exec= material_slot_copy_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/********************** new material operator *********************/
+
+static int new_material_exec(bContext *C, wmOperator *op)
+{
+ Material *ma= CTX_data_pointer_get_type(C, "material", &RNA_Material).data;
+ PointerRNA ptr, idptr;
+ PropertyRNA *prop;
+
+ /* add or copy material */
+ if(ma)
+ ma= copy_material(ma);
+ else
+ ma= add_material("Material");
+
+ /* hook into UI */
+ uiIDContextProperty(C, &ptr, &prop);
+
+ if(prop) {
+ /* when creating new ID blocks, use is already 1, but RNA
+ * pointer se also increases user, so this compensates it */
+ ma->id.us--;
+
+ RNA_id_pointer_create(&ma->id, &idptr);
+ RNA_property_pointer_set(&ptr, prop, idptr);
+ RNA_property_update(C, &ptr, prop);
+ }
+
+ WM_event_add_notifier(C, NC_MATERIAL|NA_ADDED, ma);
+
+ return OPERATOR_FINISHED;
+}
+
+void MATERIAL_OT_new(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "New Material";
+ ot->idname= "MATERIAL_OT_new";
+ ot->description="Add a new material.";
+
+ /* api callbacks */
+ ot->exec= new_material_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/********************** new texture operator *********************/
+
+static int new_texture_exec(bContext *C, wmOperator *op)
+{
+ Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data;
+ PointerRNA ptr, idptr;
+ PropertyRNA *prop;
+
+ /* add or copy texture */
+ if(tex)
+ tex= copy_texture(tex);
+ else
+ tex= add_texture("Texture");
+
+ /* hook into UI */
+ uiIDContextProperty(C, &ptr, &prop);
+
+ if(prop) {
+ /* when creating new ID blocks, use is already 1, but RNA
+ * pointer se also increases user, so this compensates it */
+ tex->id.us--;
+
+ RNA_id_pointer_create(&tex->id, &idptr);
+ RNA_property_pointer_set(&ptr, prop, idptr);
+ RNA_property_update(C, &ptr, prop);
+ }
+
+ WM_event_add_notifier(C, NC_TEXTURE|NA_ADDED, tex);
+
+ return OPERATOR_FINISHED;
+}
+
+void TEXTURE_OT_new(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "New Texture";
+ ot->idname= "TEXTURE_OT_new";
+ ot->description="Add a new texture.";
+
+ /* api callbacks */
+ ot->exec= new_texture_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/********************** new world operator *********************/
+
+static int new_world_exec(bContext *C, wmOperator *op)
+{
+ World *wo= CTX_data_pointer_get_type(C, "world", &RNA_World).data;
+ PointerRNA ptr, idptr;
+ PropertyRNA *prop;
+
+ /* add or copy world */
+ if(wo)
+ wo= copy_world(wo);
+ else
+ wo= add_world("World");
+
+ /* hook into UI */
+ uiIDContextProperty(C, &ptr, &prop);
+
+ if(prop) {
+ /* when creating new ID blocks, use is already 1, but RNA
+ * pointer se also increases user, so this compensates it */
+ wo->id.us--;
+
+ RNA_id_pointer_create(&wo->id, &idptr);
+ RNA_property_pointer_set(&ptr, prop, idptr);
+ RNA_property_update(C, &ptr, prop);
+ }
+
+ WM_event_add_notifier(C, NC_WORLD|NA_ADDED, wo);
+
+ return OPERATOR_FINISHED;
+}
+
+void WORLD_OT_new(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "New World";
+ ot->idname= "WORLD_OT_new";
+ ot->description= "Add a new world.";
+
+ /* api callbacks */
+ ot->exec= new_world_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";
+ ot->description="Add a render layer.";
+
+ /* 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";
+ ot->description="Remove the selected render layer.";
+
+ /* api callbacks */
+ ot->exec= render_layer_remove_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int texture_slot_move(bContext *C, wmOperator *op)
+{
+ ID *id= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data;
+
+ if(id) {
+ MTex **mtex_ar, *mtexswap;
+ short act;
+ int type= RNA_enum_get(op->ptr, "type");
+
+ give_active_mtex(id, &mtex_ar, &act);
+
+ if(type == -1) { /* Up */
+ if(act > 0) {
+ mtexswap = mtex_ar[act];
+ mtex_ar[act] = mtex_ar[act-1];
+ mtex_ar[act-1] = mtexswap;
+
+ if(GS(id->name)==ID_MA) {
+ Material *ma= (Material *)id;
+ int mtexuse = ma->septex & (1<<act);
+ ma->septex &= ~(1<<act);
+ ma->septex |= (ma->septex & (1<<(act-1))) << 1;
+ ma->septex &= ~(1<<(act-1));
+ ma->septex |= mtexuse >> 1;
+ }
+
+ set_active_mtex(id, act-1);
+ }
+ }
+ else { /* Down */
+ if(act < MAX_MTEX-1) {
+ mtexswap = mtex_ar[act];
+ mtex_ar[act] = mtex_ar[act+1];
+ mtex_ar[act+1] = mtexswap;
+
+ if(GS(id->name)==ID_MA) {
+ Material *ma= (Material *)id;
+ int mtexuse = ma->septex & (1<<act);
+ ma->septex &= ~(1<<act);
+ ma->septex |= (ma->septex & (1<<(act+1))) >> 1;
+ ma->septex &= ~(1<<(act+1));
+ ma->septex |= mtexuse << 1;
+ }
+
+ set_active_mtex(id, act+1);
+ }
+ }
+
+ WM_event_add_notifier(C, NC_TEXTURE, CTX_data_scene(C));
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void TEXTURE_OT_slot_move(wmOperatorType *ot)
+{
+ static EnumPropertyItem slot_move[] = {
+ {-1, "UP", 0, "Up", ""},
+ {1, "DOWN", 0, "Down", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ /* identifiers */
+ ot->name= "Move Texture Slot";
+ ot->idname= "TEXTURE_OT_slot_move";
+ ot->description="Move texture slots up and down.";
+
+ /* api callbacks */
+ ot->exec= texture_slot_move;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", slot_move, 0, "Type", "");
+}
diff --git a/source/blender/editors/screen/SConscript b/source/blender/editors/screen/SConscript
index 00a5f08b70d..97ce70ad71d 100644
--- a/source/blender/editors/screen/SConscript
+++ b/source/blender/editors/screen/SConscript
@@ -15,4 +15,11 @@ if not env['WITH_BF_PYTHON']:
if env['WITH_BF_OPENEXR']:
defs += ' WITH_OPENEXR'
+if env['OURPLATFORM'] == 'linux2':
+ cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( 'bf_editors_screen', sources, Split(incs), Split(defs), libtype=['core'], priority=[105] )
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 8940f560677..428f17886ec 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -193,7 +193,7 @@ static void area_draw_azone(short x1, short y1, short x2, short y2)
static void region_draw_azone(ScrArea *sa, AZone *az)
{
- GLUquadricObj *qobj = gluNewQuadric();
+ GLUquadricObj *qobj = NULL;
short midx = az->x1 + (az->x2 - az->x1)/2;
short midy = az->y1 + (az->y2 - az->y1)/2;
@@ -202,6 +202,8 @@ static void region_draw_azone(ScrArea *sa, AZone *az)
/* only display action zone icons when the region is hidden */
if (!(az->ar->flag & RGN_FLAG_HIDDEN)) return;
+ qobj = gluNewQuadric();
+
glPushMatrix();
glTranslatef(midx, midy, 0.);
@@ -824,24 +826,24 @@ static void ed_default_handlers(wmWindowManager *wm, ListBase *handlers, int fla
UI_add_region_handlers(handlers);
}
if(flag & ED_KEYMAP_VIEW2D) {
- ListBase *keymap= WM_keymap_listbase(wm, "View2D", 0, 0);
+ wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "View2D", 0, 0);
WM_event_add_keymap_handler(handlers, keymap);
}
if(flag & ED_KEYMAP_MARKERS) {
- ListBase *keymap= WM_keymap_listbase(wm, "Markers", 0, 0);
+ wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Markers", 0, 0);
WM_event_add_keymap_handler(handlers, keymap);
// XXX need boundbox check urgently!!!
}
if(flag & ED_KEYMAP_ANIMATION) {
- ListBase *keymap= WM_keymap_listbase(wm, "Animation", 0, 0);
+ wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Animation", 0, 0);
WM_event_add_keymap_handler(handlers, keymap);
}
if(flag & ED_KEYMAP_FRAMES) {
- ListBase *keymap= WM_keymap_listbase(wm, "Frames", 0, 0);
+ wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Frames", 0, 0);
WM_event_add_keymap_handler(handlers, keymap);
}
if(flag & ED_KEYMAP_GPENCIL) {
- ListBase *keymap= WM_keymap_listbase(wm, "Grease Pencil", 0, 0);
+ wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Grease Pencil", 0, 0);
WM_event_add_keymap_handler(handlers, keymap);
}
}
@@ -958,17 +960,22 @@ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
/* Note; SPACE_EMPTY is possible on new screens */
/* regions */
- if(swap_space<2) {
- st= BKE_spacetype_from_id(sa1->spacetype);
- for(ar= sa1->regionbase.first; ar; ar= ar->next)
- BKE_area_region_free(st, ar);
- BLI_freelistN(&sa1->regionbase);
+ if(swap_space == 1) {
+ SWAP(ListBase, sa1->regionbase, sa2->regionbase);
}
-
- st= BKE_spacetype_from_id(sa2->spacetype);
- for(ar= sa2->regionbase.first; ar; ar= ar->next) {
- ARegion *newar= BKE_area_region_copy(st, ar);
- BLI_addtail(&sa1->regionbase, newar);
+ else {
+ if(swap_space<2) {
+ st= BKE_spacetype_from_id(sa1->spacetype);
+ for(ar= sa1->regionbase.first; ar; ar= ar->next)
+ BKE_area_region_free(st, ar);
+ BLI_freelistN(&sa1->regionbase);
+ }
+
+ st= BKE_spacetype_from_id(sa2->spacetype);
+ for(ar= sa2->regionbase.first; ar; ar= ar->next) {
+ ARegion *newar= BKE_area_region_copy(st, ar);
+ BLI_addtail(&sa1->regionbase, newar);
+ }
}
}
@@ -1254,7 +1261,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
pt->draw_header(C, panel);
- uiBlockLayoutResolve(C, block, &xco, &yco);
+ uiBlockLayoutResolve(block, &xco, &yco);
panel->labelofs= xco - triangle;
panel->layout= NULL;
}
@@ -1265,7 +1272,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
pt->draw(C, panel);
- uiBlockLayoutResolve(C, block, &xco, &yco);
+ uiBlockLayoutResolve(block, &xco, &yco);
panel->layout= NULL;
yco -= 2*style->panelspace;
@@ -1353,7 +1360,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
void ED_region_panels_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
// XXX quick hacks for files saved with 2.5 already (i.e. the builtin defaults file)
// scrollbars for button regions
@@ -1366,7 +1373,7 @@ void ED_region_panels_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_PANELS_UI, ar->winx, ar->winy);
- keymap= WM_keymap_listbase(wm, "View2D Buttons List", 0, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "View2D Buttons List", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -1411,7 +1418,7 @@ void ED_region_header(const bContext *C, ARegion *ar)
maxco= xco;
}
- uiBlockLayoutResolve(C, block, &xco, &yco);
+ uiBlockLayoutResolve(block, &xco, &yco);
/* for view2d */
if(xco > maxco)
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 5312ca26906..1445c6b5cf8 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -720,6 +720,18 @@ void bglBegin(int mode)
}
}
+int bglPointHack() {
+ float value[4];
+ int pointhack;
+ glGetFloatv(GL_POINT_SIZE_RANGE, value);
+ if(value[1]<2.0) {
+ glGetFloatv(GL_POINT_SIZE, value);
+ pointhack= floor(value[0]+0.5);
+ if(pointhack>4) pointhack= 4;
+ return pointhack;
+ }
+ return 0;
+}
void bglVertex3fv(float *vec)
{
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index 17c51a7b7d3..e573ef06247 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -52,7 +52,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
if(CTX_data_dir(member)) {
static const char *dir[] = {
"scene", "selected_objects", "selected_bases",
- "selected_editable_objects", "selected_editable_bases"
+ "selected_editable_objects", "selected_editable_bases",
"active_base", "active_object", "edit_object",
"sculpt_object", "vertex_paint_object", "weight_paint_object",
"texture_paint_object", "brush", "particle_edit_object", NULL};
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 5d938ba36cc..2cc5500c3ef 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1140,7 +1140,7 @@ static void screen_cursor_set(wmWindow *win, wmEvent *event)
if(az->type==AZONE_AREA)
WM_cursor_set(win, CURSOR_EDIT);
else if(az->type==AZONE_REGION) {
- if(az->x1==az->x2)
+ if(az->edge == 'l' || az->edge == 'r')
WM_cursor_set(win, CURSOR_X_MOVE);
else
WM_cursor_set(win, CURSOR_Y_MOVE);
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 5a0e218cc49..fe29b574cf0 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -448,7 +448,7 @@ static int actionzone_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
else {
/* add modal handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -504,6 +504,7 @@ static void SCREEN_OT_actionzone(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Handle area action zones";
+ ot->description= "Handle area action zones for mouse actions/gestures.";
ot->idname= "SCREEN_OT_actionzone";
ot->invoke= actionzone_invoke;
@@ -580,7 +581,7 @@ static int area_swap_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* add modal handler */
WM_cursor_modal(CTX_wm_window(C), BC_SWAPAREA_CURSOR);
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
@@ -596,7 +597,7 @@ static int area_swap_modal(bContext *C, wmOperator *op, wmEvent *event)
sad->sa2= screen_areahascursor(CTX_wm_screen(C), event->x, event->y);
break;
case LEFTMOUSE: /* release LMB */
- if(event->val==0) {
+ if(event->val==KM_RELEASE) {
if(!sad->sa2 || sad->sa1 == sad->sa2) {
return area_swap_cancel(C, op);
@@ -620,6 +621,7 @@ static int area_swap_modal(bContext *C, wmOperator *op, wmEvent *event)
static void SCREEN_OT_area_swap(wmOperatorType *ot)
{
ot->name= "Swap areas";
+ ot->description= "Swap selected areas screen positions.";
ot->idname= "SCREEN_OT_area_swap";
ot->invoke= area_swap_invoke;
@@ -684,6 +686,7 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event)
static void SCREEN_OT_area_dupli(wmOperatorType *ot)
{
ot->name= "Duplicate Area into New Window";
+ ot->description= "Duplicate selected area into new window.";
ot->idname= "SCREEN_OT_area_dupli";
ot->invoke= area_dupli_invoke;
@@ -862,7 +865,7 @@ static int area_move_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_PASS_THROUGH;
/* add temp handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -923,6 +926,7 @@ static void SCREEN_OT_area_move(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Move area edges";
+ ot->description= "Move selected area edges.";
ot->idname= "SCREEN_OT_area_move";
ot->exec= area_move_exec;
@@ -1152,7 +1156,7 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event)
area_move_set_limits(CTX_wm_screen(C), dir, &sd->bigger, &sd->smaller);
/* add temp handler for edge move or cancel */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -1217,7 +1221,7 @@ static int area_split_modal(bContext *C, wmOperator *op, wmEvent *event)
break;
case LEFTMOUSE:
- if(event->val==0) { /* mouse up */
+ if(event->val==KM_RELEASE) { /* mouse up */
area_split_exit(C, op);
return OPERATOR_FINISHED;
}
@@ -1238,6 +1242,7 @@ static EnumPropertyItem prop_direction_items[] = {
static void SCREEN_OT_area_split(wmOperatorType *ot)
{
ot->name = "Split area";
+ ot->description= "Split selected area into new windows.";
ot->idname = "SCREEN_OT_area_split";
ot->exec= area_split_exec;
@@ -1288,7 +1293,7 @@ static int region_scale_invoke(bContext *C, wmOperator *op, wmEvent *event)
rmd->origval= rmd->ar->type->minsizey;
/* add temp handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -1337,12 +1342,14 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
break;
case LEFTMOUSE:
- if(event->val==0) {
+ if(event->val==KM_RELEASE) {
if(ABS(event->x - rmd->origx) < 2 && ABS(event->y - rmd->origy) < 2) {
- ED_region_toggle_hidden(C, rmd->ar);
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
- }
+ if(rmd->ar->flag & RGN_FLAG_HIDDEN) {
+ ED_region_toggle_hidden(C, rmd->ar);
+ WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
+ }
+ }
MEM_freeN(op->customdata);
op->customdata = NULL;
@@ -1362,6 +1369,7 @@ static void SCREEN_OT_region_scale(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scale Region Size";
+ ot->description= "Scale selected area.";
ot->idname= "SCREEN_OT_region_scale";
ot->invoke= region_scale_invoke;
@@ -1422,6 +1430,7 @@ static int frame_jump_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_frame_jump(wmOperatorType *ot)
{
ot->name = "Jump to Endpoint";
+ ot->description= "Jump to first/last frame in frame range.";
ot->idname = "SCREEN_OT_frame_jump";
ot->exec= frame_jump_exec;
@@ -1436,29 +1445,6 @@ static void SCREEN_OT_frame_jump(wmOperatorType *ot)
/* ************** jump to keyframe operator ***************************** */
-/* helper function - find actkeycolumn that occurs on cframe, or the nearest one if not found */
-// TODO: make this an API func?
-static ActKeyColumn *cfra_find_nearest_next_ak (ActKeyColumn *ak, float cframe, short next)
-{
- ActKeyColumn *akn= NULL;
-
- /* sanity checks */
- if (ak == NULL)
- return NULL;
-
- /* check if this is a match, or whether it is in some subtree */
- if (cframe < ak->cfra)
- akn= cfra_find_nearest_next_ak(ak->left, cframe, next);
- else if (cframe > ak->cfra)
- akn= cfra_find_nearest_next_ak(ak->right, cframe, next);
-
- /* if no match found (or found match), just use the current one */
- if (akn == NULL)
- return ak;
- else
- return akn;
-}
-
/* function to be called outside UI context, or for redo */
static int keyframe_jump_exec(bContext *C, wmOperator *op)
{
@@ -1510,6 +1496,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_keyframe_jump(wmOperatorType *ot)
{
ot->name = "Jump to Keyframe";
+ ot->description= "Jump to previous/next keyframe.";
ot->idname = "SCREEN_OT_keyframe_jump";
ot->exec= keyframe_jump_exec;
@@ -1566,6 +1553,7 @@ static int screen_set_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_screen_set(wmOperatorType *ot)
{
ot->name = "Set Screen";
+ ot->description= "Cycle through available screens.";
ot->idname = "SCREEN_OT_screen_set";
ot->exec= screen_set_exec;
@@ -1587,7 +1575,8 @@ static int screen_full_area_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_screen_full_area(wmOperatorType *ot)
{
- ot->name = "Toggle Make Area Fullscreen";
+ ot->name = "Toggle Full Screen";
+ ot->description= "Toggle display selected area as fullscreen.";
ot->idname = "SCREEN_OT_screen_full_area";
ot->exec= screen_full_area_exec;
@@ -1741,7 +1730,7 @@ static int area_join_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_PASS_THROUGH;
/* add temp handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -1841,7 +1830,7 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event)
}
break;
case LEFTMOUSE:
- if(event->val==0) {
+ if(event->val==KM_RELEASE) {
area_join_apply(C, op);
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
area_join_exit(C, op);
@@ -1861,6 +1850,7 @@ static void SCREEN_OT_area_join(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Join area";
+ ot->description= "Join selected areas into new window.";
ot->idname= "SCREEN_OT_area_join";
/* api callbacks */
@@ -1894,6 +1884,7 @@ static void SCREEN_OT_repeat_last(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Repeat Last";
+ ot->description= "Repeat last action.";
ot->idname= "SCREEN_OT_repeat_last";
/* api callbacks */
@@ -1946,6 +1937,7 @@ static void SCREEN_OT_repeat_history(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Repeat History";
+ ot->description= "Display menu for previous actions performed.";
ot->idname= "SCREEN_OT_repeat_history";
/* api callbacks */
@@ -1979,6 +1971,7 @@ static void SCREEN_OT_redo_last(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Redo Last";
+ ot->description= "Display menu for last action performed.";
ot->idname= "SCREEN_OT_redo_last";
/* api callbacks */
@@ -2022,6 +2015,7 @@ static void SCREEN_OT_region_split(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Split Region";
+ ot->description= "Split area by directional position.";
ot->idname= "SCREEN_OT_region_split";
/* api callbacks */
@@ -2110,7 +2104,8 @@ static int region_foursplit_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_region_foursplit(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Split Region in 4 Parts";
+ ot->name= "Toggle Quad View";
+ ot->description= "Split selected area into camera, front, right & top views.";
ot->idname= "SCREEN_OT_region_foursplit";
/* api callbacks */
@@ -2189,6 +2184,10 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws)
if(redraws & (TIME_SEQ|TIME_ALL_ANIM_WIN))
return 1;
break;
+ case SPACE_NODE:
+ if(redraws & (TIME_NODES))
+ return 1;
+ break;
case SPACE_IMAGE:
if(redraws & TIME_ALL_IMAGE_WIN)
return 1;
@@ -2221,7 +2220,7 @@ static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event)
/* sync, don't sync, or follow scene setting */
if(sad->flag & ANIMPLAY_FLAG_SYNC) sync= 1;
else if(sad->flag & ANIMPLAY_FLAG_NO_SYNC) sync= 0;
- else sync= (scene->r.audio.flag & AUDIO_SYNC);
+ else sync= (scene->audio.flag & AUDIO_SYNC);
if(sync) {
/* skip frames */
@@ -2301,6 +2300,7 @@ static void SCREEN_OT_animation_step(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Animation Step";
+ ot->description= "Step through animation by position.";
ot->idname= "SCREEN_OT_animation_step";
/* api callbacks */
@@ -2339,7 +2339,14 @@ static int screen_animation_play(bContext *C, wmOperator *op, wmEvent *event)
ED_screen_animation_timer_update(C, stime->redraws);
}
else {
- ED_screen_animation_timer(C, TIME_REGION|TIME_ALL_3D_WIN, sync, mode);
+ int redraws = TIME_REGION|TIME_ALL_3D_WIN;
+
+ /* XXX - would like a better way to deal with this situation - Campbell */
+ if((sa) && (sa->spacetype == SPACE_SEQ)) {
+ redraws |= TIME_SEQ;
+ }
+
+ ED_screen_animation_timer(C, redraws, sync, mode);
if(screen->animtimer) {
wmTimer *wt= screen->animtimer;
@@ -2356,7 +2363,8 @@ static int screen_animation_play(bContext *C, wmOperator *op, wmEvent *event)
static void SCREEN_OT_animation_play(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Animation player";
+ ot->name= "Play Animation";
+ ot->description= "Play animation.";
ot->idname= "SCREEN_OT_animation_play";
/* api callbacks */
@@ -2368,6 +2376,29 @@ static void SCREEN_OT_animation_play(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "sync", 0, "Sync", "Drop frames to maintain framerate and stay in sync with audio.");
}
+static int screen_animation_cancel(bContext *C, wmOperator *op, wmEvent *event)
+{
+ bScreen *screen= CTX_wm_screen(C);
+
+ if(screen->animtimer)
+ return screen_animation_play(C, op, event);
+
+ return OPERATOR_PASS_THROUGH;
+}
+
+static void SCREEN_OT_animation_cancel(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Cancel Animation";
+ ot->description= "Cancel animation.";
+ ot->idname= "SCREEN_OT_animation_cancel";
+
+ /* api callbacks */
+ ot->invoke= screen_animation_cancel;
+
+ ot->poll= ED_operator_screenactive;
+}
+
/* ************** border select operator (template) ***************************** */
/* operator state vars used: (added by default WM callbacks)
@@ -2534,7 +2565,7 @@ static ScrArea *find_empty_image_area(bContext *C)
static void screen_set_image_output(bContext *C, int mx, int my)
{
Scene *scene= CTX_data_scene(C);
- ScrArea *sa;
+ ScrArea *sa= NULL;
SpaceImage *sima;
if(scene->r.displaymode==R_OUTPUT_WINDOW) {
@@ -2564,8 +2595,8 @@ static void screen_set_image_output(bContext *C, int mx, int my)
ED_screen_full_newspace(C, CTX_wm_area(C), SPACE_IMAGE);
sa= CTX_wm_area(C);
}
- else {
+ if(!sa) {
sa= find_area_showing_r_result(C);
if(sa==NULL)
sa= find_area_image_empty(C);
@@ -2712,18 +2743,13 @@ static void image_renderinfo_cb(void *rjv, RenderStats *rs)
}
/* called inside thread! */
-static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrect)
+static void image_buffer_rect_update(RenderJob *rj, RenderResult *rr, ImBuf *ibuf, volatile rcti *renrect)
{
- RenderJob *rj= rjv;
- ImBuf *ibuf;
float x1, y1, *rectf= NULL;
int ymin, ymax, xmin, xmax;
int rymin, rxmin;
char *rectc;
- ibuf= BKE_image_get_ibuf(rj->image, &rj->iuser);
- if(ibuf==NULL) return;
-
/* if renrect argument, we only refresh scanlines */
if(renrect) {
/* if ymax==recty, rendering of layer is ready, we should not draw, other things happen... */
@@ -2823,6 +2849,18 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec
*(rj->do_update)= 1;
}
+static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrect)
+{
+ RenderJob *rj= rjv;
+ ImBuf *ibuf;
+ void *lock;
+
+ ibuf= BKE_image_acquire_ibuf(rj->image, &rj->iuser, &lock);
+ if(ibuf)
+ image_buffer_rect_update(rj, rr, ibuf, renrect);
+ BKE_image_release_ibuf(rj->image, lock);
+}
+
static void render_startjob(void *rjv, short *stop, short *do_update)
{
RenderJob *rj= rjv;
@@ -2888,7 +2926,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
multires_force_update(CTX_data_active_object(C));
/* get editmode results */
- ED_object_exit_editmode(C, 0); /* 0 = does not exit editmode */
+ ED_object_exit_editmode(C, EM_DO_UNDO); /* 0 = does not exit editmode */
// store spare
// get view3d layer, local layer, make this nice api call to render
@@ -2906,7 +2944,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
rj->iuser.ok= 1;
/* setup job */
- steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene);
+ steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, WM_JOB_EXCL_RENDER|WM_JOB_PRIORITY);
WM_jobs_customdata(steve, rj, render_freejob);
WM_jobs_timer(steve, 0.2, NC_SCENE|ND_RENDER_RESULT, 0);
WM_jobs_callbacks(steve, render_startjob, NULL, NULL);
@@ -2936,7 +2974,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, scene);
/* add modal handler for ESC */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -2947,6 +2985,7 @@ static void SCREEN_OT_render(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Render";
+ ot->description= "Render active scene.";
ot->idname= "SCREEN_OT_render";
/* api callbacks */
@@ -2970,6 +3009,7 @@ static int render_view_cancel_exec(bContext *C, wmOperator *unused)
/* test if we have a temp screen in front */
if(CTX_wm_window(C)->screen->full==SCREENTEMP) {
wm_window_lower(CTX_wm_window(C));
+ return OPERATOR_FINISHED;
}
/* determine if render already shows */
else if(sima->flag & SI_PREVSPACE) {
@@ -2981,19 +3021,23 @@ static int render_view_cancel_exec(bContext *C, wmOperator *unused)
}
else
ED_area_prevspace(C);
+
+ return OPERATOR_FINISHED;
}
else if(sima->flag & SI_FULLWINDOW) {
sima->flag &= ~SI_FULLWINDOW;
ed_screen_fullarea(C, sa);
- }
-
- return OPERATOR_FINISHED;
+ return OPERATOR_FINISHED;
+ }
+
+ return OPERATOR_PASS_THROUGH;
}
static void SCREEN_OT_render_view_cancel(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Cancel Render View";
+ ot->description= "Cancel show render view.";
ot->idname= "SCREEN_OT_render_view_cancel";
/* api callbacks */
@@ -3039,6 +3083,7 @@ static void SCREEN_OT_render_view_show(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Show/Hide Render View";
+ ot->description= "Toggle show render view.";
ot->idname= "SCREEN_OT_render_view_show";
/* api callbacks */
@@ -3077,6 +3122,7 @@ static void SCREEN_OT_userpref_show(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Show/Hide User Preferences";
+ ot->description= "Show/hide user preferences.";
ot->idname= "SCREEN_OT_userpref_show";
/* api callbacks */
@@ -3101,6 +3147,7 @@ void SCREEN_OT_new(wmOperatorType *ot)
{
/* identifiers */
ot->name= "New Screen";
+ ot->description= "Add a new screen.";
ot->idname= "SCREEN_OT_new";
/* api callbacks */
@@ -3124,7 +3171,8 @@ static int screen_delete_exec(bContext *C, wmOperator *op)
void SCREEN_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Scene";
+ ot->name= "Delete Screen"; //was scene
+ ot->description= "Delete active screen.";
ot->idname= "SCREEN_OT_delete";
/* api callbacks */
@@ -3166,6 +3214,7 @@ void SCENE_OT_new(wmOperatorType *ot)
/* identifiers */
ot->name= "New Scene";
+ ot->description= "Add new scene by type.";
ot->idname= "SCENE_OT_new";
/* api callbacks */
@@ -3194,6 +3243,7 @@ void SCENE_OT_delete(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Delete Scene";
+ ot->description= "Delete active scene.";
ot->idname= "SCENE_OT_delete";
/* api callbacks */
@@ -3237,6 +3287,7 @@ void ED_operatortypes_screen(void)
WM_operatortype_append(SCREEN_OT_animation_step);
WM_operatortype_append(SCREEN_OT_animation_play);
+ WM_operatortype_append(SCREEN_OT_animation_cancel);
/* render */
WM_operatortype_append(SCREEN_OT_render);
@@ -3255,7 +3306,7 @@ void ED_operatortypes_screen(void)
}
-static void keymap_modal_set(wmWindowManager *wm)
+static void keymap_modal_set(wmKeyConfig *keyconf)
{
static EnumPropertyItem modal_items[] = {
{KM_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
@@ -3266,7 +3317,7 @@ static void keymap_modal_set(wmWindowManager *wm)
wmKeyMap *keymap;
/* Standard Modal keymap ------------------------------------------------ */
- keymap= WM_modalkeymap_add(wm, "Standard Modal Map", modal_items);
+ keymap= WM_modalkeymap_add(keyconf, "Standard Modal Map", modal_items);
WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, KM_MODAL_CANCEL);
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_ANY, KM_ANY, 0, KM_MODAL_APPLY);
@@ -3281,21 +3332,17 @@ static void keymap_modal_set(wmWindowManager *wm)
}
/* called in spacetypes.c */
-void ED_keymap_screen(wmWindowManager *wm)
+void ED_keymap_screen(wmKeyConfig *keyconf)
{
- ListBase *keymap;
-
- /* Screen General ------------------------------------------------ */
- keymap= WM_keymap_listbase(wm, "Screen", 0, 0);
-
+ wmKeyMap *keymap;
- /* standard timers */
- WM_keymap_add_item(keymap, "SCREEN_OT_animation_step", TIMER0, KM_ANY, KM_ANY, 0);
+ /* Screen Editing ------------------------------------------------ */
+ keymap= WM_keymap_find(keyconf, "Screen Editing", 0, 0);
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_actionzone", LEFTMOUSE, KM_PRESS, 0, 0)->ptr, "modifier", 0);
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_actionzone", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "modifier", 1);
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_actionzone", LEFTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "modifier", 2);
-
+
/* screen tools */
WM_keymap_verify_item(keymap, "SCREEN_OT_area_split", EVT_ACTIONZONE_AREA, 0, 0, 0);
WM_keymap_verify_item(keymap, "SCREEN_OT_area_join", EVT_ACTIONZONE_AREA, 0, 0, 0);
@@ -3304,6 +3351,14 @@ void ED_keymap_screen(wmWindowManager *wm)
WM_keymap_verify_item(keymap, "SCREEN_OT_region_scale", EVT_ACTIONZONE_REGION, 0, 0, 0);
/* area move after action zones */
WM_keymap_verify_item(keymap, "SCREEN_OT_area_move", LEFTMOUSE, KM_PRESS, 0, 0);
+
+
+ /* Screen General ------------------------------------------------ */
+ keymap= WM_keymap_find(keyconf, "Screen", 0, 0);
+
+ /* standard timers */
+ WM_keymap_add_item(keymap, "SCREEN_OT_animation_step", TIMER0, KM_ANY, KM_ANY, 0);
+
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_screen_set", RIGHTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "delta", 1);
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_screen_set", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "delta", -1);
@@ -3328,6 +3383,7 @@ void ED_keymap_screen(wmWindowManager *wm)
/* files */
WM_keymap_add_item(keymap, "FILE_OT_execute", RETKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "FILE_OT_execute", PADENTER, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "FILE_OT_cancel", ESCKEY, KM_PRESS, 0, 0);
/* undo */
@@ -3349,11 +3405,11 @@ void ED_keymap_screen(wmWindowManager *wm)
#ifdef __APPLE__
WM_keymap_add_item(keymap, "SCREEN_OT_userpref_show", COMMAKEY, KM_PRESS, KM_OSKEY, 0);
#endif
- WM_keymap_add_item(keymap, "SCREEN_OT_userpref_show", COMMAKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "SCREEN_OT_userpref_show", UKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
/* Anim Playback ------------------------------------------------ */
- keymap= WM_keymap_listbase(wm, "Frames", 0, 0);
+ keymap= WM_keymap_find(keyconf, "Frames", 0, 0);
/* frame offsets */
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", UPARROWKEY, KM_PRESS, 0, 0)->ptr, "delta", 10);
@@ -3372,7 +3428,8 @@ void ED_keymap_screen(wmWindowManager *wm)
WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", KKEY, KM_PRESS, 0, LKEY);
RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "reverse", 1);
+ WM_keymap_add_item(keymap, "SCREEN_OT_animation_cancel", ESCKEY, KM_PRESS, 0, 0);
- keymap_modal_set(wm);
+ keymap_modal_set(keyconf);
}
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index fb3da4a5353..81c3f4d6814 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -284,7 +284,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update)
static int screencast_exec(bContext *C, wmOperator *op)
{
bScreen *screen= CTX_wm_screen(C);
- wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), screen);
+ wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), screen, 0);
ScreenshotJob *sj= MEM_callocN(sizeof(ScreenshotJob), "screenshot job");
/* setup sj */
diff --git a/source/blender/editors/sculpt_paint/SConscript b/source/blender/editors/sculpt_paint/SConscript
index 01e1d80c24c..3d2ea89f506 100644
--- a/source/blender/editors/sculpt_paint/SConscript
+++ b/source/blender/editors/sculpt_paint/SConscript
@@ -8,4 +8,11 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../render/extern/include #/intern/guardedalloc'
incs += ' ../../gpu ../../makesrna'
+if env['OURPLATFORM'] == 'linux2':
+ cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( 'bf_editors_sculpt_paint', sources, Split(incs), [], libtype=['core'], priority=[40] )
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 72ddbeef735..6118fdb4a02 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -223,6 +223,7 @@ typedef struct ProjPaintState {
DerivedMesh *dm;
int dm_totface;
int dm_totvert;
+ int dm_release;
MVert *dm_mvert;
MFace *dm_mface;
@@ -625,19 +626,6 @@ static void BarycentricWeightsPersp2f(float pt[2], float v1[4], float v2[4], flo
w[0] = w[1] = w[2] = 1.0f/3.0f;
}
-static void VecWeightf(float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3])
-{
- p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2];
- p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2];
- p[2] = v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2];
-}
-
-static void Vec2Weightf(float p[2], const float v1[2], const float v2[2], const float v3[2], const float w[3])
-{
- p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2];
- p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2];
-}
-
static float VecZDepthOrtho(float pt[2], float v1[3], float v2[3], float v3[3], float w[3])
{
BarycentricWeights2f(pt, v1, v2, v3, w);
@@ -746,10 +734,10 @@ static int project_paint_PickColor(const ProjPaintState *ps, float pt[2], float
tf = ps->dm_mtface + face_index;
if (side == 0) {
- Vec2Weightf(uv, tf->uv[0], tf->uv[1], tf->uv[2], w);
+ Vec2Lerp3f(uv, tf->uv[0], tf->uv[1], tf->uv[2], w);
}
else { /* QUAD */
- Vec2Weightf(uv, tf->uv[0], tf->uv[2], tf->uv[3], w);
+ Vec2Lerp3f(uv, tf->uv[0], tf->uv[2], tf->uv[3], w);
}
ibuf = tf->tpage->ibufs.first; /* we must have got the imbuf before getting here */
@@ -870,8 +858,8 @@ static int project_paint_occlude_ptv_clip(
}
/* Test if we're in the clipped area, */
- if (side) VecWeightf(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w);
- else VecWeightf(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w);
+ if (side) VecLerp3f(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w);
+ else VecLerp3f(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w);
Mat4MulVecfl(ps->ob->obmat, wco);
if(!view3d_test_clipping(ps->rv3d, wco)) {
@@ -1146,19 +1134,6 @@ static int check_seam(const ProjPaintState *ps, const int orig_face, const int o
return 1;
}
-/* TODO - move to arithb.c */
-/* Converts an angle to a length that can be used for maintaining an even margin around UV's */
-static float angleToLength(float angle)
-{
- // already accounted for
- if (angle < 0.000001f) {
- return 1.0f;
- }
- else {
- return fabsf(1.0f / cosf(angle * (M_PI/180.0f)));
- }
-}
-
/* Calculate outset UV's, this is not the same as simply scaling the UVs,
* since the outset coords are a margin that keep an even distance from the original UV's,
* note that the image aspect is taken into account */
@@ -1204,15 +1179,15 @@ static void uv_image_outset(float (*orig_uv)[2], float (*outset_uv)[2], const fl
}
if (is_quad) {
- a1 = angleToLength(NormalizedVecAngle2_2D(dir4, dir1));
- a2 = angleToLength(NormalizedVecAngle2_2D(dir1, dir2));
- a3 = angleToLength(NormalizedVecAngle2_2D(dir2, dir3));
- a4 = angleToLength(NormalizedVecAngle2_2D(dir3, dir4));
+ a1 = AngleToLength(NormalizedVecAngle2_2D(dir4, dir1));
+ a2 = AngleToLength(NormalizedVecAngle2_2D(dir1, dir2));
+ a3 = AngleToLength(NormalizedVecAngle2_2D(dir2, dir3));
+ a4 = AngleToLength(NormalizedVecAngle2_2D(dir3, dir4));
}
else {
- a1 = angleToLength(NormalizedVecAngle2_2D(dir3, dir1));
- a2 = angleToLength(NormalizedVecAngle2_2D(dir1, dir2));
- a3 = angleToLength(NormalizedVecAngle2_2D(dir2, dir3));
+ a1 = AngleToLength(NormalizedVecAngle2_2D(dir3, dir1));
+ a2 = AngleToLength(NormalizedVecAngle2_2D(dir1, dir2));
+ a3 = AngleToLength(NormalizedVecAngle2_2D(dir2, dir3));
}
if (is_quad) {
@@ -1329,7 +1304,7 @@ static void screen_px_from_ortho(
float w[3])
{
BarycentricWeights2f(uv, uv1co, uv2co, uv3co, w);
- VecWeightf(pixelScreenCo, v1co, v2co, v3co, w);
+ VecLerp3f(pixelScreenCo, v1co, v2co, v3co, w);
}
/* same as screen_px_from_ortho except we need to take into account
@@ -1363,7 +1338,7 @@ static void screen_px_from_persp(
}
/* done re-weighting */
- VecWeightf(pixelScreenCo, v1co, v2co, v3co, w);
+ VecLerp3f(pixelScreenCo, v1co, v2co, v3co, w);
}
static void project_face_pixel(const MTFace *tf_other, ImBuf *ibuf_other, const float w[3], int side, unsigned char rgba_ub[4], float rgba_f[4])
@@ -1381,7 +1356,7 @@ static void project_face_pixel(const MTFace *tf_other, ImBuf *ibuf_other, const
uvCo3 = (float *)tf_other->uv[2];
}
- Vec2Weightf(uv_other, uvCo1, uvCo2, uvCo3, w);
+ Vec2Lerp3f(uv_other, uvCo1, uvCo2, uvCo3, w);
/* use */
uvco_to_wrapped_pxco(uv_other, ibuf_other->x, ibuf_other->y, &x, &y);
@@ -1916,22 +1891,22 @@ static void rect_to_uvspace_ortho(
uv[0] = bucket_bounds->xmax;
uv[1] = bucket_bounds->ymin;
BarycentricWeights2f(uv, v1coSS, v2coSS, v3coSS, w);
- Vec2Weightf(bucket_bounds_uv[flip?3:0], uv1co, uv2co, uv3co, w);
+ Vec2Lerp3f(bucket_bounds_uv[flip?3:0], uv1co, uv2co, uv3co, w);
//uv[0] = bucket_bounds->xmax; // set above
uv[1] = bucket_bounds->ymax;
BarycentricWeights2f(uv, v1coSS, v2coSS, v3coSS, w);
- Vec2Weightf(bucket_bounds_uv[flip?2:1], uv1co, uv2co, uv3co, w);
+ Vec2Lerp3f(bucket_bounds_uv[flip?2:1], uv1co, uv2co, uv3co, w);
uv[0] = bucket_bounds->xmin;
//uv[1] = bucket_bounds->ymax; // set above
BarycentricWeights2f(uv, v1coSS, v2coSS, v3coSS, w);
- Vec2Weightf(bucket_bounds_uv[flip?1:2], uv1co, uv2co, uv3co, w);
+ Vec2Lerp3f(bucket_bounds_uv[flip?1:2], uv1co, uv2co, uv3co, w);
//uv[0] = bucket_bounds->xmin; // set above
uv[1] = bucket_bounds->ymin;
BarycentricWeights2f(uv, v1coSS, v2coSS, v3coSS, w);
- Vec2Weightf(bucket_bounds_uv[flip?0:3], uv1co, uv2co, uv3co, w);
+ Vec2Lerp3f(bucket_bounds_uv[flip?0:3], uv1co, uv2co, uv3co, w);
}
/* same as above but use BarycentricWeightsPersp2f */
@@ -1950,22 +1925,22 @@ static void rect_to_uvspace_persp(
uv[0] = bucket_bounds->xmax;
uv[1] = bucket_bounds->ymin;
BarycentricWeightsPersp2f(uv, v1coSS, v2coSS, v3coSS, w);
- Vec2Weightf(bucket_bounds_uv[flip?3:0], uv1co, uv2co, uv3co, w);
+ Vec2Lerp3f(bucket_bounds_uv[flip?3:0], uv1co, uv2co, uv3co, w);
//uv[0] = bucket_bounds->xmax; // set above
uv[1] = bucket_bounds->ymax;
BarycentricWeightsPersp2f(uv, v1coSS, v2coSS, v3coSS, w);
- Vec2Weightf(bucket_bounds_uv[flip?2:1], uv1co, uv2co, uv3co, w);
+ Vec2Lerp3f(bucket_bounds_uv[flip?2:1], uv1co, uv2co, uv3co, w);
uv[0] = bucket_bounds->xmin;
//uv[1] = bucket_bounds->ymax; // set above
BarycentricWeightsPersp2f(uv, v1coSS, v2coSS, v3coSS, w);
- Vec2Weightf(bucket_bounds_uv[flip?1:2], uv1co, uv2co, uv3co, w);
+ Vec2Lerp3f(bucket_bounds_uv[flip?1:2], uv1co, uv2co, uv3co, w);
//uv[0] = bucket_bounds->xmin; // set above
uv[1] = bucket_bounds->ymin;
BarycentricWeightsPersp2f(uv, v1coSS, v2coSS, v3coSS, w);
- Vec2Weightf(bucket_bounds_uv[flip?0:3], uv1co, uv2co, uv3co, w);
+ Vec2Lerp3f(bucket_bounds_uv[flip?0:3], uv1co, uv2co, uv3co, w);
}
/* This works as we need it to but we can save a few steps and not use it */
@@ -2209,13 +2184,13 @@ static void project_bucket_clip_face(
if (is_ortho) {
for(i=0; i<(*tot); i++) {
BarycentricWeights2f(isectVCosSS[i], v1coSS, v2coSS, v3coSS, w);
- Vec2Weightf(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w);
+ Vec2Lerp3f(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w);
}
}
else {
for(i=0; i<(*tot); i++) {
BarycentricWeightsPersp2f(isectVCosSS[i], v1coSS, v2coSS, v3coSS, w);
- Vec2Weightf(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w);
+ Vec2Lerp3f(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w);
}
}
}
@@ -2470,7 +2445,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
/* a pitty we need to get the worldspace pixel location here */
if(ps->rv3d->rflag & RV3D_CLIPPING) {
- VecWeightf(wco, ps->dm_mvert[ (*(&mf->v1 + i1)) ].co, ps->dm_mvert[ (*(&mf->v1 + i2)) ].co, ps->dm_mvert[ (*(&mf->v1 + i3)) ].co, w);
+ VecLerp3f(wco, ps->dm_mvert[ (*(&mf->v1 + i1)) ].co, ps->dm_mvert[ (*(&mf->v1 + i2)) ].co, ps->dm_mvert[ (*(&mf->v1 + i3)) ].co, w);
Mat4MulVecfl(ps->ob->obmat, wco);
if(view3d_test_clipping(ps->rv3d, wco)) {
continue; /* Watch out that no code below this needs to run */
@@ -2686,8 +2661,8 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
/* a pitty we need to get the worldspace pixel location here */
if(ps->rv3d->rflag & RV3D_CLIPPING) {
- if (side) VecWeightf(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w);
- else VecWeightf(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w);
+ if (side) VecLerp3f(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w);
+ else VecLerp3f(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w);
Mat4MulVecfl(ps->ob->obmat, wco);
if(view3d_test_clipping(ps->rv3d, wco)) {
@@ -2960,12 +2935,26 @@ static void project_paint_begin(ProjPaintState *ps)
/* ---- end defines ---- */
/* paint onto the derived mesh */
- ps->dm = mesh_get_derived_final(ps->scene, ps->ob, ps->v3d->customdata_mask);
+
+ /* Workaround for subsurf selection, try the display mesh first */
+ if(ps->ob->derivedFinal && CustomData_has_layer( &ps->ob->derivedFinal->faceData, CD_MTFACE)) {
+ ps->dm = ps->ob->derivedFinal;
+ ps->dm_release= FALSE;
+ }
+ else {
+ ps->dm = mesh_get_derived_final(ps->scene, ps->ob, ps->v3d->customdata_mask);
+ ps->dm_release= TRUE;
+ }
if ( !CustomData_has_layer( &ps->dm->faceData, CD_MTFACE) ) {
+
+ if(ps->dm_release)
+ ps->dm->release(ps->dm);
+
ps->dm = NULL;
return;
}
+
ps->dm_mvert = ps->dm->getVertArray(ps->dm);
ps->dm_mface = ps->dm->getTessFaceArray(ps->dm);
ps->dm_mtface= ps->dm->getTessFaceDataArray(ps->dm, CD_MTFACE);
@@ -3428,7 +3417,8 @@ static void project_paint_end(ProjPaintState *ps)
BLI_memarena_free(ps->arena_mt[a]);
}
- ps->dm->release(ps->dm);
+ if(ps->dm_release)
+ ps->dm->release(ps->dm);
}
/* 1= an undo, -1 is a redo. */
@@ -3757,7 +3747,7 @@ static void *do_projectpaint_thread(void *ph_v)
/*if (dist < s->brush->size) {*/ /* correct but uses a sqrtf */
if (dist_nosqrt < brush_size_sqared && (dist=sqrtf(dist_nosqrt)) < size_half) {
- falloff = brush_curve_strength(ps->brush, dist, size_half);
+ falloff = brush_curve_strength_clamp(ps->brush, dist, size_half);
if (falloff > 0.0f) {
if (ps->is_texbrush) {
brush_sample_tex(ps->brush, projPixel->projCoSS, rgba);
@@ -4443,6 +4433,7 @@ typedef struct PaintOperation {
int first;
int prevmouse[2];
+ float prev_pressure; /* need this since we dont get tablet events for pressure change */
int brush_size_orig;
double starttime;
@@ -4722,8 +4713,8 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
if(wmtab->Active == EVT_TABLET_ERASER)
pop->s.blend= IMB_BLEND_ERASE_ALPHA;
}
- else
- pressure= 1.0f;
+ else /* otherwise airbrush becomes 1.0 pressure instantly */
+ pressure= pop->prev_pressure ? pop->prev_pressure : 1.0f;
if(pop->first) {
pop->prevmouse[0]= mouse[0];
@@ -4732,8 +4723,7 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
/* special exception here for too high pressure values on first touch in
windows for some tablets, then we just skip first touch .. */
- if ((pop->s.brush->flag & (BRUSH_ALPHA_PRESSURE|BRUSH_SIZE_PRESSURE|
- BRUSH_SPACING_PRESSURE|BRUSH_RAD_PRESSURE)) && tablet && (pressure >= 0.99f))
+ if ((pop->s.brush->flag & (BRUSH_ALPHA_PRESSURE|BRUSH_SIZE_PRESSURE|BRUSH_SPACING_PRESSURE)) && tablet && (pressure >= 0.99f))
return;
}
@@ -4748,6 +4738,8 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
/* apply */
paint_apply(C, op, &itemptr);
+
+ pop->prev_pressure= pressure;
}
static int paint_invoke(bContext *C, wmOperator *op, wmEvent *event)
@@ -4762,7 +4754,7 @@ static int paint_invoke(bContext *C, wmOperator *op, wmEvent *event)
paint_apply_event(C, op, event);
pop= op->customdata;
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
if(pop->s.brush->flag & BRUSH_AIRBRUSH)
pop->timer= WM_event_add_window_timer(CTX_wm_window(C), TIMER, 0.01f);
@@ -4897,12 +4889,15 @@ static int paint_radial_control_modal(bContext *C, wmOperator *op, wmEvent *even
static int paint_radial_control_exec(bContext *C, wmOperator *op)
{
+ Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint);
float zoom;
int ret;
char str[256];
get_imapaint_zoom(C, &zoom, &zoom);
- ret = brush_radial_control_exec(op, paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint), 2.0 / zoom);
+ ret = brush_radial_control_exec(op, brush, 2.0 / zoom);
WM_radial_control_string(op, str, 256);
+
+ WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush);
return ret;
}
@@ -4961,7 +4956,7 @@ static int grab_clone_invoke(bContext *C, wmOperator *op, wmEvent *event)
cmv->starty= event->y;
op->customdata= cmv;
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -5216,10 +5211,13 @@ static int texture_paint_radial_control_invoke(bContext *C, wmOperator *op, wmEv
static int texture_paint_radial_control_exec(bContext *C, wmOperator *op)
{
- int ret = brush_radial_control_exec(op, paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint), 2);
+ Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint);
+ int ret = brush_radial_control_exec(op, brush, 2);
char str[256];
WM_radial_control_string(op, str, 256);
+ WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush);
+
return ret;
}
@@ -5232,6 +5230,11 @@ static int texture_paint_poll(bContext *C)
return 0;
}
+int image_texture_paint_poll(bContext *C)
+{
+ return (texture_paint_poll(C) || image_paint_poll(C));
+}
+
void PAINT_OT_texture_paint_radial_control(wmOperatorType *ot)
{
WM_OT_radial_control_partial(ot);
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index ba1b57a1bef..8251d1a5a1a 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -57,7 +57,10 @@ int paint_poll(bContext *C);
void paint_cursor_start(struct bContext *C, int (*poll)(struct bContext *C));
/* paint_vertex.c */
-int vertex_paint_mode_poll(bContext *C);
+int weight_paint_poll(struct bContext *C);
+int vertex_paint_poll(struct bContext *C);
+int vertex_paint_mode_poll(struct bContext *C);
+
void clear_vpaint(Scene *scene, int selected);
void PAINT_OT_weight_paint_toggle(struct wmOperatorType *ot);
@@ -69,6 +72,8 @@ void PAINT_OT_vertex_paint_toggle(struct wmOperatorType *ot);
void PAINT_OT_vertex_paint(struct wmOperatorType *ot);
/* paint_image.c */
+int image_texture_paint_poll(struct bContext *C);
+
void PAINT_OT_image_paint(struct wmOperatorType *ot);
void PAINT_OT_image_paint_radial_control(struct wmOperatorType *ot);
void PAINT_OT_grab_clone(struct wmOperatorType *ot);
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 19b46f5a941..11dbeffdb22 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -38,6 +38,7 @@
#include "RNA_enum_types.h"
#include "paint_intern.h"
+#include "sculpt_intern.h"
#include <string.h>
@@ -133,3 +134,48 @@ void ED_operatortypes_paint(void)
WM_operatortype_append(PAINT_OT_vertex_color_set);
}
+void ED_keymap_paint(wmKeyConfig *keyconf)
+{
+ wmKeyMap *keymap;
+
+ /* Sculpt mode */
+ keymap= WM_keymap_find(keyconf, "Sculpt", 0, 0);
+ keymap->poll= sculpt_poll;
+
+ RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE);
+ RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH);
+ RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", WM_RADIALCONTROL_ANGLE);
+
+ WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
+
+ /* Vertex Paint mode */
+ keymap= WM_keymap_find(keyconf, "Vertex Paint", 0, 0);
+ keymap->poll= vertex_paint_poll;
+
+ RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE);
+ RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH);
+ WM_keymap_verify_item(keymap, "PAINT_OT_vertex_paint", LEFTMOUSE, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0);
+
+ /* Weight Paint mode */
+ keymap= WM_keymap_find(keyconf, "Weight Paint", 0, 0);
+ keymap->poll= weight_paint_poll;
+
+ RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_weight_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE);
+ RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_weight_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH);
+
+ WM_keymap_verify_item(keymap, "PAINT_OT_weight_paint", LEFTMOUSE, KM_PRESS, 0, 0);
+
+ /* Image/Texture Paint mode */
+ keymap= WM_keymap_find(keyconf, "Image Paint", 0, 0);
+ keymap->poll= image_texture_paint_poll;
+
+ RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_texture_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE);
+ RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_texture_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH);
+
+ WM_keymap_add_item(keymap, "PAINT_OT_image_paint", LEFTMOUSE, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "PAINT_OT_clone_cursor_set", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
+}
+
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index bd9ea50e0f8..b83352ae70c 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -263,7 +263,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
}
/* TODO: fix hardcoded event here */
- if(event->type == LEFTMOUSE && event->val == 0) {
+ if(event->type == LEFTMOUSE && event->val == KM_RELEASE) {
/* Exit stroke, free data */
if(stroke->smooth_stroke_cursor)
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 3c648a193e4..4a45df9eb91 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -120,7 +120,7 @@ int vertex_paint_mode_poll(bContext *C)
return ob && ob->mode == OB_MODE_VERTEX_PAINT;
}
-static int vp_poll(bContext *C)
+int vertex_paint_poll(bContext *C)
{
if(vertex_paint_mode_poll(C) &&
paint_brush(&CTX_data_tool_settings(C)->vpaint->paint)) {
@@ -134,7 +134,7 @@ static int vp_poll(bContext *C)
return 0;
}
-static int wp_poll(bContext *C)
+int weight_paint_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
@@ -1121,7 +1121,7 @@ static int set_wpaint(bContext *C, wmOperator *op) /* toggle */
wp= scene->toolsettings->wpaint= new_vpaint(1);
paint_init(&wp->paint, PAINT_CURSOR_WEIGHT_PAINT);
- paint_cursor_start(C, wp_poll);
+ paint_cursor_start(C, weight_paint_poll);
mesh_octree_table(ob, NULL, NULL, 's');
@@ -1190,14 +1190,18 @@ static int vpaint_radial_control_modal(bContext *C, wmOperator *op, wmEvent *eve
{
int ret = WM_radial_control_modal(C, op, event);
if(ret != OPERATOR_RUNNING_MODAL)
- paint_cursor_start(C, vp_poll);
+ paint_cursor_start(C, vertex_paint_poll);
return ret;
}
static int vpaint_radial_control_exec(bContext *C, wmOperator *op)
{
Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->vpaint->paint);
- return brush_radial_control_exec(op, brush, 1);
+ int ret = brush_radial_control_exec(op, brush, 1);
+
+ WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush);
+
+ return ret;
}
static int wpaint_radial_control_invoke(bContext *C, wmOperator *op, wmEvent *event)
@@ -1215,14 +1219,18 @@ static int wpaint_radial_control_modal(bContext *C, wmOperator *op, wmEvent *eve
{
int ret = WM_radial_control_modal(C, op, event);
if(ret != OPERATOR_RUNNING_MODAL)
- paint_cursor_start(C, wp_poll);
+ paint_cursor_start(C, weight_paint_poll);
return ret;
}
static int wpaint_radial_control_exec(bContext *C, wmOperator *op)
{
Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->wpaint->paint);
- return brush_radial_control_exec(op, brush, 1);
+ int ret = brush_radial_control_exec(op, brush, 1);
+
+ WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush);
+
+ return ret;
}
void PAINT_OT_weight_paint_radial_control(wmOperatorType *ot)
@@ -1235,7 +1243,7 @@ void PAINT_OT_weight_paint_radial_control(wmOperatorType *ot)
ot->invoke= wpaint_radial_control_invoke;
ot->modal= wpaint_radial_control_modal;
ot->exec= wpaint_radial_control_exec;
- ot->poll= wp_poll;
+ ot->poll= weight_paint_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -1251,7 +1259,7 @@ void PAINT_OT_vertex_paint_radial_control(wmOperatorType *ot)
ot->invoke= vpaint_radial_control_invoke;
ot->modal= vpaint_radial_control_modal;
ot->exec= vpaint_radial_control_exec;
- ot->poll= vp_poll;
+ ot->poll= vertex_paint_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -1539,7 +1547,7 @@ static int wpaint_invoke(bContext *C, wmOperator *op, wmEvent *event)
wpaint_stroke_done);
/* add modal handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
op->type->modal(C, op, event);
@@ -1557,7 +1565,7 @@ void PAINT_OT_weight_paint(wmOperatorType *ot)
ot->invoke= wpaint_invoke;
ot->modal= paint_stroke_modal;
/* ot->exec= vpaint_exec; <-- needs stroke property */
- ot->poll= wp_poll;
+ ot->poll= weight_paint_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -1604,7 +1612,7 @@ static int set_vpaint(bContext *C, wmOperator *op) /* toggle */
if(vp==NULL)
vp= scene->toolsettings->vpaint= new_vpaint(0);
- paint_cursor_start(C, vp_poll);
+ paint_cursor_start(C, vertex_paint_poll);
paint_init(&vp->paint, PAINT_CURSOR_VERTEX_PAINT);
}
@@ -1957,7 +1965,7 @@ static int vpaint_invoke(bContext *C, wmOperator *op, wmEvent *event)
vpaint_stroke_done);
/* add modal handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
op->type->modal(C, op, event);
@@ -1974,7 +1982,7 @@ void PAINT_OT_vertex_paint(wmOperatorType *ot)
ot->invoke= vpaint_invoke;
ot->modal= paint_stroke_modal;
/* ot->exec= vpaint_exec; <-- needs stroke property */
- ot->poll= vp_poll;
+ ot->poll= vertex_paint_poll;
/* flags */
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 58868a0c2cd..ca9656250c8 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -91,6 +91,7 @@
#include "RE_shader_ext.h" /*for multitex_ext*/
#include "GPU_draw.h"
+#include "gpu_buffers.h"
#include <math.h>
#include <stdlib.h>
@@ -305,20 +306,33 @@ static void do_draw_brush(Sculpt *sd, SculptSession *ss, const ListBase* active_
{
float area_normal[3];
ActiveData *node= active_verts->first;
+ float* buffer;
calc_area_normal(sd, ss, area_normal, active_verts);
+ buffer = ss->drawobject!=0?(float *)GPU_buffer_lock( ss->drawobject->vertices ):0;
+
while(node){
float *co= ss->mvert[node->Index].co;
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]};
-
+
+ if( buffer != 0 ) {
+ IndexLink *cur = &ss->drawobject->indices[node->Index];
+ while( cur != 0 && cur->element != -1 ) {
+ sculpt_clip(sd, ss, &buffer[cur->element*3], val);
+ cur = cur->next;
+ }
+ }
+
sculpt_clip(sd, ss, co, val);
-
+
node= node->next;
}
+ if( buffer != 0 )
+ GPU_buffer_unlock( ss->drawobject->vertices );
}
/* For the smooth brush, uses the neighboring vertices around vert to calculate
@@ -368,6 +382,7 @@ static void neighbor_average(SculptSession *ss, float avg[3], const int vert)
static void do_smooth_brush(Sculpt *s, SculptSession *ss, const ListBase* active_verts)
{
ActiveData *node= active_verts->first;
+ float *buffer = ss->drawobject!=0?(float *)GPU_buffer_lock( ss->drawobject->vertices ):0;
int i;
for(i = 0; i < 2; ++i) {
@@ -380,24 +395,45 @@ static void do_smooth_brush(Sculpt *s, SculptSession *ss, const ListBase* active
val[1] = co[1]+(avg[1]-co[1])*node->Fade;
val[2] = co[2]+(avg[2]-co[2])*node->Fade;
- sculpt_clip(s, ss, co, val);
+ sculpt_clip(s, ss, co, val);
+ if( buffer != 0 ) {
+ IndexLink *cur = &ss->drawobject->indices[node->Index];
+ while( cur != 0 && cur->element != -1 ) {
+ sculpt_clip(s, ss, &buffer[cur->element*3], val);
+ cur = cur->next;
+ }
+ }
node= node->next;
}
}
+ if( buffer != 0 )
+ GPU_buffer_unlock( ss->drawobject->vertices );
}
static void do_pinch_brush(Sculpt *s, SculptSession *ss, const ListBase* active_verts)
{
ActiveData *node= active_verts->first;
+ float *buffer = ss->drawobject!=0?(float *)GPU_buffer_lock( ss->drawobject->vertices ):0;
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};
+
+ if( buffer != 0 ) {
+ IndexLink *cur = &ss->drawobject->indices[node->Index];
+ while( cur != 0 && cur->element != -1 ) {
+ sculpt_clip(s, ss, &buffer[cur->element*3], val);
+ cur = cur->next;
+ }
+ }
+
sculpt_clip(s, ss, co, val);
node= node->next;
}
+ if( buffer != 0 )
+ GPU_buffer_unlock( ss->drawobject->vertices );
}
static void do_grab_brush(Sculpt *sd, SculptSession *ss)
@@ -405,6 +441,7 @@ static void do_grab_brush(Sculpt *sd, SculptSession *ss)
ActiveData *node= ss->cache->grab_active_verts[ss->cache->symmetry].first;
float add[3];
float grab_delta[3];
+ float *buffer = ss->drawobject!=0?(float *)GPU_buffer_lock( ss->drawobject->vertices ):0;
VecCopyf(grab_delta, ss->cache->grab_delta_symmetry);
@@ -414,10 +451,21 @@ static void do_grab_brush(Sculpt *sd, SculptSession *ss)
VecCopyf(add, grab_delta);
VecMulf(add, node->Fade);
VecAddf(add, add, co);
+
+ if( buffer != 0 ) {
+ IndexLink *cur = &ss->drawobject->indices[node->Index];
+ while( cur != 0 && cur->element != -1 ) {
+ sculpt_clip(sd, ss, &buffer[cur->element*3], add);
+ cur = cur->next;
+ }
+ }
+
sculpt_clip(sd, ss, co, add);
node= node->next;
}
+ if( buffer != 0 )
+ GPU_buffer_unlock( ss->drawobject->vertices );
}
@@ -425,6 +473,7 @@ static void do_layer_brush(Sculpt *sd, SculptSession *ss, const ListBase *active
{
float area_normal[3];
ActiveData *node= active_verts->first;
+ float *buffer;
float lim= ss->cache->radius / 4;
if(ss->cache->flip)
@@ -432,6 +481,7 @@ static void do_layer_brush(Sculpt *sd, SculptSession *ss, const ListBase *active
calc_area_normal(sd, ss, area_normal, active_verts);
+ buffer = ss->drawobject!=0?(float *)GPU_buffer_lock( ss->drawobject->vertices ):0;
while(node){
float *disp= &ss->layer_disps[node->Index];
float *co= ss->mvert[node->Index].co;
@@ -447,17 +497,28 @@ static void do_layer_brush(Sculpt *sd, SculptSession *ss, const ListBase *active
val[1] = ss->mesh_co_orig[node->Index][1]+area_normal[1] * *disp*ss->cache->scale[1];
val[2] = ss->mesh_co_orig[node->Index][2]+area_normal[2] * *disp*ss->cache->scale[2];
+ if( buffer != 0 ) {
+ IndexLink *cur = &ss->drawobject->indices[node->Index];
+ while( cur != 0 && cur->element != -1 ) {
+ sculpt_clip(sd, ss, &buffer[cur->element*3], val);
+ cur = cur->next;
+ }
+ }
+
sculpt_clip(sd, ss, co, val);
node= node->next;
}
+ if( buffer != 0 )
+ GPU_buffer_unlock( ss->drawobject->vertices );
}
static void do_inflate_brush(Sculpt *s, SculptSession *ss, const ListBase *active_verts)
{
ActiveData *node= active_verts->first;
float add[3];
-
+ float *buffer = ss->drawobject!=0?(float *)GPU_buffer_lock( ss->drawobject->vertices ):0;
+
while(node) {
float *co= ss->mvert[node->Index].co;
short *no= ss->mvert[node->Index].no;
@@ -471,10 +532,20 @@ static void do_inflate_brush(Sculpt *s, SculptSession *ss, const ListBase *activ
add[2]*= ss->cache->scale[2];
VecAddf(add, add, co);
+ if( buffer != 0 ) {
+ IndexLink *cur = &ss->drawobject->indices[node->Index];
+ while( cur != 0 && cur->element != -1 ) {
+ sculpt_clip(s, ss, &buffer[cur->element*3], add);
+ cur = cur->next;
+ }
+ }
+
sculpt_clip(s, ss, co, add);
node= node->next;
}
+ if( buffer != 0 )
+ GPU_buffer_unlock( ss->drawobject->vertices );
}
static void calc_flatten_center(SculptSession *ss, ActiveData *node, float co[3])
@@ -535,7 +606,7 @@ static void do_flatten_clay_brush(Sculpt *sd, SculptSession *ss, const ListBase
float area_normal[3];
float cntr[3], cntr2[3], bstr = 0;
int flip = 0;
-
+ float *buffer;
calc_area_normal(sd, ss, area_normal, active_verts);
calc_flatten_center(ss, node, cntr);
@@ -547,7 +618,9 @@ static void do_flatten_clay_brush(Sculpt *sd, SculptSession *ss, const ListBase
cntr2[2]=cntr[2]+area_normal[2]*bstr*ss->cache->scale[2];
flip = bstr < 0;
}
-
+
+ buffer = ss->drawobject!=0?(float *)GPU_buffer_lock( ss->drawobject->vertices ):0;
+
while(node){
float *co= ss->mvert[node->Index].co;
float intr[3], val[3];
@@ -573,11 +646,21 @@ static void do_flatten_clay_brush(Sculpt *sd, SculptSession *ss, const ListBase
VecAddf(val, val, co);
+ if( buffer != 0 ) {
+ IndexLink *cur = &ss->drawobject->indices[node->Index];
+ while( cur != 0 && cur->element != -1 ) {
+ sculpt_clip(sd, ss, &buffer[cur->element*3], val);
+ cur = cur->next;
+ }
+ }
sculpt_clip(sd, ss, co, val);
+
}
node= node->next;
}
+ if( buffer != 0 )
+ GPU_buffer_unlock( ss->drawobject->vertices );
}
/* Uses symm to selectively flip any axis of a coordinate. */
@@ -898,7 +981,8 @@ static void add_face_normal(vec3f *norm, MVert *mvert, const MFace* face, float
static void update_damaged_vert(SculptSession *ss, ListBase *lb)
{
ActiveData *vert;
-
+
+ float *buffer = ss->drawobject!=0?(float *)GPU_buffer_lock( ss->drawobject->normals ):0;
for(vert= lb->first; vert; vert= vert->next) {
vec3f norm= {0,0,0};
IndexNode *face= ss->fmap[vert->Index].first;
@@ -915,7 +999,44 @@ static void update_damaged_vert(SculptSession *ss, ListBase *lb)
ss->mvert[vert->Index].no[0]=norm.x*32767;
ss->mvert[vert->Index].no[1]=norm.y*32767;
ss->mvert[vert->Index].no[2]=norm.z*32767;
+
+ if( buffer != 0 ) {
+ IndexLink *cur = &ss->drawobject->indices[vert->Index];
+ while( cur != 0 && cur->element != -1 ) {
+ int i = ss->drawobject->faceRemap[cur->element/3];
+ if( ss->mface[i].flag & ME_SMOOTH ) {
+ VECCOPY(&buffer[cur->element*3],ss->mvert[vert->Index].no);
+ }
+ else {
+ float norm[3];
+ if( ss->mface[i].v4 )
+ CalcNormFloat4(ss->mvert[ss->mface[i].v1].co, ss->mvert[ss->mface[i].v2].co, ss->mvert[ss->mface[i].v3].co, ss->mvert[ss->mface[i].v4].co, norm);
+ else
+ CalcNormFloat(ss->mvert[ss->mface[i].v1].co, ss->mvert[ss->mface[i].v2].co, ss->mvert[ss->mface[i].v3].co, norm);
+ VECCOPY(&buffer[(cur->element-cur->element%3)*3],norm);
+ VECCOPY(&buffer[(cur->element-cur->element%3+1)*3],norm);
+ VECCOPY(&buffer[(cur->element-cur->element%3+2)*3],norm);
+
+ /* maybe this was a quad - need to update the other triangle of the quad */
+ if( ss->drawobject->faceRemap[cur->element/3-1] == i ) {
+ VECCOPY(&buffer[(cur->element-cur->element%3-3)*3],norm);
+ VECCOPY(&buffer[(cur->element-cur->element%3-2)*3],norm);
+ VECCOPY(&buffer[(cur->element-cur->element%3-1)*3],norm);
+ }
+ if( ss->drawobject->faceRemap[cur->element/3+1] == i ) {
+ VECCOPY(&buffer[(cur->element-cur->element%3+3)*3],norm);
+ VECCOPY(&buffer[(cur->element-cur->element%3+4)*3],norm);
+ VECCOPY(&buffer[(cur->element-cur->element%3+5)*3],norm);
+ }
+ }
+
+ //VECCOPY(&buffer[cur->element*3],ss->mvert[vert->Index].no);
+ cur = cur->next;
+ }
+ }
}
+ if( buffer != 0 )
+ GPU_buffer_unlock( ss->drawobject->normals );
}
static void calc_damaged_verts(SculptSession *ss)
@@ -989,8 +1110,16 @@ static struct MultiresModifierData *sculpt_multires_active(Object *ob)
ModifierData *md;
for(md= modifiers_getVirtualModifierList(ob); md; md= md->next) {
- if(md->type == eModifierType_Multires && !md->next) {
- MultiresModifierData *mmd = (MultiresModifierData*)md;
+ if(md->type == eModifierType_Multires) {
+ MultiresModifierData *mmd= (MultiresModifierData*)md;
+
+ /* Check if any of the modifiers after multires are active
+ * if not it can use the multires struct */
+ for (md= md->next; md; md= md->next) {
+ if(md->mode & eModifierMode_Realtime)
+ return NULL;
+ }
+
if(mmd->lvl != 1)
return mmd;
}
@@ -1004,11 +1133,12 @@ static void sculpt_update_mesh_elements(bContext *C)
Object *ob = CTX_data_active_object(C);
SculptSession *ss = ob->sculpt;
int oldtotvert = ss->totvert;
+ DerivedMesh *dm = mesh_get_derived_final(CTX_data_scene(C), ob, CD_MASK_BAREMESH);
if((ss->multires = sculpt_multires_active(ob))) {
- DerivedMesh *dm = mesh_get_derived_final(CTX_data_scene(C), ob, CD_MASK_BAREMESH);
+ //DerivedMesh *dm = mesh_get_derived_final(CTX_data_scene(C), ob, CD_MASK_BAREMESH);
ss->totvert = dm->getNumVerts(dm);
- ss->totface = dm->getNumFaces(dm);
+ ss->totface = dm->getNumTessFaces(dm);
ss->mvert = dm->getVertDataArray(dm, CD_MVERT);
ss->mface = dm->getTessFaceDataArray(dm, CD_MFACE);
ss->face_normals = dm->getTessFaceDataArray(dm, CD_NORMAL);
@@ -1021,6 +1151,12 @@ static void sculpt_update_mesh_elements(bContext *C)
ss->mface = me->mface;
ss->face_normals = NULL;
}
+ if( GPU_buffer_legacy( dm ) ) {
+ ss->drawobject = 0;
+ }
+ else {
+ ss->drawobject = dm->drawObject;
+ }
if(ss->totvert != oldtotvert) {
if(ss->projverts) MEM_freeN(ss->projverts);
@@ -1039,7 +1175,7 @@ static int sculpt_mode_poll(bContext *C)
return ob && ob->mode & OB_MODE_SCULPT;
}
-static int sculpt_poll(bContext *C)
+int sculpt_poll(bContext *C)
{
return sculpt_mode_poll(C) && paint_poll(C);
}
@@ -1091,8 +1227,11 @@ static int sculpt_radial_control_modal(bContext *C, wmOperator *op, wmEvent *eve
static int sculpt_radial_control_exec(bContext *C, wmOperator *op)
{
Brush *brush = paint_brush(&CTX_data_tool_settings(C)->sculpt->paint);
+ int ret = brush_radial_control_exec(op, brush, 1);
+
+ WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush);
- return brush_radial_control_exec(op, brush, 1);
+ return ret;
}
static void SCULPT_OT_radial_control(wmOperatorType *ot)
@@ -1329,16 +1468,30 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss)
{
StrokeCache *cache = ss->cache;
Brush *brush = paint_brush(&sd->paint);
+ float *buffer= NULL;
int i;
-
+
/* Restore the mesh before continuing with anchored stroke */
if((brush->flag & BRUSH_ANCHORED) && ss->mesh_co_orig) {
+
+ if(ss->drawobject)
+ buffer= (float *)GPU_buffer_lock(ss->drawobject->normals);
+
for(i = 0; i < ss->totvert; ++i) {
VecCopyf(ss->mvert[i].co, ss->mesh_co_orig[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( buffer != 0 ) {
+ IndexLink *cur = &ss->drawobject->indices[i];
+ while( cur != 0 && cur->element != -1 ) {
+ VECCOPY(&buffer[cur->element*3],cache->orig_norms[i]);
+ cur = cur->next;
+ }
+ }
}
+ if( buffer != 0 )
+ GPU_buffer_unlock( ss->drawobject->normals );
if(ss->face_normals) {
float *fn = ss->face_normals;
@@ -1437,7 +1590,7 @@ static int sculpt_brush_stroke_invoke(bContext *C, wmOperator *op, wmEvent *even
sculpt_stroke_done);
/* add modal handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
op->type->modal(C, op, event);
@@ -1566,10 +1719,10 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *op)
paint_init(&ts->sculpt->paint, PAINT_CURSOR_SCULPT);
paint_cursor_start(C, sculpt_poll);
-
- WM_event_add_notifier(C, NC_SCENE|ND_MODE, CTX_data_scene(C));
}
+ WM_event_add_notifier(C, NC_SCENE|ND_MODE, CTX_data_scene(C));
+
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index 25f97b862e6..15ccacc294a 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -33,6 +33,7 @@
#include "DNA_listBase.h"
#include "DNA_vec_types.h"
+struct bContext;
struct Brush;
struct Mesh;
struct Object;
@@ -53,6 +54,8 @@ struct Brush *sculptmode_brush(void);
char sculpt_modifiers_active(struct Object *ob);
void sculpt(Sculpt *sd);
+int sculpt_poll(struct bContext *C);
+
/* Stroke */
struct SculptStroke *sculpt_stroke_new(const int max);
void sculpt_stroke_free(struct SculptStroke *);
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index 4288cc10a26..7181a6b5aa1 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -260,6 +260,13 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
if (ELEM(ac->datatype, ANIMCONT_ACTION, ANIMCONT_DOPESHEET)) {
switch (ale->type) {
+ case ANIMTYPE_SUMMARY:
+ {
+ // FIXME: hardcoded colours - reddish color from NLA
+ glColor4f(0.8f, 0.2f, 0.0f, 0.4f);
+ }
+ break;
+
case ANIMTYPE_SCENE:
case ANIMTYPE_OBJECT:
{
@@ -351,6 +358,9 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
/* draw 'keyframes' for each specific datatype */
switch (ale->datatype) {
+ case ALE_ALL:
+ draw_summary_channel(v2d, ale->data, y);
+ break;
case ALE_SCE:
draw_scene_channel(v2d, ads, ale->key_data, y);
break;
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 89633d0cdfe..0bcf4b037cb 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -86,9 +86,60 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "UI_interface.h"
+
#include "action_intern.h"
/* ************************************************************************** */
+/* ACTION MANAGEMENT */
+
+/* ******************** New Action Operator *********************** */
+
+static int act_new_exec(bContext *C, wmOperator *op)
+{
+ bAction *action;
+ PointerRNA ptr, idptr;
+ PropertyRNA *prop;
+
+ // XXX need to restore behaviour to copy old actions...
+ action= add_empty_action("Action");
+
+ /* hook into UI */
+ uiIDContextProperty(C, &ptr, &prop);
+
+ if(prop) {
+ /* when creating new ID blocks, use is already 1, but RNA
+ * pointer se also increases user, so this compensates it */
+ action->id.us--;
+
+ RNA_id_pointer_create(&action->id, &idptr);
+ RNA_property_pointer_set(&ptr, prop, idptr);
+ RNA_property_update(C, &ptr, prop);
+ }
+
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void ACT_OT_new (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "New";
+ ot->idname= "ACT_OT_new";
+ ot->description= "Create new action.";
+
+ /* api callbacks */
+ ot->exec= act_new_exec;
+ // NOTE: this is used in the NLA too...
+ //ot->poll= ED_operator_action_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* ************************************************************************** */
/* KEYFRAME-RANGE STUFF */
/* *************************** Calculate Range ************************** */
diff --git a/source/blender/editors/space_action/action_header.c b/source/blender/editors/space_action/action_header.c
index 8674f481a18..ba5fc0893ec 100644
--- a/source/blender/editors/space_action/action_header.c
+++ b/source/blender/editors/space_action/action_header.c
@@ -68,7 +68,7 @@
#include "action_intern.h"
enum {
- B_REDR= 0,
+ B_REDR= 1,
} eActHeader_Events;
/* ********************************************************* */
@@ -189,6 +189,7 @@ static void act_edit_keytypesmenu(bContext *C, uiLayout *layout, void *arg_unuse
uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
uiItemEnumO(layout, NULL, 0, "ACT_OT_keyframe_type", "type", BEZT_KEYTYPE_KEYFRAME);
uiItemEnumO(layout, NULL, 0, "ACT_OT_keyframe_type", "type", BEZT_KEYTYPE_BREAKDOWN);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_keyframe_type", "type", BEZT_KEYTYPE_EXTREME);
}
static void act_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused)
@@ -253,66 +254,8 @@ static void act_editmenu(bContext *C, uiLayout *layout, void *arg_unused)
static void do_action_buttons(bContext *C, void *arg, int event)
{
- switch (event) {
- case B_REDR:
- ED_area_tag_redraw(CTX_wm_area(C));
- break;
- }
-}
-
-static void saction_idpoin_handle(bContext *C, ID *id, int event)
-{
- SpaceAction *saction= CTX_wm_space_action(C);
- Object *obact= CTX_data_active_object(C);
-
- printf("actedit do id: \n");
-
- switch (event) {
- case UI_ID_BROWSE:
- printf("browse \n");
- case UI_ID_DELETE:
- printf("browse or delete \n");
- saction->action= (bAction*)id;
-
- /* we must set this action to be the one used by active object (if not pinned) */
- if (saction->pin == 0) {
- AnimData *adt= BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */
-
- /* set action */
- printf("\tset action \n");
- adt->action= saction->action;
- adt->action->id.us++;
- }
-
- ED_area_tag_redraw(CTX_wm_area(C));
- ED_undo_push(C, "Assign Action");
- break;
- case UI_ID_RENAME:
- printf("actedit rename \n");
- break;
- case UI_ID_ADD_NEW:
- printf("actedit addnew \n");
- if (saction->pin == 0) {
- AnimData *adt= BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */
-
- /* set new action */
- // XXX need to restore behaviour to copy old actions...
- printf("\tset new action \n");
- adt->action= saction->action= add_empty_action("Action");
- }
- break;
- case UI_ID_OPEN:
- printf("actedit open \n");
- /* XXX not implemented */
- break;
- case UI_ID_ALONE:
- printf("actedit alone \n");
- /* XXX not implemented */
- break;
- case UI_ID_PIN:
- printf("actedit pin \n");
- break;
- }
+ ED_area_tag_refresh(CTX_wm_area(C));
+ ED_area_tag_redraw(CTX_wm_area(C));
}
void action_header_buttons(const bContext *C, ARegion *ar)
@@ -383,35 +326,28 @@ void action_header_buttons(const bContext *C, ARegion *ar)
xco += (90 + 8);
+ /* SUMMARY CHANNEL */
+ uiDefIconTextButBitI(block, TOG, ADS_FILTER_SUMMARY, B_REDR, ICON_BORDERMOVE, "Summary", xco,yco,XIC*4,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Include DopeSheet summary row"); // TODO: needs a better icon
+ xco += (XIC*4.5);
+
/*if (ac.data)*/
{
/* MODE-DEPENDENT DRAWING */
if (saction->mode == SACTCONT_DOPESHEET) {
/* FILTERING OPTIONS */
- xco -= 10;
-
- //uiBlockBeginAlign(block);
- uiDefIconButBitI(block, TOG, ADS_FILTER_ONLYSEL, B_REDR, ICON_RESTRICT_SELECT_OFF, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Only display selected Objects");
- //uiBlockEndAlign(block);
- xco += 5;
-
- uiBlockBeginAlign(block);
- uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSCE, B_REDR, ICON_SCENE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->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, &(saction->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, &(saction->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, &(saction->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, &(saction->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, &(saction->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, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Curves");
- uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display MetaBalls");
- uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Particles");
- uiBlockEndAlign(block);
- xco += 30;
+ xco -= XIC; // XXX first button incurs this offset...
+ xco= ANIM_headerUI_standard_buttons(C, &saction->ads, block, xco, yco);
}
else if (saction->mode == SACTCONT_ACTION) {
- /* NAME ETC */
- xco= uiDefIDPoinButs(block, CTX_data_main(C), NULL, (ID*)saction->action, ID_AC, &saction->pin, xco, yco,
- saction_idpoin_handle, UI_ID_BROWSE|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_DELETE|UI_ID_FAKE_USER|UI_ID_ALONE|UI_ID_PIN);
+ uiLayout *layout;
+ bScreen *sc= CTX_wm_screen(C);
+ PointerRNA ptr;
+
+ RNA_pointer_create(&sc->id, &RNA_SpaceDopeSheetEditor, saction, &ptr);
+
+ layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER, xco, 20+3, 20, 1, U.uistyles.first);
+ uiTemplateID(layout, (bContext*)C, &ptr, "action", "ACT_OT_new", NULL, NULL);
+ uiBlockLayoutResolve(block, &xco, NULL);
xco += 8;
}
@@ -443,7 +379,7 @@ void action_header_buttons(const bContext *C, ARegion *ar)
xco += (XIC + 8);
}
- /* always as last */
+ /* always as last */
UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, (int)(ar->v2d.tot.ymax-ar->v2d.tot.ymin));
uiEndBlock(C, block);
diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h
index e5f0ab8994e..c436475b537 100644
--- a/source/blender/editors/space_action/action_intern.h
+++ b/source/blender/editors/space_action/action_intern.h
@@ -99,6 +99,8 @@ void ACT_OT_frame_jump(struct wmOperatorType *ot);
void ACT_OT_snap(struct wmOperatorType *ot);
void ACT_OT_mirror(struct wmOperatorType *ot);
+void ACT_OT_new(struct wmOperatorType *ot);
+
/* defines for snap keyframes
* NOTE: keep in sync with eEditKeyframes_Snap (in ED_keyframes_edit.h)
*/
@@ -122,7 +124,7 @@ enum {
/* ***************************************** */
/* action_ops.c */
void action_operatortypes(void);
-void action_keymap(struct wmWindowManager *wm);
+void action_keymap(struct wmKeyConfig *keyconf);
#endif /* ED_ACTION_INTERN_H */
diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c
index 42b033040b1..ba504fa8a69 100644
--- a/source/blender/editors/space_action/action_ops.c
+++ b/source/blender/editors/space_action/action_ops.c
@@ -83,6 +83,7 @@ void action_operatortypes(void)
WM_operatortype_append(ACT_OT_insert_keyframe);
WM_operatortype_append(ACT_OT_copy);
WM_operatortype_append(ACT_OT_paste);
+ WM_operatortype_append(ACT_OT_new);
WM_operatortype_append(ACT_OT_previewrange_set);
WM_operatortype_append(ACT_OT_view_all);
@@ -90,9 +91,9 @@ void action_operatortypes(void)
/* ************************** registration - keymaps **********************************/
-static void action_keymap_keyframes (wmWindowManager *wm, ListBase *keymap)
+static void action_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
{
- wmKeymapItem *kmi;
+ wmKeyMapItem *kmi;
/* action_select.c - selection tools */
/* click-select */
@@ -155,7 +156,7 @@ static void action_keymap_keyframes (wmWindowManager *wm, ListBase *keymap)
WM_keymap_add_item(keymap, "ACT_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
/* transform system */
- transform_keymap_for_space(wm, keymap, SPACE_ACTION);
+ transform_keymap_for_space(keyconf, keymap, SPACE_ACTION);
/* test */
/* WM_keymap_add_item(keymap, "ACT_OT_test", QKEY, KM_PRESS, 0, 0); */
@@ -163,9 +164,9 @@ static void action_keymap_keyframes (wmWindowManager *wm, ListBase *keymap)
/* --------------- */
-void action_keymap(wmWindowManager *wm)
+void action_keymap(wmKeyConfig *keyconf)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
/* channels */
/* Channels are not directly handled by the Action Editor module, but are inherited from the Animation module.
@@ -174,7 +175,7 @@ void action_keymap(wmWindowManager *wm)
*/
/* keyframes */
- keymap= WM_keymap_listbase(wm, "Action_Keys", SPACE_ACTION, 0);
- action_keymap_keyframes(wm, keymap);
+ keymap= WM_keymap_find(keyconf, "Action_Keys", SPACE_ACTION, 0);
+ action_keymap_keyframes(keyconf, keymap);
}
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index e358f559b14..c945f41bc55 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -219,7 +219,7 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
- int filter;
+ int filter, filterflag;
BeztEditData bed;
BeztEditFunc ok_cb, select_cb;
@@ -235,6 +235,14 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+ /* get filtering flag for dopesheet data (if applicable) */
+ if (ac->datatype == ANIMCONT_DOPESHEET) {
+ bDopeSheet *ads= (bDopeSheet *)ac->data;
+ filterflag= ads->filterflag;
+ }
+ else
+ filterflag= 0;
+
/* get beztriple editing/validation funcs */
select_cb= ANIM_editkeyframes_select(selectmode);
@@ -271,20 +279,10 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
!((ymax < rectf.ymin) || (ymin > rectf.ymax)) )
{
/* loop over data selecting */
- if (ale->key_data) {
- if (ale->datatype == ALE_FCURVE)
- ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL);
- }
- else if (ale->type == ANIMTYPE_GROUP) {
- bActionGroup *agrp= ale->data;
- FCurve *fcu;
-
- for (fcu= agrp->channels.first; fcu && fcu->grp==agrp; fcu= fcu->next)
- ANIM_fcurve_keys_bezier_loop(&bed, fcu, ok_cb, select_cb, NULL);
- }
- //else if (ale->type == ANIMTYPE_GPLAYER) {
+ //if (ale->type == ANIMTYPE_GPLAYER)
// borderselect_gplayer_frames(ale->data, rectf.xmin, rectf.xmax, selectmode);
- //}
+ //else
+ ANIM_animchannel_keys_bezier_loop(&bed, ale, ok_cb, select_cb, NULL, filterflag);
}
/* set minimum extent to be the maximum of the next channel */
@@ -792,6 +790,12 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode,
if (ale->key_data) {
switch (ale->datatype) {
+ case ALE_SCE:
+ {
+ Scene *scene= (Scene *)ale->key_data;
+ scene_to_keylist(ads, scene, &anim_keys, NULL);
+ }
+ break;
case ALE_OB:
{
Object *ob= (Object *)ale->key_data;
@@ -812,6 +816,10 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode,
break;
}
}
+ else if (ale->type == ANIMTYPE_SUMMARY) {
+ /* dopesheet summary covers everything */
+ summary_to_keylist(ac, &anim_keys, NULL);
+ }
else if (ale->type == ANIMTYPE_GROUP) {
bActionGroup *agrp= (bActionGroup *)ale->data;
agroup_to_keylist(adt, agrp, &anim_keys, NULL);
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index b7a3df563ea..07de15a26b4 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -153,12 +153,12 @@ static SpaceLink *action_duplicate(SpaceLink *sl)
/* add handlers, stuff you only do once or on area/region changes */
static void action_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "Action_Keys", SPACE_ACTION, 0); /* XXX weak? */
+ keymap= WM_keymap_find(wm->defaultconf, "Action_Keys", SPACE_ACTION, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -216,12 +216,12 @@ static void action_main_area_draw(const bContext *C, ARegion *ar)
/* add handlers, stuff you only do once or on area/region changes */
static void action_channel_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "Animation_Channels", 0, 0); /* XXX weak? */
+ keymap= WM_keymap_find(wm->defaultconf, "Animation_Channels", 0, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -323,6 +323,7 @@ static void action_main_area_listener(ARegion *ar, wmNotifier *wmn)
break;
case NC_SCENE:
switch(wmn->data) {
+ case ND_RENDER_OPTIONS:
case ND_OB_ACTIVE:
case ND_FRAME:
case ND_MARKERS:
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index edd5da44526..60b9c5a6da7 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -46,8 +46,8 @@
#include "ED_markers.h"
#include "ED_mesh.h"
#include "ED_object.h"
-#include "ED_particle.h"
#include "ED_physics.h"
+#include "ED_render.h"
#include "ED_screen.h"
#include "ED_sculpt.h"
#include "ED_space_api.h"
@@ -92,54 +92,59 @@ void ED_spacetypes_init(void)
ED_operatortypes_sculpt();
ED_operatortypes_uvedit();
ED_operatortypes_paint();
- ED_operatortypes_particle();
+ ED_operatortypes_physics();
ED_operatortypes_curve();
ED_operatortypes_armature();
ED_operatortypes_marker();
- ED_operatortypes_pointcache();
- ED_operatortypes_fluid();
ED_operatortypes_metaball();
- ED_operatortypes_boids();
ED_operatortypes_sound();
+ ED_operatortypes_render();
ui_view2d_operatortypes();
spacetypes = BKE_spacetypes_list();
for(type=spacetypes->first; type; type=type->next)
type->operatortypes();
+
+
+ /* Macros's must go last since they reference other operators
+ * maybe we'll need to have them go after python operators too? */
+ ED_operatormacros_mesh();
+ ED_operatormacros_object();
}
/* called in wm.c */
/* keymap definitions are registered only once per WM initialize, usually on file read,
using the keymap the actual areas/regions add the handlers */
-void ED_spacetypes_keymap(wmWindowManager *wm)
+void ED_spacetypes_keymap(wmKeyConfig *keyconf)
{
const ListBase *spacetypes;
SpaceType *stype;
ARegionType *atype;
- ED_keymap_screen(wm);
- ED_keymap_anim(wm);
- ED_keymap_animchannels(wm);
- ED_keymap_gpencil(wm);
- ED_keymap_object(wm);
- ED_keymap_mesh(wm);
- ED_keymap_uvedit(wm);
- ED_keymap_curve(wm);
- ED_keymap_armature(wm);
- ED_keymap_particle(wm);
- ED_keymap_metaball(wm);
- ED_marker_keymap(wm);
-
- UI_view2d_keymap(wm);
+ ED_keymap_screen(keyconf);
+ ED_keymap_anim(keyconf);
+ ED_keymap_animchannels(keyconf);
+ ED_keymap_gpencil(keyconf);
+ ED_keymap_object(keyconf);
+ ED_keymap_mesh(keyconf);
+ ED_keymap_uvedit(keyconf);
+ ED_keymap_curve(keyconf);
+ ED_keymap_armature(keyconf);
+ ED_keymap_physics(keyconf);
+ ED_keymap_metaball(keyconf);
+ ED_keymap_paint(keyconf);
+ ED_marker_keymap(keyconf);
+
+ UI_view2d_keymap(keyconf);
spacetypes = BKE_spacetypes_list();
for(stype=spacetypes->first; stype; stype=stype->next) {
if(stype->keymap)
- stype->keymap(wm);
+ stype->keymap(keyconf);
for(atype=stype->regiontypes.first; atype; atype=atype->next) {
if(atype->keymap)
- atype->keymap(wm);
+ atype->keymap(keyconf);
}
}
}
@@ -235,7 +240,7 @@ static void xxx_operatortypes(void)
/* register operator types for this space */
}
-static void xxx_keymap(wmWindowManager *wm)
+static void xxx_keymap(wmKeyConfig *keyconf)
{
/* add default items to keymap */
}
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 635abd429f6..eb88ea8519e 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -52,6 +52,7 @@
#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_screen.h"
+#include "BKE_texture.h"
#include "BKE_utildefines.h"
#include "BKE_world.h"
@@ -116,6 +117,7 @@ static int buttons_context_path_scene(ButsContextPath *path)
static int buttons_context_path_world(ButsContextPath *path)
{
Scene *scene;
+ World *world;
PointerRNA *ptr= &path->ptr[path->len-1];
/* if we already have a (pinned) world, we're done */
@@ -125,11 +127,14 @@ static int buttons_context_path_world(ButsContextPath *path)
/* if we have a scene, use the scene's world */
else if(buttons_context_path_scene(path)) {
scene= path->ptr[path->len-1].data;
+ world= scene->world;
+
+ if(world) {
+ RNA_id_pointer_create(&scene->world->id, &path->ptr[path->len]);
+ path->len++;
- RNA_id_pointer_create(&scene->world->id, &path->ptr[path->len]);
- path->len++;
-
- return 1;
+ return 1;
+ }
}
/* no path to a world possible */
@@ -342,7 +347,6 @@ static int buttons_context_path_texture(const bContext *C, ButsContextPath *path
Lamp *la;
Brush *br;
World *wo;
- MTex *mtex;
Tex *tex;
PointerRNA *ptr= &path->ptr[path->len-1];
@@ -355,8 +359,7 @@ static int buttons_context_path_texture(const bContext *C, ButsContextPath *path
br= path->ptr[path->len-1].data;
if(br) {
- mtex= br->mtex[(int)br->texact];
- tex= (mtex)? mtex->tex: NULL;
+ tex= give_current_brush_texture(br);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
@@ -368,8 +371,7 @@ static int buttons_context_path_texture(const bContext *C, ButsContextPath *path
wo= path->ptr[path->len-1].data;
if(wo) {
- mtex= wo->mtex[(int)wo->texact];
- tex= (mtex)? mtex->tex: NULL;
+ tex= give_current_world_texture(wo);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
@@ -381,8 +383,7 @@ static int buttons_context_path_texture(const bContext *C, ButsContextPath *path
ma= path->ptr[path->len-1].data;
if(ma) {
- mtex= ma->mtex[(int)ma->texact];
- tex= (mtex)? mtex->tex: NULL;
+ tex= give_current_material_texture(ma);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
@@ -394,8 +395,7 @@ static int buttons_context_path_texture(const bContext *C, ButsContextPath *path
la= path->ptr[path->len-1].data;
if(la) {
- mtex= la->mtex[(int)la->texact];
- tex= (mtex)? mtex->tex: NULL;
+ tex= give_current_lamp_texture(la);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
@@ -437,6 +437,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
* tracing back recursively */
switch(mainb) {
case BCONTEXT_SCENE:
+ case BCONTEXT_RENDER:
found= buttons_context_path_scene(path);
break;
case BCONTEXT_WORLD:
@@ -463,6 +464,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
found= buttons_context_path_texture(C, path);
break;
case BCONTEXT_BONE:
+ case BCONTEXT_BONE_CONSTRAINT:
found= buttons_context_path_bone(path);
if(!found)
found= buttons_context_path_data(path, OB_ARMATURE);
@@ -552,8 +554,8 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
static const char *dir[] = {
"world", "object", "mesh", "armature", "lattice", "curve",
"meta_ball", "lamp", "camera", "material", "material_slot",
- "texture", "texture_slot", "bone", "edit_bone", "particle_system",
- "cloth", "soft_body", "fluid", "smoke", "smoke_hr", "collision", "brush", NULL};
+ "texture", "texture_slot", "bone", "edit_bone", "particle_system", "particle_system_editable",
+ "cloth", "soft_body", "fluid", "smoke", "collision", "brush", NULL};
CTX_data_dir_set(result, dir);
return 1;
@@ -656,6 +658,13 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
set_pointer_type(path, result, &RNA_ParticleSystem);
return 1;
}
+ else if(CTX_data_equals(member, "particle_system_editable")) {
+ if(PE_poll(C))
+ set_pointer_type(path, result, &RNA_ParticleSystem);
+ else
+ CTX_data_pointer_set(result, NULL, &RNA_ParticleSystem, NULL);
+ return 1;
+ }
else if(CTX_data_equals(member, "cloth")) {
PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
@@ -775,7 +784,7 @@ void buttons_context_draw(const bContext *C, uiLayout *layout)
name= RNA_struct_name_get_alloc(ptr, namebuf, sizeof(namebuf));
if(name) {
- if(sbuts->mainb != BCONTEXT_SCENE && ptr->type == &RNA_Scene)
+ if(!ELEM(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE) && ptr->type == &RNA_Scene)
uiItemL(row, "", icon); /* save some space */
else
uiItemL(row, name, icon);
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c
index a1041bc5106..1bf2a058b5a 100644
--- a/source/blender/editors/space_buttons/buttons_header.c
+++ b/source/blender/editors/space_buttons/buttons_header.c
@@ -107,20 +107,24 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
// Default panels
uiBlockBeginAlign(block);
+ if(sbuts->pathflag & (1<<BCONTEXT_RENDER))
+ uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_RENDER, 0, 0, "Render");
if(sbuts->pathflag & (1<<BCONTEXT_SCENE))
- uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_SCENE, 0, 0, "Scene");
+ uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE_DATA, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_SCENE, 0, 0, "Scene");
if(sbuts->pathflag & (1<<BCONTEXT_WORLD))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_WORLD, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_WORLD, 0, 0, "World");
if(sbuts->pathflag & (1<<BCONTEXT_OBJECT))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT_DATA, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(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+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_CONSTRAINT, 0, 0, "Constraint");
+ uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_CONSTRAINT, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_CONSTRAINT, 0, 0, "Object Constraints");
if(sbuts->pathflag & (1<<BCONTEXT_DATA))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, sbuts->dataicon, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(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+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_MODIFIER, 0, 0, "Modifier");
+ uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_MODIFIER, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_MODIFIER, 0, 0, "Modifiers");
if(sbuts->pathflag & (1<<BCONTEXT_BONE))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_BONE_DATA, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_BONE, 0, 0, "Bone");
+ if(sbuts->pathflag & (1<<BCONTEXT_BONE_CONSTRAINT))
+ uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_CONSTRAINT, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_BONE_CONSTRAINT, 0, 0, "Bone Constraints");
if(sbuts->pathflag & (1<<BCONTEXT_MATERIAL))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_MATERIAL, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_MATERIAL, 0, 0, "Material");
if(sbuts->pathflag & (1<<BCONTEXT_TEXTURE))
diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h
index 0a5a5714a06..2e95fde8f99 100644
--- a/source/blender/editors/space_buttons/buttons_intern.h
+++ b/source/blender/editors/space_buttons/buttons_intern.h
@@ -64,33 +64,6 @@ void buttons_context_draw(const struct bContext *C, struct uiLayout *layout);
void buttons_context_register(struct ARegionType *art);
/* buttons_ops.c */
-void OBJECT_OT_group_add(struct wmOperatorType *ot);
-void OBJECT_OT_group_remove(struct wmOperatorType *ot);
-
-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_target(struct wmOperatorType *ot);
-void PARTICLE_OT_remove_target(struct wmOperatorType *ot);
-void PARTICLE_OT_target_move_up(struct wmOperatorType *ot);
-void PARTICLE_OT_target_move_down(struct wmOperatorType *ot);
-void PARTICLE_OT_connect_hair(struct wmOperatorType *ot);
-void PARTICLE_OT_disconnect_hair(struct wmOperatorType *ot);
-
-void SCENE_OT_render_layer_add(struct wmOperatorType *ot);
-void SCENE_OT_render_layer_remove(struct wmOperatorType *ot);
-
void BUTTONS_OT_file_browse(struct wmOperatorType *ot);
void BUTTONS_OT_toolbox(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index b68ea35d118..634b3e36ea7 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -30,54 +30,14 @@
#include "MEM_guardedalloc.h"
-#include "DNA_boid_types.h"
-#include "DNA_curve_types.h"
-#include "DNA_group_types.h"
-#include "DNA_object_types.h"
-#include "DNA_material_types.h"
-#include "DNA_meshdata_types.h"
-#include "DNA_modifier_types.h"
-#include "DNA_node_types.h"
-#include "DNA_texture_types.h"
-#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
-#include "DNA_world_types.h"
-#include "BKE_bvhutils.h"
-#include "BKE_cdderivedmesh.h"
#include "BKE_context.h"
-#include "BKE_depsgraph.h"
-#include "BKE_DerivedMesh.h"
-#include "BKE_group.h"
-#include "BKE_font.h"
-#include "BKE_library.h"
-#include "BKE_main.h"
-#include "BKE_material.h"
-#include "BKE_modifier.h"
-#include "BKE_node.h"
-#include "BKE_particle.h"
-#include "BKE_pointcache.h"
-#include "BKE_scene.h"
-#include "BKE_texture.h"
-#include "BKE_utildefines.h"
-#include "BKE_world.h"
-#include "BKE_tessmesh.h"
-
-#include "BLI_arithb.h"
-#include "BLI_editVert.h"
-#include "BLI_listbase.h"
-
-#include "RNA_access.h"
-#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
-#include "ED_curve.h"
-#include "ED_mesh.h"
-#include "ED_particle.h"
-
#include "RNA_access.h"
#include "RNA_define.h"
@@ -86,950 +46,6 @@
#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";
- ot->description="Add a new material slot or duplicate the selected one.";
-
- /* 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";
- ot->description="Remove the selected material slot.";
-
- /* 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)
-{
- 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_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_material_slot_assign(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Assign Material Slot";
- ot->idname= "OBJECT_OT_material_slot_assign";
- ot->description="Assign the material in the selected material slot to the selected vertices.";
-
- /* 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_GEOM|ND_SELECT, ob->data);
-
- 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";
- ot->description="Select vertices assigned to the selected material slot.";
-
- /* 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";
- ot->description="Deselect vertices assigned to the selected material slot.";
-
- /* 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)
-{
- Material *ma= CTX_data_pointer_get_type(C, "material", &RNA_Material).data;
- Object *ob;
- PointerRNA ptr;
- int index;
-
- /* add or copy material */
- if(ma)
- ma= copy_material(ma);
- else
- ma= add_material("Material");
-
- ma->id.us--; /* compensating for us++ in assign_material */
-
- /* attempt to assign to material slot */
- ptr= CTX_data_pointer_get_type(C, "material_slot", &RNA_MaterialSlot);
-
- if(ptr.data) {
- ob= ptr.id.data;
- index= (Material**)ptr.data - ob->mat;
-
- assign_material(ob, ma, index+1);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
- }
-
- WM_event_add_notifier(C, NC_MATERIAL|NA_ADDED, ma);
-
- return OPERATOR_FINISHED;
-}
-
-void MATERIAL_OT_new(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "New Material";
- ot->idname= "MATERIAL_OT_new";
- ot->description="Add a new material.";
-
- /* api callbacks */
- ot->exec= new_material_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/********************** new texture operator *********************/
-
-static int new_texture_exec(bContext *C, wmOperator *op)
-{
- Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data;
- ID *id;
- MTex *mtex;
- PointerRNA ptr;
-
- /* add or copy texture */
- if(tex)
- tex= copy_texture(tex);
- else
- tex= add_texture("Texture");
-
- id_us_min(&tex->id);
-
- /* attempt to assign to texture slot */
- ptr= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot);
-
- if(ptr.data) {
- id= ptr.id.data;
- mtex= ptr.data;
-
- if(mtex) {
- if(mtex->tex)
- id_us_min(&mtex->tex->id);
- mtex->tex= tex;
- id_us_plus(&tex->id);
- }
-
- /* XXX nodes, notifier .. */
- }
-
- WM_event_add_notifier(C, NC_TEXTURE|NA_ADDED, tex);
-
- return OPERATOR_FINISHED;
-}
-
-void TEXTURE_OT_new(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "New Texture";
- ot->idname= "TEXTURE_OT_new";
- ot->description="Add a new texture.";
-
- /* api callbacks */
- ot->exec= new_texture_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/********************** new world operator *********************/
-
-static int new_world_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- World *wo= CTX_data_pointer_get_type(C, "world", &RNA_World).data;
-
- /* add or copy world */
- if(wo)
- wo= copy_world(wo);
- else
- wo= add_world("World");
-
- /* assign to scene */
- if(scene->world)
- id_us_min(&scene->world->id);
- scene->world= wo;
-
- WM_event_add_notifier(C, NC_WORLD|NA_ADDED, wo);
-
- return OPERATOR_FINISHED;
-}
-
-void WORLD_OT_new(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "New World";
- ot->idname= "WORLD_OT_new";
- ot->description= "Add a new world.";
-
- /* api callbacks */
- ot->exec= new_world_exec;
-
- /* flags */
- 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";
- ot->description="Add a particle system.";
-
- /* 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";
- ot->description="Remove the selected particle system.";
-
- /* api callbacks */
- ot->exec= particle_system_remove_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/********************** new particle settings operator *********************/
-
-static int psys_poll(bContext *C)
-{
- PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- return (ptr.data != NULL);
-}
-
-static int new_particle_settings_exec(bContext *C, wmOperator *op)
-{
- Scene *scene = CTX_data_scene(C);
- 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("ParticleSettings", bmain);
-
- ob= ptr.id.data;
-
- if(psys->part)
- psys->part->id.us--;
-
- psys->part = part;
-
- psys_check_boid_data(psys);
-
- DAG_scene_sort(scene);
- DAG_id_flush_update(&ob->id, 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";
- ot->description="Add new particle settings.";
-
- /* api callbacks */
- ot->exec= new_particle_settings_exec;
- ot->poll= psys_poll;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/********************** keyed particle target operators *********************/
-
-static int new_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;
-
- ParticleTarget *pt;
-
- if(!psys)
- return OPERATOR_CANCELLED;
-
- pt = psys->targets.first;
- for(; pt; pt=pt->next)
- pt->flag &= ~PTARGET_CURRENT;
-
- pt = MEM_callocN(sizeof(ParticleTarget), "keyed particle target");
-
- pt->flag |= PTARGET_CURRENT;
- pt->psys = 1;
-
- BLI_addtail(&psys->targets, pt);
-
- DAG_scene_sort(scene);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
-
- return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_new_target(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "New Particle Target";
- ot->idname= "PARTICLE_OT_new_target";
- ot->description="Add a new particle target.";
-
- /* api callbacks */
- ot->exec= new_particle_target_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-static int remove_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;
-
- ParticleTarget *pt;
-
- if(!psys)
- return OPERATOR_CANCELLED;
-
- pt = psys->targets.first;
- for(; pt; pt=pt->next) {
- if(pt->flag & PTARGET_CURRENT) {
- BLI_remlink(&psys->targets, pt);
- MEM_freeN(pt);
- break;
- }
-
- }
- pt = psys->targets.last;
-
- if(pt)
- pt->flag |= PTARGET_CURRENT;
-
- DAG_scene_sort(scene);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
-
- return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_remove_target(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Remove Particle Target";
- ot->idname= "PARTICLE_OT_remove_target";
- ot->description="Remove the selected particle target.";
-
- /* api callbacks */
- ot->exec= remove_particle_target_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/************************ move up particle target operator *********************/
-
-static int target_move_up_exec(bContext *C, wmOperator *op)
-{
- PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= ptr.data;
- Object *ob = ptr.id.data;
- ParticleTarget *pt;
-
- if(!psys)
- return OPERATOR_CANCELLED;
-
- pt = psys->targets.first;
- for(; pt; pt=pt->next) {
- if(pt->flag & PTARGET_CURRENT && pt->prev) {
- BLI_remlink(&psys->targets, pt);
- BLI_insertlink(&psys->targets, pt->prev->prev, pt);
-
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
- break;
- }
- }
-
- return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_target_move_up(wmOperatorType *ot)
-{
- ot->name= "Move Up Target";
- ot->idname= "PARTICLE_OT_target_move_up";
- ot->description= "Move particle target up in the list.";
-
- ot->exec= target_move_up_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/************************ move down particle target operator *********************/
-
-static int target_move_down_exec(bContext *C, wmOperator *op)
-{
- PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= ptr.data;
- Object *ob = ptr.id.data;
- ParticleTarget *pt;
-
- if(!psys)
- return OPERATOR_CANCELLED;
- pt = psys->targets.first;
- for(; pt; pt=pt->next) {
- if(pt->flag & PTARGET_CURRENT && pt->next) {
- BLI_remlink(&psys->targets, pt);
- BLI_insertlink(&psys->targets, pt->next, pt);
-
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
- break;
- }
- }
-
- return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_target_move_down(wmOperatorType *ot)
-{
- ot->name= "Move Down Target";
- ot->idname= "PARTICLE_OT_target_move_down";
- ot->description= "Move particle target down in the list.";
-
- ot->exec= target_move_down_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/************************ connect/disconnect hair operators *********************/
-
-static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
-{
- ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys);
- ParticleData *pa = psys->particles;
- PTCacheEdit *edit = psys->edit;
- PTCacheEditPoint *point = edit ? edit->points : NULL;
- PTCacheEditKey *ekey = NULL;
- HairKey *key;
- int i, k;
- float hairmat[4][4];
-
- if(!ob || !psys || psys->flag & PSYS_GLOBAL_HAIR)
- return;
-
- if(!psys->part || psys->part->type != PART_HAIR)
- return;
-
- for(i=0; i<psys->totpart; i++,pa++) {
- if(point) {
- ekey = point->keys;
- point++;
- }
-
- psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
-
- for(k=0,key=pa->hair; k<pa->totkey; k++,key++) {
- Mat4MulVecfl(hairmat,key->co);
-
- if(ekey) {
- ekey->flag &= ~PEK_USE_WCO;
- ekey++;
- }
- }
- }
-
- psys_free_path_cache(psys, psys->edit);
-
- psys->flag |= PSYS_GLOBAL_HAIR;
-
- PE_update_object(scene, ob, 0);
-}
-
-static int disconnect_hair_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= NULL;
- int all = RNA_boolean_get(op->ptr, "all");
-
- if(!ob)
- return OPERATOR_CANCELLED;
-
- if(all) {
- for(psys=ob->particlesystem.first; psys; psys=psys->next) {
- disconnect_hair(scene, ob, psys);
- }
- }
- else {
- psys = ptr.data;
- disconnect_hair(scene, ob, psys);
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
-
- return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_disconnect_hair(wmOperatorType *ot)
-{
- ot->name= "Disconnect Hair";
- ot->description= "Disconnect hair from the emitter mesh.";
- ot->idname= "PARTICLE_OT_disconnect_hair";
-
- ot->exec= disconnect_hair_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_boolean(ot->srna, "all", 0, "All hair", "Disconnect all hair systems from the emitter mesh");
-}
-
-static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
-{
- ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys);
- ParticleData *pa = psys->particles;
- PTCacheEdit *edit = psys->edit;
- PTCacheEditPoint *point = edit ? edit->points : NULL;
- PTCacheEditKey *ekey;
- HairKey *key;
- BVHTreeFromMesh bvhtree;
- BVHTreeNearest nearest;
- MFace *mface;
- DerivedMesh *dm = NULL;
- int numverts;
- int i, k;
- float hairmat[4][4], imat[4][4];
- float v[4][3], vec[3];
-
- if(!psys || !psys->part || psys->part->type != PART_HAIR)
- return;
-
- if(psmd->dm->deformedOnly)
- dm= psmd->dm;
- else
- dm= mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
-
- numverts = dm->getNumVerts (dm);
-
- memset( &bvhtree, 0, sizeof(bvhtree) );
-
- /* convert to global coordinates */
- for (i=0; i<numverts; i++)
- Mat4MulVecfl (ob->obmat, CDDM_get_vert(dm, i)->co);
-
- bvhtree_from_mesh_faces(&bvhtree, dm, 0.0, 2, 6);
-
- for(i=0; i<psys->totpart; i++,pa++) {
- key = pa->hair;
-
- nearest.index = -1;
- nearest.dist = FLT_MAX;
-
- BLI_bvhtree_find_nearest(bvhtree.tree, key->co, &nearest, bvhtree.nearest_callback, &bvhtree);
-
- if(nearest.index == -1) {
- printf("No nearest point found for hair root!");
- continue;
- }
-
- mface = CDDM_get_tessface(dm,nearest.index);
-
- VecCopyf(v[0], CDDM_get_vert(dm,mface->v1)->co);
- VecCopyf(v[1], CDDM_get_vert(dm,mface->v2)->co);
- VecCopyf(v[2], CDDM_get_vert(dm,mface->v3)->co);
- if(mface->v4) {
- VecCopyf(v[3], CDDM_get_vert(dm,mface->v4)->co);
- MeanValueWeights(v, 4, nearest.co, pa->fuv);
- }
- else
- MeanValueWeights(v, 3, nearest.co, pa->fuv);
-
- pa->num = nearest.index;
- pa->num_dmcache = psys_particle_dm_face_lookup(ob,psmd->dm,pa->num,pa->fuv,NULL);
-
- psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
- Mat4Invert(imat,hairmat);
-
- VECSUB(vec, nearest.co, key->co);
-
- if(point) {
- ekey = point->keys;
- point++;
- }
-
- for(k=0,key=pa->hair; k<pa->totkey; k++,key++) {
- VECADD(key->co, key->co, vec);
- Mat4MulVecfl(imat,key->co);
-
- if(ekey) {
- ekey->flag |= PEK_USE_WCO;
- ekey++;
- }
- }
- }
-
- free_bvhtree_from_mesh(&bvhtree);
- if(!psmd->dm->deformedOnly)
- dm->release(dm);
-
- psys_free_path_cache(psys, psys->edit);
-
- psys->flag &= ~PSYS_GLOBAL_HAIR;
-
- PE_update_object(scene, ob, 0);
-}
-
-static int connect_hair_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= NULL;
- int all = RNA_boolean_get(op->ptr, "all");
-
- if(!ob)
- return OPERATOR_CANCELLED;
-
- if(all) {
- for(psys=ob->particlesystem.first; psys; psys=psys->next) {
- connect_hair(scene, ob, psys);
- }
- }
- else {
- psys = ptr.data;
- connect_hair(scene, ob, psys);
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
-
- return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_connect_hair(wmOperatorType *ot)
-{
- ot->name= "Connect Hair";
- ot->description= "Connect hair to the emitter mesh.";
- ot->idname= "PARTICLE_OT_connect_hair";
-
- ot->exec= connect_hair_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_boolean(ot->srna, "all", 0, "All hair", "Connect all hair systems to the emitter mesh");
-}
-
-/********************** render layer operators *********************/
-
-static int render_layer_add_exec(bContext *C, wmOperator *op)
-{
- 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";
- ot->description="Add a render layer.";
-
- /* 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";
- ot->description="Remove the selected render layer.";
-
- /* api callbacks */
- ot->exec= render_layer_remove_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
/********************** toolbox operator *********************/
static int toolbox_invoke(bContext *C, wmOperator *op, wmEvent *event)
@@ -1054,8 +70,8 @@ void BUTTONS_OT_toolbox(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Toolbox";
+ ot->description="Display button panel toolbox";
ot->idname= "BUTTONS_OT_toolbox";
- ot->description="Toolbar panel? DOC_BROKEN";
/* api callbacks */
ot->invoke= toolbox_invoke;
@@ -1111,7 +127,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event)
op->customdata= fbo;
str= RNA_property_string_get_alloc(&ptr, prop, 0, 0);
- RNA_string_set(op->ptr, "filename", str);
+ RNA_string_set(op->ptr, "path", str);
MEM_freeN(str);
WM_event_add_fileselect(C, op);
@@ -1123,8 +139,8 @@ void BUTTONS_OT_file_browse(wmOperatorType *ot)
{
/* identifiers */
ot->name= "File Browse";
- ot->idname= "BUTTONS_OT_file_browse";
ot->description="Open a file browser.";
+ ot->idname= "BUTTONS_OT_file_browse";
/* api callbacks */
ot->invoke= file_browse_invoke;
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index d4ad77daca7..c1f06d99985 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -57,7 +57,7 @@
#include "UI_resources.h"
#include "UI_view2d.h"
-#include "ED_previewrender.h"
+#include "ED_render.h"
#include "buttons_intern.h" // own include
@@ -138,11 +138,11 @@ static SpaceLink *buttons_duplicate(SpaceLink *sl)
/* add handlers, stuff you only do once or on area/region changes */
static void buttons_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_listbase(wm, "Buttons Generic", SPACE_BUTS, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "Buttons Generic", SPACE_BUTS, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -156,6 +156,8 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar)
if(sbuts->mainb == BCONTEXT_SCENE)
ED_region_panels(C, ar, vertical, "scene", sbuts->mainb);
+ else if(sbuts->mainb == BCONTEXT_RENDER)
+ ED_region_panels(C, ar, vertical, "render", sbuts->mainb);
else if(sbuts->mainb == BCONTEXT_WORLD)
ED_region_panels(C, ar, vertical, "world", sbuts->mainb);
else if(sbuts->mainb == BCONTEXT_OBJECT)
@@ -176,6 +178,8 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar)
ED_region_panels(C, ar, vertical, "modifier", sbuts->mainb);
else if (sbuts->mainb == BCONTEXT_CONSTRAINT)
ED_region_panels(C, ar, vertical, "constraint", sbuts->mainb);
+ else if(sbuts->mainb == BCONTEXT_BONE_CONSTRAINT)
+ ED_region_panels(C, ar, vertical, "bone_constraint", sbuts->mainb);
sbuts->re_align= 0;
sbuts->mainbo= sbuts->mainb;
@@ -183,40 +187,13 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar)
void buttons_operatortypes(void)
{
- WM_operatortype_append(OBJECT_OT_group_add);
- WM_operatortype_append(OBJECT_OT_group_remove);
-
- 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_target);
- WM_operatortype_append(PARTICLE_OT_remove_target);
- WM_operatortype_append(PARTICLE_OT_target_move_up);
- WM_operatortype_append(PARTICLE_OT_target_move_down);
- WM_operatortype_append(PARTICLE_OT_connect_hair);
- WM_operatortype_append(PARTICLE_OT_disconnect_hair);
-
- WM_operatortype_append(SCENE_OT_render_layer_add);
- WM_operatortype_append(SCENE_OT_render_layer_remove);
-
WM_operatortype_append(BUTTONS_OT_toolbox);
WM_operatortype_append(BUTTONS_OT_file_browse);
}
-void buttons_keymap(struct wmWindowManager *wm)
+void buttons_keymap(struct wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Buttons Generic", SPACE_BUTS, 0);
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "Buttons Generic", SPACE_BUTS, 0);
WM_keymap_add_item(keymap, "BUTTONS_OT_toolbox", RIGHTMOUSE, KM_PRESS, 0, 0);
}
@@ -259,58 +236,6 @@ static void buttons_header_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_restore(C);
}
-#if 0
-/* add handlers, stuff you only do once or on area/region changes */
-static void buttons_context_area_init(wmWindowManager *wm, ARegion *ar)
-{
- UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
-}
-
-#define CONTEXTY 30
-
-static void buttons_context_area_draw(const bContext *C, ARegion *ar)
-{
- SpaceButs *sbuts= CTX_wm_space_buts(C);
- uiStyle *style= U.uistyles.first;
- uiBlock *block;
- uiLayout *layout;
- View2D *v2d= &ar->v2d;
- float col[3];
- int x, y, w, h;
-
- buttons_context_compute(C, sbuts);
-
- w= v2d->cur.xmax - v2d->cur.xmin;
- h= v2d->cur.ymax - v2d->cur.ymin;
- UI_view2d_view_ortho(C, v2d);
-
- /* create UI */
- block= uiBeginBlock(C, ar, "buttons_context", UI_EMBOSS);
- layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_PANEL,
- style->panelspace, h - (h-UI_UNIT_Y)/2, w, 20, style);
-
- buttons_context_draw(C, layout);
-
- uiBlockLayoutResolve(C, block, &x, &y);
- uiEndBlock(C, block);
-
- /* draw */
- UI_SetTheme(SPACE_BUTS, RGN_TYPE_WINDOW); /* XXX */
-
- UI_GetThemeColor3fv(TH_BACK, col);
- glClearColor(col[0], col[1], col[2], 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- UI_view2d_totRect_set(v2d, x, -y);
- UI_view2d_view_ortho(C, v2d);
-
- uiDrawBlock(C, block);
-
- /* restore view matrix */
- UI_view2d_view_restore(C);
-}
-#endif
-
/* reused! */
static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
{
@@ -424,19 +349,6 @@ void ED_spacetype_buttons(void)
art->draw= buttons_header_area_draw;
BLI_addhead(&st->regiontypes, art);
-#if 0
- /* regions: context */
- art= MEM_callocN(sizeof(ARegionType), "spacetype buttons region");
- art->regionid = RGN_TYPE_CHANNELS;
- art->minsizey= CONTEXTY;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES;
- art->init= buttons_context_area_init;
- art->draw= buttons_context_area_draw;;
- art->listener= buttons_area_listener;
-
- BLI_addhead(&st->regiontypes, art);
-#endif
-
BKE_spacetype_register(st);
}
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index 2120b97becf..ccf7dbff946 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -51,6 +51,7 @@
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_report.h"
+#include "BKE_text.h" /* only for character utility funcs */
#include "WM_api.h"
#include "WM_types.h"
@@ -119,6 +120,48 @@ static int console_line_cursor_set(ConsoleLine *cl, int cursor)
return 1;
}
+static char cursor_char(ConsoleLine *cl)
+{
+ /* assume cursor is clamped */
+ return cl->line[cl->cursor];
+}
+
+static char cursor_char_prev(ConsoleLine *cl)
+{
+ /* assume cursor is clamped */
+ if(cl->cursor <= 0)
+ return '\0';
+
+ return cl->line[cl->cursor-1];
+}
+
+static char cursor_char_next(ConsoleLine *cl)
+{
+ /* assume cursor is clamped */
+ if(cl->cursor + 1 >= cl->len)
+ return '\0';
+
+ return cl->line[cl->cursor+1];
+}
+
+static void console_lb_debug__internal(ListBase *lb)
+{
+ ConsoleLine *cl;
+
+ printf("%d: ", BLI_countlist(lb));
+ for(cl= lb->first; cl; cl= cl->next)
+ printf("<%s> ", cl->line);
+ printf("\n");
+
+}
+
+static void console_history_debug(const bContext *C)
+{
+ SpaceConsole *sc= CTX_wm_space_console(C);
+
+ console_lb_debug__internal(&sc->history);
+}
+
static ConsoleLine *console_lb_add__internal(ListBase *lb, ConsoleLine *from)
{
ConsoleLine *ci= MEM_callocN(sizeof(ConsoleLine), "ConsoleLine Add");
@@ -251,7 +294,7 @@ static EnumPropertyItem move_type_items[]= {
{PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""},
{NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
{0, NULL, 0, NULL, NULL}};
-
+
static int move_exec(bContext *C, wmOperator *op)
{
ConsoleLine *ci= console_history_verify(C);
@@ -272,6 +315,37 @@ static int move_exec(bContext *C, wmOperator *op)
case NEXT_CHAR:
done= console_line_cursor_set(ci, ci->cursor+1);
break;
+
+ /* - if the character is a delimiter then skip delimiters (including white space)
+ * - when jump over the word */
+ case PREV_WORD:
+ while(text_check_delim(cursor_char_prev(ci)))
+ if(console_line_cursor_set(ci, ci->cursor-1)==FALSE)
+ break;
+
+ while(text_check_delim(cursor_char_prev(ci))==FALSE)
+ if(console_line_cursor_set(ci, ci->cursor-1)==FALSE)
+ break;
+
+ /* This isnt used for NEXT_WORD because when going back
+ * its more useful to have the cursor directly after a word then whitespace */
+ while(text_check_whitespace(cursor_char_prev(ci))==TRUE)
+ if(console_line_cursor_set(ci, ci->cursor-1)==FALSE)
+ break;
+
+ done= 1; /* assume changed */
+ break;
+ case NEXT_WORD:
+ while(text_check_delim(cursor_char(ci))==TRUE)
+ if (console_line_cursor_set(ci, ci->cursor+1)==FALSE)
+ break;
+
+ while(text_check_delim(cursor_char(ci))==FALSE)
+ if (console_line_cursor_set(ci, ci->cursor+1)==FALSE)
+ break;
+
+ done= 1; /* assume changed */
+ break;
}
if(done) {
@@ -466,7 +540,16 @@ static int history_cycle_exec(bContext *C, wmOperator *op)
ConsoleLine *ci= console_history_verify(C); /* TODO - stupid, just prevernts crashes when no command line */
short reverse= RNA_boolean_get(op->ptr, "reverse"); /* assumes down, reverse is up */
-
+
+ /* keep a copy of the line above so when history is cycled
+ * this is the only function that needs to know about the double-up */
+ if(ci->prev) {
+ ConsoleLine *ci_prev= (ConsoleLine *)ci->prev;
+
+ if(strcmp(ci->line, ci_prev->line)==0)
+ console_history_free(sc, ci_prev);
+ }
+
if(reverse) { /* last item in mistory */
ci= sc->history.last;
BLI_remlink(&sc->history, ci);
@@ -477,9 +560,17 @@ static int history_cycle_exec(bContext *C, wmOperator *op)
BLI_remlink(&sc->history, ci);
BLI_addtail(&sc->history, ci);
}
-
+
+ { /* add a duplicate of the new arg and remove all other instances */
+ ConsoleLine *cl;
+ while((cl= console_history_find(sc, ci->line, ci)))
+ console_history_free(sc, cl);
+
+ console_history_add(C, (ConsoleLine *)sc->history.last);
+ }
+
ED_area_tag_redraw(CTX_wm_area(C));
-
+
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index dfaaa269970..49bc3adb5b9 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -147,12 +147,12 @@ static SpaceLink *console_duplicate(SpaceLink *sl)
/* add handlers, stuff you only do once or on area/region changes */
static void console_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "Console", SPACE_CONSOLE, 0); /* XXX weak? */
+ keymap= WM_keymap_find(wm->defaultconf, "Console", SPACE_CONSOLE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -174,6 +174,9 @@ static void console_main_area_draw(const bContext *C, ARegion *ar)
console_scrollback_add_str(C, "Autocomplete: Ctrl+Space", 0);
console_scrollback_add_str(C, "Ctrl +/- Wheel: Zoom", 0);
console_scrollback_add_str(C, "Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.ui", 0);
+
+ /* This is normally set by python but to start with its easier just to set it like this rather then running python with no args */
+ strcpy(sc->prompt, ">>> ");
}
/* clear and setup matrix */
@@ -229,17 +232,17 @@ void console_operatortypes(void)
WM_operatortype_append(CONSOLE_OT_report_copy);
}
-void console_keymap(struct wmWindowManager *wm)
+void console_keymap(struct wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Console", SPACE_CONSOLE, 0);
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "Console", SPACE_CONSOLE, 0);
- #ifdef __APPLE__
+#ifdef __APPLE__
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_END);
- #endif
+#endif
- RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", LINE_BEGIN);
- RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", LINE_END);
+ RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", PREV_WORD);
+ RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", NEXT_WORD);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", HOMEKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_BEGIN);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", ENDKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_END);
diff --git a/source/blender/editors/space_file/SConscript b/source/blender/editors/space_file/SConscript
index e6fba38fb8f..b22a265dcbc 100644
--- a/source/blender/editors/space_file/SConscript
+++ b/source/blender/editors/space_file/SConscript
@@ -15,4 +15,11 @@ if env['WITH_BF_OPENJPEG']:
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
+if env['OURPLATFORM'] == 'linux2':
+ cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( 'bf_editors_space_file', sources, Split(incs), defs, libtype=['core'], priority=[115] )
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 00024ffa961..77a1b671054 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -133,24 +133,24 @@ static void do_file_buttons(bContext *C, void *arg, int event)
void file_draw_buttons(const bContext *C, ARegion *ar)
{
/* Button layout. */
- const short min_x = 10;
- const short max_x = ar->winx - 10;
- const short line1_y = IMASEL_BUTTONS_HEIGHT/2 + IMASEL_BUTTONS_MARGIN*2;
- const short line2_y = IMASEL_BUTTONS_MARGIN;
- 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;
+ const int min_x = 10;
+ const int max_x = ar->winx - 10;
+ const int line1_y = IMASEL_BUTTONS_HEIGHT/2 + IMASEL_BUTTONS_MARGIN*2;
+ const int line2_y = IMASEL_BUTTONS_MARGIN;
+ const int input_minw = 20;
+ const int btn_h = UI_UNIT_Y;
+ const int btn_fn_w = UI_UNIT_X;
+ const int btn_minw = 80;
+ const int btn_margin = 20;
+ const int 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;
+ int loadbutton;
+ int fnumbuttons;
+ int available_w = max_x - min_x;
+ int line1_w = available_w;
+ int line2_w = available_w;
uiBut* but;
uiBlock* block;
@@ -189,7 +189,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
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,
+ params->dir, 0.0, (float)FILE_MAX-1, 0, 0,
"File path.");
uiButSetCompleteFunc(but, autocomplete_directory, NULL);
uiDefBut(block, TEX, B_FS_FILENAME, "",
@@ -230,7 +230,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
}
-static void draw_tile(short sx, short sy, short width, short height, int colorid, int shade)
+static void draw_tile(int sx, int sy, int width, int height, int colorid, int shade)
{
UI_ThemeColorShade(colorid, shade);
uiSetRoundBox(15);
@@ -310,25 +310,25 @@ static int get_file_icon(struct direntry *file)
return ICON_FILE_BLANK;
}
-static void file_draw_icon(short sx, short sy, int icon, short width, short height)
+static void file_draw_icon(int sx, int sy, int icon, int width, int height)
{
float x,y;
- int blend=0;
+ float alpha=1.0f;
x = (float)(sx);
y = (float)(sy-height);
- if (icon == ICON_FILE_BLANK) blend = -80;
+ if (icon == ICON_FILE_BLANK) alpha = 0.375f;
glEnable(GL_BLEND);
- UI_icon_draw_aspect_blended(x, y, icon, 1.f, blend);
+ UI_icon_draw_aspect(x, y, icon, 1.f, alpha);
}
-static void file_draw_string(short sx, short sy, const char* string, float width, short height, int flag)
+static void file_draw_string(int sx, int sy, const char* string, float width, int height, int flag)
{
- short soffs;
+ int soffs;
char fname[FILE_MAXFILE];
float sw;
float x,y;
@@ -350,18 +350,19 @@ void file_calc_previews(const bContext *C, ARegion *ar)
View2D *v2d= &ar->v2d;
ED_fileselect_init_layout(sfile, ar);
- UI_view2d_totRect_set(v2d, sfile->layout->width, sfile->layout->height);
+ /* +SCROLL_HEIGHT is bad hack to work around issue in UI_view2d_totRect_set */
+ UI_view2d_totRect_set(v2d, sfile->layout->width, sfile->layout->height+V2D_SCROLL_HEIGHT);
}
-static void file_draw_preview(short sx, short sy, ImBuf *imb, FileLayout *layout, short dropshadow)
+static void file_draw_preview(int sx, int sy, ImBuf *imb, FileLayout *layout, short dropshadow)
{
if (imb) {
float fx, fy;
float dx, dy;
- short xco, yco;
+ int xco, yco;
float scaledx, scaledy;
float scale;
- short ex, ey;
+ int ex, ey;
if ( (imb->x > layout->prv_w) || (imb->y > layout->prv_h) ) {
if (imb->x > imb->y) {
@@ -379,8 +380,8 @@ static void file_draw_preview(short sx, short sy, ImBuf *imb, FileLayout *layout
scaledy = (float)imb->y;
scale = 1.0;
}
- ex = (short)scaledx;
- ey = (short)scaledy;
+ ex = (int)scaledx;
+ ey = (int)scaledy;
fx = ((float)layout->prv_w - (float)ex)/2.0f;
fy = ((float)layout->prv_h - (float)ey)/2.0f;
dx = (fx + 0.5f + layout->prv_border_x);
@@ -442,7 +443,7 @@ static void renamebutton_cb(bContext *C, void *arg1, char *oldname)
static void draw_background(FileLayout *layout, View2D *v2d)
{
int i;
- short sy;
+ int sy;
/* alternating flat shade background */
for (i=0; (i <= layout->rows); i+=2)
@@ -457,7 +458,7 @@ static void draw_background(FileLayout *layout, View2D *v2d)
static void draw_dividers(FileLayout *layout, View2D *v2d)
{
- short sx;
+ int sx;
/* vertical column dividers */
sx = v2d->tot.xmin;
@@ -483,7 +484,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
int numfiles;
int numfiles_layout;
int colorid = 0;
- short sx, sy;
+ int sx, sy;
int offset;
int i;
float sw, spos;
@@ -491,12 +492,6 @@ void file_draw_list(const bContext *C, ARegion *ar)
numfiles = filelist_numfiles(files);
- sx = ar->v2d.tot.xmin + layout->tile_border_x/2;
- sy = ar->v2d.cur.ymax - layout->tile_border_y;
-
- offset = ED_fileselect_layout_offset(layout, 0, 0);
- if (offset<0) offset=0;
-
if (params->display != FILE_IMGDISPLAY) {
draw_background(layout, v2d);
@@ -504,9 +499,9 @@ void file_draw_list(const bContext *C, ARegion *ar)
draw_dividers(layout, v2d);
}
- sx = ar->v2d.cur.xmin + layout->tile_border_x;
- sy = ar->v2d.cur.ymax - layout->tile_border_y;
-
+ offset = ED_fileselect_layout_offset(layout, ar->v2d.cur.xmin, -ar->v2d.cur.ymax);
+ if (offset<0) offset=0;
+
numfiles_layout = ED_fileselect_layout_numfiles(layout, ar);
for (i=offset; (i < numfiles) && (i<offset+numfiles_layout); ++i)
@@ -552,7 +547,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
sw = file_string_width(file->relname);
if (file->flags & EDITING) {
- short but_width = (FILE_IMGDISPLAY == params->display) ? layout->tile_w : layout->column_widths[COLUMN_NAME];
+ int but_width = (FILE_IMGDISPLAY == params->display) ? layout->tile_w : layout->column_widths[COLUMN_NAME];
uiBlock *block = uiBeginBlock(C, ar, "FileName", UI_EMBOSS);
uiBut *but = uiDefBut(block, TEX, 1, "", spos, sy-layout->tile_h-3,
but_width, layout->textheight*2, file->relname, 1.0f, (float)FILE_MAX,0,0,"");
@@ -573,15 +568,14 @@ void file_draw_list(const bContext *C, ARegion *ar)
spos += layout->column_widths[COLUMN_NAME] + 12;
if (!(file->type & S_IFDIR)) {
sw = file_string_width(file->size);
- spos += layout->column_widths[COLUMN_SIZE] + 12 - sw;
file_draw_string(spos, sy, file->size, sw+1, layout->tile_h, FILE_SHORTEN_END);
+ spos += layout->column_widths[COLUMN_SIZE] + 12;
}
} else if (params->display == FILE_LONGDISPLAY) {
spos += layout->column_widths[COLUMN_NAME] + 12;
#ifndef WIN32
/* rwx rwx rwx */
- spos += 20;
sw = file_string_width(file->mode1);
file_draw_string(spos, sy, file->mode1, sw, layout->tile_h, FILE_SHORTEN_END);
spos += layout->column_widths[COLUMN_MODE1] + 12;
@@ -609,8 +603,8 @@ void file_draw_list(const bContext *C, ARegion *ar)
if (!(file->type & S_IFDIR)) {
sw = file_string_width(file->size);
- spos += layout->column_widths[COLUMN_SIZE] + 12 - sw;
file_draw_string(spos, sy, file->size, sw, layout->tile_h, FILE_SHORTEN_END);
+ spos += layout->column_widths[COLUMN_SIZE] + 12;
}
}
}
diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h
index a99594e9575..d07ffd4b964 100644
--- a/source/blender/editors/space_file/file_intern.h
+++ b/source/blender/editors/space_file/file_intern.h
@@ -88,7 +88,7 @@ int file_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);
+void file_change_dir(struct SpaceFile *sfile, int checkdir);
int file_select_match(struct SpaceFile *sfile, const char *pattern);
void autocomplete_directory(struct bContext *C, char *str, void *arg_v);
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 0e0ad88906e..c35ff6ed7b6 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -68,25 +68,15 @@
/* ---------- FILE SELECTION ------------ */
-static int find_file_mouse(SpaceFile *sfile, struct ARegion* ar, short x, short y, short clamp)
+static int find_file_mouse(SpaceFile *sfile, struct ARegion* ar, int x, int y)
{
float fx,fy;
int active_file = -1;
- int numfiles = filelist_numfiles(sfile->files);
View2D* v2d = &ar->v2d;
UI_view2d_region_to_view(v2d, x, y, &fx, &fy);
active_file = ED_fileselect_layout_offset(sfile->layout, v2d->tot.xmin + fx, v2d->tot.ymax - fy);
-
- if(active_file < 0) {
- if(clamp) active_file= 0;
- else active_file= -1;
- }
- else if(active_file >= numfiles) {
- if(clamp) active_file= numfiles-1;
- else active_file= -1;
- }
return active_file;
}
@@ -109,6 +99,31 @@ typedef enum FileSelect { FILE_SELECT_DIR = 1,
FILE_SELECT_FILE = 2 } FileSelect;
+static void clamp_to_filelist(int numfiles, int *first_file, int *last_file)
+{
+ /* border select before the first file */
+ if ( (*first_file < 0) && (*last_file >=0 ) ) {
+ *first_file = 0;
+ }
+ /* don't select if everything is outside filelist */
+ if ( (*first_file >= numfiles) && ((*last_file < 0) || (*last_file >= numfiles)) ) {
+ *first_file = -1;
+ *last_file = -1;
+ }
+
+ /* fix if last file invalid */
+ if ( (*first_file > 0) && (*last_file < 0) )
+ *last_file = numfiles-1;
+
+ /* clamp */
+ if ( (*first_file >= numfiles) ) {
+ *first_file = numfiles-1;
+ }
+ if ( (*last_file >= numfiles) ) {
+ *last_file = numfiles-1;
+ }
+}
+
static FileSelect file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, short val)
{
int first_file = -1;
@@ -123,9 +138,11 @@ static FileSelect file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, s
int numfiles = filelist_numfiles(sfile->files);
params->selstate = NOTACTIVE;
- first_file = find_file_mouse(sfile, ar, rect->xmin, rect->ymax, 1);
- last_file = find_file_mouse(sfile, ar, rect->xmax, rect->ymin, 1);
+ first_file = find_file_mouse(sfile, ar, rect->xmin, rect->ymax);
+ last_file = find_file_mouse(sfile, ar, rect->xmax, rect->ymin);
+ clamp_to_filelist(numfiles, &first_file, &last_file);
+
/* select all valid files between first and last indicated */
if ( (first_file >= 0) && (first_file < numfiles) && (last_file >= 0) && (last_file < numfiles) ) {
for (act_file = first_file; act_file <= last_file; act_file++) {
@@ -137,6 +154,9 @@ static FileSelect file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, s
}
}
+ /* Don't act on multiple selected files */
+ if (first_file != last_file) selecting= 0;
+
/* make the last file active */
if (selecting && (last_file >= 0 && last_file < numfiles)) {
struct direntry* file = filelist_file(sfile->files, last_file);
@@ -157,7 +177,7 @@ static FileSelect file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, s
BLI_add_slash(params->dir);
}
- file_change_dir(sfile);
+ file_change_dir(sfile, 0);
retval = FILE_SELECT_DIR;
}
}
@@ -168,7 +188,7 @@ static FileSelect file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, s
}
}
- }
+ }
return retval;
}
@@ -201,6 +221,7 @@ void FILE_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Activate/Select File";
+ ot->description= "Activate/select the file(s) contained in the border.";
ot->idname= "FILE_OT_select_border";
/* api callbacks */
@@ -253,6 +274,7 @@ void FILE_OT_select(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Activate/Select File";
+ ot->description= "Activate/select file.";
ot->idname= "FILE_OT_select";
/* api callbacks */
@@ -297,6 +319,7 @@ void FILE_OT_select_all_toggle(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select/Deselect all files";
+ ot->description= "Select/deselect all files.";
ot->idname= "FILE_OT_select_all_toggle";
/* api callbacks */
@@ -320,7 +343,7 @@ static int bookmark_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
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);
+ file_change_dir(sfile, 1);
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
}
@@ -332,6 +355,7 @@ void FILE_OT_select_bookmark(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select Directory";
+ ot->description= "Select a bookmarked directory.";
ot->idname= "FILE_OT_select_bookmark";
/* api callbacks */
@@ -364,6 +388,7 @@ void FILE_OT_add_bookmark(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Bookmark";
+ ot->description= "Add a bookmark for the selected/active directory.";
ot->idname= "FILE_OT_add_bookmark";
/* api callbacks */
@@ -396,6 +421,7 @@ void FILE_OT_delete_bookmark(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Delete Bookmark";
+ ot->description= "Delete selected bookmark.";
ot->idname= "FILE_OT_delete_bookmark";
/* api callbacks */
@@ -425,6 +451,7 @@ void FILE_OT_loadimages(wmOperatorType *ot)
/* identifiers */
ot->name= "Load Images";
+ ot->description= "Load selected image(s).";
ot->idname= "FILE_OT_loadimages";
/* api callbacks */
@@ -449,7 +476,7 @@ int file_hilight_set(SpaceFile *sfile, ARegion *ar, int mx, int my)
my -= ar->winrct.ymin;
if(BLI_in_rcti(&ar->v2d.mask, mx, my)) {
- actfile = find_file_mouse(sfile, ar, mx , my, 0);
+ actfile = find_file_mouse(sfile, ar, mx , my);
if((actfile >= 0) && (actfile < numfiles))
params->active_file=actfile;
@@ -479,6 +506,7 @@ void FILE_OT_highlight(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Highlight File";
+ ot->description= "Highlight selected file(s).";
ot->idname= "FILE_OT_highlight";
/* api callbacks */
@@ -497,6 +525,7 @@ int file_cancel_exec(bContext *C, wmOperator *unused)
sfile->op = NULL;
if (sfile->files) {
+ filelist_freelib(sfile->files);
filelist_free(sfile->files);
MEM_freeN(sfile->files);
sfile->files= NULL;
@@ -505,15 +534,26 @@ int file_cancel_exec(bContext *C, wmOperator *unused)
return OPERATOR_FINISHED;
}
+int file_operator_poll(bContext *C)
+{
+ int poll = ED_operator_file_active(C);
+ SpaceFile *sfile= CTX_wm_space_file(C);
+
+ if (!sfile || !sfile->op) poll= 0;
+
+ return poll;
+}
+
void FILE_OT_cancel(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Cancel File Load";
+ ot->description= "Cancel loading of selected file.";
ot->idname= "FILE_OT_cancel";
/* api callbacks */
ot->exec= file_cancel_exec;
- ot->poll= ED_operator_file_active;
+ ot->poll= file_operator_poll;
}
/* sends events now, so things get handled on windowqueue level */
@@ -531,9 +571,10 @@ int file_exec(bContext *C, wmOperator *unused)
RNA_string_set(op->ptr, "directory", name);
strcat(name, sfile->params->file);
- if ( RNA_boolean_get(op->ptr, "relative_paths") ) {
- BLI_makestringcode(G.sce, name);
- }
+ if(RNA_struct_find_property(op->ptr, "relative_paths"))
+ if(RNA_boolean_get(op->ptr, "relative_paths"))
+ BLI_makestringcode(G.sce, name);
+
RNA_string_set(op->ptr, "path", name);
/* some ops have multiple files to select */
@@ -574,6 +615,7 @@ int file_exec(bContext *C, wmOperator *unused)
fsmenu_write_file(fsmenu_get(), name);
WM_event_fileselect_event(C, op, EVT_FILESELECT_EXEC);
+ filelist_freelib(sfile->files);
filelist_free(sfile->files);
MEM_freeN(sfile->files);
sfile->files= NULL;
@@ -586,11 +628,12 @@ void FILE_OT_execute(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Execute File Window";
+ ot->description= "Execute selected file.";
ot->idname= "FILE_OT_execute";
/* api callbacks */
ot->exec= file_exec;
- ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+ ot->poll= file_operator_poll;
}
@@ -602,7 +645,7 @@ int file_parent_exec(bContext *C, wmOperator *unused)
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);
+ file_change_dir(sfile, 0);
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
}
}
@@ -616,6 +659,7 @@ void FILE_OT_parent(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Parent File";
+ ot->description= "Move to parent directory.";
ot->idname= "FILE_OT_parent";
/* api callbacks */
@@ -628,7 +672,7 @@ int file_refresh_exec(bContext *C, wmOperator *unused)
{
SpaceFile *sfile= CTX_wm_space_file(C);
- file_change_dir(sfile);
+ file_change_dir(sfile, 1);
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
@@ -640,6 +684,7 @@ void FILE_OT_previous(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Previous Folder";
+ ot->description= "Move to previous folder.";
ot->idname= "FILE_OT_previous";
/* api callbacks */
@@ -659,7 +704,7 @@ int file_previous_exec(bContext *C, wmOperator *unused)
folderlist_popdir(sfile->folders_prev, sfile->params->dir);
folderlist_pushdir(sfile->folders_next, sfile->params->dir);
- file_change_dir(sfile);
+ file_change_dir(sfile, 1);
}
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
@@ -670,6 +715,7 @@ void FILE_OT_next(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Next Folder";
+ ot->description= "Move to next folder.";
ot->idname= "FILE_OT_next";
/* api callbacks */
@@ -690,7 +736,7 @@ int file_next_exec(bContext *C, wmOperator *unused)
// 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);
+ file_change_dir(sfile, 1);
}
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
@@ -733,8 +779,8 @@ void FILE_OT_directory_new(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Create New Directory";
- ot->idname= "FILE_OT_directory_new";
ot->description= "Create a new directory";
+ ot->idname= "FILE_OT_directory_new";
/* api callbacks */
ot->invoke= WM_operator_confirm;
@@ -749,7 +795,6 @@ int file_directory_exec(bContext *C, wmOperator *unused)
SpaceFile *sfile= CTX_wm_space_file(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) );
@@ -771,7 +816,8 @@ int file_directory_exec(bContext *C, wmOperator *unused)
#endif
BLI_cleanup_dir(G.sce, sfile->params->dir);
BLI_add_slash(sfile->params->dir);
- file_change_dir(sfile);
+ file_change_dir(sfile, 1);
+
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
}
@@ -799,6 +845,7 @@ void FILE_OT_refresh(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Refresh Filelist";
+ ot->description= "Refresh the file list.";
ot->idname= "FILE_OT_refresh";
/* api callbacks */
@@ -826,6 +873,7 @@ void FILE_OT_hidedot(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Toggle Hide Dot Files";
+ ot->description= "Toggle hide hidden dot files.";
ot->idname= "FILE_OT_hidedot";
/* api callbacks */
@@ -875,6 +923,7 @@ void FILE_OT_bookmark_toggle(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Toggle Bookmarks";
+ ot->description= "Toggle bookmarks display.";
ot->idname= "FILE_OT_bookmark_toggle";
/* api callbacks */
@@ -903,6 +952,7 @@ void FILE_OT_filenum(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Increment Number in Filename";
+ ot->description= "Increment number in filename.";
ot->idname= "FILE_OT_filenum";
/* api callbacks */
@@ -954,6 +1004,7 @@ void FILE_OT_rename(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Rename File or Directory";
+ ot->description= "Rename file or file directory.";
ot->idname= "FILE_OT_rename";
/* api callbacks */
@@ -1004,6 +1055,7 @@ void FILE_OT_delete(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Delete File";
+ ot->description= "Delete selected file.";
ot->idname= "FILE_OT_delete";
/* api callbacks */
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index 1b54277c383..afdb0d24917 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -172,16 +172,16 @@ static void file_panel_operator(const bContext *C, Panel *pa)
{
SpaceFile *sfile= CTX_wm_space_file(C);
wmOperator *op= sfile->op;
- int empty= 1;
+ int empty= 1, flag;
if(op->type->ui) {
op->type->ui((bContext*)C, op->ptr, pa->layout);
}
else {
RNA_STRUCT_BEGIN(op->ptr, prop) {
- if(strcmp(RNA_property_identifier(prop), "rna_type") == 0)
- continue;
- if(strcmp(RNA_property_identifier(prop), "filemode") == 0)
+ flag= RNA_property_flag(prop);
+
+ if(flag & PROP_HIDDEN)
continue;
if(strcmp(RNA_property_identifier(prop), "path") == 0)
continue;
@@ -189,10 +189,6 @@ static void file_panel_operator(const bContext *C, Panel *pa)
continue;
if(strcmp(RNA_property_identifier(prop), "filename") == 0)
continue;
- if(strcmp(RNA_property_identifier(prop), "display") == 0)
- continue;
- if(strncmp(RNA_property_identifier(prop), "filter", 6) == 0)
- continue;
uiItemFullR(pa->layout, NULL, 0, op->ptr, prop, -1, 0, 0);
empty= 0;
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index c0b16e639c0..94d90929d80 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -406,7 +406,7 @@ void folderlist_pushdir(ListBase* folderlist, const char *dir)
previous_folder = folderlist->last;
// check if already exists
- if(previous_folder){
+ if(previous_folder && previous_folder->foldername){
if(! strcmp(previous_folder->foldername, dir)){
return;
}
@@ -592,10 +592,12 @@ void filelist_loadimage_timer(struct FileList* filelist)
}
if (limg->done) {
FileImage *oimg = limg;
- BLI_remlink(&filelist->loadimages, oimg);
BLI_remove_thread(&filelist->threads, oimg);
+ /* brecht: keep failed images in the list, otherwise
+ it keeps trying to load them over and over?
+ BLI_remlink(&filelist->loadimages, oimg);
+ MEM_freeN(oimg);*/
limg = oimg->next;
- MEM_freeN(oimg);
refresh = 1;
} else {
limg= limg->next;
@@ -802,6 +804,8 @@ static void filelist_read_library(struct FileList* filelist)
if(!filelist->libfiledata) {
int num;
struct direntry *file;
+
+ BLI_make_exist(filelist->dir);
filelist_read_dir(filelist);
file = filelist->filelist;
for(num=0; num<filelist->numfiles; num++, file++) {
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index a0787ef989d..89678bffd01 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -117,8 +117,6 @@ short ED_fileselect_set_params(SpaceFile *sfile)
BLI_strncpy(sfile->params->file, file, sizeof(sfile->params->file));
BLI_make_file_string(G.sce, sfile->params->dir, dir, ""); /* XXX needed ? - also solve G.sce */
}
-
- ED_fileselect_reset_params(sfile);
params = sfile->params;
@@ -126,7 +124,10 @@ short ED_fileselect_set_params(SpaceFile *sfile)
if (op) {
BLI_strncpy(params->title, op->type->name, sizeof(params->title));
- params->type = RNA_int_get(op->ptr, "filemode");
+ if(RNA_struct_find_property(op->ptr, "filename"))
+ params->type = RNA_int_get(op->ptr, "filemode");
+ else
+ params->type = FILE_SPECIAL;
if (RNA_property_is_set(op->ptr, "path")) {
RNA_string_get(op->ptr, "path", name);
@@ -142,15 +143,24 @@ short ED_fileselect_set_params(SpaceFile *sfile)
}
}
params->filter = 0;
- params->filter |= RNA_boolean_get(op->ptr, "filter_blender") ? BLENDERFILE : 0;
- params->filter |= RNA_boolean_get(op->ptr, "filter_image") ? IMAGEFILE : 0;
- params->filter |= RNA_boolean_get(op->ptr, "filter_movie") ? MOVIEFILE : 0;
- params->filter |= RNA_boolean_get(op->ptr, "filter_text") ? TEXTFILE : 0;
- params->filter |= RNA_boolean_get(op->ptr, "filter_python") ? PYSCRIPTFILE : 0;
- params->filter |= RNA_boolean_get(op->ptr, "filter_font") ? FTFONTFILE : 0;
- params->filter |= RNA_boolean_get(op->ptr, "filter_sound") ? SOUNDFILE : 0;
- params->filter |= RNA_boolean_get(op->ptr, "filter_text") ? TEXTFILE : 0;
- params->filter |= RNA_boolean_get(op->ptr, "filter_folder") ? FOLDERFILE : 0;
+ if(RNA_struct_find_property(op->ptr, "filter_blender"))
+ params->filter |= RNA_boolean_get(op->ptr, "filter_blender") ? BLENDERFILE : 0;
+ if(RNA_struct_find_property(op->ptr, "filter_image"))
+ params->filter |= RNA_boolean_get(op->ptr, "filter_image") ? IMAGEFILE : 0;
+ if(RNA_struct_find_property(op->ptr, "filter_movie"))
+ params->filter |= RNA_boolean_get(op->ptr, "filter_movie") ? MOVIEFILE : 0;
+ if(RNA_struct_find_property(op->ptr, "filter_text"))
+ params->filter |= RNA_boolean_get(op->ptr, "filter_text") ? TEXTFILE : 0;
+ if(RNA_struct_find_property(op->ptr, "filter_python"))
+ params->filter |= RNA_boolean_get(op->ptr, "filter_python") ? PYSCRIPTFILE : 0;
+ if(RNA_struct_find_property(op->ptr, "filter_font"))
+ params->filter |= RNA_boolean_get(op->ptr, "filter_font") ? FTFONTFILE : 0;
+ if(RNA_struct_find_property(op->ptr, "filter_sound"))
+ params->filter |= RNA_boolean_get(op->ptr, "filter_sound") ? SOUNDFILE : 0;
+ if(RNA_struct_find_property(op->ptr, "filter_text"))
+ params->filter |= RNA_boolean_get(op->ptr, "filter_text") ? TEXTFILE : 0;
+ if(RNA_struct_find_property(op->ptr, "filter_folder"))
+ params->filter |= RNA_boolean_get(op->ptr, "filter_folder") ? FOLDERFILE : 0;
if (params->filter != 0)
params->flag |= FILE_FILTER;
@@ -191,14 +201,14 @@ int ED_fileselect_layout_numfiles(FileLayout* layout, struct ARegion *ar)
int numfiles;
if (layout->flag & FILE_LAYOUT_HOR) {
- short width = ar->v2d.cur.xmax - ar->v2d.cur.xmin - 2*layout->tile_border_x;
+ int width = ar->v2d.cur.xmax - ar->v2d.cur.xmin - 2*layout->tile_border_x;
numfiles = width/layout->tile_w + 1;
+ return numfiles*layout->rows;
} else {
- short height = ar->v2d.cur.ymax - ar->v2d.cur.ymin - 2*layout->tile_border_y;
+ int height = ar->v2d.cur.ymax - ar->v2d.cur.ymin - 2*layout->tile_border_y;
numfiles = height/layout->tile_h + 1;
+ return numfiles*layout->columns;
}
-
- return layout->columns*layout->rows;
}
int ED_fileselect_layout_offset(FileLayout* layout, int x, int y)
@@ -222,7 +232,7 @@ int ED_fileselect_layout_offset(FileLayout* layout, int x, int y)
return active_file;
}
-void ED_fileselect_layout_tilepos(FileLayout* layout, int tile, short *x, short *y)
+void ED_fileselect_layout_tilepos(FileLayout* layout, int tile, int *x, int *y)
{
if (layout->flag == FILE_LAYOUT_HOR) {
*x = layout->tile_border_x + (tile/layout->rows)*(layout->tile_w+2*layout->tile_border_x);
@@ -265,7 +275,7 @@ static void column_widths(struct FileList* files, struct FileLayout* layout)
if (file) {
int len;
len = file_string_width(file->relname);
- if (len > layout->column_widths[COLUMN_NAME]) layout->column_widths[COLUMN_NAME] = len;
+ if (len > layout->column_widths[COLUMN_NAME]) layout->column_widths[COLUMN_NAME] = len + 20;
len = file_string_width(file->date);
if (len > layout->column_widths[COLUMN_DATE]) layout->column_widths[COLUMN_DATE] = len;
len = file_string_width(file->time);
@@ -337,18 +347,23 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
column_widths(sfile->files, layout);
if (params->display == FILE_SHORTDISPLAY) {
- maxlen = layout->column_widths[COLUMN_NAME] +
+ maxlen = layout->column_widths[COLUMN_NAME] + 12 +
layout->column_widths[COLUMN_SIZE];
- maxlen += 20+2*10; // for icon and space between columns
+ maxlen += 20; // for icon
} else {
- maxlen = layout->column_widths[COLUMN_NAME] +
- layout->column_widths[COLUMN_DATE] +
- layout->column_widths[COLUMN_TIME] +
+ maxlen = layout->column_widths[COLUMN_NAME] + 12 +
+#ifndef WIN32
+ layout->column_widths[COLUMN_MODE1] + 12 +
+ layout->column_widths[COLUMN_MODE2] + 12 +
+ layout->column_widths[COLUMN_MODE3] + 12 +
+ layout->column_widths[COLUMN_OWNER] + 12 +
+#endif
+ layout->column_widths[COLUMN_DATE] + 12 +
+ layout->column_widths[COLUMN_TIME] + 12 +
layout->column_widths[COLUMN_SIZE];
- /* XXX add mode1, mode2, mode3, owner columns for non-windows platforms */
- maxlen += 20+4*10; // for icon and space between columns
+ maxlen += 20; // for icon
}
- layout->tile_w = maxlen + 40;
+ layout->tile_w = maxlen;
if(layout->rows > 0)
layout->columns = numfiles/layout->rows + 1; // XXX dirty, modulo is zero
else {
@@ -369,9 +384,15 @@ FileLayout* ED_fileselect_get_layout(struct SpaceFile *sfile, struct ARegion *ar
return sfile->layout;
}
-void file_change_dir(struct SpaceFile *sfile)
+void file_change_dir(struct SpaceFile *sfile, int checkdir)
{
- if (sfile->params) {
+ if (sfile->params) {
+
+ if(checkdir && S_ISDIR(BLI_exists(sfile->params->dir)) == 0) {
+ BLI_strncpy(sfile->params->dir, filelist_dir(sfile->files), sizeof(sfile->params->dir));
+ /* could return but just refresh the current dir */
+ }
+
filelist_setdir(sfile->files, sfile->params->dir);
if(folderlist_clear_next(sfile))
@@ -419,13 +440,16 @@ void autocomplete_directory(struct bContext *C, char *str, void *arg_v)
struct direntry* file = filelist_file(sfile->files, i);
const char* dir = filelist_dir(sfile->files);
if (file && S_ISDIR(file->type)) {
- BLI_make_file_string(G.sce, tmp, dir, file->relname);
+ // BLI_make_file_string(G.sce, tmp, dir, file->relname);
+ BLI_join_dirfile(tmp, dir, file->relname);
autocomplete_do_name(autocpl,tmp);
}
}
autocomplete_end(autocpl, str);
if (BLI_exists(str)) {
BLI_add_slash(str);
+ } else {
+ BLI_make_exist(str);
}
}
}
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 27948618d03..91d917acfe7 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -156,17 +156,9 @@ static void file_free(SpaceLink *sl)
static void file_init(struct wmWindowManager *wm, ScrArea *sa)
{
SpaceFile *sfile= (SpaceFile*)sa->spacedata.first;
- if(sfile->params) {
- MEM_freeN(sfile->params);
- sfile->params = 0;
- ED_fileselect_set_params(sfile);
- if (sfile->files) {
- filelist_free(sfile->files);
- MEM_freeN(sfile->files);
- sfile->files= NULL;
- }
- }
printf("file_init\n");
+
+ if(sfile->layout) sfile->layout->dirty= 1;
}
@@ -188,7 +180,7 @@ static SpaceLink *file_duplicate(SpaceLink *sl)
if(sfileo->params) {
sfilen->params= MEM_dupallocN(sfileo->params);
- file_change_dir(sfilen);
+ file_change_dir(sfilen, 0);
}
if (sfileo->layout) {
sfilen->layout= MEM_dupallocN(sfileo->layout);
@@ -205,7 +197,7 @@ static void file_refresh(const bContext *C, ScrArea *sa)
sfile->folders_prev = folderlist_new();
if (!sfile->files) {
sfile->files = filelist_new(params->type);
- file_change_dir(sfile);
+ file_change_dir(sfile, 0);
params->active_file = -1; // added this so it opens nicer (ton)
}
filelist_hidedot(sfile->files, params->flag & FILE_HIDE_DOT);
@@ -213,6 +205,7 @@ static void file_refresh(const bContext *C, ScrArea *sa)
if (filelist_empty(sfile->files))
{
filelist_readdir(sfile->files);
+ BLI_strncpy(params->dir, filelist_dir(sfile->files), FILE_MAX);
}
if(params->sort!=FILE_SORT_NONE) filelist_sort(sfile->files, params->sort);
@@ -255,15 +248,15 @@ static void file_listener(ScrArea *sa, wmNotifier *wmn)
/* add handlers, stuff you only do once or on area/region changes */
static void file_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
/* own keymaps */
- keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "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);
+ keymap= WM_keymap_find(wm->defaultconf, "FileMain", SPACE_FILE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
@@ -371,11 +364,11 @@ void file_operatortypes(void)
}
/* NOTE: do not add .blend file reading on this level */
-void file_keymap(struct wmWindowManager *wm)
+void file_keymap(struct wmKeyConfig *keyconf)
{
- wmKeymapItem *kmi;
+ wmKeyMapItem *kmi;
/* keys for all areas */
- ListBase *keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0);
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "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);
@@ -384,9 +377,10 @@ void file_keymap(struct wmWindowManager *wm)
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);
+ WM_keymap_add_item(keymap, "FILE_OT_delete", DELKEY, KM_PRESS, 0, 0);
/* keys for main area */
- keymap= WM_keymap_listbase(wm, "FileMain", SPACE_FILE, 0);
+ keymap= WM_keymap_find(keyconf, "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);
@@ -407,7 +401,7 @@ void file_keymap(struct wmWindowManager *wm)
RNA_int_set(kmi->ptr, "increment",-100);
/* keys for button area (top) */
- keymap= WM_keymap_listbase(wm, "FileButtons", SPACE_FILE, 0);
+ keymap= WM_keymap_find(keyconf, "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);
@@ -426,12 +420,12 @@ void file_keymap(struct wmWindowManager *wm)
static void file_channel_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
ED_region_panels_init(wm, ar);
/* own keymaps */
- keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "File", SPACE_FILE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -462,15 +456,15 @@ static void file_header_area_draw(const bContext *C, ARegion *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;
+ wmKeyMap *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? */
+ keymap= WM_keymap_find(wm->defaultconf, "File", SPACE_FILE, 0);
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? */
+ keymap= WM_keymap_find(wm->defaultconf, "FileButtons", SPACE_FILE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
diff --git a/source/blender/editors/space_file/writeimage.c b/source/blender/editors/space_file/writeimage.c
index 994f38320f2..045c790b9cd 100644
--- a/source/blender/editors/space_file/writeimage.c
+++ b/source/blender/editors/space_file/writeimage.c
@@ -115,15 +115,18 @@ static void save_rendered_image_cb_real(char *name, int confirm)
if(overwrite) {
if(scene->r.imtype==R_MULTILAYER) {
- RenderResult *rr= RE_GetResult(RE_GetRender(scene->id.name));
+ Render *re= RE_GetRender(scene->id.name);
+ RenderResult *rr= RE_AcquireResultRead(re);
if(rr)
RE_WriteRenderResult(rr, str, scene->r.quality);
+ RE_ReleaseResult(re);
}
else {
+ Render *re= RE_GetRender(scene->id.name);
RenderResult rres;
ImBuf *ibuf;
- RE_GetResultImage(RE_GetRender(scene->id.name), &rres);
+ RE_AcquireResultImage(re, &rres);
waitcursor(1); /* from screen.c */
@@ -137,6 +140,8 @@ static void save_rendered_image_cb_real(char *name, int confirm)
BKE_write_ibuf(scene, ibuf, str, scene->r.imtype, scene->r.subimtype, scene->r.quality);
IMB_freeImBuf(ibuf); /* imbuf knows rects are not part of ibuf */
+
+ RE_ReleaseResultImage(re);
}
strcpy(G.ima, name);
@@ -231,9 +236,10 @@ void BIF_save_rendered_image(char *name)
/* calls fileselect */
void BIF_save_rendered_image_fs(Scene *scene)
{
+ Render *re= RE_GetRender(scene->id.name);
RenderResult rres;
- RE_GetResultImage(RE_GetRender(scene->id.name), &rres);
+ RE_AcquireResultImage(re, &rres);
if(!rres.rectf && !rres.rect32) {
error("No image rendered");
@@ -250,6 +256,8 @@ void BIF_save_rendered_image_fs(Scene *scene)
save_image_filesel_str(scene, str);
activate_fileselect(FILE_SPECIAL, str, G.ima, save_rendered_image_cb);
}
+
+ RE_ReleaseResultImage(re);
}
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 9aa02b45950..87a11305bd9 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -46,15 +46,16 @@
#include "BLI_editVert.h"
#include "BLI_rand.h"
-#include "BKE_animsys.h"
#include "BKE_action.h"
+#include "BKE_animsys.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_customdata.h"
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
+#include "BKE_library.h"
+#include "BKE_main.h"
#include "BKE_object.h"
-#include "BKE_global.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_utildefines.h"
@@ -145,7 +146,7 @@ static void graph_panel_properties(const bContext *C, Panel *pa)
if(!graph_panel_context(C, &ale, &fcu))
return;
- block= uiLayoutFreeBlock(pa->layout);
+ block= uiLayoutAbsoluteBlock(pa->layout);
uiBlockSetHandleFunc(block, do_graph_region_buttons, NULL);
/* Info - Active F-Curve */
@@ -192,7 +193,7 @@ static void do_graph_region_driver_buttons(bContext *C, void *arg, int event)
}
/* default for now */
- WM_event_add_notifier(C, NC_SCENE, scene);
+ WM_event_add_notifier(C, NC_SCENE, scene); // XXX does this always work?
}
/* callback to remove the active driver */
@@ -250,6 +251,7 @@ static int graph_panel_drivers_poll(const bContext *C, PanelType *pt)
return graph_panel_context(C, NULL, NULL);
}
+
/* driver settings for active F-Curve (only for 'Drivers' mode) */
static void graph_panel_drivers(const bContext *C, Panel *pa)
{
@@ -258,91 +260,102 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
ChannelDriver *driver;
DriverTarget *dtar;
- PointerRNA rna_ptr;
+ PointerRNA driver_ptr;
+ uiLayout *col;
uiBlock *block;
uiBut *but;
- int yco=85, i=0;
-
- if(!graph_panel_context(C, &ale, &fcu))
+
+ /* Get settings from context */
+ if (!graph_panel_context(C, &ale, &fcu))
return;
-
driver= fcu->driver;
- block= uiLayoutFreeBlock(pa->layout);
+ /* set event handler for panel */
+ block= uiLayoutGetBlock(pa->layout); // xxx?
uiBlockSetHandleFunc(block, do_graph_region_driver_buttons, NULL);
- /* general actions */
- but= uiDefBut(block, BUT, B_IPO_DEPCHANGE, "Update Dependencies", 10, 200, 180, 22, NULL, 0.0, 0.0, 0, 0, "Force updates of dependencies");
- uiButSetFunc(but, driver_update_flags_cb, fcu, NULL);
-
- but= uiDefBut(block, BUT, B_IPO_DEPCHANGE, "Remove Driver", 200, 200, 110, 18, NULL, 0.0, 0.0, 0, 0, "Remove this driver");
- uiButSetFunc(but, driver_remove_cb, ale, NULL);
-
- /* type */
- uiDefBut(block, LABEL, 1, "Type:", 10, 170, 60, 20, NULL, 0.0, 0.0, 0, 0, "");
- uiDefButI(block, MENU, B_IPO_DEPCHANGE,
- "Driver Type%t|Normal%x0|Scripted Expression%x1|Rotational Difference%x2",
- 70,170,240,20, &driver->type, 0, 0, 0, 0, "Driver type");
+ /* general actions - management */
+ col= uiLayoutColumn(pa->layout, 0);
+ block= uiLayoutGetBlock(col);
+ but= uiDefBut(block, BUT, B_IPO_DEPCHANGE, "Update Dependencies", 0, 0, 10*UI_UNIT_X, 22, NULL, 0.0, 0.0, 0, 0, "Force updates of dependencies");
+ uiButSetFunc(but, driver_update_flags_cb, fcu, NULL);
+
+ but= uiDefBut(block, BUT, B_IPO_DEPCHANGE, "Remove Driver", 0, 0, 10*UI_UNIT_X, 18, NULL, 0.0, 0.0, 0, 0, "Remove this driver");
+ uiButSetFunc(but, driver_remove_cb, ale, NULL);
+
+ /* driver-level settings - type, expressions, and errors */
+ RNA_pointer_create(ale->id, &RNA_Driver, driver, &driver_ptr);
- /* show expression box if doing scripted drivers */
- if (driver->type == DRIVER_TYPE_PYTHON) {
- uiDefBut(block, TEX, B_REDR, "Expr: ", 10,150,300,20, driver->expression, 0, 255, 0, 0, "One-liner Python Expression to use as Scripted Expression");
+ col= uiLayoutColumn(pa->layout, 1);
+ block= uiLayoutGetBlock(col);
+ uiItemR(col, NULL, 0, &driver_ptr, "type", 0);
- /* errors */
- if (driver->flag & DRIVER_FLAG_INVALID) {
- uiDefIconBut(block, LABEL, 1, ICON_ERROR, 10, 130, 48, 48, NULL, 0, 0, 0, 0, ""); // a bit larger
- uiDefBut(block, LABEL, 0, "Error: invalid Python expression",
- 50,110,230,19, NULL, 0, 0, 0, 0, "");
+ /* show expression box if doing scripted drivers, and/or error messages when invalid drivers exist */
+ if (driver->type == DRIVER_TYPE_PYTHON) {
+ /* expression */
+ uiItemR(col, "Expr:", 0, &driver_ptr, "expression", 0);
+
+ /* errors? */
+ if (driver->flag & DRIVER_FLAG_INVALID)
+ uiItemL(col, "ERROR: invalid Python expression", ICON_ERROR);
}
- }
- else {
- /* errors */
- if (driver->flag & DRIVER_FLAG_INVALID) {
- uiDefIconBut(block, LABEL, 1, ICON_ERROR, 10, 130, 48, 48, NULL, 0, 0, 0, 0, ""); // a bit larger
- uiDefBut(block, LABEL, 0, "Error: invalid target channel(s)",
- 50,130,230,19, NULL, 0, 0, 0, 0, "");
+ else {
+ /* errors? */
+ if (driver->flag & DRIVER_FLAG_INVALID)
+ uiItemL(col, "ERROR: invalid target channel(s)", ICON_ERROR);
}
- }
- but= uiDefBut(block, BUT, B_IPO_DEPCHANGE, "Add Variable", 10, 110, 300, 20, NULL, 0.0, 0.0, 0, 0, "Add a new target variable for this Driver");
- uiButSetFunc(but, driver_add_var_cb, driver, NULL);
+ /* add driver target variables */
+ col= uiLayoutColumn(pa->layout, 0);
+ block= uiLayoutGetBlock(col);
+ but= uiDefBut(block, BUT, B_IPO_DEPCHANGE, "Add Variable", 0, 0, 10*UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "Add a new target variable for this Driver");
+ uiButSetFunc(but, driver_add_var_cb, driver, NULL);
/* loop over targets, drawing them */
for (dtar= driver->targets.first; dtar; dtar= dtar->next) {
- short height = (dtar->id) ? 80 : 60;
+ PointerRNA dtar_ptr;
+ uiLayout *box, *row;
- /* panel behind buttons */
- uiDefBut(block, ROUNDBOX, B_REDR, "", 5, yco-height+25, 310, height, NULL, 5.0, 0.0, 12.0, 0, "");
+ /* panel holding the buttons */
+ box= uiLayoutBox(pa->layout);
- /* variable name */
- uiDefButC(block, TEX, B_REDR, "Name: ", 10,yco,280,20, dtar->name, 0, 63, 0, 0, "Name of target variable (No spaces or dots are allowed. Also, must not start with a symbol or digit).");
+ /* first row context info for driver */
+ RNA_pointer_create(ale->id, &RNA_DriverTarget, dtar, &dtar_ptr);
- /* remove button */
- but= uiDefIconBut(block, BUT, B_REDR, ICON_X, 290, yco, 20, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Delete target variable.");
- uiButSetFunc(but, driver_delete_var_cb, driver, dtar);
+ row= uiLayoutRow(box, 0);
+ block= uiLayoutGetBlock(row);
+ /* variable name */
+ uiItemR(row, "", 0, &dtar_ptr, "name", 0);
+
+ /* remove button */
+ but= uiDefIconBut(block, BUT, B_REDR, ICON_X, 290, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Delete target variable.");
+ uiButSetFunc(but, driver_delete_var_cb, driver, dtar);
- /* Target Object */
- uiDefBut(block, LABEL, 1, "Value:", 10, yco-30, 60, 20, NULL, 0.0, 0.0, 0, 0, "");
- uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_REDR, "Ob: ", 70, yco-30, 240, 20, &dtar->id, "Object to use as Driver target");
+ /* Target ID */
+ row= uiLayoutRow(box, 0);
+ uiTemplateAnyID(row, (bContext *)C, &dtar_ptr, "id", "id_type", "Value: ");
- // XXX should we hide these technical details?
+ /* Target Property */
+ // TODO: make this less technical...
if (dtar->id) {
- uiBlockBeginAlign(block);
- /* RNA Path */
- RNA_pointer_create(ale->id, &RNA_DriverTarget, dtar, &rna_ptr);
- uiDefButR(block, TEX, 0, "Path: ", 10, yco-50, 250, 20, &rna_ptr, "rna_path", 0, 0, 0, -1, -1, "RNA Path (from Driver Object) to property used as Driver.");
-
- /* Array Index */
- uiDefButI(block, NUM, B_REDR, "", 260,yco-50,50,20, &dtar->array_index, 0, INT_MAX, 0, 0, "Index to the specific property used as Driver if applicable.");
- uiBlockEndAlign(block);
+ PointerRNA root_ptr;
+
+ /* get pointer for resolving the property selected */
+ RNA_id_pointer_create(dtar->id, &root_ptr);
+
+ col= uiLayoutColumn(box, 1);
+ block= uiLayoutGetBlock(col);
+ /* rna path */
+ uiTemplatePathBuilder(col, (bContext *)C, &dtar_ptr, "rna_path", &root_ptr, "Path");
+
+ /* array index */
+ // TODO: this needs selector which limits it to ok values
+ uiItemR(col, "Index", 0, &dtar_ptr, "array_index", 0);
}
-
- /* adjust y-coordinate for next target */
- yco -= height;
- i++;
}
-
+
+ /* cleanup */
MEM_freeN(ale);
}
@@ -356,8 +369,8 @@ static void do_graph_region_modifier_buttons(bContext *C, void *arg, int event)
switch (event) {
case B_REDR:
case B_FMODIFIER_REDRAW: // XXX this should send depsgraph updates too
- ED_area_tag_redraw(CTX_wm_area(C));
- return; /* no notifier! */
+ WM_event_add_notifier(C, NC_ANIMATION, NULL); // XXX need a notifier specially for F-Modifiers
+ break;
}
}
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index 9ae7e8263ee..57e2208f089 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -91,6 +91,26 @@
extern void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad);
/* *************************** */
+/* Utility Drawing Defines */
+
+/* determine the alpha value that should be used when
+ * drawing components for some F-Curve (fcu)
+ * - selected F-Curves should be more visible than partially visible ones
+ */
+#define drawFCurveFade(fcu) ( ((fcu)->flag & FCURVE_SELECTED)? 1.0f : 0.5f )
+
+/* set the colour for some point from some value given packed into an int
+ * - intV: integer value containing color info packed into an int
+ * - alpha: float value describing the
+ */
+#define cpackA(intVC, alpha) \
+ { \
+ float _cpackCol[3]; \
+ cpack_to_rgb(intVC, &_cpackCol[0], &_cpackCol[1], &_cpackCol[2]); \
+ glColor4f(_cpackCol[0], _cpackCol[1], _cpackCol[2], alpha); \
+ }
+
+/* *************************** */
/* F-Curve Modifier Drawing */
/* Envelope -------------- */
@@ -258,22 +278,20 @@ static void draw_fcurve_vertices_handles (FCurve *fcu, View2D *v2d, short sel)
/* helper func - set color to draw F-Curve data with */
static void set_fcurve_vertex_color (SpaceIpo *sipo, FCurve *fcu, short sel)
{
-#if 0
- if (sipo->showkey) {
- if (sel) UI_ThemeColor(TH_TEXT_HI);
- else UI_ThemeColor(TH_TEXT);
- }
-#endif
- if ((fcu->flag & FCURVE_PROTECTED)==0) {
- /* Curve's points are being edited */
- if (sel) UI_ThemeColor(TH_VERTEX_SELECT);
- else UI_ThemeColor(TH_VERTEX);
- }
- else {
- /* Curve's points cannot be edited */
- if (sel) UI_ThemeColor(TH_TEXT_HI);
- else UI_ThemeColor(TH_TEXT);
- }
+ /* Fade the 'intensity' of the vertices based on the selection of the curves too */
+ int alphaOffset= (int)((drawFCurveFade(fcu) - 1.0f) * 255);
+
+ /* Set color of curve vertex based on state of curve (i.e. 'Edit' Mode) */
+ if ((fcu->flag & FCURVE_PROTECTED)==0) {
+ /* Curve's points ARE BEING edited */
+ if (sel) UI_ThemeColorShadeAlpha(TH_VERTEX_SELECT, 0, alphaOffset);
+ else UI_ThemeColorShadeAlpha(TH_VERTEX, 0, alphaOffset);
+ }
+ else {
+ /* Curve's points CANNOT BE edited */
+ if (sel) UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, alphaOffset);
+ else UI_ThemeColorShadeAlpha(TH_TEXT, 0, alphaOffset);
+ }
}
@@ -322,7 +340,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, ARegion *ar, FCurve *fcu)
if ((sipo->flag & SIPO_NOHANDLES) || (fcu->flag & FCURVE_PROTECTED) || (fcu->flag & FCURVE_INT_VALUES))
return;
- /* slightly hacky, but we want to draw unselected points before selected ones*/
+ /* slightly hacky, but we want to draw unselected points before selected ones */
for (sel= 0; sel < 2; sel++) {
BezTriple *bezt=fcu->bezt, *prevbezt=NULL;
float *fp;
@@ -337,7 +355,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, ARegion *ar, FCurve *fcu)
/* only draw first handle if previous segment had handles */
if ( (!prevbezt && (bezt->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ)) )
{
- cpack(col[(unsigned char)bezt->h1]);
+ cpackA(col[(unsigned char)bezt->h1], drawFCurveFade(fcu));
glBegin(GL_LINE_STRIP);
glVertex2fv(fp); glVertex2fv(fp+3);
glEnd();
@@ -347,7 +365,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, ARegion *ar, FCurve *fcu)
/* only draw second handle if this segment is bezier */
if (bezt->ipo == BEZT_IPO_BEZ)
{
- cpack(col[(unsigned char)bezt->h2]);
+ cpackA(col[(unsigned char)bezt->h2], drawFCurveFade(fcu));
glBegin(GL_LINE_STRIP);
glVertex2fv(fp+3); glVertex2fv(fp+6);
glEnd();
@@ -359,7 +377,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, ARegion *ar, FCurve *fcu)
( (!prevbezt && (bezt->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ)) ) )
{
fp= bezt->vec[0];
- cpack(col[(unsigned char)bezt->h1]);
+ cpackA(col[(unsigned char)bezt->h1], drawFCurveFade(fcu));
glBegin(GL_LINE_STRIP);
glVertex2fv(fp); glVertex2fv(fp+3);
@@ -371,7 +389,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, ARegion *ar, FCurve *fcu)
(bezt->ipo == BEZT_IPO_BEZ) )
{
fp= bezt->vec[1];
- cpack(col[(unsigned char)bezt->h2]);
+ cpackA(col[(unsigned char)bezt->h2], drawFCurveFade(fcu));
glBegin(GL_LINE_STRIP);
glVertex2fv(fp); glVertex2fv(fp+3);
@@ -410,7 +428,6 @@ static void draw_fcurve_sample_control (float x, float y, float xscale, float ys
glScalef(1.0f/xscale*hsize, 1.0f/yscale*hsize, 1.0f);
/* anti-aliased lines for more consistent appearance */
- // XXX needed here?
glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
@@ -506,7 +523,6 @@ static void draw_fcurve_curve (FCurve *fcu, SpaceIpo *sipo, View2D *v2d, View2DG
}
/* helper func - draw a samples-based F-Curve */
-// TODO: add offset stuff...
static void draw_fcurve_curve_samples (FCurve *fcu, View2D *v2d)
{
FPoint *prevfpt= fcu->fpt;
@@ -647,7 +663,7 @@ static void draw_fcurve_curve_bezts (FCurve *fcu, View2D *v2d, View2DGrid *grid)
*/
/* resol not depending on horizontal resolution anymore, drivers for example... */
- // XXX need to take into account the scale
+ // TODO: would be nice to make this depend on the scale of the graph too...
if (fcu->driver)
resol= 32;
else
@@ -809,7 +825,7 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri
/* set whatever color the curve has set
* - unselected curves draw less opaque to help distinguish the selected ones
*/
- glColor4f(fcu->color[0], fcu->color[1], fcu->color[2], ((sel) ? 1.0f : 0.5f));
+ glColor4f(fcu->color[0], fcu->color[1], fcu->color[2], drawFCurveFade(fcu));
}
/* anti-aliased lines for less jagged appearance */
@@ -855,7 +871,10 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri
else if ( ((fcu->bezt) || (fcu->fpt)) && (fcu->totvert) ) {
if (fcu->bezt) {
/* only draw handles/vertices on keyframes */
- draw_fcurve_handles(sipo, ar, fcu);
+ glEnable(GL_BLEND);
+ draw_fcurve_handles(sipo, ar, fcu);
+ glDisable(GL_BLEND);
+
draw_fcurve_vertices(sipo, ar, fcu);
}
else {
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index d718ef28e99..22272479e4a 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -1296,8 +1296,7 @@ void GRAPH_OT_handle_type (wmOperatorType *ot)
/* set of three euler-rotation F-Curves */
typedef struct tEulerFilter {
ID *id; /* ID-block which owns the channels */
- FCurve *fcu1, *fcu2, *fcu3; /* x,y,z rotation curves */
- int i1, i2, i3; /* current index for each curve */
+ FCurve (*fcurves)[3]; /* 3 Pointers to F-Curves */
} tEulerFilter;
static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
@@ -1333,24 +1332,38 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
* - only rotation curves
* - for pchan curves, make sure we're only using the euler curves
*/
- if (ELEM(0, fcu->rna_path, strstr(fcu->rna_path, "rotation")))
+ if (strstr(fcu->rna_path, "rotation_euler") == 0)
continue;
- if (strstr(fcu->rna_path, "pose.pose_channels")) {
- if (strstr(fcu->rna_path, "euler_rotation") == 0)
- continue;
- }
/* check if current set of 3-curves is suitable to add this curve to
* - things like whether the current set of curves is 'full' should be checked later only
* - first check if id-blocks are compatible
*/
if ((euf) && (ale->id != euf->id)) {
+ /* if the paths match, add this curve to the set of curves */
+ // NOTE: simple string compare for now... could be a bit more fancy...
+
+ }
+ else {
+ /* just add to a new block */
+ euf= MEM_callocN(sizeof(tEulerFilter), "tEulerFilter");
+ BLI_addtail(&eulers, euf);
+ euf->id= ale->id;
+ euf->fcurves[fcu->array_index]= fcu;
}
}
+ BLI_freelistN(&anim_data);
- // XXX for now
- return OPERATOR_CANCELLED;
+ /* step 2: go through each set of curves, processing the values at each keyframe
+ * - it is assumed that there must be a full set of keyframes at each keyframe position
+ */
+ for (euf= eulers.first; euf; euf= euf->next) {
+
+ }
+ BLI_freelistN(&eulers);
+
+ return OPERATOR_FINISHED;
}
void GRAPH_OT_euler_filter (wmOperatorType *ot)
@@ -1710,13 +1723,18 @@ static int graph_fmodifier_add_invoke (bContext *C, wmOperator *op, wmEvent *eve
/* start from 1 to skip the 'Invalid' modifier type */
for (i = 1; i < FMODIFIER_NUM_TYPES; i++) {
FModifierTypeInfo *fmi= get_fmodifier_typeinfo(i);
+ PointerRNA props_ptr;
/* 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);
+ /* create operator menu item with relevant properties filled in */
+ props_ptr= uiItemFullO(layout, fmi->name, 0, "GRAPH_OT_fmodifier_add", NULL, WM_OP_EXEC_REGION_WIN, UI_ITEM_O_RETURN_PROPS);
+ /* the only thing that gets set from the menu is the type of F-Modifier to add */
+ RNA_enum_set(&props_ptr, "type", i);
+ /* the following properties are just repeats of existing ones... */
+ RNA_boolean_set(&props_ptr, "only_active", RNA_boolean_get(op->ptr, "only_active"));
}
uiItemS(layout);
@@ -1728,36 +1746,41 @@ static int graph_fmodifier_add_invoke (bContext *C, wmOperator *op, wmEvent *eve
static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
+ ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
- FCurve *fcu;
- FModifier *fcm;
+ int filter;
short type;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
-
- // xxx call the raw methods here instead?
- ale= get_active_fcurve_channel(&ac);
- if (ale == NULL)
- return OPERATOR_CANCELLED;
- fcu= (FCurve *)ale->data;
- MEM_freeN(ale);
- if (fcu == NULL)
- return OPERATOR_CANCELLED;
-
/* get type of modifier to add */
type= RNA_enum_get(op->ptr, "type");
- /* add F-Modifier of specified type to active F-Curve, and make it the active one */
- fcm= add_fmodifier(&fcu->modifiers, type);
- if (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;
+ /* filter data */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ if (RNA_boolean_get(op->ptr, "only_active"))
+ filter |= ANIMFILTER_ACTIVE;
+ else
+ filter |= ANIMFILTER_SEL;
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* smooth keyframes */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ FCurve *fcu= (FCurve *)ale->data;
+ FModifier *fcm;
+
+ /* add F-Modifier of specified type to active F-Curve, and make it the active one */
+ fcm= add_fmodifier(&fcu->modifiers, type);
+ if (fcm)
+ set_active_fmodifier(&fcu->modifiers, fcm);
+ else { // TODO: stop when this happens?
+ BKE_report(op->reports, RPT_ERROR, "Modifier couldn't be added. See console for details.");
+ break;
+ }
}
+ BLI_freelistN(&anim_data);
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
@@ -1779,13 +1802,14 @@ void GRAPH_OT_fmodifier_add (wmOperatorType *ot)
/* api callbacks */
ot->invoke= graph_fmodifier_add_invoke;
ot->exec= graph_fmodifier_add_exec;
- ot->poll= graphop_active_fcurve_poll;
+ ot->poll= graphop_selected_fcurve_poll;
/* 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", 1, "Only Active", "Only add F-Modifier to active F-Curve.");
}
/* ************************************************************************** */
diff --git a/source/blender/editors/space_graph/graph_header.c b/source/blender/editors/space_graph/graph_header.c
index dd304cd8cf3..8d8c8702987 100644
--- a/source/blender/editors/space_graph/graph_header.c
+++ b/source/blender/editors/space_graph/graph_header.c
@@ -244,15 +244,8 @@ enum {
static void do_graph_buttons(bContext *C, void *arg, int event)
{
- switch (event) {
- case B_MODECHANGE: /* change mode with mode selector */
- ED_area_tag_refresh(CTX_wm_area(C));
- /* no break, as we need redraw flush too... */
-
- case B_REDR:
- ED_area_tag_redraw(CTX_wm_area(C));
- break;
- }
+ ED_area_tag_refresh(CTX_wm_area(C));
+ ED_area_tag_redraw(CTX_wm_area(C));
}
@@ -298,29 +291,7 @@ void graph_header_buttons(const bContext *C, ARegion *ar)
xco+= 120;
/* filtering buttons */
- if (sipo->ads) {
- //uiBlockBeginAlign(block);
- uiDefIconButBitI(block, TOG, ADS_FILTER_ONLYSEL, B_REDR, ICON_RESTRICT_SELECT_OFF, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Only display selected Objects");
- //uiBlockEndAlign(block);
- xco += 5;
-
- uiBlockBeginAlign(block);
- uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSCE, B_REDR, ICON_SCENE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->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, &(sipo->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, &(sipo->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, &(sipo->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, &(sipo->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, &(sipo->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, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Curves");
- uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display MetaBalls");
- uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Particles");
- uiBlockEndAlign(block);
- xco += 30;
- }
- else {
- // XXX this case shouldn't happen at all... for now, just pad out same amount of space
- xco += 10*XIC + 30;
- }
+ xco= ANIM_headerUI_standard_buttons(C, sipo->ads, block, xco, yco);
/* auto-snap selector */
if (sipo->flag & SIPO_DRAWTIME) {
@@ -347,9 +318,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, "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");
+ uiDefIconButO(block, BUT, "GRAPH_OT_ghost_curves_clear", WM_OP_INVOKE_REGION_WIN, ICON_GHOST_DISABLED, xco,yco,XIC,YIC, "Clear F-Curve snapshots (Ghosts) for this Graph Editor instance");
else
- 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");
+ uiDefIconButO(block, BUT, "GRAPH_OT_ghost_curves_create", WM_OP_INVOKE_REGION_WIN, ICON_GHOST_ENABLED, 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 2e8d0655d2d..9b7c2eb3656 100644
--- a/source/blender/editors/space_graph/graph_intern.h
+++ b/source/blender/editors/space_graph/graph_intern.h
@@ -155,10 +155,11 @@ short fcurve_needs_draw_fmodifier_controls(struct FCurve *fcu, struct FModifier
int graphop_visible_keyframes_poll(struct bContext *C);
int graphop_editable_keyframes_poll(struct bContext *C);
int graphop_active_fcurve_poll(struct bContext *C);
+int graphop_selected_fcurve_poll(struct bContext *C);
/* ***************************************** */
/* graph_ops.c */
-void graphedit_keymap(struct wmWindowManager *wm);
+void graphedit_keymap(struct wmKeyConfig *keyconf);
void graphedit_operatortypes(void);
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index fc4c05915c9..ab35bda0e2f 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -141,9 +141,9 @@ void graphedit_operatortypes(void)
/* ************************** registration - keymaps **********************************/
-static void graphedit_keymap_keyframes (wmWindowManager *wm, ListBase *keymap)
+static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
{
- wmKeymapItem *kmi;
+ wmKeyMapItem *kmi;
/* view */
WM_keymap_add_item(keymap, "GRAPH_OT_handles_view_toggle", HKEY, KM_PRESS, KM_CTRL, 0);
@@ -221,21 +221,21 @@ static void graphedit_keymap_keyframes (wmWindowManager *wm, ListBase *keymap)
WM_keymap_add_item(keymap, "GRAPH_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
/* F-Modifiers */
- WM_keymap_add_item(keymap, "GRAPH_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPH_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "only_active", 0);
/* transform system */
- transform_keymap_for_space(wm, keymap, SPACE_IPO);
+ transform_keymap_for_space(keyconf, keymap, SPACE_IPO);
}
/* --------------- */
-void graphedit_keymap(wmWindowManager *wm)
+void graphedit_keymap(wmKeyConfig *keyconf)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
/* keymap for all regions */
- keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0);
+ keymap= WM_keymap_find(keyconf, "GraphEdit Generic", SPACE_IPO, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_properties", NKEY, KM_PRESS, 0, 0);
/* channels */
@@ -245,7 +245,7 @@ void graphedit_keymap(wmWindowManager *wm)
*/
/* keyframes */
- keymap= WM_keymap_listbase(wm, "GraphEdit Keys", SPACE_IPO, 0);
- graphedit_keymap_keyframes(wm, keymap);
+ keymap= WM_keymap_find(keyconf, "GraphEdit Keys", SPACE_IPO, 0);
+ graphedit_keymap_keyframes(keyconf, keymap);
}
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index 728c9310a47..7eec9f31d86 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -142,9 +142,13 @@ static void deselect_graph_keys (bAnimContext *ac, short test, short sel)
/* Keyframes First */
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, sel_cb, NULL);
- /* deactivate the F-Curve, and deselect if deselecting keyframes */
+ /* deactivate the F-Curve, and deselect if deselecting keyframes.
+ * otherwise select the F-Curve too since we've selected all the keyframes
+ */
if (sel == SELECT_SUBTRACT)
fcu->flag &= ~FCURVE_SELECTED;
+ else
+ fcu->flag |= FCURVE_SELECTED;
fcu->flag &= ~FCURVE_ACTIVE;
}
@@ -259,8 +263,9 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho
/* select the curve too
* NOTE: this should really only happen if the curve got touched...
*/
- if (selectmode == SELECT_ADD)
+ if (selectmode == SELECT_ADD) {
fcu->flag |= FCURVE_SELECTED;
+ }
}
/* cleanup */
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c
index f00e7845549..ee4e371e1f1 100644
--- a/source/blender/editors/space_graph/graph_utils.c
+++ b/source/blender/editors/space_graph/graph_utils.c
@@ -285,4 +285,32 @@ int graphop_active_fcurve_poll (bContext *C)
return has_fcurve;
}
+/* has selected F-Curve that's editable */
+int graphop_selected_fcurve_poll (bContext *C)
+{
+ bAnimContext ac;
+ ListBase anim_data = {NULL, NULL};
+ ScrArea *sa= CTX_wm_area(C);
+ int filter, items;
+
+ /* 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;
+
+ /* get the editable + selected F-Curves, and as long as we got some, we can return */
+ 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;
+
+ /* cleanup and return findings */
+ BLI_freelistN(&anim_data);
+ return 1;
+}
+
/* ************************************************************** */
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 8887d464f30..c8d2c571a16 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -203,14 +203,14 @@ static SpaceLink *graph_duplicate(SpaceLink *sl)
/* add handlers, stuff you only do once or on area/region changes */
static void graph_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "GraphEdit Keys", SPACE_IPO, 0); /* XXX weak? */
+ keymap= WM_keymap_find(wm->defaultconf, "GraphEdit Keys", SPACE_IPO, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "GraphEdit Generic", SPACE_IPO, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -281,14 +281,14 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar)
static void graph_channel_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "Animation_Channels", 0, 0); /* XXX weak? */
+ keymap= WM_keymap_find(wm->defaultconf, "Animation_Channels", 0, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "GraphEdit Generic", SPACE_IPO, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -352,11 +352,11 @@ static void graph_header_area_draw(const bContext *C, ARegion *ar)
/* add handlers, stuff you only do once or on area/region changes */
static void graph_buttons_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "GraphEdit Generic", SPACE_IPO, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -374,6 +374,7 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn)
break;
case NC_SCENE:
switch(wmn->data) {
+ case ND_RENDER_OPTIONS:
case ND_OB_ACTIVE:
case ND_FRAME:
case ND_MARKERS:
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 456e802194e..87b6ec8bb71 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -100,8 +100,6 @@
#define B_FACESEL_PAINT_TEST 11
#define B_SIMA_RECORD 12
#define B_SIMA_PLAY 13
-#define B_SIMARANGE 14
-#define B_SIMACURVES 15
#define B_SIMANOTHING 16
#define B_SIMABRUSHCHANGE 17
@@ -116,10 +114,8 @@
#define B_SIMACLONEDELETE 26
/* XXX */
-static int okee() {return 0;}
static int simaFaceDraw_Check() {return 0;}
static int simaUVSel_Check() {return 0;}
-static int is_uv_tface_editing_allowed_silent() {return 0;}
/* XXX */
/* proto */
@@ -135,13 +131,6 @@ static void do_image_panel_events(bContext *C, void *arg, int event)
switch(event) {
case B_REDR:
break;
- case B_SIMACURVES:
- curvemapping_do_ibuf(sima->cumap, ED_space_image_buffer(sima));
- break;
- case B_SIMARANGE:
- curvemapping_set_black_white(sima->cumap, NULL, NULL);
- curvemapping_do_ibuf(sima->cumap, ED_space_image_buffer(sima));
- break;
case B_TRANS_IMAGE:
image_editvertex_buts(C, NULL);
break;
@@ -149,12 +138,11 @@ static void do_image_panel_events(bContext *C, void *arg, int event)
image_editcursor_buts(C, &ar->v2d, NULL);
break;
}
+
/* all events now */
WM_event_add_notifier(C, NC_IMAGE, sima->image);
}
-
-
static void image_info(Image *ima, ImBuf *ibuf, char *str)
{
int ofs= 0;
@@ -168,12 +156,12 @@ static void image_info(Image *ima, ImBuf *ibuf, char *str)
}
if(ima->source==IMA_SRC_MOVIE) {
- ofs= sprintf(str, "Movie ");
+ ofs= sprintf(str, "Movie");
if(ima->anim)
ofs+= sprintf(str+ofs, "%d frs", IMB_anim_get_duration(ima->anim));
}
else
- ofs= sprintf(str, "Image ");
+ ofs= sprintf(str, "Image");
ofs+= sprintf(str+ofs, ": size %d x %d,", ibuf->x, ibuf->y);
@@ -216,11 +204,7 @@ struct ImageUser *ntree_get_active_iuser(bNodeTree *ntree)
/* this function gets the values for cursor and vertex number buttons */
static void image_transform_but_attr(SpaceImage *sima, int *imx, int *imy, int *step, int *digits) /*, float *xcoord, float *ycoord)*/
{
- ImBuf *ibuf= ED_space_image_buffer(sima);
- if(ibuf) {
- *imx= ibuf->x;
- *imy= ibuf->y;
- }
+ ED_space_image_size(sima, imx, imy);
if (sima->flag & SI_COORDFLOATS) {
*step= 1;
@@ -246,10 +230,6 @@ static void image_editvertex_buts(const bContext *C, uiBlock *block)
EditFace *efa;
MTFace *tf;
- if(obedit==NULL || obedit->type!=OB_MESH) return;
-
- if( is_uv_tface_editing_allowed_silent()==0 ) return;
-
image_transform_but_attr(sima, &imx, &imy, &step, &digits);
em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -354,8 +334,6 @@ static void image_editcursor_buts(const bContext *C, View2D *v2d, uiBlock *block
int imx= 256, imy= 256;
int step, digits;
- if( is_uv_tface_editing_allowed_silent()==0 ) return;
-
image_transform_but_attr(sima, &imx, &imy, &step, &digits);
if(block) { // do the buttons
@@ -388,59 +366,6 @@ static void image_editcursor_buts(const bContext *C, View2D *v2d, uiBlock *block
#if 0
static void image_panel_view_properties(const bContext *C, Panel *pa)
{
- SpaceImage *sima= CTX_wm_space_image(C);
- ARegion *ar= CTX_wm_region(C);
- Object *obedit= CTX_data_edit_object(C);
- uiBlock *block;
-
- block= uiLayoutFreeBlock(pa->layout);
- uiBlockSetHandleFunc(block, do_image_panel_events, NULL);
-
- uiDefButBitI(block, TOG, SI_DRAW_TILE, B_REDR, "Repeat Image", 10,160,140,19, &sima->flag, 0, 0, 0, 0, "Repeat/Tile the image display");
- uiDefButBitI(block, TOG, SI_COORDFLOATS, B_REDR, "Normalized Coords", 165,160,145,19, &sima->flag, 0, 0, 0, 0, "Display coords from 0.0 to 1.0 rather then in pixels");
-
- if (sima->image) {
- uiDefBut(block, LABEL, B_NOP, "Image Display:", 10,140,140,19, 0, 0, 0, 0, 0, "");
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_REDR, "AspX:", 10,120,140,19, &sima->image->aspx, 0.1, 5000.0, 100, 0, "X Display Aspect for this image, does not affect renderingm 0 disables.");
- uiDefButF(block, NUM, B_REDR, "AspY:", 10,100,140,19, &sima->image->aspy, 0.1, 5000.0, 100, 0, "X Display Aspect for this image, does not affect rendering 0 disables.");
- uiBlockEndAlign(block);
- }
-
- if (obedit && obedit->type==OB_MESH) {
- Mesh *me= obedit->data;
- EditMesh *em= BKE_mesh_get_editmesh(me);
-
- if(EM_texFaceCheck(em)) {
- uiDefBut(block, LABEL, B_NOP, "Draw Type:", 10, 80,120,19, 0, 0, 0, 0, 0, "");
- uiBlockBeginAlign(block);
- uiDefButC(block, ROW, B_REDR, "Outline", 10,60,58,19, &sima->dt_uv, 0.0, SI_UVDT_OUTLINE, 0, 0, "Outline Wire UV drawtype");
- uiDefButC(block, ROW, B_REDR, "Dash", 68, 60,58,19, &sima->dt_uv, 0.0, SI_UVDT_DASH, 0, 0, "Dashed Wire UV drawtype");
- uiDefButC(block, ROW, B_REDR, "Black", 126, 60,58,19, &sima->dt_uv, 0.0, SI_UVDT_BLACK, 0, 0, "Black Wire UV drawtype");
- uiDefButC(block, ROW, B_REDR, "White", 184,60,58,19, &sima->dt_uv, 0.0, SI_UVDT_WHITE, 0, 0, "White Wire UV drawtype");
-
- uiBlockEndAlign(block);
- uiDefButBitI(block, TOG, SI_SMOOTH_UV, B_REDR, "Smooth", 250,60,60,19, &sima->flag, 0, 0, 0, 0, "Display smooth lines in the UV view");
-
-
- uiDefButBitI(block, TOG, ME_DRAWFACES, B_REDR, "Faces", 10,30,60,19, &me->drawflag, 0, 0, 0, 0, "Displays all faces as shades in the 3d view and UV editor");
- uiDefButBitI(block, TOG, ME_DRAWEDGES, B_REDR, "Edges", 70, 30,60,19, &me->drawflag, 0, 0, 0, 0, "Displays selected edges using hilights in the 3d view and UV editor");
-
- uiDefButBitI(block, TOG, SI_DRAWSHADOW, B_REDR, "Final Shadow", 130, 30,110,19, &sima->flag, 0, 0, 0, 0, "Draw the final result from the objects modifiers");
- uiDefButBitI(block, TOG, SI_DRAW_OTHER, B_REDR, "Other Objs", 230, 30, 80, 19, &sima->flag, 0, 0, 0, 0, "Also draw all 3d view selected mesh objects that use this image");
-
- uiDefButBitI(block, TOG, SI_DRAW_STRETCH, B_REDR, "UV Stretch", 10,0,100,19, &sima->flag, 0, 0, 0, 0, "Difference between UV's and the 3D coords (blue for low distortion, red is high)");
- if (sima->flag & SI_DRAW_STRETCH) {
- uiBlockBeginAlign(block);
- uiDefButC(block, ROW, B_REDR, "Area", 120,0,60,19, &sima->dt_uvstretch, 0.0, SI_UVDT_STRETCH_AREA, 0, 0, "Area distortion between UV's and 3D coords");
- uiDefButC(block, ROW, B_REDR, "Angle", 180,0,60,19, &sima->dt_uvstretch, 0.0, SI_UVDT_STRETCH_ANGLE, 0, 0, "Angle distortion between UV's and 3D coords");
- uiBlockEndAlign(block);
- }
- }
-
- BKE_mesh_end_editmesh(me, em);
- }
- image_editcursor_buts(C, &ar->v2d, block);
}
#endif
@@ -524,8 +449,8 @@ void brush_buttons(const bContext *C, uiBlock *block, short fromsima,
uiDefIconButBitS(block, TOG|BIT, BRUSH_ALPHA_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-20,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
uiDefButI(block, NUMSLI, evt_nop, "Size ", 0,yco-40,180,19, &brush->size, 1, 200, 0, 0, "The size of the brush");
uiDefIconButBitS(block, TOG|BIT, BRUSH_SIZE_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-40,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
- uiDefButF(block, NUMSLI, evt_nop, "Falloff ", 0,yco-60,180,19, &brush->innerradius, 0.0, 1.0, 0, 0, "The fall off radius of the brush");
- uiDefIconButBitS(block, TOG|BIT, BRUSH_RAD_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-60,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
+// uiDefButF(block, NUMSLI, evt_nop, "Falloff ", 0,yco-60,180,19, &brush->innerradius, 0.0, 1.0, 0, 0, "The fall off radius of the brush");
+// uiDefIconButBitS(block, TOG|BIT, BRUSH_RAD_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-60,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
uiDefButF(block, NUMSLI, evt_nop, "Spacing ",0,yco-80,180,19, &brush->spacing, 1.0, 100.0, 0, 0, "Repeating paint on %% of brush diameter");
uiDefIconButBitS(block, TOG|BIT, BRUSH_SPACING_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-80,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
uiBlockEndAlign(block);
@@ -565,105 +490,36 @@ void brush_buttons(const bContext *C, uiBlock *block, short fromsima,
#endif
}
-static int image_panel_paint_poll(const bContext *C, PanelType *pt)
-{
- SpaceImage *sima= CTX_wm_space_image(C);
-
- return (sima->image && (sima->flag & SI_DRAWTOOL));
-}
-
-static void image_panel_paintcolor(const bContext *C, Panel *pa)
-{
- SpaceImage *sima= CTX_wm_space_image(C);
- ToolSettings *settings= CTX_data_tool_settings(C);
- Brush *brush= paint_brush(&settings->imapaint.paint);
- uiBlock *block;
- static float hsv[3], old[3]; // used as temp mem for picker
- static char hexcol[128];
-
- if(!sima->image || (sima->flag & SI_DRAWTOOL)==0)
- return;
-
- block= uiLayoutFreeBlock(pa->layout);
- uiBlockSetHandleFunc(block, do_image_panel_events, NULL);
-
- if(brush)
- uiBlockPickerButtons(block, brush->rgb, hsv, old, hexcol, 'f', B_REDR);
-}
-
-static void image_panel_paint(const bContext *C, Panel *pa)
-{
- SpaceImage *sima= CTX_wm_space_image(C);
- uiBlock *block;
-
- if(!sima->image || (sima->flag & SI_DRAWTOOL)==0)
- return;
-
- block= uiLayoutFreeBlock(pa->layout);
- uiBlockSetHandleFunc(block, do_image_panel_events, NULL);
-
- brush_buttons(C, block, 1, B_SIMANOTHING, B_SIMABRUSHCHANGE, B_SIMABRUSHBROWSE, B_SIMABRUSHLOCAL, B_SIMABRUSHDELETE, B_KEEPDATA, B_SIMABTEXBROWSE, B_SIMABTEXDELETE);
-}
-
-static void image_panel_curves_reset(bContext *C, void *cumap_v, void *ibuf_v)
+static int image_panel_poll(const bContext *C, PanelType *pt)
{
SpaceImage *sima= CTX_wm_space_image(C);
- CurveMapping *cumap = cumap_v;
- int a;
-
- for(a=0; a<CM_TOT; a++)
- curvemap_reset(cumap->cm+a, &cumap->clipr);
- cumap->black[0]=cumap->black[1]=cumap->black[2]= 0.0f;
- cumap->white[0]=cumap->white[1]=cumap->white[2]= 1.0f;
- curvemapping_set_black_white(cumap, NULL, NULL);
-
- curvemapping_changed(cumap, 0);
- curvemapping_do_ibuf(cumap, ibuf_v);
-
- WM_event_add_notifier(C, NC_IMAGE, sima->image);
+ return ED_space_image_has_buffer(sima);
}
-
static void image_panel_curves(const bContext *C, Panel *pa)
{
+ bScreen *sc= CTX_wm_screen(C);
SpaceImage *sima= CTX_wm_space_image(C);
ImBuf *ibuf;
- uiBlock *block;
- uiBut *bt;
+ PointerRNA simaptr;
+ int levels;
+ void *lock;
- /* and we check for spare */
- ibuf= ED_space_image_buffer(sima);
+ ibuf= ED_space_image_acquire_buffer(sima, &lock);
- block= uiLayoutFreeBlock(pa->layout);
- uiBlockSetHandleFunc(block, do_image_panel_events, NULL);
-
- if (ibuf) {
- rctf rect;
-
+ if(ibuf) {
if(sima->cumap==NULL)
sima->cumap= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
-
- rect.xmin= 110; rect.xmax= 310;
- rect.ymin= 10; rect.ymax= 200;
- curvemap_buttons(block, sima->cumap, 'c', B_SIMACURVES, B_REDR, &rect);
-
- /* curvemap min/max only works for RGBA */
- if(ibuf->channels==4) {
- bt=uiDefBut(block, BUT, B_SIMARANGE, "Reset", 10, 160, 90, 19, NULL, 0.0f, 0.0f, 0, 0, "Reset Black/White point and curves");
- uiButSetFunc(bt, image_panel_curves_reset, sima->cumap, ibuf);
-
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_SIMARANGE, "Min R:", 10, 120, 90, 19, sima->cumap->black, -1000.0f, 1000.0f, 10, 2, "Black level");
- uiDefButF(block, NUM, B_SIMARANGE, "Min G:", 10, 100, 90, 19, sima->cumap->black+1, -1000.0f, 1000.0f, 10, 2, "Black level");
- uiDefButF(block, NUM, B_SIMARANGE, "Min B:", 10, 80, 90, 19, sima->cumap->black+2, -1000.0f, 1000.0f, 10, 2, "Black level");
-
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_SIMARANGE, "Max R:", 10, 50, 90, 19, sima->cumap->white, -1000.0f, 1000.0f, 10, 2, "White level");
- uiDefButF(block, NUM, B_SIMARANGE, "Max G:", 10, 30, 90, 19, sima->cumap->white+1, -1000.0f, 1000.0f, 10, 2, "White level");
- uiDefButF(block, NUM, B_SIMARANGE, "Max B:", 10, 10, 90, 19, sima->cumap->white+2, -1000.0f, 1000.0f, 10, 2, "White level");
- }
+
+ /* curvemap black/white levels only works for RGBA */
+ levels= (ibuf->channels==4);
+
+ RNA_pointer_create(&sc->id, &RNA_SpaceImageEditor, sima, &simaptr);
+ uiTemplateCurveMapping(pa->layout, &simaptr, "curves", 'c', levels);
}
+
+ ED_space_image_release_buffer(sima, lock);
}
#if 0
@@ -799,81 +655,11 @@ static void image_panel_preview(ScrArea *sa, short cntrl) // IMAGE_HANDLER_PREVI
uiBlockSetDrawExtraFunc(block, preview_cb);
}
-
-static void image_panel_gpencil(short cntrl) // IMAGE_HANDLER_GREASEPENCIL
-{
- uiBlock *block;
- SpaceImage *sima;
-
- sima= curarea->spacedata.first;
-
- block= uiBeginBlock(C, ar, "image_panel_gpencil", UI_EMBOSS);
- uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | cntrl);
- uiSetPanelHandler(IMAGE_HANDLER_GREASEPENCIL); // for close and esc
- if (uiNewPanel(C, ar, block, "Grease Pencil", "SpaceImage", 100, 30, 318, 204)==0) return;
-
- /* allocate memory for gpd if drawing enabled (this must be done first or else we crash) */
- if (sima->flag & SI_DISPGP) {
- if (sima->gpd == NULL)
- gpencil_data_setactive(curarea, gpencil_data_addnew());
- }
-
- if (sima->flag & SI_DISPGP) {
- bGPdata *gpd= sima->gpd;
- short newheight;
-
- /* this is a variable height panel, newpanel doesnt force new size on existing panels */
- /* so first we make it default height */
- uiNewPanelHeight(block, 204);
-
- /* draw button for showing gpencil settings and drawings */
- uiDefButBitI(block, TOG, SI_DISPGP, B_REDR, "Use Grease Pencil", 10, 225, 150, 20, &sima->flag, 0, 0, 0, 0, "Display freehand annotations overlay over this Image/UV Editor (draw using Shift-LMB)");
-
- /* extend the panel if the contents won't fit */
- newheight= draw_gpencil_panel(block, gpd, curarea);
- uiNewPanelHeight(block, newheight);
- }
- else {
- uiDefButBitI(block, TOG, SI_DISPGP, B_REDR, "Use Grease Pencil", 10, 225, 150, 20, &sima->flag, 0, 0, 0, 0, "Display freehand annotations overlay over this Image/UV Editor");
- uiDefBut(block, LABEL, 1, " ", 160, 180, 150, 20, NULL, 0.0, 0.0, 0, 0, "");
- }
-}
#endif
/* ********************* callbacks for standard image buttons *************** */
-/* called from fileselect or button */
-static void load_image_cb(bContext *C, char *str, void *ima_pp_v, void *iuser_v)
-{
- Image **ima_pp= (Image **)ima_pp_v;
- Image *ima= NULL;
-
- ima= BKE_add_image_file(str, 0);
- if(ima) {
- if(*ima_pp) {
- (*ima_pp)->id.us--;
- }
- *ima_pp= ima;
-
- BKE_image_signal(ima, iuser_v, IMA_SIGNAL_RELOAD);
- WM_event_add_notifier(C, NC_IMAGE, ima);
-
- /* button event gets lost when it goes via filewindow */
-// if(G.buts && G.buts->lockpoin) {
-// Tex *tex= G.buts->lockpoin;
-// if(GS(tex->id.name)==ID_TE) {
-// BIF_preview_changed(ID_TE);
-// allqueue(REDRAWBUTSSHADING, 0);
-// allqueue(REDRAWVIEW3D, 0);
-// allqueue(REDRAWOOPS, 0);
-// }
-// }
- }
-
- ED_undo_push(C, "Load image");
-}
-
static char *layer_menu(RenderResult *rr, short *curlay)
{
RenderLayer *rl;
@@ -937,92 +723,6 @@ static void set_frames_cb(bContext *C, void *ima_v, void *iuser_v)
}
}
-static void image_src_change_cb(bContext *C, void *ima_v, void *iuser_v)
-{
- BKE_image_signal(ima_v, iuser_v, IMA_SIGNAL_SRC_CHANGE);
-}
-
-/* buttons have 2 arg callbacks, filewindow has 3 args... so thats why the wrapper below */
-static void image_browse_cb1(bContext *C, void *ima_pp_v, void *iuser_v)
-{
- Image **ima_pp= (Image **)ima_pp_v;
- ImageUser *iuser= iuser_v;
-
- if(ima_pp) {
- Image *ima= *ima_pp;
-
- if(iuser->menunr== -2) {
- // XXX activate_databrowse_args(&ima->id, ID_IM, 0, &iuser->menunr, image_browse_cb1, ima_pp, iuser);
- }
- else if (iuser->menunr>0) {
- Image *newima= (Image*) BLI_findlink(&CTX_data_main(C)->image, iuser->menunr-1);
-
- if (newima && newima!=ima) {
- *ima_pp= newima;
- id_us_plus(&newima->id);
- if(ima) ima->id.us--;
-
- BKE_image_signal(newima, iuser, IMA_SIGNAL_USER_NEW_IMAGE);
-
- ED_undo_push(C, "Browse image");
- }
- }
- }
-}
-
-static void image_browse_cb(bContext *C, void *ima_pp_v, void *iuser_v)
-{
- image_browse_cb1(C, ima_pp_v, iuser_v);
-}
-
-static void image_reload_cb(bContext *C, void *ima_v, void *iuser_v)
-{
- if(ima_v) {
- BKE_image_signal(ima_v, iuser_v, IMA_SIGNAL_RELOAD);
- }
-}
-
-static void image_field_test(bContext *C, void *ima_v, void *iuser_v)
-{
- Image *ima= ima_v;
-
- if(ima) {
- ImBuf *ibuf= BKE_image_get_ibuf(ima, iuser_v);
- if(ibuf) {
- short nr= 0;
- if( !(ima->flag & IMA_FIELDS) && (ibuf->flags & IB_fields) ) nr= 1;
- if( (ima->flag & IMA_FIELDS) && !(ibuf->flags & IB_fields) ) nr= 1;
- if(nr) {
- BKE_image_signal(ima, iuser_v, IMA_SIGNAL_FREE);
- }
- }
- }
-}
-
-static void image_unlink_cb(bContext *C, void *ima_pp_v, void *unused)
-{
- Image **ima_pp= (Image **)ima_pp_v;
-
- if(ima_pp && *ima_pp) {
- Image *ima= *ima_pp;
- /* (for time being, texturefaces are no users, conflict in design...) */
- if(ima->id.us>1)
- ima->id.us--;
- *ima_pp= NULL;
- }
-}
-
-static void image_load_fs_cb(bContext *C, void *ima_pp_v, void *iuser_v)
-{
- ScrArea *sa= CTX_wm_area(C);
-// Image **ima_pp= (Image **)ima_pp_v;
-
- if(sa->spacetype==SPACE_IMAGE)
- WM_operator_name_call(C, "IMAGE_OT_open", WM_OP_INVOKE_REGION_WIN, NULL);
- else
- printf("not supported yet\n");
-}
-
/* 5 layer button callbacks... */
static void image_multi_cb(bContext *C, void *rr_v, void *iuser_v)
{
@@ -1077,6 +777,7 @@ static void image_multi_decpass_cb(bContext *C, void *rr_v, void *iuser_v)
}
}
+#if 0
static void image_pack_cb(bContext *C, void *ima_v, void *iuser_v)
{
if(ima_v) {
@@ -1106,338 +807,330 @@ static void image_pack_cb(bContext *C, void *ima_v, void *iuser_v)
}
}
}
+#endif
-static void image_load_cb(bContext *C, void *ima_pp_v, void *iuser_v)
-{
- if(ima_pp_v) {
- Image *ima= *((Image **)ima_pp_v);
- ImBuf *ibuf= BKE_image_get_ibuf(ima, iuser_v);
- char str[FILE_MAX];
-
- /* name in ima has been changed by button! */
- BLI_strncpy(str, ima->name, FILE_MAX);
- if(ibuf) BLI_strncpy(ima->name, ibuf->name, FILE_MAX);
-
- load_image_cb(C, str, ima_pp_v, iuser_v);
- }
-}
-
+#if 0
static void image_freecache_cb(bContext *C, void *ima_v, void *unused)
{
Scene *scene= CTX_data_scene(C);
BKE_image_free_anim_ibufs(ima_v, scene->r.cfra);
WM_event_add_notifier(C, NC_IMAGE, ima_v);
}
+#endif
-static void image_generated_change_cb(bContext *C, void *ima_v, void *iuser_v)
-{
- BKE_image_signal(ima_v, iuser_v, IMA_SIGNAL_FREE);
-}
-
+#if 0
static void image_user_change(bContext *C, void *iuser_v, void *unused)
{
Scene *scene= CTX_data_scene(C);
BKE_image_user_calc_imanr(iuser_v, scene->r.cfra, 0);
}
+#endif
-static void uiblock_layer_pass_buttons(uiBlock *block, RenderResult *rr, ImageUser *iuser, int event, int x, int y, int w)
+static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, ImageUser *iuser, int w)
{
+ uiBlock *block= uiLayoutGetBlock(layout);
uiBut *but;
RenderLayer *rl= NULL;
int wmenu1, wmenu2;
char *strp;
+ uiLayoutRow(layout, 1);
+
/* layer menu is 1/3 larger than pass */
wmenu1= (3*w)/5;
wmenu2= (2*w)/5;
/* menu buts */
strp= layer_menu(rr, &iuser->layer);
- but= uiDefButS(block, MENU, event, strp, x, y, wmenu1, 20, &iuser->layer, 0,0,0,0, "Select Layer");
+ but= uiDefButS(block, MENU, 0, strp, 0, 0, wmenu1, 20, &iuser->layer, 0,0,0,0, "Select Layer");
uiButSetFunc(but, image_multi_cb, rr, iuser);
MEM_freeN(strp);
rl= BLI_findlink(&rr->layers, iuser->layer - (rr->rectf?1:0)); /* fake compo layer, return NULL is meant to be */
strp= pass_menu(rl, &iuser->pass);
- but= uiDefButS(block, MENU, event, strp, x+wmenu1, y, wmenu2, 20, &iuser->pass, 0,0,0,0, "Select Pass");
+ but= uiDefButS(block, MENU, 0, strp, 0, 0, wmenu2, 20, &iuser->pass, 0,0,0,0, "Select Pass");
uiButSetFunc(but, image_multi_cb, rr, iuser);
MEM_freeN(strp);
}
-static void uiblock_layer_pass_arrow_buttons(uiBlock *block, RenderResult *rr, ImageUser *iuser, int imagechanged)
+static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, RenderResult *rr, ImageUser *iuser)
{
+ uiBlock *block= uiLayoutGetBlock(layout);
+ uiLayout *row;
uiBut *but;
+ row= uiLayoutRow(layout, 1);
+
if(rr==NULL || iuser==NULL)
return;
if(rr->layers.first==NULL) {
- uiDefBut(block, LABEL, 0, "No Layers in Render Result,", 10, 107, 300, 20, NULL, 1, 0, 0, 0, "");
+ uiItemL(row, "No Layers in Render Result.", 0);
return;
}
-
- uiBlockBeginAlign(block);
/* decrease, increase arrows */
- but= uiDefIconBut(block, BUT, imagechanged, ICON_TRIA_LEFT, 10,107,17,20, NULL, 0, 0, 0, 0, "Previous Layer");
+ but= uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Layer");
uiButSetFunc(but, image_multi_declay_cb, rr, iuser);
- but= uiDefIconBut(block, BUT, imagechanged, ICON_TRIA_RIGHT, 27,107,18,20, NULL, 0, 0, 0, 0, "Next Layer");
+ but= uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Layer");
uiButSetFunc(but, image_multi_inclay_cb, rr, iuser);
- uiblock_layer_pass_buttons(block, rr, iuser, imagechanged, 45, 107, 230);
+ uiblock_layer_pass_buttons(row, rr, iuser, 230);
/* decrease, increase arrows */
- but= uiDefIconBut(block, BUT, imagechanged, ICON_TRIA_LEFT, 275,107,17,20, NULL, 0, 0, 0, 0, "Previous Pass");
+ but= uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Pass");
uiButSetFunc(but, image_multi_decpass_cb, rr, iuser);
- but= uiDefIconBut(block, BUT, imagechanged, ICON_TRIA_RIGHT, 292,107,18,20, NULL, 0, 0, 0, 0, "Next Pass");
+ but= uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Pass");
uiButSetFunc(but, image_multi_incpass_cb, rr, iuser);
uiBlockEndAlign(block);
-
}
// XXX HACK!
-static int packdummy=0;
+// static int packdummy=0;
-/* The general Image panel with the loadsa callbacks! */
-void ED_image_uiblock_panel(const bContext *C, uiBlock *block, Image **ima_pp, ImageUser *iuser,
- short redraw, short imagechanged)
+typedef struct RNAUpdateCb {
+ PointerRNA ptr;
+ PropertyRNA *prop;
+ ImageUser *iuser;
+} RNAUpdateCb;
+
+static void rna_update_cb(bContext *C, void *arg_cb, void *arg_unused)
+{
+ RNAUpdateCb *cb= (RNAUpdateCb*)arg_cb;
+
+ /* ideally this would be done by RNA itself, but there we have
+ no image user available, so we just update this flag here */
+ cb->iuser->ok= 1;
+
+ /* we call update here on the pointer property, this way the
+ owner of the image pointer can still define it's own update
+ and notifier */
+ RNA_property_update(C, &cb->ptr, cb->prop);
+}
+
+void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname, PointerRNA *userptr, int compact)
{
+ PropertyRNA *prop;
+ PointerRNA imaptr;
+ RNAUpdateCb *cb;
+ Image *ima;
+ ImageUser *iuser;
+ ImBuf *ibuf;
Scene *scene= CTX_data_scene(C);
- SpaceImage *sima= CTX_wm_space_image(C);
- Image *ima= *ima_pp;
+ uiLayout *row, *split, *col;
+ uiBlock *block;
uiBut *but;
- char str[128], *strp;
+ char str[128];
+ void *lock;
+
+ if(!ptr->data)
+ return;
- /* different stuff when we show viewer */
- if(ima && ima->source==IMA_SRC_VIEWER) {
- ImBuf *ibuf= BKE_image_get_ibuf(ima, iuser);
-
- image_info(ima, ibuf, str);
- uiDefBut(block, LABEL, 0, ima->id.name+2, 10, 180, 300, 20, NULL, 1, 0, 0, 0, "");
- uiDefBut(block, LABEL, 0, str, 10, 160, 300, 20, NULL, 1, 0, 0, 0, "");
-
- if(ima->type==IMA_TYPE_COMPOSITE) {
- iuser= ntree_get_active_iuser(scene->nodetree);
- if(iuser) {
- uiBlockBeginAlign(block);
- uiDefIconTextBut(block, BUT, B_SIMA_RECORD, ICON_REC, "Record", 10,120,100,20, 0, 0, 0, 0, 0, "");
- uiDefIconTextBut(block, BUT, B_SIMA_PLAY, ICON_PLAY, "Play", 110,120,100,20, 0, 0, 0, 0, 0, "");
- but= uiDefBut(block, BUT, B_NOP, "Free Cache", 210,120,100,20, 0, 0, 0, 0, 0, "");
- uiButSetFunc(but, image_freecache_cb, ima, NULL);
-
- if(iuser->frames)
- sprintf(str, "(%d) Frames:", iuser->framenr);
- else strcpy(str, "Frames:");
- uiBlockBeginAlign(block);
- uiDefButI(block, NUM, imagechanged, str, 10, 90,150, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Sets the number of images of a movie to use");
- uiDefButI(block, NUM, imagechanged, "StartFr:", 160,90,150,20, &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Sets the global starting frame of the movie");
- }
- }
- else if(ima->type==IMA_TYPE_R_RESULT) {
- /* browse layer/passes */
- uiblock_layer_pass_arrow_buttons(block, RE_GetResult(RE_GetRender(scene->id.name)), iuser, imagechanged);
- }
+ prop= RNA_struct_find_property(ptr, propname);
+ if(!prop) {
+ printf("uiTemplateImage: property not found: %s\n", propname);
return;
}
-
- /* the main ima source types */
+
+ block= uiLayoutGetBlock(layout);
+
+ imaptr= RNA_property_pointer_get(ptr, prop);
+ ima= imaptr.data;
+ iuser= userptr->data;
+
+ cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb");
+ cb->ptr= *ptr;
+ cb->prop= prop;
+ cb->iuser= iuser;
+
+ uiLayoutSetContextPointer(layout, "edit_image", &imaptr);
+
+ if(!compact)
+ uiTemplateID(layout, C, ptr, propname, "IMAGE_OT_new", "IMAGE_OT_open", NULL);
+
+ // XXX missing: reload, pack
+
if(ima) {
-// XXX uiSetButLock(ima->id.lib!=NULL, ERROR_LIBDATA_MESSAGE);
- uiBlockBeginAlign(block);
- uiBlockSetFunc(block, image_src_change_cb, ima, iuser);
- uiDefButS(block, ROW, imagechanged, "Still", 0, 180, 105, 20, &ima->source, 0.0, IMA_SRC_FILE, 0, 0, "Single Image file");
- uiDefButS(block, ROW, imagechanged, "Movie", 105, 180, 105, 20, &ima->source, 0.0, IMA_SRC_MOVIE, 0, 0, "Movie file");
- uiDefButS(block, ROW, imagechanged, "Sequence", 210, 180, 105, 20, &ima->source, 0.0, IMA_SRC_SEQUENCE, 0, 0, "Multiple Image files, as a sequence");
- uiDefButS(block, ROW, imagechanged, "Generated", 315, 180, 105, 20, &ima->source, 0.0, IMA_SRC_GENERATED, 0, 0, "Generated Image");
- uiBlockSetFunc(block, NULL, NULL, NULL);
- }
- else
- uiDefBut(block, LABEL, 0, " ", 0, 180, 440, 20, 0, 0, 0, 0, 0, ""); /* for align in panel */
+ uiBlockSetNFunc(block, rna_update_cb, MEM_dupallocN(cb), NULL);
+
+ if(ima->source == IMA_SRC_VIEWER) {
+ ibuf= BKE_image_acquire_ibuf(ima, iuser, &lock);
+ image_info(ima, ibuf, str);
+ BKE_image_release_ibuf(ima, lock);
+
+ uiItemL(layout, ima->id.name+2, 0);
+ uiItemL(layout, str, 0);
+
+ if(ima->type==IMA_TYPE_COMPOSITE) {
+ // XXX not working yet
+#if 0
+ iuser= ntree_get_active_iuser(scene->nodetree);
+ if(iuser) {
+ uiBlockBeginAlign(block);
+ uiDefIconTextBut(block, BUT, B_SIMA_RECORD, ICON_REC, "Record", 10,120,100,20, 0, 0, 0, 0, 0, "");
+ uiDefIconTextBut(block, BUT, B_SIMA_PLAY, ICON_PLAY, "Play", 110,120,100,20, 0, 0, 0, 0, 0, "");
+ but= uiDefBut(block, BUT, B_NOP, "Free Cache", 210,120,100,20, 0, 0, 0, 0, 0, "");
+ uiButSetFunc(but, image_freecache_cb, ima, NULL);
+
+ if(iuser->frames)
+ sprintf(str, "(%d) Frames:", iuser->framenr);
+ else strcpy(str, "Frames:");
+ uiBlockBeginAlign(block);
+ uiDefButI(block, NUM, imagechanged, str, 10, 90,150, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Sets the number of images of a movie to use");
+ uiDefButI(block, NUM, imagechanged, "StartFr:", 160,90,150,20, &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Sets the global starting frame of the movie");
+ }
+#endif
+ }
+ else if(ima->type==IMA_TYPE_R_RESULT) {
+ /* browse layer/passes */
+ Render *re= RE_GetRender(scene->id.name);
+ RenderResult *rr= RE_AcquireResultRead(re);
+ uiblock_layer_pass_arrow_buttons(layout, rr, iuser);
+ RE_ReleaseResult(re);
+ }
+ }
+ else {
+ row= uiLayoutRow(layout, 0);
+ uiItemR(row, NULL, 0, &imaptr, "source", (compact)? 0: UI_ITEM_R_EXPAND);
+
+ if(ima->source != IMA_SRC_GENERATED) {
+ row= uiLayoutRow(layout, 1);
+ uiItemR(row, "", 0, &imaptr, "filename", 0);
+ uiItemO(row, "", ICON_FILE_REFRESH, "image.reload");
+ }
+
+ // XXX what was this for?
+#if 0
+ /* check for re-render, only buttons */
+ if(imagechanged==B_IMAGECHANGED) {
+ if(iuser->flag & IMA_ANIM_REFRESHED) {
+ iuser->flag &= ~IMA_ANIM_REFRESHED;
+ WM_event_add_notifier(C, NC_IMAGE, ima);
+ }
+ }
+#endif
+
+ /* multilayer? */
+ if(ima->type==IMA_TYPE_MULTILAYER && ima->rr) {
+ uiblock_layer_pass_arrow_buttons(layout, ima->rr, iuser);
+ }
+ else if(ima->source != IMA_SRC_GENERATED) {
+ ibuf= BKE_image_acquire_ibuf(ima, iuser, &lock);
+ image_info(ima, ibuf, str);
+ BKE_image_release_ibuf(ima, lock);
+ uiItemL(layout, str, 0);
+ }
+
+ if(ima->source != IMA_SRC_GENERATED) {
+ uiItemS(layout);
+
+ split= uiLayoutSplit(layout, 0);
+
+ col= uiLayoutColumn(split, 0);
+ uiItemR(col, NULL, 0, &imaptr, "fields", 0);
+ row= uiLayoutRow(col, 0);
+ uiItemR(row, NULL, 0, &imaptr, "field_order", UI_ITEM_R_EXPAND);
+ uiLayoutSetActive(row, RNA_boolean_get(&imaptr, "fields"));
+
+ col= uiLayoutColumn(split, 0);
+ uiItemR(col, NULL, 0, &imaptr, "antialias", 0);
+ uiItemR(col, NULL, 0, &imaptr, "premultiply", 0);
+ }
+
+ if(ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
+ uiItemS(layout);
+
+ split= uiLayoutSplit(layout, 0);
+
+ col= uiLayoutColumn(split, 0);
- /* Browse */
- IMAnames_to_pupstring(&strp, NULL, NULL, &(CTX_data_main(C)->image), NULL, &iuser->menunr);
-
- uiBlockBeginAlign(block);
- but= uiDefButS(block, MENU, imagechanged, strp, 0,155,40,20, &iuser->menunr, 0, 0, 0, 0, "Selects an existing Image or Movie");
- uiButSetFunc(but, image_browse_cb, ima_pp, iuser);
-
- MEM_freeN(strp);
-
- /* name + options, or only load */
- if(ima) {
- int drawpack= (ima->source!=IMA_SRC_SEQUENCE && ima->source!=IMA_SRC_MOVIE && ima->ok);
-
- but= uiDefBut(block, TEX, B_IDNAME, "IM:", 40, 155, 220, 20, ima->id.name+2, 0.0, 21.0, 0, 0, "Current Image Datablock name.");
- uiButSetFunc(but, test_idbutton_cb, ima->id.name, NULL);
- but= uiDefBut(block, BUT, imagechanged, "Reload", 260, 155, 70, 20, NULL, 0, 0, 0, 0, "Reloads Image or Movie");
- uiButSetFunc(but, image_reload_cb, ima, iuser);
-
- but= uiDefIconBut(block, BUT, imagechanged, ICON_X, 330, 155, 40, 20, 0, 0, 0, 0, 0, "Unlink Image block");
- uiButSetFunc(but, image_unlink_cb, ima_pp, NULL);
- sprintf(str, "%d", ima->id.us);
- uiDefBut(block, BUT, B_NOP, str, 370, 155, 40, 20, 0, 0, 0, 0, 0, "Only displays number of users of Image block");
- uiBlockEndAlign(block);
-
- uiBlockBeginAlign(block);
- but= uiDefIconBut(block, BUT, imagechanged, ICON_FILESEL, 0, 130, 40, 20, 0, 0, 0, 0, 0, "Open Fileselect to load new Image");
- uiButSetFunc(but, image_load_fs_cb, ima_pp, iuser);
- but= uiDefBut(block, TEX, imagechanged, "", 40,130, 340+(drawpack?0:20),20, ima->name, 0.0, 239.0, 0, 0, "Image/Movie file name, change to load new");
- uiButSetFunc(but, image_load_cb, ima_pp, iuser);
- uiBlockEndAlign(block);
-
- if(drawpack) {
- if (ima->packedfile) packdummy = 1;
- else packdummy = 0;
- but= uiDefIconButBitI(block, TOG, 1, redraw, ICON_PACKAGE, 380, 130, 40, 20, &packdummy, 0, 0, 0, 0, "Toggles Packed status of this Image");
- uiButSetFunc(but, image_pack_cb, ima, iuser);
- }
-
- }
- else {
- but= uiDefBut(block, BUT, imagechanged, "Load", 33, 155, 200,20, NULL, 0, 0, 0, 0, "Load new Image of Movie");
- uiButSetFunc(but, image_load_fs_cb, ima_pp, iuser);
- }
- uiBlockEndAlign(block);
-
- if(ima) {
- ImBuf *ibuf= BKE_image_get_ibuf(ima, iuser);
-
- /* check for re-render, only buttons */
- if(imagechanged==B_IMAGECHANGED) {
- if(iuser->flag & IMA_ANIM_REFRESHED) {
- iuser->flag &= ~IMA_ANIM_REFRESHED;
- WM_event_add_notifier(C, NC_IMAGE, ima);
- }
- }
-
- /* multilayer? */
- if(ima->type==IMA_TYPE_MULTILAYER && ima->rr) {
- uiblock_layer_pass_arrow_buttons(block, ima->rr, iuser, imagechanged);
- }
- else {
- image_info(ima, ibuf, str);
- uiDefBut(block, LABEL, 0, str, 10, 112, 300, 20, NULL, 1, 0, 0, 0, "");
- }
-
- /* exception, let's do because we only use this panel 3 times in blender... but not real good code! */
- if( (paint_facesel_test(CTX_data_active_object(C))) && sima && &sima->iuser==iuser)
- return;
- /* left side default per-image options, right half the additional options */
-
- /* fields */
-
- but= uiDefButBitS(block, OPTION, IMA_FIELDS, imagechanged, "Fields", 0, 80, 200, 20, &ima->flag, 0, 0, 0, 0, "Click to enable use of fields in Image");
- uiButSetFunc(but, image_field_test, ima, iuser);
- uiDefButBitS(block, OPTION, IMA_STD_FIELD, B_NOP, "Odd", 0, 55, 200, 20, &ima->flag, 0, 0, 0, 0, "Standard Field Toggle");
-
-
- uiBlockSetFunc(block, image_reload_cb, ima, iuser);
- uiDefButBitS(block, OPTION, IMA_ANTIALI, B_NOP, "Anti-Aliasing", 0, 5, 200, 20, &ima->flag, 0, 0, 0, 0, "Toggles Image anti-aliasing, only works with solid colors");
- uiDefButBitS(block, OPTION, IMA_DO_PREMUL, imagechanged, "Premultiply", 0, -20, 200, 20, &ima->flag, 0, 0, 0, 0, "Toggles premultiplying alpha");
-
-
- if( ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
- sprintf(str, "(%d) Frames:", iuser->framenr);
-
- //uiBlockBeginAlign(block);
- uiBlockSetFunc(block, image_user_change, iuser, NULL);
-
- if(ima->anim) {
- uiBlockBeginAlign(block);
- uiDefButI(block, NUM, imagechanged, str, 220, 80, 160, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Sets the number of images of a movie to use");
- but= uiDefBut(block, BUT, redraw, "<", 380, 80, 40, 20, 0, 0, 0, 0, 0, "Copies number of frames in movie file to Frames: button");
- uiButSetFunc(but, set_frames_cb, ima, iuser);
- uiBlockEndAlign(block);
- }
- else
- uiDefButI(block, NUM, imagechanged, str, 220, 80, 200, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Sets the number of images of a movie to use");
-
- uiDefButI(block, NUM, imagechanged, "Start Frame:", 220, 55, 200, 20, &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Sets the global starting frame of the movie");
- uiDefButI(block, NUM, imagechanged, "Offset:", 220, 30, 200, 20, &iuser->offset, -MAXFRAMEF, MAXFRAMEF, 0, 0, "Offsets the number of the frame to use in the animation");
- uiDefButS(block, NUM, imagechanged, "Fields:", 0, 30, 200, 20, &iuser->fie_ima, 1.0, 200.0, 0, 0, "The number of fields per rendered frame (2 fields is 1 image)");
-
- uiDefButBitS(block, OPTION, IMA_ANIM_ALWAYS, B_NOP, "Auto Refresh", 220, 5, 200, 20, &iuser->flag, 0, 0, 0, 0, "Always refresh Image on frame changes");
-
- uiDefButS(block, OPTION, imagechanged, "Cyclic", 220, -20, 200, 20, &iuser->cycl, 0.0, 1.0, 0, 0, "Cycle the images in the movie");
-
- uiBlockSetFunc(block, NULL, iuser, NULL);
- }
- else if(ima->source==IMA_SRC_GENERATED) {
-
- uiDefBut(block, LABEL, 0, "Size:", 220, 80, 200, 20, 0, 0, 0, 0, 0, "");
-
- uiBlockBeginAlign(block);
- uiBlockSetFunc(block, image_generated_change_cb, ima, iuser);
- uiDefButS(block, NUM, imagechanged, "X:", 220, 55,200,20, &ima->gen_x, 1.0, 5000.0, 0, 0, "Image size x");
- uiDefButS(block, NUM, imagechanged, "Y:", 220, 35,200,20, &ima->gen_y, 1.0, 5000.0, 0, 0, "Image size y");
- uiBlockEndAlign(block);
-
- uiDefButS(block, OPTION, imagechanged, "UV Test grid", 220,10,200,20, &ima->gen_type, 0.0, 1.0, 0, 0, "");
- uiBlockSetFunc(block, NULL, NULL, NULL);
- }
- }
- uiBlockEndAlign(block);
-}
+ sprintf(str, "(%d) Frames", iuser->framenr);
+ row= uiLayoutRow(col, 1);
+ uiItemR(col, str, 0, userptr, "frames", 0);
+ if(ima->anim) {
+ block= uiLayoutGetBlock(row);
+ but= uiDefBut(block, BUT, 0, "<", 0, 0, UI_UNIT_X*2, UI_UNIT_Y, 0, 0, 0, 0, 0, "Set the number of frames from the movie or sequence.");
+ uiButSetFunc(but, set_frames_cb, ima, iuser);
+ }
+
+ uiItemR(col, "Start", 0, userptr, "start_frame", 0);
+ uiItemR(col, NULL, 0, userptr, "offset", 0);
+
+ col= uiLayoutColumn(split, 0);
+ uiItemR(col, "Fields", 0, userptr, "fields_per_frame", 0);
+ uiItemR(col, NULL, 0, userptr, "auto_refresh", 0);
+ uiItemR(col, NULL, 0, userptr, "cyclic", 0);
+ }
+ else if(ima->source==IMA_SRC_GENERATED) {
+ split= uiLayoutSplit(layout, 0);
+
+ col= uiLayoutColumn(split, 1);
+ uiItemR(col, "X", 0, &imaptr, "generated_width", 0);
+ uiItemR(col, "Y", 0, &imaptr, "generated_height", 0);
+
+ col= uiLayoutColumn(split, 0);
+ uiItemR(col, NULL, 0, &imaptr, "generated_type", UI_ITEM_R_EXPAND);
+ }
+
+ }
+
+ uiBlockSetNFunc(block, NULL, NULL, NULL);
+ }
+
+ MEM_freeN(cb);
+}
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);
+ rr= BKE_image_acquire_renderresult(scene, ima);
- if(rr) {
- uiBlockBeginAlign(block);
- uiblock_layer_pass_buttons(block, rr, iuser, 0, 0, 0, 160);
- uiBlockEndAlign(block);
- }
+ if(rr)
+ uiblock_layer_pass_buttons(layout, rr, iuser, 160);
+
+ BKE_image_release_renderresult(scene, ima);
}
}
-static void image_panel_properties(const bContext *C, Panel *pa)
+static int image_panel_uv_poll(const bContext *C, PanelType *pt)
{
- SpaceImage *sima= CTX_wm_space_image(C);
+ Object *obedit= CTX_data_edit_object(C);
+ return ED_uvedit_test(obedit);
+}
+
+static void image_panel_uv(const bContext *C, Panel *pa)
+{
+ ARegion *ar= CTX_wm_region(C);
uiBlock *block;
- block= uiLayoutFreeBlock(pa->layout);
+ block= uiLayoutAbsoluteBlock(pa->layout);
uiBlockSetHandleFunc(block, do_image_panel_events, NULL);
- /* note, it draws no bottom half in facemode, for vertex buttons */
- ED_image_uiblock_panel(C, block, &sima->image, &sima->iuser, B_REDR, B_REDR);
image_editvertex_buts(C, block);
+ image_editcursor_buts(C, &ar->v2d, block);
}
void image_buttons_register(ARegionType *art)
{
PanelType *pt;
- pt= MEM_callocN(sizeof(PanelType), "spacetype image panel properties");
- strcpy(pt->idname, "IMAGE_PT_properties");
- strcpy(pt->label, "Image Properties");
- pt->draw= image_panel_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");
- pt->draw= image_panel_paint;
- pt->poll= image_panel_paint_poll;
- BLI_addtail(&art->paneltypes, pt);
-
- pt= MEM_callocN(sizeof(PanelType), "spacetype image panel paint color");
- strcpy(pt->idname, "IMAGE_PT_paint_color");
- strcpy(pt->label, "Paint Color");
- pt->draw= image_panel_paintcolor;
- pt->poll= image_panel_paint_poll;
+ pt= MEM_callocN(sizeof(PanelType), "spacetype image panel uv");
+ strcpy(pt->idname, "IMAGE_PT_uv");
+ strcpy(pt->label, "UV");
+ pt->draw= image_panel_uv;
+ pt->poll= image_panel_uv_poll;
BLI_addtail(&art->paneltypes, pt);
pt= MEM_callocN(sizeof(PanelType), "spacetype image panel curves");
strcpy(pt->idname, "IMAGE_PT_curves");
strcpy(pt->label, "Curves");
pt->draw= image_panel_curves;
+ pt->poll= image_panel_poll;
+ pt->flag |= PNL_DEFAULT_CLOSED;
BLI_addtail(&art->paneltypes, pt);
pt= MEM_callocN(sizeof(PanelType), "spacetype image panel gpencil");
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index cf9bac1ebee..a42fec30c45 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -533,15 +533,18 @@ void draw_image_grease_pencil(bContext *C, short onlyv2d)
if (onlyv2d) {
/* assume that UI_view2d_ortho(C) has been called... */
SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C);
- ImBuf *ibuf= ED_space_image_buffer(sima);
+ void *lock;
+ ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock);
/* draw grease-pencil ('image' strokes) */
//if (sima->flag & SI_DISPGP)
draw_gpencil_2dimage(C, ibuf);
+
+ ED_space_image_release_buffer(sima, lock);
}
else {
/* assume that UI_view2d_restore(C) has been called... */
- SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C);
+ //SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C);
/* draw grease-pencil ('screen' strokes) */
//if (sima->flag & SI_DISPGP)
@@ -654,6 +657,7 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene)
ImBuf *ibuf;
float zoomx, zoomy;
int show_viewer, show_render;
+ void *lock;
/* XXX can we do this in refresh? */
#if 0
@@ -675,11 +679,9 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene)
}
#endif
- /* put scene context variable in iuser */
- sima->iuser.scene= scene;
/* retrieve the image and information about it */
ima= ED_space_image(sima);
- ibuf= ED_space_image_buffer(sima);
+ ibuf= ED_space_image_acquire_buffer(sima, &lock);
ED_space_image_zoom(sima, ar, &zoomx, &zoomy);
show_viewer= (ima && ima->source == IMA_SRC_VIEWER);
@@ -718,5 +720,7 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene)
}
}
#endif
+
+ ED_space_image_release_buffer(sima, lock);
}
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 806d0d7ce52..482750e5b2e 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -108,11 +108,16 @@ static void sima_zoom_set_factor(SpaceImage *sima, ARegion *ar, float zoomfac)
sima_zoom_set(sima, ar, sima->zoom*zoomfac);
}
+static int image_poll(bContext *C)
+{
+ return (CTX_data_edit_image(C) != NULL);
+}
+
static int space_image_poll(bContext *C)
{
SpaceImage *sima= CTX_wm_space_image(C);
if(sima && sima->spacetype==SPACE_IMAGE)
- if(ED_space_image_buffer(sima))
+ if(ED_space_image_has_buffer(sima))
return 1;
return 0;
}
@@ -121,10 +126,15 @@ static int space_image_file_exists_poll(bContext *C)
{
if(space_image_poll(C)) {
SpaceImage *sima= CTX_wm_space_image(C);
- ImBuf *ibuf= ED_space_image_buffer(sima);
+ ImBuf *ibuf;
+ void *lock;
+ int poll;
- if(ibuf && BLI_exists(ibuf->name) && BLI_is_writable(ibuf->name))
- return 1;
+ ibuf= ED_space_image_acquire_buffer(sima, &lock);
+ poll= (ibuf && BLI_exists(ibuf->name) && BLI_is_writable(ibuf->name));
+ ED_space_image_release_buffer(sima, lock);
+
+ return poll;
}
return 0;
}
@@ -161,7 +171,7 @@ static void view_pan_init(bContext *C, wmOperator *op, wmEvent *event)
vpd->xof= sima->xof;
vpd->yof= sima->yof;
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
}
static void view_pan_exit(bContext *C, wmOperator *op, int cancel)
@@ -224,7 +234,7 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
view_pan_exec(C, op);
break;
case MIDDLEMOUSE:
- if(event->val==0) {
+ if(event->val==KM_RELEASE) {
view_pan_exit(C, op, 0);
return OPERATOR_FINISHED;
}
@@ -280,7 +290,7 @@ static void view_zoom_init(bContext *C, wmOperator *op, wmEvent *event)
vpd->y= event->y;
vpd->zoom= sima->zoom;
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
}
static void view_zoom_exit(bContext *C, wmOperator *op, int cancel)
@@ -339,7 +349,7 @@ static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
ED_area_tag_redraw(CTX_wm_area(C));
break;
case MIDDLEMOUSE:
- if(event->val==0) {
+ if(event->val==KM_RELEASE) {
view_zoom_exit(C, op, 0);
return OPERATOR_FINISHED;
}
@@ -388,7 +398,6 @@ static int view_all_exec(bContext *C, wmOperator *op)
ARegion *ar;
Scene *scene;
Object *obedit;
- ImBuf *ibuf;
float aspx, aspy, zoomx, zoomy, w, h;
int width, height;
@@ -398,7 +407,6 @@ static int view_all_exec(bContext *C, wmOperator *op)
scene= (Scene*)CTX_data_scene(C);
obedit= CTX_data_edit_object(C);
- ibuf= ED_space_image_buffer(sima);
ED_space_image_size(sima, &width, &height);
ED_space_image_aspect(sima, &aspx, &aspy);
@@ -445,7 +453,6 @@ static int view_selected_exec(bContext *C, wmOperator *op)
Scene *scene;
Object *obedit;
Image *ima;
- ImBuf *ibuf;
float size, min[2], max[2], d[2];
int width, height;
@@ -456,7 +463,6 @@ static int view_selected_exec(bContext *C, wmOperator *op)
obedit= CTX_data_edit_object(C);
ima= ED_space_image(sima);
- ibuf= ED_space_image_buffer(sima);
ED_space_image_size(sima, &width, &height);
/* get bounds */
@@ -615,22 +621,61 @@ static void image_filesel(bContext *C, wmOperator *op, const char *path)
/******************** open image operator ********************/
+static void open_init(bContext *C, wmOperator *op)
+{
+ PropertyPointerRNA *pprop;
+
+ op->customdata= pprop= MEM_callocN(sizeof(PropertyPointerRNA), "OpenPropertyPointerRNA");
+ uiIDContextProperty(C, &pprop->ptr, &pprop->prop);
+}
+
+static int open_cancel(bContext *C, wmOperator *op)
+{
+ MEM_freeN(op->customdata);
+ op->customdata= NULL;
+ return OPERATOR_CANCELLED;
+}
+
static int open_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
+ PropertyPointerRNA *pprop;
+ PointerRNA idptr;
Image *ima= NULL;
char str[FILE_MAX];
RNA_string_get(op->ptr, "path", str);
ima= BKE_add_image_file(str, scene->r.cfra);
- if(!ima)
+ if(!ima) {
+ if(op->customdata) MEM_freeN(op->customdata);
return OPERATOR_CANCELLED;
+ }
+
+ if(!op->customdata)
+ open_init(C, op);
+
+ /* hook into UI */
+ pprop= op->customdata;
- BKE_image_signal(ima, &sima->iuser, IMA_SIGNAL_RELOAD);
- ED_space_image_set(C, sima, scene, obedit, ima);
+ if(pprop->prop) {
+ /* when creating new ID blocks, use is already 1, but RNA
+ * pointer se also increases user, so this compensates it */
+ ima->id.us--;
+
+ RNA_id_pointer_create(&ima->id, &idptr);
+ RNA_property_pointer_set(&pprop->ptr, pprop->prop, idptr);
+ RNA_property_update(C, &pprop->ptr, pprop->prop);
+ }
+ else if(sima)
+ ED_space_image_set(C, sima, scene, obedit, ima);
+
+ // XXX other users?
+ BKE_image_signal(ima, (sima)? &sima->iuser: NULL, IMA_SIGNAL_RELOAD);
+
+ MEM_freeN(op->customdata);
return OPERATOR_FINISHED;
}
@@ -638,11 +683,13 @@ static int open_exec(bContext *C, wmOperator *op)
static int open_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceImage *sima= CTX_wm_space_image(C);
- char *path= (sima->image)? sima->image->name: U.textudir;
+ char *path= (sima && sima->image)? sima->image->name: U.textudir;
if(RNA_property_is_set(op->ptr, "path"))
return open_exec(C, op);
+ open_init(C, op);
+
image_filesel(C, op, path);
return OPERATOR_RUNNING_MODAL;
@@ -651,13 +698,13 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *event)
void IMAGE_OT_open(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Open Image";
+ ot->name= "Open";
ot->idname= "IMAGE_OT_open";
/* api callbacks */
ot->exec= open_exec;
ot->invoke= open_invoke;
- ot->poll= ED_operator_image_active;
+ ot->cancel= open_cancel;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -726,7 +773,8 @@ void IMAGE_OT_replace(wmOperatorType *ot)
static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOperator *op, char *name)
{
Image *ima= ED_space_image(sima);
- ImBuf *ibuf= ED_space_image_buffer(sima);
+ void *lock;
+ ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock);
int len;
if (ibuf) {
@@ -747,7 +795,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera
WM_cursor_wait(1);
if(sima->imtypenr==R_MULTILAYER) {
- RenderResult *rr= BKE_image_get_renderresult(scene, ima);
+ RenderResult *rr= BKE_image_acquire_renderresult(scene, ima);
if(rr) {
RE_WriteRenderResult(rr, name, scene->r.quality);
@@ -761,6 +809,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera
}
else
BKE_report(op->reports, RPT_ERROR, "Did not write, no Multilayer Image");
+ BKE_image_release_renderresult(scene, ima);
}
else if (BKE_write_ibuf(scene, ibuf, name, sima->imtypenr, scene->r.subimtype, scene->r.quality)) {
BLI_strncpy(ima->name, name, sizeof(ima->name));
@@ -769,12 +818,25 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera
ibuf->userflags &= ~IB_BITMAPDIRTY;
/* change type? */
+ if(ima->type==IMA_TYPE_R_RESULT) {
+ ima->type= IMA_TYPE_IMAGE;
+
+ /* workaround to ensure the render result buffer is no longer used
+ * by this image, otherwise can crash when a new render result is
+ * created. */
+ if(ibuf->rect && !(ibuf->mall & IB_rect))
+ imb_freerectImBuf(ibuf);
+ if(ibuf->rect_float && !(ibuf->mall & IB_rectfloat))
+ imb_freerectfloatImBuf(ibuf);
+ if(ibuf->zbuf && !(ibuf->mall & IB_zbuf))
+ IMB_freezbufImBuf(ibuf);
+ if(ibuf->zbuf_float && !(ibuf->mall & IB_zbuffloat))
+ IMB_freezbuffloatImBuf(ibuf);
+ }
if( ELEM(ima->source, IMA_SRC_GENERATED, IMA_SRC_VIEWER)) {
ima->source= IMA_SRC_FILE;
ima->type= IMA_TYPE_IMAGE;
}
- if(ima->type==IMA_TYPE_R_RESULT)
- ima->type= IMA_TYPE_IMAGE;
/* name image as how we saved it */
len= strlen(name);
@@ -788,6 +850,8 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera
WM_cursor_wait(0);
}
+
+ ED_space_image_release_buffer(sima, lock);
}
static int save_as_exec(bContext *C, wmOperator *op)
@@ -812,8 +876,9 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceImage *sima= CTX_wm_space_image(C);
Image *ima = ED_space_image(sima);
- ImBuf *ibuf= ED_space_image_buffer(sima);
Scene *scene= CTX_data_scene(C);
+ ImBuf *ibuf;
+ void *lock;
if(RNA_property_is_set(op->ptr, "path"))
return save_as_exec(C, op);
@@ -822,6 +887,8 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_CANCELLED;
/* always opens fileselect */
+ ibuf= ED_space_image_acquire_buffer(sima, &lock);
+
if(ibuf) {
/* 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))
@@ -838,10 +905,14 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event)
// XXX note: we can give default menu enums to operator for this
image_filesel(C, op, ibuf->name);
+
+ ED_space_image_release_buffer(sima, lock);
return OPERATOR_RUNNING_MODAL;
}
+ ED_space_image_release_buffer(sima, lock);
+
return OPERATOR_CANCELLED;
}
@@ -870,12 +941,16 @@ static int save_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
Image *ima = ED_space_image(sima);
- ImBuf *ibuf= ED_space_image_buffer(sima);
+ void *lock;
+ ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock);
Scene *scene= CTX_data_scene(C);
+ RenderResult *rr;
char name[FILE_MAX];
- if(!ima || !ibuf)
+ if(!ima || !ibuf) {
+ ED_space_image_release_buffer(sima, lock);
return OPERATOR_CANCELLED;
+ }
/* if exists, saves over without fileselect */
@@ -884,14 +959,21 @@ static int save_exec(bContext *C, wmOperator *op)
BLI_strncpy(name, G.ima, FILE_MAX);
if(BLI_exists(name) && BLI_is_writable(name)) {
- if(BKE_image_get_renderresult(scene, ima))
+ rr= BKE_image_acquire_renderresult(scene, ima);
+
+ if(rr)
sima->imtypenr= R_MULTILAYER;
else
sima->imtypenr= BKE_ftype_to_imtype(ibuf->ftype);
+
+ BKE_image_release_renderresult(scene, ima);
+ ED_space_image_release_buffer(sima, lock);
save_image_doit(C, sima, scene, op, name);
}
else {
+ ED_space_image_release_buffer(sima, lock);
+
BKE_report(op->reports, RPT_ERROR, "Can not save image.");
return OPERATOR_CANCELLED;
}
@@ -993,19 +1075,16 @@ void IMAGE_OT_save_sequence(wmOperatorType *ot)
static int reload_exec(bContext *C, wmOperator *op)
{
- SpaceImage *sima;
-
- /* retrieve state */
- sima= CTX_wm_space_image(C);
+ Image *ima= CTX_data_edit_image(C);
+ SpaceImage *sima= CTX_wm_space_image(C);
- if(!sima->image)
+ if(!ima)
return OPERATOR_CANCELLED;
- BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_RELOAD);
- /* ED_space_image_set(C, sima, scene, obedit, NULL); - do we really need this? */
+ // XXX other users?
+ BKE_image_signal(ima, (sima)? &sima->iuser: NULL, IMA_SIGNAL_RELOAD);
- // XXX BIF_preview_changed(ID_TE);
- WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, sima->image);
+ WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, ima);
ED_area_tag_redraw(CTX_wm_area(C));
return OPERATOR_FINISHED;
@@ -1019,7 +1098,7 @@ void IMAGE_OT_reload(wmOperatorType *ot)
/* api callbacks */
ot->exec= reload_exec;
- ot->poll= space_image_poll;
+ ot->poll= image_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1033,6 +1112,8 @@ static int new_exec(bContext *C, wmOperator *op)
Scene *scene;
Object *obedit;
Image *ima;
+ PointerRNA ptr, idptr;
+ PropertyRNA *prop;
char name[22];
float color[4];
int width, height, floatbuf, uvtestgrid;
@@ -1051,8 +1132,27 @@ static int new_exec(bContext *C, wmOperator *op)
color[3]= RNA_float_get(op->ptr, "alpha");
ima = BKE_add_image_size(width, height, name, floatbuf, uvtestgrid, color);
- BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_USER_NEW_IMAGE);
- ED_space_image_set(C, sima, scene, obedit, ima);
+
+ if(!ima)
+ return OPERATOR_CANCELLED;
+
+ /* hook into UI */
+ uiIDContextProperty(C, &ptr, &prop);
+
+ if(prop) {
+ /* when creating new ID blocks, use is already 1, but RNA
+ * pointer se also increases user, so this compensates it */
+ ima->id.us--;
+
+ RNA_id_pointer_create(&ima->id, &idptr);
+ RNA_property_pointer_set(&ptr, prop, idptr);
+ RNA_property_update(C, &ptr, prop);
+ }
+ else if(sima)
+ ED_space_image_set(C, sima, scene, obedit, ima);
+
+ // XXX other users?
+ BKE_image_signal(ima, (sima)? &sima->iuser: NULL, IMA_SIGNAL_USER_NEW_IMAGE);
return OPERATOR_FINISHED;
}
@@ -1066,7 +1166,6 @@ void IMAGE_OT_new(wmOperatorType *ot)
/* api callbacks */
ot->exec= new_exec;
ot->invoke= WM_operator_props_popup;
- ot->poll= ED_operator_image_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1103,9 +1202,8 @@ static int pack_test(bContext *C, wmOperator *op)
static int pack_exec(bContext *C, wmOperator *op)
{
- SpaceImage *sima= CTX_wm_space_image(C);
- Image *ima= ED_space_image(sima);
- ImBuf *ibuf= ED_space_image_buffer(sima);
+ Image *ima= CTX_data_edit_image(C);
+ ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
int as_png= RNA_boolean_get(op->ptr, "as_png");
if(!pack_test(C, op))
@@ -1126,8 +1224,8 @@ static int pack_exec(bContext *C, wmOperator *op)
static int pack_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- SpaceImage *sima= CTX_wm_space_image(C);
- ImBuf *ibuf= ED_space_image_buffer(sima);
+ Image *ima= CTX_data_edit_image(C);
+ ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
uiPopupMenu *pup;
uiLayout *layout;
int as_png= RNA_boolean_get(op->ptr, "as_png");
@@ -1287,6 +1385,7 @@ typedef struct ImageSampleInfo {
ARegionType *art;
void *draw_handle;
int x, y;
+ int channels;
char col[4];
float colf[4];
@@ -1303,14 +1402,9 @@ typedef struct ImageSampleInfo {
static void sample_draw(const bContext *C, ARegion *ar, void *arg_info)
{
- SpaceImage *sima= CTX_wm_space_image(C);
- ImBuf *ibuf= ED_space_image_buffer(sima);
ImageSampleInfo *info= arg_info;
- if(ibuf == NULL)
- return;
-
- draw_image_info(ar, ibuf->channels, info->x, info->y, info->colp,
+ draw_image_info(ar, info->channels, info->x, info->y, info->colp,
info->colfp, info->zp, info->zfp);
}
@@ -1318,13 +1412,16 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceImage *sima= CTX_wm_space_image(C);
ARegion *ar= CTX_wm_region(C);
- ImBuf *ibuf= ED_space_image_buffer(sima);
+ void *lock;
+ ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock);
ImageSampleInfo *info= op->customdata;
float fx, fy;
int x, y;
- if(ibuf == NULL)
+ if(ibuf == NULL) {
+ ED_space_image_release_buffer(sima, lock);
return;
+ }
x= event->x - ar->winrct.xmin;
y= event->y - ar->winrct.ymin;
@@ -1341,6 +1438,7 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
info->x= x;
info->y= y;
info->draw= 1;
+ info->channels= ibuf->channels;
info->colp= NULL;
info->colfp= NULL;
@@ -1417,6 +1515,7 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
else
info->draw= 0;
+ ED_space_image_release_buffer(sima, lock);
ED_area_tag_redraw(CTX_wm_area(C));
}
@@ -1433,10 +1532,9 @@ static int sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceImage *sima= CTX_wm_space_image(C);
ARegion *ar= CTX_wm_region(C);
- ImBuf *ibuf= ED_space_image_buffer(sima);
ImageSampleInfo *info;
- if(ibuf == NULL)
+ if(!ED_space_image_has_buffer(sima))
return OPERATOR_CANCELLED;
info= MEM_callocN(sizeof(ImageSampleInfo), "ImageSampleInfo");
@@ -1446,7 +1544,7 @@ static int sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
sample_apply(C, op, event);
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -1614,7 +1712,7 @@ static int record_composite_invoke(bContext *C, wmOperator *op, wmEvent *event)
rcd= op->customdata;
rcd->timer= WM_event_add_window_timer(CTX_wm_window(C), TIMER, 0.0f);
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
if(!record_composite_apply(C, op))
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 4a4418d97fc..9a4bab03534 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -203,9 +203,9 @@ void image_operatortypes(void)
WM_operatortype_append(IMAGE_OT_properties);
}
-void image_keymap(struct wmWindowManager *wm)
+void image_keymap(struct wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Image Generic", SPACE_IMAGE, 0);
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "Image Generic", SPACE_IMAGE, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_new", NKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_open", OKEY, KM_PRESS, KM_ALT, 0);
@@ -213,7 +213,7 @@ void image_keymap(struct wmWindowManager *wm)
WM_keymap_add_item(keymap, "IMAGE_OT_save", SKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_properties", NKEY, KM_PRESS, 0, 0);
- keymap= WM_keymap_listbase(wm, "Image", SPACE_IMAGE, 0);
+ keymap= WM_keymap_find(keyconf, "Image", SPACE_IMAGE, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
@@ -233,9 +233,9 @@ void image_keymap(struct wmWindowManager *wm)
RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD4, KM_PRESS, 0, 0)->ptr, "ratio", 0.25f);
RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD8, KM_PRESS, 0, 0)->ptr, "ratio", 0.125f);
- WM_keymap_add_item(keymap, "PAINT_OT_image_paint", ACTIONMOUSE, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "PAINT_OT_grab_clone", SELECTMOUSE, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "PAINT_OT_sample_color", SELECTMOUSE, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "PAINT_OT_image_paint", LEFTMOUSE, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "PAINT_OT_grab_clone", RIGHTMOUSE, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0);
RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_image_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE);
RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_image_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH);
@@ -327,7 +327,7 @@ static int image_context(const bContext *C, const char *member, bContextDataResu
/************************** main region ***************************/
/* sets up the fields of the View2D from zoom and offset */
-static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar, Scene *scene)
+static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar)
{
Image *ima= ED_space_image(sima);
float x1, y1, w, h;
@@ -335,24 +335,9 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar, Scene *sce
#if 0
if(image_preview_active(curarea, &width, &height));
-#endif
- if(sima->image) {
- ImBuf *ibuf= ED_space_image_buffer(sima);
-
- if(ibuf) {
- width= ibuf->x;
- height= ibuf->y;
- }
- else if(sima->image->type==IMA_TYPE_R_RESULT) {
- /* not very important, just nice */
- width= (scene->r.xsch*scene->r.size)/100;
- height= (scene->r.ysch*scene->r.size)/100;
- }
- else
- ED_space_image_size(sima, &width, &height);
- }
else
- ED_space_image_size(sima, &width, &height);
+#endif
+ ED_space_image_size(sima, &width, &height);
w= width;
h= height;
@@ -373,8 +358,8 @@ 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? */
- x1= ar->winrct.xmin+(winx-sima->zoom*w)/2;
- y1= ar->winrct.ymin+(winy-sima->zoom*h)/2;
+ x1= ar->winrct.xmin+(winx-sima->zoom*w)/2.0f;
+ y1= ar->winrct.ymin+(winy-sima->zoom*h)/2.0f;
x1-= sima->zoom*sima->xof;
y1-= sima->zoom*sima->yof;
@@ -397,23 +382,22 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar, Scene *sce
/* add handlers, stuff you only do once or on area/region changes */
static void image_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
// image space manages own v2d
// UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy);
/* image paint polls for mode */
- keymap= WM_keymap_listbase(wm, "ImagePaint", SPACE_IMAGE, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "Image Paint", 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);*/
+ keymap= WM_keymap_find(wm->defaultconf, "UVEdit", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
/* own keymaps */
- keymap= WM_keymap_listbase(wm, "Image Generic", SPACE_IMAGE, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_listbase(wm, "Image", SPACE_IMAGE, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "Image", SPACE_IMAGE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -431,20 +415,25 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
UI_GetThemeColor3fv(TH_BACK, col);
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
-
+
+ /* put scene context variable in iuser */
+ sima->iuser.scene= scene;
+
/* we set view2d from own zoom and offset each time */
- image_main_area_set_view2d(sima, ar, scene);
+ image_main_area_set_view2d(sima, ar);
/* we draw image in pixelspace */
draw_image_main(sima, ar, scene);
/* and uvs in 0.0-1.0 space */
UI_view2d_view_ortho(C, v2d);
- draw_uvedit_main(sima, ar, scene, obedit);
- ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST);
+ draw_uvedit_main(sima, ar, scene, obedit);
+
+ ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST);
- /* Grease Pencil too (in addition to UV's) */
- draw_image_grease_pencil((bContext *)C, 1);
+ /* Grease Pencil too (in addition to UV's) */
+ draw_image_grease_pencil((bContext *)C, 1);
+
UI_view2d_view_restore(C);
/* draw Grease Pencil - screen space only */
@@ -456,29 +445,11 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_scrollers_free(scrollers);*/
}
-static void image_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype)
-{
- ListBase *keymap;
-
- keymap= WM_keymap_listbase(wm, "UVEdit", 0, 0);
-
- if(stype==NS_EDITMODE_MESH)
- WM_event_add_keymap_handler(&ar->handlers, keymap);
- else
- WM_event_remove_keymap_handler(&ar->handlers, keymap);
-}
-
static void image_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
- case NC_SCENE:
- switch(wmn->data) {
- case ND_MODE:
- image_modal_keymaps(wmn->wm, ar, wmn->subtype);
- break;
- }
- break;
+ /* nothing yet */
}
}
@@ -487,11 +458,11 @@ static void image_main_area_listener(ARegion *ar, wmNotifier *wmn)
/* add handlers, stuff you only do once or on area/region changes */
static void image_buttons_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_listbase(wm, "Image Generic", SPACE_IMAGE, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -504,7 +475,10 @@ static void image_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
-
+ case NC_BRUSH:
+ if(wmn->action==NA_EDITED)
+ ED_region_tag_redraw(ar);
+ break;
}
}
@@ -634,17 +608,17 @@ void ED_space_image_set(bContext *C, SpaceImage *sima, Scene *scene, Object *obe
}
}
-ImBuf *ED_space_image_buffer(SpaceImage *sima)
+ImBuf *ED_space_image_acquire_buffer(SpaceImage *sima, void **lock_r)
{
ImBuf *ibuf;
- if(sima->image) {
+ if(sima && sima->image) {
#if 0
if(sima->image->type==IMA_TYPE_R_RESULT && BIF_show_render_spare())
return BIF_render_spare_imbuf();
else
#endif
- ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser);
+ ibuf= BKE_image_acquire_ibuf(sima->image, &sima->iuser, lock_r);
if(ibuf && (ibuf->rect || ibuf->rect_float))
return ibuf;
@@ -653,11 +627,32 @@ ImBuf *ED_space_image_buffer(SpaceImage *sima)
return NULL;
}
-void ED_image_size(Image *ima, int *width, int *height)
+void ED_space_image_release_buffer(SpaceImage *sima, void *lock)
+{
+ if(sima && sima->image)
+ BKE_image_release_ibuf(sima->image, lock);
+}
+
+int ED_space_image_has_buffer(SpaceImage *sima)
{
ImBuf *ibuf;
+ void *lock;
+ int has_buffer;
- ibuf= (ima)? BKE_image_get_ibuf(ima, NULL): NULL;
+ ibuf= ED_space_image_acquire_buffer(sima, &lock);
+ has_buffer= (ibuf != NULL);
+ ED_space_image_release_buffer(sima, lock);
+
+ return has_buffer;
+}
+
+void ED_image_size(Image *ima, int *width, int *height)
+{
+ ImBuf *ibuf= NULL;
+ void *lock;
+
+ if(ima)
+ ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock);
if(ibuf && ibuf->x > 0 && ibuf->y > 0) {
*width= ibuf->x;
@@ -667,24 +662,36 @@ void ED_image_size(Image *ima, int *width, int *height)
*width= 256;
*height= 256;
}
+
+ if(ima)
+ BKE_image_release_ibuf(ima, lock);
}
void ED_space_image_size(SpaceImage *sima, int *width, int *height)
{
+ Scene *scene= sima->iuser.scene;
ImBuf *ibuf;
+ void *lock;
- ibuf= ED_space_image_buffer(sima);
+ ibuf= ED_space_image_acquire_buffer(sima, &lock);
if(ibuf && ibuf->x > 0 && ibuf->y > 0) {
*width= ibuf->x;
*height= ibuf->y;
}
+ else if(sima->image && sima->image->type==IMA_TYPE_R_RESULT && scene) {
+ /* not very important, just nice */
+ *width= (scene->r.xsch*scene->r.size)/100;
+ *height= (scene->r.ysch*scene->r.size)/100;
+ }
/* I know a bit weak... but preview uses not actual image size */
// XXX else if(image_preview_active(sima, width, height));
else {
*width= 256;
*height= 256;
}
+
+ ED_space_image_release_buffer(sima, lock);
}
void ED_image_aspect(Image *ima, float *aspx, float *aspy)
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index d3f9c97205c..518553c9a7a 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -134,7 +134,7 @@ void info_operatortypes(void)
WM_operatortype_append(FILE_OT_find_missing_files);
}
-void info_keymap(struct wmWindowManager *wm)
+void info_keymap(struct wmKeyConfig *keyconf)
{
}
diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c
index 304c3601cdd..5761432ee29 100644
--- a/source/blender/editors/space_logic/logic_buttons.c
+++ b/source/blender/editors/space_logic/logic_buttons.c
@@ -83,7 +83,7 @@ static void logic_panel_properties(const bContext *C, Panel *pa)
// SpaceLogic *slogic= CTX_wm_space_logic(C);
uiBlock *block;
- block= uiLayoutFreeBlock(pa->layout);
+ block= uiLayoutAbsoluteBlock(pa->layout);
uiBlockSetHandleFunc(block, do_logic_panel_events, NULL);
}
@@ -93,7 +93,7 @@ static void logic_panel_view_properties(const bContext *C, Panel *pa)
// SpaceLogic *slogic= CTX_wm_space_logic(C);
uiBlock *block;
- block= uiLayoutFreeBlock(pa->layout);
+ block= uiLayoutAbsoluteBlock(pa->layout);
uiBlockSetHandleFunc(block, do_logic_panel_events, NULL);
}
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index 4afa56582a2..dc8b111821d 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -39,6 +39,9 @@
#include "DNA_screen_types.h"
#include "DNA_sensor_types.h"
#include "DNA_sound_types.h"
+#include "DNA_armature_types.h"
+#include "DNA_constraint_types.h"
+#include "DNA_action_types.h"
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
@@ -608,6 +611,8 @@ static char *sensor_name(int type)
return "Keyboard";
case SENS_PROPERTY:
return "Property";
+ case SENS_ARMATURE:
+ return "Armature";
case SENS_ACTUATOR:
return "Actuator";
case SENS_DELAY:
@@ -635,7 +640,7 @@ 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";
+ "Property %x4|Random %x8|Ray %x9|Message %x10|Joystick %x11|Actuator %x12|Armature %x14";
}
static char *controller_name(int type)
@@ -709,6 +714,8 @@ static char *actuator_name(int type)
return "Parent";
case ACT_STATE:
return "State";
+ case ACT_ARMATURE:
+ return "Armature";
}
return "unknown";
}
@@ -721,7 +728,7 @@ static char *actuator_pup(Object *owner)
switch (owner->type)
{
case OB_ARMATURE:
- return "Actuators %t|Action %x15|Motion %x0|Constraint %x9|Ipo %x1"
+ return "Actuators %t|Action %x15|Armature %x23|Motion %x0|Constraint %x9|Ipo %x1"
"|Camera %x3|Sound %x5|Property %x6|Edit Object %x10"
"|Scene %x11|Random %x13|Message %x14|Game %x17"
"|Visibility %x18|2D Filter %x19|Parent %x20|State %x22";
@@ -936,6 +943,7 @@ static int get_col_sensor(int type)
case SENS_NEAR: return TH_PANEL;
case SENS_KEYBOARD: return TH_PANEL;
case SENS_PROPERTY: return TH_PANEL;
+ case SENS_ARMATURE: return TH_PANEL;
case SENS_ACTUATOR: return TH_PANEL;
case SENS_MOUSE: return TH_PANEL;
case SENS_RADAR: return TH_PANEL;
@@ -965,6 +973,120 @@ static void verify_logicbutton_func(bContext *C, void *data1, void *data2)
}
}
+static void test_scriptpoin_but(struct bContext *C, char *name, ID **idpp)
+{
+ ID *id;
+
+ id= CTX_data_main(C)->text.first;
+ while(id) {
+ if( strcmp(name, id->name+2)==0 ) {
+ *idpp= id;
+ return;
+ }
+ id= id->next;
+ }
+ *idpp= NULL;
+}
+
+static void test_actionpoin_but(struct bContext *C, char *name, ID **idpp)
+{
+ ID *id;
+
+ id= CTX_data_main(C)->action.first;
+ while(id) {
+ if( strcmp(name, id->name+2)==0 ) {
+ id_us_plus(id);
+ *idpp= id;
+ return;
+ }
+ id= id->next;
+ }
+ *idpp= NULL;
+}
+
+
+static void test_obpoin_but(struct bContext *C, char *name, ID **idpp)
+{
+ ID *id;
+
+ id= CTX_data_main(C)->object.first;
+ while(id) {
+ if( strcmp(name, id->name+2)==0 ) {
+ *idpp= id;
+ id_lib_extern(id); /* checks lib data, sets correct flag for saving then */
+ return;
+ }
+ id= id->next;
+ }
+ *idpp= NULL;
+}
+
+static void test_meshpoin_but(struct bContext *C, char *name, ID **idpp)
+{
+ ID *id;
+
+ if( *idpp ) (*idpp)->us--;
+
+ id= CTX_data_main(C)->mesh.first;
+ while(id) {
+ if( strcmp(name, id->name+2)==0 ) {
+ *idpp= id;
+ id_us_plus(id);
+ return;
+ }
+ id= id->next;
+ }
+ *idpp= NULL;
+}
+
+static void test_matpoin_but(struct bContext *C, char *name, ID **idpp)
+{
+ ID *id;
+
+ if( *idpp ) (*idpp)->us--;
+
+ id= CTX_data_main(C)->mat.first;
+ while(id) {
+ if( strcmp(name, id->name+2)==0 ) {
+ *idpp= id;
+ id_us_plus(id);
+ return;
+ }
+ id= id->next;
+ }
+ *idpp= NULL;
+}
+
+static void test_scenepoin_but(struct bContext *C, char *name, ID **idpp)
+{
+ ID *id;
+
+ if( *idpp ) (*idpp)->us--;
+
+ id= CTX_data_main(C)->scene.first;
+ while(id) {
+ if( strcmp(name, id->name+2)==0 ) {
+ *idpp= id;
+ id_us_plus(id);
+ return;
+ }
+ id= id->next;
+ }
+ *idpp= NULL;
+}
+
+
+static void test_keyboard_event(struct bContext *C, void *arg_ks, void *arg_unused)
+{
+ bKeyboardSensor *ks= (bKeyboardSensor*)arg_ks;
+
+ if(!ISKEYBOARD(ks->key))
+ ks->key= 0;
+ if(!ISKEYBOARD(ks->qual))
+ ks->qual= 0;
+ if(!ISKEYBOARD(ks->qual2))
+ ks->qual2= 0;
+}
/**
* Draws a toggle for pulse mode, a frequency field and a toggle to invert
@@ -1015,12 +1137,51 @@ static void draw_default_sensor_header(bSensor *sens,
"Invert the level (output) of this sensor");
}
-static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short yco, short width,char* objectname)
+static void check_armature_bone_constraint(Object *ob, char *posechannel, char *constraint)
+{
+ /* check that bone exist in the active object */
+ if (ob->type == OB_ARMATURE && ob->pose) {
+ bPoseChannel *pchan;
+ bPose *pose = ob->pose;
+ for (pchan=pose->chanbase.first; pchan; pchan=pchan->next) {
+ if (!strcmp(pchan->name, posechannel)) {
+ /* found it, now look for constraint channel */
+ bConstraint *con;
+ for (con=pchan->constraints.first; con; con=con->next) {
+ if (!strcmp(con->name, constraint)) {
+ /* found it, all ok */
+ return;
+ }
+ }
+ /* didn't find constraint, make empty */
+ constraint[0] = 0;
+ return;
+ }
+ }
+ }
+ /* didn't find any */
+ posechannel[0] = 0;
+ constraint[0] = 0;
+}
+
+static void check_armature_sensor(bContext *C, void *arg1_but, void *arg2_sens)
+{
+ bArmatureSensor *sens = arg2_sens;
+ uiBut *but = arg1_but;
+ Object *ob= CTX_data_active_object(C);
+
+ /* check that bone exist in the active object */
+ but->retval = B_REDR;
+ check_armature_bone_constraint(ob, sens->posechannel, sens->constraint);
+}
+
+static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short xco, short yco, short width,char* objectname)
{
bNearSensor *ns = NULL;
bTouchSensor *ts = NULL;
bKeyboardSensor *ks = NULL;
bPropertySensor *ps = NULL;
+ bArmatureSensor *arm = NULL;
bMouseSensor *ms = NULL;
bCollisionSensor *cs = NULL;
bRadarSensor *rs = NULL;
@@ -1030,6 +1191,7 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short
bJoystickSensor *joy = NULL;
bActuatorSensor *as = NULL;
bDelaySensor *ds = NULL;
+ uiBut *but;
short ysize;
char *str;
@@ -1178,12 +1340,15 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short
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");
+ but= uiDefKeyevtButS(block, 0, "", xco+40, yco-44, (width)/2, 19, &ks->key, "Key code");
+ uiButSetFunc(but, test_keyboard_event, ks, NULL);
/* 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");
+ but= uiDefKeyevtButS(block, 0, "", xco+40, yco-68, (width-50)/2, 19, &ks->qual, "Modifier key code");
+ uiButSetFunc(but, test_keyboard_event, ks, NULL);
+ but= uiDefKeyevtButS(block, 0, "", xco+40+(width-50)/2, yco-68, (width-50)/2, 19, &ks->qual2, "Second Modifier key code");
+ uiButSetFunc(but, test_keyboard_event, ks, NULL);
}
/* line 4: toggle property for string logging mode */
@@ -1242,6 +1407,45 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short
yco-= ysize;
break;
}
+ case SENS_ARMATURE:
+ {
+ ysize= 70;
+
+ 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);
+ arm= sens->data;
+
+ if (ob->type == OB_ARMATURE) {
+ uiBlockBeginAlign(block);
+ but = uiDefBut(block, TEX, 1, "Bone: ",
+ (xco+10), (yco-44), (width-20)/2, 19,
+ arm->posechannel, 0, 31, 0, 0,
+ "Bone on which you want to check a constraint");
+ uiButSetFunc(but, check_armature_sensor, but, arm);
+ but = uiDefBut(block, TEX, 1, "Cons: ",
+ (xco+10)+(width-20)/2, (yco-44), (width-20)/2, 19,
+ arm->constraint, 0, 31, 0, 0,
+ "Name of the constraint you want to control");
+ uiButSetFunc(but, check_armature_sensor, but, arm);
+ uiBlockEndAlign(block);
+
+ str= "Type %t|State changed %x0|Lin error below %x1|Lin error above %x2|Rot error below %x3|Rot error above %x4";
+
+ uiDefButI(block, MENU, B_REDR, str, xco+10,yco-66,0.4*(width-20), 19,
+ &arm->type, 0, 31, 0, 0, "Type");
+
+ if (arm->type != SENS_ARM_STATE_CHANGED)
+ {
+ uiDefButF(block, NUM, 1, "Value: ", xco+10+0.4*(width-20),yco-66,0.6*(width-20), 19,
+ &arm->value, -10000.0, 10000.0, 100, 0, "Test the error against this value");
+ }
+ }
+ yco-= ysize;
+ break;
+ }
case SENS_ACTUATOR:
{
ysize= 48;
@@ -1576,6 +1780,7 @@ static int get_col_actuator(int type)
case ACT_VISIBILITY: return TH_PANEL;
case ACT_CONSTRAINT: return TH_PANEL;
case ACT_STATE: return TH_PANEL;
+ case ACT_ARMATURE: return TH_PANEL;
default: return TH_PANEL;
}
}
@@ -1656,6 +1861,18 @@ static void check_state_mask(bContext *C, void *arg1_but, void *arg2_mask)
but->retval = B_REDR;
}
+static void check_armature_actuator(bContext *C, void *arg1_but, void *arg2_act)
+{
+ bArmatureActuator *act = arg2_act;
+ uiBut *but = arg1_but;
+ Object *ob= CTX_data_active_object(C);
+
+ /* check that bone exist in the active object */
+ but->retval = B_REDR;
+ check_armature_bone_constraint(ob, act->posechannel, act->constraint);
+}
+
+
static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, short xco, short yco, short width)
{
bSoundActuator *sa = NULL;
@@ -1675,6 +1892,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh
bTwoDFilterActuator *tdfa = NULL;
bParentActuator *parAct = NULL;
bStateActuator *staAct = NULL;
+ bArmatureActuator *armAct = NULL;
float *fp;
short ysize = 0, wval;
@@ -2702,6 +2920,48 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh
yco-= ysize;
break;
+ case ACT_ARMATURE:
+ armAct = act->data;
+
+ if (ob->type == OB_ARMATURE) {
+ str= "Constraint %t|Run armature %x0|Enable %x1|Disable %x2|Set target %x3|Set weight %x4";
+ uiDefButI(block, MENU, B_REDR, str, xco+5, yco-24, (width-10)*0.35, 19, &armAct->type, 0.0, 0.0, 0, 0, "");
+
+ switch (armAct->type) {
+ case ACT_ARM_RUN:
+ ysize = 28;
+ break;
+ default:
+ uiBlockBeginAlign(block);
+ but = uiDefBut(block, TEX, 1, "Bone: ",
+ (xco+5), (yco-44), (width-10)/2, 19,
+ armAct->posechannel, 0, 31, 0, 0,
+ "Bone on which the constraint is defined");
+ uiButSetFunc(but, check_armature_actuator, but, armAct);
+ but = uiDefBut(block, TEX, 1, "Cons: ",
+ (xco+5)+(width-10)/2, (yco-44), (width-10)/2, 19,
+ armAct->constraint, 0, 31, 0, 0,
+ "Name of the constraint you want to controle");
+ uiButSetFunc(but, check_armature_actuator, but, armAct);
+ uiBlockEndAlign(block);
+ ysize = 48;
+ switch (armAct->type) {
+ case ACT_ARM_SETTARGET:
+ uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "Target: ", xco+5, yco-64, (width-10), 19, &(armAct->target), "Set this object as the target of the constraint");
+ uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "Secondary Target: ", xco+5, yco-84, (width-10), 19, &(armAct->subtarget), "Set this object as the secondary target of the constraint (only IK polar target at the moment)");
+ ysize += 40;
+ break;
+ case ACT_ARM_SETWEIGHT:
+ uiDefButF(block, NUM, B_REDR, "Weight:", xco+5+(width-10)*0.35,yco-24,(width-10)*0.65,19,&armAct->weight,0.0,1.0,0.0,0.0,"Set weight of this constraint");
+ break;
+ }
+ }
+ }
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+ yco-= ysize;
+ break;
+
default:
ysize= 4;
@@ -3216,7 +3476,7 @@ void logic_buttons(bContext *C, ARegion *ar)
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);
+ yco= draw_sensorbuttons(ob, sens, block, xco, yco, width,ob->id.name);
if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2;
}
else {
diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c
index 3c46522bba2..836ac4c6659 100644
--- a/source/blender/editors/space_logic/space_logic.c
+++ b/source/blender/editors/space_logic/space_logic.c
@@ -186,9 +186,9 @@ void logic_operatortypes(void)
}
-void logic_keymap(struct wmWindowManager *wm)
+void logic_keymap(struct wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Logic Generic", SPACE_LOGIC, 0);
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "Logic Generic", SPACE_LOGIC, 0);
WM_keymap_add_item(keymap, "LOGIC_OT_properties", NKEY, KM_PRESS, 0, 0);
}
@@ -234,12 +234,12 @@ static int logic_context(const bContext *C, const char *member, bContextDataResu
/* add handlers, stuff you only do once or on area/region changes */
static void logic_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *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);
+ keymap= WM_keymap_find(wm->defaultconf, "Logic Generic", SPACE_LOGIC, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -276,11 +276,11 @@ static void logic_main_area_draw(const bContext *C, ARegion *ar)
/* add handlers, stuff you only do once or on area/region changes */
static void logic_buttons_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_listbase(wm, "Logic Generic", SPACE_LOGIC, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "Logic Generic", SPACE_LOGIC, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index a5ba63fd15d..b193b89d65a 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -114,34 +114,69 @@ static int nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA
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);
+ /* extract list of active channel(s), of which we should only take the first one
+ * - we need the channels flag to get the active AnimData block when there are no NLA Tracks
+ */
+ filter= (ANIMFILTER_VISIBLE|ANIMFILTER_ACTIVE|ANIMFILTER_CHANNELS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
- // TODO: need some way to select active animdata too...
- if (ale->type == ANIMTYPE_NLATRACK) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
- AnimData *adt= ale->adt;
-
- /* found it, now set the pointers */
- if (adt_ptr) {
- /* AnimData pointer */
- RNA_pointer_create(ale->id, &RNA_AnimData, adt, adt_ptr);
- }
- 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);
+ switch (ale->type) {
+ case ANIMTYPE_NLATRACK: /* NLA Track - The primary data type which should get caught */
+ {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ AnimData *adt= ale->adt;
+
+ /* found it, now set the pointers */
+ if (adt_ptr) {
+ /* AnimData pointer */
+ RNA_pointer_create(ale->id, &RNA_AnimData, adt, adt_ptr);
+ }
+ 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;
}
-
- found= 1;
- break;
+ break;
+
+ case ANIMTYPE_SCENE: /* Top-Level Widgets doubling up as datablocks */
+ case ANIMTYPE_OBJECT:
+ case ANIMTYPE_FILLACTD: /* Action Expander */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSLAM:
+ case ANIMTYPE_DSCAM:
+ case ANIMTYPE_DSCUR:
+ case ANIMTYPE_DSSKEY:
+ case ANIMTYPE_DSWOR:
+ case ANIMTYPE_DSPART:
+ case ANIMTYPE_DSMBALL:
+ case ANIMTYPE_DSARM:
+ {
+ /* for these channels, we only do AnimData */
+ if (ale->id && ale->adt) {
+ if (adt_ptr) {
+ /* AnimData pointer */
+ RNA_pointer_create(ale->id, &RNA_AnimData, ale->adt, adt_ptr);
+
+ /* set found status to -1, since setting to 1 would break the loop
+ * and potentially skip an active NLA-Track in some cases...
+ */
+ found= -1;
+ }
+ }
+ }
+ break;
}
+
+ if (found > 0)
+ break;
}
/* free temp data */
@@ -211,7 +246,7 @@ static void nla_panel_animdata (const bContext *C, Panel *pa)
/* Active Action Properties ------------------------------------- */
/* action */
row= uiLayoutRow(layout, 1);
- uiTemplateID(row, (bContext *)C, &adt_ptr, "action", NULL /*"ACT_OT_new"*/, NULL, NULL /*"ACT_OT_unlink"*/); // XXX: need to make these operators
+ uiTemplateID(row, (bContext *)C, &adt_ptr, "action", "ACT_OT_new", NULL, NULL /*"ACT_OT_unlink"*/); // XXX: need to make these operators
/* extrapolation */
row= uiLayoutRow(layout, 1);
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index ccf23266427..07dc3f0ad89 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -116,18 +116,22 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
}
/* action to take depends on what channel we've got */
+ // WARNING: must keep this in sync with the equivalent function in anim_channels_edit.c
switch (ale->type) {
case ANIMTYPE_SCENE:
{
Scene *sce= (Scene *)ale->data;
+ AnimData *adt= sce->adt;
/* set selection status */
if (selectmode == SELECT_INVERT) {
/* swap select */
sce->flag ^= SCE_DS_SELECTED;
+ if (adt) adt->flag ^= ADT_UI_SELECTED;
}
else {
sce->flag |= SCE_DS_SELECTED;
+ if (adt) adt->flag |= ADT_UI_SELECTED;
}
notifierFlags |= ND_ANIMCHAN_SELECT;
@@ -139,6 +143,7 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
Scene *sce= (Scene *)ads->source;
Base *base= (Base *)ale->data;
Object *ob= base->object;
+ AnimData *adt= ob->adt;
if (nlaedit_is_tweakmode_on(ac) == 0) {
/* set selection status */
@@ -146,23 +151,30 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
/* swap select */
base->flag ^= SELECT;
ob->flag= base->flag;
+
+ if (adt) adt->flag ^= ADT_UI_SELECTED;
}
else {
Base *b;
- /* deleselect all */
+ /* deselect all */
+ // TODO: should this deselect all other types of channels too?
for (b= sce->base.first; b; b= b->next) {
b->flag &= ~SELECT;
b->object->flag= b->flag;
+ if (b->object->adt) b->object->adt->flag &= ~(ADT_UI_SELECTED|ADT_UI_ACTIVE);
}
/* select object now */
base->flag |= SELECT;
ob->flag |= SELECT;
+ if (adt) adt->flag |= ADT_UI_SELECTED;
}
/* xxx should be ED_base_object_activate(), but we need context pointer for that... */
//set_active_base(base);
+ if ((adt) && (adt->flag & ADT_UI_SELECTED))
+ adt->flag |= ADT_UI_ACTIVE;
/* notifiers - channel was selected */
notifierFlags |= ND_ANIMCHAN_SELECT;
@@ -170,6 +182,39 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
}
break;
+ case ANIMTYPE_FILLACTD: /* Action Expander */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSLAM:
+ case ANIMTYPE_DSCAM:
+ case ANIMTYPE_DSCUR:
+ case ANIMTYPE_DSSKEY:
+ case ANIMTYPE_DSWOR:
+ case ANIMTYPE_DSPART:
+ case ANIMTYPE_DSMBALL:
+ case ANIMTYPE_DSARM:
+ {
+ /* sanity checking... */
+ if (ale->adt) {
+ /* select/deselect */
+ if (selectmode == SELECT_INVERT) {
+ /* inverse selection status of this AnimData block only */
+ ale->adt->flag ^= ADT_UI_SELECTED;
+ }
+ else {
+ /* select AnimData block by itself */
+ ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
+ ale->adt->flag |= ADT_UI_SELECTED;
+ }
+
+ /* set active? */
+ if ((ale->adt) && (ale->adt->flag & ADT_UI_SELECTED))
+ ale->adt->flag |= ADT_UI_ACTIVE;
+ }
+
+ notifierFlags |= ND_ANIMCHAN_SELECT;
+ }
+ break;
+
case ANIMTYPE_NLATRACK:
{
NlaTrack *nlt= (NlaTrack *)ale->data;
diff --git a/source/blender/editors/space_nla/nla_header.c b/source/blender/editors/space_nla/nla_header.c
index 0d3bf2cb6b1..be0b4381f00 100644
--- a/source/blender/editors/space_nla/nla_header.c
+++ b/source/blender/editors/space_nla/nla_header.c
@@ -73,8 +73,8 @@
/* button events */
enum {
- B_REDR = 0,
-} eActHeader_ButEvents;
+ B_REDR = 1,
+} eNLAHeader_ButEvents;
/* ************************ header area region *********************** */
@@ -203,11 +203,8 @@ static void nla_addmenu(bContext *C, uiLayout *layout, void *arg_unused)
static void do_nla_buttons(bContext *C, void *arg, int event)
{
- switch (event) {
- case B_REDR:
- ED_area_tag_redraw(CTX_wm_area(C));
- break;
- }
+ ED_area_tag_refresh(CTX_wm_area(C));
+ ED_area_tag_redraw(CTX_wm_area(C));
}
@@ -246,31 +243,7 @@ void nla_header_buttons(const bContext *C, ARegion *ar)
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");
- uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display MetaBalls");
- uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Particles");
- uiBlockEndAlign(block);
- xco += 15;
- }
- else {
- // XXX this case shouldn't happen at all... for now, just pad out same amount of space
- xco += 10*XIC + 15;
- }
- xco += (XIC + 8);
+ xco= ANIM_headerUI_standard_buttons(C, snla->ads, block, xco, yco);
/* auto-snap selector */
if (snla->flag & SNLA_DRAWTIME) {
diff --git a/source/blender/editors/space_nla/nla_intern.h b/source/blender/editors/space_nla/nla_intern.h
index e4557ec878f..91c1decc576 100644
--- a/source/blender/editors/space_nla/nla_intern.h
+++ b/source/blender/editors/space_nla/nla_intern.h
@@ -130,7 +130,7 @@ short nlaedit_is_tweakmode_on(bAnimContext *ac);
/* --- */
void nla_operatortypes(void);
-void nla_keymap(wmWindowManager *wm);
+void nla_keymap(wmKeyConfig *keyconf);
#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
index ad5f5174690..6c940f32c24 100644
--- a/source/blender/editors/space_nla/nla_ops.c
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -167,7 +167,7 @@ void nla_operatortypes(void)
/* ************************** registration - keymaps **********************************/
-static void nla_keymap_channels (wmWindowManager *wm, ListBase *keymap)
+static void nla_keymap_channels (wmKeyConfig *keyconf, wmKeyMap *keymap)
{
/* NLA-specific (different to standard channels keymap) -------------------------- */
/* selection */
@@ -210,9 +210,9 @@ static void nla_keymap_channels (wmWindowManager *wm, ListBase *keymap)
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)
+static void nla_keymap_main (wmKeyConfig *keyconf, wmKeyMap *keymap)
{
- wmKeymapItem *kmi;
+ wmKeyMapItem *kmi;
/* selection */
/* click select */
@@ -277,17 +277,17 @@ static void nla_keymap_main (wmWindowManager *wm, ListBase *keymap)
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);
+ transform_keymap_for_space(keyconf, keymap, SPACE_NLA);
}
/* --------------- */
-void nla_keymap(wmWindowManager *wm)
+void nla_keymap(wmKeyConfig *keyconf)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
/* keymap for all regions */
- keymap= WM_keymap_listbase(wm, "NLA Generic", SPACE_NLA, 0);
+ keymap= WM_keymap_find(keyconf, "NLA Generic", SPACE_NLA, 0);
WM_keymap_add_item(keymap, "NLA_OT_properties", NKEY, KM_PRESS, 0, 0);
/* channels */
@@ -297,11 +297,11 @@ void nla_keymap(wmWindowManager *wm)
*
* 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);
+ keymap= WM_keymap_find(keyconf, "NLA Channels", SPACE_NLA, 0);
+ nla_keymap_channels(keyconf, keymap);
/* data */
- keymap= WM_keymap_listbase(wm, "NLA Data", SPACE_NLA, 0);
- nla_keymap_main(wm, keymap);
+ keymap= WM_keymap_find(keyconf, "NLA Data", SPACE_NLA, 0);
+ nla_keymap_main(keyconf, keymap);
}
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 89d4e7cddf2..32ff7766690 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -208,15 +208,15 @@ static SpaceLink *nla_duplicate(SpaceLink *sl)
/* add handlers, stuff you only do once or on area/region changes */
static void nla_channel_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *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? */
+ keymap= WM_keymap_find(wm->defaultconf, "NLA Channels", SPACE_NLA, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_listbase(wm, "NLA Generic", SPACE_NLA, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -254,14 +254,14 @@ static void nla_channel_area_draw(const bContext *C, ARegion *ar)
/* add handlers, stuff you only do once or on area/region changes */
static void nla_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "NLA Data", SPACE_NLA, 0); /* XXX weak? */
+ keymap= WM_keymap_find(wm->defaultconf, "NLA Data", SPACE_NLA, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_listbase(wm, "NLA Generic", SPACE_NLA, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -354,11 +354,11 @@ static void nla_header_area_draw(const bContext *C, ARegion *ar)
/* add handlers, stuff you only do once or on area/region changes */
static void nla_buttons_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_listbase(wm, "NLA Generic", SPACE_NLA, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -409,6 +409,7 @@ static void nla_main_area_listener(ARegion *ar, wmNotifier *wmn)
break;
case NC_SCENE:
switch(wmn->data) {
+ case ND_RENDER_OPTIONS:
case ND_OB_ACTIVE:
case ND_FRAME:
case ND_MARKERS:
diff --git a/source/blender/editors/space_node/SConscript b/source/blender/editors/space_node/SConscript
index 5453aa7dd44..5493e2d739f 100644
--- a/source/blender/editors/space_node/SConscript
+++ b/source/blender/editors/space_node/SConscript
@@ -15,4 +15,11 @@ if env['CC'] == 'gcc':
#cf.append('-Werror')
pass
+if env['OURPLATFORM'] == 'linux2':
+ cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( 'bf_editors_space_node', sources, Split(incs), defs, libtype=['core'], priority=[55], compileflags=cf )
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 05adb5b75ca..42c664520fe 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -22,7 +22,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): David Millan Escriva, Juho Vepsäläinen, Bob Holcomb
+ * Contributor(s): David Millan Escriva, Juho Vepsäläinen, Bob Holcomb, Thomas Dinges
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -89,6 +89,7 @@
#include "UI_resources.h"
#include "RE_pipeline.h"
+#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "node_intern.h"
@@ -170,9 +171,13 @@ static void node_group_alone_cb(bContext *C, void *node_v, void *unused_v)
/* ****************** BUTTON CALLBACKS FOR ALL TREES ***************** */
-static int node_buts_group(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_buts_group(uiLayout *layout, PointerRNA *ptr)
{
- if(block && node->id) {
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+
+ if(node->id) {
uiBut *bt;
short width;
@@ -197,112 +202,95 @@ static int node_buts_group(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *
uiBlockEndAlign(block);
}
- return 19;
}
#endif
-static int node_buts_value(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_buts_value(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- bNodeSocket *sock= node->outputs.first; /* first socket stores value */
-
- uiDefButF(block, NUM, B_NODE_EXEC, "",
- (short)butr->xmin, (short)butr->ymin, butr->xmax-butr->xmin, 20,
- sock->ns.vec, sock->ns.min, sock->ns.max, 10, 2, "");
-
- }
- return 20;
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+ bNodeSocket *sock= node->outputs.first; /* first socket stores value */
+
+ uiDefButF(block, NUM, B_NODE_EXEC, "",
+ (short)butr->xmin, (short)butr->ymin, butr->xmax-butr->xmin, 20,
+ sock->ns.vec, sock->ns.min, sock->ns.max, 10, 2, "");
}
-static int node_buts_rgb(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_buts_rgb(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- bNodeSocket *sock= node->outputs.first; /* first socket stores value */
- if(sock) {
- /* enforce square box drawing */
- uiBlockSetEmboss(block, UI_EMBOSSP);
-
- uiDefButF(block, HSVCUBE, B_NODE_EXEC, "",
- (short)butr->xmin, (short)butr->ymin, butr->xmax-butr->xmin, 12,
- sock->ns.vec, 0.0f, 1.0f, 3, 0, "");
- uiDefButF(block, HSVCUBE, B_NODE_EXEC, "",
- (short)butr->xmin, (short)butr->ymin+15, butr->xmax-butr->xmin, butr->ymax-butr->ymin -15 -15,
- sock->ns.vec, 0.0f, 1.0f, 2, 0, "");
- uiDefButF(block, COL, B_NOP, "",
- (short)butr->xmin, (short)butr->ymax-12, butr->xmax-butr->xmin, 12,
- sock->ns.vec, 0.0, 0.0, -1, 0, "");
- /* the -1 above prevents col button to popup a color picker */
-
- uiBlockSetEmboss(block, UI_EMBOSS);
- }
- }
- return 30 + (int)(node->width-NODE_DY);
-}
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+ bNodeSocket *sock= node->outputs.first; /* first socket stores value */
-static int node_buts_mix_rgb(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
-{
- if(block) {
- uiBut *bt;
- int a_but= (ntree->type==NTREE_COMPOSIT);
+ if(sock) {
+ /* enforce square box drawing */
+ uiBlockSetEmboss(block, UI_EMBOSSP);
- /* blend type */
- uiBlockBeginAlign(block);
- bt=uiDefButS(block, MENU, B_NODE_EXEC, "Mix %x0|Add %x1|Subtract %x3|Multiply %x2|Screen %x4|Overlay %x9|Divide %x5|Difference %x6|Darken %x7|Lighten %x8|Dodge %x10|Burn %x11|Color %x15|Value %x14|Saturation %x13|Hue %x12|Soft Light %x16|Linear Light %x17",
- (short)butr->xmin, (short)butr->ymin, butr->xmax-butr->xmin -(a_but?20:0), 20,
- &node->custom1, 0, 0, 0, 0, "");
- uiButSetFunc(bt, node_but_title_cb, node, bt);
- /* Alpha option, composite */
- if(a_but)
- uiDefIconButS(block, TOG, B_NODE_EXEC, ICON_IMAGE_RGB_ALPHA,
- (short)butr->xmax-20, (short)butr->ymin, 20, 20,
- &node->custom2, 0, 0, 0, 0, "Include Alpha of 2nd input in this operation");
+ uiDefButF(block, HSVCUBE, B_NODE_EXEC, "",
+ (short)butr->xmin, (short)butr->ymin, butr->xmax-butr->xmin, 12,
+ sock->ns.vec, 0.0f, 1.0f, 3, 0, "");
+ uiDefButF(block, HSVCUBE, B_NODE_EXEC, "",
+ (short)butr->xmin, (short)butr->ymin+15, butr->xmax-butr->xmin, butr->xmax-butr->xmin -15 -15,
+ sock->ns.vec, 0.0f, 1.0f, 2, 0, "");
+ uiDefButF(block, COL, B_NOP, "",
+ (short)butr->xmin, (short)butr->ymax-12, butr->xmax-butr->xmin, 12,
+ sock->ns.vec, 0.0, 0.0, -1, 0, "");
+ /* the -1 above prevents col button to popup a color picker */
+
+ uiBlockSetEmboss(block, UI_EMBOSS);
}
- return 20;
}
-static int node_buts_time(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
-{
- if(block) {
- CurveMapping *cumap= node->storage;
- short dx= (short)((butr->xmax-butr->xmin)/2);
- butr->ymin += 26;
+static void node_buts_mix_rgb(uiLayout *layout, PointerRNA *ptr)
+{
+ uiLayout *row;
- curvemap_buttons(block, node->storage, 's', B_NODE_EXEC, B_REDR, butr);
-
- if(cumap) {
- //cumap->flag |= CUMA_DRAW_CFRA;
- //if(node->custom1<node->custom2)
- // cumap->sample[0]= (float)(CFRA - node->custom1)/(float)(node->custom2-node->custom1);
- }
+ bNodeTree *ntree= (bNodeTree*)ptr->id.data;
- uiBlockBeginAlign(block);
- uiDefButS(block, NUM, B_NODE_EXEC, "Sta:",
- (short)butr->xmin, (short)butr->ymin-22, dx, 19,
- &node->custom1, 1.0, 20000.0, 0, 0, "Start frame");
- uiDefButS(block, NUM, B_NODE_EXEC, "End:",
- (short)butr->xmin+dx, (short)butr->ymin-22, dx, 19,
- &node->custom2, 1.0, 20000.0, 0, 0, "End frame");
- }
+ row= uiLayoutRow(layout, 1);
+ uiItemR(row, "", 0, ptr, "blend_type", 0);
+ if(ntree->type == NTREE_COMPOSIT)
+ uiItemR(row, "", ICON_IMAGE_RGB_ALPHA, ptr, "alpha", 0);
+}
+
+static void node_buts_time(uiLayout *layout, PointerRNA *ptr)
+{
+ uiLayout *row;
+#if 0
+ /* XXX no context access here .. */
+ bNode *node= ptr->data;
+ CurveMapping *cumap= node->storage;
- return node->width-NODE_DY;
+ if(cumap) {
+ cumap->flag |= CUMA_DRAW_CFRA;
+ if(node->custom1<node->custom2)
+ cumap->sample[0]= (float)(CFRA - node->custom1)/(float)(node->custom2-node->custom1);
+ }
+#endif
+
+ uiTemplateCurveMapping(layout, ptr, "curve", 's', 0);
+
+ row= uiLayoutRow(layout, 1);
+ uiItemR(row, "Sta", 0, ptr, "start", 0);
+ uiItemR(row, "End", 0, ptr, "end", 0);
}
-static int node_buts_valtorgb(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_buts_valtorgb(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- if(node->storage) {
- uiBlockColorbandButtons(block, node->storage, butr, B_NODE_EXEC);
- }
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+
+ if(node->storage) {
+ uiBlockColorbandButtons(block, node->storage, butr, B_NODE_EXEC);
}
- return 40;
}
-static int node_buts_curvevec(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_buts_curvevec(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- curvemap_buttons(block, node->storage, 'v', B_NODE_EXEC, B_REDR, butr);
- }
- return (int)(node->width-NODE_DY);
+ uiTemplateCurveMapping(layout, ptr, "mapping", 'v', 0);
}
static float *_sample_col= NULL; // bad bad, 2.5 will do better?
@@ -311,33 +299,31 @@ void node_curvemap_sample(float *col)
_sample_col= col;
}
-static int node_buts_curvecol(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_buts_curvecol(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- CurveMapping *cumap= node->storage;
- if(_sample_col) {
- cumap->flag |= CUMA_DRAW_SAMPLE;
- VECCOPY(cumap->sample, _sample_col);
- }
- else
- cumap->flag &= ~CUMA_DRAW_SAMPLE;
+ bNode *node= ptr->data;
+ CurveMapping *cumap= node->storage;
- curvemap_buttons(block, node->storage, 'c', B_NODE_EXEC, B_REDR, butr);
- }
- return (int)(node->width-NODE_DY);
+ if(_sample_col) {
+ cumap->flag |= CUMA_DRAW_SAMPLE;
+ VECCOPY(cumap->sample, _sample_col);
+ }
+ else
+ cumap->flag &= ~CUMA_DRAW_SAMPLE;
+
+ uiTemplateCurveMapping(layout, ptr, "mapping", 'c', 0);
}
-static int node_buts_normal(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_buts_normal(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- bNodeSocket *sock= node->outputs.first; /* first socket stores normal */
-
- uiDefButF(block, BUT_NORMAL, B_NODE_EXEC, "",
- (short)butr->xmin, (short)butr->ymin, butr->xmax-butr->xmin, butr->ymax-butr->ymin,
- sock->ns.vec, 0.0f, 1.0f, 0, 0, "");
-
- }
- return (int)(node->width-NODE_DY);
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+ bNodeSocket *sock= node->outputs.first; /* first socket stores normal */
+
+ uiDefButF(block, BUT_NORMAL, B_NODE_EXEC, "",
+ (short)butr->xmin, (short)butr->xmin, butr->xmax-butr->xmin, butr->xmax-butr->xmin,
+ sock->ns.vec, 0.0f, 1.0f, 0, 0, "");
}
static void node_browse_tex_cb(bContext *C, void *ntree_v, void *node_v)
@@ -401,8 +387,13 @@ static void node_dynamic_update_cb(bContext *C, void *ntree_v, void *node_v)
// XXX BIF_preview_changed(ID_MA);
}
-static int node_buts_texture(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_buts_texture(uiLayout *layout, PointerRNA *ptr)
{
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ bNodeTree *ntree= ptr->id.data;
+ rctf *butr= &node->butr;
+
short multi = (
node->id &&
((Tex*)node->id)->use_nodes &&
@@ -410,49 +401,44 @@ static int node_buts_texture(uiBlock *block, bNodeTree *ntree, bNode *node, rctf
(node->type != TEX_NODE_TEXTURE)
);
- if(block) {
- uiBut *bt;
- char *strp;
- short width = (short)(butr->xmax - butr->xmin);
-
- /* browse button texture */
- uiBlockBeginAlign(block);
- IDnames_to_pupstring(&strp, NULL, "", &(G.main->tex), NULL, NULL);
- node->menunr= 0;
- bt= uiDefButS(block, MENU, B_NODE_EXEC, strp,
- butr->xmin, butr->ymin+(multi?30:0), 20, 19,
- &node->menunr, 0, 0, 0, 0, "Browse texture");
- uiButSetFunc(bt, node_browse_tex_cb, ntree, node);
- if(strp) MEM_freeN(strp);
-
- if(node->id) {
- bt= uiDefBut(block, TEX, B_NOP, "TE:",
- butr->xmin+19, butr->ymin+(multi?30:0), butr->xmax-butr->xmin-19, 19,
- node->id->name+2, 0.0, 19.0, 0, 0, "Texture name");
- uiButSetFunc(bt, node_ID_title_cb, node, NULL);
- }
- uiBlockEndAlign(block);
-
- if(multi) {
- char *menustr = ntreeTexOutputMenu(((Tex*)node->id)->nodetree);
- uiDefButS(block, MENU, B_MATPRV, menustr, butr->xmin, butr->ymin, width, 19, &node->custom1, 0, 0, 0, 0, "Which output to use, for multi-output textures");
- free(menustr);
- return 50;
- }
- return 20;
- }
- else return multi? 50: 20;
+ uiBut *bt;
+ char *strp;
+ short width = (short)(butr->xmax - butr->xmin);
+
+ /* browse button texture */
+ uiBlockBeginAlign(block);
+ IDnames_to_pupstring(&strp, NULL, "", &(G.main->tex), NULL, NULL);
+ node->menunr= 0;
+ bt= uiDefButS(block, MENU, B_NODE_EXEC, strp,
+ butr->xmin, butr->ymin+(multi?30:0), 20, 19,
+ &node->menunr, 0, 0, 0, 0, "Browse texture");
+ uiButSetFunc(bt, node_browse_tex_cb, ntree, node);
+ if(strp) MEM_freeN(strp);
+
+ if(node->id) {
+ bt= uiDefBut(block, TEX, B_NOP, "TE:",
+ butr->xmin+19, butr->ymin+(multi?30:0), butr->xmax-butr->xmin-19, 19,
+ node->id->name+2, 0.0, 19.0, 0, 0, "Texture name");
+ uiButSetFunc(bt, node_ID_title_cb, node, NULL);
+ }
+ uiBlockEndAlign(block);
+
+ if(multi) {
+ char *menustr = ntreeTexOutputMenu(((Tex*)node->id)->nodetree);
+ uiDefButS(block, MENU, B_MATPRV, menustr, butr->xmin, butr->ymin, width, 19, &node->custom1, 0, 0, 0, 0, "Which output to use, for multi-output textures");
+ free(menustr);
+ }
}
-static int node_buts_math(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_buts_math(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- uiBut *bt;
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+ uiBut *bt;
- bt=uiDefButS(block, MENU, B_NODE_EXEC, "Add %x0|Subtract %x1|Multiply %x2|Divide %x3|Sine %x4|Cosine %x5|Tangent %x6|Arcsine %x7|Arccosine %x8|Arctangent %x9|Power %x10|Logarithm %x11|Minimum %x12|Maximum %x13|Round %x14|Less Than %x15|Greater Than %x16", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &node->custom1, 0, 0, 0, 0, "");
- uiButSetFunc(bt, node_but_title_cb, node, bt);
- }
- return 20;
+ bt=uiDefButS(block, MENU, B_NODE_EXEC, "Add %x0|Subtract %x1|Multiply %x2|Divide %x3|Sine %x4|Cosine %x5|Tangent %x6|Arcsine %x7|Arccosine %x8|Arctangent %x9|Power %x10|Logarithm %x11|Minimum %x12|Maximum %x13|Round %x14|Less Than %x15|Greater Than %x16", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &node->custom1, 0, 0, 0, 0, "");
+ uiButSetFunc(bt, node_but_title_cb, node, bt);
}
@@ -556,192 +542,192 @@ static void node_texmap_cb(bContext *C, void *texmap_v, void *unused_v)
init_mapping(texmap_v);
}
-static int node_shader_buts_material(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_shader_buts_material(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- uiBut *bt;
- short dx= (short)((butr->xmax-butr->xmin)/3.0f), has_us= (node->id && node->id->us>1);
- short dy= (short)butr->ymin;
- char *strp;
-
- /* WATCH IT: we use this callback in material buttons, but then only want first row */
- if(butr->ymax-butr->ymin > 21.0f) dy+= 19;
-
- uiBlockBeginAlign(block);
- /* XXX
- if(node->id==NULL) uiBlockSetCol(block, TH_REDALERT);
- else if(has_us) uiBlockSetCol(block, TH_BUT_SETTING1);
- else uiBlockSetCol(block, TH_BUT_SETTING2);
- */
-
- /* browse button */
- IDnames_to_pupstring(&strp, NULL, "ADD NEW %x32767", &(G.main->mat), NULL, NULL);
- node->menunr= 0;
- bt= uiDefButS(block, MENU, B_NOP, strp,
- butr->xmin, dy, 19, 19,
- &node->menunr, 0, 0, 0, 0, "Browses existing choices or adds NEW");
- uiButSetFunc(bt, node_browse_mat_cb, ntree, node);
- if(strp) MEM_freeN(strp);
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ bNodeTree *ntree= ptr->id.data;
+ rctf *butr= &node->butr;
+ uiBut *bt;
+ short dx= (short)((butr->xmax-butr->xmin)/3.0f), has_us= (node->id && node->id->us>1);
+ short dy= (short)butr->ymin;
+ char *strp;
+
+ /* WATCH IT: we use this callback in material buttons, but then only want first row */
+ if(butr->ymax-butr->ymin > 21.0f) dy+= 19;
+
+ uiBlockBeginAlign(block);
+ /* XXX
+ if(node->id==NULL) uiBlockSetCol(block, TH_REDALERT);
+ else if(has_us) uiBlockSetCol(block, TH_BUT_SETTING1);
+ else uiBlockSetCol(block, TH_BUT_SETTING2);
+ */
+
+ /* browse button */
+ IDnames_to_pupstring(&strp, NULL, "ADD NEW %x32767", &(G.main->mat), NULL, NULL);
+ node->menunr= 0;
+ bt= uiDefButS(block, MENU, B_NOP, strp,
+ butr->xmin, dy, 19, 19,
+ &node->menunr, 0, 0, 0, 0, "Browses existing choices or adds NEW");
+ uiButSetFunc(bt, node_browse_mat_cb, ntree, node);
+ if(strp) MEM_freeN(strp);
+
+ /* Add New button */
+ if(node->id==NULL) {
+ bt= uiDefBut(block, BUT, B_NOP, "Add New",
+ butr->xmin+19, dy, (short)(butr->xmax-butr->xmin-19.0f), 19,
+ NULL, 0.0, 0.0, 0, 0, "Add new Material");
+ uiButSetFunc(bt, node_new_mat_cb, ntree, node);
+ }
+ else {
+ /* name button */
+ short width= (short)(butr->xmax-butr->xmin-19.0f - (has_us?19.0f:0.0f));
+ bt= uiDefBut(block, TEX, B_NOP, "MA:",
+ butr->xmin+19, dy, width, 19,
+ node->id->name+2, 0.0, 19.0, 0, 0, "Material name");
+ uiButSetFunc(bt, node_ID_title_cb, node, NULL);
- /* Add New button */
- if(node->id==NULL) {
- bt= uiDefBut(block, BUT, B_NOP, "Add New",
- butr->xmin+19, dy, (short)(butr->xmax-butr->xmin-19.0f), 19,
- NULL, 0.0, 0.0, 0, 0, "Add new Material");
- uiButSetFunc(bt, node_new_mat_cb, ntree, node);
+ /* user amount */
+ if(has_us) {
+ char str1[32];
+ sprintf(str1, "%d", node->id->us);
+ bt= uiDefBut(block, BUT, B_NOP, str1,
+ butr->xmax-19, dy, 19, 19,
+ NULL, 0, 0, 0, 0, "Displays number of users. Click to make a single-user copy.");
+ uiButSetFunc(bt, node_mat_alone_cb, node, NULL);
}
- else {
- /* name button */
- short width= (short)(butr->xmax-butr->xmin-19.0f - (has_us?19.0f:0.0f));
- bt= uiDefBut(block, TEX, B_NOP, "MA:",
- butr->xmin+19, dy, width, 19,
- node->id->name+2, 0.0, 19.0, 0, 0, "Material name");
- uiButSetFunc(bt, node_ID_title_cb, node, NULL);
-
- /* user amount */
- if(has_us) {
- char str1[32];
- sprintf(str1, "%d", node->id->us);
- bt= uiDefBut(block, BUT, B_NOP, str1,
- butr->xmax-19, dy, 19, 19,
- NULL, 0, 0, 0, 0, "Displays number of users. Click to make a single-user copy.");
- uiButSetFunc(bt, node_mat_alone_cb, node, NULL);
- }
-
- /* WATCH IT: we use this callback in material buttons, but then only want first row */
- if(butr->ymax-butr->ymin > 21.0f) {
- /* node options */
- uiDefButBitS(block, TOG, SH_NODE_MAT_DIFF, B_NODE_EXEC, "Diff",
- butr->xmin, butr->ymin, dx, 19,
- &node->custom1, 0, 0, 0, 0, "Material Node outputs Diffuse");
- uiDefButBitS(block, TOG, SH_NODE_MAT_SPEC, B_NODE_EXEC, "Spec",
- butr->xmin+dx, butr->ymin, dx, 19,
- &node->custom1, 0, 0, 0, 0, "Material Node outputs Specular");
- uiDefButBitS(block, TOG, SH_NODE_MAT_NEG, B_NODE_EXEC, "Neg Normal",
- butr->xmax-dx, butr->ymin, dx, 19,
- &node->custom1, 0, 0, 0, 0, "Material Node uses inverted Normal");
- }
+
+ /* WATCH IT: we use this callback in material buttons, but then only want first row */
+ if(butr->ymax-butr->ymin > 21.0f) {
+ /* node options */
+ uiDefButBitS(block, TOG, SH_NODE_MAT_DIFF, B_NODE_EXEC, "Diff",
+ butr->xmin, butr->ymin, dx, 19,
+ &node->custom1, 0, 0, 0, 0, "Material Node outputs Diffuse");
+ uiDefButBitS(block, TOG, SH_NODE_MAT_SPEC, B_NODE_EXEC, "Spec",
+ butr->xmin+dx, butr->ymin, dx, 19,
+ &node->custom1, 0, 0, 0, 0, "Material Node outputs Specular");
+ uiDefButBitS(block, TOG, SH_NODE_MAT_NEG, B_NODE_EXEC, "Neg Normal",
+ butr->xmax-dx, butr->ymin, dx, 19,
+ &node->custom1, 0, 0, 0, 0, "Material Node uses inverted Normal");
}
- uiBlockEndAlign(block);
- }
- return 38;
+ }
+ uiBlockEndAlign(block);
}
-static int node_shader_buts_mapping(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_shader_buts_mapping(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- TexMapping *texmap= node->storage;
- short dx= (short)((butr->xmax-butr->xmin)/7.0f);
- short dy= (short)(butr->ymax-19);
-
- uiBlockSetFunc(block, node_texmap_cb, texmap, NULL); /* all buttons get this */
-
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->loc, -1000.0f, 1000.0f, 10, 2, "");
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->loc+1, -1000.0f, 1000.0f, 10, 2, "");
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->loc+2, -1000.0f, 1000.0f, 10, 2, "");
- dy-= 19;
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->rot, -1000.0f, 1000.0f, 1000, 1, "");
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->rot+1, -1000.0f, 1000.0f, 1000, 1, "");
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->rot+2, -1000.0f, 1000.0f, 1000, 1, "");
- dy-= 19;
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->size, -1000.0f, 1000.0f, 10, 2, "");
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->size+1, -1000.0f, 1000.0f, 10, 2, "");
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->size+2, -1000.0f, 1000.0f, 10, 2, "");
- dy-= 25;
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->min, -10.0f, 10.0f, 100, 2, "");
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->min+1, -10.0f, 10.0f, 100, 2, "");
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->min+2, -10.0f, 10.0f, 100, 2, "");
- dy-= 19;
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->max, -10.0f, 10.0f, 10, 2, "");
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->max+1, -10.0f, 10.0f, 10, 2, "");
- uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->max+2, -10.0f, 10.0f, 10, 2, "");
- uiBlockEndAlign(block);
-
- /* labels/options */
-
- dy= (short)(butr->ymax-19);
- uiDefBut(block, LABEL, B_NOP, "Loc", butr->xmin, dy, dx, 19, NULL, 0.0f, 0.0f, 0, 0, "");
- dy-= 19;
- uiDefBut(block, LABEL, B_NOP, "Rot", butr->xmin, dy, dx, 19, NULL, 0.0f, 0.0f, 0, 0, "");
- dy-= 19;
- uiDefBut(block, LABEL, B_NOP, "Size", butr->xmin, dy, dx, 19, NULL, 0.0f, 0.0f, 0, 0, "");
- dy-= 25;
- uiDefButBitI(block, TOG, TEXMAP_CLIP_MIN, B_NODE_EXEC, "Min", butr->xmin, dy, dx-4, 19, &texmap->flag, 0.0f, 0.0f, 0, 0, "");
- dy-= 19;
- uiDefButBitI(block, TOG, TEXMAP_CLIP_MAX, B_NODE_EXEC, "Max", butr->xmin, dy, dx-4, 19, &texmap->flag, 0.0f, 0.0f, 0, 0, "");
-
- }
- return 5*19 + 6;
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+ TexMapping *texmap= node->storage;
+ short dx= (short)((butr->xmax-butr->xmin)/7.0f);
+ short dy= (short)(butr->ymax-19);
+
+ uiBlockSetFunc(block, node_texmap_cb, texmap, NULL); /* all buttons get this */
+
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->loc, -1000.0f, 1000.0f, 10, 2, "");
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->loc+1, -1000.0f, 1000.0f, 10, 2, "");
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->loc+2, -1000.0f, 1000.0f, 10, 2, "");
+ dy-= 19;
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->rot, -1000.0f, 1000.0f, 1000, 1, "");
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->rot+1, -1000.0f, 1000.0f, 1000, 1, "");
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->rot+2, -1000.0f, 1000.0f, 1000, 1, "");
+ dy-= 19;
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->size, -1000.0f, 1000.0f, 10, 2, "");
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->size+1, -1000.0f, 1000.0f, 10, 2, "");
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->size+2, -1000.0f, 1000.0f, 10, 2, "");
+ dy-= 25;
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->min, -10.0f, 10.0f, 100, 2, "");
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->min+1, -10.0f, 10.0f, 100, 2, "");
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->min+2, -10.0f, 10.0f, 100, 2, "");
+ dy-= 19;
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+dx, dy, 2*dx, 19, texmap->max, -10.0f, 10.0f, 10, 2, "");
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+3*dx, dy, 2*dx, 19, texmap->max+1, -10.0f, 10.0f, 10, 2, "");
+ uiDefButF(block, NUM, B_NODE_EXEC, "", butr->xmin+5*dx, dy, 2*dx, 19, texmap->max+2, -10.0f, 10.0f, 10, 2, "");
+ uiBlockEndAlign(block);
+
+ /* labels/options */
+
+ dy= (short)(butr->ymax-19);
+ uiDefBut(block, LABEL, B_NOP, "Loc", butr->xmin, dy, dx, 19, NULL, 0.0f, 0.0f, 0, 0, "");
+ dy-= 19;
+ uiDefBut(block, LABEL, B_NOP, "Rot", butr->xmin, dy, dx, 19, NULL, 0.0f, 0.0f, 0, 0, "");
+ dy-= 19;
+ uiDefBut(block, LABEL, B_NOP, "Size", butr->xmin, dy, dx, 19, NULL, 0.0f, 0.0f, 0, 0, "");
+ dy-= 25;
+ uiDefButBitI(block, TOG, TEXMAP_CLIP_MIN, B_NODE_EXEC, "Min", butr->xmin, dy, dx-4, 19, &texmap->flag, 0.0f, 0.0f, 0, 0, "");
+ dy-= 19;
+ uiDefButBitI(block, TOG, TEXMAP_CLIP_MAX, B_NODE_EXEC, "Max", butr->xmin, dy, dx-4, 19, &texmap->flag, 0.0f, 0.0f, 0, 0, "");
}
-static int node_shader_buts_vect_math(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_shader_buts_vect_math(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- uiBut *bt;
-
- bt=uiDefButS(block, MENU, B_NODE_EXEC, "Add %x0|Subtract %x1|Average %x2|Dot Product %x3 |Cross Product %x4|Normalize %x5", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &node->custom1, 0, 0, 0, 0, "");
- uiButSetFunc(bt, node_but_title_cb, node, bt);
- }
- return 20;
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+ uiBut *bt;
+
+ bt=uiDefButS(block, MENU, B_NODE_EXEC, "Add %x0|Subtract %x1|Average %x2|Dot Product %x3 |Cross Product %x4|Normalize %x5", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &node->custom1, 0, 0, 0, 0, "");
+ uiButSetFunc(bt, node_but_title_cb, node, bt);
}
-static int node_shader_buts_geometry(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_shader_buts_geometry(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- uiBut *but;
- NodeGeometry *ngeo= (NodeGeometry*)node->storage;
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+ uiBut *but;
+ NodeGeometry *ngeo= (NodeGeometry*)node->storage;
- // XXX if(!verify_valid_uv_name(ngeo->uvname))
- // XXX uiBlockSetCol(block, TH_REDALERT);
- but= uiDefBut(block, TEX, B_NODE_EXEC, "UV:", butr->xmin, butr->ymin+20, butr->xmax-butr->xmin, 20, ngeo->uvname, 0, 31, 0, 0, "Set name of UV layer to use, default is active UV layer");
- // XXX uiButSetCompleteFunc(but, autocomplete_uv, NULL);
+ // XXX if(!verify_valid_uv_name(ngeo->uvname))
+ // XXX uiBlockSetCol(block, TH_REDALERT);
+ but= uiDefBut(block, TEX, B_NODE_EXEC, "UV:", butr->xmin, butr->ymin+20, butr->xmax-butr->xmin, 20, ngeo->uvname, 0, 31, 0, 0, "Set name of UV layer to use, default is active UV layer");
+ // XXX uiButSetCompleteFunc(but, autocomplete_uv, NULL);
- if(!verify_valid_vcol_name(ngeo->colname));
+ if(!verify_valid_vcol_name(ngeo->colname));
// uiBlockSetCol(block, TH_REDALERT);
- but= uiDefBut(block, TEX, B_NODE_EXEC, "Col:", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, ngeo->colname, 0, 31, 0, 0, "Set name of vertex color layer to use, default is active vertex color layer");
- uiButSetCompleteFunc(but, autocomplete_vcol, NULL);
- }
-
- return 40;
+ but= uiDefBut(block, TEX, B_NODE_EXEC, "Col:", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, ngeo->colname, 0, 31, 0, 0, "Set name of vertex color layer to use, default is active vertex color layer");
+ uiButSetCompleteFunc(but, autocomplete_vcol, NULL);
}
-static int node_shader_buts_dynamic(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_shader_buts_dynamic(uiLayout *layout, PointerRNA *ptr)
{
- if (block) {
- uiBut *bt;
- // XXX SpaceNode *snode= curarea->spacedata.first;
- short dy= (short)butr->ymin;
- int xoff=0;
-
- /* B_NODE_EXEC is handled in butspace.c do_node_buts */
- if(!node->id) {
- char *strp;
- IDnames_to_pupstring(&strp, NULL, "", &(G.main->text), NULL, NULL);
- node->menunr= 0;
- bt= uiDefButS(block, MENU, B_NODE_EXEC/*+node->nr*/, strp,
- butr->xmin, dy, 19, 19,
- &node->menunr, 0, 0, 0, 0, "Browses existing choices");
- uiButSetFunc(bt, node_browse_text_cb, ntree, node);
- xoff=19;
- if(strp) MEM_freeN(strp);
- }
- else {
- bt = uiDefBut(block, BUT, B_NOP, "Update",
- butr->xmin+xoff, butr->ymin+20, 50, 19,
- &node->menunr, 0.0, 19.0, 0, 0, "Refresh this node (and all others that use the same script)");
- uiButSetFunc(bt, node_dynamic_update_cb, ntree, node);
-
- if (BTST(node->custom1, NODE_DYNAMIC_ERROR)) {
- // UI_ThemeColor(TH_REDALERT);
- // XXX ui_rasterpos_safe(butr->xmin + xoff, butr->ymin + 5, snode->aspect);
- // XXX snode_drawstring(snode, "Error! Check console...", butr->xmax - butr->xmin);
- ;
- }
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ bNodeTree *ntree= ptr->id.data;
+ rctf *butr= &node->butr;
+ uiBut *bt;
+ // XXX SpaceNode *snode= curarea->spacedata.first;
+ short dy= (short)butr->ymin;
+ int xoff=0;
+
+ /* B_NODE_EXEC is handled in butspace.c do_node_buts */
+ if(!node->id) {
+ char *strp;
+ IDnames_to_pupstring(&strp, NULL, "", &(G.main->text), NULL, NULL);
+ node->menunr= 0;
+ bt= uiDefButS(block, MENU, B_NODE_EXEC/*+node->nr*/, strp,
+ butr->xmin, dy, 19, 19,
+ &node->menunr, 0, 0, 0, 0, "Browses existing choices");
+ uiButSetFunc(bt, node_browse_text_cb, ntree, node);
+ xoff=19;
+ if(strp) MEM_freeN(strp);
+ }
+ else {
+ bt = uiDefBut(block, BUT, B_NOP, "Update",
+ butr->xmin+xoff, butr->ymin+20, 50, 19,
+ &node->menunr, 0.0, 19.0, 0, 0, "Refresh this node (and all others that use the same script)");
+ uiButSetFunc(bt, node_dynamic_update_cb, ntree, node);
+
+ if (BTST(node->custom1, NODE_DYNAMIC_ERROR)) {
+ // UI_ThemeColor(TH_REDALERT);
+ // XXX ui_rasterpos_safe(butr->xmin + xoff, butr->ymin + 5, snode->aspect);
+ // XXX snode_drawstring(snode, "Error! Check console...", butr->xmax - butr->xmin);
+ ;
}
}
- return 20+19;
}
/* only once called */
@@ -752,49 +738,49 @@ static void node_shader_set_butfunc(bNodeType *ntype)
case SH_NODE_MATERIAL:
case SH_NODE_MATERIAL_EXT:
- ntype->butfunc= node_shader_buts_material;
+ ntype->uifunc= node_shader_buts_material;
break;
case SH_NODE_TEXTURE:
- ntype->butfunc= node_buts_texture;
+ ntype->uifunc= node_buts_texture;
break;
case SH_NODE_NORMAL:
- ntype->butfunc= node_buts_normal;
+ ntype->uifunc= node_buts_normal;
break;
case SH_NODE_CURVE_VEC:
- ntype->butfunc= node_buts_curvevec;
+ ntype->uifunc= node_buts_curvevec;
break;
case SH_NODE_CURVE_RGB:
- ntype->butfunc= node_buts_curvecol;
+ ntype->uifunc= node_buts_curvecol;
break;
case SH_NODE_MAPPING:
- ntype->butfunc= node_shader_buts_mapping;
+ ntype->uifunc= node_shader_buts_mapping;
break;
case SH_NODE_VALUE:
- ntype->butfunc= node_buts_value;
+ ntype->uifunc= node_buts_value;
break;
case SH_NODE_RGB:
- ntype->butfunc= node_buts_rgb;
+ ntype->uifunc= node_buts_rgb;
break;
case SH_NODE_MIX_RGB:
- ntype->butfunc= node_buts_mix_rgb;
+ ntype->uifunc= node_buts_mix_rgb;
break;
case SH_NODE_VALTORGB:
- ntype->butfunc= node_buts_valtorgb;
+ ntype->uifunc= node_buts_valtorgb;
break;
case SH_NODE_MATH:
- ntype->butfunc= node_buts_math;
+ ntype->uifunc= node_buts_math;
break;
case SH_NODE_VECT_MATH:
- ntype->butfunc= node_shader_buts_vect_math;
+ ntype->uifunc= node_shader_buts_vect_math;
break;
case SH_NODE_GEOMETRY:
- ntype->butfunc= node_shader_buts_geometry;
+ ntype->uifunc= node_shader_buts_geometry;
break;
case NODE_DYNAMIC:
- ntype->butfunc= node_shader_buts_dynamic;
+ ntype->uifunc= node_shader_buts_dynamic;
break;
default:
- ntype->butfunc= NULL;
+ ntype->uifunc= NULL;
}
}
@@ -879,112 +865,102 @@ static void image_layer_cb(bContext *C, void *ima_v, void *iuser_v)
// allqueue(REDRAWNODE, 0);
}
-static int node_composit_buts_image(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_image(uiLayout *layout, PointerRNA *ptr)
{
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ bNodeTree *ntree= ptr->id.data;
+ rctf *butr= &node->butr;
ImageUser *iuser= node->storage;
+ uiBut *bt;
+ short dy= (short)butr->ymax-19;
+ char *strp;
- if(block) {
- uiBut *bt;
- short dy= (short)butr->ymax-19;
- char *strp;
+ uiBlockBeginAlign(block);
+
+ /* browse button */
+ IMAnames_to_pupstring(&strp, NULL, "LOAD NEW %x32767", &(G.main->image), NULL, NULL);
+ node->menunr= 0;
+ bt= uiDefButS(block, MENU, B_NOP, strp,
+ butr->xmin, dy, 19, 19,
+ &node->menunr, 0, 0, 0, 0, "Browses existing choices");
+ uiButSetFunc(bt, node_browse_image_cb, ntree, node);
+ if(strp) MEM_freeN(strp);
+
+ /* Add New button */
+ if(node->id==NULL) {
+ bt= uiDefBut(block, BUT, B_NODE_LOADIMAGE, "Load New",
+ butr->xmin+19, dy, (short)(butr->xmax-butr->xmin-19.0f), 19,
+ NULL, 0.0, 0.0, 0, 0, "Add new Image");
+ uiButSetFunc(bt, node_active_cb, ntree, node);
+ }
+ else {
+ /* name button + type */
+ Image *ima= (Image *)node->id;
+ short xmin= (short)butr->xmin, xmax= (short)butr->xmax;
+ short width= xmax - xmin - 45;
+ short icon= ICON_IMAGE_DATA;
- uiBlockBeginAlign(block);
+ if(ima->source==IMA_SRC_MOVIE) icon= ICON_SEQUENCE;
+ else if(ima->source==IMA_SRC_SEQUENCE) icon= ICON_IMAGE_COL;
+ else if(ima->source==IMA_SRC_GENERATED) icon= ICON_BLANK1;
- /* browse button */
- IMAnames_to_pupstring(&strp, NULL, "LOAD NEW %x32767", &(G.main->image), NULL, NULL);
- node->menunr= 0;
- bt= uiDefButS(block, MENU, B_NOP, strp,
- butr->xmin, dy, 19, 19,
- &node->menunr, 0, 0, 0, 0, "Browses existing choices");
- uiButSetFunc(bt, node_browse_image_cb, ntree, node);
- if(strp) MEM_freeN(strp);
+ bt= uiDefBut(block, TEX, B_NOP, "IM:",
+ xmin+19, dy, width, 19,
+ node->id->name+2, 0.0, 19.0, 0, 0, "Image name");
+ uiButSetFunc(bt, node_ID_title_cb, node, NULL);
- /* Add New button */
- if(node->id==NULL) {
- bt= uiDefBut(block, BUT, B_NODE_LOADIMAGE, "Load New",
- butr->xmin+19, dy, (short)(butr->xmax-butr->xmin-19.0f), 19,
- NULL, 0.0, 0.0, 0, 0, "Add new Image");
- uiButSetFunc(bt, node_active_cb, ntree, node);
- }
- else {
- /* name button + type */
- Image *ima= (Image *)node->id;
- short xmin= (short)butr->xmin, xmax= (short)butr->xmax;
- short width= xmax - xmin - 45;
- short icon= ICON_IMAGE_DATA;
-
- if(ima->source==IMA_SRC_MOVIE) icon= ICON_SEQUENCE;
- else if(ima->source==IMA_SRC_SEQUENCE) icon= ICON_IMAGE_COL;
- else if(ima->source==IMA_SRC_GENERATED) icon= ICON_BLANK1;
-
- bt= uiDefBut(block, TEX, B_NOP, "IM:",
- xmin+19, dy, width, 19,
- node->id->name+2, 0.0, 19.0, 0, 0, "Image name");
- uiButSetFunc(bt, node_ID_title_cb, node, NULL);
-
- /* buffer type option */
- strp= node_image_type_pup();
- bt= uiDefIconTextButS(block, MENU, B_NOP, icon, strp,
- xmax-26, dy, 26, 19,
- &ima->source, 0.0, 19.0, 0, 0, "Image type");
- uiButSetFunc(bt, node_image_type_cb, node, ima);
- MEM_freeN(strp);
+ /* buffer type option */
+ strp= node_image_type_pup();
+ bt= uiDefIconTextButS(block, MENU, B_NOP, icon, strp,
+ xmax-26, dy, 26, 19,
+ &ima->source, 0.0, 19.0, 0, 0, "Image type");
+ uiButSetFunc(bt, node_image_type_cb, node, ima);
+ MEM_freeN(strp);
+
+ if( ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE) ) {
+ width= (xmax-xmin)/2;
- if( ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE) ) {
- width= (xmax-xmin)/2;
-
- dy-= 19;
- uiDefButI(block, NUM, B_NODE_EXEC, "Frs:",
- xmin, dy, width, 19,
- &iuser->frames, 1.0, MAXFRAMEF, 0, 0, "Amount of images used in animation");
- uiDefButI(block, NUM, B_NODE_EXEC, "SFra:",
- xmin+width, dy, width, 19,
- &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Start frame of animation");
+ dy-= 19;
+ uiDefButI(block, NUM, B_NODE_EXEC, "Frs:",
+ xmin, dy, width, 19,
+ &iuser->frames, 1.0, MAXFRAMEF, 0, 0, "Amount of images used in animation");
+ uiDefButI(block, NUM, B_NODE_EXEC, "SFra:",
+ xmin+width, dy, width, 19,
+ &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Start frame of animation");
+ dy-= 19;
+ uiDefButI(block, NUM, B_NODE_EXEC, "Offs:",
+ xmin, dy, width, 19,
+ &iuser->offset, -MAXFRAMEF, MAXFRAMEF, 0, 0, "Offsets the number of the frame to use in the animation");
+ uiDefButS(block, TOG, B_NODE_EXEC, "Cycl",
+ xmin+width, dy, width-20, 19,
+ &iuser->cycl, 0.0, 0.0, 0, 0, "Make animation go cyclic");
+ uiDefIconButBitS(block, TOG, IMA_ANIM_ALWAYS, B_NODE_EXEC, ICON_AUTO,
+ xmax-20, dy, 20, 19,
+ &iuser->flag, 0.0, 0.0, 0, 0, "Always refresh Image on frame changes");
+ }
+ if( ima->type==IMA_TYPE_MULTILAYER && ima->rr) {
+ RenderLayer *rl= BLI_findlink(&ima->rr->layers, iuser->layer);
+ if(rl) {
+ width= (xmax-xmin);
dy-= 19;
- uiDefButI(block, NUM, B_NODE_EXEC, "Offs:",
+ strp= layer_menu(ima->rr);
+ bt= uiDefButS(block, MENU, B_NODE_EXEC, strp,
xmin, dy, width, 19,
- &iuser->offset, -MAXFRAMEF, MAXFRAMEF, 0, 0, "Offsets the number of the frame to use in the animation");
- uiDefButS(block, TOG, B_NODE_EXEC, "Cycl",
- xmin+width, dy, width-20, 19,
- &iuser->cycl, 0.0, 0.0, 0, 0, "Make animation go cyclic");
- uiDefIconButBitS(block, TOG, IMA_ANIM_ALWAYS, B_NODE_EXEC, ICON_AUTO,
- xmax-20, dy, 20, 19,
- &iuser->flag, 0.0, 0.0, 0, 0, "Always refresh Image on frame changes");
- }
- if( ima->type==IMA_TYPE_MULTILAYER && ima->rr) {
- RenderLayer *rl= BLI_findlink(&ima->rr->layers, iuser->layer);
- if(rl) {
- width= (xmax-xmin);
- dy-= 19;
- strp= layer_menu(ima->rr);
- bt= uiDefButS(block, MENU, B_NODE_EXEC, strp,
- xmin, dy, width, 19,
- &iuser->layer, 0.0, 10000.0, 0, 0, "Layer");
- uiButSetFunc(bt, image_layer_cb, ima->rr, node->storage);
- MEM_freeN(strp);
- }
+ &iuser->layer, 0.0, 10000.0, 0, 0, "Layer");
+ uiButSetFunc(bt, image_layer_cb, ima->rr, node->storage);
+ MEM_freeN(strp);
}
}
+ }
- }
if(node->id) {
- Image *ima= (Image *)node->id;
- int retval= 19;
-
/* for each draw we test for anim refresh event */
if(iuser->flag & IMA_ANIM_REFRESHED) {
iuser->flag &= ~IMA_ANIM_REFRESHED;
// addqueue(curarea->win, UI_BUT_EVENT, B_NODE_EXEC); XXX
}
-
- if( ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE) )
- retval+= 38;
- if( ima->type==IMA_TYPE_MULTILAYER)
- retval+= 19;
- return retval;
}
- else
- return 19;
}
/* if we use render layers from other scene, we make a nice title */
@@ -1057,9 +1033,14 @@ static void node_browse_scene_cb(bContext *C, void *ntree_v, void *node_v)
}
-static int node_composit_buts_renderlayers(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_renderlayers(uiLayout *layout, PointerRNA *ptr)
{
- if(block && node->id) {
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ bNodeTree *ntree= ptr->id.data;
+ rctf *butr= &node->butr;
+
+ if(node->id) {
Scene *scene= (Scene *)node->id;
uiBut *bt;
char *strp;
@@ -1094,7 +1075,6 @@ static int node_composit_buts_renderlayers(uiBlock *block, bNodeTree *ntree, bNo
&node->custom2, 0, 0, 0, 0, "Re-render this Layer");
}
- return 19;
}
static void node_blur_relative_cb(bContext *C, void *node, void *poin2)
@@ -1126,734 +1106,426 @@ static void node_blur_update_sizey_cb(bContext *C, void *node, void *poin2)
nbd->sizey= (int)(nbd->percenty*nbd->image_in_height);
}
-static int node_composit_buts_blur(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_blur(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- NodeBlurData *nbd= node->storage;
- uiBut *bt;
- short dy= butr->ymin+58;
- short dx= (butr->xmax-butr->xmin)/2;
- char str[256];
-
- uiBlockBeginAlign(block);
- sprintf(str, "Filter Type%%t|Flat %%x%d|Tent %%x%d|Quad %%x%d|Cubic %%x%d|Gauss %%x%d|Fast Gauss%%x%d|CatRom %%x%d|Mitch %%x%d", R_FILTER_BOX, R_FILTER_TENT, R_FILTER_QUAD, R_FILTER_CUBIC, R_FILTER_GAUSS, R_FILTER_FAST_GAUSS, R_FILTER_CATROM, R_FILTER_MITCH);
- uiDefButS(block, MENU, B_NODE_EXEC,str,
- butr->xmin, dy, dx*2, 19,
- &nbd->filtertype, 0, 0, 0, 0, "Set sampling filter for blur");
- dy-=19;
- if (nbd->filtertype != R_FILTER_FAST_GAUSS) {
- uiDefButC(block, TOG, B_NODE_EXEC, "Bokeh",
- butr->xmin, dy, dx, 19,
- &nbd->bokeh, 0, 0, 0, 0, "Uses circular filter, warning it's slow!");
- uiDefButC(block, TOG, B_NODE_EXEC, "Gamma",
- butr->xmin+dx, dy, dx, 19,
- &nbd->gamma, 0, 0, 0, 0, "Applies filter on gamma corrected values");
- } else {
- uiBlockEndAlign(block);
- uiBlockBeginAlign(block);
- }
- dy-=19;
- bt= uiDefButS(block, TOG, B_NOP, "Relative",
- butr->xmin, dy, dx*2, 19,
- &nbd->relative, 0, 0, 0, 0, "Use relative (percent) values to define blur radius");
- uiButSetFunc(bt, node_blur_relative_cb, node, NULL);
-
- dy-=19;
- if(nbd->relative) {
- bt= uiDefButF(block, NUM, B_NODE_EXEC, "X:",
- butr->xmin, dy, dx, 19,
- &nbd->percentx, 0.0f, 1.0f, 0, 0, "");
- uiButSetFunc(bt, node_blur_update_sizex_cb, node, NULL);
- bt= uiDefButF(block, NUM, B_NODE_EXEC, "Y:",
- butr->xmin+dx, dy, dx, 19,
- &nbd->percenty, 0.0f, 1.0f, 0, 0, "");
- uiButSetFunc(bt, node_blur_update_sizey_cb, node, NULL);
- }
- else {
- uiDefButS(block, NUM, B_NODE_EXEC, "X:",
- butr->xmin, dy, dx, 19,
- &nbd->sizex, 0, 256, 0, 0, "");
- uiDefButS(block, NUM, B_NODE_EXEC, "Y:",
- butr->xmin+dx, dy, dx, 19,
- &nbd->sizey, 0, 256, 0, 0, "");
- }
- uiBlockEndAlign(block);
+ uiLayout *col;
+
+ col= uiLayoutColumn(layout, 0);
+
+ uiItemR(col, "", 0, ptr, "filter_type", 0);
+ /* Only for "Fast Gaussian" */
+ if (RNA_enum_get(ptr, "filter_type")!= 7) {
+ uiItemR(col, NULL, 0, ptr, "bokeh", 0);
+ uiItemR(col, NULL, 0, ptr, "gamma", 0);
+ }
+
+ uiItemR(col, NULL, 0, ptr, "relative", 0);
+ col= uiLayoutColumn(layout, 1);
+ if (RNA_boolean_get(ptr, "relative")== 1) {
+ uiItemR(col, "X", 0, ptr, "factor_x", 0);
+ uiItemR(col, "Y", 0, ptr, "factor_y", 0);
+ }
+ else {
+ uiItemR(col, "X", 0, ptr, "sizex", 0);
+ uiItemR(col, "Y", 0, ptr, "sizey", 0);
}
- return 77;
}
-static int node_composit_buts_dblur(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_dblur(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- NodeDBlurData *ndbd = node->storage;
- short dy = butr->ymin + 171;
- short dx = butr->xmax - butr->xmin;
- short halfdx= (short)dx/2;
-
- uiBlockBeginAlign(block);
- uiDefButS(block, NUM, B_NODE_EXEC, "Iterations:",
- butr->xmin, dy, dx, 19,
- &ndbd->iter, 1, 32, 10, 0, "Amount of iterations");
- uiDefButC(block, TOG, B_NODE_EXEC, "Wrap",
- butr->xmin, dy-= 19, dx, 19,
- &ndbd->wrap, 0, 0, 0, 0, "Wrap blur");
- uiBlockEndAlign(block);
-
- dy-= 9;
-
- uiDefBut(block, LABEL, B_NOP, "Center", butr->xmin, dy-= 19, dx, 19, NULL, 0.0f, 0.0f, 0, 0, "");
-
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_NODE_EXEC, "X:",
- butr->xmin, dy-= 19, halfdx, 19,
- &ndbd->center_x, 0.0f, 1.0f, 10, 0, "X center in percents");
- uiDefButF(block, NUM, B_NODE_EXEC, "Y:",
- butr->xmin+halfdx, dy, halfdx, 19,
- &ndbd->center_y, 0.0f, 1.0f, 10, 0, "Y center in percents");
- uiBlockEndAlign(block);
+ uiLayout *col;
+
+ uiItemR(layout, NULL, 0, ptr, "iterations", 0);
+ uiItemR(layout, NULL, 0, ptr, "wrap", 0);
+
+ col= uiLayoutColumn(layout, 1);
+ uiItemL(col, "Center:", 0);
+ uiItemR(col, "X", 0, ptr, "center_x", 0);
+ uiItemR(col, "Y", 0, ptr, "center_y", 0);
+
+ uiItemS(layout);
+
+ col= uiLayoutColumn(layout, 1);
+ uiItemR(col, NULL, 0, ptr, "distance", 0);
+ uiItemR(col, NULL, 0, ptr, "angle", 0);
+
+ uiItemS(layout);
+
+ uiItemR(layout, NULL, 0, ptr, "spin", 0);
+ uiItemR(layout, NULL, 0, ptr, "zoom", 0);
+}
- dy-= 9;
+static void node_composit_buts_bilateralblur(uiLayout *layout, PointerRNA *ptr)
+{
+ uiLayout *col;
+
+ col= uiLayoutColumn(layout, 1);
+ uiItemR(col, NULL, 0, ptr, "iterations", 0);
+ uiItemR(col, NULL, 0, ptr, "sigma_color", 0);
+ uiItemR(col, NULL, 0, ptr, "sigma_space", 0);
+}
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_NODE_EXEC, "Distance:",
- butr->xmin, dy-= 19, dx, 19,
- &ndbd->distance, -1.0f, 1.0f, 10, 0, "Amount of which the image moves");
- uiDefButF(block, NUM, B_NODE_EXEC, "Angle:",
- butr->xmin, dy-= 19, dx, 19,
- &ndbd->angle, 0.0f, 360.0f, 1000, 0, "Angle in which the image will be moved");
- uiBlockEndAlign(block);
+/* qdn: defocus node */
+static void node_composit_buts_defocus(uiLayout *layout, PointerRNA *ptr)
+{
+ uiLayout *sub, *col;
+
+ col= uiLayoutColumn(layout, 0);
+ uiItemL(col, "Bokeh Type:", 0);
+ uiItemR(col, "", 0, ptr, "bokeh", 0);
+ uiItemR(col, NULL, 0, ptr, "angle", 0);
- dy-= 9;
+ uiItemR(layout, NULL, 0, ptr, "gamma_correction", 0);
- uiDefButF(block, NUM, B_NODE_EXEC, "Spin:",
- butr->xmin, dy-= 19, dx, 19,
- &ndbd->spin, -360.0f, 360.0f, 1000, 0, "Angle that is used to spin the image");
+ col = uiLayoutColumn(layout, 0);
+ uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_zbuffer")==0);
+ uiItemR(col, NULL, 0, ptr, "f_stop", 0);
- dy-= 9;
+ uiItemR(layout, NULL, 0, ptr, "max_blur", 0);
+ uiItemR(layout, NULL, 0, ptr, "threshold", 0);
+
+ // Preview
+ col = uiLayoutColumn(layout, 0);
+ uiItemR(col, NULL, 0, ptr, "preview", 0);
+ sub = uiLayoutColumn(col, 0);
+ uiLayoutSetActive(sub, RNA_boolean_get(ptr, "preview"));
+ uiItemR(sub, NULL, 0, ptr, "samples", 0);
+
+ // Z-Buffer
+ col = uiLayoutColumn(layout, 0);
+ uiItemR(col, NULL, 0, ptr, "use_zbuffer", 0);
+ sub = uiLayoutColumn(col, 0);
+ uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_zbuffer"));
+ uiItemR(sub, NULL, 0, ptr, "z_scale", 0);
+}
- uiDefButF(block, NUM, B_NODE_EXEC, "Zoom:",
- butr->xmin, dy-= 19, dx, 19,
- &ndbd->zoom, 0.0f, 100.0f, 100, 0, "Amount of which the image is zoomed");
+/* qdn: glare node */
+static void node_composit_buts_glare(uiLayout *layout, PointerRNA *ptr)
+{
+ uiItemR(layout, "", 0, ptr, "glare_type", 0);
+ uiItemR(layout, "", 0, ptr, "quality", 0);
+ if (RNA_enum_get(ptr, "glare_type")!= 1) {
+ uiItemR(layout, NULL, 0, ptr, "iterations", 0);
+
+ if (RNA_enum_get(ptr, "glare_type")!= 0)
+ uiItemR(layout, NULL, 0, ptr, "color_modulation", UI_ITEM_R_SLIDER);
}
- return 190;
-}
+
+ uiItemR(layout, NULL, 0, ptr, "mix", 0);
+ uiItemR(layout, NULL, 0, ptr, "threshold", 0);
-static int node_composit_buts_bilateralblur(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
-{
- if(block) {
- NodeBilateralBlurData *nbbd= node->storage;
- short dy= butr->ymin+38;
- short dx= (butr->xmax-butr->xmin);
-
- uiBlockBeginAlign(block);
- uiDefButS(block, NUM, B_NODE_EXEC, "Iterations:",
- butr->xmin, dy, dx, 19,
- &nbbd->iter, 1, 128, 0, 0, "Amount of iterations");
- dy-=19;
- uiDefButF(block, NUM, B_NODE_EXEC, "Color Sigma:",
- butr->xmin, dy, dx, 19,
- &nbbd->sigma_color,0.01, 3, 10, 0, "Sigma value used to modify color");
- dy-=19;
- uiDefButF(block, NUM, B_NODE_EXEC, "Space Sigma:",
- butr->xmin, dy, dx, 19,
- &nbbd->sigma_space ,0.01, 30, 10, 0, "Sigma value used to modify space");
+ if (RNA_enum_get(ptr, "glare_type")== 2) {
+ uiItemR(layout, NULL, 0, ptr, "streaks", 0);
+ uiItemR(layout, NULL, 0, ptr, "angle_offset", 0);
+ }
+ if (RNA_enum_get(ptr, "glare_type")== 0 || RNA_enum_get(ptr, "glare_type")== 2) {
+ uiItemR(layout, NULL, 0, ptr, "fade", UI_ITEM_R_SLIDER);
+ if (RNA_enum_get(ptr, "glare_type")== 0)
+ uiItemR(layout, NULL, 0, ptr, "rotate_45", 0);
}
- return 57;
-}
-
-/* qdn: defocus node */
-static int node_composit_buts_defocus(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
-{
- if(block) {
- NodeDefocus *nqd = node->storage;
- short dy = butr->ymin + 209;
- short dx = butr->xmax - butr->xmin;
- char* mstr1 = "Bokeh Type%t|Octagon %x8|Heptagon %x7|Hexagon %x6|Pentagon %x5|Square %x4|Triangle %x3|Disk %x0";
-
- uiDefBut(block, LABEL, B_NOP, "Bokeh Type", butr->xmin, dy, dx, 19, NULL, 0, 0, 0, 0, "");
- uiDefButC(block, MENU, B_NODE_EXEC, mstr1,
- butr->xmin, dy-19, dx, 19,
- &nqd->bktype, 0, 0, 0, 0, "Bokeh type");
- if (nqd->bktype) { /* for some reason rotating a disk doesn't seem to work... ;) */
- uiDefButC(block, NUM, B_NODE_EXEC, "Rotate:",
- butr->xmin, dy-38, dx, 19,
- &nqd->rotation, 0, 90, 0, 0, "Bokeh shape rotation offset in degrees");
- }
- uiDefButC(block, TOG, B_NODE_EXEC, "Gamma Correct",
- butr->xmin, dy-57, dx, 19,
- &nqd->gamco, 0, 0, 0, 0, "Enable gamma correction before and after main process");
- if (nqd->no_zbuf==0) {
- // only needed for zbuffer input
- uiDefButF(block, NUM, B_NODE_EXEC, "fStop:",
- butr->xmin, dy-76, dx, 19,
- &nqd->fstop, 0.5, 128, 10, 0, "Amount of focal blur, 128=infinity=perfect focus, half the value doubles the blur radius");
- }
- uiDefButF(block, NUM, B_NODE_EXEC, "Maxblur:",
- butr->xmin, dy-95, dx, 19,
- &nqd->maxblur, 0, 10000, 1000, 0, "blur limit, maximum CoC radius, 0=no limit");
- uiDefButF(block, NUM, B_NODE_EXEC, "BThreshold:",
- butr->xmin, dy-114, dx, 19,
- &nqd->bthresh, 0, 100, 100, 0, "CoC radius threshold, prevents background bleed on in-focus midground, 0=off");
- uiDefButC(block, TOG, B_NODE_EXEC, "Preview",
- butr->xmin, dy-142, dx, 19,
- &nqd->preview, 0, 0, 0, 0, "Enable sampling mode, useful for preview when using low samplecounts");
- if (nqd->preview) {
- /* only visible when sampling mode enabled */
- uiDefButS(block, NUM, B_NODE_EXEC, "Samples:",
- butr->xmin, dy-161, dx, 19,
- &nqd->samples, 16, 256, 0, 0, "Number of samples (16=grainy, higher=less noise)");
- }
- uiDefButS(block, TOG, B_NODE_EXEC, "No zbuffer",
- butr->xmin, dy-190, dx, 19,
- &nqd->no_zbuf, 0, 0, 0, 0, "Enable when using an image as input instead of actual zbuffer (auto enabled if node not image based, eg. time node)");
- if (nqd->no_zbuf) {
- uiDefButF(block, NUM, B_NODE_EXEC, "Zscale:",
- butr->xmin, dy-209, dx, 19,
- &nqd->scale, 0, 1000, 100, 0, "Scales the Z input when not using a zbuffer, controls maximum blur designated by the color white or input value 1");
- }
+ if (RNA_enum_get(ptr, "glare_type")== 1) {
+ uiItemR(layout, NULL, 0, ptr, "size", 0);
}
- return 228;
}
+/* qdn: tonemap node */
+static void node_composit_buts_tonemap(uiLayout *layout, PointerRNA *ptr)
+{
+ uiLayout *col;
-/* qdn: glare node */
-static int node_composit_buts_glare(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
-{
- if(block) {
- NodeGlare *ndg = node->storage;
- short dy = butr->ymin + 152, dx = butr->xmax - butr->xmin;
- char* mn1 = "Type%t|Ghosts%x3|Streaks%x2|Fog Glow%x1|Simple Star%x0";
- char* mn2 = "Quality/Speed%t|High/Slow%x0|Medium/Medium%x1|Low/Fast%x2";
- uiDefButC(block, MENU, B_NODE_EXEC, mn1,
- butr->xmin, dy, dx, 19,
- &ndg->type, 0, 0, 0, 0, "Glow/Flare/Bloom type");
- uiDefButC(block, MENU, B_NODE_EXEC, mn2,
- butr->xmin, dy-19, dx, 19,
- &ndg->quality, 0, 0, 0, 0,
- "Quality speed trade off, if not set to high quality, effect will be applied to low-res copy of source image");
- if (ndg->type != 1) {
- uiDefButC(block, NUM, B_NODE_EXEC, "Iterations:",
- butr->xmin, dy-38, dx, 19,
- &ndg->iter, 2, 5, 1, 0,
- "higher values will generate longer/more streaks/ghosts");
- if (ndg->type != 0)
- uiDefButF(block, NUM, B_NODE_EXEC, "ColMod:",
- butr->xmin, dy-57, dx, 19,
- &ndg->colmod, 0, 1, 10, 0,
- "Amount of Color Modulation, modulates colors of streaks and ghosts for a spectral dispersion effect");
- }
- uiDefButF(block, NUM, B_NODE_EXEC, "Mix:",
- butr->xmin, dy-76, dx, 19,
- &ndg->mix, -1, 1, 10, 0,
- "Mix balance, -1 is original image only, 0 is exact 50/50 mix, 1 is processed image only");
- uiDefButF(block, NUM, B_NODE_EXEC, "Threshold:",
- butr->xmin, dy-95, dx, 19,
- &ndg->threshold, 0, 1000, 10, 0,
- "Brightness threshold, the glarefilter will be applied only to pixels brighter than this value");
- if ((ndg->type == 2) || (ndg->type == 0))
- {
- if (ndg->type == 2) {
- uiDefButC(block, NUM, B_NODE_EXEC, "streaks:",
- butr->xmin, dy-114, dx, 19,
- &ndg->angle, 2, 16, 1000, 0,
- "Total number of streaks");
- uiDefButC(block, NUM, B_NODE_EXEC, "AngOfs:",
- butr->xmin, dy-133, dx, 19,
- &ndg->angle_ofs, 0, 180, 1000, 0,
- "Streak angle rotation offset in degrees");
- }
- uiDefButF(block, NUM, B_NODE_EXEC, "Fade:",
- butr->xmin, dy-152, dx, 19,
- &ndg->fade, 0.75, 1, 5, 0,
- "Streak fade out factor");
- }
- if (ndg->type == 0)
- uiDefButC(block, TOG, B_NODE_EXEC, "Rot45",
- butr->xmin, dy-114, dx, 19,
- &ndg->angle, 0, 0, 0, 0,
- "simple star filter, add 45 degree rotation offset");
- if ((ndg->type == 1) || (ndg->type > 3)) // PBGH and fog glow
- uiDefButC(block, NUM, B_NODE_EXEC, "Size:",
- butr->xmin, dy-114, dx, 19,
- &ndg->size, 6, 9, 1000, 0,
- "glow/glare size (not actual size, relative to initial size of bright area of pixels)");
+ col = uiLayoutColumn(layout, 0);
+ uiItemR(col, "", 0, ptr, "tonemap_type", 0);
+ if (RNA_enum_get(ptr, "tonemap_type")== 0) {
+ uiItemR(col, NULL, 0, ptr, "key", UI_ITEM_R_SLIDER);
+ uiItemR(col, NULL, 0, ptr, "offset", 0);
+ uiItemR(col, NULL, 0, ptr, "gamma", 0);
}
- return 171;
-}
-
-/* qdn: tonemap node */
-static int node_composit_buts_tonemap(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
-{
- if(block) {
- NodeTonemap *ntm = node->storage;
- short dy = butr->ymin + 76, dx = butr->xmax - butr->xmin;
- char* mn = "Type%t|R/D Photoreceptor%x1|Rh Simple%x0";
-
- uiBlockBeginAlign(block);
- uiDefButI(block, MENU, B_NODE_EXEC, mn,
- butr->xmin, dy, dx, 19,
- &ntm->type, 0, 0, 0, 0,
- "Tone mapping type");
- if (ntm->type == 0) {
- uiDefButF(block, NUM, B_NODE_EXEC, "Key:",
- butr->xmin, dy-19, dx, 19,
- &ntm->key, 0, 1, 5, 0,
- "The value the average luminance is mapped to");
- uiDefButF(block, NUM, B_NODE_EXEC, "Offset:",
- butr->xmin, dy-38, dx, 19,
- &ntm->offset, 0.001, 10, 5, 0,
- "Tonemap offset, normally always 1, but can be used as an extra control to alter the brightness curve");
- uiDefButF(block, NUM, B_NODE_EXEC, "Gamma:",
- butr->xmin, dy-57, dx, 19,
- &ntm->gamma, 0.001, 3, 5, 0,
- "Gamma factor, if not used, set to 1");
- }
- else {
- uiDefButF(block, NUM, B_NODE_EXEC, "Intensity:",
- butr->xmin, dy-19, dx, 19,
- &ntm->f, -8, 8, 10, 0, "if less than zero, darkens image, otherwise makes it brighter");
- uiDefButF(block, NUM, B_NODE_EXEC, "Contrast:",
- butr->xmin, dy-38, dx, 19,
- &ntm->m, 0, 1, 5, 0, "Set to 0 to use estimate from input image");
- uiDefButF(block, NUM, B_NODE_EXEC, "Adaptation:",
- butr->xmin, dy-57, dx, 19,
- &ntm->a, 0, 1, 5, 0, "if 0, global, if 1, based on pixel intensity");
- uiDefButF(block, NUM, B_NODE_EXEC, "ColCorrect:",
- butr->xmin, dy-76, dx, 19,
- &ntm->c, 0, 1, 5, 0, "color correction, if 0, same for all channels, if 1, each independent");
- }
- uiBlockEndAlign(block);
+ else {
+ uiItemR(col, NULL, 0, ptr, "intensity", 0);
+ uiItemR(col, NULL, 0, ptr, "contrast", UI_ITEM_R_SLIDER);
+ uiItemR(col, NULL, 0, ptr, "adaptation", UI_ITEM_R_SLIDER);
+ uiItemR(col, NULL, 0, ptr, "correction", UI_ITEM_R_SLIDER);
}
- return 95;
}
/* qdn: lens distortion node */
-static int node_composit_buts_lensdist(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_lensdist(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- NodeLensDist *nld = node->storage;
- short dy = butr->ymin + 19, dx = butr->xmax - butr->xmin;
- uiBlockBeginAlign(block);
- uiDefButS(block, TOG, B_NODE_EXEC, "Projector",
- butr->xmin, dy, dx, 19,
- &nld->proj, 0, 0, 0, 0,
- "Enable/disable projector mode, effect is applied in horizontal direction only");
- if (!nld->proj) {
- uiDefButS(block, TOG, B_NODE_EXEC, "Jitter",
- butr->xmin, dy-19, dx/2, 19,
- &nld->jit, 0, 0, 0, 0,
- "Enable/disable jittering, faster, but also noisier");
- uiDefButS(block, TOG, B_NODE_EXEC, "Fit",
- butr->xmin+dx/2, dy-19, dx/2, 19,
- &nld->fit, 0, 0, 0, 0,
- "For positive distortion factor only, scale image such that black areas are not visible");
- }
- uiBlockEndAlign(block);
- }
- return 38;
-}
+ uiLayout *col;
+ col= uiLayoutColumn(layout, 0);
+ uiItemR(col, NULL, 0, ptr, "projector", 0);
-static int node_composit_buts_vecblur(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
-{
- if(block) {
- PointerRNA ptr;
- short dy= butr->ymin;
- short dx= (butr->xmax-butr->xmin);
-
- RNA_pointer_create((ID *)ntree, &RNA_Node, node, &ptr);
-
- uiBlockBeginAlign(block);
- uiDefButR(block, NUM, B_NODE_EXEC, NULL,
- butr->xmin, dy+76, dx, 19,
- &ptr, "samples", 0, 1, 256, 0, 0, NULL);
- uiDefButR(block, NUM, B_NODE_EXEC, NULL,
- butr->xmin, dy+57, dx, 19,
- &ptr, "min_speed", 0, 0, 1024, 0, 0, NULL);
- uiDefButR(block, NUM, B_NODE_EXEC, NULL,
- butr->xmin, dy+38, dx, 19,
- &ptr, "max_speed", 0, 0, 1024, 0, 0, NULL);
- uiDefButR(block, NUM, B_NODE_EXEC, "Blur",
- butr->xmin, dy+19, dx, 19,
- &ptr, "factor", 0, 0, 2, 10, 2, NULL);
- uiDefButR(block, TOG, B_NODE_EXEC, NULL,
- butr->xmin, dy, dx, 19,
- &ptr, "curved", 0, 0, 2, 10, 2, NULL);
- uiBlockEndAlign(block);
- }
- return 95;
+ col = uiLayoutColumn(col, 0);
+ uiLayoutSetActive(col, RNA_boolean_get(ptr, "projector")==0);
+ uiItemR(col, NULL, 0, ptr, "jitter", 0);
+ uiItemR(col, NULL, 0, ptr, "fit", 0);
}
-static int node_composit_buts_filter(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_vecblur(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- uiBut *bt;
-
- /* blend type */
- bt=uiDefButS(block, MENU, B_NODE_EXEC, "Soften %x0|Sharpen %x1|Laplace %x2|Sobel %x3|Prewitt %x4|Kirsch %x5|Shadow %x6",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &node->custom1, 0, 0, 0, 0, "");
- uiButSetFunc(bt, node_but_title_cb, node, bt);
- }
- return 20;
+ uiLayout *col;
+
+ col= uiLayoutColumn(layout, 0);
+ uiItemR(col, NULL, 0, ptr, "samples", 0);
+ uiItemR(col, "Blur", 0, ptr, "factor", 0);
+
+ col= uiLayoutColumn(layout, 1);
+ uiItemL(col, "Speed:", 0);
+ uiItemR(col, "Min", 0, ptr, "min_speed", 0);
+ uiItemR(col, "Max", 0, ptr, "max_speed", 0);
+
+ uiItemR(layout, NULL, 0, ptr, "curved", 0);
}
-static int node_composit_buts_flip(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_filter(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- uiBut *bt;
-
- /* flip x\y */
- bt=uiDefButS(block, MENU, B_NODE_EXEC, "Flip X %x0|Flip Y %x1|Flip X & Y %x2",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &node->custom1, 0, 0, 0, 0, "");
- uiButSetFunc(bt, node_but_title_cb, node, bt);
- }
- return 20;
+ uiItemR(layout, "", 0, ptr, "filter_type", 0);
}
-static int node_composit_buts_crop(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_flip(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- NodeTwoXYs *ntxy= node->storage;
- char elementheight = 19;
- short dx= (butr->xmax-butr->xmin)/2;
- short dy= butr->ymax - elementheight;
- short xymin= 0, xymax= 10000;
-
- uiBlockBeginAlign(block);
-
- /* crop image size toggle */
- uiDefButS(block, TOG, B_NODE_EXEC, "Crop Image Size",
- butr->xmin, dy, dx*2, elementheight,
- &node->custom1, 0, 0, 0, 0, "Crop the size of the input image.");
-
- dy-=elementheight;
-
- /* x1 */
- uiDefButS(block, NUM, B_NODE_EXEC, "X1:",
- butr->xmin, dy, dx, elementheight,
- &ntxy->x1, xymin, xymax, 0, 0, "");
- /* y1 */
- uiDefButS(block, NUM, B_NODE_EXEC, "Y1:",
- butr->xmin+dx, dy, dx, elementheight,
- &ntxy->y1, xymin, xymax, 0, 0, "");
-
- dy-=elementheight;
-
- /* x2 */
- uiDefButS(block, NUM, B_NODE_EXEC, "X2:",
- butr->xmin, dy, dx, elementheight,
- &ntxy->x2, xymin, xymax, 0, 0, "");
- /* y2 */
- uiDefButS(block, NUM, B_NODE_EXEC, "Y2:",
- butr->xmin+dx, dy, dx, elementheight,
- &ntxy->y2, xymin, xymax, 0, 0, "");
-
- uiBlockEndAlign(block);
- }
- return 60;
+ uiItemR(layout, "", 0, ptr, "axis", 0);
}
-static int node_composit_buts_splitviewer(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_crop(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- uiBlockBeginAlign(block);
-
- uiDefButS(block, ROW, B_NODE_EXEC, "X",
- butr->xmin, butr->ymin+19, (butr->xmax-butr->xmin)/2, 20,
- &node->custom2, 0.0, 0.0, 0, 0, "");
- uiDefButS(block, ROW, B_NODE_EXEC, "Y",
- butr->xmin+(butr->xmax-butr->xmin)/2, butr->ymin+19, (butr->xmax-butr->xmin)/2, 20,
- &node->custom2, 0.0, 1.0, 0, 0, "");
-
- uiDefButS(block, NUMSLI, B_NODE_EXEC, "Split %: ",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &node->custom1, 0, 100, 10, 0, "");
- }
- return 40;
-}
-
-static int node_composit_buts_map_value(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
-{
- if(block) {
- TexMapping *texmap= node->storage;
- short xstart= (short)butr->xmin;
- short dy= (short)(butr->ymax-19.0f);
- short dx= (short)(butr->xmax-butr->xmin)/2;
-
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_NODE_EXEC, "Offs:", xstart, dy, 2*dx, 19, texmap->loc, -1000.0f, 1000.0f, 10, 2, "");
- dy-= 19;
- uiDefButF(block, NUM, B_NODE_EXEC, "Size:", xstart, dy, 2*dx, 19, texmap->size, -1000.0f, 1000.0f, 10, 3, "");
- dy-= 23;
- uiBlockBeginAlign(block);
- uiDefButBitI(block, TOG, TEXMAP_CLIP_MIN, B_NODE_EXEC, "Min", xstart, dy, dx, 19, &texmap->flag, 0.0f, 0.0f, 0, 0, "");
- uiDefButF(block, NUM, B_NODE_EXEC, "", xstart+dx, dy, dx, 19, texmap->min, -1000.0f, 1000.0f, 10, 2, "");
- dy-= 19;
- uiDefButBitI(block, TOG, TEXMAP_CLIP_MAX, B_NODE_EXEC, "Max", xstart, dy, dx, 19, &texmap->flag, 0.0f, 0.0f, 0, 0, "");
- uiDefButF(block, NUM, B_NODE_EXEC, "", xstart+dx, dy, dx, 19, texmap->max, -1000.0f, 1000.0f, 10, 2, "");
- }
- return 80;
+ uiLayout *col;
+
+ uiItemR(layout, NULL, 0, ptr, "crop_size", 0);
+
+ col= uiLayoutColumn(layout, 1);
+ uiItemR(col, "Left", 0, ptr, "x1", 0);
+ uiItemR(col, "Right", 0, ptr, "x2", 0);
+ uiItemR(col, "Up", 0, ptr, "y1", 0);
+ uiItemR(col, "Down", 0, ptr, "y2", 0);
}
-static int node_composit_buts_alphaover(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_splitviewer(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- NodeTwoFloats *ntf= node->storage;
-
- /* alpha type */
- uiDefButS(block, TOG, B_NODE_EXEC, "ConvertPremul",
- butr->xmin, butr->ymin+19, butr->xmax-butr->xmin, 19,
- &node->custom1, 0, 0, 0, 0, "");
- /* mix factor */
- uiDefButF(block, NUM, B_NODE_EXEC, "Premul: ",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 19,
- &ntf->x, 0.0f, 1.0f, 100, 0, "");
- }
- return 38;
+ uiLayout *row, *col;
+
+ col= uiLayoutColumn(layout, 0);
+ row= uiLayoutRow(col, 0);
+ uiItemR(row, NULL, 0, ptr, "axis", UI_ITEM_R_EXPAND);
+ uiItemR(col, NULL, 0, ptr, "factor", 0);
}
-static int node_composit_buts_hue_sat(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_map_value(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- NodeHueSat *nhs= node->storage;
-
- uiBlockBeginAlign(block);
- uiDefButF(block, NUMSLI, B_NODE_EXEC, "Hue: ",
- butr->xmin, butr->ymin+40.0f, butr->xmax-butr->xmin, 20,
- &nhs->hue, 0.0f, 1.0f, 100, 0, "");
- uiDefButF(block, NUMSLI, B_NODE_EXEC, "Sat: ",
- butr->xmin, butr->ymin+20.0f, butr->xmax-butr->xmin, 20,
- &nhs->sat, 0.0f, 2.0f, 100, 0, "");
- uiDefButF(block, NUMSLI, B_NODE_EXEC, "Val: ",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &nhs->val, 0.0f, 2.0f, 100, 0, "");
- }
- return 60;
+ uiLayout *sub, *col;
+
+ col =uiLayoutColumn(layout, 1);
+ uiItemR(col, NULL, 0, ptr, "offset", 0);
+ uiItemR(col, NULL, 0, ptr, "size", 0);
+
+ col =uiLayoutColumn(layout, 1);
+ uiItemR(col, NULL, 0, ptr, "use_min", 0);
+ sub =uiLayoutColumn(col, 0);
+ uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_min"));
+ uiItemR(sub, "", 0, ptr, "min", 0);
+
+ col =uiLayoutColumn(layout, 1);
+ uiItemR(col, NULL, 0, ptr, "use_max", 0);
+ sub =uiLayoutColumn(col, 0);
+ uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_max"));
+ uiItemR(sub, "", 0, ptr, "max", 0);
}
-static int node_composit_buts_dilateerode(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_alphaover(uiLayout *layout, PointerRNA *ptr)
+{
+ uiLayout *col;
+
+ col =uiLayoutColumn(layout, 1);
+ /* alpha type */
+ uiItemR(col, NULL, 0, ptr, "convert_premul", 0);
+ /* mix factor */
+ uiItemR(col, NULL, 0, ptr, "premul", 0);
+}
+
+static void node_composit_buts_hue_sat(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- uiDefButS(block, NUM, B_NODE_EXEC, "Distance:",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &node->custom2, -100, 100, 0, 0, "Distance to grow/shrink (number of iterations)");
- }
- return 20;
+ uiLayout *col;
+
+ col =uiLayoutColumn(layout, 0);
+ uiItemR(col, NULL, 0, ptr, "hue", UI_ITEM_R_SLIDER);
+ uiItemR(col, NULL, 0, ptr, "sat", UI_ITEM_R_SLIDER);
+ uiItemR(col, NULL, 0, ptr, "val", UI_ITEM_R_SLIDER);
}
-static int node_composit_buts_diff_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_dilateerode(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- NodeChroma *c= node->storage;
-
- uiBlockBeginAlign(block);
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Tolerance: ",
- butr->xmin, butr->ymin+20, butr->xmax-butr->xmin, 20,
- &c->t1, 0.0f, 1.0f, 100, 0, "Color differences below this threshold are keyed.");
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Falloff: ",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &c->t2, 0.0f, 1.0f, 100, 0, "Color differences below this additional threshold are partially keyed.");
- uiBlockEndAlign(block);
- }
- return 40;
+ uiItemR(layout, NULL, 0, ptr, "distance", 0);
}
-static int node_composit_buts_distance_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_diff_matte(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- NodeChroma *c= node->storage;
-
- uiBlockBeginAlign(block);
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Tolerance: ",
- butr->xmin, butr->ymin+20, butr->xmax-butr->xmin, 20,
- &c->t1, 0.0f, 1.0f, 100, 0, "Color distances below this threshold are keyed.");
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Falloff: ",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &c->t2, 0.0f, 1.0f, 100, 0, "Color distances below this additional threshold are partially keyed.");
- uiBlockEndAlign(block);
- }
- return 40;
+ uiLayout *col;
+
+ col =uiLayoutColumn(layout, 1);
+ uiItemR(col, NULL, 0, ptr, "tolerance", UI_ITEM_R_SLIDER);
+ uiItemR(col, NULL, 0, ptr, "falloff", UI_ITEM_R_SLIDER);
}
-static int node_composit_buts_color_spill(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_distance_matte(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- short dx= (butr->xmax-butr->xmin)/3;
+ uiLayout *col;
+
+ col =uiLayoutColumn(layout, 1);
+ uiItemR(col, NULL, 0, ptr, "tolerance", UI_ITEM_R_SLIDER);
+ uiItemR(col, NULL, 0, ptr, "falloff", UI_ITEM_R_SLIDER);
+}
- NodeChroma *c=node->storage;
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_NODE_EXEC, "Enhance: ",
- butr->xmin, butr->ymin+20.0, butr->xmax-butr->xmin, 20,
- &c->t1, 0.0f, 0.5f, 100, 2, "Adjusts how much selected channel is affected by color spill algorithm");
- uiDefButS(block, ROW, B_NODE_EXEC, "R",
- butr->xmin,butr->ymin,dx,20,
- &node->custom1,1,1, 0, 0, "Red Spill Suppression");
- uiDefButS(block, ROW, B_NODE_EXEC, "G",
- butr->xmin+dx,butr->ymin,dx,20,
- &node->custom1,1,2, 0, 0, "Green Spill Suppression");
- uiDefButS(block, ROW, B_NODE_EXEC, "B",
- butr->xmin+2*dx,butr->ymin,dx,20,
- &node->custom1, 1, 3, 0, 0, "Blue Spill Suppression");
- uiBlockEndAlign(block);
- }
- return 60;
+static void node_composit_buts_color_spill(uiLayout *layout, PointerRNA *ptr)
+{
+ uiLayout *row, *col;
+
+ col =uiLayoutColumn(layout, 0);
+ uiItemR(col, NULL, 0, ptr, "factor", 0);
+ row= uiLayoutRow(col, 0);
+ uiItemR(row, NULL, 0, ptr, "channel", UI_ITEM_R_EXPAND);
}
-static int node_composit_buts_chroma_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_chroma_matte(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- short dx=(butr->xmax-butr->xmin)/2;
- NodeChroma *c= node->storage;
- uiBlockBeginAlign(block);
+ uiLayout *col;
+
+ col= uiLayoutColumn(layout, 0);
+ uiItemR(col, NULL, 0, ptr, "acceptance", 0);
+ uiItemR(col, NULL, 0, ptr, "cutoff", 0);
+
+ col= uiLayoutColumn(layout, 1);
+ uiItemR(col, NULL, 0, ptr, "lift", UI_ITEM_R_SLIDER);
+ uiItemR(col, NULL, 0, ptr, "gain", UI_ITEM_R_SLIDER);
+ uiItemR(col, NULL, 0, ptr, "shadow_adjust", UI_ITEM_R_SLIDER);
- uiDefButF(block, NUMSLI, B_NODE_EXEC, "Acceptance ",
- butr->xmin, butr->ymin+60, butr->xmax-butr->xmin, 20,
- &c->t1, 1.0f, 80.0f, 100, 0, "Tolerance for colors to be considered a keying color");
- uiDefButF(block, NUMSLI, B_NODE_EXEC, "Cutoff ",
- butr->xmin, butr->ymin+40, butr->xmax-butr->xmin, 20,
- &c->t2, 0.0f, 30.0f, 100, 0, "Colors below this will be considered as exact matches for keying color");
-
- uiDefButF(block, NUMSLI, B_NODE_EXEC, "Lift ",
- butr->xmin, butr->ymin+20, dx, 20,
- &c->fsize, 0.0f, 1.0f, 100, 0, "Alpha Lift");
- uiDefButF(block, NUMSLI, B_NODE_EXEC, "Gain ",
- butr->xmin+dx, butr->ymin+20, dx, 20,
- &c->fstrength, 0.0f, 1.0f, 100, 0, "Alpha Gain");
-
- uiDefButF(block, NUMSLI, B_NODE_EXEC, "Shadow Adjust ",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &c->t3, 0.0f, 1.0f, 100, 0, "Adjusts the brightness of any shadows captured");
- uiBlockEndAlign(block);
+// uiBlock *block= uiLayoutAbsoluteBlock(layout);
+// bNode *node= ptr->data;
+// rctf *butr= &node->butr;
+// short dx=(butr->xmax-butr->xmin)/2;
+// NodeChroma *c= node->storage;
- if(c->t2 > c->t1)
- c->t2=c->t1;
- }
- return 80;
+// uiBlockBeginAlign(block);
+//
+// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Acceptance ", butr->xmin, butr->ymin+60, butr->xmax-butr->xmin, 20, &c->t1, 1.0f, 80.0f, 100, 0, "Tolerance for colors to be considered a keying color");
+// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Cutoff ", butr->xmin, butr->ymin+40, butr->xmax-butr->xmin, 20, &c->t2, 0.0f, 30.0f, 100, 0, "Colors below this will be considered as exact matches for keying color");
+//
+// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Lift ", butr->xmin, butr->ymin+20, dx, 20, &c->fsize, 0.0f, 1.0f, 100, 0, "Alpha Lift");
+// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Gain ", butr->xmin+dx, butr->ymin+20, dx, 20, &c->fstrength, 0.0f, 1.0f, 100, 0, "Alpha Gain");
+//
+// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Shadow Adjust ", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &c->t3, 0.0f, 1.0f, 100, 0, "Adjusts the brightness of any shadows captured");
+// uiBlockEndAlign(block);
+//
+// if(c->t2 > c->t1)
+// c->t2=c->t1;
}
-static int node_composit_buts_color_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_color_matte(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- NodeChroma *c= node->storage;
- uiBlockBeginAlign(block);
-
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "H: ",
- butr->xmin, butr->ymin+40, butr->xmax-butr->xmin, 20,
- &c->t1, 0.0f, 0.25f, 100, 0, "Hue tolerance for colors to be considered a keying color");
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "S: ",
- butr->xmin, butr->ymin+20, butr->xmax-butr->xmin, 20,
- &c->t2, 0.0f, 1.0f, 100, 0, "Saturation Tolerance for the color");
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "V: ",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &c->t3, 0.0f, 1.0f, 100, 0, "Value Tolerance for the color");
-
- uiBlockEndAlign(block);
- }
- return 60;
+ uiLayout *col;
+
+ col= uiLayoutColumn(layout, 1);
+ uiItemR(col, NULL, 0, ptr, "h", UI_ITEM_R_SLIDER);
+ uiItemR(col, NULL, 0, ptr, "s", UI_ITEM_R_SLIDER);
+ uiItemR(col, NULL, 0, ptr, "v", UI_ITEM_R_SLIDER);
}
-
-static int node_composit_buts_channel_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_channel_matte(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- short sx= (butr->xmax-butr->xmin)/4;
- short cx= (butr->xmax-butr->xmin)/3;
- NodeChroma *c=node->storage;
- char *c1, *c2, *c3;
-
- /*color space selectors*/
- uiBlockBeginAlign(block);
- uiDefButS(block, ROW,B_NODE_EXEC,"RGB",
- butr->xmin,butr->ymin+60,sx,20,&node->custom1,1,1, 0, 0, "RGB Color Space");
- uiDefButS(block, ROW,B_NODE_EXEC,"HSV",
- butr->xmin+sx,butr->ymin+60,sx,20,&node->custom1,1,2, 0, 0, "HSV Color Space");
- uiDefButS(block, ROW,B_NODE_EXEC,"YUV",
- butr->xmin+2*sx,butr->ymin+60,sx,20,&node->custom1,1,3, 0, 0, "YUV Color Space");
- uiDefButS(block, ROW,B_NODE_EXEC,"YCC",
- butr->xmin+3*sx,butr->ymin+60,sx,20,&node->custom1,1,4, 0, 0, "YCbCr Color Space");
-
- if (node->custom1==1) {
- c1="R"; c2="G"; c3="B";
- }
- else if(node->custom1==2){
- c1="H"; c2="S"; c3="V";
- }
- else if(node->custom1==3){
- c1="Y"; c2="U"; c3="V";
- }
- else { // if(node->custom1==4){
- c1="Y"; c2="Cb"; c3="Cr";
- }
-
- /*channel selector */
- uiDefButS(block, ROW, B_NODE_EXEC, c1,
- butr->xmin,butr->ymin+40,cx,20,&node->custom2,1, 1, 0, 0, "Channel 1");
- uiDefButS(block, ROW, B_NODE_EXEC, c2,
- butr->xmin+cx,butr->ymin+40,cx,20,&node->custom2,1, 2, 0, 0, "Channel 2");
- uiDefButS(block, ROW, B_NODE_EXEC, c3,
- butr->xmin+cx+cx,butr->ymin+40,cx,20,&node->custom2, 1, 3, 0, 0, "Channel 3");
-
- /*tolerance sliders */
- uiDefButF(block, NUMSLI, B_NODE_EXEC, "High ",
- butr->xmin, butr->ymin+20.0, butr->xmax-butr->xmin, 20,
- &c->t1, 0.0f, 1.0f, 100, 0, "Values higher than this setting are 100% opaque");
- uiDefButF(block, NUMSLI, B_NODE_EXEC, "Low ",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &c->t2, 0.0f, 1.0f, 100, 0, "Values lower than this setting are 100% keyed");
- uiBlockEndAlign(block);
-
- /*keep t2 (low) less than t1 (high) */
- if(c->t2 > c->t1) {
- c->t2=c->t1;
- }
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+ short sx= (butr->xmax-butr->xmin)/4;
+ short cx= (butr->xmax-butr->xmin)/3;
+ NodeChroma *c=node->storage;
+ char *c1, *c2, *c3;
+
+ /*color space selectors*/
+ uiBlockBeginAlign(block);
+ uiDefButS(block, ROW,B_NODE_EXEC,"RGB",
+ butr->xmin,butr->ymin+60,sx,20,&node->custom1,1,1, 0, 0, "RGB Color Space");
+ uiDefButS(block, ROW,B_NODE_EXEC,"HSV",
+ butr->xmin+sx,butr->ymin+60,sx,20,&node->custom1,1,2, 0, 0, "HSV Color Space");
+ uiDefButS(block, ROW,B_NODE_EXEC,"YUV",
+ butr->xmin+2*sx,butr->ymin+60,sx,20,&node->custom1,1,3, 0, 0, "YUV Color Space");
+ uiDefButS(block, ROW,B_NODE_EXEC,"YCC",
+ butr->xmin+3*sx,butr->ymin+60,sx,20,&node->custom1,1,4, 0, 0, "YCbCr Color Space");
+
+ if (node->custom1==1) {
+ c1="R"; c2="G"; c3="B";
+ }
+ else if(node->custom1==2){
+ c1="H"; c2="S"; c3="V";
+ }
+ else if(node->custom1==3){
+ c1="Y"; c2="U"; c3="V";
+ }
+ else { // if(node->custom1==4){
+ c1="Y"; c2="Cb"; c3="Cr";
+ }
+
+ /*channel selector */
+ uiDefButS(block, ROW, B_NODE_EXEC, c1,
+ butr->xmin,butr->ymin+40,cx,20,&node->custom2,1, 1, 0, 0, "Channel 1");
+ uiDefButS(block, ROW, B_NODE_EXEC, c2,
+ butr->xmin+cx,butr->ymin+40,cx,20,&node->custom2,1, 2, 0, 0, "Channel 2");
+ uiDefButS(block, ROW, B_NODE_EXEC, c3,
+ butr->xmin+cx+cx,butr->ymin+40,cx,20,&node->custom2, 1, 3, 0, 0, "Channel 3");
+
+ /*tolerance sliders */
+ uiDefButF(block, NUMSLI, B_NODE_EXEC, "High ",
+ butr->xmin, butr->ymin+20.0, butr->xmax-butr->xmin, 20,
+ &c->t1, 0.0f, 1.0f, 100, 0, "Values higher than this setting are 100% opaque");
+ uiDefButF(block, NUMSLI, B_NODE_EXEC, "Low ",
+ butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
+ &c->t2, 0.0f, 1.0f, 100, 0, "Values lower than this setting are 100% keyed");
+ uiBlockEndAlign(block);
+
+ /*keep t2 (low) less than t1 (high) */
+ if(c->t2 > c->t1) {
+ c->t2=c->t1;
}
- return 80;
}
-static int node_composit_buts_luma_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_luma_matte(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- NodeChroma *c=node->storage;
-
- /*tolerance sliders */
- uiDefButF(block, NUMSLI, B_NODE_EXEC, "High ",
- butr->xmin, butr->ymin+20.0, butr->xmax-butr->xmin, 20,
- &c->t1, 0.0f, 1.0f, 100, 0, "Values higher than this setting are 100% opaque");
- uiDefButF(block, NUMSLI, B_NODE_EXEC, "Low ",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &c->t2, 0.0f, 1.0f, 100, 0, "Values lower than this setting are 100% keyed");
- uiBlockEndAlign(block);
-
- /*keep t2 (low) less than t1 (high) */
- if(c->t2 > c->t1) {
- c->t2=c->t1;
- }
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+ NodeChroma *c=node->storage;
+
+ /*tolerance sliders */
+ uiDefButF(block, NUMSLI, B_NODE_EXEC, "High ",
+ butr->xmin, butr->ymin+20.0, butr->xmax-butr->xmin, 20,
+ &c->t1, 0.0f, 1.0f, 100, 0, "Values higher than this setting are 100% opaque");
+ uiDefButF(block, NUMSLI, B_NODE_EXEC, "Low ",
+ butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
+ &c->t2, 0.0f, 1.0f, 100, 0, "Values lower than this setting are 100% keyed");
+ uiBlockEndAlign(block);
+
+ /*keep t2 (low) less than t1 (high) */
+ if(c->t2 > c->t1) {
+ c->t2=c->t1;
}
- return 40;
}
-static int node_composit_buts_map_uv(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_map_uv(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- uiDefButS(block, NUM, B_NODE_EXEC, "Alpha:",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &node->custom1, 0, 100, 0, 0, "Conversion percentage of UV differences to Alpha");
- }
- return 20;
+ uiItemR(layout, NULL, 0, ptr, "alpha", 0);
}
-static int node_composit_buts_id_mask(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_id_mask(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- uiDefButS(block, NUM, B_NODE_EXEC, "ID:",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &node->custom1, 0, 10000, 0, 0, "Pass Index number to convert to Alpha");
- }
- return 20;
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+
+ uiDefButS(block, NUM, B_NODE_EXEC, "ID:",
+ butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
+ &node->custom1, 0, 10000, 0, 0, "Pass Index number to convert to Alpha");
}
/* allocate sufficient! */
@@ -1880,58 +1552,58 @@ static void node_set_image_cb(bContext *C, void *ntree_v, void *node_v)
nodeSetActive(ntree, node);
}
-static int node_composit_buts_file_output(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_file_output(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- NodeImageFile *nif= node->storage;
- uiBut *bt;
- short x= (short)butr->xmin;
- short y= (short)butr->ymin;
- short w= (short)butr->xmax-butr->xmin;
- char str[320];
-
- node_imagetype_string(str);
-
- uiBlockBeginAlign(block);
-
- bt = uiDefIconBut(block, BUT, B_NODE_SETIMAGE, ICON_FILESEL,
- x, y+60, 20, 20,
- 0, 0, 0, 0, 0, "Open Fileselect to get Backbuf image");
- uiButSetFunc(bt, node_set_image_cb, ntree, node);
-
- uiDefBut(block, TEX, B_NOP, "",
- 20+x, y+60, w-20, 20,
- nif->name, 0.0f, 240.0f, 0, 0, "");
-
- uiDefButS(block, MENU, B_NOP, str,
- x, y+40, w, 20,
- &nif->imtype, 0.0f, 1.0f, 0, 0, "");
-
- if(nif->imtype==R_OPENEXR) {
- uiDefButBitS(block, TOG, R_OPENEXR_HALF, B_REDR, "Half",
- x, y+20, w/2, 20,
- &nif->subimtype, 0, 0, 0, 0, "");
-
- uiDefButS(block, MENU,B_NOP, "Codec %t|None %x0|Pxr24 (lossy) %x1|ZIP (lossless) %x2|PIZ (lossless) %x3|RLE (lossless) %x4",
- x+w/2, y+20, w/2, 20,
- &nif->codec, 0, 0, 0, 0, "");
- }
- else {
- uiDefButS(block, NUM, B_NOP, "Quality: ",
- x, y+20, w, 20,
- &nif->quality, 10.0f, 100.0f, 10, 0, "");
- }
-
- /* start frame, end frame */
- uiDefButI(block, NUM, B_NODE_EXEC, "SFra: ",
- x, y, w/2, 20,
- &nif->sfra, 1, MAXFRAMEF, 10, 0, "");
- uiDefButI(block, NUM, B_NODE_EXEC, "EFra: ",
- x+w/2, y, w/2, 20,
- &nif->efra, 1, MAXFRAMEF, 10, 0, "");
-
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ bNodeTree *ntree= ptr->id.data;
+ rctf *butr= &node->butr;
+ NodeImageFile *nif= node->storage;
+ uiBut *bt;
+ short x= (short)butr->xmin;
+ short y= (short)butr->ymin;
+ short w= (short)butr->xmax-butr->xmin;
+ char str[320];
+
+ node_imagetype_string(str);
+
+ uiBlockBeginAlign(block);
+
+ bt = uiDefIconBut(block, BUT, B_NODE_SETIMAGE, ICON_FILESEL,
+ x, y+60, 20, 20,
+ 0, 0, 0, 0, 0, "Open Fileselect to get Backbuf image");
+ uiButSetFunc(bt, node_set_image_cb, ntree, node);
+
+ uiDefBut(block, TEX, B_NOP, "",
+ 20+x, y+60, w-20, 20,
+ nif->name, 0.0f, 240.0f, 0, 0, "");
+
+ uiDefButS(block, MENU, B_NOP, str,
+ x, y+40, w, 20,
+ &nif->imtype, 0.0f, 1.0f, 0, 0, "");
+
+ if(nif->imtype==R_OPENEXR) {
+ uiDefButBitS(block, TOG, R_OPENEXR_HALF, B_REDR, "Half",
+ x, y+20, w/2, 20,
+ &nif->subimtype, 0, 0, 0, 0, "");
+
+ uiDefButS(block, MENU,B_NOP, "Codec %t|None %x0|Pxr24 (lossy) %x1|ZIP (lossless) %x2|PIZ (lossless) %x3|RLE (lossless) %x4",
+ x+w/2, y+20, w/2, 20,
+ &nif->codec, 0, 0, 0, 0, "");
}
- return 80;
+ else {
+ uiDefButS(block, NUM, B_NOP, "Quality: ",
+ x, y+20, w, 20,
+ &nif->quality, 10.0f, 100.0f, 10, 0, "");
+ }
+
+ /* start frame, end frame */
+ uiDefButI(block, NUM, B_NODE_EXEC, "SFra: ",
+ x, y, w/2, 20,
+ &nif->sfra, 1, MAXFRAMEF, 10, 0, "");
+ uiDefButI(block, NUM, B_NODE_EXEC, "EFra: ",
+ x+w/2, y, w/2, 20,
+ &nif->efra, 1, MAXFRAMEF, 10, 0, "");
}
static void node_scale_cb(bContext *C, void *node_v, void *unused_v)
@@ -1952,68 +1624,36 @@ static void node_scale_cb(bContext *C, void *node_v, void *unused_v)
}
}
-static int node_composit_buts_scale(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_scale(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- uiBut *bt= uiDefButS(block, MENU, B_NODE_EXEC, "Relative %x0|Absolute %x1|Scene Size % %x2|",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &node->custom1, 0, 0, 0, 0, "Scale new image to absolute pixel size, size relative to the incoming image, or using the 'percent' size of the scene");
- uiButSetFunc(bt, node_scale_cb, node, NULL);
- }
- return 20;
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+ uiBut *bt= uiDefButS(block, MENU, B_NODE_EXEC, "Relative %x0|Absolute %x1|Scene Size % %x2|",
+ butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
+ &node->custom1, 0, 0, 0, 0, "Scale new image to absolute pixel size, size relative to the incoming image, or using the 'percent' size of the scene");
+ uiButSetFunc(bt, node_scale_cb, node, NULL);
}
-static int node_composit_buts_invert(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_invert(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- uiBlockBeginAlign(block);
- uiDefButBitS(block, TOG, CMP_CHAN_RGB, B_NODE_EXEC, "RGB",
- butr->xmin, butr->ymin, (butr->xmax-butr->xmin)/2, 20,
- &node->custom1, 0, 0, 0, 0, "");
- uiDefButBitS(block, TOG, CMP_CHAN_A, B_NODE_EXEC, "A",
- butr->xmin+(butr->xmax-butr->xmin)/2, butr->ymin, (butr->xmax-butr->xmin)/2, 20,
- &node->custom1, 0, 0, 0, 0, "");
- uiBlockEndAlign(block);
- }
- return 20;
+ uiLayout *col;
+
+ col= uiLayoutColumn(layout, 0);
+ uiItemR(col, NULL, 0, ptr, "rgb", 0);
+ uiItemR(col, NULL, 0, ptr, "alpha", 0);
}
-static int node_composit_buts_premulkey(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_premulkey(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- uiBut *bt;
-
- /* blend type */
- bt=uiDefButS(block, MENU, B_NODE_EXEC, "Key to Premul %x0|Premul to Key %x1",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &node->custom1, 0, 0, 0, 0, "Conversion between premultiplied alpha and key alpha");
- }
- return 20;
+ uiItemR(layout, "", 0, ptr, "mapping", 0);
}
-static int node_composit_buts_view_levels(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_composit_buts_view_levels(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- short sx= (butr->xmax-butr->xmin)/5;
-
- /*color space selectors*/
- uiBlockBeginAlign(block);
- uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"C",
- butr->xmin,butr->ymin,sx,20,&node->custom1,1,1, 0, 0, "Combined RGB");
- uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"R",
- butr->xmin+sx,butr->ymin,sx,20,&node->custom1,1,2, 0, 0, "Red Channel");
- uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"G",
- butr->xmin+2*sx,butr->ymin,sx,20,&node->custom1,1,3, 0, 0, "Green Channel");
- uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"B",
- butr->xmin+3*sx,butr->ymin,sx,20,&node->custom1,1,4, 0, 0, "Blue Channel");
- uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"L",
- butr->xmin+4*sx,butr->ymin,sx,20,&node->custom1,1,5, 0, 0, "Luminenc Channel");
- uiBlockEndAlign(block);
- }
- return 20;
+ uiItemR(layout, NULL, 0, ptr, "color_space", UI_ITEM_R_EXPAND);
}
-
/* only once called */
static void node_composit_set_butfunc(bNodeType *ntype)
{
@@ -2021,181 +1661,181 @@ static void node_composit_set_butfunc(bNodeType *ntype)
/* case NODE_GROUP: note, typeinfo for group is generated... see "XXX ugly hack" */
case CMP_NODE_IMAGE:
- ntype->butfunc= node_composit_buts_image;
+ ntype->uifunc= node_composit_buts_image;
break;
case CMP_NODE_R_LAYERS:
- ntype->butfunc= node_composit_buts_renderlayers;
+ ntype->uifunc= node_composit_buts_renderlayers;
break;
case CMP_NODE_NORMAL:
- ntype->butfunc= node_buts_normal;
+ ntype->uifunc= node_buts_normal;
break;
case CMP_NODE_CURVE_VEC:
- ntype->butfunc= node_buts_curvevec;
+ ntype->uifunc= node_buts_curvevec;
break;
case CMP_NODE_CURVE_RGB:
- ntype->butfunc= node_buts_curvecol;
+ ntype->uifunc= node_buts_curvecol;
break;
case CMP_NODE_VALUE:
- ntype->butfunc= node_buts_value;
+ ntype->uifunc= node_buts_value;
break;
case CMP_NODE_RGB:
- ntype->butfunc= node_buts_rgb;
+ ntype->uifunc= node_buts_rgb;
break;
case CMP_NODE_FLIP:
- ntype->butfunc= node_composit_buts_flip;
+ ntype->uifunc= node_composit_buts_flip;
break;
case CMP_NODE_SPLITVIEWER:
- ntype->butfunc= node_composit_buts_splitviewer;
+ ntype->uifunc= node_composit_buts_splitviewer;
break;
case CMP_NODE_MIX_RGB:
- ntype->butfunc= node_buts_mix_rgb;
+ ntype->uifunc= node_buts_mix_rgb;
break;
case CMP_NODE_VALTORGB:
- ntype->butfunc= node_buts_valtorgb;
+ ntype->uifunc= node_buts_valtorgb;
break;
case CMP_NODE_CROP:
- ntype->butfunc= node_composit_buts_crop;
+ ntype->uifunc= node_composit_buts_crop;
break;
case CMP_NODE_BLUR:
- ntype->butfunc= node_composit_buts_blur;
+ ntype->uifunc= node_composit_buts_blur;
break;
case CMP_NODE_DBLUR:
- ntype->butfunc= node_composit_buts_dblur;
+ ntype->uifunc= node_composit_buts_dblur;
break;
case CMP_NODE_BILATERALBLUR:
- ntype->butfunc= node_composit_buts_bilateralblur;
+ ntype->uifunc= node_composit_buts_bilateralblur;
break;
/* qdn: defocus node */
case CMP_NODE_DEFOCUS:
- ntype->butfunc = node_composit_buts_defocus;
+ ntype->uifunc = node_composit_buts_defocus;
break;
/* qdn: glare node */
case CMP_NODE_GLARE:
- ntype->butfunc = node_composit_buts_glare;
+ ntype->uifunc = node_composit_buts_glare;
break;
/* qdn: tonemap node */
case CMP_NODE_TONEMAP:
- ntype->butfunc = node_composit_buts_tonemap;
+ ntype->uifunc = node_composit_buts_tonemap;
break;
/* qdn: lens distortion node */
case CMP_NODE_LENSDIST:
- ntype->butfunc = node_composit_buts_lensdist;
+ ntype->uifunc = node_composit_buts_lensdist;
break;
case CMP_NODE_VECBLUR:
- ntype->butfunc= node_composit_buts_vecblur;
+ ntype->uifunc= node_composit_buts_vecblur;
break;
case CMP_NODE_FILTER:
- ntype->butfunc= node_composit_buts_filter;
+ ntype->uifunc= node_composit_buts_filter;
break;
case CMP_NODE_MAP_VALUE:
- ntype->butfunc= node_composit_buts_map_value;
+ ntype->uifunc= node_composit_buts_map_value;
break;
case CMP_NODE_TIME:
- ntype->butfunc= node_buts_time;
+ ntype->uifunc= node_buts_time;
break;
case CMP_NODE_ALPHAOVER:
- ntype->butfunc= node_composit_buts_alphaover;
+ ntype->uifunc= node_composit_buts_alphaover;
break;
case CMP_NODE_HUE_SAT:
- ntype->butfunc= node_composit_buts_hue_sat;
+ ntype->uifunc= node_composit_buts_hue_sat;
break;
case CMP_NODE_TEXTURE:
- ntype->butfunc= node_buts_texture;
+ ntype->uifunc= node_buts_texture;
break;
case CMP_NODE_DILATEERODE:
- ntype->butfunc= node_composit_buts_dilateerode;
+ ntype->uifunc= node_composit_buts_dilateerode;
break;
case CMP_NODE_OUTPUT_FILE:
- ntype->butfunc= node_composit_buts_file_output;
+ ntype->uifunc= node_composit_buts_file_output;
break;
case CMP_NODE_DIFF_MATTE:
- ntype->butfunc=node_composit_buts_diff_matte;
+ ntype->uifunc=node_composit_buts_diff_matte;
break;
case CMP_NODE_DIST_MATTE:
- ntype->butfunc=node_composit_buts_distance_matte;
+ ntype->uifunc=node_composit_buts_distance_matte;
break;
case CMP_NODE_COLOR_SPILL:
- ntype->butfunc=node_composit_buts_color_spill;
+ ntype->uifunc=node_composit_buts_color_spill;
break;
case CMP_NODE_CHROMA_MATTE:
- ntype->butfunc=node_composit_buts_chroma_matte;
+ ntype->uifunc=node_composit_buts_chroma_matte;
break;
case CMP_NODE_COLOR_MATTE:
- ntype->butfunc=node_composit_buts_color_matte;
+ ntype->uifunc=node_composit_buts_color_matte;
break;
case CMP_NODE_SCALE:
- ntype->butfunc= node_composit_buts_scale;
+ ntype->uifunc= node_composit_buts_scale;
break;
case CMP_NODE_CHANNEL_MATTE:
- ntype->butfunc= node_composit_buts_channel_matte;
+ ntype->uifunc= node_composit_buts_channel_matte;
break;
case CMP_NODE_LUMA_MATTE:
- ntype->butfunc= node_composit_buts_luma_matte;
+ ntype->uifunc= node_composit_buts_luma_matte;
break;
case CMP_NODE_MAP_UV:
- ntype->butfunc= node_composit_buts_map_uv;
+ ntype->uifunc= node_composit_buts_map_uv;
break;
case CMP_NODE_ID_MASK:
- ntype->butfunc= node_composit_buts_id_mask;
+ ntype->uifunc= node_composit_buts_id_mask;
break;
case CMP_NODE_MATH:
- ntype->butfunc= node_buts_math;
+ ntype->uifunc= node_buts_math;
break;
case CMP_NODE_INVERT:
- ntype->butfunc= node_composit_buts_invert;
+ ntype->uifunc= node_composit_buts_invert;
break;
case CMP_NODE_PREMULKEY:
- ntype->butfunc= node_composit_buts_premulkey;
+ ntype->uifunc= node_composit_buts_premulkey;
break;
case CMP_NODE_VIEW_LEVELS:
- ntype->butfunc=node_composit_buts_view_levels;
+ ntype->uifunc=node_composit_buts_view_levels;
break;
default:
- ntype->butfunc= NULL;
+ ntype->uifunc= NULL;
}
}
/* ****************** BUTTON CALLBACKS FOR TEXTURE NODES ***************** */
-static int node_texture_buts_bricks(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_texture_buts_bricks(uiLayout *layout, PointerRNA *ptr)
{
- if(block) {
- short w = butr->xmax-butr->xmin;
- short ofw = 32;
-
- uiBlockBeginAlign(block);
-
- /* Offset */
- uiDefButF(
- block, NUM, B_NODE_EXEC, "Offset",
- butr->xmin, butr->ymin+20, w-ofw, 20,
- &node->custom3,
- 0, 1, 0.25, 2,
- "Offset amount" );
- uiDefButS(
- block, NUM, B_NODE_EXEC, "",
- butr->xmin+w-ofw, butr->ymin+20, ofw, 20,
- &node->custom1,
- 2, 99, 0, 0,
- "Offset every N rows" );
-
- /* Squash */
- uiDefButF(
- block, NUM, B_NODE_EXEC, "Squash",
- butr->xmin, butr->ymin+0, w-ofw, 20,
- &node->custom4,
- 0, 99, 0.25, 2,
- "Stretch amount" );
- uiDefButS(
- block, NUM, B_NODE_EXEC, "",
- butr->xmin+w-ofw, butr->ymin+0, ofw, 20,
- &node->custom2,
- 2, 99, 0, 0,
- "Stretch every N rows" );
-
- uiBlockEndAlign(block);
- }
- return 40;
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+ short w = butr->xmax-butr->xmin;
+ short ofw = 32;
+
+ uiBlockBeginAlign(block);
+
+ /* Offset */
+ uiDefButF(
+ block, NUM, B_NODE_EXEC, "Offset",
+ butr->xmin, butr->ymin+20, w-ofw, 20,
+ &node->custom3,
+ 0, 1, 0.25, 2,
+ "Offset amount" );
+ uiDefButS(
+ block, NUM, B_NODE_EXEC, "",
+ butr->xmin+w-ofw, butr->ymin+20, ofw, 20,
+ &node->custom1,
+ 2, 99, 0, 0,
+ "Offset every N rows" );
+
+ /* Squash */
+ uiDefButF(
+ block, NUM, B_NODE_EXEC, "Squash",
+ butr->xmin, butr->ymin+0, w-ofw, 20,
+ &node->custom4,
+ 0, 99, 0.25, 2,
+ "Stretch amount" );
+ uiDefButS(
+ block, NUM, B_NODE_EXEC, "",
+ butr->xmin+w-ofw, butr->ymin+0, ofw, 20,
+ &node->custom2,
+ 2, 99, 0, 0,
+ "Stretch every N rows" );
+
+ uiBlockEndAlign(block);
}
/* Copied from buttons_shading.c -- needs unifying */
@@ -2206,208 +1846,196 @@ static char* noisebasis_menu()
return nbmenu;
}
-static int node_texture_buts_proc(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_texture_buts_proc(uiLayout *layout, PointerRNA *ptr)
{
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
Tex *tex = (Tex *)node->storage;
short x,y,w,h;
- if( block ) {
- x = butr->xmin;
- y = butr->ymin;
- w = butr->xmax - x;
- h = butr->ymax - y;
- }
- else
- return 0;
+ x = butr->xmin;
+ y = butr->ymin;
+ w = butr->xmax - x;
+ h = butr->ymax - y;
switch( tex->type ) {
case TEX_BLEND:
- if( block ) {
- uiBlockBeginAlign( block );
- uiDefButS( block, MENU, B_NODE_EXEC,
- "Linear %x0|Quad %x1|Ease %x2|Diag %x3|Sphere %x4|Halo %x5|Radial %x6",
- x, y+20, w, 20, &tex->stype, 0, 1, 0, 0, "Blend Type" );
- uiDefButBitS(block, TOG, TEX_FLIPBLEND, B_NODE_EXEC, "Flip XY", x, y, w, 20,
- &tex->flag, 0, 0, 0, 0, "Flips the direction of the progression 90 degrees");
- uiBlockEndAlign( block );
- }
- return 40;
-
+ uiBlockBeginAlign( block );
+ uiDefButS( block, MENU, B_NODE_EXEC,
+ "Linear %x0|Quad %x1|Ease %x2|Diag %x3|Sphere %x4|Halo %x5|Radial %x6",
+ x, y+20, w, 20, &tex->stype, 0, 1, 0, 0, "Blend Type" );
+ uiDefButBitS(block, TOG, TEX_FLIPBLEND, B_NODE_EXEC, "Flip XY", x, y, w, 20,
+ &tex->flag, 0, 0, 0, 0, "Flips the direction of the progression 90 degrees");
+ uiBlockEndAlign( block );
+ break;
case TEX_MARBLE:
- if( block ) {
- uiBlockBeginAlign(block);
+ uiBlockBeginAlign(block);
+
+ uiDefButS(block, ROW, B_NODE_EXEC, "Soft", 0*w/3+x, 40+y, w/3, 18, &tex->stype, 2.0, (float)TEX_SOFT, 0, 0, "Uses soft marble");
+ uiDefButS(block, ROW, B_NODE_EXEC, "Sharp", 1*w/3+x, 40+y, w/3, 18, &tex->stype, 2.0, (float)TEX_SHARP, 0, 0, "Uses more clearly defined marble");
+ uiDefButS(block, ROW, B_NODE_EXEC, "Sharper", 2*w/3+x, 40+y, w/3, 18, &tex->stype, 2.0, (float)TEX_SHARPER, 0, 0, "Uses very clearly defined marble");
- uiDefButS(block, ROW, B_NODE_EXEC, "Soft", 0*w/3+x, 40+y, w/3, 18, &tex->stype, 2.0, (float)TEX_SOFT, 0, 0, "Uses soft marble");
- uiDefButS(block, ROW, B_NODE_EXEC, "Sharp", 1*w/3+x, 40+y, w/3, 18, &tex->stype, 2.0, (float)TEX_SHARP, 0, 0, "Uses more clearly defined marble");
- uiDefButS(block, ROW, B_NODE_EXEC, "Sharper", 2*w/3+x, 40+y, w/3, 18, &tex->stype, 2.0, (float)TEX_SHARPER, 0, 0, "Uses very clearly defined marble");
-
- uiDefButS(block, ROW, B_NODE_EXEC, "Soft noise", 0*w/2+x, 20+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISESOFT, 0, 0, "Generates soft noise");
- uiDefButS(block, ROW, B_NODE_EXEC, "Hard noise", 1*w/2+x, 20+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISEPERL, 0, 0, "Generates hard noise");
-
- uiDefButS(block, ROW, B_NODE_EXEC, "Sin", 0*w/3+x, 0+y, w/3, 18, &tex->noisebasis2, 8.0, 0.0, 0, 0, "Uses a sine wave to produce bands.");
- uiDefButS(block, ROW, B_NODE_EXEC, "Saw", 1*w/3+x, 0+y, w/3, 18, &tex->noisebasis2, 8.0, 1.0, 0, 0, "Uses a saw wave to produce bands");
- uiDefButS(block, ROW, B_NODE_EXEC, "Tri", 2*w/3+x, 0+y, w/3, 18, &tex->noisebasis2, 8.0, 2.0, 0, 0, "Uses a triangle wave to produce bands");
-
- uiBlockEndAlign(block);
- }
- return 60;
+ uiDefButS(block, ROW, B_NODE_EXEC, "Soft noise", 0*w/2+x, 20+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISESOFT, 0, 0, "Generates soft noise");
+ uiDefButS(block, ROW, B_NODE_EXEC, "Hard noise", 1*w/2+x, 20+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISEPERL, 0, 0, "Generates hard noise");
+
+ uiDefButS(block, ROW, B_NODE_EXEC, "Sin", 0*w/3+x, 0+y, w/3, 18, &tex->noisebasis2, 8.0, 0.0, 0, 0, "Uses a sine wave to produce bands.");
+ uiDefButS(block, ROW, B_NODE_EXEC, "Saw", 1*w/3+x, 0+y, w/3, 18, &tex->noisebasis2, 8.0, 1.0, 0, 0, "Uses a saw wave to produce bands");
+ uiDefButS(block, ROW, B_NODE_EXEC, "Tri", 2*w/3+x, 0+y, w/3, 18, &tex->noisebasis2, 8.0, 2.0, 0, 0, "Uses a triangle wave to produce bands");
+
+ uiBlockEndAlign(block);
+ break;
case TEX_WOOD:
- if( block ) {
- uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y+64, w, 18, &tex->noisebasis, 0,0,0,0, "Sets the noise basis used for turbulence");
-
- uiBlockBeginAlign(block);
- uiDefButS(block, ROW, B_TEXPRV, "Bands", x, 40+y, w/2, 18, &tex->stype, 2.0, (float)TEX_BANDNOISE, 0, 0, "Uses standard noise");
- uiDefButS(block, ROW, B_TEXPRV, "Rings", w/2+x, 40+y, w/2, 18, &tex->stype, 2.0, (float)TEX_RINGNOISE, 0, 0, "Lets Noise return RGB value");
-
- uiDefButS(block, ROW, B_NODE_EXEC, "Sin", 0*w/3+x, 20+y, w/3, 18, &tex->noisebasis2, 8.0, (float)TEX_SIN, 0, 0, "Uses a sine wave to produce bands.");
- uiDefButS(block, ROW, B_NODE_EXEC, "Saw", 1*w/3+x, 20+y, w/3, 18, &tex->noisebasis2, 8.0, (float)TEX_SAW, 0, 0, "Uses a saw wave to produce bands");
- uiDefButS(block, ROW, B_NODE_EXEC, "Tri", 2*w/3+x, 20+y, w/3, 18, &tex->noisebasis2, 8.0, (float)TEX_TRI, 0, 0, "Uses a triangle wave to produce bands");
-
- uiDefButS(block, ROW, B_NODE_EXEC, "Soft noise", 0*w/2+x, 0+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISESOFT, 0, 0, "Generates soft noise");
- uiDefButS(block, ROW, B_NODE_EXEC, "Hard noise", 1*w/2+x, 0+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISEPERL, 0, 0, "Generates hard noise");
- uiBlockEndAlign(block);
- }
- return 80;
+ uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y+64, w, 18, &tex->noisebasis, 0,0,0,0, "Sets the noise basis used for turbulence");
+
+ uiBlockBeginAlign(block);
+ uiDefButS(block, ROW, B_TEXPRV, "Bands", x, 40+y, w/2, 18, &tex->stype, 2.0, (float)TEX_BANDNOISE, 0, 0, "Uses standard noise");
+ uiDefButS(block, ROW, B_TEXPRV, "Rings", w/2+x, 40+y, w/2, 18, &tex->stype, 2.0, (float)TEX_RINGNOISE, 0, 0, "Lets Noise return RGB value");
+
+ uiDefButS(block, ROW, B_NODE_EXEC, "Sin", 0*w/3+x, 20+y, w/3, 18, &tex->noisebasis2, 8.0, (float)TEX_SIN, 0, 0, "Uses a sine wave to produce bands.");
+ uiDefButS(block, ROW, B_NODE_EXEC, "Saw", 1*w/3+x, 20+y, w/3, 18, &tex->noisebasis2, 8.0, (float)TEX_SAW, 0, 0, "Uses a saw wave to produce bands");
+ uiDefButS(block, ROW, B_NODE_EXEC, "Tri", 2*w/3+x, 20+y, w/3, 18, &tex->noisebasis2, 8.0, (float)TEX_TRI, 0, 0, "Uses a triangle wave to produce bands");
+
+ uiDefButS(block, ROW, B_NODE_EXEC, "Soft noise", 0*w/2+x, 0+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISESOFT, 0, 0, "Generates soft noise");
+ uiDefButS(block, ROW, B_NODE_EXEC, "Hard noise", 1*w/2+x, 0+y, w/2, 19, &tex->noisetype, 12.0, (float)TEX_NOISEPERL, 0, 0, "Generates hard noise");
+ uiBlockEndAlign(block);
+ break;
case TEX_CLOUDS:
- if( block ) {
- uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y+60, w, 18, &tex->noisebasis, 0,0,0,0, "Sets the noise basis used for turbulence");
-
- uiBlockBeginAlign(block);
- uiDefButS(block, ROW, B_TEXPRV, "B/W", x, y+38, w/2, 18, &tex->stype, 2.0, (float)TEX_DEFAULT, 0, 0, "Uses standard noise");
- uiDefButS(block, ROW, B_TEXPRV, "Color", w/2+x, y+38, w/2, 18, &tex->stype, 2.0, (float)TEX_COLOR, 0, 0, "Lets Noise return RGB value");
- uiDefButS(block, ROW, B_TEXPRV, "Soft", x, y+20, w/2, 18, &tex->noisetype, 12.0, (float)TEX_NOISESOFT, 0, 0, "Generates soft noise");
- uiDefButS(block, ROW, B_TEXPRV, "Hard", w/2+x, y+20, w/2, 18, &tex->noisetype, 12.0, (float)TEX_NOISEPERL, 0, 0, "Generates hard noise");
- uiBlockEndAlign(block);
-
- uiDefButS(block, NUM, B_TEXPRV, "Depth:", x, y, w, 18, &tex->noisedepth, 0.0, 6.0, 0, 0, "Sets the depth of the cloud calculation");
- }
- return 80;
+ uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y+60, w, 18, &tex->noisebasis, 0,0,0,0, "Sets the noise basis used for turbulence");
+
+ uiBlockBeginAlign(block);
+ uiDefButS(block, ROW, B_TEXPRV, "B/W", x, y+38, w/2, 18, &tex->stype, 2.0, (float)TEX_DEFAULT, 0, 0, "Uses standard noise");
+ uiDefButS(block, ROW, B_TEXPRV, "Color", w/2+x, y+38, w/2, 18, &tex->stype, 2.0, (float)TEX_COLOR, 0, 0, "Lets Noise return RGB value");
+ uiDefButS(block, ROW, B_TEXPRV, "Soft", x, y+20, w/2, 18, &tex->noisetype, 12.0, (float)TEX_NOISESOFT, 0, 0, "Generates soft noise");
+ uiDefButS(block, ROW, B_TEXPRV, "Hard", w/2+x, y+20, w/2, 18, &tex->noisetype, 12.0, (float)TEX_NOISEPERL, 0, 0, "Generates hard noise");
+ uiBlockEndAlign(block);
+
+ uiDefButS(block, NUM, B_TEXPRV, "Depth:", x, y, w, 18, &tex->noisedepth, 0.0, 6.0, 0, 0, "Sets the depth of the cloud calculation");
+ break;
case TEX_DISTNOISE:
- if( block ) {
- uiBlockBeginAlign(block);
- uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y+18, w, 18, &tex->noisebasis2, 0,0,0,0, "Sets the noise basis to distort");
- uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y, w, 18, &tex->noisebasis, 0,0,0,0, "Sets the noise basis which does the distortion");
- uiBlockEndAlign(block);
- }
- return 36;
+ uiBlockBeginAlign(block);
+ uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y+18, w, 18, &tex->noisebasis2, 0,0,0,0, "Sets the noise basis to distort");
+ uiDefButS(block, MENU, B_TEXPRV, noisebasis_menu(), x, y, w, 18, &tex->noisebasis, 0,0,0,0, "Sets the noise basis which does the distortion");
+ uiBlockEndAlign(block);
+ break;
}
- return 0;
}
-static int node_texture_buts_image(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_texture_buts_image(uiLayout *layout, PointerRNA *ptr)
{
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ bNodeTree *ntree= ptr->id.data;
+ rctf *butr= &node->butr;
char *strp;
uiBut *bt;
+
+ uiBlockBeginAlign(block);
- if( block ) {
- uiBlockBeginAlign(block);
-
- /* browse button */
- IMAnames_to_pupstring(&strp, NULL, "LOAD NEW %x32767", &(G.main->image), NULL, NULL);
- node->menunr= 0;
- bt= uiDefButS(block, MENU, B_NOP, strp,
- butr->xmin, butr->ymin, 19, 19,
- &node->menunr, 0, 0, 0, 0, "Browses existing choices");
- uiButSetFunc(bt, node_browse_image_cb, ntree, node);
- if(strp) MEM_freeN(strp);
+ /* browse button */
+ IMAnames_to_pupstring(&strp, NULL, "LOAD NEW %x32767", &(G.main->image), NULL, NULL);
+ node->menunr= 0;
+ bt= uiDefButS(block, MENU, B_NOP, strp,
+ butr->xmin, butr->ymin, 19, 19,
+ &node->menunr, 0, 0, 0, 0, "Browses existing choices");
+ uiButSetFunc(bt, node_browse_image_cb, ntree, node);
+ if(strp) MEM_freeN(strp);
+
+ /* Add New button */
+ if(node->id==NULL) {
+ bt= uiDefBut(block, BUT, B_NODE_LOADIMAGE, "Load New",
+ butr->xmin+19, butr->ymin, (short)(butr->xmax-butr->xmin-19.0f), 19,
+ NULL, 0.0, 0.0, 0, 0, "Add new Image");
+ uiButSetFunc(bt, node_active_cb, ntree, node);
+ }
+ else {
+ /* name button */
+ short xmin= (short)butr->xmin, xmax= (short)butr->xmax;
+ short width= xmax - xmin - 19;
- /* Add New button */
- if(node->id==NULL) {
- bt= uiDefBut(block, BUT, B_NODE_LOADIMAGE, "Load New",
- butr->xmin+19, butr->ymin, (short)(butr->xmax-butr->xmin-19.0f), 19,
- NULL, 0.0, 0.0, 0, 0, "Add new Image");
- uiButSetFunc(bt, node_active_cb, ntree, node);
- }
- else {
- /* name button */
- short xmin= (short)butr->xmin, xmax= (short)butr->xmax;
- short width= xmax - xmin - 19;
-
- bt= uiDefBut(block, TEX, B_NOP, "IM:",
- xmin+19, butr->ymin, width, 19,
- node->id->name+2, 0.0, 19.0, 0, 0, "Image name");
- uiButSetFunc(bt, node_ID_title_cb, node, NULL);
- }
+ bt= uiDefBut(block, TEX, B_NOP, "IM:",
+ xmin+19, butr->ymin, width, 19,
+ node->id->name+2, 0.0, 19.0, 0, 0, "Image name");
+ uiButSetFunc(bt, node_ID_title_cb, node, NULL);
}
- return 20;
}
-static int node_texture_buts_output(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
+static void node_texture_buts_output(uiLayout *layout, PointerRNA *ptr)
{
- if( block ) {
- uiBut *bt;
- short width;
- char *name = ((TexNodeOutput*)node->storage)->name;
-
- uiBlockBeginAlign(block);
-
- width = (short)(butr->xmax - butr->xmin);
-
- bt = uiDefBut(
- block, TEX, B_NOP,
- "Name:",
- butr->xmin, butr->ymin,
- width, 19,
- name, 0, 31,
- 0, 0,
- "Name this output"
- );
-
- uiBlockEndAlign(block);
- }
- return 19;
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
+ bNode *node= ptr->data;
+ rctf *butr= &node->butr;
+ uiBut *bt;
+ short width;
+ char *name = ((TexNodeOutput*)node->storage)->name;
+
+ uiBlockBeginAlign(block);
+
+ width = (short)(butr->xmax - butr->xmin);
+
+ bt = uiDefBut(
+ block, TEX, B_NOP,
+ "Name:",
+ butr->xmin, butr->ymin,
+ width, 19,
+ name, 0, 31,
+ 0, 0,
+ "Name this output"
+ );
+
+ uiBlockEndAlign(block);
}
/* only once called */
static void node_texture_set_butfunc(bNodeType *ntype)
{
if( ntype->type >= TEX_NODE_PROC && ntype->type < TEX_NODE_PROC_MAX ) {
- ntype->butfunc = node_texture_buts_proc;
+ ntype->uifunc = node_texture_buts_proc;
}
else switch(ntype->type) {
case TEX_NODE_MATH:
- ntype->butfunc = node_buts_math;
+ ntype->uifunc = node_buts_math;
break;
case TEX_NODE_MIX_RGB:
- ntype->butfunc = node_buts_mix_rgb;
+ ntype->uifunc = node_buts_mix_rgb;
break;
case TEX_NODE_VALTORGB:
- ntype->butfunc = node_buts_valtorgb;
+ ntype->uifunc = node_buts_valtorgb;
break;
case TEX_NODE_CURVE_RGB:
- ntype->butfunc= node_buts_curvecol;
+ ntype->uifunc= node_buts_curvecol;
break;
case TEX_NODE_CURVE_TIME:
- ntype->butfunc = node_buts_time;
+ ntype->uifunc = node_buts_time;
break;
case TEX_NODE_TEXTURE:
- ntype->butfunc = node_buts_texture;
+ ntype->uifunc = node_buts_texture;
break;
case TEX_NODE_BRICKS:
- ntype->butfunc = node_texture_buts_bricks;
+ ntype->uifunc = node_texture_buts_bricks;
break;
case TEX_NODE_IMAGE:
- ntype->butfunc = node_texture_buts_image;
+ ntype->uifunc = node_texture_buts_image;
break;
case TEX_NODE_OUTPUT:
- ntype->butfunc = node_texture_buts_output;
+ ntype->uifunc = node_texture_buts_output;
break;
default:
- ntype->butfunc= NULL;
+ ntype->uifunc= NULL;
}
}
@@ -2479,12 +2107,13 @@ void node_rename_but(char *s)
#endif
-void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode)
+void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage)
{
if((snode->flag & SNODE_BACKDRAW) && snode->treetype==NTREE_COMPOSIT) {
Image *ima= BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
- ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
+ void *lock;
+ ImBuf *ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock);
if(ibuf) {
float x, y;
@@ -2499,13 +2128,21 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode)
x = (ar->winx-ibuf->x)/2 + snode->xof;
y = (ar->winy-ibuf->y)/2 + snode->yof;
+ if(!ibuf->rect) {
+ if(color_manage)
+ ibuf->profile= IB_PROFILE_SRGB;
+ else
+ ibuf->profile = IB_PROFILE_NONE;
+ IMB_rect_from_float(ibuf);
+ }
+
if(ibuf->rect)
glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
- else if(ibuf->channels==4)
- glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_FLOAT, ibuf->rect_float);
wmPopMatrix();
}
+
+ BKE_image_release_ibuf(ima, lock);
}
}
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index a872413b4e1..26601958c8a 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -48,11 +48,13 @@
#include "DNA_text_types.h"
#include "DNA_userdef_types.h"
-#include "BLI_blenlib.h"
#include "BLI_arithb.h"
+#include "BLI_blenlib.h"
+#include "BLI_threads.h"
#include "MEM_guardedalloc.h"
#include "BKE_context.h"
+#include "BKE_depsgraph.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_library.h"
@@ -81,6 +83,8 @@
#include "UI_resources.h"
#include "UI_view2d.h"
+#include "RNA_access.h"
+
#include "CMP_node.h"
#include "SHD_node.h"
@@ -91,6 +95,55 @@ extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select);
extern void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad);
extern void ui_draw_tria_icon(float x, float y, float aspect, char dir);
+void ED_node_changed_update(ID *id, bNode *node)
+{
+ bNodeTree *nodetree, *edittree;
+ int treetype;
+
+ node_tree_from_ID(id, &nodetree, &edittree, &treetype);
+
+ if(treetype==NTREE_SHADER) {
+ DAG_id_flush_update(id, 0);
+ WM_main_add_notifier(NC_MATERIAL|ND_SHADING, id);
+ }
+ else if(treetype==NTREE_COMPOSIT) {
+ NodeTagChanged(edittree, node);
+ /* don't use NodeTagIDChanged, it gives far too many recomposites for image, scene layers, ... */
+
+ /* not the best implementation of the world... but we need it to work now :) */
+ if(node->type==CMP_NODE_R_LAYERS && node->custom2) {
+ /* add event for this window (after render curarea can be changed) */
+ //addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC);
+
+ //composite_node_render(snode, node);
+ //snode_handle_recalc(snode);
+
+ /* add another event, a render can go fullscreen and open new window */
+ //addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC);
+ }
+ else {
+ node= node_tree_get_editgroup(nodetree);
+ if(node)
+ NodeTagIDChanged(nodetree, node->id);
+ }
+
+ WM_main_add_notifier(NC_SCENE|ND_NODES, id);
+ }
+ else if(treetype==NTREE_TEXTURE) {
+ DAG_id_flush_update(id, 0);
+ WM_main_add_notifier(NC_TEXTURE|ND_NODES, id);
+ }
+}
+
+static void do_node_internal_buttons(bContext *C, void *node_v, int event)
+{
+ if(event==B_NODE_EXEC) {
+ SpaceNode *snode= CTX_wm_space_node(C);
+ if(snode && snode->id)
+ ED_node_changed_update(snode->id, node_v);
+ }
+}
+
static void node_scaling_widget(int color_id, float aspect, float xmin, float ymin, float xmax, float ymax)
{
@@ -110,10 +163,14 @@ static void node_scaling_widget(int color_id, float aspect, float xmin, float ym
}
/* based on settings in node, sets drawing rect info. each redraw! */
-static void node_update(bNode *node)
+static void node_update(const bContext *C, bNodeTree *ntree, bNode *node)
{
+ uiLayout *layout;
+ PointerRNA ptr;
bNodeSocket *nsock;
float dy= node->locy;
+ int buty;
+ char str[32];
/* header */
dy-= NODE_DY;
@@ -121,7 +178,7 @@ static void node_update(bNode *node)
/* little bit space in top */
if(node->outputs.first)
dy-= NODE_DYS/2;
-
+
/* output sockets */
for(nsock= node->outputs.first; nsock; nsock= nsock->next) {
if(!(nsock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) {
@@ -130,13 +187,15 @@ static void node_update(bNode *node)
dy-= NODE_DY;
}
}
-
- node->prvr.xmin= node->butr.xmin= node->locx + NODE_DYS;
- node->prvr.xmax= node->butr.xmax= node->locx + node->width- NODE_DYS;
+
+ node->prvr.xmin= node->locx + NODE_DYS;
+ node->prvr.xmax= node->locx + node->width- NODE_DYS;
/* preview rect? */
if(node->flag & NODE_PREVIEW) {
/* only recalculate size when there's a preview actually, otherwise we use stored result */
+ BLI_lock_thread(LOCK_PREVIEW);
+
if(node->preview && node->preview->rect) {
float aspect= 1.0f;
@@ -172,20 +231,41 @@ static void node_update(bNode *node)
node->prvr.ymin= dy - oldh;
dy= node->prvr.ymin - NODE_DYS/2;
}
+
+ BLI_unlock_thread(LOCK_PREVIEW);
}
/* XXX ugly hack, typeinfo for group is generated */
if(node->type == NODE_GROUP)
- ; // XXX node->typeinfo->butfunc= node_buts_group;
+ ; // XXX node->typeinfo->uifunc= node_buts_group;
+
+ /* ui block */
+ sprintf(str, "node buttons %p", node);
+ node->block= uiBeginBlock(C, CTX_wm_region(C), str, UI_EMBOSS);
+ uiBlockSetHandleFunc(node->block, do_node_internal_buttons, node);
/* buttons rect? */
- if((node->flag & NODE_OPTIONS) && node->typeinfo->butfunc) {
+ if((node->flag & NODE_OPTIONS) && node->typeinfo->uifunc) {
dy-= NODE_DYS/2;
- node->butr.ymax= dy;
- node->butr.ymin= dy - (float)node->typeinfo->butfunc(NULL, NULL, node, NULL);
- dy= node->butr.ymin - NODE_DYS/2;
+
+ /* set this for uifunc() that don't use layout engine yet */
+ node->butr.xmin= 0;
+ node->butr.xmax= node->width - 2*NODE_DYS;
+ node->butr.ymin= 0;
+ node->butr.ymax= 0;
+
+ RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr);
+
+ layout= uiBlockLayout(node->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL,
+ node->locx+NODE_DYS, dy, node->butr.xmax, 20, U.uistyles.first);
+
+ node->typeinfo->uifunc(layout, &ptr);
+ uiBlockEndAlign(node->block);
+ uiBlockLayoutResolve(node->block, NULL, &buty);
+
+ dy= buty - NODE_DYS/2;
}
-
+
/* input sockets */
for(nsock= node->inputs.first; nsock; nsock= nsock->next) {
if(!(nsock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) {
@@ -198,7 +278,7 @@ static void node_update(bNode *node)
/* little bit space in end */
if(node->inputs.first || (node->flag & (NODE_OPTIONS|NODE_PREVIEW))==0 )
dy-= NODE_DYS/2;
-
+
node->totr.xmin= node->locx;
node->totr.xmax= node->locx + node->width;
node->totr.ymax= node->locy;
@@ -206,11 +286,12 @@ static void node_update(bNode *node)
}
/* based on settings in node, sets drawing rect info. each redraw! */
-static void node_update_hidden(bNode *node)
+static void node_update_hidden(const bContext *C, bNode *node)
{
bNodeSocket *nsock;
float rad, drad, hiddenrad= HIDDEN_RAD;
int totin=0, totout=0, tot;
+ char str[32];
/* calculate minimal radius */
for(nsock= node->inputs.first; nsock; nsock= nsock->next)
@@ -251,6 +332,11 @@ static void node_update_hidden(bNode *node)
rad+= drad;
}
}
+
+ /* ui block */
+ sprintf(str, "node buttons %p", node);
+ node->block= uiBeginBlock(C, CTX_wm_region(C), str, UI_EMBOSS);
+ uiBlockSetHandleFunc(node->block, do_node_internal_buttons, node);
}
static int node_get_colorid(bNode *node)
@@ -275,7 +361,7 @@ static int node_get_colorid(bNode *node)
/* based on settings in node, sets drawing rect info. each redraw! */
/* note: this assumes only 1 group at a time is drawn (linked data) */
/* in node->totr the entire boundbox for the group is stored */
-static void node_update_group(bNode *gnode)
+static void node_update_group(const bContext *C, bNodeTree *ntree, bNode *gnode)
{
bNodeTree *ngroup= (bNodeTree *)gnode->id;
bNode *node;
@@ -288,9 +374,9 @@ static void node_update_group(bNode *gnode)
node->locx+= gnode->locx;
node->locy+= gnode->locy;
if(node->flag & NODE_HIDDEN)
- node_update_hidden(node);
+ node_update_hidden(C, node);
else
- node_update(node);
+ node_update(C, ntree, node);
node->locx-= gnode->locx;
node->locy-= gnode->locy;
}
@@ -492,6 +578,7 @@ static uiBlock *socket_vector_menu(bContext *C, ARegion *ar, void *socket_v)
}
block= uiBeginBlock(C, ar, "socket menu", UI_EMBOSS);
+ uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN);
/* use this for a fake extra empy space around the buttons */
uiDefBut(block, LABEL, 0, "", -4, -4, 188, 68, NULL, 0, 0, 0, 0, "");
@@ -564,7 +651,7 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv)
glBlendFunc( GL_ONE, GL_ONE_MINUS_SRC_ALPHA ); /* premul graphics */
glColor4f(1.0, 1.0, 1.0, 1.0);
- glaDrawPixelsTex(prv->xmin, prv->ymin, preview->xsize, preview->ysize, GL_FLOAT, preview->rect);
+ glaDrawPixelsTex(prv->xmin, prv->ymin, preview->xsize, preview->ysize, GL_UNSIGNED_BYTE, preview->rect);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
glDisable(GL_BLEND);
@@ -575,61 +662,15 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv)
}
-static void do_node_internal_buttons(bContext *C, void *node_v, int event)
-{
- SpaceNode *snode= CTX_wm_space_node(C);
-
- if(event==B_NODE_EXEC) {
- if(snode->treetype==NTREE_SHADER) {
- WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING, snode->id);
- }
- else if(snode->treetype==NTREE_COMPOSIT) {
- bNode *node= node_v;
-
- NodeTagChanged(snode->edittree, node);
- /* don't use NodeTagIDChanged, it gives far too many recomposites for image, scene layers, ... */
-
- /* not the best implementation of the world... but we need it to work now :) */
- if(node->type==CMP_NODE_R_LAYERS && node->custom2) {
- /* add event for this window (after render curarea can be changed) */
- //addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC);
-
- //composite_node_render(snode, node);
- //snode_handle_recalc(snode);
-
- /* add another event, a render can go fullscreen and open new window */
- //addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC);
- }
- else {
- node= node_tree_get_editgroup(snode->nodetree);
- if(node)
- NodeTagIDChanged(snode->nodetree, node->id);
- }
- WM_event_add_notifier(C, NC_SCENE|ND_NODES, CTX_data_scene(C));
- }
- else if(snode->treetype==NTREE_TEXTURE) {
- WM_event_add_notifier(C, NC_TEXTURE|ND_NODES, snode->id);
- }
- }
-
-}
-
static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bNode *node)
{
bNodeSocket *sock;
- uiBlock *block;
uiBut *bt;
rctf *rct= &node->totr;
float /*slen,*/ iconofs;
int /*ofs,*/ color_id= node_get_colorid(node);
char showname[128]; /* 128 used below */
View2D *v2d = &ar->v2d;
- char str[32];
-
- /* make unique block name, also used for handling blocks in editnode.c */
- sprintf(str, "node buttons %p", node);
- block= uiBeginBlock(C, ar, str, UI_EMBOSS);
- uiBlockSetHandleFunc(block, do_node_internal_buttons, node);
uiSetRoundBox(15-4);
ui_dropshadow(rct, BASIS_RAD, snode->aspect, node->flag & SELECT);
@@ -655,7 +696,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
icon_id= ICON_MATERIAL_DATA;
iconofs-= 18.0f;
glEnable(GL_BLEND);
- UI_icon_draw_aspect_blended(iconofs, rct->ymax-NODE_DY+2, icon_id, snode->aspect, -60);
+ UI_icon_draw_aspect(iconofs, rct->ymax-NODE_DY+2, icon_id, snode->aspect, 0.5f);
glDisable(GL_BLEND);
}
if(node->type == NODE_GROUP) {
@@ -663,21 +704,18 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
iconofs-= 18.0f;
glEnable(GL_BLEND);
if(node->id->lib) {
- glPixelTransferf(GL_GREEN_SCALE, 0.7f);
- glPixelTransferf(GL_BLUE_SCALE, 0.3f);
- UI_icon_draw_aspect(iconofs, rct->ymax-NODE_DY+2, ICON_NODE, snode->aspect);
- glPixelTransferf(GL_GREEN_SCALE, 1.0f);
- glPixelTransferf(GL_BLUE_SCALE, 1.0f);
+ float rgb[3] = {1.0f, 0.7f, 0.3f};
+ UI_icon_draw_aspect_color(iconofs, rct->ymax-NODE_DY+2, ICON_NODE, snode->aspect, rgb);
}
else {
- UI_icon_draw_aspect_blended(iconofs, rct->ymax-NODE_DY+2, ICON_NODE, snode->aspect, -60);
+ UI_icon_draw_aspect(iconofs, rct->ymax-NODE_DY+2, ICON_NODE, snode->aspect, 0.5f);
}
glDisable(GL_BLEND);
}
if(node->typeinfo->flag & NODE_OPTIONS) {
iconofs-= 18.0f;
glEnable(GL_BLEND);
- UI_icon_draw_aspect_blended(iconofs, rct->ymax-NODE_DY+2, ICON_BUTS, snode->aspect, -60);
+ UI_icon_draw_aspect(iconofs, rct->ymax-NODE_DY+2, ICON_BUTS, snode->aspect, 0.5f);
glDisable(GL_BLEND);
}
{ /* always hide/reveal unused sockets */
@@ -690,7 +728,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
else*/
shade= -90;
glEnable(GL_BLEND);
- UI_icon_draw_aspect_blended(iconofs, rct->ymax-NODE_DY+2, ICON_PLUS, snode->aspect, shade);
+ UI_icon_draw_aspect(iconofs, rct->ymax-NODE_DY+2, ICON_PLUS, snode->aspect, 0.5f);
glDisable(GL_BLEND);
}
@@ -715,7 +753,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
else
BLI_strncpy(showname, node->name, 128);
- uiDefBut(block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(rct->ymax-NODE_DY),
+ uiDefBut(node->block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(rct->ymax-NODE_DY),
(int)(iconofs - rct->xmin-18.0f), NODE_DY, NULL, 0, 0, 0, 0, "");
/* body */
@@ -743,7 +781,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
/* hurmf... another candidate for callback, have to see how this works first */
- if(node->id && block && snode->treetype==NTREE_SHADER)
+ if(node->id && node->block && snode->treetype==NTREE_SHADER)
nodeShaderSynchronizeID(node, 0);
/* socket inputs, buttons */
@@ -751,38 +789,38 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) {
socket_circle_draw(sock, NODE_SOCKSIZE);
- if(block && sock->link==NULL) {
+ if(node->block && sock->link==NULL) {
float *butpoin= sock->ns.vec;
if(sock->type==SOCK_VALUE) {
- bt= uiDefButF(block, NUM, B_NODE_EXEC, sock->name,
+ bt= uiDefButF(node->block, NUM, B_NODE_EXEC, sock->name,
(short)sock->locx+NODE_DYS, (short)(sock->locy)-9, (short)node->width-NODE_DY, 17,
butpoin, sock->ns.min, sock->ns.max, 10, 2, "");
uiButSetFunc(bt, node_sync_cb, snode, node);
}
else if(sock->type==SOCK_VECTOR) {
- uiDefBlockBut(block, socket_vector_menu, sock, sock->name,
+ uiDefBlockBut(node->block, socket_vector_menu, sock, sock->name,
(short)sock->locx+NODE_DYS, (short)sock->locy-9, (short)node->width-NODE_DY, 17,
"");
}
- else if(block && sock->type==SOCK_RGBA) {
+ else if(node->block && sock->type==SOCK_RGBA) {
short labelw= (short)node->width-NODE_DY-40, width;
if(labelw>0) width= 40; else width= (short)node->width-NODE_DY;
- bt= uiDefButF(block, COL, B_NODE_EXEC, "",
+ bt= uiDefButF(node->block, COL, B_NODE_EXEC, "",
(short)(sock->locx+NODE_DYS), (short)sock->locy-8, width, 15,
butpoin, 0, 0, 0, 0, "");
uiButSetFunc(bt, node_sync_cb, snode, node);
- if(labelw>0) uiDefBut(block, LABEL, 0, sock->name,
+ if(labelw>0) uiDefBut(node->block, LABEL, 0, sock->name,
(short)(sock->locx+NODE_DYS) + 40, (short)sock->locy-8, labelw, 15,
NULL, 0, 0, 0, 0, "");
}
}
else {
- uiDefBut(block, LABEL, 0, sock->name, (short)(sock->locx+3.0f), (short)(sock->locy-9.0f),
+ uiDefBut(node->block, LABEL, 0, sock->name, (short)(sock->locx+3.0f), (short)(sock->locy-9.0f),
(short)(node->width-NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, "");
}
}
@@ -803,43 +841,32 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
slen= snode->aspect*UI_GetStringWidth(sock->name+ofs);
}
- uiDefBut(block, LABEL, 0, sock->name+ofs, (short)(sock->locx-15.0f-slen), (short)(sock->locy-9.0f),
+ uiDefBut(node->block, LABEL, 0, sock->name+ofs, (short)(sock->locx-15.0f-slen), (short)(sock->locy-9.0f),
(short)(node->width-NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, "");
}
}
/* preview */
- if(node->flag & NODE_PREVIEW)
+ if(node->flag & NODE_PREVIEW) {
+ BLI_lock_thread(LOCK_PREVIEW);
if(node->preview && node->preview->rect)
node_draw_preview(node->preview, &node->prvr);
-
- /* buttons */
- if(node->flag & NODE_OPTIONS) {
- if(block) {
- if(node->typeinfo->butfunc) {
- node->typeinfo->butfunc(block, snode->nodetree, node, &node->butr);
- }
- }
+ BLI_unlock_thread(LOCK_PREVIEW);
}
-
- uiEndBlock(C, block);
- uiDrawBlock(C, block);
+
+ uiEndBlock(C, node->block);
+ uiDrawBlock(C, node->block);
+ node->block= NULL;
}
static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, bNode *node)
{
- uiBlock *block;
bNodeSocket *sock;
rctf *rct= &node->totr;
float dx, centy= 0.5f*(rct->ymax+rct->ymin);
float hiddenrad= 0.5f*(rct->ymax-rct->ymin);
int color_id= node_get_colorid(node);
- char str[32], showname[128]; /* 128 is used below */
-
- /* make unique block name, also used for handling blocks in editnode.c */
- sprintf(str, "node buttons %p", node);
- block= uiBeginBlock(C, ar, str, UI_EMBOSS);
- uiBlockSetHandleFunc(block, do_node_internal_buttons, node);
+ char showname[128]; /* 128 is used below */
/* shadow */
uiSetRoundBox(15);
@@ -884,7 +911,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
else
BLI_strncpy(showname, node->name, 128);
- uiDefBut(block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(centy-10),
+ uiDefBut(node->block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(centy-10),
(int)(rct->xmax - rct->xmin-18.0f -12.0f), NODE_DY, NULL, 0, 0, 0, 0, "");
}
@@ -910,9 +937,9 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
socket_circle_draw(sock, NODE_SOCKSIZE);
}
- uiEndBlock(C, block);
- uiDrawBlock(C, block);
-
+ uiEndBlock(C, node->block);
+ uiDrawBlock(C, node->block);
+ node->block= NULL;
}
static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree)
@@ -1051,6 +1078,8 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
float col[3];
View2DScrollers *scrollers;
SpaceNode *snode= CTX_wm_space_node(C);
+ Scene *scene= CTX_data_scene(C);
+ int color_manage = scene->r.color_mgt_flag & R_COLOR_MANAGEMENT;
UI_GetThemeColor3fv(TH_BACK, col);
glClearColor(col[0], col[1], col[2], 0);
@@ -1070,7 +1099,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
UI_view2d_constant_grid_draw(C, v2d);
/* backdrop */
- draw_nodespace_back_pix(ar, snode);
+ draw_nodespace_back_pix(ar, snode, color_manage);
/* nodes */
snode_set_context(snode, CTX_data_scene(C));
@@ -1081,11 +1110,11 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
/* for now, we set drawing coordinates on each redraw */
for(node= snode->nodetree->nodes.first; node; node= node->next) {
if(node->flag & NODE_GROUP_EDIT)
- node_update_group(node);
+ node_update_group(C, snode->nodetree, node);
else if(node->flag & NODE_HIDDEN)
- node_update_hidden(node);
+ node_update_hidden(C, node);
else
- node_update(node);
+ node_update(C, snode->nodetree, node);
}
node_draw_nodetree(C, ar, snode, snode->nodetree);
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 4fd6995b8fd..13421adf6e6 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -62,8 +62,6 @@
#include "BKE_scene.h"
#include "BKE_utildefines.h"
-#include "ED_previewrender.h"
-
#include "BIF_gl.h"
#include "BLI_arithb.h"
@@ -74,8 +72,10 @@
#include "IMB_imbuf_types.h"
-#include "ED_space_api.h"
+#include "ED_node.h"
+#include "ED_render.h"
#include "ED_screen.h"
+#include "ED_space_api.h"
#include "ED_transform.h"
#include "ED_types.h"
@@ -152,7 +152,7 @@ static void compo_startjob(void *cjv, short *stop, short *do_update)
{
CompoJob *cj= cjv;
bNodeTree *ntree= cj->localtree;
-
+
if(cj->scene->use_nodes==0)
return;
@@ -176,8 +176,11 @@ static void compo_startjob(void *cjv, short *stop, short *do_update)
void snode_composite_job(const bContext *C, ScrArea *sa)
{
SpaceNode *snode= sa->spacedata.first;
- wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa);
- CompoJob *cj= MEM_callocN(sizeof(CompoJob), "compo job");
+ wmJob *steve;
+ CompoJob *cj;
+
+ steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, WM_JOB_EXCL_RENDER);
+ cj= MEM_callocN(sizeof(CompoJob), "compo job");
/* customdata for preview thread */
cj->scene= CTX_data_scene(C);
@@ -578,13 +581,45 @@ void ED_node_texture_default(Tex *tx)
ntreeSolveOrder(tx->nodetree); /* needed for pointers */
}
+void node_tree_from_ID(ID *id, bNodeTree **ntree, bNodeTree **edittree, int *treetype)
+{
+ bNode *node;
+ short idtype= GS(id->name);
+
+ if(idtype == ID_MA) {
+ *ntree= ((Material*)id)->nodetree;
+ if(treetype) *treetype= NTREE_SHADER;
+ }
+ else if(idtype == ID_SCE) {
+ *ntree= ((Scene*)id)->nodetree;
+ if(treetype) *treetype= NTREE_COMPOSIT;
+ }
+ else if(idtype == ID_TE) {
+ *ntree= ((Tex*)id)->nodetree;
+ if(treetype) *treetype= NTREE_TEXTURE;
+ }
+
+ /* find editable group */
+ if(edittree) {
+ if(*ntree)
+ for(node= (*ntree)->nodes.first; node; node= node->next)
+ if(node->flag & NODE_GROUP_EDIT)
+ break;
+
+ if(node && node->id)
+ *edittree= (bNodeTree *)node->id;
+ else
+ *edittree= *ntree;
+ }
+}
+
/* Here we set the active tree(s), even called for each redraw now, so keep it fast :) */
void snode_set_context(SpaceNode *snode, Scene *scene)
{
Object *ob= OBACT;
- bNode *node= NULL;
snode->nodetree= NULL;
+ snode->edittree= NULL;
snode->id= snode->from= NULL;
if(snode->treetype==NTREE_SHADER) {
@@ -594,7 +629,6 @@ void snode_set_context(SpaceNode *snode, Scene *scene)
if(ma) {
snode->from= &ob->id;
snode->id= &ma->id;
- snode->nodetree= ma->nodetree;
}
}
}
@@ -605,15 +639,13 @@ void snode_set_context(SpaceNode *snode, Scene *scene)
/* bit clumsy but reliable way to see if we draw first time */
if(snode->nodetree==NULL)
ntreeCompositForceHidden(scene->nodetree, scene);
-
- snode->nodetree= scene->nodetree;
}
else if(snode->treetype==NTREE_TEXTURE) {
Tex *tx= NULL;
if(snode->texfrom==SNODE_TEX_OBJECT) {
if(ob) {
- tx= give_current_texture(ob, ob->actcol);
+ tx= give_current_object_texture(ob);
if(ob->type == OB_LAMP)
snode->from= (ID*)ob->data;
@@ -624,11 +656,10 @@ void snode_set_context(SpaceNode *snode, Scene *scene)
}
}
else if(snode->texfrom==SNODE_TEX_WORLD) {
- tx= give_current_world_texture(scene);
+ tx= give_current_world_texture(scene->world);
snode->from= (ID *)scene->world;
}
else {
- MTex *mtex= NULL;
Brush *brush= NULL;
if(ob && (ob->mode & OB_MODE_SCULPT))
@@ -636,31 +667,15 @@ void snode_set_context(SpaceNode *snode, Scene *scene)
else
brush= paint_brush(&scene->toolsettings->imapaint.paint);
- if(brush && brush->texact != -1)
- mtex= brush->mtex[brush->texact];
-
snode->from= (ID *)brush;
-
- if(mtex)
- tx= mtex->tex;
+ tx= give_current_brush_texture(brush);
}
- if(tx) {
- snode->id= &tx->id;
- snode->nodetree= tx->nodetree;
- }
+ snode->id= &tx->id;
}
-
- /* find editable group */
- if(snode->nodetree)
- for(node= snode->nodetree->nodes.first; node; node= node->next)
- if(node->flag & NODE_GROUP_EDIT)
- break;
-
- if(node && node->id)
- snode->edittree= (bNodeTree *)node->id;
- else
- snode->edittree= snode->nodetree;
+
+ if(snode->id)
+ node_tree_from_ID(snode->id, &snode->nodetree, &snode->edittree, NULL);
}
#if 0
@@ -688,15 +703,13 @@ static void node_active_image(Image *ima)
void node_set_active(SpaceNode *snode, bNode *node)
{
-
nodeSetActive(snode->edittree, node);
- #if 0
- // XXX
if(node->type!=NODE_GROUP) {
-
/* tree specific activate calls */
if(snode->treetype==NTREE_SHADER) {
+ // XXX
+#if 0
/* when we select a material, active texture is cleared, for buttons */
if(node->id && GS(node->id->name)==ID_MA)
@@ -706,8 +719,11 @@ void node_set_active(SpaceNode *snode, bNode *node)
// allqueue(REDRAWBUTSSHADING, 1);
// allqueue(REDRAWIPO, 0);
+#endif
}
else if(snode->treetype==NTREE_COMPOSIT) {
+ Scene *scene= (Scene*)snode->id;
+
/* make active viewer, currently only 1 supported... */
if( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) {
bNode *tnode;
@@ -728,31 +744,37 @@ void node_set_active(SpaceNode *snode, bNode *node)
if(gnode)
NodeTagIDChanged(snode->nodetree, gnode->id);
- // XXX snode_handle_recalc(snode);
+ ED_node_changed_update(snode->id, node);
}
/* addnode() doesnt link this yet... */
node->id= (ID *)BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
}
else if(node->type==CMP_NODE_IMAGE) {
+ // XXX
+#if 0
if(node->id)
node_active_image((Image *)node->id);
+#endif
}
else if(node->type==CMP_NODE_R_LAYERS) {
- if(node->id==NULL || node->id==(ID *)G.scene) {
- G.scene->r.actlay= node->custom1;
+ if(node->id==NULL || node->id==(ID *)scene) {
+ scene->r.actlay= node->custom1;
+ // XXX
// allqueue(REDRAWBUTSSCENE, 0);
}
}
}
else if(snode->treetype==NTREE_TEXTURE) {
+ // XXX
+#if 0
if(node->id)
; // XXX BIF_preview_changed(-1);
// allqueue(REDRAWBUTSSHADING, 1);
// allqueue(REDRAWIPO, 0);
+#endif
}
}
- #endif /* 0 */
}
/* ***************** Edit Group operator ************* */
@@ -1216,7 +1238,7 @@ static int node_resize_invoke(bContext *C, wmOperator *op, wmEvent *event)
nsw->oldwidth= node->width;
/* add modal handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -2033,7 +2055,7 @@ static int node_link_invoke(bContext *C, wmOperator *op, wmEvent *event)
nldrag->link= nodeAddLink(snode->edittree, NULL, NULL, nldrag->node, nldrag->sock);
/* add modal handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c
index 2abcd2f2135..a0eae40f579 100644
--- a/source/blender/editors/space_node/node_header.c
+++ b/source/blender/editors/space_node/node_header.c
@@ -199,7 +199,7 @@ void node_menus_register(ARegionType *art)
strcpy(mt->idname, "NODE_MT_add");
strcpy(mt->label, "Add");
mt->draw= node_menu_add;
- BLI_addtail(&art->menutypes, mt);
+ WM_menutype_add(mt);
}
#if 0
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 2a929472c68..f55ecf1d0f4 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -53,7 +53,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d);
/* node_ops.c */
void node_operatortypes(void);
-void node_keymap(wmWindowManager *wm);
+void node_keymap(wmKeyConfig *keyconf);
/* node_select.c */
void NODE_OT_select(struct wmOperatorType *ot);
@@ -69,9 +69,10 @@ void NODE_OT_select_border(struct wmOperatorType *ot);
void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link);
void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int th_col2, int do_shaded);
int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, float coord_array[][2], int resol);
-void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode);
+void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage);
/* node_edit.c */
+void node_tree_from_ID(ID *id, bNodeTree **ntree, bNodeTree **edittree, int *treetype);
void snode_handle_recalc(bContext *C, SpaceNode *snode);
bNode *next_node(bNodeTree *ntree);
bNode *node_add_node(SpaceNode *snode, Scene *scene, int type, float locx, float locy);
diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c
index 4c2fbf7b9dc..443b83a91bc 100644
--- a/source/blender/editors/space_node/node_ops.c
+++ b/source/blender/editors/space_node/node_ops.c
@@ -67,9 +67,10 @@ void node_operatortypes(void)
WM_operatortype_append(NODE_OT_group_edit);
}
-void node_keymap(struct wmWindowManager *wm)
+void node_keymap(struct wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Node", SPACE_NODE, 0);
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "Node", SPACE_NODE, 0);
+ wmKeyMapItem *kmi;
/* mouse select in nodes used to be both keys, it's UI elements... */
RNA_enum_set(WM_keymap_add_item(keymap, "NODE_OT_select", ACTIONMOUSE, KM_PRESS, 0, 0)->ptr, "select_type", NODE_SELECT_MOUSE);
@@ -97,5 +98,8 @@ void node_keymap(struct wmWindowManager *wm)
WM_keymap_add_item(keymap, "NODE_OT_group_ungroup", GKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "NODE_OT_group_edit", TABKEY, KM_PRESS, 0, 0);
- transform_keymap_for_space(wm, keymap, SPACE_NODE);
+ kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", AKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(kmi->ptr, "name", "NODE_MT_add");
+
+ transform_keymap_for_space(keyconf, keymap, SPACE_NODE);
}
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index 94691dd0ed2..ecbd46b720f 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -38,6 +38,7 @@
#include "BKE_context.h"
#include "BKE_node.h"
#include "BKE_global.h"
+#include "BKE_utildefines.h"
#include "BLI_rect.h"
@@ -55,7 +56,7 @@
#include "node_intern.h"
-static void node_mouse_select(SpaceNode *snode, ARegion *ar, short *mval, short extend)
+static bNode *node_mouse_select(SpaceNode *snode, ARegion *ar, short *mval, short extend)
{
bNode *node;
float mx, my;
@@ -101,7 +102,10 @@ static void node_mouse_select(SpaceNode *snode, ARegion *ar, short *mval, short
;// node_link_viewer(snode, node);
//std_rmouse_transform(node_transform_ext); /* does undo push for select */
+
}
+
+ return node;
}
static int node_select_exec(bContext *C, wmOperator *op)
@@ -112,6 +116,7 @@ static int node_select_exec(bContext *C, wmOperator *op)
int select_type;
short mval[2];
short extend;
+ bNode *node= NULL;
select_type = RNA_enum_get(op->ptr, "select_type");
@@ -120,12 +125,20 @@ static int node_select_exec(bContext *C, wmOperator *op)
mval[0] = RNA_int_get(op->ptr, "mouse_x");
mval[1] = RNA_int_get(op->ptr, "mouse_y");
extend = RNA_boolean_get(op->ptr, "extend");
- node_mouse_select(snode, ar, mval, extend);
+ node= node_mouse_select(snode, ar, mval, extend);
break;
}
/* need refresh/a notifier vs compo notifier */
// XXX WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL); /* Do we need to pass the scene? */
+
+ /* WATCH THIS, there are a few other ways to change the active material */
+ if(node) {
+ if (node->id && GS(node->id->name)== ID_MA) {
+ WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING_DRAW, node->id);
+ }
+ }
+
ED_region_tag_redraw(ar);
/* allow tweak event to work too */
@@ -140,7 +153,7 @@ static int node_select_modal(bContext *C, wmOperator *op, wmEvent *event)
printf("%d %d\n", event->x, event->y);
break;
case SELECTMOUSE:
- //if (event->val==0) {
+ //if (event->val==KM_RELEASE) {
/* calculate overall delta mouse-movement for redo */
printf("done translating\n");
//WM_cursor_restore(CTX_wm_window(C));
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index d3a445b18c0..41140eae776 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -48,7 +48,7 @@
#include "BKE_screen.h"
#include "BKE_node.h"
-#include "ED_previewrender.h"
+#include "ED_render.h"
#include "ED_space_api.h"
#include "ED_screen.h"
@@ -179,12 +179,14 @@ static void node_area_refresh(const struct bContext *C, struct ScrArea *sa)
{
/* default now: refresh node is starting preview */
SpaceNode *snode= sa->spacedata.first;
+
+ snode_set_context(snode, CTX_data_scene(C));
if(snode->nodetree) {
if(snode->treetype==NTREE_SHADER) {
Material *ma= (Material *)snode->id;
if(ma->use_nodes)
- ED_preview_shader_job(C, sa, snode->id, NULL, NULL, 100, 100);
+ ED_preview_shader_job(C, sa, snode->id, NULL, NULL, 100, 100, PR_NODE_RENDER);
}
else if(snode->treetype==NTREE_COMPOSIT) {
Scene *scene= (Scene *)snode->id;
@@ -194,7 +196,7 @@ static void node_area_refresh(const struct bContext *C, struct ScrArea *sa)
else if(snode->treetype==NTREE_TEXTURE) {
Tex *tex= (Tex *)snode->id;
if(tex->use_nodes) {
- ED_preview_shader_job(C, sa, snode->id, NULL, NULL, 100, 100);
+ ED_preview_shader_job(C, sa, snode->id, NULL, NULL, 100, 100, PR_NODE_RENDER);
}
}
}
@@ -245,12 +247,12 @@ static void node_channel_area_draw(const bContext *C, ARegion *ar)
/* Initialise main area, setting handlers. */
static void node_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "Node", SPACE_NODE, 0); /* XXX weak? */
+ keymap= WM_keymap_find(wm->defaultconf, "Node", SPACE_NODE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index a3b47d505fd..2612f8a024c 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -1113,16 +1113,16 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
}
else if(type == TSE_KEYMAP) {
wmKeyMap *km= (wmKeyMap *)idv;
- wmKeymapItem *kmi;
+ wmKeyMapItem *kmi;
char opname[OP_MAX_TYPENAME];
te->directdata= idv;
- te->name= km->nameid;
+ te->name= km->idname;
if(!(tselem->flag & TSE_CLOSED)) {
a= 0;
- for (kmi= km->keymap.first; kmi; kmi= kmi->next, a++) {
+ for (kmi= km->items.first; kmi; kmi= kmi->next, a++) {
const char *key= WM_key_event_string(kmi->type);
if(key[0]) {
@@ -1408,7 +1408,7 @@ static void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
wmWindowManager *wm= mainvar->wm.first;
wmKeyMap *km;
- for(km= wm->keymaps.first; km; km= km->next) {
+ for(km= wm->defaultconf->keymaps.first; km; km= km->next) {
ten= outliner_add_element(soops, &soops->tree, (void*)km, NULL, TSE_KEYMAP, 0);
}
}
@@ -1824,7 +1824,7 @@ static void tree_element_set_active_object(bContext *C, Scene *scene, SpaceOops
}
if(ob!=scene->obedit)
- ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
@@ -2173,7 +2173,7 @@ static int tree_element_active_pose(bContext *C, Scene *scene, TreeElement *te,
if(set) {
if(scene->obedit)
- ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
if(ob->mode & OB_MODE_POSE)
ED_armature_exit_posemode(C, base);
@@ -2229,14 +2229,14 @@ static int tree_element_active_sequence_dup(bContext *C, Scene *scene, TreeEleme
static int tree_element_active_keymap_item(bContext *C, TreeElement *te, TreeStoreElem *tselem, int set)
{
- wmKeymapItem *kmi= te->directdata;
+ wmKeyMapItem *kmi= te->directdata;
if(set==0) {
- if(kmi->inactive) return 0;
+ if(kmi->flag & KMI_INACTIVE) return 0;
return 1;
}
else {
- kmi->inactive= !kmi->inactive;
+ kmi->flag ^= KMI_INACTIVE;
}
return 0;
}
@@ -2327,7 +2327,7 @@ static int do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, Spa
else if(ELEM5(te->idcode, ID_ME, ID_CU, ID_MB, ID_LT, ID_AR)) {
Object *obedit= CTX_data_edit_object(C);
if(obedit)
- ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
else {
ED_object_enter_editmode(C, EM_WAITCURSOR);
// XXX extern_set_butspace(F9KEY, 0);
@@ -3057,7 +3057,7 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto
if(base) {
// check also library later
if(scene->obedit==base->object)
- ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
ED_base_object_free_and_unlink(scene, base);
te->directdata= NULL;
@@ -3939,6 +3939,7 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa
/* add a new path with the information obtained (only if valid) */
// TODO: what do we do with group name? for now, we don't supply one, and just let this use the KeyingSet name
BKE_keyingset_add_destination(ks, id, NULL, path, array_index, flag, groupmode);
+ ks->active_path= BLI_countlist(&ks->paths);
}
break;
case KEYINGSET_EDITMODE_REMOVE:
@@ -3950,6 +3951,7 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa
/* free path's data */
// TODO: we probably need an API method for this
if (ksp->rna_path) MEM_freeN(ksp->rna_path);
+ ks->active_path= 0;
/* remove path from set */
BLI_freelinkN(&ks->paths, ksp);
@@ -4324,7 +4326,7 @@ static void outliner_draw_tree_element(bContext *C, Scene *scene, ARegion *ar, S
tselem= TREESTORE(te);
- if(*starty >= ar->v2d.cur.ymin && *starty<= ar->v2d.cur.ymax) {
+ if(*starty+2*OL_H >= ar->v2d.cur.ymin && *starty<= ar->v2d.cur.ymax) {
glEnable(GL_BLEND);
@@ -4579,7 +4581,7 @@ static void outliner_back(ARegion *ar, SpaceOops *soops)
ystart= (int)ar->v2d.tot.ymax;
ystart= OL_H*(ystart/(OL_H));
- while(ystart > ar->v2d.cur.ymin) {
+ while(ystart+2*OL_H > ar->v2d.cur.ymin) {
glRecti(0, ystart, (int)ar->v2d.cur.xmax, ystart+OL_H);
ystart-= 2*OL_H;
}
@@ -4597,7 +4599,7 @@ static void outliner_draw_restrictcols(ARegion *ar, SpaceOops *soops)
ystart= (int)ar->v2d.tot.ymax;
ystart= OL_H*(ystart/(OL_H));
- while(ystart > ar->v2d.cur.ymin) {
+ while(ystart+2*OL_H > ar->v2d.cur.ymin) {
glRecti((int)ar->v2d.cur.xmax-OL_TOGW, ystart, (int)ar->v2d.cur.xmax, ystart+OL_H);
ystart-= 2*OL_H;
}
@@ -4812,7 +4814,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
for(te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(te->ys >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
+ if(te->ys+2*OL_H >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
/* objects have toggle-able restriction flags */
if(tselem->type==0 && te->idcode==ID_OB) {
ob = (Object *)tselem->id;
@@ -4875,19 +4877,27 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
else if(tselem->type==TSE_POSE_CHANNEL) {
bPoseChannel *pchan= (bPoseChannel *)te->directdata;
Bone *bone = pchan->bone;
-
+
uiBlockSetEmboss(block, UI_EMBOSSN);
bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_P, 0, ICON_RESTRICT_VIEW_OFF,
(int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL);
+
+ bt= uiDefIconButBitI(block, ICONTOG, BONE_UNSELECTABLE, 0, ICON_RESTRICT_SELECT_OFF,
+ (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
+ uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL);
}
else if(tselem->type==TSE_EBONE) {
EditBone *ebone= (EditBone *)te->directdata;
-
+
uiBlockSetEmboss(block, UI_EMBOSSN);
bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_A, 0, ICON_RESTRICT_VIEW_OFF,
(int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL);
+
+ bt= uiDefIconButBitI(block, ICONTOG, BONE_UNSELECTABLE, 0, ICON_RESTRICT_SELECT_OFF,
+ (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
+ uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL);
}
}
@@ -4924,7 +4934,7 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa
for(te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(te->ys >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
+ if(te->ys+2*OL_H >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
if(tselem->type == TSE_RNA_PROPERTY) {
ptr= &te->rnaptr;
prop= te->directdata;
@@ -4947,7 +4957,7 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa
static void operator_call_cb(struct bContext *C, void *arg_kmi, void *arg2)
{
wmOperatorType *ot= arg2;
- wmKeymapItem *kmi= arg_kmi;
+ wmKeyMapItem *kmi= arg_kmi;
if(ot)
BLI_strncpy(kmi->idname, ot->idname, OP_MAX_TYPENAME);
@@ -4977,7 +4987,7 @@ static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi)
static char search[OP_MAX_TYPENAME];
wmEvent event;
wmWindow *win= CTX_wm_window(C);
- wmKeymapItem *kmi= arg_kmi;
+ wmKeyMapItem *kmi= arg_kmi;
wmOperatorType *ot= WM_operatortype_find(kmi->idname, 0);
uiBlock *block;
uiBut *but;
@@ -5016,8 +5026,8 @@ static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi)
static short keymap_menu_type(short type)
{
if(ISKEYBOARD(type)) return OL_KM_KEYBOARD;
- if(WM_key_event_is_tweak(type)) return OL_KM_TWEAK;
- if(type >= LEFTMOUSE && type <= WHEELOUTMOUSE) return OL_KM_MOUSE;
+ if(ISTWEAK(type)) return OL_KM_TWEAK;
+ if(ISMOUSE(type)) return OL_KM_MOUSE;
// return OL_KM_SPECIALS;
return 0;
}
@@ -5049,6 +5059,8 @@ static char *keymap_mouse_menu(void)
str += sprintf(str, formatstr, "Left Mouse", LEFTMOUSE);
str += sprintf(str, formatstr, "Middle Mouse", MIDDLEMOUSE);
str += sprintf(str, formatstr, "Right Mouse", RIGHTMOUSE);
+ str += sprintf(str, formatstr, "Button4 Mouse ", BUTTON4MOUSE);
+ str += sprintf(str, formatstr, "Button5 Mouse ", BUTTON5MOUSE);
str += sprintf(str, formatstr, "Action Mouse", ACTIONMOUSE);
str += sprintf(str, formatstr, "Select Mouse", SELECTMOUSE);
str += sprintf(str, formatstr, "Mouse Move", MOUSEMOVE);
@@ -5101,7 +5113,7 @@ static char *keymap_tweak_dir_menu(void)
static void keymap_type_cb(bContext *C, void *kmi_v, void *unused_v)
{
- wmKeymapItem *kmi= kmi_v;
+ wmKeyMapItem *kmi= kmi_v;
short maptype= keymap_menu_type(kmi->type);
if(maptype!=kmi->maptype) {
@@ -5135,7 +5147,7 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo
for(te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(te->ys >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
+ if(te->ys+2*OL_H >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
uiBut *but;
char *str;
int xstart= 240;
@@ -5144,7 +5156,7 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo
int butw3= 43; /* modifiers */
if(tselem->type == TSE_KEYMAP_ITEM) {
- wmKeymapItem *kmi= te->directdata;
+ wmKeyMapItem *kmi= te->directdata;
/* modal map? */
if(kmi->propvalue);
@@ -5213,7 +5225,7 @@ static void outliner_buttons(const bContext *C, uiBlock *block, ARegion *ar, Spa
for(te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(te->ys >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
+ if(te->ys+2*OL_H >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
if(tselem->flag & TSE_TEXTBUT) {
diff --git a/source/blender/editors/space_outliner/outliner_header.c b/source/blender/editors/space_outliner/outliner_header.c
index d4eeaabd1d3..b60cc075869 100644
--- a/source/blender/editors/space_outliner/outliner_header.c
+++ b/source/blender/editors/space_outliner/outliner_header.c
@@ -228,7 +228,7 @@ void outliner_header_buttons(const bContext *C, ARegion *ar)
xco += xmax;
/* header text */
- xco += XIC*2;
+ xco += XIC;
uiBlockSetEmboss(block, UI_EMBOSS);
}
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index 4f9a0f686b9..c71b5181d16 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -110,7 +110,7 @@ typedef struct TreeElement {
/* outliner_ops.c */
void outliner_operatortypes(void);
-void outliner_keymap(struct wmWindowManager *wm);
+void outliner_keymap(struct wmKeyConfig *keyconf);
/* outliner_header.c */
void outliner_header_buttons(const struct bContext *C, struct ARegion *ar);
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c
index 2e11eb379b4..3cdd054fe0e 100644
--- a/source/blender/editors/space_outliner/outliner_ops.c
+++ b/source/blender/editors/space_outliner/outliner_ops.c
@@ -74,9 +74,9 @@ void outliner_operatortypes(void)
WM_operatortype_append(OUTLINER_OT_drivers_delete);
}
-void outliner_keymap(wmWindowManager *wm)
+void outliner_keymap(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Outliner", SPACE_OUTLINER, 0);
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "Outliner", SPACE_OUTLINER, 0);
RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_PRESS, 0, 0)->ptr, "extend", 0);
RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1);
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 5058a167a29..fabe889ace6 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -72,12 +72,12 @@
static void outliner_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "Outliner", SPACE_OUTLINER, 0); /* XXX weak? */
+ keymap= WM_keymap_find(wm->defaultconf, "Outliner", SPACE_OUTLINER, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -137,10 +137,15 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
/* all actions now, todo: check outliner view mode? */
ED_region_tag_redraw(ar);
break;
+ case NC_LAMP:
+ /* For updating lamp icons, when changing lamp type */
+ if(wmn->data == ND_LIGHTING_DRAW)
+ ED_region_tag_redraw(ar);
+ break;
case NC_SPACE:
if(wmn->data == ND_SPACE_OUTLINER)
ED_region_tag_redraw(ar);
- break;
+ break;
}
}
diff --git a/source/blender/editors/space_script/script_intern.h b/source/blender/editors/space_script/script_intern.h
index 59858ee6289..7534fc98de1 100644
--- a/source/blender/editors/space_script/script_intern.h
+++ b/source/blender/editors/space_script/script_intern.h
@@ -36,7 +36,7 @@ void script_header_buttons(const bContext *C, ARegion *ar);
/* script_ops.c */
void script_operatortypes(void);
-void script_keymap(struct wmWindowManager *wm);
+void script_keymap(struct wmKeyConfig *keyconf);
/* script_edit.c */
void SCRIPT_OT_python_file_run(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_script/script_ops.c b/source/blender/editors/space_script/script_ops.c
index 270cc1ffd8f..bf0a7e5769e 100644
--- a/source/blender/editors/space_script/script_ops.c
+++ b/source/blender/editors/space_script/script_ops.c
@@ -63,9 +63,9 @@ void script_operatortypes(void)
WM_operatortype_append(SCRIPT_OT_python_run_ui_scripts);
}
-void script_keymap(wmWindowManager *wm)
+void script_keymap(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Script", SPACE_SCRIPT, 0);
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "Script", SPACE_SCRIPT, 0);
/* TODO - this is just while we have no way to load a text datablock */
RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0)->ptr, "path", "test.py");
diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c
index 99233cc5020..eae0f77d0e1 100644
--- a/source/blender/editors/space_script/space_script.c
+++ b/source/blender/editors/space_script/space_script.c
@@ -133,12 +133,12 @@ static SpaceLink *script_duplicate(SpaceLink *sl)
/* add handlers, stuff you only do once or on area/region changes */
static void script_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "Script", SPACE_SCRIPT, 0); /* XXX weak? */
+ keymap= WM_keymap_find(wm->defaultconf, "Script", SPACE_SCRIPT, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_buttons.c b/source/blender/editors/space_sequencer/sequencer_buttons.c
index 72cbacd9b6d..70f3cc955b8 100644
--- a/source/blender/editors/space_sequencer/sequencer_buttons.c
+++ b/source/blender/editors/space_sequencer/sequencer_buttons.c
@@ -72,7 +72,7 @@ static void sequencer_panel_view_properties(const bContext *C, Panel *pa)
{
uiBlock *block;
- block= uiLayoutFreeBlock(pa->layout);
+ block= uiLayoutAbsoluteBlock(pa->layout);
uiBlockSetHandleFunc(block, do_sequencer_panel_events, NULL);
}
@@ -82,7 +82,7 @@ static void sequencer_panel_properties(const bContext *C, Panel *pa)
{
uiBlock *block;
- block= uiLayoutFreeBlock(pa->layout);
+ block= uiLayoutAbsoluteBlock(pa->layout);
uiBlockSetHandleFunc(block, do_sequencer_panel_events, NULL);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h
index ac396440a00..d45d7bf4d18 100644
--- a/source/blender/editors/space_sequencer/sequencer_intern.h
+++ b/source/blender/editors/space_sequencer/sequencer_intern.h
@@ -75,7 +75,8 @@ extern EnumPropertyItem prop_side_types[];
/* operators */
struct wmOperatorType;
-struct wmWindowManager;
+struct wmKeyConfig;
+
void SEQUENCER_OT_cut(struct wmOperatorType *ot);
void SEQUENCER_OT_mute(struct wmOperatorType *ot);
void SEQUENCER_OT_unmute(struct wmOperatorType *ot);
@@ -137,7 +138,7 @@ enum {
/* sequencer_ops.c */
void sequencer_operatortypes(void);
-void sequencer_keymap(struct wmWindowManager *wm);
+void sequencer_keymap(struct wmKeyConfig *keyconf);
/* sequencer_scope.c */
struct ImBuf *make_waveform_view_from_ibuf(struct ImBuf * ibuf);
diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c
index 74f22b86b75..eedbab779c0 100644
--- a/source/blender/editors/space_sequencer/sequencer_ops.c
+++ b/source/blender/editors/space_sequencer/sequencer_ops.c
@@ -103,10 +103,10 @@ void sequencer_operatortypes(void)
}
-void sequencer_keymap(wmWindowManager *wm)
+void sequencer_keymap(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Sequencer", SPACE_SEQ, 0);
- wmKeymapItem *kmi;
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "Sequencer", SPACE_SEQ, 0);
+ wmKeyMapItem *kmi;
WM_keymap_add_item(keymap, "SEQUENCER_OT_properties", NKEY, KM_PRESS, 0, 0);
@@ -177,9 +177,12 @@ void sequencer_keymap(wmWindowManager *wm)
WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_select_border", BKEY, KM_PRESS, 0, 0);
+
+ kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", AKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(kmi->ptr, "name", "SEQUENCER_MT_add");
WM_keymap_verify_item(keymap, "ANIM_OT_change_frame", LEFTMOUSE, KM_PRESS, 0, 0);
- transform_keymap_for_space(wm, keymap, SPACE_SEQ);
+ transform_keymap_for_space(keyconf, keymap, SPACE_SEQ);
}
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 26ffd88ae67..626a3e6e2e0 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -185,12 +185,12 @@ static SpaceLink *sequencer_duplicate(SpaceLink *sl)
/* add handlers, stuff you only do once or on area/region changes */
static void sequencer_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "Sequencer", SPACE_SEQ, 0); /* XXX weak? */
+ keymap= WM_keymap_find(wm->defaultconf, "Sequencer", SPACE_SEQ, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
diff --git a/source/blender/editors/space_sound/space_sound.c b/source/blender/editors/space_sound/space_sound.c
index f8ef2b21ae7..7cd9988eea0 100644
--- a/source/blender/editors/space_sound/space_sound.c
+++ b/source/blender/editors/space_sound/space_sound.c
@@ -142,12 +142,12 @@ static SpaceLink *sound_duplicate(SpaceLink *sl)
/* add handlers, stuff you only do once or on area/region changes */
static void sound_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "Sound", SPACE_SOUND, 0); /* XXX weak? */
+ keymap= WM_keymap_find(wm->defaultconf, "Sound", SPACE_SOUND, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -179,7 +179,7 @@ void sound_operatortypes(void)
}
-void sound_keymap(struct wmWindowManager *wm)
+void sound_keymap(struct wmKeyConfig *keyconf)
{
}
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 1f919fc9cd7..09a5374a43b 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -206,9 +206,11 @@ static void text_operatortypes(void)
WM_operatortype_append(TEXT_OT_resolve_conflict);
}
-static void text_keymap(struct wmWindowManager *wm)
+static void text_keymap(struct wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Text", SPACE_TEXT, 0);
+ wmKeyMap *keymap;
+
+ keymap= WM_keymap_find(keyconf, "Text", SPACE_TEXT, 0);
#ifdef __APPLE__
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", LEFTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
@@ -239,7 +241,7 @@ static void text_keymap(struct wmWindowManager *wm)
if(U.uiflag & USER_MMB_PASTE) // XXX not dynamic
RNA_boolean_set(WM_keymap_add_item(keymap, "TEXT_OT_paste", MIDDLEMOUSE, KM_PRESS, 0, 0)->ptr, "selection", 1);
- WM_keymap_add_item(keymap, "TEXT_OT_jump", JKEY, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "TEXT_OT_jump", GKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "TEXT_OT_find", FKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "TEXT_OT_properties", FKEY, KM_PRESS, KM_CTRL, 0);
@@ -329,12 +331,12 @@ static int text_context(const bContext *C, const char *member, bContextDataResul
/* add handlers, stuff you only do once or on area/region changes */
static void text_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "Text", SPACE_TEXT, 0); /* XXX weak? */
+ keymap= WM_keymap_find(wm->defaultconf, "Text", SPACE_TEXT, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 9721fbc2b9c..5996770c206 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -425,60 +425,6 @@ static void format_draw_color(char formatchar)
}
}
-/*********************** utilities ************************/
-
-int text_check_bracket(char ch)
-{
- int a;
- char opens[] = "([{";
- char close[] = ")]}";
-
- for(a=0; a<3; a++) {
- if(ch==opens[a])
- return a+1;
- else if(ch==close[a])
- return -(a+1);
- }
- return 0;
-}
-
-int text_check_delim(char ch)
-{
- int a;
- char delims[] = "():\"\' ~!%^&*-+=[]{};/<>|.#\t,";
-
- for(a=0; a<28; a++) {
- if(ch==delims[a])
- return 1;
- }
- return 0;
-}
-
-int text_check_digit(char ch)
-{
- if(ch < '0') return 0;
- if(ch <= '9') return 1;
- return 0;
-}
-
-int text_check_identifier(char ch)
-{
- if(ch < '0') return 0;
- if(ch <= '9') return 1;
- if(ch < 'A') return 0;
- if(ch <= 'Z' || ch == '_') return 1;
- if(ch < 'a') return 0;
- if(ch <= 'z') return 1;
- return 0;
-}
-
-int text_check_whitespace(char ch)
-{
- if(ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n')
- return 1;
- return 0;
-}
-
/************************** draw text *****************************/
/***********************/ /*
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 3568f50dfe1..a7b40deda22 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -159,10 +159,24 @@ static int new_exec(bContext *C, wmOperator *op)
{
SpaceText *st= CTX_wm_space_text(C);
Text *text;
+ PointerRNA ptr, idptr;
+ PropertyRNA *prop;
text= add_empty_text("Text");
- if(st) {
+ /* hook into UI */
+ uiIDContextProperty(C, &ptr, &prop);
+
+ if(prop) {
+ /* when creating new ID blocks, use is already 1, but RNA
+ * pointer se also increases user, so this compensates it */
+ text->id.us--;
+
+ RNA_id_pointer_create(&text->id, &idptr);
+ RNA_property_pointer_set(&ptr, prop, idptr);
+ RNA_property_update(C, &ptr, prop);
+ }
+ else if(st) {
st->text= text;
st->top= 0;
}
@@ -186,23 +200,61 @@ void TEXT_OT_new(wmOperatorType *ot)
/******************* open operator *********************/
+static void open_init(bContext *C, wmOperator *op)
+{
+ PropertyPointerRNA *pprop;
+
+ op->customdata= pprop= MEM_callocN(sizeof(PropertyPointerRNA), "OpenPropertyPointerRNA");
+ uiIDContextProperty(C, &pprop->ptr, &pprop->prop);
+}
+
+static int open_cancel(bContext *C, wmOperator *op)
+{
+ MEM_freeN(op->customdata);
+ return OPERATOR_CANCELLED;
+}
+
static int open_exec(bContext *C, wmOperator *op)
{
SpaceText *st= CTX_wm_space_text(C);
Text *text;
+ PropertyPointerRNA *pprop;
+ PointerRNA idptr;
char str[FILE_MAX];
RNA_string_get(op->ptr, "path", str);
text= add_text(str, G.sce);
- if(st) {
+ if(!text) {
+ if(op->customdata) MEM_freeN(op->customdata);
+ return OPERATOR_CANCELLED;
+ }
+
+ if(!op->customdata)
+ open_init(C, op);
+
+ /* hook into UI */
+ pprop= op->customdata;
+
+ if(pprop->prop) {
+ /* when creating new ID blocks, use is already 1, but RNA
+ * pointer se also increases user, so this compensates it */
+ text->id.us--;
+
+ RNA_id_pointer_create(&text->id, &idptr);
+ RNA_property_pointer_set(&pprop->ptr, pprop->prop, idptr);
+ RNA_property_update(C, &pprop->ptr, pprop->prop);
+ }
+ else if(st) {
st->text= text;
st->top= 0;
}
WM_event_add_notifier(C, NC_TEXT|NA_ADDED, text);
+ MEM_freeN(op->customdata);
+
return OPERATOR_FINISHED;
}
@@ -214,6 +266,7 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *event)
if(RNA_property_is_set(op->ptr, "path"))
return open_exec(C, op);
+ open_init(C, op);
RNA_string_set(op->ptr, "path", path);
WM_event_add_fileselect(C, op);
@@ -230,6 +283,7 @@ void TEXT_OT_open(wmOperatorType *ot)
/* api callbacks */
ot->exec= open_exec;
ot->invoke= open_invoke;
+ ot->cancel= open_cancel;
ot->poll= text_new_poll;
/* properties */
@@ -1574,10 +1628,6 @@ static int jump_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-// XXX invoke
-// short tmp= txt_get_span(text->lines.first, text->curl)+1;
-// button(&tmp, 1, nlines, "Jump to line:"))
-
void TEXT_OT_jump(wmOperatorType *ot)
{
/* identifiers */
@@ -1586,6 +1636,7 @@ void TEXT_OT_jump(wmOperatorType *ot)
ot->description= "Jump cursor to line.";
/* api callbacks */
+ ot->invoke= WM_operator_props_popup;
ot->exec= jump_exec;
ot->poll= text_edit_poll;
@@ -1593,7 +1644,7 @@ void TEXT_OT_jump(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER;
/* properties */
- RNA_def_int(ot->srna, "line", 1, INT_MAX, 1, "Line", "Line number to jump to.", 1, 10000);
+ RNA_def_int(ot->srna, "line", 1, 1, INT_MAX, "Line", "Line number to jump to.", 1, 10000);
}
/******************* delete operator **********************/
@@ -1731,7 +1782,7 @@ static int scroll_invoke(bContext *C, wmOperator *op, wmEvent *event)
st->flags|= ST_SCROLL_SELECT;
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -1860,7 +1911,7 @@ static int scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event)
st->flags|= ST_SCROLL_SELECT;
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -2115,7 +2166,7 @@ static int set_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event)
scu->sell= txt_get_span(st->text->lines.first, st->text->sell);
scu->selc= st->text->selc;
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
set_cursor_apply(C, op, event);
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index 8f7486f81d9..501ac1c0cba 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -202,12 +202,12 @@ static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar
/* add handlers, stuff you only do once or on area/region changes */
static void time_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "TimeLine", SPACE_TIME, 0); /* XXX weak? */
+ keymap= WM_keymap_find(wm->defaultconf, "TimeLine", SPACE_TIME, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
diff --git a/source/blender/editors/space_time/time_intern.h b/source/blender/editors/space_time/time_intern.h
index 25f4c63fed1..ac6b407d117 100644
--- a/source/blender/editors/space_time/time_intern.h
+++ b/source/blender/editors/space_time/time_intern.h
@@ -35,7 +35,7 @@ struct wmWindowManager;
/* time_ops.c */
void time_operatortypes(void);
-void time_keymap(struct wmWindowManager *wm);
+void time_keymap(struct wmKeyConfig *keyconf);
/* time_header.c */
void time_header_buttons(const bContext *C, ARegion *ar);
diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c
index a833cca095c..7d91c6d0fc7 100644
--- a/source/blender/editors/space_time/time_ops.c
+++ b/source/blender/editors/space_time/time_ops.c
@@ -140,9 +140,9 @@ void time_operatortypes(void)
WM_operatortype_append(TIME_OT_end_frame_set);
}
-void time_keymap(wmWindowManager *wm)
+void time_keymap(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "TimeLine", SPACE_TIME, 0);
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "TimeLine", SPACE_TIME, 0);
WM_keymap_add_item(keymap, "TIME_OT_start_frame_set", SKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "TIME_OT_end_frame_set", EKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_userpref/space_userpref.c b/source/blender/editors/space_userpref/space_userpref.c
index 8c9d723ce2c..39fc2fd2bd1 100644
--- a/source/blender/editors/space_userpref/space_userpref.c
+++ b/source/blender/editors/space_userpref/space_userpref.c
@@ -115,7 +115,7 @@ void userpref_operatortypes(void)
{
}
-void userpref_keymap(struct wmWindowManager *wm)
+void userpref_keymap(struct wmKeyConfig *keyconf)
{
}
@@ -167,7 +167,7 @@ void ED_spacetype_userpref(void)
art->init= userpref_main_area_init;
art->draw= userpref_main_area_draw;
art->listener= userpref_main_area_listener;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
+ art->keymapflag= ED_KEYMAP_UI;
BLI_addhead(&st->regiontypes, art);
diff --git a/source/blender/editors/space_view3d/Makefile b/source/blender/editors/space_view3d/Makefile
index 07102157854..9204f2482c6 100644
--- a/source/blender/editors/space_view3d/Makefile
+++ b/source/blender/editors/space_view3d/Makefile
@@ -53,6 +53,9 @@ CPPFLAGS += -I../../render/extern/include
CPPFLAGS += -I../../blenfont
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I$(NAN_SMOKE)/include
-# own include
+ifneq ($(NAN_NO_KETSJI),true)
+ CPPFLAGS += -I../../../kernel/gen_system
+endif
+# own include
CPPFLAGS += -I../include
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index fa810677fe8..26135cd8d31 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -639,7 +639,7 @@ static void draw_sphere_bone_dist(float smat[][4], float imat[][4], int boneflag
/* figure out the sizes of spheres */
if (ebone) {
- /* this routine doesn't call set_matrix_editbone() that calculates it */
+ /* this routine doesn't call get_matrix_editbone() that calculates it */
ebone->length = VecLenf(ebone->head, ebone->tail);
length= ebone->length;
@@ -749,7 +749,7 @@ static void draw_sphere_bone_wire(float smat[][4], float imat[][4], int armflag,
/* figure out the sizes of spheres */
if (ebone) {
- /* this routine doesn't call set_matrix_editbone() that calculates it */
+ /* this routine doesn't call get_matrix_editbone() that calculates it */
ebone->length = VecLenf(ebone->head, ebone->tail);
length= ebone->length;
@@ -1516,15 +1516,25 @@ static void draw_pose_dofs(Object *ob)
}
}
+static void bone_matrix_translate_y(float mat[][4], float y)
+{
+ float trans[3];
+
+ VECCOPY(trans, mat[1]);
+ VecMulf(trans, y);
+ VecAddf(mat[3], mat[3], trans);
+}
+
/* assumes object is Armature with pose */
-static void draw_pose_channels(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int dt)
+static void draw_pose_channels(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt)
{
+ RegionView3D *rv3d= ar->regiondata;
Object *ob= base->object;
bArmature *arm= ob->data;
bPoseChannel *pchan;
Bone *bone;
GLfloat tmp;
- float smat[4][4], imat[4][4];
+ float smat[4][4], imat[4][4], bmat[4][4];
int index= -1;
short do_dashed= 3, draw_wire= 0;
short flag, constflag;
@@ -1644,6 +1654,7 @@ static void draw_pose_channels(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ba
/* prepare colors */
if (arm->flag & ARM_POSEMODE)
set_pchan_colorset(ob, pchan);
+#if 0 // XXX - 13 October 2009, Disabled this to make ghosting show the right colors (Aligorith)
else {
if ((scene->basact)==base) {
if (base->flag & (SELECT+BA_WAS_SEL)) UI_ThemeColor(TH_ACTIVE);
@@ -1654,6 +1665,7 @@ static void draw_pose_channels(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ba
else UI_ThemeColor(TH_WIRE);
}
}
+#endif
/* catch exception for bone with hidden parent */
flag= bone->flag;
@@ -1745,7 +1757,7 @@ static void draw_pose_channels(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ba
/* extra draw service for pose mode */
constflag= pchan->constflag;
- if (pchan->flag & (POSE_ROT|POSE_LOC|POSE_SIZE)) // XXX this is useless crap
+ if (pchan->flag & (POSE_ROT|POSE_LOC|POSE_SIZE))
constflag |= PCHAN_HAS_ACTION;
if (pchan->flag & POSE_STRIDE)
constflag |= PCHAN_HAS_STRIDE;
@@ -1809,15 +1821,21 @@ static void draw_pose_channels(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ba
/* Draw names of bone */
if (arm->flag & ARM_DRAWNAMES) {
VecMidf(vec, pchan->pose_head, pchan->pose_tail);
- view3d_object_text_draw_add(vec[0], vec[1], vec[2], pchan->name, 10);
+ view3d_cached_text_draw_add(vec[0], vec[1], vec[2], pchan->name, 10);
}
/* Draw additional axes on the bone tail */
if ( (arm->flag & ARM_DRAWAXES) && (arm->flag & ARM_POSEMODE) ) {
glPushMatrix();
- glMultMatrixf(pchan->pose_mat);
- glTranslatef(0.0f, pchan->bone->length, 0.0f);
- drawaxes(0.25f*pchan->bone->length, 0, OB_ARROWS);
+ Mat4CpyMat4(bmat, pchan->pose_mat);
+ bone_matrix_translate_y(bmat, pchan->bone->length);
+ glMultMatrixf(bmat);
+
+ /* do cached text draw immediate to include transform */
+ view3d_cached_text_draw_begin();
+ drawaxes(pchan->bone->length*0.25f, 0, OB_ARROWS);
+ view3d_cached_text_draw_end(v3d, ar, 1, bmat);
+
glPopMatrix();
}
}
@@ -1830,32 +1848,28 @@ static void draw_pose_channels(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ba
}
/* in editmode, we don't store the bone matrix... */
-static void set_matrix_editbone(EditBone *eBone)
+static void get_matrix_editbone(EditBone *eBone, float bmat[][4])
{
- float delta[3],offset[3];
- float mat[3][3], bmat[4][4];
+ float delta[3];
+ float mat[3][3];
/* Compose the parent transforms (i.e. their translations) */
- VECCOPY(offset, eBone->head);
-
- glTranslatef(offset[0],offset[1],offset[2]);
-
VecSubf(delta, eBone->tail, eBone->head);
eBone->length = (float)sqrt(delta[0]*delta[0] + delta[1]*delta[1] +delta[2]*delta[2]);
vec_roll_to_mat3(delta, eBone->roll, mat);
Mat4CpyMat3(bmat, mat);
-
- glMultMatrixf(bmat);
-
+
+ VecAddf(bmat[3], bmat[3], eBone->head);
}
-static void draw_ebones(View3D *v3d, RegionView3D *rv3d, Object *ob, int dt)
+static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt)
{
+ RegionView3D *rv3d= ar->regiondata;
EditBone *eBone;
bArmature *arm= ob->data;
- float smat[4][4], imat[4][4];
+ float smat[4][4], imat[4][4], bmat[4][4];
unsigned int index;
int flag;
@@ -1893,7 +1907,8 @@ static void draw_ebones(View3D *v3d, RegionView3D *rv3d, Object *ob, int dt)
if (eBone->layer & arm->layer) {
if ((eBone->flag & BONE_HIDDEN_A)==0) {
glPushMatrix();
- set_matrix_editbone(eBone);
+ get_matrix_editbone(eBone, bmat);
+ glMultMatrixf(bmat);
/* catch exception for bone with hidden parent */
flag= eBone->flag;
@@ -1941,7 +1956,8 @@ static void draw_ebones(View3D *v3d, RegionView3D *rv3d, Object *ob, int dt)
}
else {
glPushMatrix();
- set_matrix_editbone(eBone);
+ get_matrix_editbone(eBone, bmat);
+ glMultMatrixf(bmat);
if (arm->drawtype == ARM_LINE)
draw_line_bone(arm->flag, flag, 0, index, NULL, eBone);
@@ -1994,14 +2010,20 @@ static void draw_ebones(View3D *v3d, RegionView3D *rv3d, Object *ob, int dt)
if (arm->flag & ARM_DRAWNAMES) {
VecMidf(vec, eBone->head, eBone->tail);
glRasterPos3fv(vec);
- view3d_object_text_draw_add(vec[0], vec[1], vec[2], eBone->name, 10);
+ view3d_cached_text_draw_add(vec[0], vec[1], vec[2], eBone->name, 10);
}
/* Draw additional axes */
if (arm->flag & ARM_DRAWAXES) {
glPushMatrix();
- set_matrix_editbone(eBone);
- glTranslatef(0.0f, eBone->length, 0.0f);
+ get_matrix_editbone(eBone, bmat);
+ bone_matrix_translate_y(bmat, eBone->length);
+ glMultMatrixf(bmat);
+
+ /* do cached text draw immediate to include transform */
+ view3d_cached_text_draw_begin();
drawaxes(eBone->length*0.25f, 0, OB_ARROWS);
+ view3d_cached_text_draw_end(v3d, ar, 1, bmat);
+
glPopMatrix();
}
@@ -2021,8 +2043,9 @@ static void draw_ebones(View3D *v3d, RegionView3D *rv3d, Object *ob, int dt)
/* draw bone paths
* - in view space
*/
-static void draw_pose_paths(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob)
+static void draw_pose_paths(Scene *scene, View3D *v3d, ARegion *ar, Object *ob)
{
+ RegionView3D *rv3d= ar->regiondata;
AnimData *adt= BKE_animdata_from_id(&ob->id);
bArmature *arm= ob->data;
bPoseChannel *pchan;
@@ -2155,12 +2178,12 @@ static void draw_pose_paths(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
/* only draw framenum if several consecutive highlighted points don't occur on same point */
if (a == 0) {
sprintf(str, "%d", (a+sfra));
- view3d_object_text_draw_add(fp[0], fp[1], fp[2], str, 0);
+ view3d_cached_text_draw_add(fp[0], fp[1], fp[2], str, 0);
}
else if ((a > stepsize) && (a < len-stepsize)) {
if ((VecEqual(fp, fp-(stepsize*3))==0) || (VecEqual(fp, fp+(stepsize*3))==0)) {
sprintf(str, "%d", (a+sfra));
- view3d_object_text_draw_add(fp[0], fp[1], fp[2], str, 0);
+ view3d_cached_text_draw_add(fp[0], fp[1], fp[2], str, 0);
}
}
}
@@ -2202,7 +2225,7 @@ static void draw_pose_paths(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
char str[32];
sprintf(str, "%d", (a+sfra));
- view3d_object_text_draw_add(fp[0], fp[1], fp[2], str, 0);
+ view3d_cached_text_draw_add(fp[0], fp[1], fp[2], str, 0);
}
}
}
@@ -2253,7 +2276,7 @@ static void ghost_poses_tag_unselected(Object *ob, short unset)
/* draw ghosts that occur within a frame range
* note: object should be in posemode
*/
-static void draw_ghost_poses_range(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base)
+static void draw_ghost_poses_range(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
{
Object *ob= base->object;
AnimData *adt= BKE_animdata_from_id(&ob->id);
@@ -2295,7 +2318,7 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, RegionView3D *rv3d
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);
+ draw_pose_channels(scene, v3d, ar, base, OB_WIRE);
}
glDisable(GL_BLEND);
if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
@@ -2315,7 +2338,7 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, RegionView3D *rv3d
/* draw ghosts on keyframes in action within range
* - object should be in posemode
*/
-static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base)
+static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
{
Object *ob= base->object;
AnimData *adt= BKE_animdata_from_id(&ob->id);
@@ -2374,7 +2397,7 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, RegionView3D *rv3d,
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);
+ draw_pose_channels(scene, v3d, ar, base, OB_WIRE);
}
glDisable(GL_BLEND);
if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
@@ -2394,7 +2417,7 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, RegionView3D *rv3d,
/* draw ghosts around current frame
* - object is supposed to be armature in posemode
*/
-static void draw_ghost_poses(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base)
+static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
{
Object *ob= base->object;
AnimData *adt= BKE_animdata_from_id(&ob->id);
@@ -2444,7 +2467,7 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base
if (CFRA != cfrao) {
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);
+ draw_pose_channels(scene, v3d, ar, base, OB_WIRE);
}
}
@@ -2459,7 +2482,7 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base
if (CFRA != cfrao) {
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);
+ draw_pose_channels(scene, v3d, ar, base, OB_WIRE);
}
}
}
@@ -2480,7 +2503,7 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base
/* ********************************** Armature Drawing - Main ************************* */
/* called from drawobject.c, return 1 if nothing was drawn */
-int draw_armature(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int dt, int flag)
+int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, int flag)
{
Object *ob= base->object;
bArmature *arm= ob->data;
@@ -2504,7 +2527,7 @@ int draw_armature(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int
/* editmode? */
if(arm->edbo) {
arm->flag |= ARM_EDITMODE;
- draw_ebones(v3d, rv3d, ob, dt);
+ draw_ebones(v3d, ar, ob, dt);
arm->flag &= ~ARM_EDITMODE;
}
else{
@@ -2513,32 +2536,36 @@ int draw_armature(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int
/* drawing posemode selection indices or colors only in these cases */
if(!(base->flag & OB_FROMDUPLI)) {
if(G.f & G_PICKSEL) {
- if(ob->mode & OB_MODE_POSE)
+ if(OBACT && (OBACT->mode & OB_MODE_WEIGHT_PAINT)) {
+ if(ob==modifiers_isDeformedByArmature(OBACT))
+ arm->flag |= ARM_POSEMODE;
+ }
+ else if(ob->mode & OB_MODE_POSE)
arm->flag |= ARM_POSEMODE;
}
else if(ob->mode & OB_MODE_POSE) {
if (arm->ghosttype == ARM_GHOST_RANGE) {
- draw_ghost_poses_range(scene, v3d, rv3d, base);
+ draw_ghost_poses_range(scene, v3d, ar, base);
}
else if (arm->ghosttype == ARM_GHOST_KEYS) {
- draw_ghost_poses_keys(scene, v3d, rv3d, base);
+ draw_ghost_poses_keys(scene, v3d, ar, base);
}
else if (arm->ghosttype == ARM_GHOST_CUR) {
if (arm->ghostep)
- draw_ghost_poses(scene, v3d, rv3d, base);
+ draw_ghost_poses(scene, v3d, ar, base);
}
if ((flag & DRAW_SCENESET)==0) {
if(ob==OBACT)
arm->flag |= ARM_POSEMODE;
- else if(ob->mode & OB_MODE_WEIGHT_PAINT) {
- if(OBACT && ob==modifiers_isDeformedByArmature(OBACT))
+ else if(OBACT && (OBACT->mode & OB_MODE_WEIGHT_PAINT)) {
+ if(ob==modifiers_isDeformedByArmature(OBACT))
arm->flag |= ARM_POSEMODE;
}
- draw_pose_paths(scene, v3d, rv3d, ob);
+ draw_pose_paths(scene, v3d, ar, ob);
}
}
}
- draw_pose_channels(scene, v3d, rv3d, base, dt);
+ draw_pose_channels(scene, v3d, ar, base, dt);
arm->flag &= ~ARM_POSEMODE;
if(ob->mode & OB_MODE_POSE)
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 2e47e2d4483..0d8e1381756 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -71,6 +71,7 @@
#include "UI_resources.h"
#include "UI_interface_icons.h"
+#include "gpu_buffers.h"
#include "GPU_extensions.h"
#include "GPU_draw.h"
@@ -350,7 +351,7 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O
int istex, solidtex= 0;
// XXX scene->obedit warning
- if(v3d->drawtype==OB_SOLID || (ob==scene->obedit && v3d->drawtype!=OB_TEXTURE)) {
+ if(v3d->drawtype==OB_SOLID || ((ob->mode & OB_MODE_EDIT) && v3d->drawtype!=OB_TEXTURE)) {
/* draw with default lights in solid draw mode and edit mode */
solidtex= 1;
Gtexdraw.islit= -1;
@@ -399,8 +400,7 @@ static void draw_textured_end()
glPopMatrix();
}
-
-static int draw_tface__set_draw(MTFace *tface, int has_vcol, int matnr)
+static int draw_tface__set_draw_legacy(MTFace *tface, int has_vcol, int matnr)
{
if (tface && (tface->mode&TF_INVISIBLE)) return 0;
@@ -422,6 +422,87 @@ static int draw_tface__set_draw(MTFace *tface, int has_vcol, int matnr)
return 1; /* Set color from mcol */
}
}
+static int draw_tface__set_draw(MTFace *tface, MCol *mcol, int matnr)
+{
+ if (tface && (tface->mode&TF_INVISIBLE)) return 0;
+
+ if (tface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE)) {
+ return 2; /* Don't set color */
+ } else if (tface && tface->mode&TF_OBCOL) {
+ return 2; /* Don't set color */
+ } else if (!mcol) {
+ return 2; /* Don't set color */
+ } else {
+ return 1; /* Set color from mcol */
+ }
+}
+static void add_tface_color_layer(DerivedMesh *dm)
+{
+ MTFace *tface = DM_get_face_data_layer(dm, CD_MTFACE);
+ MFace *mface = dm->getTessFaceArray(dm);
+ MCol *finalCol;
+ int i,j;
+ MCol *mcol = dm->getTessFaceDataArray(dm, CD_WEIGHT_MCOL);
+ if(!mcol)
+ mcol = dm->getTessFaceDataArray(dm, CD_MCOL);
+
+ finalCol = MEM_mallocN(sizeof(MCol)*4*dm->getNumTessFaces(dm),"add_tface_color_layer");
+ for(i=0;i<dm->getNumTessFaces(dm);i++) {
+ if (tface && (tface->mode&TF_INVISIBLE)) {
+ if( mcol )
+ memcpy(&finalCol[i*4],&mcol[i*4],sizeof(MCol)*4);
+ else
+ for(j=0;j<4;j++) {
+ finalCol[i*4+j].b = 255;
+ finalCol[i*4+j].g = 255;
+ finalCol[i*4+j].r = 255;
+ }
+ }
+ else if (tface && mface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, mface[i].mat_nr, TF_TWOSIDE)) {
+ for(j=0;j<4;j++) {
+ finalCol[i*4+j].b = 255;
+ finalCol[i*4+j].g = 0;
+ finalCol[i*4+j].r = 255;
+ }
+ } else if (tface && tface->mode&TF_OBCOL) {
+ for(j=0;j<4;j++) {
+ finalCol[i*4+j].r = Gtexdraw.obcol[0];
+ finalCol[i*4+j].g = Gtexdraw.obcol[1];
+ finalCol[i*4+j].b = Gtexdraw.obcol[2];
+ }
+ } else if (!mcol) {
+ if (tface) {
+ for(j=0;j<4;j++) {
+ finalCol[i*4+j].b = 255;
+ finalCol[i*4+j].g = 255;
+ finalCol[i*4+j].r = 255;
+ }
+ }
+ else {
+ Material *ma= give_current_material(Gtexdraw.ob, mface[i].mat_nr+1);
+ if(ma)
+ for(j=0;j<4;j++) {
+ finalCol[i*4+j].b = ma->b;
+ finalCol[i*4+j].g = ma->g;
+ finalCol[i*4+j].r = ma->r;
+ }
+ else
+ for(j=0;j<4;j++) {
+ finalCol[i*4+j].b = 255;
+ finalCol[i*4+j].g = 255;
+ finalCol[i*4+j].r = 255;
+ }
+ }
+ } else {
+ for(j=0;j<4;j++) {
+ finalCol[i*4+j].b = mcol[i*4+j].r;
+ finalCol[i*4+j].g = mcol[i*4+j].g;
+ finalCol[i*4+j].r = mcol[i*4+j].b;
+ }
+ }
+ }
+ CustomData_add_layer( &dm->faceData, CD_TEXTURE_MCOL, CD_ASSIGN, finalCol, dm->numFaceData );
+}
static int draw_tface_mapped__set_draw(void *userData, int index)
{
@@ -504,7 +585,7 @@ void draw_mesh_text(Scene *scene, Object *ob, int glsl)
return;
/* don't draw when editing */
- if(ob == scene->obedit)
+ if(ob->mode & OB_MODE_EDIT)
return;
else if(ob==OBACT)
if(paint_facesel_test(ob))
@@ -584,7 +665,8 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o
/* draw the textured mesh */
draw_textured_begin(scene, v3d, rv3d, ob);
- if(ob == scene->obedit) {
+ if(ob->mode & OB_MODE_EDIT) {
+ glColor4f(1.0f,1.0f,1.0f,1.0f);
dm->drawMappedFacesTex(dm, draw_em_tf_mapped__set_draw, me->edit_btmesh);
} else if(faceselect) {
if(ob->mode & OB_MODE_WEIGHT_PAINT)
@@ -593,7 +675,14 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o
dm->drawMappedFacesTex(dm, draw_tface_mapped__set_draw, me);
}
else {
- dm->drawFacesTex(dm, draw_tface__set_draw);
+ if( GPU_buffer_legacy(dm) )
+ dm->drawFacesTex(dm, draw_tface__set_draw_legacy);
+ else {
+ glColor4f(1.0f,1.0f,1.0f,1.0f);
+ if( !CustomData_has_layer(&dm->faceData,CD_TEXTURE_MCOL) )
+ add_tface_color_layer(dm);
+ dm->drawFacesTex(dm, draw_tface__set_draw);
+ }
}
/* draw game engine text hack */
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 482b4718504..dfbdce14992 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -104,6 +104,7 @@
#include "GPU_draw.h"
#include "GPU_material.h"
#include "GPU_extensions.h"
+#include "gpu_buffers.h"
#include "ED_mesh.h"
#include "ED_particle.h"
@@ -115,6 +116,7 @@
#include "UI_interface_icons.h"
#include "WM_api.h"
+#include "wm_subwindow.h"
#include "BLF_api.h"
#include "view3d_intern.h" // own include
@@ -139,7 +141,9 @@ static void draw_empty_sphere(float size);
static void draw_empty_cone(float size);
-/* ************* only use while object drawing ************** */
+/* ************* only use while object drawing **************
+ * or after running ED_view3d_init_mats_rv3d
+ * */
static void view3d_project_short_clip(ARegion *ar, float *vec, short *adr)
{
RegionView3D *rv3d= ar->regiondata;
@@ -436,11 +440,11 @@ void drawaxes(float size, int flag, char drawtype)
// patch for 3d cards crashing on glSelect for text drawing (IBM)
if((flag & DRAW_PICKING) == 0) {
if (axis==0)
- view3d_object_text_draw_add(v2[0], v2[1], v2[2], "x", 0);
+ view3d_cached_text_draw_add(v2[0], v2[1], v2[2], "x", 0);
else if (axis==1)
- view3d_object_text_draw_add(v2[0], v2[1], v2[2], "y", 0);
+ view3d_cached_text_draw_add(v2[0], v2[1], v2[2], "y", 0);
else
- view3d_object_text_draw_add(v2[0], v2[1], v2[2], "z", 0);
+ view3d_cached_text_draw_add(v2[0], v2[1], v2[2], "z", 0);
}
}
break;
@@ -498,23 +502,32 @@ static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, float *vec, int se
if(v3d->zbuf) glDepthFunc(GL_LEQUAL);
}
-/* *********** text drawing for object ************* */
-static ListBase strings= {NULL, NULL};
+/* *********** text drawing for object/particles/armature ************* */
-typedef struct ViewObjectString {
- struct ViewObjectString *next, *prev;
+static ListBase CachedText[3];
+static int CachedTextLevel= 0;
+
+typedef struct ViewCachedString {
+ struct ViewCachedString *next, *prev;
float vec[3], col[4];
char str[128];
short mval[2];
short xoffs;
-} ViewObjectString;
+} ViewCachedString;
+void view3d_cached_text_draw_begin()
+{
+ ListBase *strings= &CachedText[CachedTextLevel];
+ strings->first= strings->last= NULL;
+ CachedTextLevel++;
+}
-void view3d_object_text_draw_add(float x, float y, float z, char *str, short xoffs)
+void view3d_cached_text_draw_add(float x, float y, float z, char *str, short xoffs)
{
- ViewObjectString *vos= MEM_callocN(sizeof(ViewObjectString), "ViewObjectString");
+ ListBase *strings= &CachedText[CachedTextLevel-1];
+ ViewCachedString *vos= MEM_callocN(sizeof(ViewCachedString), "ViewCachedString");
- BLI_addtail(&strings, vos);
+ BLI_addtail(strings, vos);
BLI_strncpy(vos->str, str, 128);
vos->vec[0]= x;
vos->vec[1]= y;
@@ -523,22 +536,23 @@ void view3d_object_text_draw_add(float x, float y, float z, char *str, short xof
vos->xoffs= xoffs;
}
-static void view3d_object_text_draw(View3D *v3d, ARegion *ar)
+void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, float mat[][4])
{
- ViewObjectString *vos;
- int tot= 0;
+ RegionView3D *rv3d= ar->regiondata;
+ ListBase *strings= &CachedText[CachedTextLevel-1];
+ ViewCachedString *vos;
+ int a, tot= 0;
/* project first and test */
- for(vos= strings.first; vos; vos= vos->next) {
+ for(vos= strings->first; vos; vos= vos->next) {
+ if(mat)
+ Mat4MulVecfl(mat, vos->vec);
view3d_project_short_clip(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);
@@ -546,16 +560,22 @@ static void view3d_object_text_draw(View3D *v3d, ARegion *ar)
wmPushMatrix();
ED_region_pixelspace(ar);
- if(v3d->zbuf) glDisable(GL_DEPTH_TEST);
+ if(depth_write) {
+ if(v3d->zbuf) glDisable(GL_DEPTH_TEST);
+ }
+ else glDepthMask(0);
- for(vos= strings.first; vos; vos= vos->next) {
+ for(vos= strings->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], 0.0, vos->str);
+ BLF_draw_default((float)vos->mval[0]+vos->xoffs, (float)vos->mval[1], (depth_write)? 0.0f: 2.0f, vos->str);
}
}
- if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
+ if(depth_write) {
+ if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
+ }
+ else glDepthMask(1);
wmPopMatrix();
@@ -564,10 +584,14 @@ static void view3d_object_text_draw(View3D *v3d, ARegion *ar)
glEnable(GL_CLIP_PLANE0+a);
}
- if(strings.first)
- BLI_freelistN(&strings);
+ if(strings->first)
+ BLI_freelistN(strings);
+
+ CachedTextLevel--;
}
+/* ******************** primitive drawing ******************* */
+
static void drawcube(void)
{
@@ -1279,6 +1303,10 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob)
/* ***************** ******************** */
+/* Note! - foreach funcs should be called while drawing or directly after
+ * if not, ED_view3d_init_mats_rv3d() can be used for selection tools
+ * but would not give correct results with dupli's for eg. which dont
+ * use the object matrix in the useual way */
static void mesh_foreachScreenVert__mapFunc(void *userData, int index, float *co, float *no_f, short *no_s)
{
struct { void (*func)(void *userData, BMVert *eve, int x, int y, int index); void *userData; ViewContext vc; int clipVerts; float pmat[4][4], vmat[4][4]; } *data = userData;
@@ -1613,9 +1641,28 @@ static void draw_dm_verts__mapFunc(void *userData, int index, float *co, float *
}
}
}
+
+/* disabled because it crashes combined with e.g. subsurf modifier,
+ * the derivedmesh can't be assumed to be an EditMeshDerivedMesh,
+ * nor should this struct be copied around, it should be defined in
+ * a single place only to avoid them getting out of sync */
+#if 0
+/* originally defined in DerivedMesh.c */
+typedef struct {
+ DerivedMesh dm;
+
+ EditMesh *em;
+ float (*vertexCos)[3];
+ float (*vertexNos)[3];
+ float (*faceNos)[3];
+} EditMeshDerivedMesh;
+#endif
+
static void draw_dm_verts(BMEditMesh *em, DerivedMesh *dm, int sel, BMVert *eve_act)
{
struct { BMEditMesh *em; int sel; BMVert *eve_act; } data;
+ //GPUBuffer *buffer;
+ //float *varray;
data.sel = sel;
data.eve_act = eve_act;
data.em = em;
@@ -1623,6 +1670,59 @@ static void draw_dm_verts(BMEditMesh *em, DerivedMesh *dm, int sel, BMVert *eve_
bglBegin(GL_POINTS);
dm->foreachMappedVert(dm, draw_dm_verts__mapFunc, &data);
bglEnd();
+
+#if 0
+ /* first come the unselected vertices, then the selected */
+ buffer = GPU_buffer_legacy(dm)?0:GPU_buffer_alloc( sizeof(float)*3*dm->getNumVerts(dm)*2, 0 );
+
+ if( (varray = GPU_buffer_lock_stream( buffer )) && bglPointHack() == 0 ) {
+ EditMeshDerivedMesh *emdm= (EditMeshDerivedMesh*) dm;
+ EditVert *eve;
+ int i;
+ int numverts = 0, numselected = 0;
+ int datatype[] = { GPU_BUFFER_INTER_V3F, GPU_BUFFER_INTER_END };
+ GPU_buffer_unlock( buffer );
+ GPU_interleaved_setup( buffer, datatype );
+ varray = GPU_buffer_lock_stream( buffer );
+
+ glBegin(GL_POINTS);
+ for (i=0,eve= emdm->em->verts.first; eve; i++,eve=eve->next) {
+ if (eve->h==0 && (eve->f&SELECT)==data.sel) {
+ if (eve==data.eve_act) {
+ if (emdm->vertexCos) {
+ VECCOPY(&varray[3*(dm->getNumVerts(dm)+numselected)],emdm->vertexCos[i]);
+ }
+ else {
+ VECCOPY(&varray[3*(dm->getNumVerts(dm)+numselected)],eve->co);
+ }
+ numselected++;
+ } else {
+ if (emdm->vertexCos) {
+ VECCOPY(&varray[3*numverts],emdm->vertexCos[i]);
+ } else {
+ VECCOPY(&varray[3*numverts],eve->co);
+ }
+ numverts++;
+ }
+ }
+ }
+ glEnd();
+ GPU_buffer_unlock( buffer );
+ glDrawArrays(GL_POINTS,0,numverts);
+ UI_ThemeColor4(TH_EDITMESH_ACTIVE);
+ glDrawArrays(GL_POINTS,dm->getNumVerts(dm),numselected);
+ UI_ThemeColor4(data.sel?TH_VERTEX_SELECT:TH_VERTEX);
+ GPU_buffer_unbind();
+ }
+ {
+#endif
+ bglBegin(GL_POINTS);
+ dm->foreachMappedVert(dm, draw_dm_verts__mapFunc, &data);
+ bglEnd();
+#if 0
+ }
+ GPU_buffer_free( buffer, 0 );
+#endif
}
/* Draw edges with color set based on selection */
@@ -1680,30 +1780,73 @@ static void draw_dm_edges(BMEditMesh *em, DerivedMesh *dm)
/* Draw edges with color interpolated based on selection */
static int draw_dm_edges_sel_interp__setDrawOptions(void *userData, int index)
{
- return !BM_TestHFlag(EDBM_get_edge_for_index(((void**)userData)[1], index), BM_HIDDEN);
+ return !BM_TestHFlag(EDBM_get_edge_for_index(((void**)userData)[0], index), BM_HIDDEN);
}
static void draw_dm_edges_sel_interp__setDrawInterpOptions(void *userData, int index, float t)
{
- BMEdge *eed = EDBM_get_edge_for_index(((void**)userData)[1], index);
- unsigned char **cols = ((void**)userData)[0];
- unsigned char *col0 = cols[(BM_TestHFlag(eed->v1, BM_SELECT))?1:0];
- unsigned char *col1 = cols[(BM_TestHFlag(eed->v2, BM_SELECT))?1:0];
+ BMEdge *eed = EDBM_get_edge_for_index(((void**)userData)[0], index);
+ unsigned char **cols = userData;
+ unsigned char *col0 = cols[(BM_TestHFlag(eed->v1, BM_SELECT))?2:1];
+ unsigned char *col1 = cols[(BM_TestHFlag(eed->v2, BM_SELECT))?2:1];
glColor4ub( col0[0] + (col1[0]-col0[0])*t,
col0[1] + (col1[1]-col0[1])*t,
col0[2] + (col1[2]-col0[2])*t,
col0[3] + (col1[3]-col0[3])*t);
}
-static void draw_dm_edges_sel_interp(BMEditMesh *em, DerivedMesh *dm,
- unsigned char *baseCol, unsigned char *selCol)
-{
- unsigned char *cols[2];
- void *ptrs[2] = {cols, em};
- cols[0] = baseCol;
- cols[1] = selCol;
- dm->drawMappedEdgesInterp(dm, draw_dm_edges_sel_interp__setDrawOptions,
- draw_dm_edges_sel_interp__setDrawInterpOptions, ptrs);
+static void draw_dm_edges_sel_interp(BMEditMesh *em, DerivedMesh *dm, unsigned char *baseCol, unsigned char *selCol)
+{
+ unsigned char *cols[3] = {em, baseCol, selCol};
+#if 0
+ int elemsize = sizeof(float)*3+sizeof(unsigned char)*4;
+ EditMeshDerivedMesh *emdm = (EditMeshDerivedMesh *)dm;
+ EditMesh *em= emdm->em;
+ unsigned char *varray;
+ int i;
+ GPUBuffer *buffer;
+
+ buffer = GPU_buffer_legacy(dm)?0:GPU_buffer_alloc( elemsize*em->totedge*2, 0 );
+ if( (varray = GPU_buffer_lock_stream( buffer )) ) {
+ EditEdge *eed;
+ int numedges = 0;
+ int datatype[] = { GPU_BUFFER_INTER_V3F, GPU_BUFFER_INTER_C4UB, GPU_BUFFER_INTER_END };
+ GPU_buffer_unlock( buffer );
+ GPU_interleaved_setup( buffer, datatype );
+ varray = GPU_buffer_lock_stream( buffer );
+ for (i=0,eed= em->edges.first; eed; i++,eed= eed->next) {
+ if(eed->h==0) {
+ unsigned char *col0 = cols[(eed->v1->f&SELECT)?1:0];
+ unsigned char *col1 = cols[(eed->v2->f&SELECT)?1:0];
+
+ if( emdm->vertexCos ) {
+ VECCOPY(((float *)&varray[elemsize*numedges*2]),emdm->vertexCos[(int) eed->v1->tmp.l]);
+ }
+ else {
+ VECCOPY(((float *)&varray[elemsize*numedges*2]),eed->v1->co);
+ }
+ QUATCOPY(&varray[elemsize*numedges*2+sizeof(float)*3],col0);
+ if( emdm->vertexCos ) {
+ VECCOPY(((float *)&varray[elemsize*numedges*2+elemsize]),emdm->vertexCos[(int) eed->v2->tmp.l]);
+ }
+ else {
+ VECCOPY(((float *)&varray[elemsize*numedges*2+elemsize]),eed->v2->co);
+ }
+ QUATCOPY(&varray[elemsize*numedges*2+elemsize+sizeof(float)*3],col1);
+ numedges++;
+ }
+ }
+ GPU_buffer_unlock( buffer );
+ glDrawArrays(GL_LINES,0,numedges*2);
+ GPU_buffer_unbind();
+ }
+ else {
+#endif
+ dm->drawMappedEdgesInterp(dm, draw_dm_edges_sel_interp__setDrawOptions, draw_dm_edges_sel_interp__setDrawInterpOptions, cols);
+#if 0
+ }
+ GPU_buffer_free( buffer, 0 );
+#endif
}
/* Draw only seam edges */
@@ -1826,14 +1969,242 @@ static void draw_dm_faces_sel(BMEditMesh *em, DerivedMesh *dm, unsigned char *ba
{
struct { unsigned char *cols[3]; BMEditMesh *em; BMFace *efa_act; Mesh *me;} data;
+ //EditMeshDerivedMesh *emdm = (EditMeshDerivedMesh *)dm;
+ BMFace *efa;
+ unsigned char *col;
+ GPUBuffer *buffer;
+ unsigned char *varray;
+ unsigned char black[] = { 0, 0, 0, 0 };
+ int i, draw=0;
+ int elemsize = (sizeof(float)*6+sizeof(unsigned char)*4);
data.cols[0] = baseCol;
data.em = em;
data.cols[1] = selCol;
data.cols[2] = actCol;
data.efa_act = efa_act;
data.me = me;
-
- dm->drawMappedFaces(dm, draw_dm_faces_sel__setDrawOptions, &data, 0);
+
+#if 0 //BMESH_TODO
+ buffer = GPU_buffer_legacy(dm)?0:GPU_buffer_alloc( elemsize*dm->getNumFaces(dm)*3*2, 0 );
+ if( dm->getVertCos == 0 && (varray = GPU_buffer_lock_stream( buffer )) ) {
+ int prevdraw = 0;
+ int numfaces = 0;
+ int datatype[] = { GPU_BUFFER_INTER_V3F, GPU_BUFFER_INTER_N3F, GPU_BUFFER_INTER_C4UB, GPU_BUFFER_INTER_END };
+ GPU_buffer_unlock( buffer );
+ GPU_interleaved_setup( buffer, datatype );
+ glShadeModel(GL_SMOOTH);
+ varray = GPU_buffer_lock_stream( buffer );
+ for (i=0,efa= efa_act; efa; i++,efa= efa->next) {
+ int drawSmooth = (efa->flag & ME_SMOOTH);
+ if (efa->h==0) {
+ if (efa == data.efa_act) {
+ draw = 2;
+ } else {
+ col = data.cols[(efa->f&SELECT)?1:0];
+ if (col[3]==0) draw = 0;
+ else draw = 1;
+ }
+ }
+ else {
+ draw = 0;
+ }
+ if( prevdraw != draw && prevdraw != 0 && numfaces > 0) {
+ if( prevdraw==2 ) {
+ glEnable(GL_POLYGON_STIPPLE);
+ glPolygonStipple(stipple_quarttone);
+ }
+ GPU_buffer_unlock( buffer );
+ glDrawArrays(GL_TRIANGLES,0,numfaces*3);
+ if( prevdraw==2 ) {
+ glDisable(GL_POLYGON_STIPPLE);
+ }
+ varray = GPU_buffer_lock_stream( buffer );
+ numfaces = 0;
+ }
+
+ if( draw != 0 ) {
+ if(!drawSmooth) {
+ /*if (emdm->vertexCos) {
+ VECCOPY((float *)&varray[elemsize*3*numfaces],emdm->vertexCos[(int) efa->v1->tmp.l]);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+sizeof(float)*3],emdm->faceNos[i]);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize],emdm->vertexCos[(int) efa->v2->tmp.l]);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize+sizeof(float)*3],emdm->faceNos[i]);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2],emdm->vertexCos[(int) efa->v3->tmp.l]);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*3],emdm->faceNos[i]);
+ }
+ else {*/
+ VECCOPY((float *)&varray[elemsize*3*numfaces],efa->v1->co);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+sizeof(float)*3],efa->n);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize],efa->v2->co);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize+sizeof(float)*3],efa->n);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2],efa->v3->co);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*3],efa->n);
+ /*}*/
+ if( draw == 2 ) {
+ QUATCOPY(&varray[elemsize*3*numfaces+sizeof(float)*6],data.cols[2]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize+sizeof(float)*6],data.cols[2]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*6],data.cols[2]);
+ }
+ else if( draw == 1 ) {
+ QUATCOPY(&varray[elemsize*3*numfaces+sizeof(float)*6],data.cols[(efa->f&SELECT)?1:0]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize+sizeof(float)*6],data.cols[(efa->f&SELECT)?1:0]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*6],data.cols[(efa->f&SELECT)?1:0]);
+ }
+ else {
+ QUATCOPY(&varray[elemsize*3*numfaces+sizeof(float)*6],black);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize+sizeof(float)*6],black);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*6],black);
+ }
+
+ numfaces++;
+ if( efa->v4 ) {
+ /*if (emdm->vertexCos) {
+ VECCOPY((float *)&varray[elemsize*3*numfaces],emdm->vertexCos[(int) efa->v3->tmp.l]);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+sizeof(float)*3],emdm->faceNos[i]);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize],emdm->vertexCos[(int) efa->v4->tmp.l]);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize+sizeof(float)*3],emdm->faceNos[i]);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2],emdm->vertexCos[(int) efa->v1->tmp.l]);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*3],emdm->faceNos[i]);
+ }
+ else {*/
+ VECCOPY((float *)&varray[elemsize*3*numfaces],efa->v3->co);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+sizeof(float)*3],efa->n);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize],efa->v4->co);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize+sizeof(float)*3],efa->n);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2],efa->v1->co);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*3],efa->n);
+ /*}*/
+
+ if( draw == 2 ) {
+ QUATCOPY(&varray[elemsize*3*numfaces+sizeof(float)*6],data.cols[2]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize+sizeof(float)*6],data.cols[2]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*6],data.cols[2]);
+ }
+ else if( draw == 1 ) {
+ QUATCOPY(&varray[elemsize*3*numfaces+sizeof(float)*6],data.cols[(efa->f&SELECT)?1:0]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize+sizeof(float)*6],data.cols[(efa->f&SELECT)?1:0]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*6],data.cols[(efa->f&SELECT)?1:0]);
+ }
+ else {
+ QUATCOPY(&varray[elemsize*3*numfaces+sizeof(float)*6],black);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize+sizeof(float)*6],black);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*6],black);
+ }
+
+ numfaces++;
+ }
+ }
+ else {
+ /*if (emdm->vertexCos) {
+ VECCOPY((float *)&varray[elemsize*3*numfaces],emdm->vertexCos[(int) efa->v1->tmp.l]);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+sizeof(float)*3],emdm->vertexNos[(int) efa->v1->tmp.l]);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize],emdm->vertexCos[(int) efa->v2->tmp.l]);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize+sizeof(float)*3],emdm->vertexNos[(int) efa->v2->tmp.l]);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2],emdm->vertexCos[(int) efa->v3->tmp.l]);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*3],emdm->vertexNos[(int) efa->v3->tmp.l]);
+ }
+ else {*/
+ VECCOPY((float *)&varray[elemsize*3*numfaces],efa->v1->co);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+sizeof(float)*3],efa->v1->no);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize],efa->v2->co);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize+sizeof(float)*3],efa->v2->no);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2],efa->v3->co);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*3],efa->v3->no);
+ /*}*/
+
+ if( draw == 2 ) {
+ QUATCOPY(&varray[elemsize*3*numfaces+sizeof(float)*6],data.cols[2]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize+sizeof(float)*6],data.cols[2]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*6],data.cols[2]);
+ }
+ else if( draw == 1 ) {
+ QUATCOPY(&varray[elemsize*3*numfaces+sizeof(float)*6],data.cols[(efa->f&SELECT)?1:0]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize+sizeof(float)*6],data.cols[(efa->f&SELECT)?1:0]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*6],data.cols[(efa->f&SELECT)?1:0]);
+ }
+ else {
+ QUATCOPY(&varray[elemsize*3*numfaces+sizeof(float)*6],black);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize+sizeof(float)*6],black);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*6],black);
+ }
+
+ numfaces++;
+ if( efa->v4 ) {
+ /*if (emdm->vertexCos) {
+ VECCOPY((float *)&varray[elemsize*3*numfaces],emdm->vertexCos[(int) efa->v3->tmp.l]);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+sizeof(float)*3],emdm->vertexNos[(int) efa->v1->tmp.l]);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize],emdm->vertexCos[(int) efa->v4->tmp.l]);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize+sizeof(float)*3],emdm->vertexNos[(int) efa->v2->tmp.l]);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2],emdm->vertexCos[(int) efa->v1->tmp.l]);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*3],emdm->vertexNos[(int) efa->v3->tmp.l]);
+ }
+ else {*/
+ VECCOPY((float *)&varray[elemsize*3*numfaces],efa->v3->co);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+sizeof(float)*3],efa->v3->no);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize],efa->v4->co);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize+sizeof(float)*3],efa->v4->no);
+
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2],efa->v1->co);
+ VECCOPY((float *)&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*3],efa->v1->no);
+ /*}*/
+
+ if( draw == 2 ) {
+ QUATCOPY(&varray[elemsize*3*numfaces+sizeof(float)*6],data.cols[2]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize+sizeof(float)*6],data.cols[2]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*6],data.cols[2]);
+ }
+ else if( draw == 1 ) {
+ QUATCOPY(&varray[elemsize*3*numfaces+sizeof(float)*6],data.cols[(efa->f&SELECT)?1:0]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize+sizeof(float)*6],data.cols[(efa->f&SELECT)?1:0]);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*6],data.cols[(efa->f&SELECT)?1:0]);
+ }
+ else {
+ QUATCOPY(&varray[elemsize*3*numfaces+sizeof(float)*6],black);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize+sizeof(float)*6],black);
+ QUATCOPY(&varray[elemsize*3*numfaces+elemsize*2+sizeof(float)*6],black);
+ }
+
+ numfaces++;
+ }
+ }
+ }
+ prevdraw = draw;
+ }
+ GPU_buffer_unlock( buffer );
+ if( prevdraw != 0 && numfaces > 0) {
+ if( prevdraw==2 ) {
+ glEnable(GL_POLYGON_STIPPLE);
+ glPolygonStipple(stipple_quarttone);
+ }
+ glDrawArrays(GL_TRIANGLES,0,numfaces*3);
+ if( prevdraw==2 ) {
+ glDisable(GL_POLYGON_STIPPLE);
+ }
+ }
+ GPU_buffer_unbind();
+ } else {
+#endif
+ dm->drawMappedFaces(dm, draw_dm_faces_sel__setDrawOptions, &data, 0);
+
+#if 0
+ }
+ GPU_buffer_free( buffer, 0 );
+#endif
}
static int draw_dm_creases__setDrawOptions(void *userData, int index)
@@ -2080,7 +2451,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d,
else
sprintf(val, conv_float, VecLenf(v1, v2));
- view3d_object_text_draw_add(x, y, z, val, 0);
+ view3d_cached_text_draw_add(x, y, z, val, 0);
}
}
}
@@ -2119,7 +2490,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d,
else
sprintf(val, conv_float, area);
- view3d_object_text_draw_add(efa->cent[0], efa->cent[1], efa->cent[2], val, 0);
+ view3d_cached_text_draw_add(efa->cent[0], efa->cent[1], efa->cent[2], val, 0);
}
}
}
@@ -2159,31 +2530,31 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d,
if( (e4->f & e1->f & SELECT) || (G.moving && (efa->v1->f & SELECT)) ) {
/* Vec 1 */
- sprintf(val,"%.3f", VecAngle3(v4, v1, v2));
+ sprintf(val,"%.3f", RAD2DEG(VecAngle3(v4, v1, v2)));
VecLerpf(fvec, efa->cent, efa->v1->co, 0.8f);
- view3d_object_text_draw_add(efa->cent[0], efa->cent[1], efa->cent[2], val, 0);
+ view3d_cached_text_draw_add(efa->cent[0], efa->cent[1], efa->cent[2], val, 0);
}
if( (e1->f & e2->f & SELECT) || (G.moving && (efa->v2->f & SELECT)) ) {
/* Vec 2 */
- sprintf(val,"%.3f", VecAngle3(v1, v2, v3));
+ sprintf(val,"%.3f", RAD2DEG(VecAngle3(v1, v2, v3)));
VecLerpf(fvec, efa->cent, efa->v2->co, 0.8f);
- view3d_object_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0);
+ view3d_cached_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0);
}
if( (e2->f & e3->f & SELECT) || (G.moving && (efa->v3->f & SELECT)) ) {
/* Vec 3 */
if(efa->v4)
- sprintf(val,"%.3f", VecAngle3(v2, v3, v4));
+ sprintf(val,"%.3f", RAD2DEG(VecAngle3(v2, v3, v4)));
else
- sprintf(val,"%.3f", VecAngle3(v2, v3, v1));
+ sprintf(val,"%.3f", RAD2DEG(VecAngle3(v2, v3, v1)));
VecLerpf(fvec, efa->cent, efa->v3->co, 0.8f);
- view3d_object_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0);
+ view3d_cached_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0);
}
/* Vec 4 */
if(efa->v4) {
if( (e3->f & e4->f & SELECT) || (G.moving && (efa->v4->f & SELECT)) ) {
- sprintf(val,"%.3f", VecAngle3(v3, v4, v1));
+ sprintf(val,"%.3f", RAD2DEG(VecAngle3(v3, v4, v1)));
VecLerpf(fvec, efa->cent, efa->v4->co, 0.8f);
- view3d_object_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0);
+ view3d_cached_text_draw_add(fvec[0], fvec[1], fvec[2], val, 0);
}
}
}
@@ -2254,12 +2625,99 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object
}
}
else {
+ /* 3 floats for position, 3 for normal and times two because the faces may actually be quads instead of triangles */
+ GPUBuffer *buffer = GPU_buffer_legacy(em->derivedFinal)?0:GPU_buffer_alloc( sizeof(float)*6*em->tottri*3*2, 0 );
+ float *varray;
+ BMFace *efa;
+ BMLoop **ls;
+ int i, curmat = 0, draw = 0;
+
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, me->flag & ME_TWOSIDED);
glEnable(GL_LIGHTING);
glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW);
- finalDM->drawMappedFaces(finalDM, draw_em_fancy__setFaceOpts, em, 0);
+ if( finalDM->getVertCos == 0 && (varray = GPU_buffer_lock_stream( buffer )) ) {
+ int prevdraw = 0, prevmat = 0;
+ int numfaces = 0;
+ int datatype[] = { GPU_BUFFER_INTER_V3F, GPU_BUFFER_INTER_N3F, GPU_BUFFER_INTER_END };
+ GPU_buffer_unlock( buffer );
+ GPU_interleaved_setup( buffer, datatype );
+ glShadeModel(GL_SMOOTH);
+ varray = GPU_buffer_lock_stream( buffer );
+ for (i=0; i<em->tottri; i++) {
+ int drawSmooth;
+
+ ls = em->looptris[i];
+ efa = ls[0]->f;
+ drawSmooth = BM_TestHFlag(efa, BM_SMOOTH);
+
+ if( !BM_TestHFlag(efa, BM_HIDDEN) ) {
+ curmat = efa->mat_nr+1;
+ draw = 1;
+ }
+ else {
+ draw = 0;
+ }
+ if( ((prevdraw != draw) || (curmat != prevmat)) && prevdraw != 0 && numfaces > 0) {
+ if( prevdraw==2 ) {
+ glEnable(GL_POLYGON_STIPPLE);
+ glPolygonStipple(stipple_quarttone);
+ }
+ GPU_buffer_unlock( buffer );
+ GPU_enable_material(prevmat, NULL);
+ glDrawArrays(GL_TRIANGLES,0,numfaces*3);
+ if( prevdraw==2 ) {
+ glDisable(GL_POLYGON_STIPPLE);
+ }
+ varray = GPU_buffer_lock_stream( buffer );
+ numfaces = 0;
+ }
+ if( draw != 0 ) {
+ if(!drawSmooth) {
+ VECCOPY(&varray[numfaces*18], ls[0]->v->co);
+ VECCOPY(&varray[numfaces*18+3], efa->no);
+
+ VECCOPY(&varray[numfaces*18+6], ls[1]->v->co);
+ VECCOPY(&varray[numfaces*18+9], efa->no);
+
+ VECCOPY(&varray[numfaces*18+12], ls[2]->v->co);
+ VECCOPY(&varray[numfaces*18+15], efa->no);
+ numfaces++;
+ }
+ else {
+ VECCOPY(&varray[numfaces*18],ls[0]->v->co);
+ VECCOPY(&varray[numfaces*18+3],ls[0]->v->no);
+
+ VECCOPY(&varray[numfaces*18+6],ls[1]->v->co);
+ VECCOPY(&varray[numfaces*18+9],ls[1]->v->no);
+
+ VECCOPY(&varray[numfaces*18+12],ls[2]->v->co);
+ VECCOPY(&varray[numfaces*18+15],ls[2]->v->no);
+ numfaces++;
+ }
+ }
+ prevdraw = draw;
+ prevmat = curmat;
+ }
+ GPU_buffer_unlock( buffer );
+ if( prevdraw != 0 && numfaces > 0) {
+ if( prevdraw==2 ) {
+ glEnable(GL_POLYGON_STIPPLE);
+ glPolygonStipple(stipple_quarttone);
+ }
+ GPU_enable_material(prevmat, NULL);
+ glDrawArrays(GL_TRIANGLES,0,numfaces*3);
+ if( prevdraw==2 ) {
+ glDisable(GL_POLYGON_STIPPLE);
+ }
+ }
+ GPU_buffer_unbind();
+ }
+ else {
+ finalDM->drawMappedFaces(finalDM, draw_em_fancy__setFaceOpts, 0, 0);
+ }
+ GPU_buffer_free(buffer,0);
glFrontFace(GL_CCW);
glDisable(GL_LIGHTING);
@@ -2390,7 +2848,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object
GPU_disable_material();
}
- EM_free_index_arrays();
+ EDBM_free_index_arrays(em);
}
/* Mesh drawing routines */
@@ -3090,82 +3548,31 @@ 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)
+/* *********** drawing for particles ************* */
+static void draw_particle_arrays(int draw_as, int totpoint, int ob_dt, int select)
{
- 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();
+ /* draw created data arrays */
+ switch(draw_as){
+ case PART_DRAW_AXIS:
+ case PART_DRAW_CROSS:
+ glDrawArrays(GL_LINES, 0, 6*totpoint);
+ break;
+ case PART_DRAW_LINE:
+ glDrawArrays(GL_LINES, 0, 2*totpoint);
+ break;
+ case PART_DRAW_BB:
+ if(ob_dt<=OB_WIRE || select)
+ glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
+ else
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- if(rv3d->rflag & RV3D_CLIPPING)
- for(a=0; a<6; a++)
- glEnable(GL_CLIP_PLANE0+a);
+ glDrawArrays(GL_QUADS, 0, 4*totpoint);
+ break;
+ default:
+ glDrawArrays(GL_POINTS, 0, totpoint);
+ break;
}
-
- 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];
@@ -3208,7 +3615,7 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix
cd[7]=cd[10]=1.0;
cd[13]=cd[12]=cd[15]=cd[16]=0.0;
cd[14]=cd[17]=1.0;
- cd+=18;
+ pdd->cd+=18;
VECCOPY(vec2,state->co);
}
@@ -3330,7 +3737,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
ParticleData *pars, *pa;
ParticleKey state, *states=0;
ParticleBillboardData bb;
- ParticleDrawData pdd;
+ ParticleSimulationData sim = {scene, ob, psys, NULL};
+ ParticleDrawData *pdd = psys->pdd;
Material *ma;
float vel[3], imat[4][4];
float timestep, pixsize=1.0, pa_size, r_tilt, r_length;
@@ -3358,12 +3766,20 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
if(psys_in_edit_mode(scene, psys) && (pset->flag & PE_DRAW_PART)==0)
return;
- if(part->draw_as==PART_DRAW_NOT) return;
+ if(part->draw_as == PART_DRAW_REND)
+ draw_as = part->ren_as;
+ else
+ draw_as = part->draw_as;
+
+ if(draw_as == PART_DRAW_NOT)
+ return;
/* 2. */
+ sim.psmd = psmd = psys_get_modifier(ob,psys);
+
if(part->phystype==PART_PHYS_KEYED){
if(psys->flag&PSYS_KEYED){
- psys_count_keyed_targets(ob,psys);
+ psys_count_keyed_targets(&sim);
if(psys->totkeyed==0)
return;
}
@@ -3381,34 +3797,28 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
totchild=0;
else
totchild=psys->totchild*part->disp/100;
-
- memset(&pdd, 0, sizeof(ParticleDrawData));
ma= give_current_material(ob,part->omat);
if(v3d->zbuf) glDepthMask(1);
- if(select)
- cpack(0xFFFFFF);
- else if((ma) && (part->draw&PART_DRAW_MAT_COL)) {
+ 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
cpack(0);
- psmd= psys_get_modifier(ob,psys);
+ if(pdd) {
+ pdd->ma_r = &ma_r;
+ pdd->ma_g = &ma_g;
+ pdd->ma_b = &ma_b;
+ }
- timestep= psys_get_timestep(part);
+ timestep= psys_get_timestep(&sim);
if( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) {
float mat[4][4];
@@ -3418,11 +3828,6 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
totpart=psys->totpart;
- if(part->draw_as==PART_DRAW_REND)
- draw_as = part->ren_as;
- else
- draw_as = part->draw_as;
-
//if(part->flag&PART_GLOB_TIME)
cfra=bsystem_time(scene, 0, (float)CFRA, 0.0f);
@@ -3452,6 +3857,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
pixsize*=2.0;
else
pixsize*=part->draw_size;
+
+ if(draw_as==PART_DRAW_AXIS)
+ create_cdata = 1;
break;
case PART_DRAW_OB:
if(part->dup_ob==0)
@@ -3499,57 +3907,73 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
Normalize(imat[1]);
}
+ if(!create_cdata && pdd && pdd->cdata) {
+ MEM_freeN(pdd->cdata);
+ pdd->cdata = pdd->cd = NULL;
+ }
+
/* 4. */
- if(draw_as && draw_as!=PART_DRAW_PATH) {
+ if(draw_as && ELEM(draw_as, PART_DRAW_PATH, PART_DRAW_CIRC)==0) {
int tot_vec_size = (totpart + totchild) * 3 * sizeof(float);
-
+ int create_ndata = 0;
+
+ if(!pdd)
+ pdd = psys->pdd = MEM_callocN(sizeof(ParticleDrawData), "ParticlDrawData");
+
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)
- 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)
- 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)
- 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)
- pdd.cdata=MEM_callocN(tot_vec_size, "particle_cdata");
- pdd.vdata=MEM_callocN(tot_vec_size, "particle_vdata");
- }
+ switch(draw_as) {
+ case PART_DRAW_AXIS:
+ case PART_DRAW_CROSS:
+ tot_vec_size *= 6;
+ if(draw_as != PART_DRAW_CROSS)
+ create_cdata = 1;
+ break;
+ case PART_DRAW_LINE:
+ tot_vec_size *= 2;
+ break;
+ case PART_DRAW_BB:
+ tot_vec_size *= 4;
+ create_ndata = 1;
+ break;
}
+ if(pdd->tot_vec_size != tot_vec_size)
+ psys_free_pdd(psys);
+
+ if(!pdd->vdata)
+ pdd->vdata = MEM_callocN(tot_vec_size, "particle_vdata");
+ if(create_cdata && !pdd->cdata)
+ pdd->cdata = MEM_callocN(tot_vec_size, "particle_cdata");
+ if(create_ndata && !pdd->ndata)
+ pdd->ndata = MEM_callocN(tot_vec_size, "particle_vdata");
+
if(part->draw & PART_DRAW_VEL && draw_as != PART_DRAW_LINE) {
- pdd.vedata = MEM_callocN(tot_vec_size * 2, "particle_vedata");
+ if(!pdd->vedata)
+ pdd->vedata = MEM_callocN(2 * (totpart + totchild) * 3 * sizeof(float), "particle_vedata");
+
need_v = 1;
}
- pdd.vd= pdd.vdata;
- pdd.ved= pdd.vedata;
- pdd.cd= pdd.cdata;
- pdd.nd= pdd.ndata;
-
- psys->lattice= psys_get_lattice(scene, ob, psys);
+ pdd->vd= pdd->vdata;
+ pdd->ved= pdd->vedata;
+ pdd->cd= pdd->cdata;
+ pdd->nd= pdd->ndata;
+ pdd->tot_vec_size= tot_vec_size;
}
- if(draw_as){
+ psys->lattice= psys_get_lattice(&sim);
+
+ if(pdd && draw_as!=PART_DRAW_PATH){
/* 5. */
- for(a=0,pa=pars; a<totpart+totchild; a++, pa++){
+ if((pdd->flag & PARTICLE_DRAW_DATA_UPDATED)
+ && (pdd->vedata || part->draw & (PART_DRAW_SIZE|PART_DRAW_NUM|PART_DRAW_HEALTH))==0) {
+ totpoint = pdd->totpoint; /* draw data is up to date */
+ }
+ else for(a=0,pa=pars; a<totpart+totchild; a++, pa++){
/* setup per particle individual stuff */
if(a<totpart){
if(totchild && (part->draw&PART_DRAW_PARENT)==0) continue;
@@ -3559,9 +3983,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
pa_birthtime=pa->time;
pa_dietime = pa->dietime;
pa_size=pa->size;
- if(part->phystype==PART_PHYS_BOIDS) {
+ if(part->phystype==PART_PHYS_BOIDS)
pa_health = pa->boid->data.health;
- }
else
pa_health = -1.0;
@@ -3596,10 +4019,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
}
#endif // XXX old animation system
- BLI_srandom(psys->seed+a);
-
- r_tilt = 2.0f*(BLI_frand() - 0.5f);
- r_length = BLI_frand();
+ r_tilt = 2.0f*(PSYS_FRAND(a + 21) - 0.5f);
+ r_length = PSYS_FRAND(a + 22);
}
else{
ChildParticle *cpa= &psys->child[a-totpart];
@@ -3630,160 +4051,143 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
pa_health = -1.0;
- r_tilt = 2.0f * cpa->rand[2];
- r_length = cpa->rand[1];
+ r_tilt = 2.0f*(PSYS_FRAND(a + 21) - 0.5f);
+ r_length = PSYS_FRAND(a + 22);
}
- if(draw_as!=PART_DRAW_PATH){
- 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)
+ 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;
- 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 = ct;
- }
+ state.time = (part->draw & PART_ABS_PATH_TIME) ? -ct : -(pa_birthtime + ct * (pa_dietime - pa_birthtime));
+ psys_get_particle_on_path(&sim,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 = ct;
+ }
- draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, &pdd);
+ draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, psys->pdd);
- totpoint++;
- drawn = 1;
- }
+ 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;
- }
+ }
+ else
+ {
+ state.time=cfra;
+ if(psys_get_particle_state(&sim,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;
+ }
- draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, &pdd);
+ draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, pdd);
- totpoint++;
- drawn = 1;
- }
+ totpoint++;
+ drawn = 1;
}
+ }
- if(drawn) {
- /* additional things to draw for each particle */
- /* (velocity, size and number) */
- if(pdd.vedata){
- VECCOPY(pdd.ved,state.co);
- pdd.ved+=3;
- VECCOPY(vel,state.vel);
- VecMulf(vel,timestep);
- VECADD(pdd.ved,state.co,vel);
- pdd.ved+=3;
-
- totve++;
- }
+ if(drawn) {
+ /* additional things to draw for each particle */
+ /* (velocity, size and number) */
+ if(pdd->vedata){
+ VECCOPY(pdd->ved,state.co);
+ pdd->ved+=3;
+ VECCOPY(vel,state.vel);
+ VecMulf(vel,timestep);
+ VECADD(pdd->ved,state.co,vel);
+ pdd->ved+=3;
+
+ totve++;
+ }
- if(part->draw & PART_DRAW_SIZE){
- setlinestyle(3);
- drawcircball(GL_LINE_LOOP, state.co, pa_size, imat);
- setlinestyle(0);
- }
+ if(part->draw & PART_DRAW_SIZE){
+ setlinestyle(3);
+ drawcircball(GL_LINE_LOOP, state.co, pa_size, imat);
+ setlinestyle(0);
+ }
- if((part->draw&PART_DRAW_NUM || part->draw&PART_DRAW_HEALTH) && !(G.f & G_RENDER_SHADOW)){
- val[0]= '\0';
-
- if(part->draw&PART_DRAW_NUM)
- sprintf(val, " %i", a);
+ if((part->draw&PART_DRAW_NUM || part->draw&PART_DRAW_HEALTH) && !(G.f & G_RENDER_SHADOW)){
+ val[0]= '\0';
+
+ if(part->draw&PART_DRAW_NUM)
+ sprintf(val, " %i", a);
- if(part->draw&PART_DRAW_NUM && part->draw&PART_DRAW_HEALTH)
- sprintf(val, "%s:", val);
+ if(part->draw&PART_DRAW_NUM && part->draw&PART_DRAW_HEALTH)
+ sprintf(val, "%s:", val);
- if(part->draw&PART_DRAW_HEALTH && a < totpart && part->phystype==PART_PHYS_BOIDS)
- sprintf(val, "%s %.2f", val, pa_health);
+ if(part->draw&PART_DRAW_HEALTH && a < totpart && part->phystype==PART_PHYS_BOIDS)
+ sprintf(val, "%s %.2f", val, pa_health);
- /* in path drawing state.co is the end point */
- view3d_particle_text_draw_add(state.co[0], state.co[1], state.co[2], val, 0);
- }
+ /* in path drawing state.co is the end point */
+ view3d_cached_text_draw_add(state.co[0], state.co[1], state.co[2], val, 0);
}
}
}
+ }
/* 6. */
- glGetIntegerv(GL_POLYGON_MODE, polygonmode);
- glDisableClientState(GL_NORMAL_ARRAY);
-
- if(draw_as==PART_DRAW_PATH){
- ParticleCacheKey **cache, *path;
- float *cd2=0,*cdata2=0;
+ glGetIntegerv(GL_POLYGON_MODE, polygonmode);
+ glDisableClientState(GL_NORMAL_ARRAY);
- glEnableClientState(GL_VERTEX_ARRAY);
+ if(draw_as==PART_DRAW_PATH){
+ ParticleCacheKey **cache, *path;
+ float *cd2=0,*cdata2=0;
- /* setup gl flags */
- if(ob_dt > OB_WIRE) {
- glEnableClientState(GL_NORMAL_ARRAY);
+ glEnableClientState(GL_VERTEX_ARRAY);
- if(part->draw&PART_DRAW_MAT_COL)
- glEnableClientState(GL_COLOR_ARRAY);
-
- glEnable(GL_LIGHTING);
- glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
- glEnable(GL_COLOR_MATERIAL);
- }
- else {
- glDisableClientState(GL_NORMAL_ARRAY);
+ /* setup gl flags */
+ if(ob_dt > OB_WIRE) {
+ glEnableClientState(GL_NORMAL_ARRAY);
- glDisable(GL_COLOR_MATERIAL);
- glDisable(GL_LIGHTING);
- UI_ThemeColor(TH_WIRE);
- }
+ if(part->draw&PART_DRAW_MAT_COL)
+ glEnableClientState(GL_COLOR_ARRAY);
- if(totchild && (part->draw&PART_DRAW_PARENT)==0)
- totpart=0;
+ glEnable(GL_LIGHTING);
+ glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
+ glEnable(GL_COLOR_MATERIAL);
+ }
+ else {
+ glDisableClientState(GL_NORMAL_ARRAY);
- /* draw actual/parent particles */
- cache=psys->pathcache;
- for(a=0, pa=psys->particles; a<totpart; a++, pa++){
- path=cache[a];
- if(path->steps > 0) {
- glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co);
+ glDisable(GL_COLOR_MATERIAL);
+ glDisable(GL_LIGHTING);
+ UI_ThemeColor(TH_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);
- }
+ if(totchild && (part->draw&PART_DRAW_PARENT)==0)
+ totpart=0;
- glDrawArrays(GL_LINE_STRIP, 0, path->steps + 1);
- }
- }
-
- /* draw child particles */
- cache=psys->childcache;
- for(a=0; a<totchild; a++){
- path=cache[a];
+ /* draw actual/parent particles */
+ cache=psys->pathcache;
+ for(a=0, pa=psys->particles; a<totpart; a++, pa++){
+ path=cache[a];
+ if(path->steps > 0) {
glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co);
if(ob_dt > OB_WIRE) {
@@ -3794,83 +4198,103 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
glDrawArrays(GL_LINE_STRIP, 0, path->steps + 1);
}
+ }
+
+ /* draw child particles */
+ cache=psys->childcache;
+ for(a=0; a<totchild; a++){
+ path=cache[a];
+ glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co);
-
- /* restore & clean up */
if(ob_dt > OB_WIRE) {
+ glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), path->vel);
if(part->draw&PART_DRAW_MAT_COL)
- glDisable(GL_COLOR_ARRAY);
- glDisable(GL_COLOR_MATERIAL);
+ glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->col);
}
- if(cdata2)
- MEM_freeN(cdata2);
- cd2=cdata2=0;
+ glDrawArrays(GL_LINE_STRIP, 0, path->steps + 1);
+ }
+
- glLineWidth(1.0f);
+ /* restore & clean up */
+ if(ob_dt > OB_WIRE) {
+ if(part->draw&PART_DRAW_MAT_COL)
+ glDisable(GL_COLOR_ARRAY);
+ glDisable(GL_COLOR_MATERIAL);
}
- else if(draw_as!=PART_DRAW_CIRC){
- glDisableClientState(GL_COLOR_ARRAY);
- /* setup created data arrays */
- if(pdd.vdata){
- glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(3, GL_FLOAT, 0, pdd.vdata);
- }
+ if(cdata2)
+ MEM_freeN(cdata2);
+ cd2=cdata2=0;
+
+ glLineWidth(1.0f);
+ }
+ else if(pdd && ELEM(draw_as, 0, PART_DRAW_CIRC)==0){
+ glDisableClientState(GL_COLOR_ARRAY);
+
+ /* enable point data array */
+ if(pdd->vdata){
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(3, GL_FLOAT, 0, pdd->vdata);
+ }
+ else
+ glDisableClientState(GL_VERTEX_ARRAY);
+
+ if(select) {
+ UI_ThemeColor(TH_ACTIVE);
+
+ if(part->draw_size)
+ glPointSize(part->draw_size + 2);
else
- glDisableClientState(GL_VERTEX_ARRAY);
+ glPointSize(4.0);
- /* billboards are drawn this way */
- if(pdd.ndata && ob_dt>OB_WIRE){
- glEnableClientState(GL_NORMAL_ARRAY);
- glNormalPointer(GL_FLOAT, 0, pdd.ndata);
- glEnable(GL_LIGHTING);
- }
- else{
- glDisableClientState(GL_NORMAL_ARRAY);
- glDisable(GL_LIGHTING);
- }
+ glLineWidth(3.0);
- if(pdd.cdata){
- glEnableClientState(GL_COLOR_ARRAY);
- glColorPointer(3, GL_FLOAT, 0, pdd.cdata);
- }
+ draw_particle_arrays(draw_as, totpoint, ob_dt, 1);
+ }
- /* draw created data arrays */
- switch(draw_as){
- case PART_DRAW_AXIS:
- case PART_DRAW_CROSS:
- glDrawArrays(GL_LINES, 0, 6*totpoint);
- break;
- case PART_DRAW_LINE:
- glDrawArrays(GL_LINES, 0, 2*totpoint);
- break;
- case PART_DRAW_BB:
- if(ob_dt<=OB_WIRE)
- glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
-
- glDrawArrays(GL_QUADS, 0, 4*totpoint);
- break;
- default:
- glDrawArrays(GL_POINTS, 0, totpoint);
- break;
- }
+ /* restore from select */
+ glColor3f(ma_r,ma_g,ma_b);
+ glPointSize(part->draw_size ? part->draw_size : 2.0);
+ glLineWidth(1.0);
+
+ /* enable other data arrays */
+
+ /* billboards are drawn this way */
+ if(pdd->ndata && ob_dt>OB_WIRE){
+ glEnableClientState(GL_NORMAL_ARRAY);
+ glNormalPointer(GL_FLOAT, 0, pdd->ndata);
+ glEnable(GL_LIGHTING);
+ }
+ else{
+ glDisableClientState(GL_NORMAL_ARRAY);
+ glDisable(GL_LIGHTING);
}
- if(pdd.vedata){
- glDisableClientState(GL_COLOR_ARRAY);
- cpack(0xC0C0C0);
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(3, GL_FLOAT, 0, pdd.vedata);
-
- glDrawArrays(GL_LINES, 0, 2*totve);
+ if(pdd->cdata){
+ glEnableClientState(GL_COLOR_ARRAY);
+ glColorPointer(3, GL_FLOAT, 0, pdd->cdata);
}
- glPolygonMode(GL_FRONT, polygonmode[0]);
- glPolygonMode(GL_BACK, polygonmode[1]);
+ draw_particle_arrays(draw_as, totpoint, ob_dt, 0);
+
+ pdd->flag |= PARTICLE_DRAW_DATA_UPDATED;
+ pdd->totpoint = totpoint;
+ }
+
+ if(pdd && pdd->vedata){
+ glDisableClientState(GL_COLOR_ARRAY);
+ cpack(0xC0C0C0);
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(3, GL_FLOAT, 0, pdd->vedata);
+
+ glDrawArrays(GL_LINES, 0, 2*totve);
}
+ glPolygonMode(GL_FRONT, polygonmode[0]);
+ glPolygonMode(GL_BACK, polygonmode[1]);
+
/* 7. */
glDisable(GL_LIGHTING);
@@ -3879,17 +4303,15 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
if(states)
MEM_freeN(states);
- 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;
+ /* draw data can't be saved for billboards as they must update to target changes */
+ if(draw_as == PART_DRAW_BB) {
+ psys_free_pdd(psys);
+ pdd->flag &= ~PARTICLE_DRAW_DATA_UPDATED;
+ }
+
if(psys->lattice){
end_latt_deform(psys->lattice);
psys->lattice= NULL;
@@ -3913,10 +4335,8 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Obj
float *pathcol = NULL, *pcol;
- if(edit->psys && edit->psys->flag & PSYS_HAIR_UPDATED) {
+ if(edit->psys && edit->psys->flag & PSYS_HAIR_UPDATED)
PE_update_object(scene, ob, 0);
- edit->psys->flag &= ~PSYS_HAIR_UPDATED;
- }
/* create path and child path cache if it doesn't exist already */
if(edit->pathcache==0)
@@ -3990,7 +4410,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Obj
if(!(point->flag & PEP_HIDE))
totkeys += point->totkey;
- if(!(edit->points->keys->flag & PEK_USE_WCO))
+ if(edit->points && !(edit->points->keys->flag & PEK_USE_WCO))
pd=pdata=MEM_callocN(totkeys*3*sizeof(float), "particle edit point data");
cd=cdata=MEM_callocN(totkeys*(timed?4:3)*sizeof(float), "particle edit color data");
@@ -4947,8 +5367,9 @@ static void drawtexspace(Object *ob)
}
/* draws wire outline */
-static void drawSolidSelect(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base)
+static void drawSolidSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
{
+ RegionView3D *rv3d= ar->regiondata;
Object *ob= base->object;
glLineWidth(2.0);
@@ -4967,7 +5388,7 @@ static void drawSolidSelect(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base
}
else if(ob->type==OB_ARMATURE) {
if(!(ob->mode & OB_MODE_POSE))
- draw_armature(scene, v3d, rv3d, base, OB_WIRE, 0);
+ draw_armature(scene, v3d, ar, base, OB_WIRE, 0);
}
glLineWidth(1.0);
@@ -5077,11 +5498,11 @@ void drawRBpivot(bRigidBodyJointConstraint *data)
glVertex3fv(v);
glEnd();
if (axis==0)
- view3d_object_text_draw_add(v[0], v[1], v[2], "px", 0);
+ view3d_cached_text_draw_add(v[0], v[1], v[2], "px", 0);
else if (axis==1)
- view3d_object_text_draw_add(v[0], v[1], v[2], "py", 0);
+ view3d_cached_text_draw_add(v[0], v[1], v[2], "py", 0);
else
- view3d_object_text_draw_add(v[0], v[1], v[2], "pz", 0);
+ view3d_cached_text_draw_add(v[0], v[1], v[2], "pz", 0);
}
glLineWidth (1.0f);
setlinestyle(0);
@@ -5124,6 +5545,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
}
+ /* no return after this point, otherwise leaks */
+ view3d_cached_text_draw_begin();
+
/* draw keys? */
#if 0 // XXX old animation system
if(base==(scene->basact) || (base->flag & (SELECT+BA_WAS_SEL))) {
@@ -5206,11 +5630,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
/* draw paths... */
// TODO...
- /* multiply view with object matrix */
- wmMultMatrix(ob->obmat);
- /* local viewmat and persmat, to calculate projections */
- wmGetMatrix(rv3d->viewmatob);
- wmGetSingleMatrix(rv3d->persmatob);
+ /* multiply view with object matrix.
+ * local viewmat and persmat, to calculate projections */
+ ED_view3d_init_mats_rv3d(ob, rv3d);
/* which wire color */
if((flag & DRAW_CONSTCOLOR) == 0) {
@@ -5267,7 +5689,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if(ob==OBACT && (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT))) {
if(ob->type==OB_MESH) {
- if(ob==scene->obedit);
+ if(ob->mode & OB_MODE_EDIT);
else {
if(dt<OB_SOLID)
zbufoff= 1;
@@ -5289,7 +5711,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if(dt>=OB_BOUNDBOX ) {
dtx= ob->dtx;
- if(scene->obedit==ob) {
+ if(ob->mode & OB_MODE_EDIT) {
// the only 2 extra drawtypes alowed in editmode
dtx= dtx & (OB_DRAWWIRE|OB_TEXSPACE);
}
@@ -5305,20 +5727,18 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
/* draw outline for selected solid objects, mesh does itself */
if((v3d->flag & V3D_SELECT_OUTLINE) && ob->type!=OB_MESH) {
- if(dt>OB_WIRE && dt<OB_TEXTURE && ob!=scene->obedit && (flag && DRAW_SCENESET)==0) {
+ if(dt>OB_WIRE && dt<OB_TEXTURE && (ob->mode & OB_MODE_EDIT)==0 && (flag & DRAW_SCENESET)==0) {
if (!(ob->dtx&OB_DRAWWIRE) && (ob->flag&SELECT) && !(flag&DRAW_PICKING)) {
- drawSolidSelect(scene, v3d, rv3d, base);
+ drawSolidSelect(scene, v3d, ar, base);
}
}
}
switch( ob->type) {
case OB_MESH:
- if (!(base->flag&OB_RADIO)) {
- empty_object= draw_mesh_object(scene, v3d, rv3d, base, dt, flag);
- if(flag!=DRAW_CONSTCOLOR) dtx &= ~OB_DRAWWIRE; // mesh draws wire itself
- }
+ empty_object= draw_mesh_object(scene, v3d, rv3d, base, dt, flag);
+ if(flag!=DRAW_CONSTCOLOR) dtx &= ~OB_DRAWWIRE; // mesh draws wire itself
break;
case OB_FONT:
@@ -5454,7 +5874,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
break;
case OB_ARMATURE:
if(dt>OB_WIRE) GPU_enable_material(0, NULL); // we use default material
- empty_object= draw_armature(scene, v3d, rv3d, base, dt, flag);
+ empty_object= draw_armature(scene, v3d, ar, base, dt, flag);
if(dt>OB_WIRE) GPU_disable_material();
break;
default:
@@ -5474,10 +5894,12 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
wmLoadMatrix(rv3d->viewmat);
+ view3d_cached_text_draw_begin();
+
for(psys=ob->particlesystem.first; psys; psys=psys->next)
draw_new_particle_system(scene, v3d, rv3d, base, psys, dt);
- view3d_particle_text_draw(v3d, ar);
+ view3d_cached_text_draw_end(v3d, ar, 0, NULL);
wmMultMatrix(ob->obmat);
@@ -5629,7 +6051,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
/* patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing */
/* but, we also dont draw names for sets or duplicators */
if(flag == 0) {
- view3d_object_text_draw_add(0.0f, 0.0f, 0.0f, ob->id.name+2, 10);
+ view3d_cached_text_draw_add(0.0f, 0.0f, 0.0f, ob->id.name+2, 10);
}
}
/*if(dtx & OB_DRAWIMAGE) drawDispListwire(&ob->disp);*/
@@ -5652,14 +6074,14 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
/* return warning, this is cached text draw */
- view3d_object_text_draw(v3d, ar);
+ view3d_cached_text_draw_end(v3d, ar, 1, NULL);
wmLoadMatrix(rv3d->viewmat);
if(zbufoff) glDisable(GL_DEPTH_TEST);
if(warning_recursive) return;
- if(base->flag & (OB_FROMDUPLI|OB_RADIO)) return;
+ if(base->flag & OB_FROMDUPLI) return;
if(G.f & G_RENDER_SHADOW) return;
/* object centers, need to be drawn in viewmat space for speed, but OK for picking select */
@@ -5851,6 +6273,16 @@ static int bbs_mesh_solid__setDrawOpts(void *userData, int index, int *drawSmoot
return 0;
if (!(me->mpoly[index].flag&ME_HIDE)) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+static int bbs_mesh_solid__setDrawOpts_legacy(void *userData, int index, int *drawSmooth_r)
+{
+ Mesh *me = userData;
+
+ if (!(me->mface[index].flag&ME_HIDE)) {
WM_set_framebuffer_index_color(index+1);
return 1;
} else {
@@ -5863,9 +6295,41 @@ static void bbs_mesh_solid(Scene *scene, View3D *v3d, Object *ob)
{
DerivedMesh *dm = mesh_get_derived_final(scene, ob, v3d->customdata_mask);
Mesh *me = (Mesh*)ob->data;
+ MCol *colors;
+ int i,j;
glColor3ub(0, 0, 0);
- dm->drawMappedFaces(dm, bbs_mesh_solid__setDrawOpts, me, 0);
+
+ if( !GPU_buffer_legacy(dm) ) {
+ int *index = DM_get_face_data_layer(dm, CD_ORIGINDEX);
+ int ind;
+ colors = MEM_mallocN(dm->getNumTessFaces(dm)*sizeof(MCol)*4,"bbs_mesh_solid");
+ for(i=0;i<dm->getNumFaces(dm);i++) {
+ if( index != 0 )
+ ind = index[i];
+ else
+ ind = i;
+ if (!(me->mface[ind].flag&ME_HIDE)) {
+ unsigned int fbindex = index_to_framebuffer(ind+1);
+ for(j=0;j<4;j++) {
+ colors[i*4+j].b = ((fbindex)&0xFF);
+ colors[i*4+j].g = (((fbindex)>>8)&0xFF);
+ colors[i*4+j].r = (((fbindex)>>16)&0xFF);
+ }
+ }
+ else {
+ memset(&colors[i*4],0,sizeof(MCol)*4);
+ }
+ }
+
+ CustomData_add_layer( &dm->faceData, CD_ID_MCOL, CD_ASSIGN, colors, dm->numFaceData );
+ GPU_buffer_free(dm->drawObject->colors,0);
+ dm->drawObject->colors = 0;
+ dm->drawMappedFaces(dm, bbs_mesh_solid__setDrawOpts, me, 1);
+ }
+ else {
+ dm->drawMappedFaces(dm, bbs_mesh_solid__setDrawOpts_legacy, me, 0);
+ }
dm->release(dm);
}
@@ -5882,7 +6346,7 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
switch( ob->type) {
case OB_MESH:
{
- if(ob == scene->obedit) {
+ if(ob->mode & OB_MODE_EDIT) {
Mesh *me= ob->data;
BMEditMesh *em= me->edit_btmesh;
@@ -5938,7 +6402,7 @@ static void draw_object_mesh_instance(Scene *scene, View3D *v3d, RegionView3D *r
DerivedMesh *dm=NULL, *edm=NULL;
int glsl;
- if(ob == scene->obedit)
+ if(ob->mode & OB_MODE_EDIT)
edm= editbmesh_get_derived_base(ob, me->edit_btmesh);
else
dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index 0bdc65b5461..ef3627e2b12 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -169,7 +169,6 @@ static int larger_pow2(int n)
void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture *tex, float *min, float *max, int res[3], float dx, GPUTexture *tex_shadow)
{
- Object *ob = base->object;
RegionView3D *rv3d= ar->regiondata;
float viewnormal[3];
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index b5e5de928b5..2cade9bb685 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -158,6 +158,24 @@ RegionView3D *ED_view3d_context_rv3d(bContext *C)
return rv3d;
}
+/* Most of the time this isn't needed since you could assume the view matrix was
+ * set while drawing, however when functions like mesh_foreachScreenVert are
+ * called by selection tools, we can't be sure this object was the last.
+ *
+ * for example, transparent objects are drawn after editmode and will cause
+ * the rv3d mat's to change and break selection.
+ *
+ * 'ED_view3d_init_mats_rv3d' should be called before
+ * view3d_project_short_clip and view3d_project_short_noclip in cases where
+ * these functions are not used during draw_object
+ */
+void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d)
+{
+ wmMultMatrix(ob->obmat);
+ /* local viewmat and persmat, to calculate projections */
+ wmGetMatrix(rv3d->viewmatob);
+ wmGetSingleMatrix(rv3d->persmatob);
+}
/* ******************** default callbacks for view3d space ***************** */
@@ -259,7 +277,6 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl)
if(v3do->localvd) {
v3do->localvd= NULL;
v3do->properties_storage= NULL;
- v3do->localview= 0;
v3do->lay= v3dn->localvd->lay;
v3do->lay &= 0xFFFFFF;
}
@@ -275,101 +292,69 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl)
return (SpaceLink *)v3dn;
}
-static void view3d_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype)
-{
- RegionView3D *rv3d= ar->regiondata;
- ListBase *keymap;
-
- /* copy last mode, then we can re-init the region maps */
- rv3d->lastmode= stype;
-
- keymap= WM_keymap_listbase(wm, "Object Mode", 0, 0);
- if(ELEM(stype, 0, NS_MODE_OBJECT))
- WM_event_add_keymap_handler(&ar->handlers, keymap);
- else
- WM_event_remove_keymap_handler(&ar->handlers, keymap);
-
- keymap= WM_keymap_listbase(wm, "EditMesh", 0, 0);
- if(stype==NS_EDITMODE_MESH)
- WM_event_add_keymap_handler(&ar->handlers, keymap);
- else
- WM_event_remove_keymap_handler(&ar->handlers, keymap);
-
- keymap= WM_keymap_listbase(wm, "Curve", 0, 0);
- if(stype==NS_EDITMODE_CURVE)
- WM_event_add_keymap_handler(&ar->handlers, keymap);
- else
- WM_event_remove_keymap_handler(&ar->handlers, keymap);
-
- keymap= WM_keymap_listbase(wm, "Armature", 0, 0);
- if(stype==NS_EDITMODE_ARMATURE)
- WM_event_add_keymap_handler(&ar->handlers, keymap);
- else
- WM_event_remove_keymap_handler(&ar->handlers, keymap);
-
- keymap= WM_keymap_listbase(wm, "Pose", 0, 0);
- if(stype==NS_MODE_POSE)
- WM_event_add_keymap_handler(&ar->handlers, keymap);
- else
- WM_event_remove_keymap_handler(&ar->handlers, keymap);
-
- keymap= WM_keymap_listbase(wm, "Metaball", 0, 0);
- if(stype==NS_EDITMODE_MBALL)
- WM_event_add_keymap_handler(&ar->handlers, keymap);
- 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_ARMATURE)
- WM_event_add_keymap_handler_priority(&ar->handlers, keymap, 10);
- else
- WM_event_remove_keymap_handler(&ar->handlers, keymap);
-
- keymap= WM_keymap_listbase(wm, "Particle", 0, 0);
- if(stype==NS_MODE_PARTICLE)
- WM_event_add_keymap_handler(&ar->handlers, keymap);
- else
- WM_event_remove_keymap_handler(&ar->handlers, keymap);
-
- /* editfont keymap swallows all... */
- keymap= WM_keymap_listbase(wm, "Font", 0, 0);
- if(stype==NS_EDITMODE_TEXT)
- 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 */
static void view3d_main_area_init(wmWindowManager *wm, ARegion *ar)
{
- RegionView3D *rv3d= ar->regiondata;
- ListBase *keymap;
+ wmKeyMap *keymap;
+
+ /* object ops. */
+
+ /* pose is not modal, operator poll checks for this */
+ keymap= WM_keymap_find(wm->defaultconf, "Pose", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
- /* own keymap */
- keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "Object Mode", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+
+ keymap= WM_keymap_find(wm->defaultconf, "Image Paint", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_listbase(wm, "View3D", SPACE_VIEW3D, 0);
+
+ keymap= WM_keymap_find(wm->defaultconf, "Vertex Paint", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+
+ keymap= WM_keymap_find(wm->defaultconf, "Weight Paint", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+
+ keymap= WM_keymap_find(wm->defaultconf, "Sculpt", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- /* object ops. */
- keymap= WM_keymap_listbase(wm, "Object Non-modal", 0, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "EditMesh", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- /* pose is not modal, operator poll checks for this */
- keymap= WM_keymap_listbase(wm, "Pose", 0, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "Curve", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+
+ keymap= WM_keymap_find(wm->defaultconf, "Armature", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+
+ keymap= WM_keymap_find(wm->defaultconf, "Pose", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+
+ keymap= WM_keymap_find(wm->defaultconf, "Metaball", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- /* modal ops keymaps */
- view3d_modal_keymaps(wm, ar, rv3d->lastmode);
- /* operator poll checks for modes */
- keymap= WM_keymap_listbase(wm, "ImagePaint", 0, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "Lattice", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+
+ /* armature sketching needs to take over mouse */
+ keymap= WM_keymap_find(wm->defaultconf, "Armature_Sketch", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+
+ keymap= WM_keymap_find(wm->defaultconf, "Particle", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+
+ /* editfont keymap swallows all... */
+ keymap= WM_keymap_find(wm->defaultconf, "Font", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+
+ keymap= WM_keymap_find(wm->defaultconf, "Object Non-modal", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+
+ /* own keymap, last so modes can override it */
+ keymap= WM_keymap_find(wm->defaultconf, "View3D Generic", SPACE_VIEW3D, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+
+ keymap= WM_keymap_find(wm->defaultconf, "View3D", SPACE_VIEW3D, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -444,7 +429,6 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case ND_MODE:
- view3d_modal_keymaps(wmn->wm, ar, wmn->subtype);
ED_region_tag_redraw(ar);
break;
}
@@ -454,6 +438,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
case ND_TRANSFORM:
+ case ND_POSE:
case ND_DRAW:
case ND_MODIFIER:
case ND_CONSTRAINT:
@@ -482,12 +467,21 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
}
+ break;
+ case NC_WORLD:
+ switch(wmn->data) {
+ case ND_WORLD_DRAW:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
case NC_LAMP:
switch(wmn->data) {
case ND_LIGHTING_DRAW:
ED_region_tag_redraw(ar);
break;
}
+ break;
case NC_IMAGE:
/* this could be more fine grained checks if we had
* more context than just the region */
@@ -516,7 +510,7 @@ static void view3d_main_area_cursor(wmWindow *win, ScrArea *sa, ARegion *ar)
/* add handlers, stuff you only do once or on area/region changes */
static void view3d_header_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0);
+ wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "View3D Generic", SPACE_VIEW3D, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
@@ -552,11 +546,11 @@ static void view3d_header_area_listener(ARegion *ar, wmNotifier *wmn)
/* add handlers, stuff you only do once or on area/region changes */
static void view3d_buttons_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "View3D Generic", SPACE_VIEW3D, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -594,6 +588,7 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
case ND_TRANSFORM:
+ case ND_POSE:
case ND_DRAW:
case ND_KEYS:
ED_region_tag_redraw(ar);
@@ -608,6 +603,10 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
break;
}
break;
+ case NC_BRUSH:
+ if(wmn->action==NA_EDITED)
+ ED_region_tag_redraw(ar);
+ break;
case NC_SPACE:
if(wmn->data == ND_SPACE_VIEW3D)
ED_region_tag_redraw(ar);
@@ -618,16 +617,14 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
/* add handlers, stuff you only do once or on area/region changes */
static void view3d_tools_area_init(wmWindowManager *wm, ARegion *ar)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "View3D Generic", SPACE_VIEW3D, 0);
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, CTX_data_mode_string(C), -1);
@@ -642,10 +639,10 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes
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",
+ "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_bones", "selected_editable_bones", "visible_pchans",
"selected_pchans", "active_bone", "active_pchan", NULL};
CTX_data_dir_set(result, dir);
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index ece304fb2b5..c50aa4fc2ed 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -153,8 +153,9 @@ typedef struct {
/* is used for both read and write... */
-static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d, Object *ob, float lim)
+static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d, Object *ob, float lim)
{
+ uiBlock *block= (layout)? uiLayoutAbsoluteBlock(layout): NULL;
MDeformVert *dvert=NULL;
TransformProperties *tfp= v3d->properties_storage;
float median[5], ve_median[5];
@@ -474,6 +475,7 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d,
}
}
+#if 0
/* assumes armature active */
static void validate_bonebutton_cb(bContext *C, void *bonev, void *namev)
{
@@ -492,14 +494,17 @@ static void validate_bonebutton_cb(bContext *C, void *bonev, void *namev)
ED_armature_bone_rename(ob->data, oldname, newname); // editarmature.c
}
}
+#endif
-static void v3d_posearmature_buts(uiBlock *block, View3D *v3d, Object *ob, float lim)
+static void v3d_posearmature_buts(uiLayout *layout, View3D *v3d, Object *ob, float lim)
{
- uiBut *but;
+ uiBlock *block= uiLayoutGetBlock(layout);
bArmature *arm;
bPoseChannel *pchan;
Bone *bone= NULL;
TransformProperties *tfp= v3d->properties_storage;
+ PointerRNA pchanptr;
+ uiLayout *row;
arm = ob->data;
if (!arm || !ob->pose) return;
@@ -509,14 +514,26 @@ static void v3d_posearmature_buts(uiBlock *block, View3D *v3d, Object *ob, float
if(bone && (bone->flag & BONE_ACTIVE) && (bone->layer & arm->layer))
break;
}
+ if (!pchan) {
+ uiDefBut(block, LABEL, 0, "No Bone Active", 0, 240, 100, 20, 0, 0, 0, 0, 0, "");
+ return;
+ }
+ else {
+ row= uiLayoutRow(layout, 0);
+ RNA_pointer_create(&ob->id, &RNA_PoseChannel, pchan, &pchanptr);
+ uiItemL(row, "", ICON_BONE_DATA);
+ uiItemR(row, "", 0, &pchanptr, "name", 0);
+ }
- if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
+ uiLayoutAbsoluteBlock(layout);
+
+ if (pchan->rotmode == ROT_MODE_AXISANGLE) {
float quat[4];
/* convert to euler, passing through quats... */
- AxisAngleToQuat(quat, &pchan->quat[1], pchan->quat[0]);
+ AxisAngleToQuat(quat, pchan->rotAxis, pchan->rotAngle);
QuatToEul(quat, tfp->ob_eul);
}
- else if (pchan->rotmode == PCHAN_ROT_QUAT)
+ else if (pchan->rotmode == ROT_MODE_QUAT)
QuatToEul(pchan->quat, tfp->ob_eul);
else
VecCopyf(tfp->ob_eul, pchan->eul);
@@ -580,12 +597,14 @@ void validate_editbonebutton_cb(bContext *C, void *bonev, void *namev)
WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, CTX_data_edit_object(C)); // XXX fix
}
-static void v3d_editarmature_buts(uiBlock *block, View3D *v3d, Object *ob, float lim)
+static void v3d_editarmature_buts(uiLayout *layout, View3D *v3d, Object *ob, float lim)
{
+ uiBlock *block= uiLayoutGetBlock(layout);
bArmature *arm= ob->data;
EditBone *ebone;
- uiBut *but;
TransformProperties *tfp= v3d->properties_storage;
+ uiLayout *row;
+ PointerRNA eboneptr;
ebone= arm->edbo->first;
@@ -597,6 +616,13 @@ static void v3d_editarmature_buts(uiBlock *block, View3D *v3d, Object *ob, float
if (!ebone)
return;
+ row= uiLayoutRow(layout, 0);
+ RNA_pointer_create(&arm->id, &RNA_EditBone, ebone, &eboneptr);
+ uiItemL(row, "", ICON_BONE_DATA);
+ uiItemR(row, "", 0, &eboneptr, "name", 0);
+
+ uiLayoutAbsoluteBlock(layout);
+
uiDefBut(block, LABEL, 0, "Head:", 0, 210, 100, 20, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_ARMATUREPANEL1, "X:", 0, 190, 100, 19, ebone->head, -lim, lim, 10, 3, "X Location of the head end of the bone");
@@ -624,8 +650,9 @@ static void v3d_editarmature_buts(uiBlock *block, View3D *v3d, Object *ob, float
}
-static void v3d_editmetaball_buts(uiBlock *block, Object *ob, float lim)
+static void v3d_editmetaball_buts(uiLayout *layout, Object *ob, float lim)
{
+ uiBlock *block= uiLayoutAbsoluteBlock(layout);
MetaElem *lastelem= NULL; // XXX
if(lastelem) {
@@ -683,9 +710,24 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
case B_OBJECTPANELROT:
if(ob) {
- ob->rot[0]= M_PI*tfp->ob_eul[0]/180.0;
- ob->rot[1]= M_PI*tfp->ob_eul[1]/180.0;
- ob->rot[2]= M_PI*tfp->ob_eul[2]/180.0;
+ float eul[3];
+
+ /* make a copy to eul[3], to allow TAB on buttons to work */
+ eul[0]= M_PI*tfp->ob_eul[0]/180.0;
+ eul[1]= M_PI*tfp->ob_eul[1]/180.0;
+ eul[2]= M_PI*tfp->ob_eul[2]/180.0;
+
+ if (ob->rotmode == ROT_MODE_AXISANGLE) {
+ float quat[4];
+ /* convert to axis-angle, passing through quats */
+ EulToQuat(eul, quat);
+ QuatToAxisAngle(quat, ob->rotAxis, &ob->rotAngle);
+ }
+ else if (ob->rotmode == ROT_MODE_QUAT)
+ EulToQuat(eul, ob->quat);
+ else
+ VecCopyf(ob->rot, eul);
+
DAG_id_flush_update(&ob->id, OB_RECALC_OB);
}
break;
@@ -860,17 +902,16 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
eul[1]= M_PI*tfp->ob_eul[1]/180.0;
eul[2]= M_PI*tfp->ob_eul[2]/180.0;
- if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
+ if (pchan->rotmode == ROT_MODE_AXISANGLE) {
float quat[4];
/* convert to axis-angle, passing through quats */
EulToQuat(eul, quat);
- QuatToAxisAngle(quat, &pchan->quat[1], &pchan->quat[0]);
+ QuatToAxisAngle(quat, pchan->rotAxis, &pchan->rotAngle);
}
- else if (pchan->rotmode == PCHAN_ROT_QUAT)
+ else if (pchan->rotmode == ROT_MODE_QUAT)
EulToQuat(eul, pchan->quat);
else
VecCopyf(pchan->eul, eul);
-
}
/* no break, pass on */
case B_ARMATUREPANEL2:
@@ -880,7 +921,7 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
}
break;
case B_TRANSFORMSPACEADD:
- BIF_manageTransformOrientation(C, 1, 0);
+ BIF_createTransformOrientation(C, NULL, "", 1, 0);
break;
case B_TRANSFORMSPACECLEAR:
BIF_clearTransformOrientation(C);
@@ -993,7 +1034,7 @@ static void view3d_panel_transform_spaces(const bContext *C, Panel *pa)
int xco = 20, yco = 70;
int index;
- block= uiLayoutFreeBlock(pa->layout);
+ block= uiLayoutAbsoluteBlock(pa->layout);
uiBlockBeginAlign(block);
@@ -1075,6 +1116,8 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
//uiBut *bt;
Object *ob= OBACT;
TransformProperties *tfp;
+ PointerRNA obptr;
+ uiLayout *col, *row;
float lim;
if(ob==NULL) return;
@@ -1084,33 +1127,42 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
v3d->properties_storage= MEM_callocN(sizeof(TransformProperties), "TransformProperties");
tfp= v3d->properties_storage;
- block= uiLayoutFreeBlock(pa->layout);
- uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL);
-
// XXX uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
-
+ /*
if(ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)) {
}
else {
if((ob->mode & OB_MODE_PARTICLE_EDIT)==0) {
- strcpy(ob->parsubstr, "");
uiBlockEndAlign(block);
}
}
+ */
lim= 10000.0f*MAX2(1.0, v3d->grid);
+ block= uiLayoutGetBlock(pa->layout);
+ uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL);
+
+ col= uiLayoutColumn(pa->layout, 0);
+ row= uiLayoutRow(col, 0);
+ RNA_id_pointer_create(&ob->id, &obptr);
+ uiItemL(row, "", ICON_OBJECT_DATA);
+ uiItemR(row, "", 0, &obptr, "name", 0);
+
if(ob==obedit) {
- if(ob->type==OB_ARMATURE) v3d_editarmature_buts(block, v3d, ob, lim);
- if(ob->type==OB_MBALL) v3d_editmetaball_buts(block, ob, lim);
- else v3d_editvertex_buts(C, block, v3d, ob, lim);
+ if(ob->type==OB_ARMATURE) v3d_editarmature_buts(col, v3d, ob, lim);
+ if(ob->type==OB_MBALL) v3d_editmetaball_buts(col, ob, lim);
+ else v3d_editvertex_buts(C, col, v3d, ob, lim);
}
else if(ob->mode & OB_MODE_POSE) {
- v3d_posearmature_buts(block, v3d, ob, lim);
+ v3d_posearmature_buts(col, v3d, ob, lim);
}
else {
BoundBox *bb = NULL;
-
+
+ uiLayoutAbsoluteBlock(col);
+
+ block= uiLayoutAbsoluteBlock(col);
uiDefBut(block, LABEL, 0, "Location:", 0, 300, 100, 20, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_OBJECTPANEL, "X:", 0, 280, 120, 19, &(ob->loc[0]), -lim, lim, 100, 3, "");
@@ -1124,9 +1176,19 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, B_REDR, ICON_UNLOCKED, 125, 240, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Z Location value from being Transformed");
uiBlockEndAlign(block);
- tfp->ob_eul[0]= 180.0*ob->rot[0]/M_PI;
- tfp->ob_eul[1]= 180.0*ob->rot[1]/M_PI;
- tfp->ob_eul[2]= 180.0*ob->rot[2]/M_PI;
+ if (ob->rotmode == ROT_MODE_AXISANGLE) {
+ float quat[4];
+ /* convert to euler, passing through quats... */
+ AxisAngleToQuat(quat, ob->rotAxis, ob->rotAngle);
+ QuatToEul(quat, tfp->ob_eul);
+ }
+ else if (ob->rotmode == ROT_MODE_QUAT)
+ QuatToEul(ob->quat, tfp->ob_eul);
+ else
+ VecCopyf(tfp->ob_eul, ob->rot);
+ tfp->ob_eul[0]*= 180.0/M_PI;
+ tfp->ob_eul[1]*= 180.0/M_PI;
+ tfp->ob_eul[2]*= 180.0/M_PI;
uiBlockBeginAlign(block);
if ((ob->parent) && (ob->partype == PARBONE)) {
@@ -1277,7 +1339,7 @@ static void view3d_panel_bonesketch_spaces(const bContext *C, Panel *pa)
};
- block= uiLayoutFreeBlock(pa->layout);
+ block= uiLayoutAbsoluteBlock(pa->layout);
uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL);
uiBlockBeginAlign(block);
@@ -1445,25 +1507,12 @@ void view3d_buttons_register(ARegionType *art)
pt->draw= view3d_panel_transform_spaces;
BLI_addtail(&art->paneltypes, pt);
- pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel gpencil");
- strcpy(pt->idname, "VIEW3D_PT_gpencil");
- strcpy(pt->label, "Greas Pencil");
- pt->draw= view3d_panel_gpencil;
- BLI_addtail(&art->paneltypes, pt);*/
-
pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel bonesketch spaces");
strcpy(pt->idname, "VIEW3D_PT_bonesketch_spaces");
strcpy(pt->label, "Bone Sketching");
pt->draw= view3d_panel_bonesketch_spaces;
pt->poll= view3d_panel_bonesketch_spaces_poll;
BLI_addtail(&art->paneltypes, pt);
-
- /*
- pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel redo");
- strcpy(pt->idname, "VIEW3D_PT_redo");
- strcpy(pt->label, "Last Operator");
- pt->draw= view3d_panel_operator_redo;
- BLI_addtail(&art->paneltypes, pt);
*/
// XXX view3d_panel_preview(C, ar, 0);
}
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index f8584b14e2b..fac3f9fb555 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -732,7 +732,7 @@ static void draw_viewport_name(ARegion *ar, View3D *v3d)
char *name = view3d_get_name(v3d, rv3d);
char *printable = NULL;
- if (v3d->localview) {
+ if (v3d->localvd) {
printable = malloc(strlen(name) + strlen(" (Local)_")); /* '_' gives space for '\0' */
strcpy(printable, name);
strcat(printable, " (Local)");
@@ -745,7 +745,7 @@ static void draw_viewport_name(ARegion *ar, View3D *v3d)
BLF_draw_default(22, ar->winy-17, 0.0f, printable);
}
- if (v3d->localview) {
+ if (v3d->localvd) {
free(printable);
}
}
@@ -1413,6 +1413,7 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d)
}
if(v3d->zbuf) glDisable(GL_DEPTH_TEST);
+ glDepthMask(0);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -1433,6 +1434,8 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d)
wmPopMatrix();
glDisable(GL_BLEND);
+
+ glDepthMask(1);
if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
}
@@ -1961,6 +1964,8 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
v3d->zbuf= TRUE;
glEnable(GL_DEPTH_TEST);
}
+ else
+ v3d->zbuf= FALSE;
// needs to be done always, gridview is adjusted in drawgrid() now
v3d->gridview= v3d->grid;
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index bbcee0415f8..cee5c82ef38 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -239,9 +239,10 @@ typedef struct ViewOpsData {
float ofs[3], obofs[3];
float reverse, dist0;
float grid, far;
+ short axis_snap; /* view rotate only */
int origx, origy, oldx, oldy;
- int origkey;
+ int origkey; /* the key that triggered the operator */
} ViewOpsData;
@@ -276,6 +277,7 @@ static void calctrackballvec(rcti *rect, int mx, int my, float *vec)
static void viewops_data(bContext *C, wmOperator *op, wmEvent *event)
{
+ static float lastofs[3] = {0,0,0};
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d;
ViewOpsData *vod= MEM_callocN(sizeof(ViewOpsData), "viewops data");
@@ -289,7 +291,16 @@ static void viewops_data(bContext *C, wmOperator *op, wmEvent *event)
QUATCOPY(vod->oldquat, rv3d->viewquat);
vod->origx= vod->oldx= event->x;
vod->origy= vod->oldy= event->y;
- vod->origkey= event->type;
+ vod->origkey= event->type; /* the key that triggered the operator. */
+
+ if (U.uiflag & USER_ORBIT_SELECTION)
+ {
+ VECCOPY(vod->ofs, rv3d->ofs);
+ /* If there's no selection, lastofs is unmodified and last value since static */
+ calculateTransformCenter(C, event, V3D_CENTROID, lastofs);
+ VECCOPY(vod->obofs, lastofs);
+ VecMulf(vod->obofs, -1.0f);
+ }
/* lookup, we dont pass on v3d to prevent confusement */
vod->grid= v3d->grid;
@@ -357,11 +368,52 @@ static float snapquats[39][6] = {
{0.0, 0.0, 0.0, 1.0, 0, 0}
};
+enum {
+ VIEW_PASS= 0,
+ VIEW_APPLY,
+ VIEW_CONFIRM
+};
+
+/* NOTE: these defines are saved in keymap files, do not change values but just add new ones */
+#define VIEW_MODAL_CONFIRM 1 /* used for all view operations */
+#define VIEWROT_MODAL_AXIS_SNAP_ENABLE 2
+#define VIEWROT_MODAL_AXIS_SNAP_DISABLE 3
+
+
+/* called in transform_ops.c, on each regeneration of keymaps */
+void viewrotate_modal_keymap(wmKeyConfig *keyconf)
+{
+ static EnumPropertyItem modal_items[] = {
+ {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Cancel", ""},
+
+ {VIEWROT_MODAL_AXIS_SNAP_ENABLE, "AXIS_SNAP_ENABLE", 0, "Enable Axis Snap", ""},
+ {VIEWROT_MODAL_AXIS_SNAP_DISABLE, "AXIS_SNAP_DISABLE", 0, "Enable Axis Snap", ""},
+
+ {0, NULL, 0, NULL, NULL}};
+
+ wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "View3D Rotate Modal");
+
+ /* this function is called for each spacetype, only needs to add map once */
+ if(keymap) return;
+
+ keymap= WM_modalkeymap_add(keyconf, "View3D Rotate Modal", modal_items);
-static void viewrotate_apply(ViewOpsData *vod, int x, int y, int ctrl)
+ /* items for modal map */
+ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM);
+ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, VIEW_MODAL_CONFIRM);
+
+ WM_modalkeymap_add_item(keymap, LEFTCTRLKEY, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_AXIS_SNAP_ENABLE);
+ WM_modalkeymap_add_item(keymap, LEFTCTRLKEY, KM_RELEASE, KM_ANY, 0, VIEWROT_MODAL_AXIS_SNAP_DISABLE);
+
+ /* assign map to operators */
+ WM_modalkeymap_assign(keymap, "VIEW3D_OT_rotate");
+
+}
+
+static void viewrotate_apply(ViewOpsData *vod, int x, int y)
{
RegionView3D *rv3d= vod->rv3d;
- int use_sel= 0; /* XXX */
+ int use_sel= U.uiflag & USER_ORBIT_SELECTION;
rv3d->view= 0; /* need to reset everytime because of view snapping */
@@ -462,7 +514,7 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y, int ctrl)
}
/* check for view snap */
- if (ctrl){
+ if (vod->axis_snap){
int i;
float viewmat[3][3];
@@ -496,23 +548,41 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y, int ctrl)
static int viewrotate_modal(bContext *C, wmOperator *op, wmEvent *event)
{
ViewOpsData *vod= op->customdata;
+ short event_code= VIEW_PASS;
/* execute the events */
- switch(event->type) {
- case MOUSEMOVE:
- viewrotate_apply(vod, event->x, event->y, event->ctrl);
- break;
+ if(event->type==MOUSEMOVE) {
+ event_code= VIEW_APPLY;
+ }
+ else if(event->type==EVT_MODAL_MAP) {
+ switch (event->val) {
+ case VIEW_MODAL_CONFIRM:
+ event_code= VIEW_CONFIRM;
+ break;
+ case VIEWROT_MODAL_AXIS_SNAP_ENABLE:
+ vod->axis_snap= TRUE;
+ event_code= VIEW_APPLY;
+ break;
+ case VIEWROT_MODAL_AXIS_SNAP_DISABLE:
+ vod->axis_snap= FALSE;
+ event_code= VIEW_APPLY;
+ break;
+ }
+ }
+ else if(event->type==vod->origkey && event->val==KM_RELEASE) {
+ event_code= VIEW_CONFIRM;
+ }
- default:
- /* 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));
+ if(event_code==VIEW_APPLY) {
+ viewrotate_apply(vod, event->x, event->y);
+ }
+ else if (event_code==VIEW_CONFIRM) {
+ request_depth_update(CTX_wm_region_view3d(C));
- MEM_freeN(vod);
- op->customdata= NULL;
+ MEM_freeN(vod);
+ op->customdata= NULL;
- return OPERATOR_FINISHED;
- }
+ return OPERATOR_FINISHED;
}
return OPERATOR_RUNNING_MODAL;
@@ -541,19 +611,19 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
/* add temp handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
-void VIEW3D_OT_viewrotate(wmOperatorType *ot)
+void VIEW3D_OT_rotate(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Rotate view";
ot->description = "Rotate the view.";
- ot->idname= "VIEW3D_OT_viewrotate";
+ ot->idname= "VIEW3D_OT_rotate";
/* api callbacks */
ot->invoke= viewrotate_invoke;
@@ -561,11 +631,38 @@ void VIEW3D_OT_viewrotate(wmOperatorType *ot)
ot->poll= ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
}
/* ************************ viewmove ******************************** */
+
+/* NOTE: these defines are saved in keymap files, do not change values but just add new ones */
+
+/* called in transform_ops.c, on each regeneration of keymaps */
+void viewmove_modal_keymap(wmKeyConfig *keyconf)
+{
+ static EnumPropertyItem modal_items[] = {
+ {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
+
+ {0, NULL, 0, NULL, NULL}};
+
+ wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "View3D Move Modal");
+
+ /* this function is called for each spacetype, only needs to add map once */
+ if(keymap) return;
+
+ keymap= WM_modalkeymap_add(keyconf, "View3D Move Modal", modal_items);
+
+ /* items for modal map */
+ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM);
+ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, VIEW_MODAL_CONFIRM);
+
+ /* assign map to operators */
+ WM_modalkeymap_assign(keymap, "VIEW3D_OT_move");
+}
+
+
static void viewmove_apply(ViewOpsData *vod, int x, int y)
{
if(vod->rv3d->persp==V3D_CAMOB) {
@@ -596,24 +693,35 @@ static void viewmove_apply(ViewOpsData *vod, int x, int y)
static int viewmove_modal(bContext *C, wmOperator *op, wmEvent *event)
{
+
ViewOpsData *vod= op->customdata;
+ short event_code= VIEW_PASS;
/* execute the events */
- switch(event->type) {
- case MOUSEMOVE:
- viewmove_apply(vod, event->x, event->y);
- break;
+ if(event->type==MOUSEMOVE) {
+ event_code= VIEW_APPLY;
+ }
+ else if(event->type==EVT_MODAL_MAP) {
+ switch (event->val) {
+ case VIEW_MODAL_CONFIRM:
+ event_code= VIEW_CONFIRM;
+ break;
+ }
+ }
+ else if(event->type==vod->origkey && event->val==KM_RELEASE) {
+ event_code= VIEW_CONFIRM;
+ }
- default:
- /* 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));
+ if(event_code==VIEW_APPLY) {
+ viewmove_apply(vod, event->x, event->y);
+ }
+ else if (event_code==VIEW_CONFIRM) {
+ request_depth_update(CTX_wm_region_view3d(C));
- MEM_freeN(vod);
- op->customdata= NULL;
+ MEM_freeN(vod);
+ op->customdata= NULL;
- return OPERATOR_FINISHED;
- }
+ return OPERATOR_FINISHED;
}
return OPERATOR_RUNNING_MODAL;
@@ -625,19 +733,19 @@ static int viewmove_invoke(bContext *C, wmOperator *op, wmEvent *event)
viewops_data(C, op, event);
/* add temp handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
-void VIEW3D_OT_viewmove(wmOperatorType *ot)
+void VIEW3D_OT_move(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Move view";
ot->description = "Move the view.";
- ot->idname= "VIEW3D_OT_viewmove";
+ ot->idname= "VIEW3D_OT_move";
/* api callbacks */
ot->invoke= viewmove_invoke;
@@ -645,11 +753,34 @@ void VIEW3D_OT_viewmove(wmOperatorType *ot)
ot->poll= ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
}
/* ************************ viewzoom ******************************** */
+/* called in transform_ops.c, on each regeneration of keymaps */
+void viewzoom_modal_keymap(wmKeyConfig *keyconf)
+{
+ static EnumPropertyItem modal_items[] = {
+ {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
+
+ {0, NULL, 0, NULL, NULL}};
+
+ wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "View3D Zoom Modal");
+
+ /* this function is called for each spacetype, only needs to add map once */
+ if(keymap) return;
+
+ keymap= WM_modalkeymap_add(keyconf, "View3D Zoom Modal", modal_items);
+
+ /* items for modal map */
+ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM);
+ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, VIEW_MODAL_CONFIRM);
+
+ /* assign map to operators */
+ WM_modalkeymap_assign(keymap, "VIEW3D_OT_zoom");
+}
+
static void view_zoom_mouseloc(ARegion *ar, float dfac, int mx, int my)
{
RegionView3D *rv3d= ar->regiondata;
@@ -758,23 +889,33 @@ static void viewzoom_apply(ViewOpsData *vod, int x, int y)
static int viewzoom_modal(bContext *C, wmOperator *op, wmEvent *event)
{
ViewOpsData *vod= op->customdata;
+ short event_code= VIEW_PASS;
/* execute the events */
- switch(event->type) {
- case MOUSEMOVE:
- viewzoom_apply(vod, event->x, event->y);
- break;
+ if(event->type==MOUSEMOVE) {
+ event_code= VIEW_APPLY;
+ }
+ else if(event->type==EVT_MODAL_MAP) {
+ switch (event->val) {
+ case VIEW_MODAL_CONFIRM:
+ event_code= VIEW_CONFIRM;
+ break;
+ }
+ }
+ else if(event->type==vod->origkey && event->val==KM_RELEASE) {
+ event_code= VIEW_CONFIRM;
+ }
- default:
- /* 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));
+ if(event_code==VIEW_APPLY) {
+ viewzoom_apply(vod, event->x, event->y);
+ }
+ else if (event_code==VIEW_CONFIRM) {
+ request_depth_update(CTX_wm_region_view3d(C));
- MEM_freeN(vod);
- op->customdata= NULL;
+ MEM_freeN(vod);
+ op->customdata= NULL;
- return OPERATOR_FINISHED;
- }
+ return OPERATOR_FINISHED;
}
return OPERATOR_RUNNING_MODAL;
@@ -823,7 +964,7 @@ static int viewzoom_invoke(bContext *C, wmOperator *op, wmEvent *event)
viewops_data(C, op, event);
/* add temp handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -845,7 +986,7 @@ void VIEW3D_OT_zoom(wmOperatorType *ot)
ot->poll= ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX);
}
@@ -925,7 +1066,7 @@ static int viewhome_exec(bContext *C, wmOperator *op) /* was view3d_home() in 2.
void VIEW3D_OT_view_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View home";
+ ot->name= "View All";
ot->description = "View all objects in scene.";
ot->idname= "VIEW3D_OT_view_all";
@@ -1064,7 +1205,7 @@ void VIEW3D_OT_view_center(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View center";
+ ot->name= "View Selected";
ot->description = "Move the view to the selection center.";
ot->idname= "VIEW3D_OT_view_center";
@@ -1628,7 +1769,7 @@ static int viewpersportho_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_view_persportho(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View persp/ortho";
+ ot->name= "View Persp/Ortho";
ot->description = "Switch the current view from perspective/orthographic.";
ot->idname= "VIEW3D_OT_view_persportho";
@@ -1748,57 +1889,6 @@ void VIEW3D_OT_clip_border(wmOperatorType *ot)
RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX);
}
-/* ********************* draw type operator ****************** */
-
-static int view3d_drawtype_exec(bContext *C, wmOperator *op)
-{
- View3D *v3d = CTX_wm_view3d(C);
- int dt, dt_alt;
-
- 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;
- else
- v3d->drawtype = dt;
- }
- else
- v3d->drawtype = dt;
-
- ED_area_tag_redraw(CTX_wm_area(C));
-
- return OPERATOR_FINISHED;
-}
-
-static int view3d_drawtype_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- return view3d_drawtype_exec(C, op);
-}
-
-/* toggles */
-void VIEW3D_OT_drawtype(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Change draw type";
- ot->description = "Change the draw type of the view.";
- ot->idname= "VIEW3D_OT_drawtype";
-
- /* api callbacks */
- ot->invoke= view3d_drawtype_invoke;
- ot->exec= view3d_drawtype_exec;
-
- ot->poll= ED_operator_view3d_active;
-
- /* flags */
- ot->flag= 0;
-
- /* 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);
-}
-
/* ***************** 3d cursor cursor op ******************* */
/* mx my in region coords */
@@ -1850,8 +1940,7 @@ 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;
+ return OPERATOR_FINISHED;
}
void VIEW3D_OT_cursor3d(wmOperatorType *ot)
@@ -2339,7 +2428,7 @@ void viewmoveNDOF(Scene *scene, ARegion *ar, View3D *v3d, int mode)
if (use_sel) {
QuatConj(q1); /* conj == inv for unit quat */
- VecSubf(v3d->ofs, v3d->ofs, obofs);
+ VecSubf(rv3d->ofs, rv3d->ofs, obofs);
QuatMulVecf(q1, rv3d->ofs);
VecAddf(rv3d->ofs, rv3d->ofs, obofs);
}
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 0c1d0ba28d2..95900e6faa3 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -178,7 +178,7 @@ static void handle_view3d_lock(bContext *C)
View3D *v3d= CTX_wm_view3d(C);
if (v3d != NULL && sa != NULL) {
- if(v3d->localview==0 && v3d->scenelock && sa->spacetype==SPACE_VIEW3D) {
+ if(v3d->localvd==NULL && v3d->scenelock && sa->spacetype==SPACE_VIEW3D) {
/* copy to scene */
scene->lay= v3d->lay;
@@ -196,27 +196,38 @@ static int layers_exec(bContext *C, wmOperator *op)
View3D *v3d= sa->spacedata.first;
int nr= RNA_int_get(op->ptr, "nr");
- if(nr<=0)
+ if(nr < 0)
return OPERATOR_CANCELLED;
- nr--;
-
- if(RNA_boolean_get(op->ptr, "extend"))
- v3d->lay |= (1<<nr);
- else
- v3d->lay = (1<<nr);
-
- /* set active layer, ensure to always have one */
- if(v3d->lay & (1<<nr))
- v3d->layact= 1<<nr;
- else if((v3d->lay & v3d->layact)==0) {
- int bit= 0;
+
+
+ if(nr == 0) {
+ /* all layers */
+ v3d->lay |= (1<<20)-1;
+
+ if(!v3d->layact)
+ v3d->layact= 1;
+ }
+ else {
+ nr--;
+
+ if(RNA_boolean_get(op->ptr, "extend"))
+ v3d->lay |= (1<<nr);
+ else
+ v3d->lay = (1<<nr);
- while(bit<32) {
- if(v3d->lay & (1<<bit)) {
- v3d->layact= 1<<bit;
- break;
+ /* set active layer, ensure to always have one */
+ if(v3d->lay & (1<<nr))
+ v3d->layact= 1<<nr;
+ else if((v3d->lay & v3d->layact)==0) {
+ int bit= 0;
+
+ while(bit<32) {
+ if(v3d->lay & (1<<bit)) {
+ v3d->layact= 1<<bit;
+ break;
+ }
+ bit++;
}
- bit++;
}
}
@@ -264,8 +275,8 @@ void VIEW3D_OT_layers(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_int(ot->srna, "nr", 1, 0, 20, "Number", "", 0, 20);
- RNA_def_boolean(ot->srna, "extend", 0, "Extend", "");
+ RNA_def_int(ot->srna, "nr", 1, 0, 20, "Number", "The layer number to set, zero for all layers", 0, 20);
+ RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Add this layer to the current view layers");
}
#if 0
@@ -1802,8 +1813,10 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
ED_area_tag_redraw(sa);
break;
case B_NDOF:
+ ED_area_tag_redraw(sa);
break;
case B_MAN_MODE:
+ ED_area_tag_redraw(sa);
break;
case B_VIEW_BUTSEDIT:
break;
@@ -1949,7 +1962,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
uiBlock *block;
int a, xco=0, maxco=0, yco= 0;
- block= uiLayoutFreeBlock(layout);
+ block= uiLayoutAbsoluteBlock(layout);
uiBlockSetHandleFunc(block, do_view3d_header_buttons, NULL);
if((sa->flag & HEADER_NO_PULLDOWN)==0)
@@ -2074,7 +2087,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
}
/* LAYERS */
- if(obedit==NULL && v3d->localview==0) {
+ if(obedit==NULL && v3d->localvd==NULL) {
int ob_lay = ob ? ob->lay : 0;
uiBlockBeginAlign(block);
for(a=0; a<5; a++) {
@@ -2113,7 +2126,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
xco+= XIC+10;
}
uiBlockEndAlign(block);
- header_xco_step(ar, &xco, &yco, &maxco, XIC+10);
+ header_xco_step(ar, &xco, &yco, &maxco, 10);
}
/* Snap */
@@ -2129,10 +2142,14 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
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;
}
+ if (ts->snap_mode == SCE_SNAP_MODE_FACE) {
+ uiDefIconButBitS(block, TOG, SCE_SNAP_PROJECT, B_REDR, ICON_RETOPO,xco,yco,XIC,YIC, &ts->snap_flag, 0, 0, 0, 0, "Project elements instead of snapping them");
+ xco+= XIC;
+ }
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;
+ xco+= XIC + 10;
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;
+ xco+= 70;
} else {
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;
@@ -2154,10 +2171,11 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, xco,yco,XIC,YIC, &em->selectmode, 1.0, 0.0, 0, 0, "Face select mode (Ctrl Tab 3)");
xco+= XIC;
uiBlockEndAlign(block);
+ header_xco_step(ar, &xco, &yco, &maxco, 10);
if(v3d->drawtype > OB_WIRE) {
uiDefIconButBitS(block, TOG, V3D_ZBUF_SELECT, B_REDR, ICON_ORTHO, xco,yco,XIC,YIC, &v3d->flag, 1.0, 0.0, 0, 0, "Occlude background geometry");
- xco+= XIC;
}
+ xco+= XIC;
uiBlockEndAlign(block);
header_xco_step(ar, &xco, &yco, &maxco, XIC);
}
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index 7dbea44b68b..84d1a1275a9 100644
--- a/source/blender/editors/space_view3d/view3d_intern.h
+++ b/source/blender/editors/space_view3d/view3d_intern.h
@@ -62,12 +62,12 @@ void VIEW3D_OT_layers(struct wmOperatorType *ot);
/* view3d_ops.c */
void view3d_operatortypes(void);
-void view3d_keymap(struct wmWindowManager *wm);
+void view3d_keymap(struct wmKeyConfig *keyconf);
/* view3d_edit.c */
void VIEW3D_OT_zoom(struct wmOperatorType *ot);
-void VIEW3D_OT_viewmove(struct wmOperatorType *ot);
-void VIEW3D_OT_viewrotate(struct wmOperatorType *ot);
+void VIEW3D_OT_move(struct wmOperatorType *ot);
+void VIEW3D_OT_rotate(struct wmOperatorType *ot);
void VIEW3D_OT_view_all(struct wmOperatorType *ot);
void VIEW3D_OT_viewnumpad(struct wmOperatorType *ot);
void VIEW3D_OT_view_center(struct wmOperatorType *ot);
@@ -89,10 +89,13 @@ int draw_glsl_material(Scene *scene, Object *ob, View3D *v3d, int dt);
void draw_object_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, int dt, int outline);
void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob);
void drawaxes(float size, int flag, char drawtype);
-void view3d_object_text_draw_add(float x, float y, float z, char *str, short xoffs);
+
+void view3d_cached_text_draw_begin(void);
+void view3d_cached_text_draw_add(float x, float y, float z, char *str, short xoffs);
+void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, float mat[][4]);
/* drawarmature.c */
-int draw_armature(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int dt, int flag);
+int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, int flag);
/* drawmesh.c */
void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, struct DerivedMesh *dm, int faceselect);
@@ -119,8 +122,10 @@ void VIEW3D_OT_select_lasso(struct wmOperatorType *ot);
/* view3d_view.c */
void VIEW3D_OT_smoothview(struct wmOperatorType *ot);
void VIEW3D_OT_setcameratoview(struct wmOperatorType *ot);
+void VIEW3D_OT_setobjectascamera(struct wmOperatorType *ot);
void VIEW3D_OT_localview(struct wmOperatorType *ot);
void VIEW3D_OT_game_start(struct wmOperatorType *ot);
+void VIEW3D_OT_fly(struct wmOperatorType *ot);
int boundbox_clip(RegionView3D *rv3d, float obmat[][4], struct BoundBox *bb);
@@ -132,6 +137,11 @@ void smooth_view(struct bContext *C, Object *, Object *, float *ofs, float *quat
void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); /* rect: for picking */
void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d);
+void fly_modal_keymap(struct wmKeyConfig *keyconf);
+void viewrotate_modal_keymap(struct wmKeyConfig *keyconf);
+void viewmove_modal_keymap(struct wmKeyConfig *keyconf);
+void viewzoom_modal_keymap(struct wmKeyConfig *keyconf);
+
/* view3d_buttons.c */
void VIEW3D_OT_properties(struct wmOperatorType *ot);
void view3d_buttons_register(struct ARegionType *art);
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index e179809adc9..4b692e572e2 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -62,8 +62,8 @@
void view3d_operatortypes(void)
{
- WM_operatortype_append(VIEW3D_OT_viewrotate);
- WM_operatortype_append(VIEW3D_OT_viewmove);
+ WM_operatortype_append(VIEW3D_OT_rotate);
+ WM_operatortype_append(VIEW3D_OT_move);
WM_operatortype_append(VIEW3D_OT_zoom);
WM_operatortype_append(VIEW3D_OT_view_all);
WM_operatortype_append(VIEW3D_OT_viewnumpad);
@@ -82,9 +82,10 @@ void view3d_operatortypes(void)
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_setobjectascamera);
WM_operatortype_append(VIEW3D_OT_localview);
WM_operatortype_append(VIEW3D_OT_game_start);
+ WM_operatortype_append(VIEW3D_OT_fly);
WM_operatortype_append(VIEW3D_OT_layers);
WM_operatortype_append(VIEW3D_OT_properties);
@@ -101,46 +102,30 @@ void view3d_operatortypes(void)
transform_operatortypes();
}
-void view3d_keymap(wmWindowManager *wm)
+void view3d_keymap(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0);
- wmKeymapItem *km;
+ wmKeyMap *keymap;
+ wmKeyMapItem *km;
+
+ keymap= WM_keymap_find(keyconf, "View3D Generic", SPACE_VIEW3D, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_properties", NKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_toolbar", TKEY, KM_PRESS, 0, 0);
/* only for region 3D window */
- keymap= WM_keymap_listbase(wm, "View3D", SPACE_VIEW3D, 0);
-
- /* paint poll checks mode */
- WM_keymap_verify_item(keymap, "PAINT_OT_vertex_paint", LEFTMOUSE, KM_PRESS, 0, 0);
- WM_keymap_verify_item(keymap, "PAINT_OT_weight_paint", LEFTMOUSE, KM_PRESS, 0, 0);
-
- WM_keymap_add_item(keymap, "PAINT_OT_image_paint", LEFTMOUSE, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "PAINT_OT_clone_cursor_set", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
-
- WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
-
- /* sketch poll checks mode */
- WM_keymap_add_item(keymap, "SKETCH_OT_gesture", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", ACTIONMOUSE, KM_PRESS, 0, 0);
- km = WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", ACTIONMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(km->ptr, "snap", 1);
- WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, 0, 0);
- km = WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, KM_CTRL, 0);
- RNA_boolean_set(km->ptr, "snap", 1);
+ keymap= WM_keymap_find(keyconf, "View3D", SPACE_VIEW3D, 0);
WM_keymap_verify_item(keymap, "VIEW3D_OT_manipulator", LEFTMOUSE, KM_PRESS, 0, 0); /* manipulator always on left mouse, not on action mouse*/
WM_keymap_verify_item(keymap, "VIEW3D_OT_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_rotate", MIDDLEMOUSE, KM_PRESS, 0, 0);
+ WM_keymap_verify_item(keymap, "VIEW3D_OT_move", 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_view_center", PADPERIOD, KM_PRESS, 0, 0);
+ WM_keymap_verify_item(keymap, "VIEW3D_OT_fly", FKEY, KM_PRESS, KM_SHIFT, 0);
+
WM_keymap_verify_item(keymap, "VIEW3D_OT_smoothview", TIMER1, KM_ANY, KM_ANY, 0);
RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_zoom", PADPLUSKEY, KM_PRESS, 0, 0)->ptr, "delta", 1);
@@ -175,6 +160,7 @@ void view3d_keymap(wmWindowManager *wm)
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", ACCENTGRAVEKEY, KM_PRESS, 0, 0)->ptr, "nr", 0);
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);
@@ -187,17 +173,21 @@ void view3d_keymap(wmWindowManager *wm)
RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", ZEROKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 10);
/* drawtype */
- km = WM_keymap_add_item(keymap, "VIEW3D_OT_drawtype", ZKEY, KM_PRESS, 0, 0);
- RNA_int_set(km->ptr, "draw_type", OB_SOLID);
- RNA_int_set(km->ptr, "draw_type_alternate", OB_WIRE);
- km = WM_keymap_add_item(keymap, "VIEW3D_OT_drawtype", ZKEY, KM_PRESS, KM_ALT, 0);
- RNA_int_set(km->ptr, "draw_type", OB_TEXTURE);
- RNA_int_set(km->ptr, "draw_type_alternate", OB_SOLID);
+ km = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", ZKEY, KM_PRESS, 0, 0);
+ RNA_string_set(km->ptr, "path", "space_data.viewport_shading");
+ RNA_string_set(km->ptr, "value_1", "SOLID");
+ RNA_string_set(km->ptr, "value_2", "WIREFRAME");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", ZKEY, KM_PRESS, KM_ALT, 0);
+ RNA_string_set(km->ptr, "path", "space_data.viewport_shading");
+ RNA_string_set(km->ptr, "value_1", "TEXTURED");
+ RNA_string_set(km->ptr, "value_2", "SOLID");
- km = WM_keymap_add_item(keymap, "VIEW3D_OT_drawtype", ZKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_int_set(km->ptr, "draw_type", OB_SHADED);
- RNA_int_set(km->ptr, "draw_type_alternate", OB_WIRE);
+ km = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", ZKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(km->ptr, "path", "space_data.viewport_shading");
+ RNA_string_set(km->ptr, "value_1", "SHADED");
+ RNA_string_set(km->ptr, "value_2", "WIREFRAME");
/* selection*/
WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
@@ -230,22 +220,40 @@ void view3d_keymap(wmWindowManager *wm)
WM_keymap_add_item(keymap, "VIEW3D_OT_render_border", BKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_camera_to_view", PAD0, KM_PRESS, KM_ALT|KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_object_as_camera", PAD0, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_snap_menu", SKEY, KM_PRESS, KM_SHIFT, 0);
-
- /* radial control */
- RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE);
- RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH);
- RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", WM_RADIALCONTROL_ANGLE);
- RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE);
- RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_weight_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE);
- RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_texture_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE);
- RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH);
- RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_weight_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH);
- RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_texture_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH);
+ /* context ops */
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", COMMAKEY, KM_PRESS, 0, 0);
+ RNA_string_set(km->ptr, "path", "space_data.pivot_point");
+ RNA_string_set(km->ptr, "value", "BOUNDING_BOX_CENTER");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", COMMAKEY, KM_PRESS, KM_CTRL, 0); /* 2.4x allowed Comma+Shift too, rather not use both */
+ RNA_string_set(km->ptr, "path", "space_data.pivot_point");
+ RNA_string_set(km->ptr, "value", "MEDIAN_POINT");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_toggle", COMMAKEY, KM_PRESS, KM_ALT, 0); /* new in 2.5 */
+ RNA_string_set(km->ptr, "path", "space_data.pivot_point_align");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", PERIODKEY, KM_PRESS, 0, 0);
+ RNA_string_set(km->ptr, "path", "space_data.pivot_point");
+ RNA_string_set(km->ptr, "value", "CURSOR");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", PERIODKEY, KM_PRESS, KM_CTRL, 0);
+ RNA_string_set(km->ptr, "path", "space_data.pivot_point");
+ RNA_string_set(km->ptr, "value", "INDIVIDUAL_CENTERS");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", PERIODKEY, KM_PRESS, KM_ALT, 0);
+ RNA_string_set(km->ptr, "path", "space_data.pivot_point");
+ RNA_string_set(km->ptr, "value", "ACTIVE_ELEMENT");
+
- transform_keymap_for_space(wm, keymap, SPACE_VIEW3D);
+ transform_keymap_for_space(keyconf, keymap, SPACE_VIEW3D);
+ fly_modal_keymap(keyconf);
+ viewrotate_modal_keymap(keyconf);
+ viewmove_modal_keymap(keyconf);
+ viewzoom_modal_keymap(keyconf);
}
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 4563b21d6c1..eb85c4ff722 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -465,7 +465,10 @@ static void do_lasso_select_mesh(ViewContext *vc, short mcords[][2], short moves
data.pass = 0;
bbsel= EM_mask_init_backbuf_border(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */
+
if(vc->scene->toolsettings->selectmode & SCE_SELECT_VERTEX) {
if (bbsel) {
EM_backbuf_checkAndSelectVerts(vc->em, select);
@@ -590,6 +593,7 @@ static void do_lasso_select_curve(ViewContext *vc, short mcords[][2], short move
data.moves = moves;
data.select = select;
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */
nurbs_foreachScreenVert(vc, do_lasso_select_curve__doSelect, &data);
}
@@ -610,6 +614,7 @@ static void do_lasso_select_lattice(ViewContext *vc, short mcords[][2], short mo
data.moves = moves;
data.select = select;
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */
lattice_foreachScreenVert(vc, do_lasso_select_lattice__doSelect, &data);
}
@@ -1160,7 +1165,7 @@ static void mouse_select(bContext *C, short *mval, short extend, short obcenter,
WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE, basact->object);
/* in weightpaint, we use selected bone to select vertexgroup, so no switch to new active object */
- if(basact->object->mode & OB_MODE_WEIGHT_PAINT) {
+ if(BASACT && BASACT->object->mode & OB_MODE_WEIGHT_PAINT) {
/* prevent activating */
basact= NULL;
}
@@ -1268,6 +1273,7 @@ static void do_nurbs_box_select(ViewContext *vc, rcti *rect, int select)
data.rect = rect;
data.select = select;
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */
nurbs_foreachScreenVert(vc, do_nurbs_box_select__doSelect, &data);
}
@@ -1287,6 +1293,7 @@ static void do_lattice_box_select(ViewContext *vc, rcti *rect, int select)
data.rect = rect;
data.select = select;
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */
lattice_foreachScreenVert(vc, do_lattice_box_select__doSelect, &data);
}
@@ -1340,6 +1347,7 @@ static void do_mesh_box_select(ViewContext *vc, rcti *rect, int select)
data.done = 0;
bbsel= EDBM_init_backbuf_border(vc, rect->xmin, rect->ymin, rect->xmax, rect->ymax);
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */
if(vc->scene->toolsettings->selectmode & SCE_SELECT_VERTEX) {
if (bbsel) {
@@ -1725,6 +1733,7 @@ static void mesh_circle_select(ViewContext *vc, int selecting, short *mval, floa
bbsel= EDBM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad+1.0));
vc->em= ((Mesh *)vc->obedit->data)->edit_btmesh;
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */
data.select = selecting;
data.mval[0] = mval[0];
@@ -1793,6 +1802,7 @@ static void nurbscurve_circle_select(ViewContext *vc, int selecting, short *mval
data.mval[1] = mval[1];
data.radius = rad;
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */
nurbs_foreachScreenVert(vc, nurbscurve_circle_doSelect, &data);
}
@@ -1818,6 +1828,7 @@ static void lattice_circle_select(ViewContext *vc, int selecting, short *mval, f
data.mval[1] = mval[1];
data.radius = rad;
+ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */
lattice_foreachScreenVert(vc, latticecurve_circle_doSelect, &data);
}
diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c
index 46341f53c26..e1c6f70bde0 100644
--- a/source/blender/editors/space_view3d/view3d_toolbar.c
+++ b/source/blender/editors/space_view3d/view3d_toolbar.c
@@ -163,7 +163,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa)
if(op==NULL)
return;
- if(op->type->poll && op->type->poll((bContext *)C)==0)
+ if(WM_operator_poll((bContext*)C, op->type) == 0)
return;
block= uiLayoutGetBlock(pa->layout);
@@ -208,7 +208,7 @@ static void operator_search_cb(const struct bContext *C, void *arg, char *str, u
for(; ot; ot= ot->next) {
if(BLI_strcasestr(ot->name, str)) {
- if(ot->poll==NULL || ot->poll((bContext *)C)) {
+ if(WM_operator_poll((bContext*)C, ot)) {
if(0==uiSearchItemAdd(items, ot->name, ot, 0))
break;
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index b6260e66af4..8aafe24e702 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -56,9 +56,11 @@
#include "BKE_object.h"
#include "BKE_global.h"
#include "BKE_main.h"
+#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_utildefines.h"
+#include "BKE_depsgraph.h" /* for fly mode updating */
#include "RE_pipeline.h" // make_stars
@@ -110,7 +112,7 @@ void view3d_operator_needs_opengl(const bContext *C)
float *give_cursor(Scene *scene, View3D *v3d)
{
- if(v3d && v3d->localview) return v3d->cursor;
+ if(v3d && v3d->localvd) return v3d->cursor;
else return scene->cursor;
}
@@ -384,26 +386,32 @@ void VIEW3D_OT_smoothview(wmOperatorType *ot)
ot->poll= ED_operator_view3d_active;
}
-static int view3d_setcameratoview_exec(bContext *C, wmOperator *op)
+static void setcameratoview3d(View3D *v3d, RegionView3D *rv3d, Object *ob)
{
- View3D *v3d = CTX_wm_view3d(C);
- RegionView3D *rv3d= CTX_wm_region_view3d(C);
- Object *ob;
float dvec[3];
- ob= v3d->camera;
dvec[0]= rv3d->dist*rv3d->viewinv[2][0];
dvec[1]= rv3d->dist*rv3d->viewinv[2][1];
dvec[2]= rv3d->dist*rv3d->viewinv[2][2];
VECCOPY(ob->loc, dvec);
- VecSubf(ob->loc, ob->loc, v3d->ofs);
+ VecSubf(ob->loc, ob->loc, rv3d->ofs);
rv3d->viewquat[0]= -rv3d->viewquat[0];
QuatToEul(rv3d->viewquat, ob->rot);
rv3d->viewquat[0]= -rv3d->viewquat[0];
ob->recalc= OB_RECALC_OB;
+}
+
+
+static int view3d_setcameratoview_exec(bContext *C, wmOperator *op)
+{
+ View3D *v3d = CTX_wm_view3d(C);
+ RegionView3D *rv3d= CTX_wm_region_view3d(C);
+
+ setcameratoview3d(v3d, rv3d, v3d->camera);
+ rv3d->persp = V3D_CAMOB;
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, CTX_data_scene(C));
@@ -411,6 +419,16 @@ static int view3d_setcameratoview_exec(bContext *C, wmOperator *op)
}
+int view3d_setcameratoview_poll(bContext *C)
+{
+ View3D *v3d = CTX_wm_view3d(C);
+ RegionView3D *rv3d= CTX_wm_region_view3d(C);
+
+ if (v3d==NULL || v3d->camera==NULL) return 0;
+ if (rv3d && rv3d->viewlock != 0) return 0;
+ return 1;
+}
+
void VIEW3D_OT_setcameratoview(wmOperatorType *ot)
{
@@ -421,16 +439,50 @@ void VIEW3D_OT_setcameratoview(wmOperatorType *ot)
/* api callbacks */
ot->exec= view3d_setcameratoview_exec;
- ot->poll= ED_operator_view3d_active;
+ ot->poll= view3d_setcameratoview_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
+static int view3d_setobjectascamera_exec(bContext *C, wmOperator *op)
+{
+ View3D *v3d = CTX_wm_view3d(C);
+ RegionView3D *rv3d= CTX_wm_region_view3d(C);
+ Scene *scene= CTX_data_scene(C);
+
+ if(BASACT) {
+ rv3d->persp= V3D_CAMOB;
+ v3d->camera= OBACT;
+ if(v3d->scenelock)
+ scene->camera= OBACT;
+ smooth_view(C, NULL, v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens);
+ }
+
+ WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, CTX_data_scene(C));
+
+ return OPERATOR_FINISHED;
+}
+
+void VIEW3D_OT_setobjectascamera(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Set Active Object as Camera";
+ ot->description= "Set the active object as the active camera for this view or scene.";
+ ot->idname= "VIEW3D_OT_object_as_camera";
+
+ /* api callbacks */
+ ot->exec= view3d_setobjectascamera_exec;
+ ot->poll= ED_operator_view3d_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
/* ********************************** */
/* create intersection coordinates in view Z direction at mouse coordinates */
-void viewline(ARegion *ar, View3D *v3d, short mval[2], float ray_start[3], float ray_end[3])
+void viewline(ARegion *ar, View3D *v3d, float mval[2], float ray_start[3], float ray_end[3])
{
RegionView3D *rv3d= ar->regiondata;
float vec[4];
@@ -465,7 +517,7 @@ void viewline(ARegion *ar, View3D *v3d, short mval[2], float ray_start[3], float
}
/* create intersection ray in view Z direction at mouse coordinates */
-void viewray(ARegion *ar, View3D *v3d, short mval[2], float ray_start[3], float ray_normal[3])
+void viewray(ARegion *ar, View3D *v3d, float mval[2], float ray_start[3], float ray_normal[3])
{
float ray_end[3];
@@ -1303,7 +1355,6 @@ static void initlocalview(Scene *scene, ScrArea *sa)
base->object->lay= base->lay;
}
}
- v3d->localview= 0;
}
}
@@ -1325,7 +1376,6 @@ static void restore_localviewdata(ScrArea *sa, int free)
if(free) {
MEM_freeN(v3d->localvd);
v3d->localvd= NULL;
- v3d->localview= 0;
}
for(ar= sa->regionbase.first; ar; ar= ar->next) {
@@ -1416,8 +1466,6 @@ static void SaveState(bContext *C)
glPushAttrib(GL_ALL_ATTRIB_BITS);
- GPU_state_init();
-
if(obact && obact->mode & OB_MODE_TEXTURE_PAINT)
GPU_paint_set_mipmap(1);
@@ -1446,6 +1494,8 @@ static void RestoreState(bContext *C)
win->queue= queue_back;
+ GPU_state_init();
+
glPopAttrib();
}
@@ -1574,6 +1624,802 @@ void VIEW3D_OT_game_start(wmOperatorType *ot)
ot->poll= game_engine_poll;
}
+
+/* NOTE: these defines are saved in keymap files, do not change values but just add new ones */
+#define FLY_MODAL_CANCEL 1
+#define FLY_MODAL_CONFIRM 2
+#define FLY_MODAL_ACCELERATE 3
+#define FLY_MODAL_DECELERATE 4
+#define FLY_MODAL_PAN_ENABLE 5
+#define FLY_MODAL_PAN_DISABLE 6
+#define FLY_MODAL_DIR_FORWARD 7
+#define FLY_MODAL_DIR_BACKWARD 8
+#define FLY_MODAL_DIR_LEFT 9
+#define FLY_MODAL_DIR_RIGHT 10
+#define FLY_MODAL_DIR_UP 11
+#define FLY_MODAL_DIR_DOWN 12
+#define FLY_MODAL_AXIS_LOCK_X 13
+#define FLY_MODAL_AXIS_LOCK_Z 14
+#define FLY_MODAL_PRECISION_ENABLE 15
+#define FLY_MODAL_PRECISION_DISABLE 16
+
+/* called in transform_ops.c, on each regeneration of keymaps */
+void fly_modal_keymap(wmKeyConfig *keyconf)
+{
+ static EnumPropertyItem modal_items[] = {
+ {FLY_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
+ {FLY_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
+ {FLY_MODAL_ACCELERATE, "ACCELERATE", 0, "Accelerate", ""},
+ {FLY_MODAL_DECELERATE, "DECELERATE", 0, "Decelerate", ""},
+
+ {FLY_MODAL_PAN_ENABLE, "PAN_ENABLE", 0, "Pan Enable", ""},
+ {FLY_MODAL_PAN_DISABLE, "PAN_DISABLE", 0, "Pan Disable", ""},
+
+ {FLY_MODAL_DIR_FORWARD, "FORWARD", 0, "Fly Forward", ""},
+ {FLY_MODAL_DIR_BACKWARD,"BACKWARD", 0, "Fly Backward", ""},
+ {FLY_MODAL_DIR_LEFT, "LEFT", 0, "Fly Left", ""},
+ {FLY_MODAL_DIR_RIGHT, "RIGHT", 0, "Fly Right", ""},
+ {FLY_MODAL_DIR_UP, "UP", 0, "Fly Up", ""},
+ {FLY_MODAL_DIR_DOWN, "DOWN", 0, "Fly Down", ""},
+
+ {FLY_MODAL_AXIS_LOCK_X, "AXIS_LOCK_X", 0, "X Axis Correction", "X axis correction (toggle)"},
+ {FLY_MODAL_AXIS_LOCK_Z, "AXIS_LOCK_Z", 0, "X Axis Correction", "Z axis correction (toggle)"},
+
+ {FLY_MODAL_PRECISION_ENABLE, "PRECISION_ENABLE", 0, "Precision Enable", ""},
+ {FLY_MODAL_PRECISION_DISABLE, "PRECISION_DISABLE", 0, "Precision Disable", ""},
+
+ {0, NULL, 0, NULL, NULL}};
+
+ wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "View3D Fly Modal");
+
+ /* this function is called for each spacetype, only needs to add map once */
+ if(keymap) return;
+
+ keymap= WM_modalkeymap_add(keyconf, "View3D Fly Modal", modal_items);
+
+ /* items for modal map */
+ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, FLY_MODAL_CANCEL);
+ WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_ANY, KM_ANY, 0, FLY_MODAL_CANCEL);
+
+ WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_ANY, KM_ANY, 0, FLY_MODAL_CONFIRM);
+ WM_modalkeymap_add_item(keymap, RETKEY, KM_PRESS, KM_ANY, 0, FLY_MODAL_CONFIRM);
+ WM_modalkeymap_add_item(keymap, PADENTER, KM_PRESS, KM_ANY, 0, FLY_MODAL_CONFIRM);
+
+ WM_modalkeymap_add_item(keymap, PADPLUSKEY, KM_PRESS, 0, 0, FLY_MODAL_ACCELERATE);
+ WM_modalkeymap_add_item(keymap, PADMINUS, KM_PRESS, 0, 0, FLY_MODAL_DECELERATE);
+ WM_modalkeymap_add_item(keymap, WHEELUPMOUSE, KM_PRESS, 0, 0, FLY_MODAL_ACCELERATE);
+ WM_modalkeymap_add_item(keymap, WHEELDOWNMOUSE, KM_PRESS, 0, 0, FLY_MODAL_DECELERATE);
+
+ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_PRESS, KM_ANY, 0, FLY_MODAL_PAN_ENABLE);
+ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, FLY_MODAL_PAN_DISABLE); /* XXX - Bug in the event system, middle mouse release doesnt work */
+
+ /* WASD */
+ WM_modalkeymap_add_item(keymap, WKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_FORWARD);
+ WM_modalkeymap_add_item(keymap, SKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_BACKWARD);
+ WM_modalkeymap_add_item(keymap, AKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_LEFT);
+ WM_modalkeymap_add_item(keymap, DKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_RIGHT);
+ WM_modalkeymap_add_item(keymap, RKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_UP);
+ WM_modalkeymap_add_item(keymap, FKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_DOWN);
+
+ WM_modalkeymap_add_item(keymap, XKEY, KM_PRESS, 0, 0, FLY_MODAL_AXIS_LOCK_X);
+ WM_modalkeymap_add_item(keymap, ZKEY, KM_PRESS, 0, 0, FLY_MODAL_AXIS_LOCK_Z);
+
+ WM_modalkeymap_add_item(keymap, LEFTSHIFTKEY, KM_PRESS, KM_ANY, 0, FLY_MODAL_PRECISION_ENABLE);
+ WM_modalkeymap_add_item(keymap, LEFTSHIFTKEY, KM_RELEASE, KM_ANY, 0, FLY_MODAL_PRECISION_DISABLE);
+
+ /* assign map to operators */
+ WM_modalkeymap_assign(keymap, "VIEW3D_OT_fly");
+
+}
+
+typedef struct FlyInfo {
+ /* context stuff */
+ RegionView3D *rv3d;
+ View3D *v3d;
+ ARegion *ar;
+ Scene *scene;
+
+ wmTimer *timer; /* needed for redraws */
+
+ short state;
+ short use_precision;
+ short redraw;
+ short mval[2];
+
+ /* fly state state */
+ float speed; /* the speed the view is moving per redraw */
+ short axis; /* Axis index to move allong by default Z to move allong the view */
+ short pan_view; /* when true, pan the view instead of rotating */
+
+ /* relative view axis locking - xlock, zlock
+ 0; disabled
+ 1; enabled but not checking because mouse hasnt moved outside the margin since locking was checked an not needed
+ when the mouse moves, locking is set to 2 so checks are done.
+ 2; mouse moved and checking needed, if no view altering is donem its changed back to 1 */
+ short xlock, zlock;
+ float xlock_momentum, zlock_momentum; /* nicer dynamics */
+ float grid; /* world scale 1.0 default */
+
+ /* backup values */
+ float dist_backup; /* backup the views distance since we use a zero dist for fly mode */
+ float ofs_backup[3]; /* backup the views offset incase the user cancels flying in non camera mode */
+ float rot_backup[4]; /* backup the views quat incase the user cancels flying in non camera mode. (quat for view, eul for camera) */
+ short persp_backup; /* remember if were ortho or not, only used for restoring the view if it was a ortho view */
+
+ /* compare between last state */
+ double time_lastwheel; /* used to accelerate when using the mousewheel a lot */
+ double time_lastdraw; /* time between draws */
+
+ /* use for some lag */
+ float dvec_prev[3]; /* old for some lag */
+
+} FlyInfo;
+
+/* FlyInfo->state */
+#define FLY_RUNNING 0
+#define FLY_CANCEL 1
+#define FLY_CONFIRM 2
+
+int initFlyInfo (bContext *C, FlyInfo *fly, wmOperator *op, wmEvent *event)
+{
+ float upvec[3]; // tmp
+ float mat[3][3];
+
+ fly->rv3d= CTX_wm_region_view3d(C);
+ fly->v3d = CTX_wm_view3d(C);
+ fly->ar = CTX_wm_region(C);
+ fly->scene= CTX_data_scene(C);
+
+ if(fly->rv3d->persp==V3D_CAMOB && fly->v3d->camera->id.lib) {
+ BKE_report(op->reports, RPT_ERROR, "Cannot fly a camera from an external library");
+ return FALSE;
+ }
+
+ if(fly->v3d->ob_centre) {
+ BKE_report(op->reports, RPT_ERROR, "Cannot fly when the view is locked to an object");
+ return FALSE;
+ }
+
+ if(fly->rv3d->persp==V3D_CAMOB && fly->v3d->camera->constraints.first) {
+ BKE_report(op->reports, RPT_ERROR, "Cannot fly an object with constraints");
+ return FALSE;
+ }
+
+ fly->state= FLY_RUNNING;
+ fly->speed= 0.0f;
+ fly->axis= 2;
+ fly->pan_view= FALSE;
+ fly->xlock= FALSE;
+ fly->zlock= TRUE;
+ fly->xlock_momentum=0.0f;
+ fly->zlock_momentum=0.0f;
+ fly->grid= 1.0f;
+ fly->use_precision= 0;
+
+ fly->dvec_prev[0]= fly->dvec_prev[1]= fly->dvec_prev[2]= 0.0f;
+
+ fly->timer= WM_event_add_window_timer(CTX_wm_window(C), TIMER, 0.01f);
+
+
+ /* we have to rely on events to give proper mousecoords after a warp_pointer */
+//XXX2.5 warp_pointer(cent_orig[0], cent_orig[1]);
+ //fly->mval[0]= (fly->sa->winx)/2;
+ //fly->mval[1]= (fly->sa->winy)/2;
+
+ fly->mval[0] = event->x - fly->ar->winrct.xmin;
+ fly->mval[1] = event->y - fly->ar->winrct.ymin;
+
+
+ fly->time_lastdraw= fly->time_lastwheel= PIL_check_seconds_timer();
+
+ fly->rv3d->rflag |= RV3D_FLYMODE; /* so we draw the corner margins */
+
+ /* detect weather to start with Z locking */
+ upvec[0]=1.0f; upvec[1]=0.0f; upvec[2]=0.0f;
+ Mat3CpyMat4(mat, fly->rv3d->viewinv);
+ Mat3MulVecfl(mat, upvec);
+ if (fabs(upvec[2]) < 0.1)
+ fly->zlock = 1;
+ upvec[0]=0; upvec[1]=0; upvec[2]=0;
+
+ fly->persp_backup= fly->rv3d->persp;
+ fly->dist_backup= fly->rv3d->dist;
+ if (fly->rv3d->persp==V3D_CAMOB) {
+ /* store the origoinal camera loc and rot */
+ VECCOPY(fly->ofs_backup, fly->v3d->camera->loc);
+ VECCOPY(fly->rot_backup, fly->v3d->camera->rot);
+
+ where_is_object(fly->scene, fly->v3d->camera);
+ VECCOPY(fly->rv3d->ofs, fly->v3d->camera->obmat[3]);
+ VecMulf(fly->rv3d->ofs, -1.0f); /*flip the vector*/
+
+ fly->rv3d->dist=0.0;
+ fly->rv3d->viewbut=0;
+
+ /* used for recording */
+//XXX2.5 if(v3d->camera->ipoflag & OB_ACTION_OB)
+//XXX2.5 actname= "Object";
+
+ } else {
+ /* perspective or ortho */
+ if (fly->rv3d->persp==V3D_ORTHO)
+ fly->rv3d->persp= V3D_PERSP; /*if ortho projection, make perspective */
+ QUATCOPY(fly->rot_backup, fly->rv3d->viewquat);
+ VECCOPY(fly->ofs_backup, fly->rv3d->ofs);
+ fly->rv3d->dist= 0.0;
+
+ upvec[2]= fly->dist_backup; /*x and y are 0*/
+ Mat3MulVecfl(mat, upvec);
+ VecSubf(fly->rv3d->ofs, fly->rv3d->ofs, upvec);
+ /*Done with correcting for the dist*/
+ }
+
+ return 1;
+}
+
+static int flyEnd(bContext *C, FlyInfo *fly)
+{
+ RegionView3D *rv3d= fly->rv3d;
+ View3D *v3d = fly->v3d;
+
+ float upvec[3];
+
+ if(fly->state == FLY_RUNNING)
+ return OPERATOR_RUNNING_MODAL;
+
+ WM_event_remove_window_timer(CTX_wm_window(C), fly->timer);
+
+ rv3d->dist= fly->dist_backup;
+
+ if (fly->state == FLY_CANCEL) {
+ /* Revert to original view? */
+ if (fly->persp_backup==V3D_CAMOB) { /* a camera view */
+ rv3d->viewbut=1;
+ VECCOPY(v3d->camera->loc, fly->ofs_backup);
+ VECCOPY(v3d->camera->rot, fly->rot_backup);
+ DAG_id_flush_update(&v3d->camera->id, OB_RECALC_OB);
+ } else {
+ /* Non Camera we need to reset the view back to the original location bacause the user canceled*/
+ QUATCOPY(rv3d->viewquat, fly->rot_backup);
+ VECCOPY(rv3d->ofs, fly->ofs_backup);
+ rv3d->persp= fly->persp_backup;
+ }
+ }
+ else if (fly->persp_backup==V3D_CAMOB) { /* camera */
+ float mat3[3][3];
+ Mat3CpyMat4(mat3, v3d->camera->obmat);
+ Mat3ToCompatibleEul(mat3, v3d->camera->rot, fly->rot_backup);
+
+ DAG_id_flush_update(&v3d->camera->id, OB_RECALC_OB);
+#if 0 //XXX2.5
+ if (IS_AUTOKEY_MODE(NORMAL)) {
+ allqueue(REDRAWIPO, 0);
+ allspace(REMAKEIPO, 0);
+ allqueue(REDRAWNLA, 0);
+ allqueue(REDRAWTIME, 0);
+ }
+#endif
+ }
+ else { /* not camera */
+ /* Apply the fly mode view */
+ /*restore the dist*/
+ float mat[3][3];
+ upvec[0]= upvec[1]= 0;
+ upvec[2]= fly->dist_backup; /*x and y are 0*/
+ Mat3CpyMat4(mat, rv3d->viewinv);
+ Mat3MulVecfl(mat, upvec);
+ VecAddf(rv3d->ofs, rv3d->ofs, upvec);
+ /*Done with correcting for the dist */
+ }
+
+ rv3d->rflag &= ~RV3D_FLYMODE;
+//XXX2.5 BIF_view3d_previewrender_signal(fly->sa, PR_DBASE|PR_DISPRECT); /* not working at the moment not sure why */
+
+
+ if(fly->state == FLY_CONFIRM) {
+ MEM_freeN(fly);
+ return OPERATOR_FINISHED;
+ }
+
+ MEM_freeN(fly);
+ return OPERATOR_CANCELLED;
+}
+
+void flyEvent(FlyInfo *fly, wmEvent *event)
+{
+ if (event->type == TIMER) {
+ fly->redraw = 1;
+ }
+ else if (event->type == MOUSEMOVE) {
+ fly->mval[0] = event->x - fly->ar->winrct.xmin;
+ fly->mval[1] = event->y - fly->ar->winrct.ymin;
+ } /* handle modal keymap first */
+ else if (event->type == EVT_MODAL_MAP) {
+ switch (event->val) {
+ case FLY_MODAL_CANCEL:
+ fly->state = FLY_CANCEL;
+ break;
+ case FLY_MODAL_CONFIRM:
+ fly->state = FLY_CONFIRM;
+ break;
+
+ case FLY_MODAL_ACCELERATE:
+ {
+ double time_currwheel;
+ float time_wheel;
+
+ time_currwheel= PIL_check_seconds_timer();
+ time_wheel = (float)(time_currwheel - fly->time_lastwheel);
+ fly->time_lastwheel = time_currwheel;
+ /*printf("Wheel %f\n", time_wheel);*/
+ /*Mouse wheel delays range from 0.5==slow to 0.01==fast*/
+ time_wheel = 1+ (10 - (20*MIN2(time_wheel, 0.5))); /* 0-0.5 -> 0-5.0 */
+
+ if (fly->speed<0.0f) fly->speed= 0.0f;
+ else {
+ if (event->shift)
+ fly->speed+= fly->grid*time_wheel*0.1;
+ else
+ fly->speed+= fly->grid*time_wheel;
+ }
+ break;
+ }
+ case FLY_MODAL_DECELERATE:
+ {
+ double time_currwheel;
+ float time_wheel;
+
+ time_currwheel= PIL_check_seconds_timer();
+ time_wheel = (float)(time_currwheel - fly->time_lastwheel);
+ fly->time_lastwheel = time_currwheel;
+ time_wheel = 1+ (10 - (20*MIN2(time_wheel, 0.5))); /* 0-0.5 -> 0-5.0 */
+
+ if (fly->speed>0) fly->speed=0;
+ else {
+ if (event->shift)
+ fly->speed-= fly->grid*time_wheel*0.1;
+ else
+ fly->speed-= fly->grid*time_wheel;
+ }
+ break;
+ }
+ case FLY_MODAL_PAN_ENABLE:
+ fly->pan_view= TRUE;
+ break;
+ case FLY_MODAL_PAN_DISABLE:
+//XXX2.5 warp_pointer(cent_orig[0], cent_orig[1]);
+ fly->pan_view= FALSE;
+ break;
+
+ /* impliment WASD keys */
+ case FLY_MODAL_DIR_FORWARD:
+ if (fly->speed < 0.0f) fly->speed= -fly->speed; /* flip speed rather then stopping, game like motion */
+ else fly->speed += fly->grid; /* increse like mousewheel if were alredy moving in that difection*/
+ fly->axis= 2;
+ break;
+ case FLY_MODAL_DIR_BACKWARD:
+ if (fly->speed>0) fly->speed= -fly->speed;
+ else fly->speed -= fly->grid;
+ fly->axis= 2;
+ break;
+ case FLY_MODAL_DIR_LEFT:
+ if (fly->speed < 0.0f) fly->speed= -fly->speed;
+ fly->axis= 0;
+ break;
+ case FLY_MODAL_DIR_RIGHT:
+ if (fly->speed > 0.0f) fly->speed= -fly->speed;
+ fly->axis= 0;
+ break;
+
+ case FLY_MODAL_DIR_UP:
+ if (fly->speed < 0.0f) fly->speed= -fly->speed;
+ fly->axis= 1;
+ break;
+
+ case FLY_MODAL_DIR_DOWN:
+ if (fly->speed > 0.0f) fly->speed= -fly->speed;
+ fly->axis= 1;
+ break;
+
+ case FLY_MODAL_AXIS_LOCK_X:
+ if (fly->xlock) fly->xlock=0;
+ else {
+ fly->xlock = 2;
+ fly->xlock_momentum = 0.0;
+ }
+ break;
+ case FLY_MODAL_AXIS_LOCK_Z:
+ if (fly->zlock) fly->zlock=0;
+ else {
+ fly->zlock = 2;
+ fly->zlock_momentum = 0.0;
+ }
+ break;
+
+ case FLY_MODAL_PRECISION_ENABLE:
+ fly->use_precision= TRUE;
+ break;
+ case FLY_MODAL_PRECISION_DISABLE:
+ fly->use_precision= FALSE;
+ break;
+
+ }
+ }
+}
+
+//int fly_exec(bContext *C, wmOperator *op)
+int flyApply(FlyInfo *fly)
+{
+ /*
+ fly mode - Shift+F
+ a fly loop where the user can move move the view as if they are flying
+ */
+ RegionView3D *rv3d= fly->rv3d;
+ View3D *v3d = fly->v3d;
+ ARegion *ar = fly->ar;
+ Scene *scene= fly->scene;
+
+ float mat[3][3], /* 3x3 copy of the view matrix so we can move allong the view axis */
+ dvec[3]={0,0,0}, /* this is the direction thast added to the view offset per redraw */
+
+ /* Camera Uprighting variables */
+ upvec[3]={0,0,0}, /* stores the view's up vector */
+
+ moffset[2], /* mouse offset from the views center */
+ tmp_quat[4]; /* used for rotating the view */
+
+ int cent_orig[2], /* view center */
+//XXX- can avoid using // cent[2], /* view center modified */
+ xmargin, ymargin; /* x and y margin are define the safe area where the mouses movement wont rotate the view */
+ unsigned char
+ apply_rotation= 1; /* if the user presses shift they can look about without movinf the direction there looking*/
+
+ /* for recording */
+#if 0 //XXX2.5 todo, get animation recording working again.
+ int playing_anim = 0; //XXX has_screenhandler(G.curscreen, SCREEN_HANDLER_ANIM);
+ int cfra = -1; /*so the first frame always has a key added */
+ char *actname="";
+#endif
+ /* the dist defines a vector that is infront of the offset
+ to rotate the view about.
+ this is no good for fly mode because we
+ want to rotate about the viewers center.
+ but to correct the dist removal we must
+ alter offset so the view doesn't jump. */
+
+ xmargin= ar->winx/20.0f;
+ ymargin= ar->winy/20.0f;
+
+ cent_orig[0]= ar->winrct.xmin + ar->winx/2;
+ cent_orig[1]= ar->winrct.ymin + ar->winy/2;
+
+ {
+
+ /* mouse offset from the center */
+ moffset[0]= fly->mval[0]- ar->winx/2;
+ moffset[1]= fly->mval[1]- ar->winy/2;
+
+ /* enforce a view margin */
+ if (moffset[0]>xmargin) moffset[0]-=xmargin;
+ else if (moffset[0] < -xmargin) moffset[0]+=xmargin;
+ else moffset[0]=0;
+
+ if (moffset[1]>ymargin) moffset[1]-=ymargin;
+ else if (moffset[1] < -ymargin) moffset[1]+=ymargin;
+ else moffset[1]=0;
+
+
+ /* scale the mouse movement by this value - scales mouse movement to the view size
+ * moffset[0]/(ar->winx-xmargin*2) - window size minus margin (same for y)
+ *
+ * the mouse moves isnt linear */
+
+ if(moffset[0]) {
+ moffset[0] /= ar->winx - (xmargin*2);
+ moffset[0] *= fabs(moffset[0]);
+ }
+
+ if(moffset[1]) {
+ moffset[1] /= ar->winy - (ymargin*2);
+ moffset[1] *= fabs(moffset[1]);
+ }
+
+ /* Should we redraw? */
+ if(fly->speed != 0.0f || moffset[0] || moffset[1] || fly->zlock || fly->xlock || dvec[0] || dvec[1] || dvec[2] ) {
+ float dvec_tmp[3];
+ double time_current, time_redraw; /*time how fast it takes for us to redraw, this is so simple scenes dont fly too fast */
+ float time_redraw_clamped;
+
+ time_current= PIL_check_seconds_timer();
+ time_redraw= (float)(time_current - fly->time_lastdraw);
+ time_redraw_clamped= MIN2(0.05f, time_redraw); /* clamt the redraw time to avoid jitter in roll correction */
+ fly->time_lastdraw= time_current;
+ /*fprintf(stderr, "%f\n", time_redraw);*/ /* 0.002 is a small redraw 0.02 is larger */
+
+ /* Scale the time to use shift to scale the speed down- just like
+ shift slows many other areas of blender down */
+ if (fly->use_precision)
+ fly->speed= fly->speed * (1.0f-time_redraw_clamped);
+
+ Mat3CpyMat4(mat, rv3d->viewinv);
+
+ if (fly->pan_view==TRUE) {
+ /* pan only */
+ dvec_tmp[0]= -moffset[0];
+ dvec_tmp[1]= -moffset[1];
+ dvec_tmp[2]= 0;
+
+ if (fly->use_precision) {
+ dvec_tmp[0] *= 0.1;
+ dvec_tmp[1] *= 0.1;
+ }
+
+ Mat3MulVecfl(mat, dvec_tmp);
+ VecMulf(dvec_tmp, time_redraw*200.0 * fly->grid);
+
+ } else {
+ float roll; /* similar to the angle between the camera's up and the Z-up, but its very rough so just roll*/
+
+ /* rotate about the X axis- look up/down */
+ if (moffset[1]) {
+ upvec[0]=1;
+ upvec[1]=0;
+ upvec[2]=0;
+ Mat3MulVecfl(mat, upvec);
+ VecRotToQuat( upvec, (float)moffset[1]*-time_redraw*20, tmp_quat); /* Rotate about the relative up vec */
+ QuatMul(rv3d->viewquat, rv3d->viewquat, tmp_quat);
+
+ if (fly->xlock) fly->xlock = 2; /*check for rotation*/
+ if (fly->zlock) fly->zlock = 2;
+ fly->xlock_momentum= 0.0f;
+ }
+
+ /* rotate about the Y axis- look left/right */
+ if (moffset[0]) {
+
+ /* if we're upside down invert the moffset */
+ upvec[0]=0;
+ upvec[1]=1;
+ upvec[2]=0;
+ Mat3MulVecfl(mat, upvec);
+
+ if(upvec[2] < 0.0f)
+ moffset[0]= -moffset[0];
+
+ /* make the lock vectors */
+ if (fly->zlock) {
+ upvec[0]=0;
+ upvec[1]=0;
+ upvec[2]=1;
+ } else {
+ upvec[0]=0;
+ upvec[1]=1;
+ upvec[2]=0;
+ Mat3MulVecfl(mat, upvec);
+ }
+
+ VecRotToQuat( upvec, (float)moffset[0]*time_redraw*20, tmp_quat); /* Rotate about the relative up vec */
+ QuatMul(rv3d->viewquat, rv3d->viewquat, tmp_quat);
+
+ if (fly->xlock) fly->xlock = 2;/*check for rotation*/
+ if (fly->zlock) fly->zlock = 2;
+ }
+
+ if (fly->zlock==2) {
+ upvec[0]=1;
+ upvec[1]=0;
+ upvec[2]=0;
+ Mat3MulVecfl(mat, upvec);
+
+ /*make sure we have some z rolling*/
+ if (fabs(upvec[2]) > 0.00001f) {
+ roll= upvec[2]*5;
+ upvec[0]=0; /*rotate the view about this axis*/
+ upvec[1]=0;
+ upvec[2]=1;
+
+ Mat3MulVecfl(mat, upvec);
+ VecRotToQuat( upvec, roll*time_redraw_clamped*fly->zlock_momentum*0.1, tmp_quat); /* Rotate about the relative up vec */
+ QuatMul(rv3d->viewquat, rv3d->viewquat, tmp_quat);
+
+ fly->zlock_momentum += 0.05f;
+ } else {
+ fly->zlock=1; /* dont check until the view rotates again */
+ fly->zlock_momentum= 0.0f;
+ }
+ }
+
+ if (fly->xlock==2 && moffset[1]==0) { /*only apply xcorrect when mouse isnt applying x rot*/
+ upvec[0]=0;
+ upvec[1]=0;
+ upvec[2]=1;
+ Mat3MulVecfl(mat, upvec);
+ /*make sure we have some z rolling*/
+ if (fabs(upvec[2]) > 0.00001) {
+ roll= upvec[2] * -5;
+
+ upvec[0]= 1.0f; /*rotate the view about this axis*/
+ upvec[1]= 0.0f;
+ upvec[2]= 0.0f;
+
+ Mat3MulVecfl(mat, upvec);
+
+ VecRotToQuat( upvec, roll*time_redraw_clamped*fly->xlock_momentum*0.1f, tmp_quat); /* Rotate about the relative up vec */
+ QuatMul(rv3d->viewquat, rv3d->viewquat, tmp_quat);
+
+ fly->xlock_momentum += 0.05f;
+ } else {
+ fly->xlock=1; /* see above */
+ fly->xlock_momentum= 0.0f;
+ }
+ }
+
+
+ if (apply_rotation) {
+ /* Normal operation */
+ /* define dvec, view direction vector */
+ dvec_tmp[0]= dvec_tmp[1]= dvec_tmp[2]= 0.0f;
+ /* move along the current axis */
+ dvec_tmp[fly->axis]= 1.0f;
+
+ Mat3MulVecfl(mat, dvec_tmp);
+
+ VecMulf(dvec_tmp, fly->speed * time_redraw * 0.25f);
+ }
+ }
+
+ /* impose a directional lag */
+ VecLerpf(dvec, dvec_tmp, fly->dvec_prev, (1.0f/(1.0f+(time_redraw*5.0f))));
+
+ if (rv3d->persp==V3D_CAMOB) {
+ if (v3d->camera->protectflag & OB_LOCK_LOCX)
+ dvec[0] = 0.0;
+ if (v3d->camera->protectflag & OB_LOCK_LOCY)
+ dvec[1] = 0.0;
+ if (v3d->camera->protectflag & OB_LOCK_LOCZ)
+ dvec[2] = 0.0;
+ }
+
+ VecAddf(rv3d->ofs, rv3d->ofs, dvec);
+#if 0 //XXX2.5
+ if (fly->zlock && fly->xlock)
+ headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X on/Z on, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB");
+ else if (fly->zlock)
+ headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X off/Z on, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB");
+ else if (fly->xlock)
+ headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X on/Z off, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB");
+ else
+ headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X off/Z off, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB");
+#endif
+
+//XXX2.5 do_screenhandlers(G.curscreen); /* advance the next frame */
+
+ /* we are in camera view so apply the view ofs and quat to the view matrix and set the camera to the view */
+ if (rv3d->persp==V3D_CAMOB) {
+ rv3d->persp= V3D_PERSP; /*set this so setviewmatrixview3d uses the ofs and quat instead of the camera */
+ setviewmatrixview3d(scene, v3d, rv3d);
+
+ setcameratoview3d(v3d, rv3d, v3d->camera);
+
+ { //XXX - some reason setcameratoview3d doesnt copy, shouldnt not be needed!
+ VECCOPY(v3d->camera->loc, rv3d->ofs);
+ VecNegf(v3d->camera->loc);
+ }
+
+ rv3d->persp= V3D_CAMOB;
+#if 0 //XXX2.5
+ /* record the motion */
+ if (IS_AUTOKEY_MODE(NORMAL) && (!playing_anim || cfra != G.scene->r.cfra)) {
+ cfra = G.scene->r.cfra;
+
+ if (fly->xlock || fly->zlock || moffset[0] || moffset[1]) {
+ insertkey(&v3d->camera->id, ID_OB, actname, NULL, OB_ROT_X, 0);
+ insertkey(&v3d->camera->id, ID_OB, actname, NULL, OB_ROT_Y, 0);
+ insertkey(&v3d->camera->id, ID_OB, actname, NULL, OB_ROT_Z, 0);
+ }
+ if (fly->speed) {
+ insertkey(&v3d->camera->id, ID_OB, actname, NULL, OB_LOC_X, 0);
+ insertkey(&v3d->camera->id, ID_OB, actname, NULL, OB_LOC_Y, 0);
+ insertkey(&v3d->camera->id, ID_OB, actname, NULL, OB_LOC_Z, 0);
+ }
+ }
+#endif
+ }
+//XXX2.5 scrarea_do_windraw(curarea);
+//XXX2.5 screen_swapbuffers();
+ } else
+ /*were not redrawing but we need to update the time else the view will jump */
+ fly->time_lastdraw= PIL_check_seconds_timer();
+ /* end drawing */
+ VECCOPY(fly->dvec_prev, dvec);
+ }
+
+/* moved to flyEnd() */
+
+ return OPERATOR_FINISHED;
+}
+
+
+
+static int fly_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ RegionView3D *rv3d= CTX_wm_region_view3d(C);
+ FlyInfo *fly;
+
+ if(rv3d->viewlock)
+ return OPERATOR_CANCELLED;
+
+ fly= MEM_callocN(sizeof(FlyInfo), "FlyOperation");
+
+ op->customdata= fly;
+
+ if(initFlyInfo(C, fly, op, event)==FALSE) {
+ MEM_freeN(op->customdata);
+ return OPERATOR_CANCELLED;
+ }
+
+ flyEvent(fly, event);
+
+ WM_event_add_modal_handler(C, op);
+
+ return OPERATOR_RUNNING_MODAL;
+}
+
+static int fly_cancel(bContext *C, wmOperator *op)
+{
+ FlyInfo *fly = op->customdata;
+
+ fly->state = FLY_CANCEL;
+ flyEnd(C, fly);
+ op->customdata= NULL;
+
+ return OPERATOR_CANCELLED;
+}
+
+static int fly_modal(bContext *C, wmOperator *op, wmEvent *event)
+{
+ int exit_code;
+
+ FlyInfo *fly = op->customdata;
+
+ fly->redraw= 0;
+
+ flyEvent(fly, event);
+
+ if(event->type==TIMER)
+ flyApply(fly);
+
+ if(fly->redraw) {;
+ ED_region_tag_redraw(CTX_wm_region(C));
+ }
+
+ exit_code = flyEnd(C, fly);
+
+ if(exit_code!=OPERATOR_RUNNING_MODAL)
+ ED_region_tag_redraw(CTX_wm_region(C));
+
+ return exit_code;
+}
+
+void VIEW3D_OT_fly(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Fly Navigation";
+ ot->description= "Interactively fly around the scene.";
+ ot->idname= "VIEW3D_OT_fly";
+
+ /* api callbacks */
+ ot->invoke= fly_invoke;
+ ot->cancel= fly_cancel;
+ ot->modal= fly_modal;
+ ot->poll= ED_operator_view3d_active;
+
+ /* flags */
+ ot->flag= OPTYPE_BLOCKING;
+
+}
+
/* ************************************** */
void view3d_align_axis_to_vector(View3D *v3d, RegionView3D *rv3d, int axisidx, float vec[3])
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index e877f1fecae..7128bd9c6a9 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -100,6 +100,7 @@
#include "ED_markers.h"
#include "ED_util.h"
#include "ED_view3d.h"
+#include "ED_mesh.h"
#include "UI_view2d.h"
#include "WM_types.h"
@@ -108,6 +109,8 @@
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
#include "BLI_editVert.h"
+#include "BLI_ghash.h"
+#include "BLI_linklist.h"
#include "PIL_time.h" /* sleep */
@@ -319,7 +322,7 @@ static void viewRedrawForce(bContext *C, TransInfo *t)
else if(t->spacetype == SPACE_NODE)
{
//ED_area_tag_redraw(t->sa);
- WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_NODE, NULL);
}
else if(t->spacetype == SPACE_SEQ)
{
@@ -512,7 +515,7 @@ static char *transform_to_undostr(TransInfo *t)
#define TFM_MODAL_SNAP_GEARS_OFF 7
/* called in transform_ops.c, on each regeneration of keymaps */
-void transform_modal_keymap(wmWindowManager *wm)
+void transform_modal_keymap(wmKeyConfig *keyconf)
{
static EnumPropertyItem modal_items[] = {
{TFM_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
@@ -524,12 +527,12 @@ void transform_modal_keymap(wmWindowManager *wm)
{TFM_MODAL_SNAP_GEARS_OFF, "SNAP_GEARS_OFF", 0, "Snap Off", ""},
{0, NULL, 0, NULL, NULL}};
- wmKeyMap *keymap= WM_modalkeymap_get(wm, "Transform Modal Map");
+ wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Transform Modal Map");
/* this function is called for each spacetype, only needs to add map once */
if(keymap) return;
- keymap= WM_modalkeymap_add(wm, "Transform Modal Map", modal_items);
+ keymap= WM_modalkeymap_add(keyconf, "Transform Modal Map", modal_items);
/* items for modal map */
WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, TFM_MODAL_CANCEL);
@@ -770,10 +773,11 @@ void transformEvent(TransInfo *t, wmEvent *event)
stopConstraint(t);
}
else {
+ short orientation = t->current_orientation != V3D_MANIP_GLOBAL ? t->current_orientation : V3D_MANIP_LOCAL;
if ((t->modifiers & MOD_CONSTRAINT_PLANE) == 0)
- setUserConstraint(t, (CON_AXIS0), "along %s X");
+ setUserConstraint(t, orientation, (CON_AXIS0), "along %s X");
else if (t->modifiers & MOD_CONSTRAINT_PLANE)
- setUserConstraint(t, (CON_AXIS1|CON_AXIS2), "locking %s X");
+ setUserConstraint(t, orientation, (CON_AXIS1|CON_AXIS2), "locking %s X");
}
}
}
@@ -802,10 +806,11 @@ void transformEvent(TransInfo *t, wmEvent *event)
stopConstraint(t);
}
else {
+ short orientation = t->current_orientation != V3D_MANIP_GLOBAL ? t->current_orientation : V3D_MANIP_LOCAL;
if ((t->modifiers & MOD_CONSTRAINT_PLANE) == 0)
- setUserConstraint(t, (CON_AXIS1), "along %s Y");
+ setUserConstraint(t, orientation, (CON_AXIS1), "along %s Y");
else if (t->modifiers & MOD_CONSTRAINT_PLANE)
- setUserConstraint(t, (CON_AXIS0|CON_AXIS2), "locking %s Y");
+ setUserConstraint(t, orientation, (CON_AXIS0|CON_AXIS2), "locking %s Y");
}
}
}
@@ -830,10 +835,11 @@ void transformEvent(TransInfo *t, wmEvent *event)
stopConstraint(t);
}
else {
+ short orientation = t->current_orientation != V3D_MANIP_GLOBAL ? t->current_orientation : V3D_MANIP_LOCAL;
if ((t->modifiers & MOD_CONSTRAINT_PLANE) == 0)
- setUserConstraint(t, (CON_AXIS2), "along %s Z");
+ setUserConstraint(t, orientation, (CON_AXIS2), "along %s Z");
else if ((t->modifiers & MOD_CONSTRAINT_PLANE) && ((t->flag & T_2D_EDIT)==0))
- setUserConstraint(t, (CON_AXIS0|CON_AXIS1), "locking %s Z");
+ setUserConstraint(t, orientation, (CON_AXIS0|CON_AXIS1), "locking %s Z");
}
}
else if ((t->flag & T_2D_EDIT)==0) {
@@ -1282,6 +1288,36 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
proportional = 0;
}
+ // If modal, save settings back in scene if not set as operator argument
+ if (t->flag & T_MODAL)
+ {
+ /* save settings if not set in operator */
+ if (RNA_struct_find_property(op->ptr, "proportional") && !RNA_property_is_set(op->ptr, "proportional"))
+ {
+ ts->proportional = proportional;
+ }
+
+ if (RNA_struct_find_property(op->ptr, "proportional_size") && !RNA_property_is_set(op->ptr, "proportional_size"))
+ {
+ ts->proportional_size = t->prop_size;
+ }
+
+ if (RNA_struct_find_property(op->ptr, "proportional_editing_falloff") && !RNA_property_is_set(op->ptr, "proportional_editing_falloff"))
+ {
+ ts->prop_mode = t->prop_mode;
+ }
+
+ if(t->spacetype == SPACE_VIEW3D)
+ {
+ if (RNA_struct_find_property(op->ptr, "constraint_orientation") && !RNA_property_is_set(op->ptr, "constraint_orientation"))
+ {
+ View3D *v3d = t->view;
+
+ v3d->twmode = t->current_orientation;
+ }
+ }
+ }
+
if (RNA_struct_find_property(op->ptr, "proportional"))
{
RNA_enum_set(op->ptr, "proportional", proportional);
@@ -1313,20 +1349,6 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis);
}
-
- // XXX If modal, save settings back in scene
- if (t->flag & T_MODAL)
- {
- ts->prop_mode = t->prop_mode;
- ts->proportional = proportional;
-
- if(t->spacetype == SPACE_VIEW3D)
- {
- View3D *v3d = t->view;
-
- v3d->twmode = t->current_orientation;
- }
- }
}
int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int mode)
@@ -1428,6 +1450,9 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
case TFM_BONE_ENVELOPE:
initBoneEnvelope(t);
break;
+ case TFM_EDGE_SLIDE:
+ initEdgeSlide(t);
+ break;
case TFM_BONE_ROLL:
initBoneRoll(t);
break;
@@ -1499,7 +1524,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
t->con.mode |= CON_AXIS2;
}
- setUserConstraint(t, t->con.mode, "%s");
+ setUserConstraint(t, t->current_orientation, t->con.mode, "%s");
}
}
@@ -1705,38 +1730,30 @@ 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
* - they only care that cob->matrix is correctly set ;-)
* - current space should be local
*/
memset(&cob, 0, sizeof(bConstraintOb));
Mat4One(cob.matrix);
- if (td->tdi) {
- TransDataIpokey *tdi= td->tdi;
- cob.matrix[3][0]= tdi->locx[0];
- cob.matrix[3][1]= tdi->locy[0];
- cob.matrix[3][2]= tdi->locz[0];
- }
- else {
- VECCOPY(cob.matrix[3], td->loc);
- }
-
+ 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)
continue;
-
+
/* do space conversions */
if (con->ownspace == CONSTRAINT_SPACE_WORLD) {
/* just multiply by td->mtx (this should be ok) */
@@ -1747,10 +1764,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) */
@@ -1759,17 +1776,9 @@ static void constraintTransLim(TransInfo *t, TransData *td)
}
}
}
-
+
/* copy results from cob->matrix */
- if (td->tdi) {
- TransDataIpokey *tdi= td->tdi;
- tdi->locx[0]= cob.matrix[3][0];
- tdi->locy[0]= cob.matrix[3][1];
- tdi->locz[0]= cob.matrix[3][2];
- }
- else {
- VECCOPY(td->loc, cob.matrix[3]);
- }
+ VECCOPY(td->loc, cob.matrix[3]);
}
}
@@ -1785,25 +1794,14 @@ static void constraintRotLim(TransInfo *t, TransData *td)
* - current space should be local
*/
memset(&cob, 0, sizeof(bConstraintOb));
- if (td->flag & TD_USEQUAT) {
+ if (td->rotOrder == ROT_MODE_QUAT) {
/* quats */
if (td->ext)
QuatToMat4(td->ext->quat, cob.matrix);
else
return;
}
- else if (td->tdi) { // XXX depreceated
- /* 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];
-
- EulOToMat4(eul, td->rotOrder, cob.matrix);
- }
- else if (td->rotOrder == PCHAN_ROT_AXISANGLE) {
+ else if (td->rotOrder == ROT_MODE_AXISANGLE) {
/* axis angle */
if (td->ext)
AxisAngleToMat4(&td->ext->quat[1], td->ext->quat[0], cob.matrix);
@@ -1857,22 +1855,11 @@ static void constraintRotLim(TransInfo *t, TransData *td)
}
/* copy results from cob->matrix */
- if (td->flag & TD_USEQUAT) {
+ if (td->rotOrder == ROT_MODE_QUAT) {
/* quats */
Mat4ToQuat(cob.matrix, td->ext->quat);
}
- else if (td->tdi) {
- /* ipo-keys eulers */
- TransDataIpokey *tdi= td->tdi;
- float eul[3];
-
- Mat4ToEulO(cob.matrix, eul, td->rotOrder);
-
- tdi->rotx[0]= eul[0];
- tdi->roty[0]= eul[1];
- tdi->rotz[0]= eul[2];
- }
- else if (td->rotOrder == PCHAN_ROT_AXISANGLE) {
+ else if (td->rotOrder == ROT_MODE_AXISANGLE) {
/* axis angle */
Mat4ToAxisAngle(cob.matrix, &td->ext->quat[1], &td->ext->quat[0]);
}
@@ -1889,22 +1876,13 @@ 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
* - they only care that cob->matrix is correctly set ;-)
* - current space should be local
*/
memset(&cob, 0, sizeof(bConstraintOb));
- 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)) {
+ if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) {
/* scale val and reset size */
return; // TODO: fix this case
}
@@ -1912,25 +1890,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)
continue;
-
+
/* do space conversions */
if (con->ownspace == CONSTRAINT_SPACE_WORLD) {
/* just multiply by td->mtx (this should be ok) */
@@ -1941,10 +1919,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) */
@@ -1953,19 +1931,9 @@ 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)) {
+ if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) {
/* scale val and reset size */
return; // TODO: fix this case
}
@@ -1973,7 +1941,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);
}
}
@@ -1985,21 +1953,21 @@ 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;
t->num.idx_max = 0;
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];
@@ -2014,7 +1982,7 @@ 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;
@@ -2026,7 +1994,7 @@ void initWarp(TransInfo *t)
int handleEventWarp(TransInfo *t, wmEvent *event)
{
int status = 0;
-
+
if (event->type == MIDDLEMOUSE && event->val==KM_PRESS)
{
// Use customData pointer to signal warp direction
@@ -2034,10 +2002,10 @@ int handleEventWarp(TransInfo *t, wmEvent *event)
t->customData = (void*)1;
else
t->customData = 0;
-
+
status = 1;
}
-
+
return status;
}
@@ -2047,7 +2015,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.
@@ -2068,73 +2036,73 @@ int Warp(TransInfo *t, short mval[2])
}
Mat4MulVecfl(t->viewmat, cursor);
VecSubf(cursor, cursor, t->viewmat[3]);
-
+
/* amount of degrees for warp */
circumfac = 360.0f * t->values[0];
-
+
if (t->customData) /* non-null value indicates reversed input */
{
circumfac *= -1;
}
-
+
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)
break;
-
+
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);
-
+
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;
}
@@ -2145,22 +2113,22 @@ 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==KM_PRESS)
{
// Use customData pointer to signal Shear direction
@@ -2174,10 +2142,10 @@ int handleEventShear(TransInfo *t, wmEvent *event)
initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE);
t->customData = 0;
}
-
+
status = 1;
}
-
+
return status;
}
@@ -2190,47 +2158,47 @@ int Shear(TransInfo *t, short mval[2])
float value;
int i;
char str[50];
-
+
Mat3CpyMat4(persmat, t->viewmat);
Mat3Inv(persinv, persmat);
-
+
value = 0.05f * t->values[0];
-
+
snapGrid(t, &value);
-
+
applyNumInput(&t->num, &value);
-
+
/* header print for NumInput */
if (hasNumInput(&t->num)) {
char c[20];
-
+
outputNumInput(&(t->num), c);
-
+
sprintf(str, "Shear: %s %s", c, t->proptext);
}
else {
/* 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;
-
+
if (td->flag & TD_SKIP)
continue;
-
+
if (t->obedit) {
float mat3[3][3];
Mat3MulMat3(mat3, totmat, td->mtx);
@@ -2240,19 +2208,19 @@ int Shear(TransInfo *t, short mval[2])
Mat3CpyMat3(tmat, totmat);
}
VecSubf(vec, td->center, t->center);
-
+
Mat3MulVecfl(tmat, vec);
-
+
VecAddf(vec, vec, t->center);
VecSubf(vec, vec, td->center);
-
+
VecMulf(vec, td->factor);
-
+
VecAddf(td->loc, td->iloc, vec);
}
-
+
recalcData(t);
-
+
ED_area_headerprint(t->sa, str);
return 1;
@@ -2264,9 +2232,9 @@ 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;
@@ -2274,7 +2242,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;
@@ -2292,7 +2260,7 @@ static void headerResize(TransInfo *t, float vec[3], char *str) {
sprintf(&tvec[20], "%.4f", vec[1]);
sprintf(&tvec[40], "%.4f", vec[2]);
}
-
+
if (t->con.mode & CON_APPLY) {
switch(t->num.idx_max) {
case 0:
@@ -2320,14 +2288,14 @@ 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];
@@ -2338,7 +2306,7 @@ static void TransMat3ToSize( float mat[][3], float smat[][3], float *size)
static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
float tmat[3][3], smat[3][3], center[3];
float vec[3];
-
+
if (t->flag & T_EDIT) {
Mat3MulMat3(smat, mat, td->mtx);
Mat3MulMat3(tmat, td->smtx, smat);
@@ -2346,18 +2314,18 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
else {
Mat3CpyMat3(tmat, mat);
}
-
+
if (t->con.applySize) {
t->con.applySize(t, td, tmat);
}
-
+
/* local constraint shouldn't alter center */
if (t->around == V3D_LOCAL) {
if (t->flag & T_OBJECT) {
VECCOPY(center, td->center);
}
else if (t->flag & T_EDIT) {
-
+
if(t->around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) {
VECCOPY(center, td->center);
}
@@ -2372,14 +2340,14 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
else {
VECCOPY(center, t->center);
}
-
+
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.
- Mat3MulMat3(obsizemat, tmat, td->axismtx);
+ Mat3MulMat3(obsizemat, td->axismtx, tmat);
//printmatrix3("obsizemat", obsizemat);
TransMat3ToSize(obsizemat, td->axismtx, fsize);
//printvecf("fsize", fsize);
@@ -2387,28 +2355,14 @@ 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)){
+ 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];
@@ -2417,46 +2371,39 @@ 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);
else
VecSubf(vec, td->center, center);
-
+
Mat3MulVecfl(tmat, vec);
-
+
VecAddf(vec, vec, center);
if (t->flag & T_POINTS)
VecSubf(vec, vec, td->iloc);
else
VecSubf(vec, vec, td->center);
-
+
VecMulf(vec, td->factor);
-
+
if (t->flag & (T_OBJECT|T_POSE)) {
Mat3MulVecfl(td->smtx, vec);
}
-
+
protectedTransBits(td->protectflag, vec);
-
- if(td->tdi) {
- TransDataIpokey *tdi= td->tdi;
- add_tdi_poin(tdi->locx, tdi->oldloc, vec[0]);
- add_tdi_poin(tdi->locy, tdi->oldloc+1, vec[1]);
- add_tdi_poin(tdi->locz, tdi->oldloc+2, vec[2]);
- }
- else VecAddf(td->loc, td->iloc, vec);
-
+ VecAddf(td->loc, td->iloc, vec);
+
constraintTransLim(t, td);
}
@@ -2467,7 +2414,7 @@ int Resize(TransInfo *t, short mval[2])
float ratio;
int i;
char str[200];
-
+
/* for manipulator, center handle, the scaling can't be done relative to center */
if( (t->flag & T_USES_MANIPULATOR) && t->con.mode==0)
{
@@ -2477,60 +2424,60 @@ int Resize(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);
}
-
+
applySnapping(t, size);
-
+
if (t->flag & T_AUTOVALUES)
{
VECCOPY(size, t->auto_values);
}
-
+
VECCOPY(t->values, size);
-
+
SizeToMat3(size, mat);
-
+
if (t->con.applySize) {
t->con.applySize(t, NULL, mat);
}
-
+
Mat3CpyMat3(t->mat, mat); // used in manipulator
-
+
headerResize(t, size, str);
-
+
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);
}
-
+
/* evil hack - redo resize if cliping needed */
if (t->flag & T_CLIP_UV && clipUVTransform(t, size, 1)) {
SizeToMat3(size, mat);
-
+
if (t->con.applySize)
t->con.applySize(t, NULL, mat);
-
+
for(i = 0, td=t->data; i < t->total; i++, td++)
ElementResize(t, td, mat);
}
-
+
recalcData(t);
-
+
ED_area_headerprint(t->sa, str);
-
+
return 1;
}
@@ -2540,26 +2487,26 @@ 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;
t->num.idx_max = 0;
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);
}
-
+
t->val /= (float)t->total;
}
@@ -2570,56 +2517,56 @@ int ToSphere(TransInfo *t, short mval[2])
int i;
char str[64];
TransData *td = t->data;
-
+
ratio = t->values[0];
-
+
snapGrid(t, &ratio);
-
+
applyNumInput(&t->num, &ratio);
-
+
if (ratio < 0)
ratio = 0.0f;
else if (ratio > 1)
ratio = 1.0f;
-
+
/* header print for NumInput */
if (hasNumInput(&t->num)) {
char c[20];
-
+
outputNumInput(&(t->num), c);
-
+
sprintf(str, "To Sphere: %s %s", c, t->proptext);
}
else {
/* 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)
break;
-
+
if (td->flag & TD_SKIP)
continue;
-
+
VecSubf(vec, td->iloc, t->center);
-
+
radius = Normalize(vec);
-
+
tratio = ratio * td->factor;
-
+
VecMulf(vec, radius * (1.0f - tratio) + t->val * tratio);
-
+
VecAddf(td->loc, t->center, vec);
}
-
-
+
+
recalcData(t);
-
+
ED_area_headerprint(t->sa, str);
-
+
return 1;
}
@@ -2630,19 +2577,19 @@ 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;
}
@@ -2651,40 +2598,40 @@ 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)) {
center = td->center;
}
else {
- /* !TODO! Make this if not rely on G */
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);
protectedTransBits(td->protectflag, vec);
VecAddf(td->loc, td->iloc, vec);
-
+
+
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);
}
@@ -2704,48 +2651,48 @@ 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
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/axis-angle? */
- if (td->flag & TD_USEQUAT) {
+ if (td->rotOrder == ROT_MODE_QUAT) {
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 if (td->rotOrder == PCHAN_ROT_AXISANGLE) {
+ else if (td->rotOrder == ROT_MODE_AXISANGLE) {
/* calculate effect based on quats */
float iquat[4];
@@ -2797,93 +2744,67 @@ 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]);
- add_tdi_poin(tdi->locy, tdi->oldloc+1, vec[1]);
- add_tdi_poin(tdi->locz, tdi->oldloc+2, vec[2]);
- }
- else VecAddf(td->loc, td->iloc, 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) {
+ if ((td->rotOrder == ROT_MODE_QUAT) || (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 if (td->rotOrder == ROT_MODE_AXISANGLE) {
+ /* calculate effect based on quats */
+ float iquat[4];
+
+ /* td->ext->(i)quat is in axis-angle form, not quats! */
+ AxisAngleToQuat(iquat, &td->ext->iquat[1], td->ext->iquat[0]);
+
+ Mat3MulSerie(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0);
+ Mat3ToQuat(fmat, quat); // Actual transform
+
+ QuatMul(td->ext->quat, quat, iquat);
+
+ /* make temp copy (since stored in same place) */
+ QUATCOPY(quat, td->ext->quat); // this is just a 4d vector copying macro
+ QuatToAxisAngle(quat, &td->ext->quat[1], &td->ext->quat[0]);
+
+ /* this function works on end result */
+ protectedAxisAngleBits(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);
- }
- 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]);
- }
- 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);
- }
+
+ 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 */
+ EulOToMat3(eul, td->rotOrder, obmat);
+ /* mat = transform, obmat = object rotation */
+ Mat3MulMat3(fmat, smat, obmat);
+
+ Mat3ToCompatibleEulO(fmat, eul, td->ext->rot, td->rotOrder);
+
+ /* 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);
}
}
@@ -2894,17 +2815,17 @@ 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)
break;
-
+
if (td->flag & TD_SKIP)
continue;
-
+
if (t->con.applyRot) {
t->con.applyRot(t, td, axis, NULL);
VecRotToMat3(axis, angle * td->factor, mat);
@@ -2912,7 +2833,7 @@ static void applyRotation(TransInfo *t, float angle, float axis[3])
else if (t->flag & T_PROP_EDIT) {
VecRotToMat3(axis, angle * td->factor, mat);
}
-
+
ElementRotation(t, td, mat, t->around);
}
}
@@ -2920,62 +2841,62 @@ static void applyRotation(TransInfo *t, float angle, float axis[3])
int Rotation(TransInfo *t, short mval[2])
{
char str[64];
-
+
float final;
-
+
float axis[3];
float mat[3][3];
-
+
VECCOPY(axis, t->viewinv[2]);
VecMulf(axis, -1.0f);
Normalize(axis);
-
+
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)) {
char c[20];
-
+
applyNumInput(&t->num, &final);
-
+
outputNumInput(&(t->num), c);
-
+
sprintf(str, "Rot: %s %s %s", &c[0], t->con.text, t->proptext);
-
+
/* Clamp between -180 and 180 */
while (final >= 180.0)
final -= 360.0;
-
+
while (final <= -180.0)
final += 360.0;
-
+
final *= (float)(M_PI / 180.0);
}
else {
sprintf(str, "Rot: %.2f%s %s", 180.0*final/M_PI, t->con.text, t->proptext);
}
-
+
VecRotToMat3(axis, final, mat);
-
+
// 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);
-
+
return 1;
}
@@ -3193,10 +3114,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))
{
@@ -3207,26 +3128,26 @@ 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);
}
}
-
+
if (t->con.applyVec) {
float pvec[3];
t->con.applyVec(t, td, vec, tvec, pvec);
@@ -3234,21 +3155,14 @@ 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;
- add_tdi_poin(tdi->locx, tdi->oldloc, tvec[0]);
- add_tdi_poin(tdi->locy, tdi->oldloc+1, tvec[1]);
- add_tdi_poin(tdi->locz, tdi->oldloc+2, tvec[2]);
- }
- else VecAddf(td->loc, td->iloc, tvec);
-
+
+ VecAddf(td->loc, td->iloc, tvec);
+
constraintTransLim(t, td);
}
}
@@ -3915,7 +3829,7 @@ int BoneSize(TransInfo *t, short mval[2])
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)
@@ -3926,40 +3840,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;
}
@@ -3970,15 +3884,15 @@ 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;
t->snap[1] = 0.1f;
t->snap[2] = t->snap[1] * 0.1f;
-
+
t->flag |= T_NO_CONSTRAINT;
}
@@ -3988,31 +3902,31 @@ int BoneEnvelope(TransInfo *t, short mval[2])
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)
@@ -4021,6 +3935,698 @@ int BoneEnvelope(TransInfo *t, short mval[2])
*td->val= ratio;
}
}
+
+ recalcData(t);
+
+ ED_area_headerprint(t->sa, str);
+
+ return 1;
+}
+
+/* ******************** Edge Slide *************** */
+
+static int createSlideVerts(TransInfo *t)
+{
+#if 0
+ Mesh *me = t->obedit->data;
+ BMEditMesh *em = me->edit_btmesh;
+ EditFace *efa;
+ EditEdge *eed,*first=NULL,*last=NULL, *temp = NULL;
+ EditVert *ev, *nearest = NULL;
+ LinkNode *edgelist = NULL, *vertlist=NULL, *look;
+ GHash *vertgh;
+ TransDataSlideVert *tempsv;
+ float perc = 0, percp = 0,vertdist; // XXX, projectMat[4][4];
+ float shiftlabda= 0.0f,len = 0.0f;
+ int i, j, numsel, numadded=0, timesthrough = 0, vertsel=0, prop=1, cancel = 0,flip=0;
+ int wasshift = 0;
+ /* UV correction vars */
+ GHash **uvarray= NULL;
+ SlideData *sld = MEM_callocN(sizeof(*sld), "sld");
+ int uvlay_tot= CustomData_number_of_layers(&em->fdata, CD_MTFACE);
+ int uvlay_idx;
+ TransDataSlideUv *slideuvs=NULL, *suv=NULL, *suv_last=NULL;
+ RegionView3D *v3d = t->ar->regiondata;
+ float projectMat[4][4];
+ float start[3] = {0.0f, 0.0f, 0.0f}, end[3] = {0.0f, 0.0f, 0.0f};
+ float vec[3];
+ //short mval[2], mvalo[2];
+ float labda = 0.0f, totvec=0.0;
+
+ if (!v3d) {
+ /*ok, let's try to survive this*/
+ Mat4One(projectMat);
+ } else {
+ view3d_get_object_project_mat(v3d, t->obedit, projectMat);
+ }
+
+ //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;
+ if(eed->f & SELECT) numsel++;
+ }
+
+ for(ev=em->verts.first;ev;ev=ev->next) {
+ 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) {
+ int ct = 0;
+ if(efa->e1->f & SELECT) {
+ ct++;
+ efa->e1->f1++;
+ if(efa->e1->f1 > 2) {
+ //BKE_report(op->reports, RPT_ERROR, "3+ face edge");
+ return 0;
+ }
+ }
+ if(efa->e2->f & SELECT) {
+ ct++;
+ efa->e2->f1++;
+ if(efa->e2->f1 > 2) {
+ //BKE_report(op->reports, RPT_ERROR, "3+ face edge");
+ return 0;
+ }
+ }
+ if(efa->e3->f & SELECT) {
+ ct++;
+ efa->e3->f1++;
+ if(efa->e3->f1 > 2) {
+ //BKE_report(op->reports, RPT_ERROR, "3+ face edge");
+ return 0;
+ }
+ }
+ if(efa->e4 && efa->e4->f & SELECT) {
+ ct++;
+ efa->e4->f1++;
+ if(efa->e4->f1 > 2) {
+ //BKE_report(op->reports, RPT_ERROR, "3+ face edge");
+ return 0;
+ }
+ }
+ // Make sure loop is not 2 edges of same face
+ if(ct > 1) {
+ //BKE_report(op->reports, RPT_ERROR, "Loop crosses itself");
+ return 0;
+ }
+ }
+
+ // Get # of selected verts
+ 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;
+ }
+
+ // 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)) {
+ // If this is the first edge added, just put it in
+ if(!edgelist) {
+ BLI_linklist_prepend(&edgelist,eed);
+ numadded++;
+ first = eed;
+ last = eed;
+ eed->f1 = SELECT;
+ } else {
+ if(editedge_getSharedVert(eed, last)) {
+ BLI_linklist_append(&edgelist,eed);
+ eed->f1 = SELECT;
+ numadded++;
+ last = eed;
+ } else if(editedge_getSharedVert(eed, first)) {
+ BLI_linklist_prepend(&edgelist,eed);
+ eed->f1 = SELECT;
+ numadded++;
+ first = eed;
+ }
+ }
+ }
+ if(eed->next == NULL && numadded != numsel) {
+ 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);
+ //BKE_report(op->reports, RPT_ERROR, "Could not order loop");
+ return 0;
+ }
+ }
+
+ // Put the verts in order in a linklist
+ look = edgelist;
+ while(look) {
+ eed = look->link;
+ if(!vertlist) {
+ if(look->next) {
+ temp = look->next->link;
+
+ //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;
+ } else {
+ 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;
+ }
+ }
+ // for all the entries
+ if(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;
+ }
+
+ // populate the SlideVerts
+
+ vertgh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+ look = vertlist;
+ while(look) {
+ i=0;
+ j=0;
+ ev = look->link;
+ tempsv = (struct TransDataSlideVert*)MEM_mallocN(sizeof(struct TransDataSlideVert),"SlideVert");
+ tempsv->up = NULL;
+ tempsv->down = NULL;
+ tempsv->origvert.co[0] = ev->co[0];
+ tempsv->origvert.co[1] = ev->co[1];
+ tempsv->origvert.co[2] = ev->co[2];
+ tempsv->origvert.no[0] = ev->no[0];
+ tempsv->origvert.no[1] = ev->no[1];
+ 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++;
+ if(eed->f & SELECT) {
+ 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) {
+ for(eed=em->edges.first;eed;eed=eed->next) {
+ if(editedge_containsVert(eed, ev)) {
+ if(!(eed->f & SELECT)) {
+ if(!tempsv->up) {
+ tempsv->up = eed;
+ } else if (!(tempsv->down)) {
+ 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) {
+ for(eed=em->edges.first;eed;eed=eed->next) {
+ if(editedge_containsVert(eed, ev) && eed->f & SELECT) {
+ for(efa = em->faces.first;efa;efa=efa->next) {
+ if(editface_containsEdge(efa, eed)) {
+ if(editedge_containsVert(efa->e1, ev) && efa->e1 != eed) {
+ if(!tempsv->up) {
+ tempsv->up = efa->e1;
+ } else if (!(tempsv->down)) {
+ 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;
+ }
+ }
+ if(editedge_containsVert(efa->e3, ev) && efa->e3 != eed) {
+ if(!tempsv->up) {
+ tempsv->up = efa->e3;
+ } else if (!(tempsv->down)) {
+ 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;
+ }
+ }
+ }
+
+ }
+ }
+ }
+ }
+ }
+ 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_ghash_insert(vertgh,ev,tempsv);
+
+ look = look->next;
+ }
+
+ // make sure the UPs nad DOWNs are 'faceloops'
+ // Also find the nearest slidevert to the cursor
+
+ look = vertlist;
+ nearest = NULL;
+ 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);
+ return 0;
+ }
+
+ if(me->drawflag & ME_DRAW_EDGELEN) {
+ if(!(tempsv->up->f & SELECT)) {
+ tempsv->up->f |= SELECT;
+ tempsv->up->f2 |= 16;
+ } else {
+ tempsv->up->f2 |= ~16;
+ }
+ if(!(tempsv->down->f & SELECT)) {
+ tempsv->down->f |= SELECT;
+ tempsv->down->f2 |= 16;
+ } else {
+ tempsv->down->f2 |= ~16;
+ }
+ }
+
+ if(look->next != NULL) {
+ TransDataSlideVert *sv;
+
+ ev = (EditVert*)look->next->link;
+ sv = BLI_ghash_lookup(vertgh, ev);
+
+ if(sv) {
+ float co[3], co2[3], vec[3];
+
+ ev = (EditVert*)look->link;
+
+ if(!sharesFace(em, tempsv->up,sv->up)) {
+ EditEdge *swap;
+ swap = sv->up;
+ sv->up = sv->down;
+ sv->down = swap;
+ }
+
+ if (v3d) {
+ view3d_project_float(t->ar, tempsv->up->v1->co, co, projectMat);
+ view3d_project_float(t->ar, tempsv->up->v2->co, co2, projectMat);
+ }
+
+ if (ev == tempsv->up->v1) {
+ VecSubf(vec, co, co2);
+ } else {
+ VecSubf(vec, co2, co);
+ }
+
+ VecAddf(start, start, vec);
+
+ if (v3d) {
+ view3d_project_float(t->ar, tempsv->down->v1->co, co, projectMat);
+ view3d_project_float(t->ar, tempsv->down->v2->co, co2, projectMat);
+ }
+
+ if (ev == tempsv->down->v1) {
+ VecSubf(vec, co2, co);
+ } else {
+ VecSubf(vec, co, co2);
+ }
+
+ VecAddf(end, end, vec);
+
+ totvec += 1.0f;
+ nearest = (EditVert*)look->link;
+ }
+ }
+
+
+
+ look = look->next;
+ }
+
+ VecAddf(start, start, end);
+ VecMulf(start, 0.5*(1.0/totvec));
+ VECCOPY(vec, start);
+ start[0] = t->mval[0];
+ start[1] = t->mval[1];
+ VecAddf(end, start, vec);
+
+ sld->start[0] = (short) start[0];
+ sld->start[1] = (short) start[1];
+ sld->end[0] = (short) end[0];
+ sld->end[1] = (short) end[1];
+
+ if (uvlay_tot) { // XXX && (scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT)) {
+ int maxnum = 0;
+
+ uvarray = MEM_callocN( uvlay_tot * sizeof(GHash *), "SlideUVs Array");
+ sld->totuv = uvlay_tot;
+ suv_last = slideuvs = MEM_callocN( uvlay_tot * (numadded+1) * sizeof(TransDataSlideUv), "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);
+
+ for(ev=em->verts.first;ev;ev=ev->next) {
+ ev->tmp.l = 0;
+ }
+ look = vertlist;
+ 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 */
+ BLI_linklist_free(suv->fuv_list,NULL);
+ suv->fuv_list = NULL;
+ BLI_ghash_remove(uvarray[uvlay_idx],ev, NULL, NULL);
+ suv = NULL;
+ break;
+ }
+ } else {
+ ev->tmp.l = 1;
+ suv = suv_last;
+
+ suv->fuv_list = NULL;
+ 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) {
+ ev_up = editedge_getOtherVert(tempsv->up,ev);
+ if (efa->v1==ev_up) suv->uv_up = tf->uv[0];
+ else if (efa->v2==ev_up) suv->uv_up = tf->uv[1];
+ else if (efa->v3==ev_up) suv->uv_up = tf->uv[2];
+ else if (efa->v4 && efa->v4==ev_up) suv->uv_up = tf->uv[3];
+ }
+ if (!suv->uv_down) { /* if the first face was apart of the up edge, it cant be apart of the down edge */
+ ev_down = editedge_getOtherVert(tempsv->down,ev);
+ if (efa->v1==ev_down) suv->uv_down = tf->uv[0];
+ else if (efa->v2==ev_down) suv->uv_down = tf->uv[1];
+ 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);
+ }
+ }
+ }
+ }
+ look = look->next;
+ }
+ } /* end uv layer loop */
+ } /* end uvlay_tot */
+
+ sld->uvhash = uvarray;
+ sld->slideuv = slideuvs;
+ sld->vhash = vertgh;
+ sld->nearest = nearest;
+ sld->vertlist = vertlist;
+ sld->edgelist = edgelist;
+ sld->suv_last = suv_last;
+ sld->uvlay_tot = uvlay_tot;
+
+ // we should have enough info now to slide
+
+ t->customData = sld;
+
+ return 1;
+#endif
+}
+
+void freeSlideVerts(TransInfo *t)
+{
+#if 0
+ TransDataSlideUv *suv;
+ SlideData *sld = t->customData;
+ int uvlay_idx;
+
+ //BLI_ghash_free(edgesgh, freeGHash, NULL);
+ BLI_ghash_free(sld->vhash, NULL, (GHashValFreeFP)MEM_freeN);
+ BLI_linklist_free(sld->vertlist, NULL);
+ BLI_linklist_free(sld->edgelist, NULL);
+
+ if (sld->uvlay_tot) {
+ for (uvlay_idx=0; uvlay_idx<sld->uvlay_tot; uvlay_idx++) {
+ BLI_ghash_free(sld->uvhash[uvlay_idx], NULL, NULL);
+ }
+
+ suv = sld->suv_last-1;
+ while (suv >= sld->slideuv) {
+ if (suv->fuv_list) {
+ BLI_linklist_free(suv->fuv_list,NULL);
+ }
+ suv--;
+ }
+
+ MEM_freeN(sld->slideuv);
+ MEM_freeN(sld->uvhash);
+ }
+
+ MEM_freeN(sld);
+ t->customData = NULL;
+#endif
+}
+
+void initEdgeSlide(TransInfo *t)
+{
+ SlideData *sld;
+
+ t->mode = TFM_EDGE_SLIDE;
+ t->transform = EdgeSlide;
+
+ createSlideVerts(t);
+ sld = t->customData;
+
+ if (!sld)
+ return;
+
+ t->customFree = freeSlideVerts;
+
+ initMouseInputMode(t, &t->mouse, INPUT_CUSTOM_RATIO);
+ setCustomPoints(t, &t->mouse, sld->end, sld->start);
+
+ 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;
+
+ t->flag |= T_NO_CONSTRAINT;
+}
+
+int doEdgeSlide(TransInfo *t, float perc)
+{
+#if 0
+ Mesh *me= t->obedit->data;
+ EditMesh *em = me->edit_mesh;
+ SlideData *sld = t->customData;
+ EditEdge *first=NULL,*last=NULL, *temp = NULL;
+ EditVert *ev, *nearest = sld->nearest;
+ EditVert *centerVert, *upVert, *downVert;
+ LinkNode *edgelist = sld->edgelist, *vertlist=sld->vertlist, *look;
+ GHash *vertgh = sld->vhash;
+ TransDataSlideVert *tempsv;
+ float shiftlabda= 0.0f,len = 0.0f;
+ int i = 0, numadded=0, timesthrough = 0, vertsel=0, prop=1, cancel = 0,flip=0;
+ int wasshift = 0;
+ /* UV correction vars */
+ GHash **uvarray= sld->uvhash;
+ int uvlay_tot= CustomData_number_of_layers(&em->fdata, CD_MTFACE);
+ int uvlay_idx;
+ TransDataSlideUv *slideuvs=sld->slideuv, *suv=sld->slideuv, *suv_last=NULL;
+ float uv_tmp[2];
+ LinkNode *fuv_link;
+ float labda = 0.0f;
+
+ len = 0.0f;
+
+ tempsv = BLI_ghash_lookup(vertgh,nearest);
+
+ centerVert = editedge_getSharedVert(tempsv->up, tempsv->down);
+ upVert = editedge_getOtherVert(tempsv->up, centerVert);
+ downVert = editedge_getOtherVert(tempsv->down, centerVert);
+
+ len = MIN2(perc, VecLenf(upVert->co,downVert->co));
+ len = MAX2(len, 0);
+
+ //Adjust Edgeloop
+ if(prop) {
+ 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 (uvlay_tot) { // 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 );
+ if (suv && suv->fuv_list && suv->uv_up && suv->uv_down) {
+ Vec2Lerpf(uv_tmp, suv->origuv, (perc>=0)?suv->uv_up:suv->uv_down, fabs(perc));
+ fuv_link = suv->fuv_list;
+ while (fuv_link) {
+ VECCOPY2D(((float *)fuv_link->link), uv_tmp);
+ fuv_link = fuv_link->next;
+ }
+ }
+ }
+ }
+
+ look = look->next;
+ }
+ }
+ else {
+ //Non prop code
+ look = vertlist;
+ while(look) {
+ float newlen;
+ ev = look->link;
+ tempsv = BLI_ghash_lookup(vertgh,ev);
+ newlen = (len / VecLenf(editedge_getOtherVert(tempsv->up,ev)->co,editedge_getOtherVert(tempsv->down,ev)->co));
+ 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));
+ if (uvlay_tot) { // XXX scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT) {
+ /* dont do anything if no UVs */
+ for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) {
+ suv = BLI_ghash_lookup( uvarray[uvlay_idx], ev );
+ if (suv && suv->fuv_list && suv->uv_up && suv->uv_down) {
+ Vec2Lerpf(uv_tmp, suv->uv_down, suv->uv_up, fabs(newlen));
+ fuv_link = suv->fuv_list;
+ while (fuv_link) {
+ VECCOPY2D(((float *)fuv_link->link), uv_tmp);
+ fuv_link = fuv_link->next;
+ }
+ }
+ }
+ }
+ } else{
+ VecLerpf(ev->co, editedge_getOtherVert(tempsv->up,ev)->co, editedge_getOtherVert(tempsv->down,ev)->co, fabs(newlen));
+
+ if (uvlay_tot) { // XXX scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT) {
+ /* dont do anything if no UVs */
+ for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) {
+ suv = BLI_ghash_lookup( uvarray[uvlay_idx], ev );
+ if (suv && suv->fuv_list && suv->uv_up && suv->uv_down) {
+ Vec2Lerpf(uv_tmp, suv->uv_up, suv->uv_down, fabs(newlen));
+ fuv_link = suv->fuv_list;
+ while (fuv_link) {
+ VECCOPY2D(((float *)fuv_link->link), uv_tmp);
+ fuv_link = fuv_link->next;
+ }
+ }
+ }
+ }
+ }
+ look = look->next;
+ }
+
+ }
+#endif
+ return 1;
+}
+
+int EdgeSlide(TransInfo *t, short mval[2])
+{
+ TransData *td = t->data;
+ char str[50];
+ float final;
+
+ final = t->values[0];
+
+ snapGrid(t, &final);
+
+ if (hasNumInput(&t->num)) {
+ char c[20];
+
+ applyNumInput(&t->num, &final);
+
+ outputNumInput(&(t->num), c);
+
+ sprintf(str, "Edge Slide Percent: %s", &c[0]);
+ }
+ else {
+ sprintf(str, "Edge Slide Percent: %.2f", final);
+ }
+
+ CLAMP(final, -1.0f, 1.0f);
+
+ /*do stuff here*/
+ if (t->customData)
+ doEdgeSlide(t, final);
+ else {
+ strcpy(str, "Invalid Edge Selection");
+ t->state = TRANS_CANCEL;
+ }
recalcData(t);
@@ -4029,7 +4635,6 @@ int BoneEnvelope(TransInfo *t, short mval[2])
return 1;
}
-
/* ******************** EditBone roll *************** */
void initBoneRoll(TransInfo *t)
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index e5bd405c0cd..fc31fad622a 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -32,10 +32,13 @@
#include "ED_transform.h"
+#include "BLI_editVert.h"
+
/* ************************** Types ***************************** */
struct TransInfo;
struct TransData;
+struct TransformOrientation;
struct TransSnap;
struct NumInput;
struct Object;
@@ -52,6 +55,7 @@ struct bContext;
struct wmEvent;
struct wmTimer;
struct ARegion;
+struct ReportList;
typedef struct NDofInput {
int flag;
@@ -83,6 +87,7 @@ typedef struct TransSnap {
short modeTarget;
short mode;
short align;
+ short project;
short status;
float snapPoint[3]; /* snapping from this point */
float snapTarget[3]; /* to this point */
@@ -118,20 +123,9 @@ typedef struct TransCon {
/* Apply function pointer for rotation transformation */
} TransCon;
-typedef struct TransDataIpokey {
- int flag; /* which keys */
- float *locx, *locy, *locz; /* channel pointers */
- float *rotx, *roty, *rotz;
- float *quatx, *quaty, *quatz, *quatw;
- float *sizex, *sizey, *sizez;
- float oldloc[9]; /* storage old values */
- float oldrot[9];
- float oldsize[9];
- float oldquat[12];
-} TransDataIpokey;
-
typedef struct TransDataExtension {
float drot[3]; /* Initial object drot */
+ float dquat[4]; /* Initial object dquat */
float dsize[3]; /* Initial object dsize */
float *rot; /* Rotation of the data to transform (Faculative) */
float irot[3]; /* Initial rotation */
@@ -179,6 +173,31 @@ typedef struct TransDataNla {
int handle; /* handle-index: 0 for dummy entry, -1 for start, 1 for end, 2 for both ends */
} TransDataNla;
+struct LinkNode;
+struct EditEdge;
+struct EditVert;
+struct GHash;
+typedef struct TransDataSlideUv {
+ float origuv[2];
+ float *uv_up, *uv_down;
+ //float *fuv[4];
+ struct LinkNode *fuv_list;
+} TransDataSlideUv;
+
+typedef struct TransDataSlideVert {
+ struct EditEdge *up, *down;
+ struct EditVert origvert;
+} TransDataSlideVert;
+
+typedef struct SlideData {
+ TransDataSlideUv *slideuv, *suv_last;
+ int totuv, uvlay_tot;
+ struct GHash *vhash, **uvhash;
+ struct EditVert *nearest;
+ struct LinkNode *edgelist, *vertlist;
+ short start[2], end[2];
+} SlideData;
+
typedef struct TransData {
float dist; /* Distance needed to affect element (for Proportionnal Editing) */
float rdist; /* Distance to the nearest element (for Proportionnal Editing) */
@@ -194,12 +213,11 @@ typedef struct TransData {
struct Object *ob;
struct bConstraint *con; /* for objects/bones, the first constraint in its constraint stack */
TransDataExtension *ext; /* for objects, poses. 1 single malloc per TransInfo! */
- TransDataIpokey *tdi; /* for objects, ipo keys. per transdata a malloc */
TransDataCurveHandleFlags *hdata; /* for curves, stores handle flags for modification/cancel */
void *extra; /* extra data (mirrored element pointer, in editmode mesh to EditVert) (editbone for roll fixing) (...) */
- short flag; /* Various flags */
+ int flag; /* Various flags */
short protectflag; /* If set, copy of Object or PoseChannel protection */
- int rotOrder; /* rotation order (for eulers), as defined in BLI_arithb.h */
+ int rotOrder; /* rotation mode, as defined in eRotationModes (DNA_action_types.h) */
} TransData;
typedef struct MouseInput {
@@ -210,6 +228,7 @@ typedef struct MouseInput {
short precision_mval[2]; /* mouse position when precision key was pressed */
int center[2];
float factor;
+ void *data; /* additional data, if needed by the particular function */
} MouseInput;
typedef struct TransInfo {
@@ -263,12 +282,15 @@ typedef struct TransInfo {
struct Object *poseobj; /* if t->flag & T_POSE, this denotes pose object */
void *customData; /* Per Transform custom data */
+ void (*customFree)(struct TransInfo *); /* if a special free function is needed */
/*************** NEW STUFF *********************/
short current_orientation;
short prop_mode;
+
+ short mirror;
float values[4];
float auto_values[4];
@@ -378,6 +400,7 @@ typedef struct TransInfo {
#define TD_NO_LOC (1 << 13) /* when this is set, don't apply translation changes to this element */
#define TD_NOTIMESNAP (1 << 14) /* for Graph Editor autosnap, indicates that point should not undergo autosnapping */
#define TD_INTVALUES (1 << 15) /* for Graph Editor - curves that can only have int-values need their keyframes tagged with this */
+#define TD_MIRROR_EDGE (1 << 16) /* For editmode mirror, clamp to x = 0 */
/* transsnap->status */
#define SNAP_ON 1
@@ -466,6 +489,9 @@ int BoneEnvelope(TransInfo *t, short mval[2]);
void initBoneRoll(TransInfo *t);
int BoneRoll(TransInfo *t, short mval[2]);
+void initEdgeSlide(TransInfo *t);
+int EdgeSlide(TransInfo *t, short mval[2]);
+
void initTimeTranslate(TransInfo *t);
int TimeTranslate(TransInfo *t, short mval[2]);
@@ -486,7 +512,7 @@ int Align(TransInfo *t, short mval[2]);
void drawPropCircle(const struct bContext *C, TransInfo *t);
-void transform_modal_keymap(struct wmWindowManager *wm);
+void transform_modal_keymap(struct wmKeyConfig *keyconf);
/*********************** transform_conversions.c ********** */
@@ -526,7 +552,7 @@ void drawConstraint(const struct bContext *C, TransInfo *t);
void getConstraintMatrix(TransInfo *t);
void setConstraint(TransInfo *t, float space[3][3], int mode, const char text[]);
void setLocalConstraint(TransInfo *t, int mode, const char text[]);
-void setUserConstraint(TransInfo *t, int mode, const char text[]);
+void setUserConstraint(TransInfo *t, short orientation, int mode, const char text[]);
void constraintNumInput(TransInfo *t, float vec[3]);
@@ -556,6 +582,7 @@ void snapGrid(TransInfo *t, float *val);
void snapGridAction(TransInfo *t, float *val, GearsType action);
void initSnapping(struct TransInfo *t, struct wmOperator *op);
+void applyProject(TransInfo *t);
void applySnapping(TransInfo *t, float *vec);
void resetSnapping(TransInfo *t);
int handleSnapping(TransInfo *t, struct wmEvent *event);
@@ -575,7 +602,8 @@ typedef enum {
INPUT_HORIZONTAL_RATIO,
INPUT_HORIZONTAL_ABSOLUTE,
INPUT_VERTICAL_RATIO,
- INPUT_VERTICAL_ABSOLUTE
+ INPUT_VERTICAL_ABSOLUTE,
+ INPUT_CUSTOM_RATIO
} MouseInputMode;
void initMouseInput(TransInfo *t, MouseInput *mi, int center[2], short mval[2]);
@@ -583,6 +611,8 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode);
int handleMouseInput(struct TransInfo *t, struct MouseInput *mi, struct wmEvent *event);
void applyMouseInput(struct TransInfo *t, struct MouseInput *mi, short mval[2], float output[3]);
+void setCustomPoints(TransInfo *t, MouseInput *mi, short start[2], short end[2]);
+
/*********************** Generics ********************************/
int initTransInfo(struct bContext *C, TransInfo *t, struct wmOperator *op, struct wmEvent *event);
@@ -640,18 +670,17 @@ int handleNDofInput(NDofInput *n, struct wmEvent *event);
void initTransformOrientation(struct bContext *C, TransInfo *t);
-int manageObjectSpace(struct bContext *C, int confirm, int set);
-int manageMeshSpace(struct bContext *C, int confirm, int set);
-int manageBoneSpace(struct bContext *C, int confirm, int set);
+struct TransformOrientation *createObjectSpace(struct bContext *C, struct ReportList *reports, char *name, int overwrite);
+struct TransformOrientation *createMeshSpace(struct bContext *C, struct ReportList *reports, char *name, int overwrite);
+struct TransformOrientation *createBoneSpace(struct bContext *C, struct ReportList *reports, char *name, int overwrite);
/* Those two fill in mat and return non-zero on success */
int createSpaceNormal(float mat[3][3], float normal[3]);
int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3]);
-int addMatrixSpace(struct bContext *C, float mat[3][3], char name[]);
+struct TransformOrientation *addMatrixSpace(struct bContext *C, float mat[3][3], char name[], int overwrite);
int addObjectSpace(struct bContext *C, struct Object *ob);
-void applyTransformOrientation(const struct bContext *C, TransInfo *t);
-
+void applyTransformOrientation(const struct bContext *C, float mat[3][3], char *name);
#define ORIENTATION_NONE 0
#define ORIENTATION_NORMAL 1
@@ -663,6 +692,8 @@ int getTransformOrientation(const struct bContext *C, float normal[3], float pla
int createSpaceNormal(float mat[3][3], float normal[3]);
int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3]);
+void freeSlideVerts(TransInfo *t);
+
#endif
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 158ea98c090..1143203217b 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -551,11 +551,10 @@ void setLocalConstraint(TransInfo *t, int mode, const char text[]) {
ftext is a format string passed to sprintf. It will add the name of
the orientation where %s is (logically).
*/
-void setUserConstraint(TransInfo *t, int mode, const char ftext[]) {
+void setUserConstraint(TransInfo *t, short orientation, int mode, const char ftext[]) {
char text[40];
- //short twmode= (t->spacetype==SPACE_VIEW3D)? ((View3D*)t->view)->twmode: V3D_MANIP_GLOBAL;
- switch(t->current_orientation) {
+ switch(orientation) {
case V3D_MANIP_GLOBAL:
{
float mtx[3][3];
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 4267bd39d5e..764256c476d 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -126,7 +126,6 @@
#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"
@@ -296,7 +295,7 @@ static void createTransTexspace(bContext *C, TransInfo *t)
TransData *td;
Object *ob;
ID *id;
- int *texflag;
+ short *texflag;
ob = OBACT;
@@ -382,7 +381,6 @@ static void createTransEdge(bContext *C, TransInfo *t) {
Mat3CpyMat3(td->mtx, mtx);
td->ext = NULL;
- td->tdi = NULL;
if (t->mode == TFM_BWEIGHT) {
td->val = &(eed->bweight);
td->ival = eed->bweight;
@@ -512,8 +510,8 @@ static short apply_targetless_ik(Object *ob)
/* rotation */
if (parchan->rotmode > 0)
Mat3ToEulO(rmat3, parchan->eul, parchan->rotmode);
- else if (parchan->rotmode == PCHAN_ROT_AXISANGLE)
- Mat3ToAxisAngle(rmat3, &parchan->quat[1], &parchan->quat[0]);
+ else if (parchan->rotmode == ROT_MODE_AXISANGLE)
+ Mat3ToAxisAngle(rmat3, parchan->rotAxis, &pchan->rotAngle);
else
Mat3ToQuat(rmat3, parchan->quat);
@@ -522,8 +520,8 @@ static short apply_targetless_ik(Object *ob)
if (data->flag & CONSTRAINT_IK_STRETCH) {
if (parchan->rotmode > 0)
EulOToMat3(parchan->eul, parchan->rotmode, qrmat);
- else if (parchan->rotmode == PCHAN_ROT_AXISANGLE)
- AxisAngleToMat3(&parchan->quat[1], parchan->quat[0], qrmat);
+ else if (parchan->rotmode == ROT_MODE_AXISANGLE)
+ AxisAngleToMat3(parchan->rotAxis, parchan->rotAngle, qrmat);
else
QuatToMat3(parchan->quat, qrmat);
@@ -559,10 +557,6 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
td->ob = ob;
td->flag = TD_SELECTED;
- if (pchan->rotmode == PCHAN_ROT_QUAT)
- {
- td->flag |= TD_USEQUAT;
- }
if (bone->flag & BONE_HINGE_CHILD_TRANSFORM)
{
td->flag |= TD_NOCENTER;
@@ -587,15 +581,14 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
td->ext->quat= NULL;
VECCOPY(td->ext->irot, pchan->eul);
- td->rotOrder= pchan->rotmode;
}
else {
td->ext->rot= NULL;
td->ext->quat= pchan->quat;
QUATCOPY(td->ext->iquat, pchan->quat);
- td->rotOrder= pchan->rotmode;
}
+ td->rotOrder= pchan->rotmode;
/* proper way to get parent transform + own transform + constraints transform */
@@ -1019,7 +1012,6 @@ static void createTransPose(bContext *C, TransInfo *t, Object *ob)
tdx = t->ext = MEM_callocN(t->total*sizeof(TransDataExtension), "TransPoseBoneExt");
for(i=0; i<t->total; i++, td++, tdx++) {
td->ext= tdx;
- td->tdi = NULL;
td->val = NULL;
}
@@ -1103,7 +1095,6 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
td->loc = NULL;
td->ext = NULL;
- td->tdi = NULL;
td++;
}
@@ -1119,7 +1110,6 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
td->loc = NULL;
td->ext = NULL;
- td->tdi = NULL;
td++;
}
@@ -1154,7 +1144,6 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
Mat3Ortho(td->axismtx);
td->ext = NULL;
- td->tdi = NULL;
td++;
}
@@ -1171,7 +1160,6 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
td->flag= TD_SELECTED;
td->ext = NULL;
- td->tdi = NULL;
td++;
}
@@ -1199,7 +1187,6 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
}
td->ext = NULL;
- td->tdi = NULL;
td->val = NULL;
td++;
@@ -1222,7 +1209,6 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
td->extra = ebo; /* to fix roll */
td->ext = NULL;
- td->tdi = NULL;
td->val = NULL;
td++;
@@ -1275,7 +1261,6 @@ static void createTransMBallVerts(bContext *C, TransInfo *t)
Mat3CpyMat3(td->mtx, mtx);
td->ext = tx;
- td->tdi = NULL;
/* Radius of MetaElem (mass of MetaElem influence) */
if(ml->flag & MB_SCALE_RAD){
@@ -1440,7 +1425,6 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
else td->flag= 0;
}
td->ext = NULL;
- td->tdi = NULL;
td->val = NULL;
hdata = initTransDataCurveHandes(td, bezt);
@@ -1461,7 +1445,6 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
if(bezt->f2 & SELECT) td->flag= TD_SELECTED;
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);
@@ -1501,7 +1484,6 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
else td->flag= 0;
}
td->ext = NULL;
- td->tdi = NULL;
td->val = NULL;
if (hdata==NULL) { /* if the handle was not saved by the previous handle */
@@ -1541,7 +1523,6 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
if(bp->f1 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
td->ext = NULL;
- td->tdi = NULL;
if (t->mode==TFM_CURVE_SHRINKFATTEN || t->mode==TFM_RESIZE) {
td->val = &(bp->radius);
@@ -1617,7 +1598,6 @@ static void createTransLatticeVerts(bContext *C, TransInfo *t)
Mat3CpyMat3(td->mtx, mtx);
td->ext = NULL;
- td->tdi = NULL;
td->val = NULL;
td++;
@@ -1728,7 +1708,6 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
td->ob = ob;
td->ext = tx;
- td->tdi = NULL;
if(t->mode == TFM_BAKE_TIME) {
td->val = key->time;
td->ival = *(key->time);
@@ -1951,7 +1930,6 @@ static void editmesh_set_connectivity_distance(EditMesh *em, int total, float *v
td->axismtx[1][1] =\
td->axismtx[1][2] = 0.0f;\
td->ext = NULL;\
- td->tdi = NULL;\
td->val = NULL;\
td->extra = NULL;\
if (t->mode == TFM_BWEIGHT) {\
@@ -1985,7 +1963,6 @@ inline void VertsToTransData(TransInfo *t, TransData *td, BMesh *em, BMVert *eve
td->axismtx[1][2] = 0.0f;
td->ext = NULL;
- td->tdi = NULL;
td->val = NULL;
td->extra = NULL;
if (t->mode == TFM_BWEIGHT) {
@@ -2298,7 +2275,10 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
for(a=0; eve; eve=BMIter_Step(&iter), a++) {
if(!BM_TestHFlag(eve, BM_HIDDEN) && selstate[a] && eve->co[0]!=0.0f) {
if(eve->co[0]<0.0f)
+ {
+ t->mirror = -1;
mirror = -1;
+ }
break;
}
}
@@ -2374,6 +2354,19 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
}
}
}
+
+ if (mirror != 0)
+ {
+ tob = t->data;
+ for( a = 0; a < t->total; a++, tob++ )
+ {
+ if (ABS(tob->loc[0]) <= 0.00001f)
+ {
+ tob->flag |= TD_MIRROR_EDGE;
+ }
+ }
+ }
+
if (propmode) {
MEM_freeN(vectors);
MEM_freeN(nears);
@@ -2504,7 +2497,7 @@ static void UVsToTransData(SpaceImage *sima, TransData *td, TransData2D *td2d, f
memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
- td->ext= NULL; td->tdi= NULL; td->val= NULL;
+ td->ext= NULL; td->val= NULL;
if(selected) {
td->flag |= TD_SELECTED;
@@ -2804,7 +2797,7 @@ static void createTransNlaData(bContext *C, TransInfo *t)
memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
- td->ext= NULL; td->tdi= NULL; td->val= NULL;
+ td->ext= NULL; td->val= NULL;
td->flag |= TD_SELECTED;
td->dist= 0.0f;
@@ -2835,7 +2828,7 @@ static void createTransNlaData(bContext *C, TransInfo *t)
memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
- td->ext= NULL; td->tdi= NULL; td->val= NULL;
+ td->ext= NULL; td->val= NULL;
td->flag |= TD_SELECTED;
td->dist= 0.0f;
@@ -2987,7 +2980,7 @@ static void posttrans_fcurve_clean (FCurve *fcu)
/* 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++;
@@ -2995,16 +2988,18 @@ static void posttrans_fcurve_clean (FCurve *fcu)
}
}
- /* Loop 2: delete unselected keyframes on the same frames (if any keyframes were found) */
- if (len) {
+ /* Loop 2: delete unselected keyframes on the same frames
+ * (if any keyframes were found, or the whole curve wasn't affected)
+ */
+ if ((len) && (len != fcu->totvert)) {
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++) {
if (IS_EQ(bezt->vec[1][0], selcache[index])) {
- //delete_icu_key(icu, i, 0);
+ delete_fcurve_key(fcu, i, 0);
break;
}
else if (bezt->vec[1][0] > selcache[index])
@@ -3012,7 +3007,7 @@ static void posttrans_fcurve_clean (FCurve *fcu)
}
}
}
-
+
testhandles_fcurve(fcu);
}
@@ -3386,7 +3381,7 @@ static void bezt_to_transdata (TransData *td, TransData2D *td2d, AnimData *adt,
memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
- td->ext= NULL; td->tdi= NULL; td->val= NULL;
+ td->ext= NULL; td->val= NULL;
/* store AnimData info in td->extra, for applying mapping when flushing */
td->extra= adt;
@@ -3819,98 +3814,6 @@ void flushTransGraphData(TransInfo *t)
}
}
-/* **************** IpoKey stuff, for Object TransData ********** */
-
-/* while transforming */
-void add_tdi_poin(float *poin, float *old, float delta)
-{
- if(poin) {
- poin[0]= old[0]+delta;
- poin[-3]= old[3]+delta;
- poin[3]= old[6]+delta;
- }
-}
-
-#if 0 // TRANSFORM_FIX_ME
-/* storage of bezier triple. thats why -3 and +3! */
-static void set_tdi_old(float *old, float *poin)
-{
- old[0]= *(poin);
- old[3]= *(poin-3);
- old[6]= *(poin+3);
-}
-
-/* fill ipokey transdata with old vals and pointers */
-static void ipokey_to_transdata(IpoKey *ik, TransData *td)
-{
- extern int ob_ar[]; // blenkernel ipo.c
- 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:
- tdi->locx= &(bezt->vec[1][1]); break;
- case OB_LOC_Y:
- case OB_DLOC_Y:
- tdi->locy= &(bezt->vec[1][1]); break;
- 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:
- tdi->rotx= &(bezt->vec[1][1]); break;
- case OB_DROT_Y:
- delta= 1;
- case OB_ROT_Y:
- tdi->roty= &(bezt->vec[1][1]); break;
- case OB_DROT_Z:
- 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;
- case OB_SIZE_Y:
- case OB_DSIZE_Y:
- tdi->sizey= &(bezt->vec[1][1]); break;
- case OB_SIZE_Z:
- case OB_DSIZE_Z:
- 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;
-}
-#endif
-
/* *************************** Object Transform data ******************* */
/* Little helper function for ObjectToTransData used to give certain
@@ -4128,7 +4031,7 @@ static TransData *SeqToTransData(TransInfo *t, TransData *td, TransData2D *td2d,
memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
- td->ext= NULL; td->tdi= NULL; td->val= NULL;
+ td->ext= NULL; td->val= NULL;
td->flag |= TD_SELECTED;
td->dist= 0.0;
@@ -4269,20 +4172,20 @@ static void ObjectToTransData(bContext *C, TransInfo *t, TransData *td, Object *
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
@@ -4296,6 +4199,10 @@ static void ObjectToTransData(bContext *C, TransInfo *t, TransData *td, Object *
td->ext->rot = ob->rot;
VECCOPY(td->ext->irot, ob->rot);
VECCOPY(td->ext->drot, ob->drot);
+
+ td->ext->quat = ob->quat;
+ QUATCOPY(td->ext->iquat, ob->quat);
+ QUATCOPY(td->ext->dquat, ob->dquat);
td->ext->size = ob->size;
VECCOPY(td->ext->isize, ob->size);
@@ -4337,7 +4244,7 @@ static void ObjectToTransData(bContext *C, TransInfo *t, TransData *td, Object *
/* it deselects Bases, so we have to call the clear function always after */
static void set_trans_object_base_flags(bContext *C, TransInfo *t)
{
- Scene *sce = CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
View3D *v3d = t->view;
/*
@@ -4354,15 +4261,15 @@ static void set_trans_object_base_flags(bContext *C, TransInfo *t)
copy_baseflags(t->scene);
/* handle pending update events, otherwise they got copied below */
- for (base= sce->base.first; base; base= base->next) {
+ for (base= scene->base.first; base; base= base->next) {
if(base->object->recalc)
object_handle_update(t->scene, base->object);
}
- for (base= sce->base.first; base; base= base->next) {
+ for (base= scene->base.first; base; base= base->next) {
base->flag &= ~BA_WAS_SEL;
- if(TESTBASELIB(v3d, base)) {
+ if(TESTBASELIB_BGMODE(v3d, base)) {
Object *ob= base->object;
Object *parsel= ob->parent;
@@ -4394,7 +4301,7 @@ static void set_trans_object_base_flags(bContext *C, TransInfo *t)
/* 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) {
+ for (base= scene->base.first; base; base= base->next) {
if(base->object->recalc & OB_RECALC_OB)
base->flag |= BA_HAS_RECALC_OB;
if(base->object->recalc & OB_RECALC_DATA)
@@ -4426,10 +4333,16 @@ void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode)
// TODO: this should probably be done per channel instead...
if (autokeyframe_cfra_can_key(scene, id)) {
- AnimData *adt= ob->adt;
+ KeyingSet *active_ks = ANIM_scene_get_active_keyingset(scene);
+ bCommonKeySrc cks;
+ ListBase dsources = {&cks, &cks};
float cfra= (float)CFRA; // xxx this will do for now
short flag = 0;
+ /* init common-key-source for use by KeyingSets */
+ memset(&cks, 0, sizeof(bCommonKeySrc));
+ cks.id= &ob->id;
+
if (IS_AUTOKEY_FLAG(INSERTNEEDED))
flag |= INSERTKEY_NEEDED;
if (IS_AUTOKEY_FLAG(AUTOMATKEY))
@@ -4437,7 +4350,14 @@ void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode)
if (IS_AUTOKEY_MODE(scene, EDITKEYS))
flag |= INSERTKEY_REPLACE;
- if (IS_AUTOKEY_FLAG(INSERTAVAIL)) {
+
+ if (IS_AUTOKEY_FLAG(ONLYKEYINGSET) && (active_ks)) {
+ /* only insert into active keyingset */
+ modify_keyframes(scene, &dsources, NULL, active_ks, MODIFYKEY_MODE_INSERT, cfra);
+ }
+ else if (IS_AUTOKEY_FLAG(INSERTAVAIL)) {
+ AnimData *adt= ob->adt;
+
/* only key on available channels */
if (adt && adt->action) {
for (fcu= adt->action->curves.first; fcu; fcu= fcu->next) {
@@ -4476,41 +4396,25 @@ void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode)
doScale = 1;
}
- // TODO: the group names here are temporary...
- // TODO: should this be made to use the builtin KeyingSets instead?
+ /* insert keyframes for the affected sets of channels using the builtin KeyingSets found */
if (doLoc) {
- 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);
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Location");
+ modify_keyframes(scene, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
if (doRot) {
- 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);
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Rotation");
+ modify_keyframes(scene, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
if (doScale) {
- 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);
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Scale");
+ modify_keyframes(scene, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
}
+ /* insert keyframe in all (transform) channels */
else {
- // TODO: the group names here are temporary...
- // TODO: should this be made to use the builtin KeyingSets instead?
- 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);
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale");
+ modify_keyframes(scene, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
-
- // XXX todo... find a way to send notifiers from here...
}
}
@@ -4530,9 +4434,15 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode,
// TODO: this should probably be done per channel instead...
if (autokeyframe_cfra_can_key(scene, id)) {
+ KeyingSet *active_ks = ANIM_scene_get_active_keyingset(scene);
+ bCommonKeySrc cks;
+ ListBase dsources = {&cks, &cks};
float cfra= (float)CFRA;
short flag= 0;
- char buf[512];
+
+ /* init common-key-source for use by KeyingSets */
+ memset(&cks, 0, sizeof(bCommonKeySrc));
+ cks.id= &ob->id;
/* flag is initialised from UserPref keyframing settings
* - special exception for targetless IK - INSERTKEY_MATRIX keyframes should get
@@ -4551,8 +4461,14 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode,
/* clear any 'unkeyed' flag it may have */
pchan->bone->flag &= ~BONE_UNKEYED;
+ /* only insert into active keyingset? */
+ if (IS_AUTOKEY_FLAG(ONLYKEYINGSET) && (active_ks)) {
+ /* init cks for this PoseChannel, then use the relative KeyingSets to keyframe it */
+ cks.pchan= pchan;
+ modify_keyframes(scene, &dsources, NULL, active_ks, MODIFYKEY_MODE_INSERT, cfra);
+ }
/* only insert into available channels? */
- if (IS_AUTOKEY_FLAG(INSERTAVAIL)) {
+ else if (IS_AUTOKEY_FLAG(INSERTAVAIL)) {
if (act) {
for (fcu= act->curves.first; fcu; fcu= fcu->next)
insert_keyframe(id, act, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
@@ -4585,58 +4501,34 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode,
}
if (doLoc) {
- sprintf(buf, "pose.pose_channels[\"%s\"].location", pchan->name);
- 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);
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Location");
+
+ /* init cks for this PoseChannel, then use the relative KeyingSets to keyframe it */
+ cks.pchan= pchan;
+ modify_keyframes(scene, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
if (doRot) {
- 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);
- insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag);
- insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag);
- insert_keyframe(id, NULL, pchan->name, buf, 3, cfra, flag);
- }
- else {
- sprintf(buf, "pose.pose_channels[\"%s\"].euler_rotation", pchan->name);
- 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);
- }
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Rotation");
+
+ /* init cks for this PoseChannel, then use the relative KeyingSets to keyframe it */
+ cks.pchan= pchan;
+ modify_keyframes(scene, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
if (doScale) {
- 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);
- insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag);
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Scale");
+
+ /* init cks for this PoseChannel, then use the relative KeyingSets to keyframe it */
+ cks.pchan= pchan;
+ modify_keyframes(scene, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
}
- /* insert keyframe in any channel that's appropriate */
+ /* insert keyframe in all (transform) channels */
else {
- sprintf(buf, "pose.pose_channels[\"%s\"].location", pchan->name);
- 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);
- insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag);
- insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag);
- insert_keyframe(id, NULL, pchan->name, buf, 3, cfra, flag);
- }
- else {
- sprintf(buf, "pose.pose_channels[\"%s\"].euler_rotation", pchan->name);
- 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);
- }
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale");
- 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);
- insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag);
+ /* init cks for this PoseChannel, then use the relative KeyingSets to keyframe it */
+ cks.pchan= pchan;
+ modify_keyframes(scene, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
}
}
@@ -4676,13 +4568,7 @@ void special_aftertrans_update(TransInfo *t)
if (t->spacetype==SPACE_VIEW3D) {
if (t->obedit) {
if (cancelled==0) {
-#if 0 // TRANSFORM_FIX_ME
- EM_automerge(1);
- /* when snapping, delay retopo until after automerge */
- if (G.qual & LR_CTRLKEY) {
- retopo_do_all();
- }
-#endif
+ EM_automerge(t->scene, t->obedit, 1);
}
}
}
@@ -5007,7 +4893,7 @@ void special_aftertrans_update(TransInfo *t)
// allqueue(REDRAWBUTSEDIT, 0);
}
- else if(t->scene->basact && (ob = t->scene->basact->object) && ob->mode & OB_MODE_PARTICLE_EDIT) {
+ else if(t->scene->basact && (ob = t->scene->basact->object) && (ob->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(t->scene, ob)) {
;
}
else {
@@ -5030,6 +4916,7 @@ void special_aftertrans_update(TransInfo *t)
if(pid->type != PTCACHE_TYPE_PARTICLES) /* particles don't need reset on geometry change */
pid->cache->flag |= PTCACHE_OUTDATED;
}
+ BLI_freelistN(&pidlist);
/* pointcache refresh */
if (BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_OUTDATED))
@@ -5076,30 +4963,7 @@ static void createTransObject(bContext *C, TransInfo *t)
set_trans_object_base_flags(C, t);
/* count */
-#if 0 // TRANSFORM_FIX_ME
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects)
- {
- /* store ipo keys? */
- 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++;
- }
-// else {
- t->total++;
-// }
- }
- CTX_DATA_END;
-#else
t->total= CTX_DATA_COUNT(C, selected_objects);
-#endif
if(!t->total) {
/* clear here, main transform function escapes too */
@@ -5113,92 +4977,27 @@ static void createTransObject(bContext *C, TransInfo *t)
CTX_DATA_BEGIN(C, Base*, base, selected_bases)
{
Object *ob= base->object;
-
+
td->flag = TD_SELECTED;
td->protectflag= ob->protectflag;
td->ext = tx;
-
+ td->rotOrder= ob->rotmode;
+
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;
}
-
- /* store ipo keys? */
- // 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
- }
- else {
- ObjectToTransData(C, t, td, ob);
- td->tdi = NULL;
- td->val = NULL;
- td++;
- tx++;
- }
- }
-#endif
-// else {
- ObjectToTransData(C, t, td, ob);
- td->tdi = NULL;
- td->val = NULL;
- td++;
- tx++;
-// }
+
+ ObjectToTransData(C, t, td, ob);
+ td->val = NULL;
+ td++;
+ tx++;
}
CTX_DATA_END;
}
@@ -5220,7 +5019,7 @@ static void NodeToTransData(TransData *td, TransData2D *td2d, bNode *node)
memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
- td->ext= NULL; td->tdi= NULL; td->val= NULL;
+ td->ext= NULL; td->val= NULL;
td->flag |= TD_SELECTED;
td->dist= 0.0;
@@ -5364,7 +5163,7 @@ void createTransData(bContext *C, TransInfo *t)
{
if(ob_armature->type==OB_ARMATURE)
{
- if(ob_armature->mode & OB_MODE_POSE)
+ if((ob_armature->mode & OB_MODE_POSE) && ob_armature == modifiers_isDeformedByArmature(ob))
{
createTransPose(C, t, ob_armature);
break;
@@ -5387,6 +5186,8 @@ void createTransData(bContext *C, TransInfo *t)
}
else {
t->flag &= ~T_PROP_EDIT; /* no proportional edit in object mode */
+ t->options |= CTX_NO_PET;
+
createTransObject(C, t);
t->flag |= T_OBJECT;
@@ -5394,7 +5195,7 @@ void createTransData(bContext *C, TransInfo *t)
{
View3D *v3d = t->view;
RegionView3D *rv3d = CTX_wm_region_view3d(C);
- if((t->flag & T_OBJECT) && v3d->camera == OBACT && rv3d->persp==V3D_CAMOB)
+ if(rv3d && (t->flag & T_OBJECT) && v3d->camera == OBACT && rv3d->persp==V3D_CAMOB)
{
t->flag |= T_CAMERA;
}
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 36ee9b81623..66b46ab5b96 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -59,6 +59,7 @@
//#include "BIF_screen.h"
//#include "BIF_mywindow.h"
#include "BIF_gl.h"
+#include "BIF_glutil.h"
//#include "BIF_editmesh.h"
//#include "BIF_editsima.h"
//#include "BIF_editparticle.h"
@@ -92,7 +93,7 @@
#include "ED_keyframing.h"
#include "ED_markers.h"
#include "ED_mesh.h"
-#include "ED_retopo.h"
+#include "ED_particle.h"
#include "ED_screen_types.h"
#include "ED_space_api.h"
#include "ED_uvedit.h"
@@ -265,8 +266,13 @@ static void editbmesh_apply_to_mirror(TransInfo *t)
eve->co[1]= td->loc[1];
eve->co[2]= td->loc[2];
}
+
+ if (td->flag & TD_MIRROR_EDGE)
+ {
+ td->loc[0] = 0;
}
}
+}
/* tags the given ID block for refreshes (if applicable) due to
* Animation Editor editing
@@ -348,7 +354,7 @@ void recalcData(TransInfo *t)
if (t->obedit) {
}
- else if(base && base->object->mode & OB_MODE_PARTICLE_EDIT) {
+ else if(base && (base->object->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(scene, base->object)) {
flushTransParticles(t);
}
if (t->spacetype==SPACE_NODE) {
@@ -618,13 +624,31 @@ void recalcData(TransInfo *t)
}
}
}
- else if (t->obedit) {
+ else if (t->spacetype == SPACE_IMAGE) {
+ if (t->obedit && t->obedit->type == OB_MESH) {
+ SpaceImage *sima= t->sa->spacedata.first;
+
+ flushTransUVs(t);
+ if(sima->flag & SI_LIVE_UNWRAP)
+ ED_uvedit_live_unwrap_re_solve();
+
+ DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA);
+ }
+ }
+ else if (t->spacetype == SPACE_VIEW3D) {
+
+ /* project */
+ if(t->state != TRANS_CANCEL) {
+ applyProject(t);
+ }
+
+ if (t->obedit) {
if ELEM(t->obedit->type, OB_CURVE, OB_SURF) {
Curve *cu= t->obedit->data;
Nurb *nu= cu->editnurb->first;
-
+
DAG_id_flush_update(t->obedit->data, 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 */
@@ -637,8 +661,6 @@ void recalcData(TransInfo *t)
calchandlesNurb(nu);
nu= nu->next;
}
- /* TRANSFORM_FIX_ME */
- // retopo_do_all();
}
}
else if(t->obedit->type==OB_LATTICE) {
@@ -648,23 +670,9 @@ void recalcData(TransInfo *t)
if(la->editlatt->flag & LT_OUTSIDE) outside_lattice(la->editlatt);
}
else if (t->obedit->type == OB_MESH) {
- if(t->spacetype==SPACE_IMAGE) {
- SpaceImage *sima= t->sa->spacedata.first;
-
- flushTransUVs(t);
- if(sima->flag & SI_LIVE_UNWRAP)
- ED_uvedit_live_unwrap_re_solve();
-
- DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA);
- } else {
BMEditMesh *em = ((Mesh*)t->obedit->data)->edit_btmesh;
/* mirror modifier clipping? */
if(t->state != TRANS_CANCEL) {
- /* TRANSFORM_FIX_ME */
-// if ((G.qual & LR_CTRLKEY)==0) {
-// /* Only retopo if not snapping, Note, this is the only case of G.qual being used, but we have no T_SHIFT_MOD - Campbell */
-// retopo_do_all();
-// }
clipMirrorModifier(t, t->obedit);
}
if((t->options & CTX_NO_MIRROR) == 0 && (t->flag & T_MIRROR))
@@ -675,17 +683,16 @@ void recalcData(TransInfo *t)
EDBM_RecalcNormals(em);
BMEdit_RecalcTesselation(em);
}
- }
else if(t->obedit->type==OB_ARMATURE) { /* no recalc flag, does pose */
bArmature *arm= t->obedit->data;
ListBase *edbo = arm->edbo;
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){
@@ -698,7 +705,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) {
@@ -718,8 +725,8 @@ void recalcData(TransInfo *t)
ebo->oldlength= ebo->length;
}
}
-
-
+
+
if (t->mode != TFM_BONE_ROLL)
{
/* fix roll */
@@ -729,10 +736,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);
@@ -744,15 +751,15 @@ void recalcData(TransInfo *t)
{
Mat3MulVecfl(t->mat, up_axis);
}
-
+
ebo->roll = ED_rollBoneToVector(ebo, up_axis);
}
}
}
-
+
if(arm->flag & ARM_MIRROR_EDIT)
transform_armature_mirror_update(t->obedit);
-
+
}
else
DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */
@@ -760,7 +767,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)
@@ -772,7 +779,7 @@ void recalcData(TransInfo *t)
animrecord_check_state(t->scene, &ob->id, t->animtimer);
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_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
@@ -783,13 +790,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,
@@ -802,7 +809,7 @@ 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;
@@ -810,11 +817,11 @@ void recalcData(TransInfo *t)
group_tag_recalc(ob->proxy_group->dup_group);
}
}
-
- /* update shaded drawmode while transform */
- if(t->spacetype==SPACE_VIEW3D && ((View3D*)t->view)->drawtype == OB_SHADED)
+
+ if(((View3D*)t->view)->drawtype == OB_SHADED)
reshadeall_displist(t->scene);
}
+}
void drawLine(TransInfo *t, float *center, float *dir, char axis, short options)
{
@@ -936,7 +943,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
if(v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN;
t->around = v3d->around;
- if (op && RNA_struct_find_property(op->ptr, "constraint_axis") && RNA_property_is_set(op->ptr, "constraint_orientation"))
+ if (op && RNA_struct_find_property(op->ptr, "constraint_orientation") && RNA_property_is_set(op->ptr, "constraint_orientation"))
{
t->current_orientation = RNA_enum_get(op->ptr, "constraint_orientation");
@@ -970,20 +977,24 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
if (RNA_boolean_get(op->ptr, "mirror"))
{
t->flag |= T_MIRROR;
+ t->mirror = 1;
}
}
// Need stuff to take it from edit mesh or whatnot here
else
{
- if (t->obedit && t->obedit->type == OB_MESH && ts->editbutflag & B_MESH_X_MIRROR)
+ if (t->obedit && t->obedit->type == OB_MESH && (((Mesh *)t->obedit->data)->editflag & ME_EDIT_MIRROR_X))
{
t->flag |= T_MIRROR;
+ t->mirror = 1;
}
}
- /* setting PET flag */
- if (op && RNA_struct_find_property(op->ptr, "proportional") && RNA_property_is_set(op->ptr, "proportional"))
+ /* setting PET flag only if property exist in operator. Otherwise, assume it's not supported */
+ if (op && RNA_struct_find_property(op->ptr, "proportional"))
{
+ if (RNA_property_is_set(op->ptr, "proportional"))
+ {
switch(RNA_enum_get(op->ptr, "proportional"))
{
case 2: /* XXX connected constant */
@@ -995,10 +1006,10 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
else
{
- if ((t->options & CTX_NO_PET) == 0 && (ts->proportional)) {
+ if ((t->options & CTX_NO_PET) == 0 && (ts->proportional != PROP_EDIT_OFF)) {
t->flag |= T_PROP_EDIT;
- if(ts->proportional == 2)
+ if(ts->proportional == PROP_EDIT_CONNECTED)
t->flag |= T_PROP_CONNECTED; // yes i know, has to become define
}
}
@@ -1012,6 +1023,13 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
t->prop_size = ts->proportional_size;
}
+
+ /* TRANSFORM_FIX_ME rna restrictions */
+ if (t->prop_size <= 0)
+ {
+ t->prop_size = 1.0f;
+ }
+
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");
@@ -1020,13 +1038,13 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
{
t->prop_mode = ts->prop_mode;
}
-
- /* TRANSFORM_FIX_ME rna restrictions */
- if (t->prop_size <= 0)
+ }
+ else /* add not pet option to context when not available */
{
- t->prop_size = 1.0f;
+ t->options |= CTX_NO_PET;
}
+
setTransformViewMatrices(t);
initNumInput(&t->num);
initNDofInput(&t->ndof);
@@ -1050,8 +1068,8 @@ 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);
}
@@ -1067,8 +1085,16 @@ void postTrans (TransInfo *t)
if(sima->flag & SI_LIVE_UNWRAP)
ED_uvedit_live_unwrap_end(t->state == TRANS_CANCEL);
}
- else if(ELEM(t->spacetype, SPACE_ACTION, SPACE_NLA)) {
- if (t->customData)
+
+ if (t->mouse.data)
+ {
+ MEM_freeN(t->mouse.data);
+ }
+
+ if (t->customFree) {
+ t->customFree(t);
+ }
+ else if (t->customData) {
MEM_freeN(t->customData);
}}
@@ -1088,16 +1114,6 @@ void applyTransObjects(TransInfo *t)
recalcData(t);
}
-/* helper for below */
-static void restore_ipokey(float *poin, float *old)
-{
- if(poin) {
- poin[0]= old[0];
- poin[-3]= old[3];
- poin[3]= old[6];
- }
-}
-
static void restoreElement(TransData *td) {
/* TransData for crease has no loc */
if (td->loc) {
@@ -1113,34 +1129,16 @@ static void restoreElement(TransData *td) {
if (td->ext->size) {
VECCOPY(td->ext->size, td->ext->isize);
}
- if(td->flag & TD_USEQUAT) {
if (td->ext->quat) {
QUATCOPY(td->ext->quat, td->ext->iquat);
}
}
- }
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);
-
- 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);
}
-}
void restoreTransObjects(TransInfo *t)
{
@@ -1322,7 +1320,7 @@ void calculateCenter(TransInfo *t)
Mat4MulVecfl(ob->obmat, t->con.center);
}
- /* voor panning from cameraview */
+ /* for panning from cameraview */
if(t->flag & T_OBJECT)
{
if(t->spacetype==SPACE_VIEW3D && t->ar->regiontype == RGN_TYPE_WINDOW)
@@ -1384,6 +1382,12 @@ void calculatePropRatio(TransInfo *t)
if (td->flag & TD_SELECTED) {
td->factor = 1.0f;
}
+ else if (t->flag & T_MIRROR && td->loc[0] * t->mirror < -0.00001f)
+ {
+ td->flag |= TD_SKIP;
+ td->factor = 0.0f;
+ restoreElement(td);
+ }
else if ((connected &&
(td->flag & TD_NOTCONNECTED || td->dist > t->prop_size))
||
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c
index 6bd0a8c8d42..83d4a314057 100644
--- a/source/blender/editors/transform/transform_input.c
+++ b/source/blender/editors/transform/transform_input.c
@@ -34,7 +34,7 @@
#include "transform.h"
-
+#include "MEM_guardedalloc.h"
/* ************************** INPUT FROM MOUSE *************************** */
@@ -163,6 +163,47 @@ void InputVerticalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float ou
output[0] = Inpf(t->viewinv[1], vec) * 2.0f;
}
+void setCustomPoints(TransInfo *t, MouseInput *mi, short start[2], short end[2])
+{
+ short *data = mi->data;
+
+ data[0] = start[0];
+ data[1] = start[1];
+ data[2] = end[0];
+ data[3] = end[1];
+}
+
+void InputCustomRatio(TransInfo *t, MouseInput *mi, short mval[2], float output[3])
+{
+ float length;
+ float distance;
+ short *data = mi->data;
+ short dx, dy;
+
+ dx = data[2] - data[0];
+ dy = data[3] - data[1];
+
+ length = (float)sqrtf(dx*dx + dy*dy);
+
+ if (mi->precision) {
+ /* deal with Shift key by adding motion / 10 to motion before shift press */
+ short mdx, mdy;
+ mdx = (mi->precision_mval[0] + (float)(mval[0] - mi->precision_mval[0]) / 10.0f) - data[2];
+ mdy = (mi->precision_mval[1] + (float)(mval[1] - mi->precision_mval[1]) / 10.0f) - data[3];
+
+ distance = (mdx*dx + mdy*dy) / length;
+ }
+ else {
+ short mdx, mdy;
+ mdx = mval[0] - data[2];
+ mdy = mval[1] - data[3];
+
+ distance = (mdx*dx + mdy*dy) / length;
+ }
+
+ output[0] = distance / length;
+}
+
void InputAngle(TransInfo *t, MouseInput *mi, short mval[2], float output[3])
{
double dx2 = mval[0] - mi->center[0];
@@ -291,6 +332,11 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode)
mi->apply = InputVerticalAbsolute;
t->helpline = HLP_VARROW;
break;
+ case INPUT_CUSTOM_RATIO:
+ mi->apply = InputCustomRatio;
+ t->helpline = HLP_NONE;
+ mi->data = MEM_callocN(sizeof(short) * 4, "custom points");
+ break;
case INPUT_NONE:
default:
mi->apply = NULL;
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 664627f1e15..19881c7bc5b 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -415,6 +415,9 @@ int calc_manipulator_stats(const bContext *C)
if(ob && totsel) {
switch(v3d->twmode) {
+
+ case V3D_MANIP_GLOBAL:
+ break; /* nothing to do */
case V3D_MANIP_NORMAL:
if(obedit || ob->mode & OB_MODE_POSE) {
@@ -476,8 +479,12 @@ int calc_manipulator_stats(const bContext *C)
}
break;
default: /* V3D_MANIP_CUSTOM */
- // XXX applyTransformOrientation(C, t);
- break;
+ {
+ float mat[3][3];
+ applyTransformOrientation(C, mat, NULL);
+ Mat4CpyMat3(rv3d->twmat, mat);
+ break;
+ }
}
}
@@ -1605,7 +1612,7 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
break;
}
RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis);
- WM_operator_name_call(C, "TFM_OT_translate", WM_OP_INVOKE_REGION_WIN, op->ptr);
+ WM_operator_name_call(C, "TFM_OT_translate", WM_OP_INVOKE_DEFAULT, op->ptr);
}
else if (drawflags & MAN_SCALE_C) {
switch(drawflags) {
@@ -1635,10 +1642,10 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
break;
}
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);
+ WM_operator_name_call(C, "TFM_OT_resize", WM_OP_INVOKE_DEFAULT, op->ptr);
}
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);
+ WM_operator_name_call(C, "TFM_OT_trackball", WM_OP_INVOKE_DEFAULT, op->ptr);
}
else if (drawflags & MAN_ROT_C) {
switch(drawflags) {
@@ -1653,7 +1660,7 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
break;
}
RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis);
- WM_operator_name_call(C, "TFM_OT_rotate", WM_OP_INVOKE_REGION_WIN, op->ptr);
+ WM_operator_name_call(C, "TFM_OT_rotate", WM_OP_INVOKE_DEFAULT, op->ptr);
}
}
/* after transform, restore drawflags */
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 758b89d2e92..fe8e5b34b54 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -55,40 +55,6 @@ typedef struct TransformModeItem
static float VecOne[3] = {1, 1, 1};
-/* need constants for this */
-EnumPropertyItem proportional_mode_types[] = {
- {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", 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", 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_translate";
char OP_ROTATION[] = "TFM_OT_rotate";
char OP_TOSPHERE[] = "TFM_OT_tosphere";
@@ -99,6 +65,7 @@ char OP_SHRINK_FATTEN[] = "TFM_OT_shrink_fatten";
char OP_TILT[] = "TFM_OT_tilt";
char OP_TRACKBALL[] = "TFM_OT_trackball";
char OP_MIRROR[] = "TFM_OT_mirror";
+char OP_EDGE_SLIDE[] = "TFM_OT_edge_slide";
TransformModeItem transform_modes[] =
@@ -113,6 +80,7 @@ TransformModeItem transform_modes[] =
{OP_TILT, TFM_TILT},
{OP_TRACKBALL, TFM_TRACKBALL},
{OP_MIRROR, TFM_MIRROR},
+ {OP_EDGE_SLIDE, TFM_EDGE_SLIDE},
{NULL, 0}
};
@@ -121,6 +89,8 @@ static int select_orientation_exec(bContext *C, wmOperator *op)
int orientation = RNA_enum_get(op->ptr, "orientation");
BIF_selectTransformOrientationValue(C, orientation);
+
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, CTX_wm_view3d(C));
return OPERATOR_FINISHED;
}
@@ -138,28 +108,111 @@ static int select_orientation_invoke(bContext *C, wmOperator *op, wmEvent *event
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)
{
PropertyRNA *prop;
/* identifiers */
ot->name = "Select Orientation";
- ot->description= "Select orientation type.";
+ ot->description= "Select transformation orientation.";
ot->idname = "TFM_OT_select_orientation";
+ ot->flag = OPTYPE_UNDO;
/* api callbacks */
ot->invoke = select_orientation_invoke;
ot->exec = select_orientation_exec;
ot->poll = ED_operator_areaactive;
- prop= RNA_def_enum(ot->srna, "orientation", orientation_items, V3D_MANIP_GLOBAL, "Orientation", "DOC_BROKEN");
- RNA_def_enum_funcs(prop, select_orientation_itemf);
+ prop= RNA_def_property(ot->srna, "orientation", PROP_ENUM, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation.");
+ RNA_def_enum_funcs(prop, rna_TransformOrientation_itemf);
+}
+
+
+static int delete_orientation_exec(bContext *C, wmOperator *op)
+{
+ View3D *v3d = CTX_wm_view3d(C);
+ int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
+
+ BIF_removeTransformOrientationIndex(C, selected_index);
+
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, CTX_wm_view3d(C));
+
+ return OPERATOR_FINISHED;
+}
+
+static int delete_orientation_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ return delete_orientation_exec(C, op);
+}
+
+static int delete_orientation_poll(bContext *C)
+{
+ int selected_index = -1;
+ View3D *v3d = CTX_wm_view3d(C);
+
+ if (ED_operator_areaactive(C) == 0)
+ return 0;
+
+
+ if(v3d) {
+ selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
+ }
+
+ return selected_index >= 0;
+}
+
+void TFM_OT_delete_orientation(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Delete Orientation";
+ ot->description= "Delete transformation orientation.";
+ ot->idname = "TFM_OT_delete_orientation";
+ ot->flag = OPTYPE_UNDO;
+
+ /* api callbacks */
+ ot->invoke = delete_orientation_invoke;
+ ot->exec = delete_orientation_exec;
+ ot->poll = delete_orientation_poll;
+}
+
+static int create_orientation_exec(bContext *C, wmOperator *op)
+{
+ char name[36];
+ int use = RNA_boolean_get(op->ptr, "use");
+ int overwrite = RNA_boolean_get(op->ptr, "overwrite");
+
+ RNA_string_get(op->ptr, "name", name);
+
+ BIF_createTransformOrientation(C, op->reports, name, use, overwrite);
+
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, CTX_wm_view3d(C));
+
+ return OPERATOR_FINISHED;
+}
+
+static int create_orientation_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ return create_orientation_exec(C, op);
+}
+
+void TFM_OT_create_orientation(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Create Orientation";
+ ot->description= "Create transformation orientation from selection.";
+ ot->idname = "TFM_OT_create_orientation";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* api callbacks */
+ ot->invoke = create_orientation_invoke;
+ ot->exec = create_orientation_exec;
+ ot->poll = ED_operator_areaactive;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_string(ot->srna, "name", "", 35, "Name", "Text to insert at the cursor position.");
+ RNA_def_boolean(ot->srna, "use", 0, "Use after creation", "Select orientation after its creation");
+ RNA_def_boolean(ot->srna, "overwrite", 0, "Overwrite previous", "Overwrite previously created orientation with same name");
}
static void transformops_exit(bContext *C, wmOperator *op)
@@ -270,7 +323,7 @@ static int transform_invoke(bContext *C, wmOperator *op, wmEvent *event)
TransInfo *t = op->customdata;
/* add temp handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
t->flag |= T_MODAL; // XXX meh maybe somewhere else
@@ -280,15 +333,15 @@ static int transform_invoke(bContext *C, wmOperator *op, wmEvent *event)
void Properties_Proportional(struct wmOperatorType *ot)
{
- RNA_def_enum(ot->srna, "proportional", proportional_mode_types, 0, "Proportional Editing", "");
- RNA_def_enum(ot->srna, "proportional_editing_falloff", prop_mode_items, 0, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
+ RNA_def_enum(ot->srna, "proportional", proportional_editing_items, 0, "Proportional Editing", "");
+ RNA_def_enum(ot->srna, "proportional_editing_falloff", proportional_falloff_items, 0, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
RNA_def_float(ot->srna, "proportional_size", 1, 0, FLT_MAX, "Proportional Size", "", 0, 100);
}
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_enum(ot->srna, "snap_mode", snap_mode_items, 0, "Mode", "");
RNA_def_float_vector(ot->srna, "snap_point", 3, NULL, -FLT_MAX, FLT_MAX, "Point", "", -FLT_MAX, FLT_MAX);
if (align)
@@ -303,8 +356,9 @@ void Properties_Constraints(struct wmOperatorType *ot)
PropertyRNA *prop;
RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", "");
- prop= RNA_def_enum(ot->srna, "constraint_orientation", orientation_items, V3D_MANIP_GLOBAL, "Orientation", "DOC_BROKEN");
- RNA_def_enum_funcs(prop, select_orientation_itemf);
+ prop= RNA_def_property(ot->srna, "constraint_orientation", PROP_ENUM, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation.");
+ RNA_def_enum_funcs(prop, rna_TransformOrientation_itemf);
}
void TFM_OT_translate(struct wmOperatorType *ot)
@@ -523,7 +577,7 @@ void TFM_OT_tosphere(struct wmOperatorType *ot)
ot->cancel = transform_cancel;
ot->poll = ED_operator_areaactive;
- RNA_def_float_percentage(ot->srna, "value", 0, 0, 1, "Percentage", "", 0, 1);
+ RNA_def_float_factor(ot->srna, "value", 0, 0, 1, "Factor", "", 0, 1);
Properties_Proportional(ot);
@@ -549,6 +603,26 @@ void TFM_OT_mirror(struct wmOperatorType *ot)
Properties_Constraints(ot);
}
+void TFM_OT_edge_slide(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Edge Slide";
+ ot->description= "Slide an edge loop along a mesh.";
+ ot->idname = OP_EDGE_SLIDE;
+ 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_editmesh;
+
+ RNA_def_float_factor(ot->srna, "value", 0, -1.0f, 1.0f, "Factor", "", -1.0f, 1.0f);
+
+ RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
+}
+
void TFM_OT_transform(struct wmOperatorType *ot)
{
static EnumPropertyItem transform_mode_types[] = {
@@ -578,6 +652,7 @@ void TFM_OT_transform(struct wmOperatorType *ot)
{TFM_BEVEL, "BEVEL", 0, "Bevel", ""},
{TFM_BWEIGHT, "BWEIGHT", 0, "Bweight", ""},
{TFM_ALIGN, "ALIGN", 0, "Align", ""},
+ {TFM_EDGE_SLIDE, "EDGESLIDE", 0, "Edge Slide", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -617,16 +692,19 @@ void transform_operatortypes(void)
WM_operatortype_append(TFM_OT_tilt);
WM_operatortype_append(TFM_OT_trackball);
WM_operatortype_append(TFM_OT_mirror);
+ WM_operatortype_append(TFM_OT_edge_slide);
WM_operatortype_append(TFM_OT_select_orientation);
+ WM_operatortype_append(TFM_OT_create_orientation);
+ WM_operatortype_append(TFM_OT_delete_orientation);
}
-void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *keymap, int spaceid)
+void transform_keymap_for_space(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int spaceid)
{
- wmKeymapItem *km;
+ wmKeyMapItem *km;
/* transform.c, only adds modal map once, checks if it's there */
- transform_modal_keymap(wm);
+ transform_modal_keymap(keyconf);
switch(spaceid)
{
@@ -651,6 +729,11 @@ void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *key
km = WM_keymap_add_item(keymap, "TFM_OT_select_orientation", SPACEKEY, KM_PRESS, KM_ALT, 0);
+ km = WM_keymap_add_item(keymap, "TFM_OT_create_orientation", SPACEKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ RNA_boolean_set(km->ptr, "use", 1);
+
+ km = WM_keymap_add_item(keymap, "TFM_OT_mirror", MKEY, KM_PRESS, KM_CTRL, 0);
+
break;
case SPACE_ACTION:
km= WM_keymap_add_item(keymap, "TFM_OT_transform", GKEY, KM_PRESS, 0, 0);
@@ -721,7 +804,7 @@ void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *key
km = WM_keymap_add_item(keymap, "TFM_OT_resize", SKEY, KM_PRESS, 0, 0);
- km = WM_keymap_add_item(keymap, "TFM_OT_mirror", MKEY, KM_PRESS, 0, 0);
+ km = WM_keymap_add_item(keymap, "TFM_OT_mirror", MKEY, KM_PRESS, KM_CTRL, 0);
break;
default:
break;
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index e73afa919b3..bad744d101b 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -23,6 +23,7 @@
*/
#include <string.h>
+#include <ctype.h>
#include "MEM_guardedalloc.h"
@@ -44,6 +45,7 @@
#include "BKE_armature.h"
#include "BKE_context.h"
#include "BKE_tessmesh.h"
+#include "BKE_report.h"
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
@@ -68,108 +70,131 @@
void BIF_clearTransformOrientation(bContext *C)
{
+ View3D *v3d = CTX_wm_view3d(C);
+
ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
BLI_freelistN(transform_spaces);
- // TRANSFORM_FIX_ME
// Need to loop over all view3d
-// if (G.vd->twmode >= V3D_MANIP_CUSTOM)
-// G.vd->twmode = V3D_MANIP_GLOBAL; /* fallback to global */
+ if(v3d && v3d->twmode >= V3D_MANIP_CUSTOM) {
+ v3d->twmode = V3D_MANIP_GLOBAL; /* fallback to global */
+}
}
-void BIF_manageTransformOrientation(bContext *C, int confirm, int set) {
+TransformOrientation* findOrientationName(bContext *C, char *name)
+{
+ ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
+ TransformOrientation *ts= NULL;
+
+ for (ts = transform_spaces->first; ts; ts = ts->next) {
+ if (strncmp(ts->name, name, 35) == 0) {
+ return ts;
+ }
+ }
+
+ return NULL;
+}
+
+void uniqueOrientationName(bContext *C, char *name)
+{
+ if (findOrientationName(C, name) != NULL)
+ {
+ char tempname[64];
+ int number;
+ char *dot;
+
+
+ number = strlen(name);
+
+ if (number && isdigit(name[number-1]))
+ {
+ dot = strrchr(name, '.'); // last occurrence
+ if (dot)
+ *dot=0;
+ }
+
+ for (number = 1; number <= 999; number++)
+ {
+ sprintf(tempname, "%s.%03d", name, number);
+ if (findOrientationName(C, tempname) == NULL)
+ {
+ BLI_strncpy(name, tempname, 32);
+ break;
+ }
+ }
+ }
+}
+
+void BIF_createTransformOrientation(bContext *C, ReportList *reports, char *name, int use, int overwrite)
+{
Object *obedit = CTX_data_edit_object(C);
Object *ob = CTX_data_active_object(C);
- int index = -1;
+ TransformOrientation *ts = NULL;
if (obedit) {
if (obedit->type == OB_MESH)
- index = manageMeshSpace(C, confirm, set);
+ ts = createMeshSpace(C, reports, name, overwrite);
else if (obedit->type == OB_ARMATURE)
- index = manageBoneSpace(C, confirm, set);
+ ts = createBoneSpace(C, reports, name, overwrite);
}
else if (ob && (ob->mode & OB_MODE_POSE)) {
- index = manageBoneSpace(C, confirm, set);
+ ts = createBoneSpace(C, reports, name, overwrite);
}
else {
- index = manageObjectSpace(C, confirm, set);
+ ts = createObjectSpace(C, reports, name, overwrite);
}
- if (set && index != -1)
+ if (use && ts != NULL)
{
- BIF_selectTransformOrientationValue(C, V3D_MANIP_CUSTOM + index);
+ BIF_selectTransformOrientation(C, ts);
}
}
-int manageObjectSpace(bContext *C, int confirm, int set) {
+TransformOrientation *createObjectSpace(bContext *C, ReportList *reports, char *name, int overwrite) {
Base *base = CTX_data_active_base(C);
+ Object *ob;
+ float mat[3][3];
if (base == NULL)
- return -1;
-
-//XXX if (confirm == 0) {
-// if (set && pupmenu("Custom Orientation %t|Add and Use Active Object%x1") != 1) {
-// return -1;
-// }
-// else if (set == 0 && pupmenu("Custom Orientation %t|Add Active Object%x1") != 1) {
-// return -1;
-// }
-// }
-
- return addObjectSpace(C, base->object);
-}
+ return NULL;
+
+
+ ob = base->object;
+
+ Mat3CpyMat4(mat, ob->obmat);
+ Mat3Ortho(mat);
-/* return 1 on confirm */
-int confirmSpace(int set, char text[])
+ /* use object name if no name is given */
+ if (name[0] == 0)
{
- char menu[64];
-
- if (set) {
- sprintf(menu, "Custom Orientation %%t|Add and Use %s%%x1", text);
- }
- else {
- sprintf(menu, "Custom Orientation %%t|Add %s%%x1", text);
+ strncpy(name, ob->id.name+2, 35);
}
-//XXX if (pupmenu(menu) == 1) {
- return 1;
-// }
-// else {
-// return 0;
-// }
+ return addMatrixSpace(C, mat, name, overwrite);
}
-int manageBoneSpace(bContext *C, int confirm, int set) {
+TransformOrientation *createBoneSpace(bContext *C, ReportList *reports, char *name, int overwrite) {
float mat[3][3];
float normal[3], plane[3];
- char name[36] = "";
- int index;
getTransformOrientation(C, normal, plane, 0);
- if (confirm == 0 && confirmSpace(set, "Bone") == 0) {
- return -1;
- }
-
if (createSpaceNormalTangent(mat, normal, plane) == 0) {
-//XXX error("Cannot use zero-length bone");
- return -1;
+ BKE_reports_prepend(reports, "Cannot use zero-length bone");
+ return NULL;
}
+ if (name[0] == 0)
+ {
strcpy(name, "Bone");
+ }
- /* Input name */
-//XXX sbutton(name, 1, 35, "name: ");
-
- index = addMatrixSpace(C, mat, name);
- return index;
+ return addMatrixSpace(C, mat, name, overwrite);
}
-int manageMeshSpace(bContext *C, int confirm, int set) {
+TransformOrientation *createMeshSpace(bContext *C, ReportList *reports, char *name, int overwrite) {
float mat[3][3];
float normal[3], plane[3];
- char name[36] = "";
- int index;
int type;
type = getTransformOrientation(C, normal, plane, 0);
@@ -177,51 +202,44 @@ int manageMeshSpace(bContext *C, int confirm, int set) {
switch (type)
{
case ORIENTATION_VERT:
- if (confirm == 0 && confirmSpace(set, "vertex") == 0) {
- return -1;
- }
-
if (createSpaceNormal(mat, normal) == 0) {
-// XXX error("Cannot use vertex with zero-length normal");
- return -1;
+ BKE_reports_prepend(reports, "Cannot use vertex with zero-length normal");
+ return NULL;
}
+ if (name[0] == 0)
+ {
strcpy(name, "Vertex");
+ }
break;
case ORIENTATION_EDGE:
- if (confirm == 0 && confirmSpace(set, "Edge") == 0) {
- return -1;
- }
-
if (createSpaceNormalTangent(mat, normal, plane) == 0) {
-// XXX error("Cannot use zero-length edge");
- return -1;
+ BKE_reports_prepend(reports, "Cannot use zero-length edge");
+ return NULL;
}
+ if (name[0] == 0)
+ {
strcpy(name, "Edge");
+ }
break;
case ORIENTATION_FACE:
- if (confirm == 0 && confirmSpace(set, "Face") == 0) {
- return -1;
- }
-
if (createSpaceNormalTangent(mat, normal, plane) == 0) {
-// XXX error("Cannot use zero-area face");
- return -1;
+ BKE_reports_prepend(reports, "Cannot use zero-area face");
+ return NULL;
}
+ if (name[0] == 0)
+ {
strcpy(name, "Face");
+ }
break;
default:
- return -1;
+ return NULL;
break;
}
- /* Input name */
-//XXX sbutton(name, 1, 35, "name: ");
-
- index = addMatrixSpace(C, mat, name);
- return index;
+ return addMatrixSpace(C, mat, name, overwrite);
}
int createSpaceNormal(float mat[3][3], float normal[3])
@@ -272,32 +290,17 @@ int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3])
return 1;
}
-
-int addObjectSpace(bContext *C, Object *ob) {
- float mat[3][3];
- char name[36] = "";
-
- Mat3CpyMat4(mat, ob->obmat);
- Mat3Ortho(mat);
-
- strncpy(name, ob->id.name+2, 35);
-
- /* Input name */
-//XXX sbutton(name, 1, 35, "name: ");
-
- return addMatrixSpace(C, mat, name);
-}
-
-int addMatrixSpace(bContext *C, float mat[3][3], char name[]) {
+TransformOrientation* addMatrixSpace(bContext *C, float mat[3][3], char name[], int overwrite) {
ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
- TransformOrientation *ts;
- int index = 0;
+ TransformOrientation *ts = NULL;
- /* if name is found in list, reuse that transform space */
- for (index = 0, ts = transform_spaces->first; ts; ts = ts->next, index++) {
- if (strncmp(ts->name, name, 35) == 0) {
- break;
+ if (overwrite)
+ {
+ ts = findOrientationName(C, name);
}
+ else
+ {
+ uniqueOrientationName(C, name);
}
/* if not, create a new one */
@@ -311,31 +314,61 @@ int addMatrixSpace(bContext *C, float mat[3][3], char name[]) {
/* copy matrix into transform space */
Mat3CpyMat3(ts->mat, mat);
- ED_undo_push(C, "Add/Update Transform Orientation");
-
- return index;
+ return ts;
}
void BIF_removeTransformOrientation(bContext *C, TransformOrientation *target) {
ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
TransformOrientation *ts = transform_spaces->first;
- //int selected_index = (G.vd->twmode - V3D_MANIP_CUSTOM);
int i;
for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) {
if (ts == target) {
+ View3D *v3d = CTX_wm_view3d(C);
+ if(v3d) {
+ int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
+
// Transform_fix_me NEED TO DO THIS FOR ALL VIEW3D
-// if (selected_index == i) {
-// G.vd->twmode = V3D_MANIP_GLOBAL; /* fallback to global */
-// }
-// else if (selected_index > i)
-// G.vd->twmode--;
+ if (selected_index == i) {
+ v3d->twmode = V3D_MANIP_GLOBAL; /* fallback to global */
+ }
+ else if (selected_index > i) {
+ v3d->twmode--;
+ }
+
+ }
+
+ BLI_freelinkN(transform_spaces, ts);
+ break;
+ }
+ }
+}
+
+void BIF_removeTransformOrientationIndex(bContext *C, int index) {
+ ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
+ TransformOrientation *ts = transform_spaces->first;
+ int i;
+
+ for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) {
+ if (i == index) {
+ View3D *v3d = CTX_wm_view3d(C);
+ if(v3d) {
+ int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
+
+ // Transform_fix_me NEED TO DO THIS FOR ALL VIEW3D
+ if (selected_index == i) {
+ v3d->twmode = V3D_MANIP_GLOBAL; /* fallback to global */
+ }
+ else if (selected_index > i) {
+ v3d->twmode--;
+ }
+
+ }
BLI_freelinkN(transform_spaces, ts);
break;
}
}
- ED_undo_push(C, "Remove Transform Orientation");
}
void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) {
@@ -354,6 +387,7 @@ void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) {
void BIF_selectTransformOrientationValue(bContext *C, int orientation) {
View3D *v3d = CTX_wm_view3d(C);
+ if(v3d) /* currently using generic poll */
v3d->twmode = orientation;
}
@@ -433,7 +467,7 @@ int BIF_countTransformOrientation(const bContext *C) {
return count;
}
-void applyTransformOrientation(const bContext *C, TransInfo *t) {
+void applyTransformOrientation(const bContext *C, float mat[3][3], char *name) {
TransformOrientation *ts;
View3D *v3d = CTX_wm_view3d(C);
int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
@@ -442,8 +476,11 @@ void applyTransformOrientation(const bContext *C, TransInfo *t) {
if (selected_index >= 0) {
for (i = 0, ts = CTX_data_scene(C)->transform_spaces.first; ts; ts = ts->next, i++) {
if (selected_index == i) {
- strcpy(t->spacename, ts->name);
- Mat3CpyMat3(t->spacemtx, ts->mat);
+
+ if (name)
+ strcpy(name, ts->name);
+
+ Mat3CpyMat3(mat, ts->mat);
break;
}
}
@@ -558,7 +595,7 @@ void initTransformOrientation(bContext *C, TransInfo *t)
}
break;
default: /* V3D_MANIP_CUSTOM */
- applyTransformOrientation(C, t);
+ applyTransformOrientation(C, t->spacemtx, t->spacename);
break;
}
}
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 575e8f2150a..a2a7577c8d6 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -117,7 +117,7 @@ int BIF_snappingSupported(Object *obedit)
{
int status = 0;
- if (obedit == NULL || ELEM(obedit->type, OB_MESH, OB_ARMATURE)) /* only support object mesh or armature */
+ if (obedit == NULL || ELEM3(obedit->type, OB_MESH, OB_ARMATURE, OB_CURVE)) /* only support object mesh, armature, curves */
{
status = 1;
}
@@ -219,8 +219,69 @@ int handleSnapping(TransInfo *t, wmEvent *event)
return status;
}
+void applyProject(TransInfo *t)
+{
+ /* XXX FLICKER IN OBJECT MODE */
+ if ((t->tsnap.project) && (t->tsnap.status & SNAP_ON) && (t->modifiers & MOD_SNAP_GEARS))
+ {
+ TransData *td = t->data;
+ float tvec[3];
+ float imat[4][4];
+ int i;
+
+ if(t->flag & (T_EDIT|T_POSE)) {
+ Object *ob = t->obedit?t->obedit:t->poseobj;
+ Mat4Invert(imat, ob->obmat);
+ }
+
+ for(i = 0 ; i < t->total; i++, td++) {
+ float iloc[3], loc[3], no[3];
+ float mval[2];
+ int dist = 1000;
+
+ if (td->flag & TD_NOACTION)
+ break;
+
+ if (td->flag & TD_SKIP)
+ continue;
+
+ VECCOPY(iloc, td->loc);
+ if (t->flag & (T_EDIT|T_POSE))
+ {
+ Object *ob = t->obedit?t->obedit:t->poseobj;
+ Mat4MulVecfl(ob->obmat, iloc);
+ }
+ else if (t->flag & T_OBJECT)
+ {
+ VECCOPY(iloc, td->ob->obmat[3]);
+ }
+
+ project_float(t->ar, iloc, mval);
+
+ if (snapObjectsTransform(t, mval, &dist, loc, no, t->tsnap.mode))
+ {
+// if(t->flag & (T_EDIT|T_POSE)) {
+// Mat4MulVecfl(imat, loc);
+// }
+//
+ VecSubf(tvec, loc, iloc);
+
+ Mat3MulVecfl(td->smtx, tvec);
+
+ VecAddf(td->loc, td->loc, tvec);
+ }
+
+ //XXX constraintTransLim(t, td);
+ }
+ }
+}
+
void applySnapping(TransInfo *t, float *vec)
{
+ /* project is not applied this way */
+ if (t->tsnap.project)
+ return;
+
if (t->tsnap.status & SNAP_FORCED)
{
t->tsnap.targetSnap(t);
@@ -307,12 +368,24 @@ void initSnapping(TransInfo *t, wmOperator *op)
RNA_float_get_array(op->ptr, "snap_normal", t->tsnap.snapNormal);
Normalize(t->tsnap.snapNormal);
}
+
+ if (RNA_struct_find_property(op->ptr, "snap_project"))
+ {
+ t->tsnap.project = RNA_boolean_get(op->ptr, "snap_project");
}
}
+ }
else
{
snapping = ((ts->snap_flag & SCE_SNAP) == SCE_SNAP);
t->tsnap.align = ((t->settings->snap_flag & SCE_SNAP_ROTATE) == SCE_SNAP_ROTATE);
+ t->tsnap.project = ((t->settings->snap_flag & SCE_SNAP_PROJECT) == SCE_SNAP_PROJECT);
+ }
+
+ /* force project off when not supported */
+ if (ts->snap_mode != SCE_SNAP_MODE_FACE)
+ {
+ t->tsnap.project = 0;
}
if ((t->spacetype == SPACE_VIEW3D || t->spacetype == SPACE_IMAGE) && // Only 3D view or UV
@@ -322,7 +395,7 @@ void initSnapping(TransInfo *t, wmOperator *op)
/* Edit mode */
if (t->tsnap.applySnap != NULL && // A snapping function actually exist
(snapping) && // Only if the snap flag is on
- (obedit != NULL && ELEM(obedit->type, OB_MESH, OB_ARMATURE)) ) // Temporary limited to edit mode meshes or armature
+ (obedit != NULL && ELEM3(obedit->type, OB_MESH, OB_ARMATURE, OB_CURVE)) ) // Temporary limited to edit mode meshes, armature, curves
{
t->tsnap.status |= SNAP_ON;
t->tsnap.modePoint = SNAP_GEO;
@@ -539,9 +612,12 @@ void CalcSnapGeometry(TransInfo *t, float *vec)
{
float loc[3];
float no[3];
+ float mval[2];
int found = 0;
int dist = SNAP_MIN_DISTANCE; // Use a user defined value here
- SnapMode mode;
+
+ mval[0] = t->mval[0];
+ mval[1] = t->mval[1];
if (t->settings->snap_mode == SCE_SNAP_MODE_VOLUME)
{
@@ -553,7 +629,7 @@ void CalcSnapGeometry(TransInfo *t, float *vec)
depth_peels.first = depth_peels.last = NULL;
- peelObjectsTransForm(t, &depth_peels, t->mval);
+ peelObjectsTransForm(t, &depth_peels, mval);
// if (LAST_SNAP_POINT_VALID)
// {
@@ -636,18 +712,9 @@ void CalcSnapGeometry(TransInfo *t, float *vec)
}
else
{
- if (t->obedit == NULL)
- {
- mode = SNAP_NOT_SELECTED;
- }
- else
- {
- mode = SNAP_NOT_OBEDIT;
+ found = snapObjectsTransform(t, mval, &dist, loc, no, t->tsnap.mode);
}
- found = snapObjectsTransform(t, t->mval, &dist, loc, no, mode);
- }
-
if (found == 1)
{
float tangent[3];
@@ -866,7 +933,7 @@ void TargetSnapClosest(TransInfo *t)
}
/*================================================================*/
-int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], float *v4co, short mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth)
+int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], float *v4co, float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth)
{
float lambda;
int result;
@@ -897,7 +964,7 @@ int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], float *v4
new_depth = VecLenf(location, ray_start);
project_int(ar, location, screen_loc);
- new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]);
+ new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]);
if (new_dist <= *dist && new_depth < *depth)
{
@@ -917,7 +984,7 @@ int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], float *v4
return retval;
}
-int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], short v2no[3], short mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth)
+int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], short v2no[3], float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth)
{
float intersect[3] = {0, 0, 0}, ray_end[3], dvec[3];
int result;
@@ -965,7 +1032,7 @@ int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], short v2n
new_depth = VecLenf(location, ray_start);
project_int(ar, location, screen_loc);
- new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]);
+ new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]);
/* 10% threshold if edge is closer but a bit further
* this takes care of series of connected edges a bit slanted w.r.t the viewport
@@ -1002,7 +1069,7 @@ int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], short v2n
return retval;
}
-int snapVertex(ARegion *ar, float vco[3], short vno[3], short mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth)
+int snapVertex(ARegion *ar, float vco[3], short vno[3], float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth)
{
int retval = 0;
float dvec[3];
@@ -1023,7 +1090,7 @@ int snapVertex(ARegion *ar, float vco[3], short vno[3], short mval[2], float ray
new_depth = VecLenf(location, ray_start);
project_int(ar, location, screen_loc);
- new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]);
+ new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]);
if (new_dist <= *dist && new_depth < *depth)
{
@@ -1046,7 +1113,7 @@ int snapVertex(ARegion *ar, float vco[3], short vno[3], short mval[2], float ray
return retval;
}
-int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm, float obmat[][4], float ray_start[3], float ray_normal[3], short mval[2], float *loc, float *no, int *dist, float *depth)
+int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *no, int *dist, float *depth)
{
float imat[4][4];
float ray_start_local[3], ray_normal_local[3];
@@ -1358,7 +1425,7 @@ int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh *dm, B
return retval;
}
-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)
+int snapObject(Scene *scene, ARegion *ar, Object *ob, int editobject, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *no, int *dist, float *depth)
{
ToolSettings *ts= scene->toolsettings;
int retval = 0;
@@ -1390,7 +1457,7 @@ int snapObject(Scene *scene, ARegion *ar, Object *ob, int editobject, float obma
return retval;
}
-int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, short mval[2], int *dist, float *loc, float *no, SnapMode mode) {
+int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, float mval[2], int *dist, float *loc, float *no, SnapMode mode) {
Base *base;
float depth = FLT_MAX;
int retval = 0;
@@ -1407,7 +1474,7 @@ int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, short mv
base= FIRSTBASE;
for ( base = FIRSTBASE; base != NULL; base = base->next ) {
- if ( BASE_SELECTABLE(v3d, base) && (base->flag & (BA_HAS_RECALC_OB|BA_HAS_RECALC_DATA)) == 0 && ((mode == SNAP_NOT_SELECTED && (base->flag & (SELECT|BA_WAS_SEL)) == 0) || (mode == SNAP_NOT_OBEDIT && base != BASACT)) ) {
+ if ( BASE_SELECTABLE(v3d, base) && (base->flag & (BA_HAS_RECALC_OB|BA_HAS_RECALC_DATA)) == 0 && ((mode == SNAP_NOT_SELECTED && (base->flag & (SELECT|BA_WAS_SEL)) == 0) || (ELEM(mode, SNAP_ALL, SNAP_NOT_OBEDIT) && base != BASACT)) ) {
Object *ob = base->object;
if (ob->transflag & OB_DUPLI)
@@ -1432,12 +1499,12 @@ int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, short mv
return retval;
}
-int snapObjectsTransform(TransInfo *t, short mval[2], int *dist, float *loc, float *no, SnapMode mode)
+int snapObjectsTransform(TransInfo *t, float mval[2], int *dist, float *loc, float *no, SnapMode mode)
{
return snapObjects(t->scene, t->view, t->ar, t->obedit, mval, dist, loc, no, mode);
}
-int snapObjectsContext(bContext *C, short mval[2], int *dist, float *loc, float *no, SnapMode mode)
+int snapObjectsContext(bContext *C, float mval[2], int *dist, float *loc, float *no, SnapMode mode)
{
ScrArea *sa = CTX_wm_area(C);
View3D *v3d = sa->spacedata.first;
@@ -1502,7 +1569,7 @@ void addDepthPeel(ListBase *depth_peels, float depth, float p[3], float no[3], O
peel->flag = 0;
}
-int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_start[3], float ray_normal[3], short mval[2], ListBase *depth_peels)
+int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], ListBase *depth_peels)
{
int retval = 0;
int totvert = dm->getNumVerts(dm);
@@ -1610,7 +1677,7 @@ int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta
return retval;
}
-int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, ListBase *depth_peels, short mval[2])
+int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, ListBase *depth_peels, float mval[2])
{
Base *base;
int retval = 0;
@@ -1693,12 +1760,12 @@ int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, ListBase
return retval;
}
-int peelObjectsTransForm(TransInfo *t, ListBase *depth_peels, short mval[2])
+int peelObjectsTransForm(TransInfo *t, ListBase *depth_peels, float mval[2])
{
return peelObjects(t->scene, t->view, t->ar, t->obedit, depth_peels, mval);
}
-int peelObjectsContext(bContext *C, ListBase *depth_peels, short mval[2])
+int peelObjectsContext(bContext *C, ListBase *depth_peels, float mval[2])
{
ScrArea *sa = CTX_wm_area(C);
View3D *v3d = sa->spacedata.first;
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index c011e6e63de..f48f8441d53 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -295,17 +295,17 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
if(efa->v4) {
#if 0 /* Simple but slow, better reuse normalized vectors */
- uvang1 = VecAngle3_2D(tf_uv[3], tf_uv[0], tf_uv[1]);
- ang1 = VecAngle3(efa->v4->co, efa->v1->co, efa->v2->co);
+ uvang1 = RAD2DEG(Vec2Angle3(tf_uv[3], tf_uv[0], tf_uv[1]));
+ ang1 = RAD2DEG(VecAngle3(efa->v4->co, efa->v1->co, efa->v2->co));
- uvang2 = VecAngle3_2D(tf_uv[0], tf_uv[1], tf_uv[2]);
- ang2 = VecAngle3(efa->v1->co, efa->v2->co, efa->v3->co);
+ uvang2 = RAD2DEG(Vec2Angle3(tf_uv[0], tf_uv[1], tf_uv[2]));
+ ang2 = RAD2DEG(VecAngle3(efa->v1->co, efa->v2->co, efa->v3->co));
- uvang3 = VecAngle3_2D(tf_uv[1], tf_uv[2], tf_uv[3]);
- ang3 = VecAngle3(efa->v2->co, efa->v3->co, efa->v4->co);
+ uvang3 = RAD2DEG(Vec2Angle3(tf_uv[1], tf_uv[2], tf_uv[3]));
+ ang3 = RAD2DEG(VecAngle3(efa->v2->co, efa->v3->co, efa->v4->co));
- uvang4 = VecAngle3_2D(tf_uv[2], tf_uv[3], tf_uv[0]);
- ang4 = VecAngle3(efa->v3->co, efa->v4->co, efa->v1->co);
+ uvang4 = RAD2DEG(Vec2Angle3(tf_uv[2], tf_uv[3], tf_uv[0]));
+ ang4 = RAD2DEG(VecAngle3(efa->v3->co, efa->v4->co, efa->v1->co));
#endif
/* uv angles */
@@ -359,14 +359,14 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
}
else {
#if 0 /* Simple but slow, better reuse normalized vectors */
- uvang1 = VecAngle3_2D(tf_uv[2], tf_uv[0], tf_uv[1]);
- ang1 = VecAngle3(efa->v3->co, efa->v1->co, efa->v2->co);
+ uvang1 = RAD2DEG(Vec2Angle3(tf_uv[2], tf_uv[0], tf_uv[1]));
+ ang1 = RAD2DEG(VecAngle3(efa->v3->co, efa->v1->co, efa->v2->co));
- uvang2 = VecAngle3_2D(tf_uv[0], tf_uv[1], tf_uv[2]);
- ang2 = VecAngle3(efa->v1->co, efa->v2->co, efa->v3->co);
+ uvang2 = RAD2DEG(Vec2Angle3(tf_uv[0], tf_uv[1], tf_uv[2]));
+ ang2 = RAD2DEG(VecAngle3(efa->v1->co, efa->v2->co, efa->v3->co));
- uvang3 = 180-(uvang1+uvang2);
- ang3 = 180-(ang1+ang2);
+ uvang3 = M_PI-(uvang1+uvang2);
+ ang3 = M_PI-(ang1+ang2);
#endif
/* uv angles */
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 108cfdb7ee1..df418e60254 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -60,6 +60,7 @@
#include "ED_image.h"
#include "ED_mesh.h"
+#include "ED_object.h"
#include "ED_screen.h"
#include "ED_transform.h"
@@ -3119,9 +3120,12 @@ void ED_operatortypes_uvedit(void)
WM_operatortype_append(UV_OT_tile_set);
}
-void ED_keymap_uvedit(wmWindowManager *wm)
+void ED_keymap_uvedit(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "UVEdit", 0, 0);
+ wmKeyMap *keymap;
+
+ keymap= WM_keymap_find(keyconf, "UVEdit", 0, 0);
+ keymap->poll= ED_operator_uvedit;
/* pick selection */
WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
@@ -3161,6 +3165,8 @@ void ED_keymap_uvedit(wmWindowManager *wm)
WM_keymap_add_item(keymap, "UV_OT_cursor_set", ACTIONMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "UV_OT_tile_set", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0);
- transform_keymap_for_space(wm, keymap, SPACE_IMAGE);
+ ED_object_generic_keymap(keyconf, keymap, TRUE);
+
+ transform_keymap_for_space(keyconf, keymap, SPACE_IMAGE);
}
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index e2005c73ace..f1041603bed 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -379,7 +379,7 @@ static int minimize_stretch_invoke(bContext *C, wmOperator *op, wmEvent *event)
minimize_stretch_iteration(C, op, 1);
ms= op->customdata;
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
ms->timer= WM_event_add_window_timer(CTX_wm_window(C), TIMER, 0.01f);
return OPERATOR_RUNNING_MODAL;
@@ -460,7 +460,7 @@ void UV_OT_minimize_stretch(wmOperatorType *ot)
/* properties */
RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes", "Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry.");
- RNA_def_float_percentage(ot->srna, "blend", 0.0f, 0.0f, 1.0f, "Blend", "Blend factor between stretch minimized and original.", 0.0f, 1.0f);
+ RNA_def_float_factor(ot->srna, "blend", 0.0f, 0.0f, 1.0f, "Blend", "Blend factor between stretch minimized and original.", 0.0f, 1.0f);
RNA_def_int(ot->srna, "iterations", 0, 0, INT_MAX, "Iterations", "Number of iterations to run, 0 is unlimited when run interactively.", 0, 100);
}
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index c0fb069fc41..d01266c8765 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -846,37 +846,35 @@ static void texture_rgb_blend(GPUMaterial *mat, GPUNodeLink *tex, GPUNodeLink *o
}
}
-static void texture_value_blend(GPUMaterial *mat, GPUNodeLink *tex, GPUNodeLink *out, GPUNodeLink *fact, GPUNodeLink *facg, int blendtype, int flip, GPUNodeLink **in)
+static void texture_value_blend(GPUMaterial *mat, GPUNodeLink *tex, GPUNodeLink *out, GPUNodeLink *fact, GPUNodeLink *facg, int blendtype, GPUNodeLink **in)
{
- float flipf = (flip)? 1.0f: 0.0;
-
switch(blendtype) {
case MTEX_BLEND:
- GPU_link(mat, "mtex_value_blend", out, tex, fact, facg, GPU_uniform(&flipf), in);
+ GPU_link(mat, "mtex_value_blend", out, tex, fact, facg, in);
break;
case MTEX_MUL:
- GPU_link(mat, "mtex_value_mul", out, tex, fact, facg, GPU_uniform(&flipf), in);
+ GPU_link(mat, "mtex_value_mul", out, tex, fact, facg, in);
break;
case MTEX_SCREEN:
- GPU_link(mat, "mtex_value_screen", out, tex, fact, facg, GPU_uniform(&flipf), in);
+ GPU_link(mat, "mtex_value_screen", out, tex, fact, facg, in);
break;
case MTEX_SUB:
- GPU_link(mat, "mtex_value_sub", out, tex, fact, facg, GPU_uniform(&flipf), in);
+ GPU_link(mat, "mtex_value_sub", out, tex, fact, facg, in);
break;
case MTEX_ADD:
- GPU_link(mat, "mtex_value_add", out, tex, fact, facg, GPU_uniform(&flipf), in);
+ GPU_link(mat, "mtex_value_add", out, tex, fact, facg, in);
break;
case MTEX_DIV:
- GPU_link(mat, "mtex_value_div", out, tex, fact, facg, GPU_uniform(&flipf), in);
+ GPU_link(mat, "mtex_value_div", out, tex, fact, facg, in);
break;
case MTEX_DIFF:
- GPU_link(mat, "mtex_value_diff", out, tex, fact, facg, GPU_uniform(&flipf), in);
+ GPU_link(mat, "mtex_value_diff", out, tex, fact, facg, in);
break;
case MTEX_DARK:
- GPU_link(mat, "mtex_value_dark", out, tex, fact, facg, GPU_uniform(&flipf), in);
+ GPU_link(mat, "mtex_value_dark", out, tex, fact, facg, in);
break;
case MTEX_LIGHT:
- GPU_link(mat, "mtex_value_light", out, tex, fact, facg, GPU_uniform(&flipf), in);
+ GPU_link(mat, "mtex_value_light", out, tex, fact, facg, in);
break;
default:
GPU_link(mat, "set_value_zero", &in);
@@ -893,7 +891,7 @@ static void do_material_tex(GPUShadeInput *shi)
GPUNodeLink *texco, *tin, *trgb, *tnor, *tcol, *stencil, *tnorfac;
GPUNodeLink *texco_norm, *texco_orco, *texco_object, *texco_tangent;
GPUNodeLink *texco_global, *texco_uv = NULL;
- GPUNodeLink *colfac, *newnor, *varfac, *orn;
+ GPUNodeLink *newnor, *orn;
char *lastuvname = NULL;
float one = 1.0f, norfac, ofs[3];
int tex_nr, rgbnor, talpha;
@@ -993,11 +991,6 @@ static void do_material_tex(GPUShadeInput *shi)
/* mapping */
if(mtex->mapto & (MAP_COL+MAP_COLSPEC)) {
/* stencil maps on the texture control slider, not texture intensity value */
- if(mtex->colfac == 1.0f)
- colfac = stencil;
- else
- GPU_link(mat, "math_multiply", GPU_uniform(&mtex->colfac), stencil, &colfac);
-
if((rgbnor & TEX_RGB)==0) {
GPU_link(mat, "set_rgb", GPU_uniform(&mtex->r), &tcol);
}
@@ -1012,21 +1005,30 @@ static void do_material_tex(GPUShadeInput *shi)
GPU_link(mat, "set_value_one", &tin);
}
- if(mtex->mapto & MAP_COL)
+ if(mtex->mapto & MAP_COL) {
+ GPUNodeLink *colfac;
+
+ if(mtex->colfac == 1.0f) colfac = stencil;
+ else GPU_link(mat, "math_multiply", GPU_uniform(&mtex->colfac), stencil, &colfac);
+
texture_rgb_blend(mat, tcol, shi->rgb, tin, colfac, mtex->blendtype, &shi->rgb);
+ }
- if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && (mtex->mapto & MAP_COLSPEC))
- texture_rgb_blend(mat, tcol, shi->specrgb, tin, colfac, mtex->blendtype, &shi->specrgb);
+ if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && (mtex->mapto & MAP_COLSPEC)) {
+ GPUNodeLink *colspecfac;
+
+ if(mtex->colspecfac == 1.0f) colspecfac = stencil;
+ else GPU_link(mat, "math_multiply", GPU_uniform(&mtex->colspecfac), stencil, &colspecfac);
+
+ texture_rgb_blend(mat, tcol, shi->specrgb, tin, colspecfac, mtex->blendtype, &shi->specrgb);
+ }
}
if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && (mtex->mapto & MAP_NORM)) {
- if(mtex->maptoneg & MAP_NORM) tex->norfac= -mtex->norfac;
- else tex->norfac= mtex->norfac;
-
if((tex->type==TEX_IMAGE) && (tex->imaflag & TEX_NORMALMAP)) {
tex->norfac = mtex->norfac;
- if(mtex->maptoneg & MAP_NORM)
+ if(tex->norfac < 0.0f)
GPU_link(mat, "mtex_negate_texnormal", tnor, &tnor);
if(mtex->normapspace == MTEX_NSPACE_TANGENT)
@@ -1034,7 +1036,7 @@ static void do_material_tex(GPUShadeInput *shi)
else
newnor = tnor;
- norfac = MIN2(mtex->norfac, 1.0);
+ norfac = MIN2(fabsf(mtex->norfac), 1.0);
if(norfac == 1.0f && !GPU_link_changed(stencil)) {
shi->vn = newnor;
}
@@ -1053,11 +1055,6 @@ static void do_material_tex(GPUShadeInput *shi)
}
if((mtex->mapto & MAP_VARS)) {
- if(mtex->varfac == 1.0f)
- varfac = stencil;
- else
- GPU_link(mat, "math_multiply", GPU_uniform(&mtex->varfac), stencil, &varfac);
-
if(rgbnor & TEX_RGB) {
if(talpha)
GPU_link(mat, "mtex_alpha_from_col", trgb, &tin);
@@ -1066,34 +1063,58 @@ static void do_material_tex(GPUShadeInput *shi)
}
if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_REF) {
- int flip= mtex->maptoneg & MAP_REF;
- texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->refl, tin, varfac, mtex->blendtype, flip, &shi->refl);
+ GPUNodeLink *difffac;
+
+ if(mtex->difffac == 1.0f) difffac = stencil;
+ else GPU_link(mat, "math_multiply", GPU_uniform(&mtex->difffac), stencil, &difffac);
+
+ texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->refl, tin, difffac, mtex->blendtype, &shi->refl);
GPU_link(mat, "mtex_value_clamp_positive", shi->refl, &shi->refl);
}
if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_SPEC) {
- int flip= mtex->maptoneg & MAP_SPEC;
- texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->spec, tin, varfac, mtex->blendtype, flip, &shi->spec);
+ GPUNodeLink *specfac;
+
+ if(mtex->specfac == 1.0f) specfac = stencil;
+ else GPU_link(mat, "math_multiply", GPU_uniform(&mtex->specfac), stencil, &specfac);
+
+ texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->spec, tin, specfac, mtex->blendtype, &shi->spec);
GPU_link(mat, "mtex_value_clamp_positive", shi->spec, &shi->spec);
}
if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_EMIT) {
- int flip= mtex->maptoneg & MAP_EMIT;
- texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->emit, tin, varfac, mtex->blendtype, flip, &shi->emit);
+ GPUNodeLink *emitfac;
+
+ if(mtex->emitfac == 1.0f) emitfac = stencil;
+ else GPU_link(mat, "math_multiply", GPU_uniform(&mtex->emitfac), stencil, &emitfac);
+
+ texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->emit, tin, emitfac, mtex->blendtype, &shi->emit);
GPU_link(mat, "mtex_value_clamp_positive", shi->emit, &shi->emit);
}
if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_HAR) {
- int flip= mtex->maptoneg & MAP_HAR;
+ GPUNodeLink *hardfac;
+
+ if(mtex->hardfac == 1.0f) hardfac = stencil;
+ else GPU_link(mat, "math_multiply", GPU_uniform(&mtex->hardfac), stencil, &hardfac);
+
GPU_link(mat, "mtex_har_divide", shi->har, &shi->har);
- texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->har, tin, varfac, mtex->blendtype, flip, &shi->har);
+ texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->har, tin, hardfac, mtex->blendtype, &shi->har);
GPU_link(mat, "mtex_har_multiply_clamp", shi->har, &shi->har);
}
if(mtex->mapto & MAP_ALPHA) {
- int flip= mtex->maptoneg & MAP_ALPHA;
- texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->alpha, tin, varfac, mtex->blendtype, flip, &shi->alpha);
+ GPUNodeLink *alphafac;
+
+ if(mtex->alphafac == 1.0f) alphafac = stencil;
+ else GPU_link(mat, "math_multiply", GPU_uniform(&mtex->alphafac), stencil, &alphafac);
+
+ texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->alpha, tin, alphafac, mtex->blendtype, &shi->alpha);
GPU_link(mat, "mtex_value_clamp", shi->alpha, &shi->alpha);
}
if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_AMB) {
- int flip= mtex->maptoneg & MAP_AMB;
- texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->amb, tin, varfac, mtex->blendtype, flip, &shi->amb);
+ GPUNodeLink *ambfac;
+
+ if(mtex->ambfac == 1.0f) ambfac = stencil;
+ else GPU_link(mat, "math_multiply", GPU_uniform(&mtex->ambfac), stencil, &ambfac);
+
+ texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->amb, tin, ambfac, mtex->blendtype, &shi->amb);
GPU_link(mat, "mtex_value_clamp", shi->amb, &shi->amb);
}
}
diff --git a/source/blender/gpu/intern/gpu_shader_material.glsl b/source/blender/gpu/intern/gpu_shader_material.glsl
index 16ed38cb47d..0d7e00a541b 100644
--- a/source/blender/gpu/intern/gpu_shader_material.glsl
+++ b/source/blender/gpu/intern/gpu_shader_material.glsl
@@ -847,66 +847,66 @@ void mtex_rgb_color(vec3 outcol, vec3 texcol, float fact, float facg, out vec3 i
incol.rgb = col.rgb;
}
-void mtex_value_vars(inout float fact, float facg, out float facm, float flip)
+void mtex_value_vars(inout float fact, float facg, out float facm)
{
- fact *= facg;
+ fact *= abs(facg);
facm = 1.0-fact;
- if(flip != 0.0) {
+ if(facg < 0.0) {
float tmp = fact;
fact = facm;
facm = tmp;
}
}
-void mtex_value_blend(float outcol, float texcol, float fact, float facg, float flip, out float incol)
+void mtex_value_blend(float outcol, float texcol, float fact, float facg, out float incol)
{
float facm;
- mtex_value_vars(fact, facg, facm, flip);
+ mtex_value_vars(fact, facg, facm);
incol = fact*texcol + facm*outcol;
}
-void mtex_value_mul(float outcol, float texcol, float fact, float facg, float flip, out float incol)
+void mtex_value_mul(float outcol, float texcol, float fact, float facg, out float incol)
{
float facm;
- mtex_value_vars(fact, facg, facm, flip);
+ mtex_value_vars(fact, facg, facm);
facm = 1.0 - facg;
incol = (facm + fact*texcol)*outcol;
}
-void mtex_value_screen(float outcol, float texcol, float fact, float facg, float flip, out float incol)
+void mtex_value_screen(float outcol, float texcol, float fact, float facg, out float incol)
{
float facm;
- mtex_value_vars(fact, facg, facm, flip);
+ mtex_value_vars(fact, facg, facm);
facm = 1.0 - facg;
incol = 1.0 - (facm + fact*(1.0 - texcol))*(1.0 - outcol);
}
-void mtex_value_sub(float outcol, float texcol, float fact, float facg, float flip, out float incol)
+void mtex_value_sub(float outcol, float texcol, float fact, float facg, out float incol)
{
float facm;
- mtex_value_vars(fact, facg, facm, flip);
+ mtex_value_vars(fact, facg, facm);
fact = -fact;
incol = fact*texcol + outcol;
}
-void mtex_value_add(float outcol, float texcol, float fact, float facg, float flip, out float incol)
+void mtex_value_add(float outcol, float texcol, float fact, float facg, out float incol)
{
float facm;
- mtex_value_vars(fact, facg, facm, flip);
+ mtex_value_vars(fact, facg, facm);
fact = fact;
incol = fact*texcol + outcol;
}
-void mtex_value_div(float outcol, float texcol, float fact, float facg, float flip, out float incol)
+void mtex_value_div(float outcol, float texcol, float fact, float facg, out float incol)
{
float facm;
- mtex_value_vars(fact, facg, facm, flip);
+ mtex_value_vars(fact, facg, facm);
if(texcol != 0.0)
incol = facm*outcol + fact*outcol/texcol;
@@ -914,27 +914,27 @@ void mtex_value_div(float outcol, float texcol, float fact, float facg, float fl
incol = 0.0;
}
-void mtex_value_diff(float outcol, float texcol, float fact, float facg, float flip, out float incol)
+void mtex_value_diff(float outcol, float texcol, float fact, float facg, out float incol)
{
float facm;
- mtex_value_vars(fact, facg, facm, flip);
+ mtex_value_vars(fact, facg, facm);
incol = facm*outcol + fact*abs(texcol - outcol);
}
-void mtex_value_dark(float outcol, float texcol, float fact, float facg, float flip, out float incol)
+void mtex_value_dark(float outcol, float texcol, float fact, float facg, out float incol)
{
float facm;
- mtex_value_vars(fact, facg, facm, flip);
+ mtex_value_vars(fact, facg, facm);
float col = fact*texcol;
if(col < outcol) incol = col; else incol = outcol;
}
-void mtex_value_light(float outcol, float texcol, float fact, float facg, float flip, out float incol)
+void mtex_value_light(float outcol, float texcol, float fact, float facg, out float incol)
{
float facm;
- mtex_value_vars(fact, facg, facm, flip);
+ mtex_value_vars(fact, facg, facm);
float col = fact*texcol;
if(col > outcol) incol = col; else incol = outcol;
diff --git a/source/blender/ikplugin/BIK_api.h b/source/blender/ikplugin/BIK_api.h
new file mode 100644
index 00000000000..a259d0aa62a
--- /dev/null
+++ b/source/blender/ikplugin/BIK_api.h
@@ -0,0 +1,93 @@
+/**
+ * $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.
+ *
+ * Original author: Benoit Bolsee
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef BIK_API_H
+#define BIK_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct Object;
+struct bPoseChannel;
+struct bPose;
+struct bArmature;
+struct Scene;
+struct bConstraint;
+
+enum BIK_ParamType {
+ BIK_PARAM_TYPE_FLOAT = 0,
+ BIK_PARAM_TYPE_INT,
+ BIK_PARAM_TYPE_STRING,
+};
+
+struct BIK_ParamValue {
+ short type; /* BIK_PARAM_TYPE_.. */
+ short length; /* for string, does not include terminating 0 */
+ union {
+ float f[8];
+ int i[8];
+ char s[32];
+ } value;
+};
+typedef struct BIK_ParamValue BIK_ParamValue;
+
+void BIK_initialize_tree(struct Scene *scene, struct Object *ob, float ctime);
+void BIK_execute_tree(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime);
+void BIK_release_tree(struct Scene *scene, struct Object *ob, float ctime);
+void BIK_clear_data(struct bPose *pose);
+void BIK_clear_cache(struct bPose *pose);
+void BIK_update_param(struct bPose *pose);
+void BIK_test_constraint(struct Object *ob, struct bConstraint *cons);
+// not yet implemented
+int BIK_get_constraint_param(struct bPose *pose, struct bConstraint *cons, int id, BIK_ParamValue *value);
+int BIK_get_channel_param(struct bPose *pose, struct bPoseChannel *pchan, int id, BIK_ParamValue *value);
+int BIK_get_solver_param(struct bPose *pose, struct bPoseChannel *pchan, int id, BIK_ParamValue *value);
+
+// number of solver available
+// 0 = iksolver
+// 1 = iTaSC
+#define BIK_SOLVER_COUNT 2
+
+/* for use in BIK_get_constraint_param */
+#define BIK_PARAM_CONSTRAINT_ERROR 0
+
+/* for use in BIK_get_channel_param */
+#define BIK_PARAM_CHANNEL_JOINT 0
+
+/* for use in BIK_get_solver_param */
+#define BIK_PARAM_SOLVER_RANK 0
+#define BIK_PARAM_SOLVER_ITERATION 1
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // BIK_API_H
+
diff --git a/source/blender/ikplugin/CMakeLists.txt b/source/blender/ikplugin/CMakeLists.txt
new file mode 100644
index 00000000000..5790d4ef12f
--- /dev/null
+++ b/source/blender/ikplugin/CMakeLists.txt
@@ -0,0 +1,35 @@
+# $Id: CMakeLists.txt 20156 2009-05-11 16:31:30Z ben2610 $
+# ***** 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/*.c intern/*.cpp)
+
+SET(INC
+ ../../../intern/guardedalloc ../../../intern/iksolver/extern
+ ../../../intern/itasc ../../../extern/Eigen2
+ ../blenlib ../makesdna ../blenkernel ../include ../ikplugin
+)
+
+BLENDERLIB(bf_ikplugin "${SRC}" "${INC}")
diff --git a/source/blender/ikplugin/Makefile b/source/blender/ikplugin/Makefile
new file mode 100644
index 00000000000..370ed418464
--- /dev/null
+++ b/source/blender/ikplugin/Makefile
@@ -0,0 +1,31 @@
+# ***** 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/blender/ikplugin
+DIRS = intern
+
+include nan_subdirs.mk
diff --git a/source/blender/ikplugin/SConscript b/source/blender/ikplugin/SConscript
new file mode 100644
index 00000000000..a745a93077a
--- /dev/null
+++ b/source/blender/ikplugin/SConscript
@@ -0,0 +1,9 @@
+#!/usr/bin/python
+Import ('env')
+
+sources = env.Glob('intern/*.c') + env.Glob('intern/*.cpp')
+
+incs = '#/intern/guardedalloc #/intern/iksolver/extern ../makesdna ../blenlib'
+incs += ' ../blenkernel ../include ../ikplugin #/intern/itasc #/extern/Eigen2'
+
+env.BlenderLib ( 'bf_ikplugin', sources, Split(incs), [], libtype=['core','player'], priority=[180, 190] )
diff --git a/source/blender/ikplugin/intern/Makefile b/source/blender/ikplugin/intern/Makefile
new file mode 100644
index 00000000000..0c54e5d1264
--- /dev/null
+++ b/source/blender/ikplugin/intern/Makefile
@@ -0,0 +1,51 @@
+# ***** 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 = ikplugin
+DIR = $(OCGDIR)/blender/ikplugin
+
+include nan_compile.mk
+
+CFLAGS += $(LEVEL_1_C_WARNINGS)
+CFLAGS += -I$(NAN_GUARDEDALLOC)/include
+CFLAGS += -I../../makesdna
+CFLAGS += -I../../blenkernel
+CFLAGS += -I../../blenlib
+CFLAGS += -I../../include
+CFLAGS += -I../../../../intern/itasc
+CFLAGS += -I../../../../extern/Eigen2
+CFLAGS += -I..
+
+CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
+CPPFLAGS += -I$(NAN_IKSOLVER)/include
+CPPFLAGS += -I../../makesdna
+CPPFLAGS += -I../../blenkernel
+CPPFLAGS += -I../../blenlib
+CPPFLAGS += -I../../include
+CPPFLAGS += -I../../../../intern/itasc
+CPPFLAGS += -I../../../../extern/Eigen2
+CPPFLAGS += -I..
diff --git a/source/blender/ikplugin/intern/ikplugin_api.c b/source/blender/ikplugin/intern/ikplugin_api.c
new file mode 100644
index 00000000000..f106302dbaf
--- /dev/null
+++ b/source/blender/ikplugin/intern/ikplugin_api.c
@@ -0,0 +1,138 @@
+/**
+ * $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.
+ *
+ * Original author: Benoit Bolsee
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include "MEM_guardedalloc.h"
+
+#include "BIK_api.h"
+#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
+
+#include "BKE_armature.h"
+#include "BKE_utildefines.h"
+#include "DNA_object_types.h"
+#include "DNA_action_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_constraint_types.h"
+#include "DNA_armature_types.h"
+
+#include "ikplugin_api.h"
+#include "iksolver_plugin.h"
+#include "itasc_plugin.h"
+
+
+static IKPlugin ikplugin_tab[BIK_SOLVER_COUNT] = {
+ /* Legacy IK solver */
+ {
+ iksolver_initialize_tree,
+ iksolver_execute_tree,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ },
+ /* iTaSC IK solver */
+ {
+ itasc_initialize_tree,
+ itasc_execute_tree,
+ itasc_release_tree,
+ itasc_clear_data,
+ itasc_clear_cache,
+ itasc_update_param,
+ itasc_test_constraint,
+ }
+};
+
+
+static IKPlugin *get_plugin(bPose *pose)
+{
+ if (!pose || pose->iksolver < 0 || pose->iksolver >= BIK_SOLVER_COUNT)
+ return NULL;
+
+ return &ikplugin_tab[pose->iksolver];
+}
+
+/*----------------------------------------*/
+/* Plugin API */
+
+void BIK_initialize_tree(Scene *scene, Object *ob, float ctime)
+{
+ IKPlugin *plugin = get_plugin(ob->pose);
+
+ if (plugin && plugin->initialize_tree_func)
+ plugin->initialize_tree_func(scene, ob, ctime);
+}
+
+void BIK_execute_tree(struct Scene *scene, Object *ob, bPoseChannel *pchan, float ctime)
+{
+ IKPlugin *plugin = get_plugin(ob->pose);
+
+ if (plugin && plugin->execute_tree_func)
+ plugin->execute_tree_func(scene, ob, pchan, ctime);
+}
+
+void BIK_release_tree(struct Scene *scene, Object *ob, float ctime)
+{
+ IKPlugin *plugin = get_plugin(ob->pose);
+
+ if (plugin && plugin->release_tree_func)
+ plugin->release_tree_func(scene, ob, ctime);
+}
+
+void BIK_clear_data(struct bPose *pose)
+{
+ IKPlugin *plugin = get_plugin(pose);
+
+ if (plugin && plugin->remove_armature_func)
+ plugin->remove_armature_func(pose);
+}
+
+void BIK_clear_cache(struct bPose *pose)
+{
+ IKPlugin *plugin = get_plugin(pose);
+
+ if (plugin && plugin->clear_cache)
+ plugin->clear_cache(pose);
+}
+
+void BIK_update_param(struct bPose *pose)
+{
+ IKPlugin *plugin = get_plugin(pose);
+
+ if (plugin && plugin->update_param)
+ plugin->update_param(pose);
+}
+
+void BIK_test_constraint(struct Object *ob, struct bConstraint *cons)
+{
+ IKPlugin *plugin = get_plugin(ob->pose);
+
+ if (plugin && plugin->test_constraint)
+ plugin->test_constraint(ob, cons);
+}
diff --git a/source/blender/ikplugin/intern/ikplugin_api.h b/source/blender/ikplugin/intern/ikplugin_api.h
new file mode 100644
index 00000000000..cc4dff4ec75
--- /dev/null
+++ b/source/blender/ikplugin/intern/ikplugin_api.h
@@ -0,0 +1,60 @@
+/**
+ * $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.
+ *
+ * Original author: Benoit Bolsee
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef IKPLUGIN_API_H
+#define IKPLUGIN_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct Object;
+struct bPoseChannel;
+struct bArmature;
+struct Scene;
+
+
+struct IKPlugin {
+ void (*initialize_tree_func)(struct Scene *scene, struct Object *ob, float ctime);
+ void (*execute_tree_func)(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime);
+ void (*release_tree_func)(struct Scene *scene, struct Object *ob, float ctime);
+ void (*remove_armature_func)(struct bPose *pose);
+ void (*clear_cache)(struct bPose *pose);
+ void (*update_param)(struct bPose *pose);
+ void (*test_constraint)(struct Object *ob, struct bConstraint *cons);
+};
+
+typedef struct IKPlugin IKPlugin;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // IKPLUGIN_API_H
+
diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c
new file mode 100644
index 00000000000..68afbcd0db2
--- /dev/null
+++ b/source/blender/ikplugin/intern/iksolver_plugin.c
@@ -0,0 +1,530 @@
+/**
+ * $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.
+ *
+ * Original author: Benoit Bolsee
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include "MEM_guardedalloc.h"
+
+#include "BIK_api.h"
+#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
+
+#include "BKE_armature.h"
+#include "BKE_constraint.h"
+#include "BKE_utildefines.h"
+#include "DNA_object_types.h"
+#include "DNA_action_types.h"
+#include "DNA_constraint_types.h"
+#include "DNA_armature_types.h"
+
+#include "IK_solver.h"
+#include "iksolver_plugin.h"
+
+#include <string.h> /* memcpy */
+
+/* ********************** THE IK SOLVER ******************* */
+
+/* allocates PoseTree, and links that to root bone/channel */
+/* Note: detecting the IK chain is duplicate code... in drawarmature.c and in transform_conversions.c */
+static void initialize_posetree(struct Object *ob, bPoseChannel *pchan_tip)
+{
+ bPoseChannel *curchan, *pchan_root=NULL, *chanlist[256], **oldchan;
+ PoseTree *tree;
+ PoseTarget *target;
+ bConstraint *con;
+ bKinematicConstraint *data;
+ int a, segcount= 0, size, newsize, *oldparent, parent;
+
+ /* find IK constraint, and validate it */
+ for(con= pchan_tip->constraints.first; con; con= con->next) {
+ if(con->type==CONSTRAINT_TYPE_KINEMATIC) {
+ data=(bKinematicConstraint*)con->data;
+ if (data->flag & CONSTRAINT_IK_AUTO) break;
+ if (data->tar==NULL) continue;
+ if (data->tar->type==OB_ARMATURE && data->subtarget[0]==0) continue;
+ if ((con->flag & (CONSTRAINT_DISABLE|CONSTRAINT_OFF))==0 && (con->enforce!=0.0)) break;
+ }
+ }
+ if(con==NULL) return;
+
+ /* exclude tip from chain? */
+ if(!(data->flag & CONSTRAINT_IK_TIP))
+ pchan_tip= pchan_tip->parent;
+
+ /* Find the chain's root & count the segments needed */
+ for (curchan = pchan_tip; curchan; curchan=curchan->parent){
+ pchan_root = curchan;
+
+ curchan->flag |= POSE_CHAIN; // don't forget to clear this
+ chanlist[segcount]=curchan;
+ segcount++;
+
+ if(segcount==data->rootbone || segcount>255) break; // 255 is weak
+ }
+ if (!segcount) return;
+
+ /* setup the chain data */
+
+ /* we make tree-IK, unless all existing targets are in this chain */
+ for(tree= pchan_root->iktree.first; tree; tree= tree->next) {
+ for(target= tree->targets.first; target; target= target->next) {
+ curchan= tree->pchan[target->tip];
+ if(curchan->flag & POSE_CHAIN)
+ curchan->flag &= ~POSE_CHAIN;
+ else
+ break;
+ }
+ if(target) break;
+ }
+
+ /* create a target */
+ target= MEM_callocN(sizeof(PoseTarget), "posetarget");
+ target->con= con;
+ pchan_tip->flag &= ~POSE_CHAIN;
+
+ if(tree==NULL) {
+ /* make new tree */
+ tree= MEM_callocN(sizeof(PoseTree), "posetree");
+
+ tree->iterations= data->iterations;
+ tree->totchannel= segcount;
+ tree->stretch = (data->flag & CONSTRAINT_IK_STRETCH);
+
+ tree->pchan= MEM_callocN(segcount*sizeof(void*), "ik tree pchan");
+ tree->parent= MEM_callocN(segcount*sizeof(int), "ik tree parent");
+ for(a=0; a<segcount; a++) {
+ tree->pchan[a]= chanlist[segcount-a-1];
+ tree->parent[a]= a-1;
+ }
+ target->tip= segcount-1;
+
+ /* AND! link the tree to the root */
+ BLI_addtail(&pchan_root->iktree, tree);
+ }
+ else {
+ tree->iterations= MAX2(data->iterations, tree->iterations);
+ tree->stretch= tree->stretch && !(data->flag & CONSTRAINT_IK_STRETCH);
+
+ /* skip common pose channels and add remaining*/
+ size= MIN2(segcount, tree->totchannel);
+ for(a=0; a<size && tree->pchan[a]==chanlist[segcount-a-1]; a++);
+ parent= a-1;
+
+ segcount= segcount-a;
+ target->tip= tree->totchannel + segcount - 1;
+
+ if (segcount > 0) {
+ /* resize array */
+ newsize= tree->totchannel + segcount;
+ oldchan= tree->pchan;
+ oldparent= tree->parent;
+
+ tree->pchan= MEM_callocN(newsize*sizeof(void*), "ik tree pchan");
+ tree->parent= MEM_callocN(newsize*sizeof(int), "ik tree parent");
+ memcpy(tree->pchan, oldchan, sizeof(void*)*tree->totchannel);
+ memcpy(tree->parent, oldparent, sizeof(int)*tree->totchannel);
+ MEM_freeN(oldchan);
+ MEM_freeN(oldparent);
+
+ /* add new pose channels at the end, in reverse order */
+ for(a=0; a<segcount; a++) {
+ tree->pchan[tree->totchannel+a]= chanlist[segcount-a-1];
+ tree->parent[tree->totchannel+a]= tree->totchannel+a-1;
+ }
+ tree->parent[tree->totchannel]= parent;
+
+ tree->totchannel= newsize;
+ }
+
+ /* move tree to end of list, for correct evaluation order */
+ BLI_remlink(&pchan_root->iktree, tree);
+ BLI_addtail(&pchan_root->iktree, tree);
+ }
+
+ /* add target to the tree */
+ BLI_addtail(&tree->targets, target);
+ /* mark root channel having an IK tree */
+ pchan_root->flag |= POSE_IKTREE;
+}
+
+
+/* transform from bone(b) to bone(b+1), store in chan_mat */
+static void make_dmats(bPoseChannel *pchan)
+{
+ if (pchan->parent) {
+ float iR_parmat[4][4];
+ Mat4Invert(iR_parmat, pchan->parent->pose_mat);
+ Mat4MulMat4(pchan->chan_mat, pchan->pose_mat, iR_parmat); // delta mat
+ }
+ else Mat4CpyMat4(pchan->chan_mat, pchan->pose_mat);
+}
+
+/* applies IK matrix to pchan, IK is done separated */
+/* formula: pose_mat(b) = pose_mat(b-1) * diffmat(b-1, b) * ik_mat(b) */
+/* to make this work, the diffmats have to be precalculated! Stored in chan_mat */
+static void where_is_ik_bone(bPoseChannel *pchan, float ik_mat[][3]) // nr = to detect if this is first bone
+{
+ float vec[3], ikmat[4][4];
+
+ Mat4CpyMat3(ikmat, ik_mat);
+
+ if (pchan->parent)
+ Mat4MulSerie(pchan->pose_mat, pchan->parent->pose_mat, pchan->chan_mat, ikmat, NULL, NULL, NULL, NULL, NULL);
+ else
+ Mat4MulMat4(pchan->pose_mat, ikmat, pchan->chan_mat);
+
+ /* calculate head */
+ VECCOPY(pchan->pose_head, pchan->pose_mat[3]);
+ /* calculate tail */
+ VECCOPY(vec, pchan->pose_mat[1]);
+ VecMulf(vec, pchan->bone->length);
+ VecAddf(pchan->pose_tail, pchan->pose_head, vec);
+
+ pchan->flag |= POSE_DONE;
+}
+
+
+/* called from within the core where_is_pose loop, all animsystems and constraints
+were executed & assigned. Now as last we do an IK pass */
+static void execute_posetree(Object *ob, PoseTree *tree)
+{
+ float R_parmat[3][3], identity[3][3];
+ float iR_parmat[3][3];
+ float R_bonemat[3][3];
+ float goalrot[3][3], goalpos[3];
+ float rootmat[4][4], imat[4][4];
+ float goal[4][4], goalinv[4][4];
+ float irest_basis[3][3], full_basis[3][3];
+ float end_pose[4][4], world_pose[4][4];
+ float length, basis[3][3], rest_basis[3][3], start[3], *ikstretch=NULL;
+ float resultinf=0.0f;
+ int a, flag, hasstretch=0, resultblend=0;
+ bPoseChannel *pchan;
+ IK_Segment *seg, *parent, **iktree, *iktarget;
+ IK_Solver *solver;
+ PoseTarget *target;
+ bKinematicConstraint *data, *poleangledata=NULL;
+ Bone *bone;
+
+ if (tree->totchannel == 0)
+ return;
+
+ iktree= MEM_mallocN(sizeof(void*)*tree->totchannel, "ik tree");
+
+ for(a=0; a<tree->totchannel; a++) {
+ pchan= tree->pchan[a];
+ bone= pchan->bone;
+
+ /* set DoF flag */
+ flag= 0;
+ if(!(pchan->ikflag & BONE_IK_NO_XDOF) && !(pchan->ikflag & BONE_IK_NO_XDOF_TEMP))
+ flag |= IK_XDOF;
+ if(!(pchan->ikflag & BONE_IK_NO_YDOF) && !(pchan->ikflag & BONE_IK_NO_YDOF_TEMP))
+ flag |= IK_YDOF;
+ if(!(pchan->ikflag & BONE_IK_NO_ZDOF) && !(pchan->ikflag & BONE_IK_NO_ZDOF_TEMP))
+ flag |= IK_ZDOF;
+
+ if(tree->stretch && (pchan->ikstretch > 0.0)) {
+ flag |= IK_TRANS_YDOF;
+ hasstretch = 1;
+ }
+
+ seg= iktree[a]= IK_CreateSegment(flag);
+
+ /* find parent */
+ if(a == 0)
+ parent= NULL;
+ else
+ parent= iktree[tree->parent[a]];
+
+ IK_SetParent(seg, parent);
+
+ /* get the matrix that transforms from prevbone into this bone */
+ Mat3CpyMat4(R_bonemat, pchan->pose_mat);
+
+ /* gather transformations for this IK segment */
+
+ if (pchan->parent)
+ Mat3CpyMat4(R_parmat, pchan->parent->pose_mat);
+ else
+ Mat3One(R_parmat);
+
+ /* bone offset */
+ if (pchan->parent && (a > 0))
+ VecSubf(start, pchan->pose_head, pchan->parent->pose_tail);
+ else
+ /* only root bone (a = 0) has no parent */
+ start[0]= start[1]= start[2]= 0.0f;
+
+ /* change length based on bone size */
+ length= bone->length*VecLength(R_bonemat[1]);
+
+ /* compute rest basis and its inverse */
+ Mat3CpyMat3(rest_basis, bone->bone_mat);
+ Mat3CpyMat3(irest_basis, bone->bone_mat);
+ Mat3Transp(irest_basis);
+
+ /* compute basis with rest_basis removed */
+ Mat3Inv(iR_parmat, R_parmat);
+ Mat3MulMat3(full_basis, iR_parmat, R_bonemat);
+ Mat3MulMat3(basis, irest_basis, full_basis);
+
+ /* basis must be pure rotation */
+ Mat3Ortho(basis);
+
+ /* transform offset into local bone space */
+ Mat3Ortho(iR_parmat);
+ Mat3MulVecfl(iR_parmat, start);
+
+ IK_SetTransform(seg, start, rest_basis, basis, length);
+
+ if (pchan->ikflag & BONE_IK_XLIMIT)
+ IK_SetLimit(seg, IK_X, pchan->limitmin[0], pchan->limitmax[0]);
+ if (pchan->ikflag & BONE_IK_YLIMIT)
+ IK_SetLimit(seg, IK_Y, pchan->limitmin[1], pchan->limitmax[1]);
+ if (pchan->ikflag & BONE_IK_ZLIMIT)
+ IK_SetLimit(seg, IK_Z, pchan->limitmin[2], pchan->limitmax[2]);
+
+ IK_SetStiffness(seg, IK_X, pchan->stiffness[0]);
+ IK_SetStiffness(seg, IK_Y, pchan->stiffness[1]);
+ IK_SetStiffness(seg, IK_Z, pchan->stiffness[2]);
+
+ if(tree->stretch && (pchan->ikstretch > 0.0)) {
+ float ikstretch = pchan->ikstretch*pchan->ikstretch;
+ IK_SetStiffness(seg, IK_TRANS_Y, MIN2(1.0-ikstretch, 0.99));
+ IK_SetLimit(seg, IK_TRANS_Y, 0.001, 1e10);
+ }
+ }
+
+ solver= IK_CreateSolver(iktree[0]);
+
+ /* set solver goals */
+
+ /* first set the goal inverse transform, assuming the root of tree was done ok! */
+ pchan= tree->pchan[0];
+ if (pchan->parent)
+ /* transform goal by parent mat, so this rotation is not part of the
+ segment's basis. otherwise rotation limits do not work on the
+ local transform of the segment itself. */
+ Mat4CpyMat4(rootmat, pchan->parent->pose_mat);
+ else
+ Mat4One(rootmat);
+ VECCOPY(rootmat[3], pchan->pose_head);
+
+ Mat4MulMat4 (imat, rootmat, ob->obmat);
+ Mat4Invert (goalinv, imat);
+
+ for (target=tree->targets.first; target; target=target->next) {
+ float polepos[3];
+ int poleconstrain= 0;
+
+ data= (bKinematicConstraint*)target->con->data;
+
+ /* 1.0=ctime, we pass on object for auto-ik (owner-type here is object, even though
+ * strictly speaking, it is a posechannel)
+ */
+ get_constraint_target_matrix(target->con, 0, CONSTRAINT_OBTYPE_OBJECT, ob, rootmat, 1.0);
+
+ /* and set and transform goal */
+ Mat4MulMat4(goal, rootmat, goalinv);
+
+ VECCOPY(goalpos, goal[3]);
+ Mat3CpyMat4(goalrot, goal);
+
+ /* same for pole vector target */
+ if(data->poletar) {
+ get_constraint_target_matrix(target->con, 1, CONSTRAINT_OBTYPE_OBJECT, ob, rootmat, 1.0);
+
+ if(data->flag & CONSTRAINT_IK_SETANGLE) {
+ /* don't solve IK when we are setting the pole angle */
+ break;
+ }
+ else {
+ Mat4MulMat4(goal, rootmat, goalinv);
+ VECCOPY(polepos, goal[3]);
+ poleconstrain= 1;
+
+ /* for pole targets, we blend the result of the ik solver
+ * instead of the target position, otherwise we can't get
+ * a smooth transition */
+ resultblend= 1;
+ resultinf= target->con->enforce;
+
+ if(data->flag & CONSTRAINT_IK_GETANGLE) {
+ poleangledata= data;
+ data->flag &= ~CONSTRAINT_IK_GETANGLE;
+ }
+ }
+ }
+
+ /* do we need blending? */
+ if (!resultblend && target->con->enforce!=1.0) {
+ float q1[4], q2[4], q[4];
+ float fac= target->con->enforce;
+ float mfac= 1.0-fac;
+
+ pchan= tree->pchan[target->tip];
+
+ /* end effector in world space */
+ Mat4CpyMat4(end_pose, pchan->pose_mat);
+ VECCOPY(end_pose[3], pchan->pose_tail);
+ Mat4MulSerie(world_pose, goalinv, ob->obmat, end_pose, 0, 0, 0, 0, 0);
+
+ /* blend position */
+ goalpos[0]= fac*goalpos[0] + mfac*world_pose[3][0];
+ goalpos[1]= fac*goalpos[1] + mfac*world_pose[3][1];
+ goalpos[2]= fac*goalpos[2] + mfac*world_pose[3][2];
+
+ /* blend rotation */
+ Mat3ToQuat(goalrot, q1);
+ Mat4ToQuat(world_pose, q2);
+ QuatInterpol(q, q1, q2, mfac);
+ QuatToMat3(q, goalrot);
+ }
+
+ iktarget= iktree[target->tip];
+
+ if(data->weight != 0.0) {
+ if(poleconstrain)
+ IK_SolverSetPoleVectorConstraint(solver, iktarget, goalpos,
+ polepos, data->poleangle*M_PI/180, (poleangledata == data));
+ IK_SolverAddGoal(solver, iktarget, goalpos, data->weight);
+ }
+ if((data->flag & CONSTRAINT_IK_ROT) && (data->orientweight != 0.0))
+ if((data->flag & CONSTRAINT_IK_AUTO)==0)
+ IK_SolverAddGoalOrientation(solver, iktarget, goalrot,
+ data->orientweight);
+ }
+
+ /* solve */
+ IK_Solve(solver, 0.0f, tree->iterations);
+
+ if(poleangledata)
+ poleangledata->poleangle= IK_SolverGetPoleAngle(solver)*180/M_PI;
+
+ IK_FreeSolver(solver);
+
+ /* gather basis changes */
+ tree->basis_change= MEM_mallocN(sizeof(float[3][3])*tree->totchannel, "ik basis change");
+ if(hasstretch)
+ ikstretch= MEM_mallocN(sizeof(float)*tree->totchannel, "ik stretch");
+
+ for(a=0; a<tree->totchannel; a++) {
+ IK_GetBasisChange(iktree[a], tree->basis_change[a]);
+
+ if(hasstretch) {
+ /* have to compensate for scaling received from parent */
+ float parentstretch, stretch;
+
+ pchan= tree->pchan[a];
+ parentstretch= (tree->parent[a] >= 0)? ikstretch[tree->parent[a]]: 1.0;
+
+ if(tree->stretch && (pchan->ikstretch > 0.0)) {
+ float trans[3], length;
+
+ IK_GetTranslationChange(iktree[a], trans);
+ length= pchan->bone->length*VecLength(pchan->pose_mat[1]);
+
+ ikstretch[a]= (length == 0.0)? 1.0: (trans[1]+length)/length;
+ }
+ else
+ ikstretch[a] = 1.0;
+
+ stretch= (parentstretch == 0.0)? 1.0: ikstretch[a]/parentstretch;
+
+ VecMulf(tree->basis_change[a][0], stretch);
+ VecMulf(tree->basis_change[a][1], stretch);
+ VecMulf(tree->basis_change[a][2], stretch);
+ }
+
+ if(resultblend && resultinf!=1.0f) {
+ Mat3One(identity);
+ Mat3BlendMat3(tree->basis_change[a], identity,
+ tree->basis_change[a], resultinf);
+ }
+
+ IK_FreeSegment(iktree[a]);
+ }
+
+ MEM_freeN(iktree);
+ if(ikstretch) MEM_freeN(ikstretch);
+}
+
+static void free_posetree(PoseTree *tree)
+{
+ BLI_freelistN(&tree->targets);
+ if(tree->pchan) MEM_freeN(tree->pchan);
+ if(tree->parent) MEM_freeN(tree->parent);
+ if(tree->basis_change) MEM_freeN(tree->basis_change);
+ MEM_freeN(tree);
+}
+
+///----------------------------------------
+/// Plugin API for legacy iksolver
+
+void iksolver_initialize_tree(struct Scene *scene, struct Object *ob, float ctime)
+{
+ bPoseChannel *pchan;
+
+ for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ if(pchan->constflag & PCHAN_HAS_IK) // flag is set on editing constraints
+ initialize_posetree(ob, pchan); // will attach it to root!
+ }
+ ob->pose->flag &= ~POSE_WAS_REBUILT;
+}
+
+void iksolver_execute_tree(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime)
+{
+ while(pchan->iktree.first) {
+ PoseTree *tree= pchan->iktree.first;
+ int a;
+
+ /* 4. walk over the tree for regular solving */
+ for(a=0; a<tree->totchannel; a++) {
+ if(!(tree->pchan[a]->flag & POSE_DONE)) // successive trees can set the flag
+ where_is_pose_bone(scene, ob, tree->pchan[a], ctime);
+ // tell blender that this channel was controlled by IK, it's cleared on each where_is_pose()
+ tree->pchan[a]->flag |= POSE_CHAIN;
+ }
+ /* 5. execute the IK solver */
+ execute_posetree(ob, tree);
+
+ /* 6. apply the differences to the channels,
+ we need to calculate the original differences first */
+ for(a=0; a<tree->totchannel; a++)
+ make_dmats(tree->pchan[a]);
+
+ for(a=0; a<tree->totchannel; a++)
+ /* sets POSE_DONE */
+ where_is_ik_bone(tree->pchan[a], tree->basis_change[a]);
+
+ /* 7. and free */
+ BLI_remlink(&pchan->iktree, tree);
+ free_posetree(tree);
+ }
+}
+
diff --git a/source/blender/editors/preview/previewrender_intern.h b/source/blender/ikplugin/intern/iksolver_plugin.h
index 74a3aeee754..d5d1d9a77da 100644
--- a/source/blender/editors/preview/previewrender_intern.h
+++ b/source/blender/ikplugin/intern/iksolver_plugin.h
@@ -1,12 +1,11 @@
/**
- * $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,21 +16,32 @@
* 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.
+ *
+ * Original author: Benoit Bolsee
+ * Contributor(s):
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef PREVIEWRENDER_INTERN_H
-#define PREVIEWRENDER_INTERN_H
+#ifndef IKSOLVER_PLUGIN_H
+#define IKSOLVER_PLUGIN_H
+
+#include "ikplugin_api.h"
-/* internal exports only */
+#ifdef __cplusplus
+extern "C" {
+#endif
+void iksolver_initialize_tree(struct Scene *scene, struct Object *ob, float ctime);
+void iksolver_execute_tree(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime);
+#ifdef __cplusplus
+}
+#endif
-#endif /* PREVIEWRENDER_INTERN_H */
+#endif // IKSOLVER_PLUGIN_H
diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp
new file mode 100644
index 00000000000..dc0c2c4c12f
--- /dev/null
+++ b/source/blender/ikplugin/intern/itasc_plugin.cpp
@@ -0,0 +1,1777 @@
+/**
+ * $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.
+ *
+ * Original author: Benoit Bolsee
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <vector>
+
+// iTaSC headers
+#include "Armature.hpp"
+#include "MovingFrame.hpp"
+#include "CopyPose.hpp"
+#include "WSDLSSolver.hpp"
+#include "WDLSSolver.hpp"
+#include "Scene.hpp"
+#include "Cache.hpp"
+#include "Distance.hpp"
+
+#include "MEM_guardedalloc.h"
+
+extern "C" {
+#include "BIK_api.h"
+#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
+
+#include "BKE_global.h"
+#include "BKE_armature.h"
+#include "BKE_action.h"
+#include "BKE_utildefines.h"
+#include "BKE_constraint.h"
+#include "DNA_object_types.h"
+#include "DNA_action_types.h"
+#include "DNA_constraint_types.h"
+#include "DNA_armature_types.h"
+#include "DNA_scene_types.h"
+};
+
+#include "itasc_plugin.h"
+
+// default parameters
+bItasc DefIKParam;
+
+// in case of animation mode, feedback and timestep is fixed
+#define ANIM_TIMESTEP 1.0
+#define ANIM_FEEDBACK 0.8
+#define ANIM_QMAX 0.52
+
+
+// Structure pointed by bPose.ikdata
+// It contains everything needed to simulate the armatures
+// There can be several simulation islands independent to each other
+struct IK_Data
+{
+ struct IK_Scene* first;
+};
+
+typedef float Vector3[3];
+typedef float Vector4[4];
+struct IK_Target;
+typedef void (*ErrorCallback)(const iTaSC::ConstraintValues* values, unsigned int nvalues, IK_Target* iktarget);
+// For some reason, gcc doesn't find the declaration of this function in linux
+void KDL::SetToZero(JntArray& array);
+
+// one structure for each target in the scene
+struct IK_Target
+{
+ iTaSC::MovingFrame* target;
+ iTaSC::ConstraintSet* constraint;
+ struct bConstraint* blenderConstraint;
+ struct bPoseChannel* rootChannel;
+ Object* owner; //for auto IK
+ ErrorCallback errorCallback;
+ std::string targetName;
+ std::string constraintName;
+ unsigned short controlType;
+ short channel; //index in IK channel array of channel on which this target is defined
+ short ee; //end effector number
+ bool simulation; //true when simulation mode is used (update feedback)
+ bool eeBlend; //end effector affected by enforce blending
+ float eeRest[4][4]; //end effector initial pose relative to armature
+
+ IK_Target() {
+ target = NULL;
+ constraint = NULL;
+ blenderConstraint = NULL;
+ rootChannel = NULL;
+ owner = NULL;
+ controlType = 0;
+ channel = 0;
+ ee = 0;
+ eeBlend = true;
+ simulation = true;
+ targetName.reserve(32);
+ constraintName.reserve(32);
+ }
+ ~IK_Target() {
+ if (constraint)
+ delete constraint;
+ if (target)
+ delete target;
+ }
+};
+
+struct IK_Channel {
+ bPoseChannel* pchan; // channel where we must copy matrix back
+ KDL::Frame frame; // frame of the bone relative to object base, not armature base
+ std::string tail; // segment name of the joint from which we get the bone tail
+ std::string head; // segment name of the joint from which we get the bone head
+ int parent; // index in this array of the parent channel
+ short jointType; // type of joint, combination of IK_SegmentFlag
+ char ndof; // number of joint angles for this channel
+ char jointValid; // set to 1 when jointValue has been computed
+ // for joint constraint
+ Object* owner; // for pose and IK param
+ double jointValue[4]; // computed joint value
+
+ IK_Channel() {
+ pchan = NULL;
+ parent = -1;
+ jointType = 0;
+ ndof = 0;
+ jointValid = 0;
+ owner = NULL;
+ jointValue[0] = 0.0;
+ jointValue[1] = 0.0;
+ jointValue[2] = 0.0;
+ jointValue[3] = 0.0;
+ }
+};
+
+struct IK_Scene
+{
+ IK_Scene* next;
+ int numchan; // number of channel in pchan
+ int numjoint; // number of joint in jointArray
+ // array of bone information, one per channel in the tree
+ IK_Channel* channels;
+ iTaSC::Armature* armature;
+ iTaSC::Cache* cache;
+ iTaSC::Scene* scene;
+ iTaSC::MovingFrame* base; // armature base object
+ KDL::Frame baseFrame; // frame of armature base relative to blArmature
+ KDL::JntArray jointArray; // buffer for storing temporary joint array
+ iTaSC::Solver* solver;
+ Object* blArmature;
+ struct bConstraint* polarConstraint;
+ std::vector<IK_Target*> targets;
+
+ IK_Scene() {
+ next = NULL;
+ channels = NULL;
+ armature = NULL;
+ cache = NULL;
+ scene = NULL;
+ base = NULL;
+ solver = NULL;
+ blArmature = NULL;
+ numchan = 0;
+ numjoint = 0;
+ polarConstraint = NULL;
+ }
+
+ ~IK_Scene() {
+ // delete scene first
+ if (scene)
+ delete scene;
+ for(std::vector<IK_Target*>::iterator it = targets.begin(); it != targets.end(); ++it)
+ delete (*it);
+ targets.clear();
+ if (channels)
+ delete [] channels;
+ if (solver)
+ delete solver;
+ if (armature)
+ delete armature;
+ if (base)
+ delete base;
+ // delete cache last
+ if (cache)
+ delete cache;
+ }
+};
+
+// type of IK joint, can be combined to list the joints corresponding to a bone
+enum IK_SegmentFlag {
+ IK_XDOF = 1,
+ IK_YDOF = 2,
+ IK_ZDOF = 4,
+ IK_SWING = 8,
+ IK_REVOLUTE = 16,
+ IK_TRANSY = 32,
+};
+
+enum IK_SegmentAxis {
+ IK_X = 0,
+ IK_Y = 1,
+ IK_Z = 2,
+ IK_TRANS_X = 3,
+ IK_TRANS_Y = 4,
+ IK_TRANS_Z = 5
+};
+
+static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *con)
+{
+ bPoseChannel *curchan, *pchan_root=NULL, *chanlist[256], **oldchan;
+ PoseTree *tree;
+ PoseTarget *target;
+ bKinematicConstraint *data;
+ int a, t, segcount= 0, size, newsize, *oldparent, parent, rootbone, treecount;
+
+ data=(bKinematicConstraint*)con->data;
+
+ /* exclude tip from chain? */
+ if(!(data->flag & CONSTRAINT_IK_TIP))
+ pchan_tip= pchan_tip->parent;
+
+ rootbone = data->rootbone;
+ /* Find the chain's root & count the segments needed */
+ for (curchan = pchan_tip; curchan; curchan=curchan->parent){
+ pchan_root = curchan;
+
+ if (++segcount > 255) // 255 is weak
+ break;
+
+ if(segcount==rootbone){
+ // reached this end of the chain but if the chain is overlapping with a
+ // previous one, we must go back up to the root of the other chain
+ if ((curchan->flag & POSE_CHAIN) && curchan->iktree.first == NULL){
+ rootbone++;
+ continue;
+ }
+ break;
+ }
+
+ if (curchan->iktree.first != NULL)
+ // Oh oh, there is already a chain starting from this channel and our chain is longer...
+ // Should handle this by moving the previous chain up to the begining of our chain
+ // For now we just stop here
+ break;
+ }
+ if (!segcount) return 0;
+ // we reached a limit and still not the end of a previous chain, quit
+ if ((pchan_root->flag & POSE_CHAIN) && pchan_root->iktree.first == NULL) return 0;
+
+ // now that we know how many segment we have, set the flag
+ for (rootbone = segcount, segcount = 0, curchan = pchan_tip; segcount < rootbone; segcount++, curchan=curchan->parent) {
+ chanlist[segcount]=curchan;
+ curchan->flag |= POSE_CHAIN;
+ }
+
+ /* setup the chain data */
+ /* create a target */
+ target= (PoseTarget*)MEM_callocN(sizeof(PoseTarget), "posetarget");
+ target->con= con;
+ // by contruction there can be only one tree per channel and each channel can be part of at most one tree.
+ tree = (PoseTree*)pchan_root->iktree.first;
+
+ if(tree==NULL) {
+ /* make new tree */
+ tree= (PoseTree*)MEM_callocN(sizeof(PoseTree), "posetree");
+
+ tree->iterations= data->iterations;
+ tree->totchannel= segcount;
+ tree->stretch = (data->flag & CONSTRAINT_IK_STRETCH);
+
+ tree->pchan= (bPoseChannel**)MEM_callocN(segcount*sizeof(void*), "ik tree pchan");
+ tree->parent= (int*)MEM_callocN(segcount*sizeof(int), "ik tree parent");
+ for(a=0; a<segcount; a++) {
+ tree->pchan[a]= chanlist[segcount-a-1];
+ tree->parent[a]= a-1;
+ }
+ target->tip= segcount-1;
+
+ /* AND! link the tree to the root */
+ BLI_addtail(&pchan_root->iktree, tree);
+ // new tree
+ treecount = 1;
+ }
+ else {
+ tree->iterations= MAX2(data->iterations, tree->iterations);
+ tree->stretch= tree->stretch && !(data->flag & CONSTRAINT_IK_STRETCH);
+
+ /* skip common pose channels and add remaining*/
+ size= MIN2(segcount, tree->totchannel);
+ a = t = 0;
+ while (a<size && t<tree->totchannel) {
+ // locate first matching channel
+ for (;t<tree->totchannel && tree->pchan[t]!=chanlist[segcount-a-1];t++);
+ if (t>=tree->totchannel)
+ break;
+ for(; a<size && t<tree->totchannel && tree->pchan[t]==chanlist[segcount-a-1]; a++, t++);
+ }
+ parent= a-1;
+ segcount= segcount-a;
+ target->tip= tree->totchannel + segcount - 1;
+
+ if (segcount > 0) {
+ /* resize array */
+ newsize= tree->totchannel + segcount;
+ oldchan= tree->pchan;
+ oldparent= tree->parent;
+
+ tree->pchan= (bPoseChannel**)MEM_callocN(newsize*sizeof(void*), "ik tree pchan");
+ tree->parent= (int*)MEM_callocN(newsize*sizeof(int), "ik tree parent");
+ memcpy(tree->pchan, oldchan, sizeof(void*)*tree->totchannel);
+ memcpy(tree->parent, oldparent, sizeof(int)*tree->totchannel);
+ MEM_freeN(oldchan);
+ MEM_freeN(oldparent);
+
+ /* add new pose channels at the end, in reverse order */
+ for(a=0; a<segcount; a++) {
+ tree->pchan[tree->totchannel+a]= chanlist[segcount-a-1];
+ tree->parent[tree->totchannel+a]= tree->totchannel+a-1;
+ }
+ tree->parent[tree->totchannel]= parent;
+
+ tree->totchannel= newsize;
+ }
+ // reusing tree
+ treecount = 0;
+ }
+
+ /* add target to the tree */
+ BLI_addtail(&tree->targets, target);
+ /* mark root channel having an IK tree */
+ pchan_root->flag |= POSE_IKTREE;
+ return treecount;
+}
+
+static bool is_cartesian_constraint(bConstraint *con)
+{
+ //bKinematicConstraint* data=(bKinematicConstraint*)con->data;
+
+ return true;
+}
+
+static bool constraint_valid(bConstraint *con)
+{
+ bKinematicConstraint* data=(bKinematicConstraint*)con->data;
+
+ if (data->flag & CONSTRAINT_IK_AUTO)
+ return true;
+ if (con->flag & CONSTRAINT_DISABLE)
+ return false;
+ if (is_cartesian_constraint(con)) {
+ /* cartesian space constraint */
+ if (data->tar==NULL)
+ return false;
+ if (data->tar->type==OB_ARMATURE && data->subtarget[0]==0)
+ return false;
+ }
+ return true;
+}
+
+int initialize_scene(Object *ob, bPoseChannel *pchan_tip)
+{
+ bConstraint *con;
+ int treecount;
+
+ /* find all IK constraints and validate them */
+ treecount = 0;
+ for(con= (bConstraint *)pchan_tip->constraints.first; con; con= (bConstraint *)con->next) {
+ if(con->type==CONSTRAINT_TYPE_KINEMATIC) {
+ if (constraint_valid(con))
+ treecount += initialize_chain(ob, pchan_tip, con);
+ }
+ }
+ return treecount;
+}
+
+static IK_Data* get_ikdata(bPose *pose)
+{
+ if (pose->ikdata)
+ return (IK_Data*)pose->ikdata;
+ pose->ikdata = MEM_callocN(sizeof(IK_Data), "iTaSC ikdata");
+ // here init ikdata if needed
+ // now that we have scene, make sure the default param are initialized
+ if (!DefIKParam.iksolver)
+ init_pose_itasc(&DefIKParam);
+
+ return (IK_Data*)pose->ikdata;
+}
+static double EulerAngleFromMatrix(const KDL::Rotation& R, int axis)
+{
+ double t = KDL::sqrt(R(0,0)*R(0,0) + R(0,1)*R(0,1));
+
+ if (t > 16.0*KDL::epsilon) {
+ if (axis == 0) return -KDL::atan2(R(1,2), R(2,2));
+ else if(axis == 1) return KDL::atan2(-R(0,2), t);
+ else return -KDL::atan2(R(0,1), R(0,0));
+ } else {
+ if (axis == 0) return -KDL::atan2(-R(2,1), R(1,1));
+ else if(axis == 1) return KDL::atan2(-R(0,2), t);
+ else return 0.0f;
+ }
+}
+
+static double ComputeTwist(const KDL::Rotation& R)
+{
+ // qy and qw are the y and w components of the quaternion from R
+ double qy = R(0,2) - R(2,0);
+ double qw = R(0,0) + R(1,1) + R(2,2) + 1;
+
+ double tau = 2*KDL::atan2(qy, qw);
+
+ return tau;
+}
+
+static void RemoveEulerAngleFromMatrix(KDL::Rotation& R, double angle, int axis)
+{
+ // compute twist parameter
+ KDL::Rotation T;
+ switch (axis) {
+ case 0:
+ T = KDL::Rotation::RotX(-angle);
+ break;
+ case 1:
+ T = KDL::Rotation::RotY(-angle);
+ break;
+ case 2:
+ T = KDL::Rotation::RotZ(-angle);
+ break;
+ default:
+ return;
+ }
+ // remove angle
+ R = R*T;
+}
+
+#if 0
+static void GetEulerXZY(const KDL::Rotation& R, double& X,double& Z,double& Y)
+{
+ if (fabs(R(0,1)) > 1.0 - KDL::epsilon ) {
+ X = -KDL::sign(R(0,1)) * KDL::atan2(R(1,2), R(1,0));
+ Z = -KDL::sign(R(0,1)) * KDL::PI / 2;
+ Y = 0.0 ;
+ } else {
+ X = KDL::atan2(R(2,1), R(1,1));
+ Z = KDL::atan2(-R(0,1), KDL::sqrt( KDL::sqr(R(0,0)) + KDL::sqr(R(0,2))));
+ Y = KDL::atan2(R(0,2), R(0,0));
+ }
+}
+
+static void GetEulerXYZ(const KDL::Rotation& R, double& X,double& Y,double& Z)
+{
+ if (fabs(R(0,2)) > 1.0 - KDL::epsilon ) {
+ X = KDL::sign(R(0,2)) * KDL::atan2(-R(1,0), R(1,1));
+ Y = KDL::sign(R(0,2)) * KDL::PI / 2;
+ Z = 0.0 ;
+ } else {
+ X = KDL::atan2(-R(1,2), R(2,2));
+ Y = KDL::atan2(R(0,2), KDL::sqrt( KDL::sqr(R(0,0)) + KDL::sqr(R(0,1))));
+ Z = KDL::atan2(-R(0,1), R(0,0));
+ }
+}
+#endif
+
+static void GetJointRotation(KDL::Rotation& boneRot, int type, double* rot)
+{
+ switch (type & ~IK_TRANSY)
+ {
+ default:
+ // fixed bone, no joint
+ break;
+ case IK_XDOF:
+ // RX only, get the X rotation
+ rot[0] = EulerAngleFromMatrix(boneRot, 0);
+ break;
+ case IK_YDOF:
+ // RY only, get the Y rotation
+ rot[0] = ComputeTwist(boneRot);
+ break;
+ case IK_ZDOF:
+ // RZ only, get the Z rotation
+ rot[0] = EulerAngleFromMatrix(boneRot, 2);
+ break;
+ case IK_XDOF|IK_YDOF:
+ rot[1] = ComputeTwist(boneRot);
+ RemoveEulerAngleFromMatrix(boneRot, rot[1], 1);
+ rot[0] = EulerAngleFromMatrix(boneRot, 0);
+ break;
+ case IK_SWING:
+ // RX+RZ
+ boneRot.GetXZRot().GetValue(rot);
+ break;
+ case IK_YDOF|IK_ZDOF:
+ // RZ+RY
+ rot[1] = ComputeTwist(boneRot);
+ RemoveEulerAngleFromMatrix(boneRot, rot[1], 1);
+ rot[0] = EulerAngleFromMatrix(boneRot, 2);
+ break;
+ case IK_SWING|IK_YDOF:
+ rot[2] = ComputeTwist(boneRot);
+ RemoveEulerAngleFromMatrix(boneRot, rot[2], 1);
+ boneRot.GetXZRot().GetValue(rot);
+ break;
+ case IK_REVOLUTE:
+ boneRot.GetRot().GetValue(rot);
+ break;
+ }
+}
+
+static bool target_callback(const iTaSC::Timestamp& timestamp, const iTaSC::Frame& current, iTaSC::Frame& next, void *param)
+{
+ IK_Target* target = (IK_Target*)param;
+ // compute next target position
+ // get target matrix from constraint.
+ bConstraint* constraint = (bConstraint*)target->blenderConstraint;
+ float tarmat[4][4];
+
+ get_constraint_target_matrix(constraint, 0, CONSTRAINT_OBTYPE_OBJECT, target->owner, tarmat, 1.0);
+
+ // rootmat contains the target pose in world coordinate
+ // if enforce is != 1.0, blend the target position with the end effector position
+ // if the armature was in rest position. This information is available in eeRest
+ if (constraint->enforce != 1.0f && target->eeBlend) {
+ // eeRest is relative to the reference frame of the IK root
+ // get this frame in world reference
+ float restmat[4][4];
+ bPoseChannel* pchan = target->rootChannel;
+ if (pchan->parent) {
+ pchan = pchan->parent;
+ float chanmat[4][4];
+ Mat4CpyMat4(chanmat, pchan->pose_mat);
+ VECCOPY(chanmat[3], pchan->pose_tail);
+ Mat4MulSerie(restmat, target->owner->obmat, chanmat, target->eeRest, NULL, NULL, NULL, NULL, NULL);
+ }
+ else {
+ Mat4MulMat4(restmat, target->eeRest, target->owner->obmat);
+ }
+ // blend the target
+ Mat4BlendMat4(tarmat, restmat, tarmat, constraint->enforce);
+ }
+ next.setValue(&tarmat[0][0]);
+ return true;
+}
+
+static bool base_callback(const iTaSC::Timestamp& timestamp, const iTaSC::Frame& current, iTaSC::Frame& next, void *param)
+{
+ IK_Scene* ikscene = (IK_Scene*)param;
+ // compute next armature base pose
+ // algorithm:
+ // ikscene->pchan[0] is the root channel of the tree
+ // if it has a parent, get the pose matrix from it and replace [3] by parent pchan->tail
+ // then multiply by the armature matrix to get ikscene->armature base position
+ bPoseChannel* pchan = ikscene->channels[0].pchan;
+ float rootmat[4][4];
+ if (pchan->parent) {
+ pchan = pchan->parent;
+ float chanmat[4][4];
+ Mat4CpyMat4(chanmat, pchan->pose_mat);
+ VECCOPY(chanmat[3], pchan->pose_tail);
+ // save the base as a frame too so that we can compute deformation
+ // after simulation
+ ikscene->baseFrame.setValue(&chanmat[0][0]);
+ Mat4MulMat4(rootmat, chanmat, ikscene->blArmature->obmat);
+ }
+ else {
+ Mat4CpyMat4(rootmat, ikscene->blArmature->obmat);
+ ikscene->baseFrame = iTaSC::F_identity;
+ }
+ next.setValue(&rootmat[0][0]);
+ // if there is a polar target (only during solving otherwise we don't have end efffector)
+ if (ikscene->polarConstraint && timestamp.update) {
+ // compute additional rotation of base frame so that armature follows the polar target
+ float imat[4][4]; // IK tree base inverse matrix
+ float polemat[4][4]; // polar target in IK tree base frame
+ float goalmat[4][4]; // target in IK tree base frame
+ float mat[4][4]; // temp matrix
+ bKinematicConstraint* poledata = (bKinematicConstraint*)ikscene->polarConstraint->data;
+
+ Mat4Invert(imat, rootmat);
+ // polar constraint imply only one target
+ IK_Target *iktarget = ikscene->targets[0];
+ // root channel from which we take the bone initial orientation
+ IK_Channel &rootchan = ikscene->channels[0];
+
+ // get polar target matrix in world space
+ get_constraint_target_matrix(ikscene->polarConstraint, 1, CONSTRAINT_OBTYPE_OBJECT, ikscene->blArmature, mat, 1.0);
+ // convert to armature space
+ Mat4MulMat4(polemat, mat, imat);
+ // get the target in world space (was computed before as target object are defined before base object)
+ iktarget->target->getPose().getValue(mat[0]);
+ // convert to armature space
+ Mat4MulMat4(goalmat, mat, imat);
+ // take position of target, polar target, end effector, in armature space
+ KDL::Vector goalpos(goalmat[3]);
+ KDL::Vector polepos(polemat[3]);
+ KDL::Vector endpos = ikscene->armature->getPose(iktarget->ee).p;
+ // get root bone orientation
+ KDL::Frame rootframe;
+ ikscene->armature->getRelativeFrame(rootframe, rootchan.tail);
+ KDL::Vector rootx = rootframe.M.UnitX();
+ KDL::Vector rootz = rootframe.M.UnitZ();
+ // and compute root bone head
+ double q_rest[3], q[3], length;
+ const KDL::Joint* joint;
+ const KDL::Frame* tip;
+ ikscene->armature->getSegment(rootchan.tail, 3, joint, q_rest[0], q[0], tip);
+ length = (joint->getType() == KDL::Joint::TransY) ? q[0] : tip->p(1);
+ KDL::Vector rootpos = rootframe.p - length*rootframe.M.UnitY();
+
+ // compute main directions
+ KDL::Vector dir = KDL::Normalize(endpos - rootpos);
+ KDL::Vector poledir = KDL::Normalize(goalpos-rootpos);
+ // compute up directions
+ KDL::Vector poleup = KDL::Normalize(polepos-rootpos);
+ KDL::Vector up = rootx*KDL::cos(poledata->poleangle) + rootz*KDL::sin(poledata->poleangle);
+ // from which we build rotation matrix
+ KDL::Rotation endrot, polerot;
+ // for the armature, using the root bone orientation
+ KDL::Vector x = KDL::Normalize(dir*up);
+ endrot.UnitX(x);
+ endrot.UnitY(KDL::Normalize(x*dir));
+ endrot.UnitZ(-dir);
+ // for the polar target
+ x = KDL::Normalize(poledir*poleup);
+ polerot.UnitX(x);
+ polerot.UnitY(KDL::Normalize(x*poledir));
+ polerot.UnitZ(-poledir);
+ // the difference between the two is the rotation we want to apply
+ KDL::Rotation result(polerot*endrot.Inverse());
+ // apply on base frame as this is an artificial additional rotation
+ next.M = next.M*result;
+ ikscene->baseFrame.M = ikscene->baseFrame.M*result;
+ }
+ return true;
+}
+
+static bool copypose_callback(const iTaSC::Timestamp& timestamp, iTaSC::ConstraintValues* const _values, unsigned int _nvalues, void* _param)
+{
+ IK_Target* iktarget =(IK_Target*)_param;
+ bKinematicConstraint *condata = (bKinematicConstraint *)iktarget->blenderConstraint->data;
+ iTaSC::ConstraintValues* values = _values;
+ bItasc* ikparam = (bItasc*) iktarget->owner->pose->ikparam;
+
+ // we need default parameters
+ if (!ikparam)
+ ikparam = &DefIKParam;
+
+ if (iktarget->blenderConstraint->flag & CONSTRAINT_OFF) {
+ if (iktarget->controlType & iTaSC::CopyPose::CTL_POSITION) {
+ values->alpha = 0.0;
+ values->action = iTaSC::ACT_ALPHA;
+ values++;
+ }
+ if (iktarget->controlType & iTaSC::CopyPose::CTL_ROTATION) {
+ values->alpha = 0.0;
+ values->action = iTaSC::ACT_ALPHA;
+ values++;
+ }
+ } else {
+ if (iktarget->controlType & iTaSC::CopyPose::CTL_POSITION) {
+ // update error
+ values->alpha = condata->weight;
+ values->action = iTaSC::ACT_ALPHA|iTaSC::ACT_FEEDBACK;
+ values->feedback = (iktarget->simulation) ? ikparam->feedback : ANIM_FEEDBACK;
+ values++;
+ }
+ if (iktarget->controlType & iTaSC::CopyPose::CTL_ROTATION) {
+ // update error
+ values->alpha = condata->orientweight;
+ values->action = iTaSC::ACT_ALPHA|iTaSC::ACT_FEEDBACK;
+ values->feedback = (iktarget->simulation) ? ikparam->feedback : ANIM_FEEDBACK;
+ values++;
+ }
+ }
+ return true;
+}
+
+static void copypose_error(const iTaSC::ConstraintValues* values, unsigned int nvalues, IK_Target* iktarget)
+{
+ iTaSC::ConstraintSingleValue* value;
+ double error;
+ int i;
+
+ if (iktarget->controlType & iTaSC::CopyPose::CTL_POSITION) {
+ // update error
+ for (i=0, error=0.0, value=values->values; i<values->number; ++i, ++value)
+ error += KDL::sqr(value->y - value->yd);
+ iktarget->blenderConstraint->lin_error = (float)KDL::sqrt(error);
+ values++;
+ }
+ if (iktarget->controlType & iTaSC::CopyPose::CTL_ROTATION) {
+ // update error
+ for (i=0, error=0.0, value=values->values; i<values->number; ++i, ++value)
+ error += KDL::sqr(value->y - value->yd);
+ iktarget->blenderConstraint->rot_error = (float)KDL::sqrt(error);
+ values++;
+ }
+}
+
+static bool distance_callback(const iTaSC::Timestamp& timestamp, iTaSC::ConstraintValues* const _values, unsigned int _nvalues, void* _param)
+{
+ IK_Target* iktarget =(IK_Target*)_param;
+ bKinematicConstraint *condata = (bKinematicConstraint *)iktarget->blenderConstraint->data;
+ iTaSC::ConstraintValues* values = _values;
+ bItasc* ikparam = (bItasc*) iktarget->owner->pose->ikparam;
+ // we need default parameters
+ if (!ikparam)
+ ikparam = &DefIKParam;
+
+ // update weight according to mode
+ if (iktarget->blenderConstraint->flag & CONSTRAINT_OFF) {
+ values->alpha = 0.0;
+ } else {
+ switch (condata->mode) {
+ case LIMITDIST_INSIDE:
+ values->alpha = (values->values[0].y > condata->dist) ? condata->weight : 0.0;
+ break;
+ case LIMITDIST_OUTSIDE:
+ values->alpha = (values->values[0].y < condata->dist) ? condata->weight : 0.0;
+ break;
+ default:
+ values->alpha = condata->weight;
+ break;
+ }
+ if (!timestamp.substep) {
+ // only update value on first timestep
+ switch (condata->mode) {
+ case LIMITDIST_INSIDE:
+ values->values[0].yd = condata->dist*0.95;
+ break;
+ case LIMITDIST_OUTSIDE:
+ values->values[0].yd = condata->dist*1.05;
+ break;
+ default:
+ values->values[0].yd = condata->dist;
+ break;
+ }
+ values->values[0].action = iTaSC::ACT_VALUE|iTaSC::ACT_FEEDBACK;
+ values->feedback = (iktarget->simulation) ? ikparam->feedback : ANIM_FEEDBACK;
+ }
+ }
+ values->action |= iTaSC::ACT_ALPHA;
+ return true;
+}
+
+static void distance_error(const iTaSC::ConstraintValues* values, unsigned int _nvalues, IK_Target* iktarget)
+{
+ iktarget->blenderConstraint->lin_error = (float)(values->values[0].y - values->values[0].yd);
+}
+
+static bool joint_callback(const iTaSC::Timestamp& timestamp, iTaSC::ConstraintValues* const _values, unsigned int _nvalues, void* _param)
+{
+ IK_Channel* ikchan = (IK_Channel*)_param;
+ bItasc* ikparam = (bItasc*)ikchan->owner->pose->ikparam;
+ bPoseChannel* chan = ikchan->pchan;
+ int dof;
+
+ // a channel can be splitted into multiple joints, so we get called multiple
+ // times for one channel (this callback is only for 1 joint in the armature)
+ // the IK_JointTarget structure is shared between multiple joint constraint
+ // and the target joint values is computed only once, remember this in jointValid
+ // Don't forget to reset it before each frame
+ if (!ikchan->jointValid) {
+ float rmat[3][3];
+
+ if (chan->rotmode > 0) {
+ /* euler rotations (will cause gimble lock, but this can be alleviated a bit with rotation orders) */
+ EulOToMat3(chan->eul, chan->rotmode, rmat);
+ }
+ else if (chan->rotmode == ROT_MODE_AXISANGLE) {
+ /* axis-angle - stored in quaternion data, but not really that great for 3D-changing orientations */
+ AxisAngleToMat3(&chan->quat[1], chan->quat[0], rmat);
+ }
+ else {
+ /* quats are normalised before use to eliminate scaling issues */
+ NormalQuat(chan->quat);
+ QuatToMat3(chan->quat, rmat);
+ }
+ KDL::Rotation jointRot(
+ rmat[0][0], rmat[1][0], rmat[2][0],
+ rmat[0][1], rmat[1][1], rmat[2][1],
+ rmat[0][2], rmat[1][2], rmat[2][2]);
+ GetJointRotation(jointRot, ikchan->jointType, ikchan->jointValue);
+ ikchan->jointValid = 1;
+ }
+ // determine which part of jointValue is used for this joint
+ // closely related to the way the joints are defined
+ switch (ikchan->jointType & ~IK_TRANSY)
+ {
+ case IK_XDOF:
+ case IK_YDOF:
+ case IK_ZDOF:
+ dof = 0;
+ break;
+ case IK_XDOF|IK_YDOF:
+ // X + Y
+ dof = (_values[0].id == iTaSC::Armature::ID_JOINT_RX) ? 0 : 1;
+ break;
+ case IK_SWING:
+ // XZ
+ dof = 0;
+ break;
+ case IK_YDOF|IK_ZDOF:
+ // Z + Y
+ dof = (_values[0].id == iTaSC::Armature::ID_JOINT_RZ) ? 0 : 1;
+ break;
+ case IK_SWING|IK_YDOF:
+ // XZ + Y
+ dof = (_values[0].id == iTaSC::Armature::ID_JOINT_RY) ? 2 : 0;
+ break;
+ case IK_REVOLUTE:
+ dof = 0;
+ break;
+ default:
+ dof = -1;
+ break;
+ }
+ if (dof >= 0) {
+ for (unsigned int i=0; i<_nvalues; i++, dof++) {
+ _values[i].values[0].yd = ikchan->jointValue[dof];
+ _values[i].alpha = chan->ikrotweight;
+ _values[i].feedback = ikparam->feedback;
+ }
+ }
+ return true;
+}
+
+// build array of joint corresponding to IK chain
+static int convert_channels(IK_Scene *ikscene, PoseTree *tree)
+{
+ IK_Channel *ikchan;
+ bPoseChannel *pchan;
+ Bone *bone;
+ int a, flag, njoint;
+
+ njoint = 0;
+ for(a=0, ikchan = ikscene->channels; a<ikscene->numchan; ++a, ++ikchan) {
+ pchan= tree->pchan[a];
+ bone= pchan->bone;
+ ikchan->pchan = pchan;
+ ikchan->parent = (a>0) ? tree->parent[a] : -1;
+ ikchan->owner = ikscene->blArmature;
+
+ /* set DoF flag */
+ flag = 0;
+ if(!(pchan->ikflag & BONE_IK_NO_XDOF) && !(pchan->ikflag & BONE_IK_NO_XDOF_TEMP) &&
+ (!(pchan->ikflag & BONE_IK_XLIMIT) || pchan->limitmin[0]<0.f || pchan->limitmax[0]>0.f))
+ flag |= IK_XDOF;
+ if(!(pchan->ikflag & BONE_IK_NO_YDOF) && !(pchan->ikflag & BONE_IK_NO_YDOF_TEMP) &&
+ (!(pchan->ikflag & BONE_IK_YLIMIT) || pchan->limitmin[1]<0.f || pchan->limitmax[1]>0.f))
+ flag |= IK_YDOF;
+ if(!(pchan->ikflag & BONE_IK_NO_ZDOF) && !(pchan->ikflag & BONE_IK_NO_ZDOF_TEMP) &&
+ (!(pchan->ikflag & BONE_IK_ZLIMIT) || pchan->limitmin[2]<0.f || pchan->limitmax[2]>0.f))
+ flag |= IK_ZDOF;
+
+ if(tree->stretch && (pchan->ikstretch > 0.0)) {
+ flag |= IK_TRANSY;
+ }
+ /*
+ Logic to create the segments:
+ RX,RY,RZ = rotational joints with no length
+ RY(tip) = rotational joints with a fixed length arm = (0,length,0)
+ TY = translational joint on Y axis
+ F(pos) = fixed joint with an arm at position pos
+ Conversion rule of the above flags:
+ - ==> F(tip)
+ X ==> RX(tip)
+ Y ==> RY(tip)
+ Z ==> RZ(tip)
+ XY ==> RX+RY(tip)
+ XZ ==> RX+RZ(tip)
+ YZ ==> RZ+RY(tip)
+ XYZ ==> full spherical unless there are limits, in which case RX+RZ+RY(tip)
+ In case of stretch, tip=(0,0,0) and there is an additional TY joint
+ The frame at last of these joints represents the tail of the bone.
+ The head is computed by a reverse translation on Y axis of the bone length
+ or in case of TY joint, by the frame at previous joint.
+ In case of separation of bones, there is an additional F(head) joint
+
+ Computing rest pose and length is complicated: the solver works in world space
+ Here is the logic:
+ rest position is computed only from bone->bone_mat.
+ bone length is computed from bone->length multiplied by the scaling factor of
+ the armature. Non-uniform scaling will give bad result!
+
+ */
+ switch (flag & (IK_XDOF|IK_YDOF|IK_ZDOF))
+ {
+ default:
+ ikchan->jointType = 0;
+ ikchan->ndof = 0;
+ break;
+ case IK_XDOF:
+ // RX only, get the X rotation
+ ikchan->jointType = IK_XDOF;
+ ikchan->ndof = 1;
+ break;
+ case IK_YDOF:
+ // RY only, get the Y rotation
+ ikchan->jointType = IK_YDOF;
+ ikchan->ndof = 1;
+ break;
+ case IK_ZDOF:
+ // RZ only, get the Zz rotation
+ ikchan->jointType = IK_ZDOF;
+ ikchan->ndof = 1;
+ break;
+ case IK_XDOF|IK_YDOF:
+ ikchan->jointType = IK_XDOF|IK_YDOF;
+ ikchan->ndof = 2;
+ break;
+ case IK_XDOF|IK_ZDOF:
+ // RX+RZ
+ ikchan->jointType = IK_SWING;
+ ikchan->ndof = 2;
+ break;
+ case IK_YDOF|IK_ZDOF:
+ // RZ+RY
+ ikchan->jointType = IK_ZDOF|IK_YDOF;
+ ikchan->ndof = 2;
+ break;
+ case IK_XDOF|IK_YDOF|IK_ZDOF:
+ // spherical joint
+ if (pchan->ikflag & (BONE_IK_XLIMIT|BONE_IK_YLIMIT|BONE_IK_ZLIMIT))
+ // decompose in a Swing+RotY joint
+ ikchan->jointType = IK_SWING|IK_YDOF;
+ else
+ ikchan->jointType = IK_REVOLUTE;
+ ikchan->ndof = 3;
+ break;
+ }
+ if (flag & IK_TRANSY) {
+ ikchan->jointType |= IK_TRANSY;
+ ikchan->ndof++;
+ }
+ njoint += ikchan->ndof;
+ }
+ // njoint is the joint coordinate, create the Joint Array
+ ikscene->jointArray.resize(njoint);
+ ikscene->numjoint = njoint;
+ return njoint;
+}
+
+// compute array of joint value corresponding to current pose
+static void convert_pose(IK_Scene *ikscene)
+{
+ KDL::Rotation boneRot;
+ bPoseChannel *pchan;
+ IK_Channel *ikchan;
+ Bone *bone;
+ float rmat[4][4]; // rest pose of bone with parent taken into account
+ float bmat[4][4]; // difference
+ float scale;
+ double *rot;
+ int a, joint;
+
+ // assume uniform scaling and take Y scale as general scale for the armature
+ scale = VecLength(ikscene->blArmature->obmat[1]);
+ rot = &ikscene->jointArray(0);
+ for(joint=a=0, ikchan = ikscene->channels; a<ikscene->numchan && joint<ikscene->numjoint; ++a, ++ikchan) {
+ pchan= ikchan->pchan;
+ bone= pchan->bone;
+
+ if (pchan->parent) {
+ Mat4One(bmat);
+ Mat4MulMat43(bmat, pchan->parent->pose_mat, bone->bone_mat);
+ } else {
+ Mat4CpyMat4(bmat, bone->arm_mat);
+ }
+ Mat4Invert(rmat, bmat);
+ Mat4MulMat4(bmat, pchan->pose_mat, rmat);
+ Mat4Ortho(bmat);
+ boneRot.setValue(bmat[0]);
+ GetJointRotation(boneRot, ikchan->jointType, rot);
+ if (ikchan->jointType & IK_TRANSY) {
+ // compute actual length
+ rot[ikchan->ndof-1] = VecLenf(pchan->pose_tail, pchan->pose_head) * scale;
+ }
+ rot += ikchan->ndof;
+ joint += ikchan->ndof;
+ }
+}
+
+// compute array of joint value corresponding to current pose
+static void rest_pose(IK_Scene *ikscene)
+{
+ bPoseChannel *pchan;
+ IK_Channel *ikchan;
+ Bone *bone;
+ float scale;
+ double *rot;
+ int a, joint;
+
+ // assume uniform scaling and take Y scale as general scale for the armature
+ scale = VecLength(ikscene->blArmature->obmat[1]);
+ // rest pose is 0
+ KDL::SetToZero(ikscene->jointArray);
+ // except for transY joints
+ rot = &ikscene->jointArray(0);
+ for(joint=a=0, ikchan = ikscene->channels; a<ikscene->numchan && joint<ikscene->numjoint; ++a, ++ikchan) {
+ pchan= ikchan->pchan;
+ bone= pchan->bone;
+
+ if (ikchan->jointType & IK_TRANSY)
+ rot[ikchan->ndof-1] = bone->length*scale;
+ rot += ikchan->ndof;
+ joint += ikchan->ndof;
+ }
+}
+
+static IK_Scene* convert_tree(Scene *blscene, Object *ob, bPoseChannel *pchan)
+{
+ PoseTree *tree = (PoseTree*)pchan->iktree.first;
+ PoseTarget *target;
+ bKinematicConstraint *condata;
+ bConstraint *polarcon;
+ bItasc *ikparam;
+ iTaSC::Armature* arm;
+ iTaSC::Scene* scene;
+ IK_Scene* ikscene;
+ IK_Channel* ikchan;
+ KDL::Frame initPose;
+ KDL::Rotation boneRot;
+ Bone *bone;
+ int a, numtarget;
+ unsigned int t;
+ float length;
+ bool ret = true, ingame;
+ double *rot;
+
+ if (tree->totchannel == 0)
+ return NULL;
+
+ ikscene = new IK_Scene;
+ arm = new iTaSC::Armature();
+ scene = new iTaSC::Scene();
+ ikscene->channels = new IK_Channel[tree->totchannel];
+ ikscene->numchan = tree->totchannel;
+ ikscene->armature = arm;
+ ikscene->scene = scene;
+ ikparam = (bItasc*)ob->pose->ikparam;
+ ingame = (ob->pose->flag & POSE_GAME_ENGINE);
+ if (!ikparam) {
+ // you must have our own copy
+ ikparam = &DefIKParam;
+ } else if (ingame) {
+ // tweak the param when in game to have efficient stepping
+ // using fixed substep is not effecient since frames in the GE are often
+ // shorter than in animation => move to auto step automatically and set
+ // the target substep duration via min/max
+ if (!(ikparam->flag & ITASC_AUTO_STEP)) {
+ float timestep = blscene->r.frs_sec_base/blscene->r.frs_sec;
+ if (ikparam->numstep > 0)
+ timestep /= ikparam->numstep;
+ // with equal min and max, the algorythm will take this step and the indicative substep most of the time
+ ikparam->minstep = ikparam->maxstep = timestep;
+ ikparam->flag |= ITASC_AUTO_STEP;
+ }
+ }
+ if ((ikparam->flag & ITASC_SIMULATION) && !ingame)
+ // no cache in animation mode
+ ikscene->cache = new iTaSC::Cache();
+
+ switch (ikparam->solver) {
+ case ITASC_SOLVER_SDLS:
+ ikscene->solver = new iTaSC::WSDLSSolver();
+ break;
+ case ITASC_SOLVER_DLS:
+ ikscene->solver = new iTaSC::WDLSSolver();
+ break;
+ default:
+ delete ikscene;
+ return NULL;
+ }
+ ikscene->blArmature = ob;
+
+ std::string joint;
+ std::string root("root");
+ std::string parent;
+ std::vector<double> weights;
+ double weight[3];
+ // assume uniform scaling and take Y scale as general scale for the armature
+ float scale = VecLength(ob->obmat[1]);
+ // build the array of joints corresponding to the IK chain
+ convert_channels(ikscene, tree);
+ if (ingame) {
+ // in the GE, set the initial joint angle to match the current pose
+ // this will update the jointArray in ikscene
+ convert_pose(ikscene);
+ } else {
+ // in Blender, the rest pose is always 0 for joints
+ rest_pose(ikscene);
+ }
+ rot = &ikscene->jointArray(0);
+ for(a=0, ikchan = ikscene->channels; a<tree->totchannel; ++a, ++ikchan) {
+ pchan= ikchan->pchan;
+ bone= pchan->bone;
+
+ KDL::Frame tip(iTaSC::F_identity);
+ Vector3 *fl = bone->bone_mat;
+ KDL::Frame head(KDL::Rotation(
+ fl[0][0], fl[1][0], fl[2][0],
+ fl[0][1], fl[1][1], fl[2][1],
+ fl[0][2], fl[1][2], fl[2][2]),
+ KDL::Vector(bone->head[0], bone->head[1], bone->head[2])*scale);
+
+ // rest pose length of the bone taking scaling into account
+ length= bone->length*scale;
+ parent = (a > 0) ? ikscene->channels[tree->parent[a]].tail : root;
+ // first the fixed segment to the bone head
+ if (head.p.Norm() > KDL::epsilon || head.M.GetRot().Norm() > KDL::epsilon) {
+ joint = bone->name;
+ joint += ":H";
+ ret = arm->addSegment(joint, parent, KDL::Joint::None, 0.0, head);
+ parent = joint;
+ }
+ if (!(ikchan->jointType & IK_TRANSY)) {
+ // fixed length, put it in tip
+ tip.p[1] = length;
+ }
+ joint = bone->name;
+ weight[0] = (1.0-pchan->stiffness[0]);
+ weight[1] = (1.0-pchan->stiffness[1]);
+ weight[2] = (1.0-pchan->stiffness[2]);
+ switch (ikchan->jointType & ~IK_TRANSY)
+ {
+ case 0:
+ // fixed bone
+ if (!(ikchan->jointType & IK_TRANSY)) {
+ joint += ":F";
+ ret = arm->addSegment(joint, parent, KDL::Joint::None, 0.0, tip);
+ }
+ break;
+ case IK_XDOF:
+ // RX only, get the X rotation
+ joint += ":RX";
+ ret = arm->addSegment(joint, parent, KDL::Joint::RotX, rot[0], tip);
+ weights.push_back(weight[0]);
+ break;
+ case IK_YDOF:
+ // RY only, get the Y rotation
+ joint += ":RY";
+ ret = arm->addSegment(joint, parent, KDL::Joint::RotY, rot[0], tip);
+ weights.push_back(weight[1]);
+ break;
+ case IK_ZDOF:
+ // RZ only, get the Zz rotation
+ joint += ":RZ";
+ ret = arm->addSegment(joint, parent, KDL::Joint::RotZ, rot[0], tip);
+ weights.push_back(weight[2]);
+ break;
+ case IK_XDOF|IK_YDOF:
+ joint += ":RX";
+ ret = arm->addSegment(joint, parent, KDL::Joint::RotX, rot[0]);
+ weights.push_back(weight[0]);
+ if (ret) {
+ parent = joint;
+ joint = bone->name;
+ joint += ":RY";
+ ret = arm->addSegment(joint, parent, KDL::Joint::RotY, rot[1], tip);
+ weights.push_back(weight[1]);
+ }
+ break;
+ case IK_SWING:
+ joint += ":SW";
+ ret = arm->addSegment(joint, parent, KDL::Joint::Swing, rot[0], tip);
+ weights.push_back(weight[0]);
+ weights.push_back(weight[2]);
+ break;
+ case IK_YDOF|IK_ZDOF:
+ // RZ+RY
+ joint += ":RZ";
+ ret = arm->addSegment(joint, parent, KDL::Joint::RotZ, rot[0]);
+ weights.push_back(weight[2]);
+ if (ret) {
+ parent = joint;
+ joint = bone->name;
+ joint += ":RY";
+ ret = arm->addSegment(joint, parent, KDL::Joint::RotY, rot[1], tip);
+ weights.push_back(weight[1]);
+ }
+ break;
+ case IK_SWING|IK_YDOF:
+ // decompose in a Swing+RotY joint
+ joint += ":SW";
+ ret = arm->addSegment(joint, parent, KDL::Joint::Swing, rot[0]);
+ weights.push_back(weight[0]);
+ weights.push_back(weight[2]);
+ if (ret) {
+ parent = joint;
+ joint = bone->name;
+ joint += ":RY";
+ ret = arm->addSegment(joint, parent, KDL::Joint::RotY, rot[2], tip);
+ weights.push_back(weight[1]);
+ }
+ break;
+ case IK_REVOLUTE:
+ joint += ":SJ";
+ ret = arm->addSegment(joint, parent, KDL::Joint::Sphere, rot[0], tip);
+ weights.push_back(weight[0]);
+ weights.push_back(weight[1]);
+ weights.push_back(weight[2]);
+ break;
+ }
+ if (ret && (ikchan->jointType & IK_TRANSY)) {
+ parent = joint;
+ joint = bone->name;
+ joint += ":TY";
+ ret = arm->addSegment(joint, parent, KDL::Joint::TransY, rot[ikchan->ndof-1]);
+ float ikstretch = pchan->ikstretch*pchan->ikstretch;
+ weight[1] = (1.0-MIN2(1.0-ikstretch, 0.99));
+ weights.push_back(weight[1]);
+ }
+ if (!ret)
+ // error making the armature??
+ break;
+ // joint points to the segment that correspond to the bone per say
+ ikchan->tail = joint;
+ ikchan->head = parent;
+ // in case of error
+ ret = false;
+ if ((ikchan->jointType & IK_XDOF) && (pchan->ikflag & (BONE_IK_XLIMIT|BONE_IK_ROTCTL))) {
+ joint = bone->name;
+ joint += ":RX";
+ if (pchan->ikflag & BONE_IK_XLIMIT) {
+ if (arm->addLimitConstraint(joint, 0, pchan->limitmin[0], pchan->limitmax[0]) < 0)
+ break;
+ }
+ if (pchan->ikflag & BONE_IK_ROTCTL) {
+ if (arm->addConstraint(joint, joint_callback, ikchan, false, false) < 0)
+ break;
+ }
+ }
+ if ((ikchan->jointType & IK_YDOF) && (pchan->ikflag & (BONE_IK_YLIMIT|BONE_IK_ROTCTL))) {
+ joint = bone->name;
+ joint += ":RY";
+ if (pchan->ikflag & BONE_IK_YLIMIT) {
+ if (arm->addLimitConstraint(joint, 0, pchan->limitmin[1], pchan->limitmax[1]) < 0)
+ break;
+ }
+ if (pchan->ikflag & BONE_IK_ROTCTL) {
+ if (arm->addConstraint(joint, joint_callback, ikchan, false, false) < 0)
+ break;
+ }
+ }
+ if ((ikchan->jointType & IK_ZDOF) && (pchan->ikflag & (BONE_IK_ZLIMIT|BONE_IK_ROTCTL))) {
+ joint = bone->name;
+ joint += ":RZ";
+ if (pchan->ikflag & BONE_IK_ZLIMIT) {
+ if (arm->addLimitConstraint(joint, 0, pchan->limitmin[2], pchan->limitmax[2]) < 0)
+ break;
+ }
+ if (pchan->ikflag & BONE_IK_ROTCTL) {
+ if (arm->addConstraint(joint, joint_callback, ikchan, false, false) < 0)
+ break;
+ }
+ }
+ if ((ikchan->jointType & IK_SWING) && (pchan->ikflag & (BONE_IK_XLIMIT|BONE_IK_ZLIMIT|BONE_IK_ROTCTL))) {
+ joint = bone->name;
+ joint += ":SW";
+ if (pchan->ikflag & BONE_IK_XLIMIT) {
+ if (arm->addLimitConstraint(joint, 0, pchan->limitmin[0], pchan->limitmax[0]) < 0)
+ break;
+ }
+ if (pchan->ikflag & BONE_IK_ZLIMIT) {
+ if (arm->addLimitConstraint(joint, 1, pchan->limitmin[2], pchan->limitmax[2]) < 0)
+ break;
+ }
+ if (pchan->ikflag & BONE_IK_ROTCTL) {
+ if (arm->addConstraint(joint, joint_callback, ikchan, false, false) < 0)
+ break;
+ }
+ }
+ if ((ikchan->jointType & IK_REVOLUTE) && (pchan->ikflag & BONE_IK_ROTCTL)) {
+ joint = bone->name;
+ joint += ":SJ";
+ if (arm->addConstraint(joint, joint_callback, ikchan, false, false) < 0)
+ break;
+ }
+ // no error, so restore
+ ret = true;
+ rot += ikchan->ndof;
+ }
+ if (!ret) {
+ delete ikscene;
+ return NULL;
+ }
+ // for each target, we need to add an end effector in the armature
+ for (numtarget=0, polarcon=NULL, ret = true, target=(PoseTarget*)tree->targets.first; target; target=(PoseTarget*)target->next) {
+ condata= (bKinematicConstraint*)target->con->data;
+ pchan = tree->pchan[target->tip];
+
+ if (is_cartesian_constraint(target->con)) {
+ // add the end effector
+ IK_Target* iktarget = new IK_Target();
+ ikscene->targets.push_back(iktarget);
+ iktarget->ee = arm->addEndEffector(ikscene->channels[target->tip].tail);
+ if (iktarget->ee == -1) {
+ ret = false;
+ break;
+ }
+ // initialize all the fields that we can set at this time
+ iktarget->blenderConstraint = target->con;
+ iktarget->channel = target->tip;
+ iktarget->simulation = (ikparam->flag & ITASC_SIMULATION);
+ iktarget->rootChannel = ikscene->channels[0].pchan;
+ iktarget->owner = ob;
+ iktarget->targetName = pchan->bone->name;
+ iktarget->targetName += ":T:";
+ iktarget->targetName += target->con->name;
+ iktarget->constraintName = pchan->bone->name;
+ iktarget->constraintName += ":C:";
+ iktarget->constraintName += target->con->name;
+ numtarget++;
+ if (condata->poletar)
+ // this constraint has a polar target
+ polarcon = target->con;
+ }
+ }
+ // deal with polar target if any
+ if (numtarget == 1 && polarcon) {
+ ikscene->polarConstraint = polarcon;
+ }
+ // we can now add the armature
+ // the armature is based on a moving frame.
+ // initialize with the correct position in case there is no cache
+ base_callback(iTaSC::Timestamp(), iTaSC::F_identity, initPose, ikscene);
+ ikscene->base = new iTaSC::MovingFrame(initPose);
+ ikscene->base->setCallback(base_callback, ikscene);
+ std::string armname;
+ armname = ob->id.name;
+ armname += ":B";
+ ret = scene->addObject(armname, ikscene->base);
+ armname = ob->id.name;
+ armname += ":AR";
+ if (ret)
+ ret = scene->addObject(armname, ikscene->armature, ikscene->base);
+ if (!ret) {
+ delete ikscene;
+ return NULL;
+ }
+ // set the weight
+ e_matrix& Wq = arm->getWq();
+ assert(Wq.cols() == (int)weights.size());
+ for (int q=0; q<Wq.cols(); q++)
+ Wq(q,q)=weights[q];
+ // get the inverse rest pose frame of the base to compute relative rest pose of end effectors
+ // this is needed to handle the enforce parameter
+ // ikscene->pchan[0] is the root channel of the tree
+ // if it has no parent, then it's just the identify Frame
+ float invBaseFrame[4][4];
+ pchan = ikscene->channels[0].pchan;
+ if (pchan->parent) {
+ // it has a parent, get the pose matrix from it
+ float baseFrame[4][4];
+ pchan = pchan->parent;
+ Mat4CpyMat4(baseFrame, pchan->bone->arm_mat);
+ // move to the tail and scale to get rest pose of armature base
+ VecCopyf(baseFrame[3], pchan->bone->arm_tail);
+ Mat4Invert(invBaseFrame, baseFrame);
+ } else {
+ Mat4One(invBaseFrame);
+ }
+ // finally add the constraint
+ for (t=0; t<ikscene->targets.size(); t++) {
+ IK_Target* iktarget = ikscene->targets[t];
+ condata= (bKinematicConstraint*)iktarget->blenderConstraint->data;
+ pchan = tree->pchan[iktarget->channel];
+ unsigned int controltype, bonecnt;
+ double bonelen;
+ float mat[4][4];
+
+ // add the end effector
+ // estimate the average bone length, used to clamp feedback error
+ for (bonecnt=0, bonelen=0.f, a=iktarget->channel; a>=0; a=tree->parent[a], bonecnt++)
+ bonelen += scale*tree->pchan[a]->bone->length;
+ bonelen /= bonecnt;
+
+ // store the rest pose of the end effector to compute enforce target
+ Mat4CpyMat4(mat, pchan->bone->arm_mat);
+ VecCopyf(mat[3], pchan->bone->arm_tail);
+ // get the rest pose relative to the armature base
+ Mat4MulMat4(iktarget->eeRest, mat, invBaseFrame);
+ iktarget->eeBlend = (!ikscene->polarConstraint && condata->type==CONSTRAINT_IK_COPYPOSE) ? true : false;
+ // use target_callback to make sure the initPose includes enforce coefficient
+ target_callback(iTaSC::Timestamp(), iTaSC::F_identity, initPose, iktarget);
+ iktarget->target = new iTaSC::MovingFrame(initPose);
+ iktarget->target->setCallback(target_callback, iktarget);
+ ret = scene->addObject(iktarget->targetName, iktarget->target);
+ if (!ret)
+ break;
+
+ switch (condata->type) {
+ case CONSTRAINT_IK_COPYPOSE:
+ controltype = 0;
+ if ((condata->flag & CONSTRAINT_IK_ROT) && (condata->orientweight != 0.0))
+ controltype |= iTaSC::CopyPose::CTL_ROTATION;
+ if ((condata->weight != 0.0))
+ controltype |= iTaSC::CopyPose::CTL_POSITION;
+ if (controltype) {
+ iktarget->constraint = new iTaSC::CopyPose(controltype, controltype, bonelen);
+ // set the gain
+ if (controltype & iTaSC::CopyPose::CTL_POSITION)
+ iktarget->constraint->setControlParameter(iTaSC::CopyPose::ID_POSITION, iTaSC::ACT_ALPHA, condata->weight);
+ if (controltype & iTaSC::CopyPose::CTL_ROTATION)
+ iktarget->constraint->setControlParameter(iTaSC::CopyPose::ID_ROTATION, iTaSC::ACT_ALPHA, condata->orientweight);
+ iktarget->constraint->registerCallback(copypose_callback, iktarget);
+ iktarget->errorCallback = copypose_error;
+ iktarget->controlType = controltype;
+ // add the constraint
+ ret = scene->addConstraintSet(iktarget->constraintName, iktarget->constraint, armname, iktarget->targetName, ikscene->channels[iktarget->channel].tail);
+ }
+ break;
+ case CONSTRAINT_IK_DISTANCE:
+ iktarget->constraint = new iTaSC::Distance(bonelen);
+ iktarget->constraint->setControlParameter(iTaSC::Distance::ID_DISTANCE, iTaSC::ACT_VALUE, condata->dist);
+ iktarget->constraint->registerCallback(distance_callback, iktarget);
+ iktarget->errorCallback = distance_error;
+ // we can update the weight on each substep
+ iktarget->constraint->substep(true);
+ // add the constraint
+ ret = scene->addConstraintSet(iktarget->constraintName, iktarget->constraint, armname, iktarget->targetName, ikscene->channels[iktarget->channel].tail);
+ break;
+ }
+ if (!ret)
+ break;
+ }
+ if (!ret ||
+ !scene->addCache(ikscene->cache) ||
+ !scene->addSolver(ikscene->solver) ||
+ !scene->initialize()) {
+ delete ikscene;
+ ikscene = NULL;
+ }
+ return ikscene;
+}
+
+static void create_scene(Scene *scene, Object *ob)
+{
+ bPoseChannel *pchan;
+
+ // create the IK scene
+ for(pchan= (bPoseChannel *)ob->pose->chanbase.first; pchan; pchan= (bPoseChannel *)pchan->next) {
+ // by construction there is only one tree
+ PoseTree *tree = (PoseTree*)pchan->iktree.first;
+ if (tree) {
+ IK_Data* ikdata = get_ikdata(ob->pose);
+ // convert tree in iTaSC::Scene
+ IK_Scene* ikscene = convert_tree(scene, ob, pchan);
+ if (ikscene) {
+ ikscene->next = ikdata->first;
+ ikdata->first = ikscene;
+ }
+ // delete the trees once we are done
+ while(tree) {
+ BLI_remlink(&pchan->iktree, tree);
+ BLI_freelistN(&tree->targets);
+ if(tree->pchan) MEM_freeN(tree->pchan);
+ if(tree->parent) MEM_freeN(tree->parent);
+ if(tree->basis_change) MEM_freeN(tree->basis_change);
+ MEM_freeN(tree);
+ tree = (PoseTree*)pchan->iktree.first;
+ }
+ }
+ }
+}
+
+static void init_scene(Object *ob)
+{
+ if (ob->pose->ikdata) {
+ for(IK_Scene* scene = ((IK_Data*)ob->pose->ikdata)->first;
+ scene != NULL;
+ scene = scene->next) {
+ scene->channels[0].pchan->flag |= POSE_IKTREE;
+ }
+ }
+}
+
+static void execute_scene(Scene* blscene, IK_Scene* ikscene, bItasc* ikparam, float ctime, float frtime)
+{
+ int i;
+ IK_Channel* ikchan;
+ if (ikparam->flag & ITASC_SIMULATION) {
+ for (i=0, ikchan=ikscene->channels; i<ikscene->numchan; i++, ++ikchan) {
+ // In simulation mode we don't allow external contraint to change our bones, mark the channel done
+ // also tell Blender that this channel is part of IK tree (cleared on each where_is_pose()
+ ikchan->pchan->flag |= (POSE_DONE|POSE_CHAIN);
+ ikchan->jointValid = 0;
+ }
+ } else {
+ // in animation mode, we must get the bone position from action and constraints
+ for(i=0, ikchan=ikscene->channels; i<ikscene->numchan; i++, ++ikchan) {
+ if (!(ikchan->pchan->flag & POSE_DONE))
+ where_is_pose_bone(blscene, ikscene->blArmature, ikchan->pchan, ctime);
+ // tell blender that this channel was controlled by IK, it's cleared on each where_is_pose()
+ ikchan->pchan->flag |= (POSE_DONE|POSE_CHAIN);
+ ikchan->jointValid = 0;
+ }
+ }
+ // only run execute the scene if at least one of our target is enabled
+ for (i=ikscene->targets.size(); i > 0; --i) {
+ IK_Target* iktarget = ikscene->targets[i-1];
+ if (!(iktarget->blenderConstraint->flag & CONSTRAINT_OFF))
+ break;
+ }
+ if (i == 0 && ikscene->armature->getNrOfConstraints() == 0)
+ // all constraint disabled
+ return;
+
+ // compute timestep
+ double timestamp = ctime * frtime + 2147483.648;
+ double timestep = frtime;
+ bool reiterate = (ikparam->flag & ITASC_REITERATION) ? true : false;
+ int numstep = (ikparam->flag & ITASC_AUTO_STEP) ? 0 : ikparam->numstep;
+ bool simulation = true;
+
+ if (ikparam->flag & ITASC_SIMULATION) {
+ ikscene->solver->setParam(iTaSC::Solver::DLS_QMAX, ikparam->maxvel);
+ }
+ else {
+ // in animation mode we start from the pose after action and constraint
+ convert_pose(ikscene);
+ ikscene->armature->setJointArray(ikscene->jointArray);
+ // and we don't handle velocity
+ reiterate = true;
+ simulation = false;
+ // time is virtual, so take fixed value for velocity parameters (see itasc_update_param)
+ // and choose 1s timestep to allow having velocity parameters in radiant
+ timestep = 1.0;
+ // use auto setup to let the solver test the variation of the joints
+ numstep = 0;
+ }
+
+ if (ikscene->cache && !reiterate && simulation) {
+ iTaSC::CacheTS sts, cts;
+ sts = cts = (iTaSC::CacheTS)(timestamp*1000.0+0.5);
+ if (ikscene->cache->getPreviousCacheItem(ikscene->armature, 0, &cts) == NULL || cts == 0) {
+ // the cache is empty before this time, reiterate
+ if (ikparam->flag & ITASC_INITIAL_REITERATION)
+ reiterate = true;
+ } else {
+ // can take the cache as a start point.
+ sts -= cts;
+ timestep = sts/1000.0;
+ }
+ }
+ // don't cache if we are reiterating because we don't want to distroy the cache unnecessarily
+ ikscene->scene->update(timestamp, timestep, numstep, false, !reiterate, simulation);
+ if (reiterate) {
+ // how many times do we reiterate?
+ for (i=0; i<ikparam->numiter; i++) {
+ if (ikscene->armature->getMaxJointChange() < ikparam->precision ||
+ ikscene->armature->getMaxEndEffectorChange() < ikparam->precision)
+ break;
+ ikscene->scene->update(timestamp, timestep, numstep, true, false, simulation);
+ }
+ if (simulation) {
+ // one more fake iteration to cache
+ ikscene->scene->update(timestamp, 0.0, 1, true, true, true);
+ }
+ }
+ // compute constraint error
+ for (i=ikscene->targets.size(); i > 0; --i) {
+ IK_Target* iktarget = ikscene->targets[i-1];
+ if (!(iktarget->blenderConstraint->flag & CONSTRAINT_OFF)) {
+ unsigned int nvalues;
+ const iTaSC::ConstraintValues* values;
+ values = iktarget->constraint->getControlParameters(&nvalues);
+ iktarget->errorCallback(values, nvalues, iktarget);
+ }
+ }
+ // Apply result to bone:
+ // walk the ikscene->channels
+ // for each, get the Frame of the joint corresponding to the bone relative to its parent
+ // combine the parent and the joint frame to get the frame relative to armature
+ // a backward translation of the bone length gives the head
+ // if TY, compute the scale as the ratio of the joint length with rest pose length
+ iTaSC::Armature* arm = ikscene->armature;
+ KDL::Frame frame;
+ double q_rest[3], q[3];
+ const KDL::Joint* joint;
+ const KDL::Frame* tip;
+ bPoseChannel* pchan;
+ float scale;
+ float length;
+ float yaxis[3];
+ for (i=0, ikchan=ikscene->channels; i<ikscene->numchan; ++i, ++ikchan) {
+ if (i == 0) {
+ if (!arm->getRelativeFrame(frame, ikchan->tail))
+ break;
+ // this frame is relative to base, make it relative to object
+ ikchan->frame = ikscene->baseFrame * frame;
+ }
+ else {
+ if (!arm->getRelativeFrame(frame, ikchan->tail, ikscene->channels[ikchan->parent].tail))
+ break;
+ // combine with parent frame to get frame relative to object
+ ikchan->frame = ikscene->channels[ikchan->parent].frame * frame;
+ }
+ // ikchan->frame is the tail frame relative to object
+ // get bone length
+ if (!arm->getSegment(ikchan->tail, 3, joint, q_rest[0], q[0], tip))
+ break;
+ if (joint->getType() == KDL::Joint::TransY) {
+ // stretch bones have a TY joint, compute the scale
+ scale = (float)(q[0]/q_rest[0]);
+ // the length is the joint itself
+ length = (float)q[0];
+ }
+ else {
+ scale = 1.0f;
+ // for fixed bone, the length is in the tip (always along Y axis)
+ length = tip->p(1);
+ }
+ // ready to compute the pose mat
+ pchan = ikchan->pchan;
+ // tail mat
+ ikchan->frame.getValue(&pchan->pose_mat[0][0]);
+ VECCOPY(pchan->pose_tail, pchan->pose_mat[3]);
+ // shift to head
+ VECCOPY(yaxis, pchan->pose_mat[1]);
+ VecMulf(yaxis, length);
+ VecSubf(pchan->pose_mat[3], pchan->pose_mat[3], yaxis);
+ VECCOPY(pchan->pose_head, pchan->pose_mat[3]);
+ // add scale
+ VecMulf(pchan->pose_mat[0], scale);
+ VecMulf(pchan->pose_mat[1], scale);
+ VecMulf(pchan->pose_mat[2], scale);
+ }
+ if (i<ikscene->numchan) {
+ // big problem
+ ;
+ }
+}
+
+//---------------------------------------------------
+// plugin interface
+//
+void itasc_initialize_tree(struct Scene *scene, Object *ob, float ctime)
+{
+ bPoseChannel *pchan;
+ int count = 0;
+
+ if (ob->pose->ikdata != NULL && !(ob->pose->flag & POSE_WAS_REBUILT)) {
+ init_scene(ob);
+ return;
+ }
+ // first remove old scene
+ itasc_clear_data(ob->pose);
+ // we should handle all the constraint and mark them all disabled
+ // for blender but we'll start with the IK constraint alone
+ for(pchan= (bPoseChannel *)ob->pose->chanbase.first; pchan; pchan= (bPoseChannel *)pchan->next) {
+ if(pchan->constflag & PCHAN_HAS_IK)
+ count += initialize_scene(ob, pchan);
+ }
+ // if at least one tree, create the scenes from the PoseTree stored in the channels
+ if (count)
+ create_scene(scene, ob);
+ itasc_update_param(ob->pose);
+ // make sure we don't rebuilt until the user changes something important
+ ob->pose->flag &= ~POSE_WAS_REBUILT;
+}
+
+void itasc_execute_tree(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime)
+{
+ if (ob->pose->ikdata) {
+ IK_Data* ikdata = (IK_Data*)ob->pose->ikdata;
+ bItasc* ikparam = (bItasc*) ob->pose->ikparam;
+ // we need default parameters
+ if (!ikparam) ikparam = &DefIKParam;
+
+ for (IK_Scene* ikscene = ikdata->first; ikscene; ikscene = ikscene->next) {
+ if (ikscene->channels[0].pchan == pchan) {
+ float timestep = scene->r.frs_sec_base/scene->r.frs_sec;
+ if (ob->pose->flag & POSE_GAME_ENGINE) {
+ timestep = ob->pose->ctime;
+ // limit the timestep to avoid excessive number of iteration
+ if (timestep > 0.2f)
+ timestep = 0.2f;
+ }
+ execute_scene(scene, ikscene, ikparam, ctime, timestep);
+ break;
+ }
+ }
+ }
+}
+
+void itasc_release_tree(struct Scene *scene, struct Object *ob, float ctime)
+{
+ // not used for iTaSC
+}
+
+void itasc_clear_data(struct bPose *pose)
+{
+ if (pose->ikdata) {
+ IK_Data* ikdata = (IK_Data*)pose->ikdata;
+ for (IK_Scene* scene = ikdata->first; scene; scene = ikdata->first) {
+ ikdata->first = scene->next;
+ delete scene;
+ }
+ MEM_freeN(ikdata);
+ pose->ikdata = NULL;
+ }
+}
+
+void itasc_clear_cache(struct bPose *pose)
+{
+ if (pose->ikdata) {
+ IK_Data* ikdata = (IK_Data*)pose->ikdata;
+ for (IK_Scene* scene = ikdata->first; scene; scene = scene->next) {
+ if (scene->cache)
+ // clear all cache but leaving the timestamp 0 (=rest pose)
+ scene->cache->clearCacheFrom(NULL, 1);
+ }
+ }
+}
+
+void itasc_update_param(struct bPose *pose)
+{
+ if (pose->ikdata && pose->ikparam) {
+ IK_Data* ikdata = (IK_Data*)pose->ikdata;
+ bItasc* ikparam = (bItasc*)pose->ikparam;
+ for (IK_Scene* ikscene = ikdata->first; ikscene; ikscene = ikscene->next) {
+ double armlength = ikscene->armature->getArmLength();
+ ikscene->solver->setParam(iTaSC::Solver::DLS_LAMBDA_MAX, ikparam->dampmax*armlength);
+ ikscene->solver->setParam(iTaSC::Solver::DLS_EPSILON, ikparam->dampeps*armlength);
+ if (ikparam->flag & ITASC_SIMULATION) {
+ ikscene->scene->setParam(iTaSC::Scene::MIN_TIMESTEP, ikparam->minstep);
+ ikscene->scene->setParam(iTaSC::Scene::MAX_TIMESTEP, ikparam->maxstep);
+ ikscene->solver->setParam(iTaSC::Solver::DLS_QMAX, ikparam->maxvel);
+ ikscene->armature->setControlParameter(CONSTRAINT_ID_ALL, iTaSC::Armature::ID_JOINT, iTaSC::ACT_FEEDBACK, ikparam->feedback);
+ } else {
+ // in animation mode timestep is 1s by convention =>
+ // qmax becomes radiant and feedback becomes fraction of error gap corrected in one iteration
+ ikscene->scene->setParam(iTaSC::Scene::MIN_TIMESTEP, 1.0);
+ ikscene->scene->setParam(iTaSC::Scene::MAX_TIMESTEP, 1.0);
+ ikscene->solver->setParam(iTaSC::Solver::DLS_QMAX, 0.52);
+ ikscene->armature->setControlParameter(CONSTRAINT_ID_ALL, iTaSC::Armature::ID_JOINT, iTaSC::ACT_FEEDBACK, 0.8);
+ }
+ }
+ }
+}
+
+void itasc_test_constraint(struct Object *ob, struct bConstraint *cons)
+{
+ struct bKinematicConstraint *data = (struct bKinematicConstraint *)cons->data;
+
+ /* only for IK constraint */
+ if (cons->type != CONSTRAINT_TYPE_KINEMATIC || data == NULL)
+ return;
+
+ switch (data->type) {
+ case CONSTRAINT_IK_COPYPOSE:
+ case CONSTRAINT_IK_DISTANCE:
+ /* cartesian space constraint */
+ break;
+ }
+}
+
diff --git a/source/blender/ikplugin/intern/itasc_plugin.h b/source/blender/ikplugin/intern/itasc_plugin.h
new file mode 100644
index 00000000000..25e48965a52
--- /dev/null
+++ b/source/blender/ikplugin/intern/itasc_plugin.h
@@ -0,0 +1,52 @@
+/**
+ * $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.
+ *
+ * Original author: Benoit Bolsee
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef ITASC_PLUGIN_H
+#define ITASC_PLUGIN_H
+
+#include "ikplugin_api.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void itasc_initialize_tree(struct Scene *scene, struct Object *ob, float ctime);
+void itasc_execute_tree(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime);
+void itasc_release_tree(struct Scene *scene, struct Object *ob, float ctime);
+void itasc_clear_data(struct bPose *pose);
+void itasc_clear_cache(struct bPose *pose);
+void itasc_update_param(struct bPose *pose);
+void itasc_test_constraint(struct Object *ob, struct bConstraint *cons);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ITASC_PLUGIN_H
+
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index 6e1a176a5d2..e84a9302bbf 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -190,7 +190,11 @@ void IMB_rect_from_float(struct ImBuf *ibuf)
to = (unsigned char *) ibuf->rect;
}
- if (profile == IB_PROFILE_SRGB && (channels == 3 || channels == 4)) {
+ if(channels==1) {
+ for (i = ibuf->x * ibuf->y; i > 0; i--, to+=4, tof++)
+ to[1]= to[2]= to[3]= to[0] = FTOCHAR(tof[0]);
+ }
+ else if (profile == IB_PROFILE_SRGB) {
if(channels == 3) {
for (i = ibuf->x * ibuf->y; i > 0; i--, to+=4, tof+=3) {
srgb[0]= linearrgb_to_srgb(tof[0]);
@@ -207,12 +211,8 @@ void IMB_rect_from_float(struct ImBuf *ibuf)
floatbuf_to_srgb_byte(tof, to, 0, ibuf->x, 0, ibuf->y, ibuf->x);
}
}
- else if(ELEM(profile, IB_PROFILE_NONE, IB_PROFILE_LINEAR_RGB) && (dither==0.0f || channels!=4)) {
- if(channels==1) {
- for (i = ibuf->x * ibuf->y; i > 0; i--, to+=4, tof++)
- to[1]= to[2]= to[3]= to[0] = FTOCHAR(tof[0]);
- }
- else if(channels==3) {
+ else if(ELEM(profile, IB_PROFILE_NONE, IB_PROFILE_LINEAR_RGB) && dither==0.0f) {
+ if(channels==3) {
for (i = ibuf->x * ibuf->y; i > 0; i--, to+=4, tof+=3) {
to[0] = FTOCHAR(tof[0]);
to[1] = FTOCHAR(tof[1]);
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 318204e3dd8..8d590692794 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -128,12 +128,15 @@ typedef struct bPoseChannel {
void *dual_quat;
void *b_bone_dual_quats;
- float loc[3]; /* transforms - written in by actions or transform */
+ /* transforms - written in by actions or transform */
+ float loc[3];
float size[3];
- float eul[3]; /* rotations - written in by actions or transform (but only euler/quat in use at any one time!) */
- float quat[4];
- short rotmode; /* for now either quat (0), or xyz-euler (1) */
+ /* rotations - written in by actions or transform (but only one representation gets used at any time) */
+ float eul[3]; /* euler rotation */
+ float quat[4]; /* quaternion rotation */
+ float rotAxis[3], rotAngle; /* axis-angle rotation */
+ short rotmode; /* eRotationModes - rotation representation to use */
short pad;
float chan_mat[4][4]; /* matrix result of loc/quat/size , and where we put deform in, see next line */
@@ -146,7 +149,9 @@ typedef struct bPoseChannel {
float limitmin[3], limitmax[3]; /* DOF constraint */
float stiffness[3]; /* DOF stiffness */
float ikstretch;
-
+ float ikrotweight; /* weight of joint rotation constraint */
+ float iklinweight; /* weight of joint stretch constraint */
+
float *path; /* totpath x 3 x float */
struct Object *custom; /* draws custom object instead of this channel */
} bPoseChannel;
@@ -166,7 +171,8 @@ typedef enum ePchan_Flag {
POSE_CHAIN = 0x0200,
POSE_DONE = 0x0400,
POSE_KEY = 0x1000,
- POSE_STRIDE = 0x2000
+ POSE_STRIDE = 0x2000,
+ POSE_IKTREE = 0x4000,
} ePchan_Flag;
/* PoseChannel constflag (constraint detection) */
@@ -190,28 +196,34 @@ typedef enum ePchan_IkFlag {
BONE_IK_YLIMIT = (1<<4),
BONE_IK_ZLIMIT = (1<<5),
+ BONE_IK_ROTCTL = (1<<6),
+ BONE_IK_LINCTL = (1<<7),
+
BONE_IK_NO_XDOF_TEMP = (1<<10),
BONE_IK_NO_YDOF_TEMP = (1<<11),
- BONE_IK_NO_ZDOF_TEMP = (1<<12)
+ BONE_IK_NO_ZDOF_TEMP = (1<<12),
+
} ePchan_IkFlag;
-/* PoseChannel->rotmode */
-typedef enum ePchan_RotMode {
+/* PoseChannel->rotmode and Object->rotmode */
+typedef enum eRotationModes {
/* quaternion rotations (default, and for older Blender versions) */
- PCHAN_ROT_QUAT = 0,
+ ROT_MODE_QUAT = 0,
/* euler rotations - keep in sync with enum in BLI_arithb.h */
- PCHAN_ROT_XYZ = 1, /* Blender 'default' (classic) - must be as 1 to sync with PoseChannel rotmode */
- PCHAN_ROT_XZY,
- PCHAN_ROT_YXZ,
- PCHAN_ROT_YZX,
- PCHAN_ROT_ZXY,
- PCHAN_ROT_ZYX,
+ ROT_MODE_EUL = 1, /* Blender 'default' (classic) - must be as 1 to sync with arithb defines */
+ ROT_MODE_XYZ = 1, /* Blender 'default' (classic) - must be as 1 to sync with arithb defines */
+ ROT_MODE_XZY,
+ ROT_MODE_YXZ,
+ ROT_MODE_YZX,
+ ROT_MODE_ZXY,
+ ROT_MODE_ZYX,
/* NOTE: space is reserved here for 18 other possible
* euler rotation orders not implemented
*/
+ ROT_MODE_MAX, /* sentinel for Py API */
/* axis angle rotations */
- PCHAN_ROT_AXISANGLE = -1
-} ePchan_RotMode;
+ ROT_MODE_AXISANGLE = -1
+} eRotationModes;
/* Pose ------------------------------------ */
@@ -233,7 +245,9 @@ typedef struct bPose {
ListBase agroups; /* list of bActionGroups */
int active_group; /* index of active group (starts from 1) */
- int pad;
+ int iksolver; /* ik solver to use, see ePose_IKSolverType */
+ void *ikdata; /* temporary IK data, depends on the IK solver. Not saved in file */
+ void *ikparam; /* IK solver parameters, structure depends on iksolver */
} bPose;
@@ -249,8 +263,55 @@ typedef enum ePose_Flags {
POSE_CONSTRAINTS_TIMEDEPEND = (1<<3),
/* recalculate bone paths */
POSE_RECALCPATHS = (1<<4),
+ /* set by armature_rebuild_pose to give a chance to the IK solver to rebuild IK tree */
+ POSE_WAS_REBUILT = (1<<5),
+ /* set by game_copy_pose to indicate that this pose is used in the game engine */
+ POSE_GAME_ENGINE = (1<<6),
} ePose_Flags;
+/* IK Solvers ------------------------------------ */
+
+/* bPose->iksolver and bPose->ikparam->iksolver */
+typedef enum {
+ IKSOLVER_LEGACY = 0,
+ IKSOLVER_ITASC,
+} ePose_IKSolverType;
+
+/* header for all bPose->ikparam structures */
+typedef struct bIKParam {
+ int iksolver;
+} bIKParam;
+
+/* bPose->ikparam when bPose->iksolver=1 */
+typedef struct bItasc {
+ int iksolver;
+ float precision;
+ short numiter;
+ short numstep;
+ float minstep;
+ float maxstep;
+ short solver;
+ short flag;
+ float feedback;
+ float maxvel; /* max velocity to SDLS solver */
+ float dampmax; /* maximum damping for DLS solver */
+ float dampeps; /* threshold of singular value from which the damping start progressively */
+} bItasc;
+
+/* bItasc->flag */
+typedef enum {
+ ITASC_AUTO_STEP = (1<<0),
+ ITASC_INITIAL_REITERATION = (1<<1),
+ ITASC_REITERATION = (1<<2),
+ ITASC_SIMULATION = (1<<3),
+} eItasc_Flags;
+
+/* bItasc->solver */
+typedef enum {
+ ITASC_SOLVER_SDLS = 0, /* selective damped least square, suitable for CopyPose constraint */
+ ITASC_SOLVER_DLS /* damped least square with numerical filtering of damping */
+} eItasc_Solver;
+
/* ************************************************ */
/* Action */
@@ -361,6 +422,7 @@ typedef enum DOPESHEET_FILTERFLAG {
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 */
ADS_FILTER_SELEDIT = (1<<3), /* for Graph Editor - used to indicate whether to include a filtering flag or not */
+ ADS_FILTER_SUMMARY = (1<<4), /* for 'DopeSheet' Editor - include 'summary' line */
/* datatype-based filtering */
ADS_FILTER_NOSHAPEKEYS = (1<<6),
@@ -372,18 +434,19 @@ typedef enum DOPESHEET_FILTERFLAG {
ADS_FILTER_NOSCE = (1<<15),
ADS_FILTER_NOPART = (1<<16),
ADS_FILTER_NOMBA = (1<<17),
+ ADS_FILTER_NOARM = (1<<18),
/* 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_NOPART),
+ ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR|ADS_FILTER_NOPART|ADS_FILTER_NOARM),
} DOPESHEET_FILTERFLAG;
/* DopeSheet general flags */
-//typedef enum DOPESHEET_FLAG {
-
-//} DOPESHEET_FLAG;
+typedef enum DOPESHEET_FLAG {
+ ADS_FLAG_SUMMARY_COLLAPSED = (1<<0), /* when summary is shown, it is collapsed, so all other channels get hidden */
+} DOPESHEET_FLAG;
@@ -494,5 +557,4 @@ typedef enum ACHAN_FLAG {
ACHAN_MOVED = (1<<31),
} ACHAN_FLAG;
-
#endif
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
index 278da27faf9..58fa38ae159 100644
--- a/source/blender/makesdna/DNA_actuator_types.h
+++ b/source/blender/makesdna/DNA_actuator_types.h
@@ -142,7 +142,7 @@ typedef struct bGroupActuator {
char name[32]; /* property or groupkey */
short pad[3], cur, butsta, butend;/* not referenced, can remove? */
- struct Group *group; /* only during game */
+ /* struct Group *group; not used, remove */
} bGroupActuator;
@@ -224,6 +224,15 @@ typedef struct bStateActuator {
unsigned int mask; /* the bits to change */
} bStateActuator;
+typedef struct bArmatureActuator {
+ char posechannel[32];
+ char constraint[32];
+ int type; /* 0=run, 1=enable, 2=disable, 3=set target, 4=set weight */
+ float weight;
+ struct Object *target;
+ struct Object *subtarget;
+} bArmatureActuator;
+
typedef struct bActuator {
struct bActuator *next, *prev, *mynew;
short type;
@@ -295,6 +304,7 @@ typedef struct FreeCamera {
#define ACT_PARENT 20
#define ACT_SHAPEACTION 21
#define ACT_STATE 22
+#define ACT_ARMATURE 23
/* actuator flag */
#define ACT_SHOW 1
@@ -484,6 +494,15 @@ typedef struct FreeCamera {
#define ACT_PARENT_COMPOUND 1
#define ACT_PARENT_GHOST 2
+/* armatureactuator->type */
+#define ACT_ARM_RUN 0
+#define ACT_ARM_ENABLE 1
+#define ACT_ARM_DISABLE 2
+#define ACT_ARM_SETTARGET 3
+#define ACT_ARM_SETWEIGHT 4
+/* update this define if more type are addedd */
+#define ACT_ARM_MAXTYPE 4
+
#endif
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index f75ed273164..195d68d63ff 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -246,7 +246,9 @@ typedef struct DriverTarget {
char *rna_path; /* target channel to use as driver value */
int array_index; /* if applicable, the index of the RNA-array item to use as driver */
+ int idtype; /* type of ID-block that this target can use */
int flags; /* flags for the validity of the target */
+ int pad;
char name[64]; /* name of the variable */
} DriverTarget;
@@ -632,7 +634,7 @@ typedef enum eKSP_TemplateTypes {
KSP_TEMPLATE_CONSTRAINT = (1<<2), /* #con - active only */
KSP_TEMPLATE_NODE = (1<<3), /* #nod - selected node */
- KSP_TEMPLATE_PCHAN_ROT = (1<<16), /* modify rotation paths based on rotation mode of Pose Channel */
+ KSP_TEMPLATE_ROT = (1<<16), /* modify rotation paths based on rotation mode of Object or Pose Channel */
} eKSP_TemplateTypes;
/* ---------------- */
@@ -654,8 +656,10 @@ typedef struct KeyingSet {
char name[64]; /* user-viewable name for KeyingSet (for menus, etc.) */
- int flag; /* settings for KeyingSet */
- int keyingflag; /* settings to supply insertkey() with */
+ short flag; /* settings for KeyingSet */
+ short keyingflag; /* settings to supply insertkey() with */
+
+ int active_path; /* index of the active path */
} KeyingSet;
/* KeyingSet settings */
@@ -763,6 +767,11 @@ typedef enum eAnimData_Flag {
/* don't execute drivers */
ADT_DRIVERS_DISABLED = (1<<11),
+ /* AnimData block is selected in UI */
+ ADT_UI_SELECTED = (1<<14),
+ /* AnimData block is active in UI */
+ ADT_UI_ACTIVE = (1<<15),
+
/* F-Curves from this AnimData block are not visible in the Graph Editor */
ADT_CURVES_NOT_VISIBLE = (1<<16),
} eAnimData_Flag;
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index bb60fb107ff..590e7dadcdc 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -31,6 +31,8 @@
#include "DNA_listBase.h"
#include "DNA_ID.h"
+struct AnimData;
+
/* this system works on different transformation space levels;
1) Bone Space; with each Bone having own (0,0,0) origin
@@ -69,6 +71,7 @@ typedef struct Bone {
typedef struct bArmature {
ID id;
+ struct AnimData *adt;
ListBase bonebase;
ListBase chainbase;
ListBase *edbo; /* editbone listbase, we use pointer so we can check state */
@@ -102,7 +105,8 @@ typedef enum eArmature_Flag {
ARM_AUTO_IK = (1<<9),
ARM_NO_CUSTOM = (1<<10), /* made option negative, for backwards compat */
ARM_COL_CUSTOM = (1<<11), /* draw custom colours */
- ARM_GHOST_ONLYSEL = (1<<12) /* when ghosting, only show selected bones (this should belong to ghostflag instead) */
+ ARM_GHOST_ONLYSEL = (1<<12), /* when ghosting, only show selected bones (this should belong to ghostflag instead) */
+ ARM_DS_EXPAND = (1<<13)
} eArmature_Flag;
/* armature->drawtype */
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index a3a1a342584..1bbccd20486 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -56,7 +56,7 @@ typedef struct Brush {
short flag, blend; /* general purpose flag, blend mode */
int size; /* brush diameter */
- float innerradius; /* inner radius after which the falloff starts */
+ float jitter; /* jitter the position of the brush */
float spacing; /* spacing of paint operations */
int smooth_stroke_radius; /* turning radius (in pixels) for smooth stroke */
float smooth_stroke_factor; /* higher values limit fast changes in the stroke direction */
@@ -76,7 +76,7 @@ typedef struct Brush {
#define BRUSH_TORUS 2
#define BRUSH_ALPHA_PRESSURE 4
#define BRUSH_SIZE_PRESSURE 8
-#define BRUSH_RAD_PRESSURE 16
+#define BRUSH_JITTER_PRESSURE 16 /* was BRUSH_RAD_PRESSURE */
#define BRUSH_SPACING_PRESSURE 32
#define BRUSH_FIXED_TEX 64
#define BRUSH_RAKE 128
diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h
index 5cfecf7cc01..9423e871c77 100644
--- a/source/blender/makesdna/DNA_cloth_types.h
+++ b/source/blender/makesdna/DNA_cloth_types.h
@@ -79,6 +79,8 @@ typedef struct ClothSimSettings
short vgroup_struct; /* vertex group for scaling structural stiffness */
short presets; /* used for presets on GUI */
short pad;
+
+ struct EffectorWeights *effector_weights;
} ClothSimSettings;
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 70430af3fc8..7232042c876 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -66,6 +66,9 @@ typedef struct bConstraint {
int pad;
struct Ipo *ipo; /* local influence ipo or driver */ // XXX depreceated for 2.5... old animation system hack
+ /* below are readonly fields that are set at runtime by the solver for use in the GE (only IK atm) */
+ float lin_error; /* residual error on constraint expressed in blender unit*/
+ float rot_error; /* residual error on constraint expressed in radiant */
} bConstraint;
@@ -119,24 +122,34 @@ typedef struct bPythonConstraint {
} bPythonConstraint;
-/* Inverse-Kinematics (IK) constraint */
+/* inverse-Kinematics (IK) constraint
+ This constraint supports a variety of mode determine by the type field
+ according to B_CONSTRAINT_IK_TYPE.
+ Some fields are used by all types, some are specific to some types
+ This is indicated in the comments for each field
+ */
typedef struct bKinematicConstraint {
- Object *tar;
- short iterations; /* Maximum number of iterations to try */
- short flag; /* Like CONSTRAINT_IK_TIP */
- short rootbone; /* index to rootbone, if zero go all the way to mother bone */
- short max_rootbone; /* for auto-ik, maximum length of chain */
- char subtarget[32]; /* String to specify sub-object target */
-
- Object *poletar; /* Pole vector target */
- char polesubtarget[32]; /* Pole vector sub-object target */
- float poleangle; /* Pole vector rest angle */
-
- float weight; /* Weight of goal in IK tree */
- float orientweight; /* Amount of rotation a target applies on chain */
- float grabtarget[3]; /* for target-less IK */
+ Object *tar; /* All: target object in case constraint needs a target */
+ short iterations; /* All: Maximum number of iterations to try */
+ short flag; /* All & CopyPose: some options Like CONSTRAINT_IK_TIP */
+ short rootbone; /* All: index to rootbone, if zero go all the way to mother bone */
+ short max_rootbone; /* CopyPose: for auto-ik, maximum length of chain */
+ char subtarget[32]; /* All: String to specify sub-object target */
+ Object *poletar; /* All: Pole vector target */
+ char polesubtarget[32]; /* All: Pole vector sub-object target */
+ float poleangle; /* All: Pole vector rest angle */
+ float weight; /* All: Weight of constraint in IK tree */
+ float orientweight; /* CopyPose: Amount of rotation a target applies on chain */
+ float grabtarget[3]; /* CopyPose: for target-less IK */
+ short type; /* subtype of IK constraint: B_CONSTRAINT_IK_TYPE */
+ short mode; /* Distance: how to limit in relation to clamping sphere: LIMITDIST_.. */
+ float dist; /* Distance: distance (radius of clamping sphere) from target */
} bKinematicConstraint;
+typedef enum B_CONSTRAINT_IK_TYPE {
+ CONSTRAINT_IK_COPYPOSE = 0, /* 'standard' IK constraint: match position and/or orientation of target */
+ CONSTRAINT_IK_DISTANCE /* maintain distance with target */
+} B_CONSTRAINT_IK_TYPE;
/* Single-target subobject constraints --------------------- */
/* Track To Constraint */
@@ -376,7 +389,9 @@ typedef enum B_CONSTRAINT_FLAG {
/* influence ipo is on constraint itself, not in action channel */
CONSTRAINT_OWN_IPO = (1<<7),
/* indicates that constraint was added locally (i.e. didn't come from the proxy-lib) */
- CONSTRAINT_PROXY_LOCAL = (1<<8)
+ CONSTRAINT_PROXY_LOCAL = (1<<8),
+ /* indicates that constraint is temporarily disabled (only used in GE) */
+ CONSTRAINT_OFF = (1<<9)
} B_CONSTRAINT_FLAG;
/* bConstraint->ownspace/tarspace */
@@ -487,6 +502,16 @@ typedef enum B_CONSTRAINTCHANNEL_FLAG {
#define CONSTRAINT_IK_POS 32
#define CONSTRAINT_IK_SETANGLE 64
#define CONSTRAINT_IK_GETANGLE 128
+ /* limit axis */
+#define CONSTRAINT_IK_NO_POS_X 256
+#define CONSTRAINT_IK_NO_POS_Y 512
+#define CONSTRAINT_IK_NO_POS_Z 1024
+#define CONSTRAINT_IK_NO_ROT_X 2048
+#define CONSTRAINT_IK_NO_ROT_Y 4096
+#define CONSTRAINT_IK_NO_ROT_Z 8192
+ /* axis relative to target */
+#define CONSTRAINT_IK_TARGETAXIS 16384
+
/* MinMax (floor) flags */
#define MINMAX_STICKY 0x01
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 109a9528de2..f988511b146 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -174,7 +174,7 @@ typedef struct Curve {
float size[3];
float rot[3];
- int texflag; /* keep an int because of give_obdata_texspace() */
+ short texflag, pad1; /* keep a short because of give_obdata_texspace() */
short drawflag, twist_mode, pad[2];
float twist_smooth, pad2;
@@ -310,6 +310,7 @@ typedef enum eBezTriple_Interpolation {
/* types of keyframe (used only for BezTriple->hide when BezTriple is used in F-Curves) */
typedef enum eBezTriple_KeyframeType {
BEZT_KEYTYPE_KEYFRAME = 0, /* default - 'proper' Keyframe */
+ BEZT_KEYTYPE_EXTREME, /* 'extreme' keyframe */
BEZT_KEYTYPE_BREAKDOWN, /* 'breakdown' keyframe */
} eBezTriple_KeyframeType;
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 2b8cd90b4d5..e4a16da0365 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -76,11 +76,13 @@ typedef struct CustomData {
#define CD_MLOOPCOL 17
#define CD_TANGENT 18
#define CD_MDISPS 19
-#define CD_WEIGHT_MCOL 20 /* for displaying weightpaint colors */
+#define CD_WEIGHT_MCOL 20 /* for displaying weightpaint colors */
#define CD_MPOLY 21
#define CD_MLOOP 22
#define CD_WEIGHT_MLOOPCOL 23
-#define CD_NUMTYPES 24
+#define CD_ID_MCOL 24
+#define CD_TEXTURE_MCOL 25
+#define CD_NUMTYPES 26
/* Bits for CustomDataMask */
#define CD_MASK_MVERT (1 << CD_MVERT)
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
index 78c8d1a5607..0a0046f8470 100644
--- a/source/blender/makesdna/DNA_lamp_types.h
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -63,7 +63,7 @@ typedef struct Lamp {
short pad2;
float clipsta, clipend, shadspotsize;
- float bias, soft;
+ float bias, soft, compressthresh, pad5[3];
short bufsize, samp, buffers, filtertype;
char bufflag, buftype;
@@ -167,6 +167,7 @@ typedef struct Lamp {
#define LA_SHADBUF_REGULAR 0
#define LA_SHADBUF_IRREGULAR 1
#define LA_SHADBUF_HALFWAY 2
+#define LA_SHADBUF_DEEP 3
/* bufflag, auto clipping */
#define LA_SHADBUF_AUTO_START 1
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 55e3c9107e4..36de890e6dc 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -50,26 +50,23 @@ struct Ipo;
typedef struct VolumeSettings {
float density;
float emission;
- float absorption;
float scattering;
+ float reflection;
float emission_col[3];
- float absorption_col[3];
+ float transmission_col[3];
+ float reflection_col[3];
+
float density_scale;
float depth_cutoff;
-
- short phasefunc_type;
- short vpad[3];
- float phasefunc_g;
-
- float stepsize;
- float shade_stepsize;
+ float asymmetry;
short stepsize_type;
short shadeflag;
short shade_type;
short precache_resolution;
-
+
+ float stepsize;
float ms_diff;
float ms_intensity;
int ms_steps;
@@ -160,9 +157,8 @@ typedef struct Material {
float sss_front, sss_back;
short sss_flag, sss_preset;
- /* yafray: absorption color, dispersion parameters and material preset menu */
- float YF_ar, YF_ag, YF_ab, YF_dscale, YF_dpwr;
- int YF_dsmp, YF_preset, YF_djit;
+ int mapto_textured; /* render-time cache to optimise texture lookups */
+ int pad4;
ListBase gpumaterial; /* runtime */
} Material;
@@ -317,15 +313,17 @@ typedef struct Material {
#define MAP_AMB 2048
#define MAP_DISPLACE 4096
#define MAP_WARP 8192
-#define MAP_LAYER 16384
+#define MAP_LAYER 16384 /* unused */
/* volume mapto - reuse definitions for now - a bit naughty! */
-#define MAP_DENSITY 128
-#define MAP_EMISSION 64
-#define MAP_EMISSION_COL 1
-#define MAP_ABSORPTION 512
-#define MAP_ABSORPTION_COL 8
-#define MAP_SCATTERING 16
+#define MAP_DENSITY 128
+#define MAP_EMISSION 64
+#define MAP_EMISSION_COL 1
+#define MAP_SCATTERING 16
+#define MAP_TRANSMISSION_COL 8
+#define MAP_REFLECTION_COL 4
+#define MAP_REFLECTION 32
+
/* mapto for halo */
//#define MAP_HA_COL 1
@@ -376,23 +374,15 @@ typedef struct Material {
#define MA_VOL_STEP_ADAPTIVE 2
/* vol_shadeflag */
-#define MA_VOL_SHADED 1
-#define MA_VOL_RECVSHADOW 4
+#define MA_VOL_RECV_EXT_SHADOW 1
#define MA_VOL_PRECACHESHADING 8
/* vol_shading_type */
-#define MA_VOL_SHADE_NONE 0
-#define MA_VOL_SHADE_SINGLE 1
-#define MA_VOL_SHADE_MULTIPLE 2
-#define MA_VOL_SHADE_SINGLEPLUSMULTIPLE 3
-
-/* vol_phasefunc_type */
-#define MA_VOL_PH_ISOTROPIC 0
-#define MA_VOL_PH_MIEHAZY 1
-#define MA_VOL_PH_MIEMURKY 2
-#define MA_VOL_PH_RAYLEIGH 3
-#define MA_VOL_PH_HG 4
-#define MA_VOL_PH_SCHLICK 5
+#define MA_VOL_SHADE_SHADELESS 0
+#define MA_VOL_SHADE_SHADOWED 2
+#define MA_VOL_SHADE_SHADED 1
+#define MA_VOL_SHADE_MULTIPLE 3
+#define MA_VOL_SHADE_SHADEDPLUSMULTIPLE 4
#endif
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 74e0a25a26f..c9b12f0e147 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -99,7 +99,7 @@ typedef struct Mesh {
* the face does not need to be selected, -1 is inactive */
int act_face;
- int texflag;
+ short texflag, editflag;
/* texture space, copied as one block in editobject.c */
float loc[3];
@@ -133,6 +133,11 @@ typedef struct TFace {
/* texflag */
#define AUTOSPACE 1
+/* me->editflag */
+#define ME_EDIT_MIRROR_X (1 << 0)
+#define ME_EDIT_MIRROR_Y (1 << 1) // unused so far
+#define ME_EDIT_MIRROR_Z (1 << 2) // unused so far
+
/* me->flag */
#define ME_ISDONE 1
#define ME_NOPUNOFLIP 2
diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h
index 8b61405b851..0e746eb0f4d 100644
--- a/source/blender/makesdna/DNA_meta_types.h
+++ b/source/blender/makesdna/DNA_meta_types.h
@@ -77,7 +77,7 @@ typedef struct MetaBall {
char flag, flag2; /* flag is enum for updates, flag2 is bitflags for settings */
short totcol;
- int texflag; /* used to store MB_AUTOSPACE */
+ short texflag, pad; /* used to store MB_AUTOSPACE */
/* texture space, copied as one block in editobject.c */
float loc[3];
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 54433fd4254..7c76a5c099d 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -1,7 +1,28 @@
/**
+ *
* $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.
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
+#include "DNA_listBase.h"
+
#ifndef DNA_MODIFIER_TYPES_H
#define DNA_MODIFIER_TYPES_H
@@ -438,9 +459,7 @@ typedef struct CollisionModifierData {
unsigned int numverts;
unsigned int numfaces;
- short absorption; /* used for forces, in % */
- short pad;
- float time; /* cfra time of modifier */
+ float time, pad; /* cfra time of modifier */
struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */
} CollisionModifierData;
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index b10de02dbb4..ba1bb66c901 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -40,6 +40,7 @@ struct bNodeLink;
struct bNodeType;
struct bNodeGroup;
struct AnimData;
+struct uiBlock;
#define NODE_MAXSTR 32
@@ -98,7 +99,7 @@ typedef struct bNodeSocket {
#
#
typedef struct bNodePreview {
- float *rect;
+ unsigned char *rect;
short xsize, ysize;
} bNodePreview;
@@ -131,6 +132,7 @@ typedef struct bNode {
rctf butr; /* optional buttons area */
rctf prvr; /* optional preview area */
bNodePreview *preview; /* optional preview image */
+ struct uiBlock *block; /* runtime during drawing */
struct bNodeType *typeinfo; /* lookup of callbacks and defaults */
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 986a75f1a96..1376a08eb3e 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -35,45 +35,91 @@ extern "C" {
#endif
#include "DNA_listBase.h"
+
+/* pd->forcefield: Effector Fields types */
+typedef enum PFieldType {
+ PFIELD_NULL = 0, /* (this is used for general effector weight) */
+ PFIELD_FORCE, /* Force away/towards a point depending on force strength */
+ PFIELD_VORTEX, /* Force around the effector normal */
+ PFIELD_MAGNET, /* Force from the cross product of effector normal and point velocity */
+ PFIELD_WIND, /* Force away and towards a point depending which side of the effector */
+ /* normal the point is */
+ PFIELD_GUIDE, /* Force along curve for dynamics, a shaping curve for hair paths */
+ PFIELD_TEXTURE, /* Force based on texture values calculated at point coordinates */
+ PFIELD_HARMONIC, /* Force of a harmonic (damped) oscillator */
+ PFIELD_CHARGE, /* Force away/towards a point depending on point charge */
+ PFIELD_LENNARDJ, /* Force due to a Lennard-Jones potential */
+ PFIELD_BOID, /* Defines predator / goal for boids */
+ PFIELD_TURBULENCE, /* Force defined by BLI_gTurbulence */
+ PFIELD_DRAG, /* Linear & quadratic drag */
+ NUM_PFIELD_TYPES
+} PFieldType;
typedef struct PartDeflect {
- short deflect; /* Deflection flag - does mesh deflect particles*/
- short forcefield; /* Force field type, do the vertices attract / repel particles ? */
- short flag; /* general settings flag */
- short falloff; /* fall-off type*/
+ int flag; /* general settings flag */
+ short deflect; /* Deflection flag - does mesh deflect particles */
+ short forcefield; /* Force field type, do the vertices attract / repel particles? */
+ short falloff; /* fall-off type */
+ short shape; /* point, plane or surface */
+ short tex_mode; /* texture effector */
+ short kink, kink_axis; /* for curve guide */
+ short zdir;
+ /* Main effector values */
+ float f_strength; /* The strength of the force (+ or - ) */
+ float f_damp; /* Damping ratio of the harmonic effector. */
+ float f_flow; /* How much force is converted into "air flow", i.e. */
+ /* force used as the velocity of surrounding medium. */
+
+ float f_size;
+
+ /* fall-off */
+ float f_power; /* The power law - real gravitation is 2 (square) */
+ float maxdist; /* if indicated, use this maximum */
+ float mindist; /* if indicated, use this minimum */
+ float f_power_r; /* radial fall-off power */
+ float maxrad; /* radial versions of above */
+ float minrad;
+
+ /* particle collisions */
float pdef_damp; /* Damping factor for particle deflection */
float pdef_rdamp; /* Random element of damping for deflection */
float pdef_perm; /* Chance of particle passing through mesh */
float pdef_frict; /* Friction factor for particle deflection */
float pdef_rfrict; /* Random element of friction for deflection */
- float f_strength; /* The strength of the force (+ or - ) */
- float f_power; /* The power law - real gravitation is 2 (square) */
- float f_dist;
- float f_damp; /* The dampening factor, currently only for harmonic force */
- float maxdist; /* if indicated, use this maximum */
- float mindist; /* if indicated, use this minimum */
- float maxrad; /* radial versions of above */
- float minrad;
- float f_power_r; /* radial fall-off power*/
+ float absorption, pad; /* used for forces */
+ /* softbody collisions */
float pdef_sbdamp; /* Damping factor for softbody deflection */
float pdef_sbift; /* inner face thickness for softbody deflection */
float pdef_sboft; /* outer face thickness for softbody deflection */
- /* variables for guide curve */
+ /* guide curve, same as for particle child effects */
float clump_fac, clump_pow;
float kink_freq, kink_shape, kink_amp, free_end;
- float tex_nabla;
- short tex_mode, kink, kink_axis, rt2;
- struct Tex *tex; /* Texture of the texture effector */
- struct RNG *rng; /* random noise generator for e.g. wind */
- float f_noise; /* noise of force (currently used for wind) */
- int seed; /* wind noise random seed */
+ /* texture effector */
+ float tex_nabla; /* Used for calculating partial derivatives */
+ struct Tex *tex; /* Texture of the texture effector */
+
+ /* effector noise */
+ struct RNG *rng; /* random noise generator for e.g. wind */
+ float f_noise; /* noise of force */
+ int seed; /* noise random seed */
} PartDeflect;
+typedef struct EffectorWeights {
+ struct Group *group; /* only use effectors from this group of objects */
+
+ float weight[13]; /* effector type specific weights */
+ float global_gravity;
+ short flag, rt[3];
+} EffectorWeights;
+
+/* EffectorWeights->flag */
+#define EFF_WEIGHT_DO_HAIR 1
+
/* Point cache file data types:
* - used as (1<<flag) so poke jahka if you reach the limit of 15
* - to add new data types update:
@@ -254,48 +300,51 @@ typedef struct SoftBody {
struct PointCache *pointcache;
struct ListBase ptcaches;
-} SoftBody;
+ struct EffectorWeights *effector_weights;
-/* pd->forcefield: Effector Fields types */
-#define PFIELD_FORCE 1
-#define PFIELD_VORTEX 2
-#define PFIELD_MAGNET 3
-#define PFIELD_WIND 4
-#define PFIELD_GUIDE 5
-#define PFIELD_TEXTURE 6
-#define PFIELD_HARMONIC 7
-#define PFIELD_CHARGE 8
-#define PFIELD_LENNARDJ 9
-#define PFIELD_BOID 10
+} SoftBody;
/* pd->flag: various settings */
#define PFIELD_USEMAX 1
#define PDEFLE_DEFORM 2
-#define PFIELD_GUIDE_PATH_ADD 4
-#define PFIELD_PLANAR 8
+#define PFIELD_GUIDE_PATH_ADD 4 /* TODO: do_versions for below */
+#define PFIELD_PLANAR 8 /* used for do_versions */
#define PDEFLE_KILL_PART 16
-#define PFIELD_POSZ 32
+#define PFIELD_POSZ 32 /* used for do_versions */
#define PFIELD_TEX_OBJECT 64
+#define PFIELD_GLOBAL_CO 64 /* used for turbulence */
#define PFIELD_TEX_2D 128
#define PFIELD_USEMIN 256
#define PFIELD_USEMAXR 512
#define PFIELD_USEMINR 1024
#define PFIELD_TEX_ROOTCO 2048
-#define PFIELD_SURFACE 4096
+#define PFIELD_SURFACE (1<<12) /* used for do_versions */
+#define PFIELD_VISIBILITY (1<<13)
+#define PFIELD_DO_LOCATION (1<<14)
+#define PFIELD_DO_ROTATION (1<<15)
/* pd->falloff */
#define PFIELD_FALL_SPHERE 0
#define PFIELD_FALL_TUBE 1
#define PFIELD_FALL_CONE 2
-//reserved for near future
-//#define PFIELD_FALL_INSIDE 3
+
+/* pd->shape */
+#define PFIELD_SHAPE_POINT 0
+#define PFIELD_SHAPE_PLANE 1
+#define PFIELD_SHAPE_SURFACE 2
+#define PFIELD_SHAPE_POINTS 3
/* pd->tex_mode */
#define PFIELD_TEX_RGB 0
#define PFIELD_TEX_GRAD 1
#define PFIELD_TEX_CURL 2
+/* pd->zdir */
+#define PFIELD_Z_BOTH 0
+#define PFIELD_Z_POS 1
+#define PFIELD_Z_NEG 2
+
/* pointcache->flag */
#define PTCACHE_BAKED 1
#define PTCACHE_OUTDATED 2
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index f24f92b16b6..e7f8594d00e 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -133,8 +133,10 @@ typedef struct Object {
/* rot en drot have to be together! (transform('r' en 's')) */
float loc[3], dloc[3], orig[3];
float size[3], dsize[3];
- float rot[3], drot[3];
- /* float quat[4], dquat[4]; (not used yet) */
+ float rot[3], drot[3]; /* euler rotation */
+ float quat[4], dquat[4]; /* quaternion rotation */
+ float rotAxis[3], drotAxis[3]; /* axis angle rotation - axis part */
+ float rotAngle, drotAngle; /* axis angle rotation - angle part */
float obmat[4][4];
float parentinv[4][4]; /* inverse result of parent, so that object doesn't 'stick' to parent */
float constinv[4][4]; /* inverse result of constraints. doesn't include effect of parent or object local transform */
@@ -176,9 +178,11 @@ typedef struct Object {
float max_vel; /* clamp the maximum velocity 0.0 is disabled */
float min_vel; /* clamp the maximum velocity 0.0 is disabled */
float m_contactProcessingThreshold;
-
+
+ short rotmode; /* rotation mode - uses defines set out in DNA_action_types.h for PoseChannel rotations... */
+
char dt, dtx;
- char empty_drawtype, pad1[5];
+ char empty_drawtype, pad1[3];
float empty_drawsize;
float dupfacesca; /* dupliface scale */
@@ -243,6 +247,7 @@ typedef struct Object {
ListBase gpulamp; /* runtime, for lamps only */
ListBase pc_ids;
+ ListBase *duplilist; /* for temporary dupli list storage, only for use by RNA API */
} Object;
/* Warning, this is not used anymore because hooks are now modifiers */
@@ -263,6 +268,14 @@ typedef struct ObHook {
float force;
} ObHook;
+typedef struct DupliObject {
+ struct DupliObject *next, *prev;
+ struct Object *ob;
+ unsigned int origlay;
+ int index, no_draw, type, animated;
+ float mat[4][4], omat[4][4];
+ float orco[3], uv[2];
+} DupliObject;
/* this work object is defined in object.c */
extern Object workob;
@@ -304,6 +317,7 @@ extern Object workob;
/* (short) transflag */
#define OB_OFFS_LOCAL 1
+ // XXX OB_QUAT was never used, but is now depreceated in favour of standard rotation handling...
#define OB_QUAT 2
#define OB_NEG_SCALE 4
#define OB_DUPLI (8+16+256+512+2048)
@@ -393,6 +407,7 @@ extern Object workob;
#define BA_HAS_RECALC_OB 4
#define BA_HAS_RECALC_DATA 8
+ // XXX DEPRECEATED SETTING...
#define BA_DO_IPO 32
#define BA_FROMSET 128
@@ -406,7 +421,7 @@ extern Object workob;
#define OB_FROMDUPLI 512
#define OB_DONE 1024
-#define OB_RADIO 2048
+// #define OB_RADIO 2048 /* deprecated */
#define OB_FROMGROUP 4096
/* ob->recalc (flag bits!) */
@@ -484,7 +499,7 @@ extern Object workob;
/* ob->shapeflag */
#define OB_SHAPE_LOCK 1
-#define OB_SHAPE_TEMPLOCK 2
+#define OB_SHAPE_TEMPLOCK 2 // deprecated
/* ob->nlaflag */
// XXX depreceated - old animation system
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 6a0a0e1d912..157767e1d13 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -67,7 +67,7 @@ typedef struct ChildParticle {
int pa[4]; /* nearest particles to the child, used for the interpolation */
float w[4]; /* interpolation weights for the above particles */
float fuv[4], foffset; /* face vertex weights and offset */
- float rand[3];
+ float rt;
} ChildParticle;
typedef struct ParticleTarget {
@@ -78,6 +78,13 @@ typedef struct ParticleTarget {
float time, duration;
} ParticleTarget;
+typedef struct ParticleDupliWeight {
+ struct ParticleDupliWeight *next, *prev;
+ struct Object *ob;
+ short count;
+ short flag, rt[2];
+} ParticleDupliWeight;
+
typedef struct ParticleData {
ParticleKey state; /* current global coordinates */
@@ -114,6 +121,8 @@ typedef struct ParticleSettings {
struct BoidSettings *boids;
+ struct EffectorWeights *effector_weights;
+
int flag;
short type, from, distr;
/* physics modes */
@@ -146,6 +155,7 @@ typedef struct ParticleSettings {
/* initial velocity factors */
float normfac, obfac, randfac, partfac, tanfac, tanphase, reactfac;
+ float ob_vel[3], rt;
float avefac, phasefac, randrotfac, randphasefac;
/* physical properties */
float mass, size, randsize, reactshape;
@@ -176,10 +186,9 @@ typedef struct ParticleSettings {
/* keyed particles */
int keyed_loops;
- float effector_weight[10];
-
struct Group *dup_group;
- struct Group *eff_group;
+ struct ListBase dupliweights;
+ struct Group *eff_group; // deprecated
struct Object *dup_ob;
struct Object *bb_ob;
struct Ipo *ipo; // xxx depreceated... old animation system
@@ -209,8 +218,6 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
struct Object *lattice;
struct Object *parent; /* particles from global space -> parent space */
- struct ListBase effectors, reactevents; /* runtime */
-
struct ListBase targets; /* used for keyed and boid physics */
char name[32]; /* particle system name */
@@ -233,14 +240,20 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
struct PointCache *pointcache;
struct ListBase ptcaches;
+ struct ListBase *effectors;
+
struct KDTree *tree; /* used for interactions with self and other systems */
+
+ struct ParticleDrawData *pdd;
+
+ float *frand; /* array of 1024 random floats for fast lookups */
}ParticleSystem;
/* part->type */
/* hair is allways baked static in object/geometry space */
/* other types (normal particles) are in global space and not static baked */
#define PART_EMITTER 0
-#define PART_REACTOR 1
+//#define PART_REACTOR 1
#define PART_HAIR 2
#define PART_FLUID 3
@@ -266,7 +279,7 @@ 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_KEYED_TIMING (1<<15)
+//#define PART_HAIR_GRAVITY (1<<15)
//#define PART_ABS_TIME (1<<17)
//#define PART_GLOB_TIME (1<<18)
@@ -320,12 +333,12 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
/* part->draw */
#define PART_DRAW_VEL 1
-//#define PART_DRAW_PATH_LEN 2
+#define PART_DRAW_GLOBAL_OB 2
#define PART_DRAW_SIZE 4
#define PART_DRAW_EMITTER 8 /* render emitter also */
#define PART_DRAW_HEALTH 16
#define PART_ABS_PATH_TIME 32
-//#define PART_DRAW_TRAIL 64
+#define PART_DRAW_COUNT_GR 64
#define PART_DRAW_BB_LOCK 128
#define PART_DRAW_PARENT 256
#define PART_DRAW_NUM 512
@@ -403,11 +416,13 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#define PART_CHILD_FACES 2
/* psys->recalc */
-#define PSYS_RECALC_REDO 1 /* only do pathcache etc */
-#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 */
+/* starts from 8 so that the first bits can be ob->recalc */
+#define PSYS_RECALC_REDO 8 /* only do pathcache etc */
+#define PSYS_RECALC_RESET 16 /* reset everything including pointcache */
+#define PSYS_RECALC_TYPE 32 /* handle system type change */
+#define PSYS_RECALC_CHILD 64 /* only child settings changed */
+#define PSYS_RECALC_PHYS 128 /* physics type changed */
+#define PSYS_RECALC 248
/* psys->flag */
#define PSYS_CURRENT 1
@@ -422,22 +437,25 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#define PSYS_HAIR_DONE 512
#define PSYS_KEYED 1024
#define PSYS_EDITED 2048
-//#define PSYS_PROTECT_CACHE 4096
+//#define PSYS_PROTECT_CACHE 4096 /* deprecated */
#define PSYS_DISABLED 8192
/* pars->flag */
#define PARS_UNEXIST 1
#define PARS_NO_DISP 2
-//#define PARS_STICKY 4
+//#define PARS_STICKY 4 /* deprecated */
#define PARS_REKEY 8
/* pars->alive */
-#define PARS_KILLED 0
+//#define PARS_KILLED 0 /* deprecated */
#define PARS_DEAD 1
#define PARS_UNBORN 2
#define PARS_ALIVE 3
#define PARS_DYING 4
+/* ParticleDupliWeight->flag */
+#define PART_DUPLIW_CURRENT 1
+
/* psys->vg */
#define PSYS_TOT_VG 12
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 73afc3d1a53..91f8e8d5c41 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -93,6 +93,8 @@ typedef struct FFMpegCodecData {
int audio_codec;
int video_bitrate;
int audio_bitrate;
+ int audio_mixrate;
+ float audio_volume;
int gop_size;
int flags;
@@ -106,10 +108,13 @@ typedef struct FFMpegCodecData {
typedef struct AudioData {
- int mixrate;
- float main; /* Main mix in dB */
+ int mixrate; // 2.5: now in FFMpegCodecData: audio_mixrate
+ float main; // 2.5: now in FFMpegCodecData: audio_volume
+ float speed_of_sound;
+ float doppler_factor;
+ int distance_model;
short flag;
- short pad[3];
+ short pad;
} AudioData;
typedef struct SceneRenderLayer {
@@ -162,6 +167,8 @@ typedef struct SceneRenderLayer {
#define SCE_PASS_RADIO 8192 /* Radio removed, can use for new GI? */
#define SCE_PASS_MIST 16384
+#define SCE_PASS_RAYHITS 32768
+
/* note, srl->passflag is treestore element 'nr' in outliner, short still... */
@@ -170,7 +177,6 @@ typedef struct RenderData {
struct AviCodecData *avicodecdata;
struct QuicktimeCodecData *qtcodecdata;
struct FFMpegCodecData ffcodecdata;
- struct AudioData audio; /* new in 2.5 */
int cfra, sfra, efra; /* frames as in 'images' */
int psfra, pefra; /* start+end frames of preview range */
@@ -236,9 +242,23 @@ typedef struct RenderData {
*/
int mode;
- /* render engine (deprecated), octree resolution */
- short renderer, ocres;
+ /**
+ * Flags for raytrace settings. Use bit-masking to access the settings.
+ */
+ int raytrace_options;
+
+ /**
+ * Raytrace acceleration structure
+ */
+ short raytrace_structure;
+
+ /* renderer (deprecated) */
+ short renderer;
+ /* octree resolution */
+ short ocres;
+ short pad4;
+
/**
* What to do with the sky/background. Picks sky/premul/key
* blending for the background
@@ -251,6 +271,7 @@ typedef struct RenderData {
short osa;
short frs_sec, edgeint;
+
/* safety, border and display rect */
rctf safety, border;
@@ -663,6 +684,11 @@ typedef struct UnitSettings {
short flag; /* imperial, metric etc */
} UnitSettings;
+typedef struct PhysicsSettings {
+ float gravity[3];
+ int flag;
+} PhysicsSettings;
+
typedef struct Scene {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
@@ -697,7 +723,7 @@ typedef struct Scene {
/* migrate or replace? depends on some internal things... */
/* no, is on the right place (ton) */
struct RenderData r;
- struct AudioData audio; /* DEPRECATED 2.5 */
+ struct AudioData audio;
ListBase markers;
ListBase transform_spaces;
@@ -727,6 +753,9 @@ typedef struct Scene {
/* Grease Pencil */
struct bGPdata *gpd;
+
+ /* Physics simulation settings */
+ struct PhysicsSettings physics_settings;
} Scene;
@@ -792,6 +821,18 @@ typedef struct Scene {
#define R_INTERN 0
#define R_YAFRAY 1
+/* raytrace structure */
+#define R_RAYSTRUCTURE_AUTO 0
+#define R_RAYSTRUCTURE_OCTREE 1
+#define R_RAYSTRUCTURE_BLIBVH 2
+#define R_RAYSTRUCTURE_VBVH 3
+#define R_RAYSTRUCTURE_SIMD_SVBVH 4 /* needs SIMD */
+#define R_RAYSTRUCTURE_SIMD_QBVH 5 /* needs SIMD */
+
+/* raytrace_options */
+#define R_RAYTRACE_USE_LOCAL_COORDS 0x0001
+#define R_RAYTRACE_USE_INSTANCES 0x0002
+
/* scemode (int now) */
#define R_DOSEQ 0x0001
#define R_BG_RENDER 0x0002
@@ -799,7 +840,7 @@ typedef struct Scene {
#define R_PASSEPARTOUT 0x0004
#define R_PREVIEWBUTS 0x0008
#define R_EXTENSION 0x0010
-#define R_NODE_PREVIEW 0x0020
+#define R_MATNODE_PREVIEW 0x0020
#define R_DOCOMP 0x0040
#define R_COMP_CROP 0x0080
#define R_FREE_IMAGE 0x0100
@@ -811,7 +852,8 @@ typedef struct Scene {
#define R_STAMP_INFO 0x4000 /* deprecated */
#define R_FULL_SAMPLE 0x8000
#define R_COMP_RERENDER 0x10000
-#define R_RECURS_PROTECTION 0x20000
+#define R_RECURS_PROTECTION 0x20000
+#define R_TEXNODE_PREVIEW 0x40000
/* r->stamp */
#define R_STAMP_TIME 0x0001
@@ -824,7 +866,8 @@ 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)
+#define R_STAMP_RENDERTIME 0x0400
+#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|R_STAMP_RENDERTIME)
/* alphamode */
#define R_ADDSKY 0
@@ -940,6 +983,7 @@ typedef struct Scene {
#define SCE_SNAP 1
#define SCE_SNAP_ROTATE 2
#define SCE_SNAP_PEEL_OBJECT 4
+#define SCE_SNAP_PROJECT 8
/* toolsettings->snap_target */
#define SCE_SNAP_TARGET_CLOSEST 0
#define SCE_SNAP_TARGET_CENTER 1
@@ -973,6 +1017,11 @@ typedef struct Scene {
#define PROP_CONST 5
#define PROP_RANDOM 6
+/* toolsettings->proportional */
+#define PROP_EDIT_OFF 0
+#define PROP_EDIT_ON 1
+#define PROP_EDIT_CONNECTED 2
+
/* sce->flag */
#define SCE_DS_SELECTED (1<<0)
#define SCE_DS_COLLAPSED (1<<1)
@@ -1123,6 +1172,9 @@ typedef enum SculptFlags {
#define SK_RETARGET_ROLL_VIEW 1
#define SK_RETARGET_ROLL_JOINT 2
+/* physics_settings->flag */
+#define PHYS_GLOBAL_GRAVITY 1
+
/* UnitSettings */
/* UnitSettings->system */
diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h
index cc998de7eec..a5ba5886ed5 100644
--- a/source/blender/makesdna/DNA_sensor_types.h
+++ b/source/blender/makesdna/DNA_sensor_types.h
@@ -126,6 +126,13 @@ typedef struct bRaySensor {
int axisflag;
} bRaySensor;
+typedef struct bArmatureSensor {
+ char posechannel[32];
+ char constraint[32];
+ int type;
+ float value;
+} bArmatureSensor;
+
typedef struct bMessageSensor {
/**
* (Possible future use) pointer to a single sender object
@@ -202,6 +209,15 @@ typedef struct bJoystickSensor {
#define SENS_MESG_MESG 0
#define SENS_MESG_PROP 1
+/* bArmatureSensor->type */
+#define SENS_ARM_STATE_CHANGED 0
+#define SENS_ARM_LIN_ERROR_BELOW 1
+#define SENS_ARM_LIN_ERROR_ABOVE 2
+#define SENS_ARM_ROT_ERROR_BELOW 3
+#define SENS_ARM_ROT_ERROR_ABOVE 4
+/* update this when adding new type */
+#define SENS_ARM_MAXTYPE 4
+
/* sensor->type */
#define SENS_ALWAYS 0
#define SENS_TOUCH 1
@@ -217,6 +233,7 @@ typedef struct bJoystickSensor {
#define SENS_JOYSTICK 11
#define SENS_ACTUATOR 12
#define SENS_DELAY 13
+#define SENS_ARMATURE 14
/* sensor->flag */
#define SENS_SHOW 1
#define SENS_DEL 2
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index 4e4714cdaa1..6cf308aa0ad 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -45,7 +45,7 @@ typedef struct SmokeDomainSettings {
struct SmokeModifierData *smd; /* for fast RNA access */
struct FLUID_3D *fluid;
struct Group *fluid_group;
- struct Group *eff_group; // effector group for e.g. wind force
+ struct Group *eff_group; // UNUSED
struct Group *coll_group; // collision objects group
struct WTURBULENCE *wt; // WTURBULENCE object, if active
struct GPUTexture *tex;
@@ -75,6 +75,7 @@ typedef struct SmokeDomainSettings {
int v3dnum;
struct PointCache *point_cache[2]; /* definition is in DNA_object_force.h */
struct ListBase ptcaches[2];
+ struct EffectorWeights *effector_weights;
} SmokeDomainSettings;
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 806d12815b5..d7793b88bea 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -139,7 +139,7 @@ typedef struct SpaceSeq {
View2D v2d; /* deprecated, copied to region */
float xof, yof; /* offset for drawing the image preview */
- short mainb;
+ short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */
short render_size;
short chanshown;
short zebra;
@@ -569,18 +569,20 @@ typedef struct SpaceUserPref {
/* buts->mainb new */
-#define BCONTEXT_SCENE 0
-#define BCONTEXT_WORLD 1
-#define BCONTEXT_OBJECT 2
-#define BCONTEXT_DATA 3
-#define BCONTEXT_MATERIAL 4
-#define BCONTEXT_TEXTURE 5
-#define BCONTEXT_PARTICLE 6
-#define BCONTEXT_PHYSICS 7
-#define BCONTEXT_BONE 9
-#define BCONTEXT_MODIFIER 10
-#define BCONTEXT_CONSTRAINT 12
-#define BCONTEXT_TOT 13
+#define BCONTEXT_RENDER 0
+#define BCONTEXT_SCENE 1
+#define BCONTEXT_WORLD 2
+#define BCONTEXT_OBJECT 3
+#define BCONTEXT_DATA 4
+#define BCONTEXT_MATERIAL 5
+#define BCONTEXT_TEXTURE 6
+#define BCONTEXT_PARTICLE 7
+#define BCONTEXT_PHYSICS 8
+#define BCONTEXT_BONE 9
+#define BCONTEXT_MODIFIER 10
+#define BCONTEXT_CONSTRAINT 12
+#define BCONTEXT_BONE_CONSTRAINT 13
+#define BCONTEXT_TOT 14
/* sbuts->flag */
#define SB_PRV_OSA 1
@@ -833,6 +835,7 @@ enum {
#define TIME_SEQ 32
#define TIME_ALL_IMAGE_WIN 64
#define TIME_CONTINUE_PHYSICS 128
+#define TIME_NODES 256
/* sseq->mainb */
#define SEQ_DRAW_SEQUENCE 0
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index c13c0522004..a43e5c7ae13 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -61,9 +61,27 @@ typedef struct MTex {
float r, g, b, k;
float def_var, rt;
- float colfac, norfac, varfac;
- float dispfac;
- float warpfac;
+ /* common */
+ float colfac, varfac;
+
+ /* material */
+ float norfac, dispfac, warpfac;
+ float colspecfac, mirrfac, alphafac;
+ float difffac, specfac, emitfac, hardfac;
+ float raymirrfac, translfac, ambfac;
+ float colemitfac, colreflfac, coltransfac;
+ float densfac, scatterfac, reflfac;
+
+ /* particles */
+ float timefac, lengthfac, clumpfac;
+ float kinkfac, roughfac, padensfac;
+ float lifefac, sizefac, ivelfac, pvelfac;
+
+ /* lamp */
+ float shadowfac;
+
+ /* world */
+ float zenupfac, zendownfac, blendfac;
} MTex;
#ifndef DNA_USHORT_FIX
@@ -167,7 +185,8 @@ typedef struct VoxelData {
int interp_type;
short file_format;
short flag;
- int pad;
+ short extend;
+ short pad;
struct Object *object; /* for rendering smoke sims */
float int_multiplier;
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 2949379997b..d67539f8ab0 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -311,6 +311,8 @@ typedef struct UserDef {
struct ListBase themes;
struct ListBase uifonts;
struct ListBase uistyles;
+ struct ListBase keymaps;
+ char keyconfigstr[64];
short undosteps;
short undomemory;
@@ -348,6 +350,14 @@ extern UserDef U; /* from blenkernel blender.c */
/* ***************** USERDEF ****************** */
+/* userpref/section */
+#define USER_SECTION_INTERFACE 0
+#define USER_SECTION_EDIT 1
+#define USER_SECTION_FILE 2
+#define USER_SECTION_SYSTEM 3
+#define USER_SECTION_THEME 4
+#define USER_SECTION_INPUT 5
+
/* flag */
#define USER_AUTOSAVE (1 << 0)
#define USER_AUTOGRABGRID (1 << 1)
@@ -405,6 +415,7 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_SHOW_FPS (1 << 21)
#define USER_MMB_PASTE (1 << 22)
#define USER_MENUFIXEDORDER (1 << 23)
+#define USER_CONTINUOUS_MOUSE (1 << 24)
/* Auto-Keying mode */
/* AUTOKEY_ON is a bitflag */
@@ -414,10 +425,12 @@ extern UserDef U; /* from blenkernel blender.c */
#define AUTOKEY_MODE_EDITKEYS 5
/* Auto-Keying flag */
- /* U.autokey_flag */
+ /* U.autokey_flag (not strictly used when autokeying only - is also used when keyframing these days) */
#define AUTOKEY_FLAG_INSERTAVAIL (1<<0)
#define AUTOKEY_FLAG_INSERTNEEDED (1<<1)
#define AUTOKEY_FLAG_AUTOMATKEY (1<<2)
+ /* U.autokey_flag (strictly autokeying only) */
+#define AUTOKEY_FLAG_ONLYKEYINGSET (1<<6)
/* toolsettings->autokey_flag */
#define ANIMRECORD_FLAG_WITHNLA (1<<10)
@@ -449,6 +462,7 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_DEPRECATED_FLAG 1
#define USER_DISABLE_SOUND 2
#define USER_DISABLE_MIPMAP 4
+#define USER_DISABLE_VBO 8
/* wm draw method */
#define USER_DRAW_TRIPLE 0
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index e221524eac2..f67a242b469 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -89,9 +89,7 @@ typedef struct RegionView3D {
float camdx, camdy; /* camera view offsets, 1.0 = viewplane moves entire width/height */
float pixsize;
float ofs[3];
- short camzoom, viewbut;
-
- int lastmode; /* for modal keymap switching, int because it stores notifier code */
+ short camzoom, viewbut, pad[2];
short rflag, viewlock;
short persp;
@@ -146,7 +144,7 @@ typedef struct View3D {
* The drawing mode for the 3d display. Set to OB_WIRE, OB_SOLID,
* OB_SHADED or OB_TEXTURE */
short drawtype;
- short localview;
+ short pad2;
short scenelock, around, pad3;
short flag, flag2;
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 4274cb7ebc0..7a024e35ff0 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -1,5 +1,5 @@
/**
- * $Id:
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -42,6 +42,7 @@ struct wmGesture;
struct wmOperatorType;
struct wmOperator;
struct wmKeyMap;
+struct wmKeyConfig;
/* forwards */
struct bContext;
@@ -120,9 +121,9 @@ typedef struct wmWindowManager {
ListBase paintcursors; /* extra overlay cursors to draw, like circles */
- /* used keymaps, optionally/partially saved */
- ListBase keymaps;
-
+ ListBase keyconfigs; /* known key configurations */
+ struct wmKeyConfig *defaultconf; /* default configuration, not saved */
+ int defaultactmap, pad2; /* active keymap from default for editing */
} wmWindowManager;
/* wmWindowManager.initialized */
@@ -162,7 +163,8 @@ typedef struct wmWindow {
ListBase timers;
ListBase queue; /* all events (ghost level events were handled) */
- ListBase handlers; /* window+screen handlers, overriding all queues */
+ ListBase handlers; /* window+screen handlers, handled last */
+ ListBase modalhandlers; /* priority handlers, handled first */
ListBase subwindows; /* opengl stuff for sub windows, see notes in wm_subwindow.c */
ListBase gesture; /* gesture stuff */
@@ -179,6 +181,7 @@ typedef struct wmOperatorTypeMacro {
/* operator id */
char idname[MAX_ID_NAME];
/* rna pointer to access properties, like keymap */
+ struct IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
struct PointerRNA *ptr;
} wmOperatorTypeMacro;
@@ -227,46 +230,76 @@ typedef struct wmOperatorType {
/* only used for operators defined with python
* use to store pointers to python functions */
void *pyop_data;
+ int (*pyop_poll)(struct bContext *, struct wmOperatorType *ot);
} wmOperatorType;
/* partial copy of the event, for matching by eventhandler */
-typedef struct wmKeymapItem {
- struct wmKeymapItem *next, *prev;
+typedef struct wmKeyMapItem {
+ struct wmKeyMapItem *next, *prev;
+ /* operator */
char idname[64]; /* used to retrieve operator type pointer */
- struct PointerRNA *ptr; /* rna pointer to access properties */
+ IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
+ /* modal */
+ short propvalue; /* if used, the item is from modal map */
+
+ /* event */
short type; /* event code itself */
- short val; /* 0=any, 1=click, 2=release, or wheelvalue, or... */
+ short val; /* KM_ANY, KM_PRESS, KM_NOTHING etc */
short shift, ctrl, alt, oskey; /* oskey is apple or windowskey, value denotes order of pressed */
short keymodifier; /* rawkey modifier */
- short propvalue; /* if used, the item is from modal map */
-
- short inactive; /* if set, deactivated item */
- short maptype; /* keymap editor */
- short pad2, pad3;
-} wmKeymapItem;
+ /* flag: inactive, expanded */
+ short flag;
+
+ /* runtime */
+ short maptype, pad[2]; /* keymap editor */
+ struct PointerRNA *ptr; /* rna pointer to access properties */
+} wmKeyMapItem;
+/* wmKeyMapItem.flag */
+#define KMI_INACTIVE 1
+#define KMI_EXPANDED 2
/* stored in WM, the actively used keymaps */
typedef struct wmKeyMap {
struct wmKeyMap *next, *prev;
- ListBase keymap;
+ ListBase items;
- char nameid[64]; /* global editor keymaps, or for more per space/region */
+ char idname[64]; /* global editor keymaps, or for more per space/region */
short spaceid; /* same IDs as in DNA_space_types.h */
short regionid; /* see above */
- short is_modal; /* modal map, not using operatornames */
+ short flag; /* general flags */
short pad;
- void *items; /* struct EnumPropertyItem for now */
+ /* runtime */
+ int (*poll)(struct bContext *); /* verify if enabled in the current context */
+ void *modal_items; /* for modal, EnumPropertyItem for now */
} wmKeyMap;
+/* wmKeyMap.flag */
+#define KEYMAP_MODAL 1 /* modal map, not using operatornames */
+#define KEYMAP_USER 2 /* user created keymap */
+
+typedef struct wmKeyConfig {
+ struct wmKeyConfig *next, *prev;
+
+ char idname[64]; /* unique name */
+ char basename[64]; /* idname of configuration this is derives from, "" if none */
+
+ ListBase keymaps;
+ int actkeymap, flag;
+} wmKeyConfig;
+
+/* wmKeyConfig.flag */
+#define KEYCONF_TWOBUTTONMOUSE (1 << 1)
+#define KEYCONF_LMOUSESELECT (1 << 2)
+#define KEYCONF_NONUMPAD (1 << 3)
/* this one is the operator itself, stored in files for macros etc */
/* operator + operatortype should be able to redo entirely, but for different contextes */
@@ -298,7 +331,7 @@ typedef struct wmOperator {
#define OPERATOR_PASS_THROUGH 8
/* wmOperator flag */
-
+#define OP_GRAB_POINTER 1
/* ************** wmEvent ************************ */
/* for read-only rna access, dont save this */
diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript
index 9b486aa3885..1cc66d0873b 100644
--- a/source/blender/makesdna/intern/SConscript
+++ b/source/blender/makesdna/intern/SConscript
@@ -18,7 +18,7 @@ dna = env.Clone()
makesdna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesdna/\\"" ')
makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
- '../../makesdna'])
+ '../../makesdna', '../', '../../bmesh'])
if env['OURPLATFORM'] == 'linuxcross':
USE_WINE = True # when cross compiling on linux 64bit this is useful
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index ca3ac62ba00..810fb110f7a 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -56,6 +56,7 @@ extern StructRNA RNA_Area;
extern StructRNA RNA_AreaLamp;
extern StructRNA RNA_Armature;
extern StructRNA RNA_ArmatureModifier;
+extern StructRNA RNA_ArmatureSensor;
extern StructRNA RNA_ArrayModifier;
extern StructRNA RNA_BackgroundImage;
extern StructRNA RNA_BevelModifier;
@@ -76,6 +77,7 @@ extern StructRNA RNA_BoneGroup;
extern StructRNA RNA_BooleanModifier;
extern StructRNA RNA_BooleanProperty;
extern StructRNA RNA_Brush;
+extern StructRNA RNA_BrushTextureSlot;
extern StructRNA RNA_BuildModifier;
extern StructRNA RNA_Camera;
extern StructRNA RNA_CastModifier;
@@ -99,7 +101,8 @@ extern StructRNA RNA_CompositorNodeBilateralblur;
extern StructRNA RNA_CompositorNodeBlur;
extern StructRNA RNA_CompositorNodeBrightContrast;
extern StructRNA RNA_CompositorNodeChannelMatte;
-extern StructRNA RNA_CompositorNodeChroma;
+extern StructRNA RNA_CompositorNodeChromaMatte;
+extern StructRNA RNA_CompositorNodeColorMatte;
extern StructRNA RNA_CompositorNodeColorSpill;
extern StructRNA RNA_CompositorNodeCombHSVA;
extern StructRNA RNA_CompositorNodeCombRGBA;
@@ -114,6 +117,7 @@ extern StructRNA RNA_CompositorNodeDefocus;
extern StructRNA RNA_CompositorNodeDiffMatte;
extern StructRNA RNA_CompositorNodeDilateErode;
extern StructRNA RNA_CompositorNodeDisplace;
+extern StructRNA RNA_CompositorNodeDistanceMatte;
extern StructRNA RNA_CompositorNodeFilter;
extern StructRNA RNA_CompositorNodeFlip;
extern StructRNA RNA_CompositorNodeGamma;
@@ -123,6 +127,7 @@ extern StructRNA RNA_CompositorNodeIDMask;
extern StructRNA RNA_CompositorNodeImage;
extern StructRNA RNA_CompositorNodeInvert;
extern StructRNA RNA_CompositorNodeLensdist;
+extern StructRNA RNA_CompositorNodeLevels;
extern StructRNA RNA_CompositorNodeLumaMatte;
extern StructRNA RNA_CompositorNodeMapUV;
extern StructRNA RNA_CompositorNodeMapValue;
@@ -174,9 +179,11 @@ extern StructRNA RNA_DistortedNoiseTexture;
extern StructRNA RNA_DomainFluidSettings;
extern StructRNA RNA_Driver;
extern StructRNA RNA_DriverTarget;
+extern StructRNA RNA_DupliObject;
extern StructRNA RNA_EdgeSplitModifier;
extern StructRNA RNA_EditBone;
extern StructRNA RNA_EffectSequence;
+extern StructRNA RNA_EffectorWeights;
extern StructRNA RNA_EnumProperty;
extern StructRNA RNA_EnumPropertyItem;
extern StructRNA RNA_EnvironmentMap;
@@ -204,6 +211,10 @@ extern StructRNA RNA_FluidSettings;
extern StructRNA RNA_FluidSimulationModifier;
extern StructRNA RNA_FollowPathConstraint;
extern StructRNA RNA_Function;
+extern StructRNA RNA_GPencilFrame;
+extern StructRNA RNA_GPencilLayer;
+extern StructRNA RNA_GPencilStroke;
+extern StructRNA RNA_GPencilStrokePoint;
extern StructRNA RNA_GameBooleanProperty;
extern StructRNA RNA_GameFloatProperty;
extern StructRNA RNA_GameIntProperty;
@@ -214,10 +225,6 @@ extern StructRNA RNA_GameStringProperty;
extern StructRNA RNA_GameTimerProperty;
extern StructRNA RNA_GlowSequence;
extern StructRNA RNA_GreasePencil;
-extern StructRNA RNA_GPencilLayer;
-extern StructRNA RNA_GPencilFrame;
-extern StructRNA RNA_GPencilStroke;
-extern StructRNA RNA_GPencilStrokePoint;
extern StructRNA RNA_Group;
extern StructRNA RNA_Header;
extern StructRNA RNA_HemiLamp;
@@ -225,6 +232,7 @@ extern StructRNA RNA_HookModifier;
extern StructRNA RNA_ID;
extern StructRNA RNA_IDProperty;
extern StructRNA RNA_IDPropertyGroup;
+extern StructRNA RNA_IKParam;
extern StructRNA RNA_Image;
extern StructRNA RNA_ImagePaint;
extern StructRNA RNA_ImageSequence;
@@ -232,8 +240,12 @@ extern StructRNA RNA_ImageTexture;
extern StructRNA RNA_ImageUser;
extern StructRNA RNA_InflowFluidSettings;
extern StructRNA RNA_IntProperty;
+extern StructRNA RNA_Itasc;
extern StructRNA RNA_JoystickSensor;
extern StructRNA RNA_Key;
+extern StructRNA RNA_KeyConfig;
+extern StructRNA RNA_KeyMap;
+extern StructRNA RNA_KeyMapItem;
extern StructRNA RNA_KeyboardSensor;
extern StructRNA RNA_KeyingSet;
extern StructRNA RNA_KeyingSetPath;
@@ -249,7 +261,6 @@ extern StructRNA RNA_LimitDistanceConstraint;
extern StructRNA RNA_LimitLocationConstraint;
extern StructRNA RNA_LimitRotationConstraint;
extern StructRNA RNA_LimitScaleConstraint;
-extern StructRNA RNA_LocalLamp;
extern StructRNA RNA_LockedTrackConstraint;
extern StructRNA RNA_MagicTexture;
extern StructRNA RNA_Main;
@@ -264,6 +275,7 @@ extern StructRNA RNA_MaterialSlot;
extern StructRNA RNA_MaterialStrand;
extern StructRNA RNA_MaterialSubsurfaceScattering;
extern StructRNA RNA_MaterialTextureSlot;
+extern StructRNA RNA_MaterialVolume;
extern StructRNA RNA_Menu;
extern StructRNA RNA_Mesh;
extern StructRNA RNA_MeshColor;
@@ -314,6 +326,7 @@ extern StructRNA RNA_Paint;
extern StructRNA RNA_Panel;
extern StructRNA RNA_Particle;
extern StructRNA RNA_ParticleBrush;
+extern StructRNA RNA_ParticleDupliWeight;
extern StructRNA RNA_ParticleEdit;
extern StructRNA RNA_ParticleFluidSettings;
extern StructRNA RNA_ParticleHairKey;
@@ -328,6 +341,7 @@ extern StructRNA RNA_PluginTexture;
extern StructRNA RNA_PointCache;
extern StructRNA RNA_PointDensity;
extern StructRNA RNA_PointDensityTexture;
+extern StructRNA RNA_PointLamp;
extern StructRNA RNA_PointerProperty;
extern StructRNA RNA_Pose;
extern StructRNA RNA_PoseChannel;
@@ -343,7 +357,6 @@ extern StructRNA RNA_RenderEngine;
extern StructRNA RNA_RenderLayer;
extern StructRNA RNA_RenderPass;
extern StructRNA RNA_RenderResult;
-extern StructRNA RNA_RenderValue;
extern StructRNA RNA_RigidBodyJointConstraint;
extern StructRNA RNA_Scene;
extern StructRNA RNA_SceneGameData;
@@ -491,12 +504,12 @@ extern StructRNA RNA_TransformSequence;
extern StructRNA RNA_UILayout;
extern StructRNA RNA_UIListItem;
extern StructRNA RNA_UVProjectModifier;
+extern StructRNA RNA_UVProjector;
extern StructRNA RNA_UnitSettings;
extern StructRNA RNA_UnknownType;
extern StructRNA RNA_UserPreferences;
extern StructRNA RNA_UserPreferencesEdit;
extern StructRNA RNA_UserPreferencesFilePaths;
-extern StructRNA RNA_UserPreferencesLanguage;
extern StructRNA RNA_UserPreferencesSystem;
extern StructRNA RNA_UserPreferencesView;
extern StructRNA RNA_UserSolidLight;
@@ -692,6 +705,7 @@ char *RNA_path_back(const char *path);
int RNA_path_resolve(PointerRNA *ptr, const char *path,
PointerRNA *r_ptr, PropertyRNA **r_prop);
+char *RNA_path_from_ID_to_struct(PointerRNA *ptr);
char *RNA_path_from_ID_to_property(PointerRNA *ptr, PropertyRNA *prop);
#if 0
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index 595562503aa..37b175fbf12 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -102,6 +102,8 @@ PropertyRNA *RNA_def_float_dynamic_array(StructOrFunctionRNA *cont, const char *
*/
PropertyRNA *RNA_def_float_percentage(StructOrFunctionRNA *cont, const char *identifier, float default_value, float hardmin, float hardmax,
const char *ui_name, const char *ui_description, float softmin, float softmax);
+PropertyRNA *RNA_def_float_factor(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_pointer(StructOrFunctionRNA *cont, const char *identifier, const char *type,
const char *ui_name, const char *ui_description);
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index ccf4b7a2db3..ca44e3405f6 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -29,9 +29,14 @@
/* Types */
+extern EnumPropertyItem id_type_items[];
+
+
extern EnumPropertyItem object_mode_items[];
-extern EnumPropertyItem prop_mode_items[];
+extern EnumPropertyItem proportional_falloff_items[];
+extern EnumPropertyItem proportional_editing_items[];
+extern EnumPropertyItem snap_mode_items[];
extern EnumPropertyItem space_type_items[];
extern EnumPropertyItem region_type_items[];
extern EnumPropertyItem modifier_type_items[];
@@ -58,6 +63,12 @@ extern EnumPropertyItem unpack_method_items[];
extern EnumPropertyItem object_type_items[];
+extern EnumPropertyItem space_type_items[];
+
+struct bContext;
+struct PointerRNA;
+EnumPropertyItem *rna_TransformOrientation_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
+
#endif /* RNA_ENUM_TYPES */
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index e7fe86afd03..20160946ff3 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -54,6 +54,11 @@ typedef struct PointerRNA {
void *data;
} PointerRNA;
+typedef struct PropertyPointerRNA {
+ PointerRNA ptr;
+ struct PropertyRNA *prop;
+} PropertyPointerRNA;
+
/* Property */
typedef enum PropertyType {
@@ -94,9 +99,10 @@ typedef enum PropertySubType {
/* numbers */
PROP_UNSIGNED = 13,
PROP_PERCENTAGE = 14,
- PROP_ANGLE = 15|PROP_UNIT_ROTATION,
- PROP_TIME = 16|PROP_UNIT_TIME,
- PROP_DISTANCE = 17|PROP_UNIT_LENGTH,
+ PROP_FACTOR = 15,
+ PROP_ANGLE = 16|PROP_UNIT_ROTATION,
+ PROP_TIME = 17|PROP_UNIT_TIME,
+ PROP_DISTANCE = 18|PROP_UNIT_LENGTH,
/* number arrays */
PROP_COLOR = 20,
@@ -107,11 +113,9 @@ typedef enum PropertySubType {
PROP_MATRIX = 25,
PROP_EULER = 26|PROP_UNIT_ROTATION,
PROP_QUATERNION = 27,
- PROP_XYZ = 28,
- PROP_RGB = 29,
-
- /* pointers */
- PROP_NEVER_NULL = 30,
+ PROP_AXISANGLE = 28,
+ PROP_XYZ = 29,
+ PROP_RGB = 30,
/* booleans */
PROP_LAYER = 40,
@@ -122,43 +126,51 @@ typedef enum PropertyFlag {
/* editable means the property is editable in the user
* interface, properties are editable by default except
* for pointers and collections. */
- PROP_EDITABLE = 1,
+ PROP_EDITABLE = 1<<0,
/* this property is editable even if it is lib linked,
* meaning it will get lost on reload, but it's useful
* for editing. */
- PROP_LIB_EXCEPTION = 65536,
+ PROP_LIB_EXCEPTION = 1<<16,
/* animateable means the property can be driven by some
* other input, be it animation curves, expressions, ..
* properties are animateable by default except for pointers
* and collections */
- PROP_ANIMATEABLE = 2,
+ PROP_ANIMATEABLE = 1<<1,
/* icon */
- PROP_ICONS_CONSECUTIVE = 4096,
+ PROP_ICONS_CONSECUTIVE = 1<12,
- /* function paramater flags */
- PROP_REQUIRED = 4,
- PROP_RETURN = 8,
- PROP_RNAPTR = 2048,
+ /* hidden in the user interface */
+ PROP_HIDDEN = 1<<19,
+ /* function paramater flags */
+ PROP_REQUIRED = 1<<2,
+ PROP_RETURN = 1<<3,
+ PROP_RNAPTR = 1<<11,
/* registering */
- PROP_REGISTER = 16,
- PROP_REGISTER_OPTIONAL = 16|32,
+ PROP_REGISTER = 1<<4,
+ PROP_REGISTER_OPTIONAL = (1<<4)|(1<<5),
/* pointers */
- PROP_ID_REFCOUNT = 64,
+ PROP_ID_REFCOUNT = 1<<6,
+
+ /* disallow assigning a variable to its self, eg an object tracking its self
+ * only apply this to types that are derived from an ID ()*/
+ PROP_ID_SELF_CHECK = 1<<20,
+
+ PROP_NEVER_NULL = 1<<18,
/* internal flags */
- PROP_BUILTIN = 128,
- PROP_EXPORT = 256,
- PROP_RUNTIME = 512,
- PROP_IDPROPERTY = 1024,
- PROP_RAW_ACCESS = 8192,
- PROP_RAW_ARRAY = 16384,
- PROP_FREE_POINTERS = 32768,
- PROP_DYNAMIC = 131072 /* for dynamic arrays, and retvals of type string */
+ PROP_BUILTIN = 1<<7,
+ PROP_EXPORT = 1<<8,
+ PROP_RUNTIME = 1<<9,
+ PROP_IDPROPERTY = 1<<10,
+ PROP_RAW_ACCESS = 1<<13,
+ PROP_RAW_ARRAY = 1<<14,
+ PROP_FREE_POINTERS = 1<<15,
+ PROP_DYNAMIC = 1<<17 /* for dynamic arrays, and retvals of type string */
} PropertyFlag;
typedef struct CollectionPropertyIterator {
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript
index 6234bd8d2af..e814a7891ca 100644
--- a/source/blender/makesrna/SConscript
+++ b/source/blender/makesrna/SConscript
@@ -7,7 +7,7 @@ o = SConscript('intern/SConscript')
objs += o
incs = '#/intern/guardedalloc ../blenkernel ../blenlib ../makesdna intern .'
-incs += ' ../windowmanager ../editors/include ../imbuf'
+incs += ' ../windowmanager ../editors/include ../imbuf ../ikplugin'
incs += ' ../render/extern/include ../bmesh'
defs = []
@@ -40,4 +40,12 @@ if env['WITH_BF_GAMEENGINE']:
if env['BF_UNIT_TEST']:
defs.append('UNIT_TEST')
+
+if env['OURPLATFORM'] == 'linux2':
+ cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core','player'], priority = [165,20] )
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index b68f48c3194..c9c02fbecde 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -39,9 +39,13 @@ SET(SRC
../../../../intern/guardedalloc/intern/mallocn.c
../../../../intern/guardedalloc/intern/mmap_win.c)
-INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../windowmanager ../../editors/include ../../imbuf ../../render/extern/include ../../bmesh .)
+INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../ikplugin ../../windowmanager ../../editors/include ../../imbuf ../../render/extern/include .)
FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
+IF(WIN32)
+ SET(INC ${INC} ${PTHREADS_INC})
+ENDIF(WIN32)
+
IF(WITH_GAMEENGINE)
ADD_DEFINITIONS(-DGAMEBLENDER)
ENDIF(WITH_GAMEENGINE)
diff --git a/source/blender/makesrna/intern/Makefile b/source/blender/makesrna/intern/Makefile
index a1e824de657..e597046c8ba 100644
--- a/source/blender/makesrna/intern/Makefile
+++ b/source/blender/makesrna/intern/Makefile
@@ -49,6 +49,7 @@ CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I../../blenlib
CPPFLAGS += -I../../blenkernel
CPPFLAGS += -I../../imbuf
+CPPFLAGS += -I../../ikplugin
CPPFLAGS += -I../../makesdna
CPPFLAGS += -I../../windowmanager
CPPFLAGS += -I../../editors/include
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index 19d6af3e9eb..317f3a9779e 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -29,10 +29,10 @@ makesrna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesrna/\\"" '
defs = []
-incs = '#/intern/guardedalloc ../../bmesh ../../blenlib ../../blenkernel'
-incs += ' ../../imbuf ../../makesdna ../../makesrna'
+incs = '#/intern/guardedalloc ../../blenlib ../../blenkernel'
+incs += ' ../../imbuf ../../makesdna ../../makesrna ../../ikplugin'
incs += ' ../../windowmanager ../../editors/include'
-incs += ' ../../render/extern/include'
+incs += ' ../../render/extern/include ../../bmesh'
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
@@ -74,6 +74,14 @@ if env['WITH_BF_JACK']:
if env['BF_UNIT_TEST']:
defs.append('UNIT_TEST')
+
+if env['OURPLATFORM'] == 'linux2':
+ cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
makesrna_tool.Append(CPPDEFINES=defs)
makesrna_tool.Append (CPPPATH = Split(incs))
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index d0c7824dc9d..7e473fcb096 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -144,6 +144,11 @@ static void rna_print_data_get(FILE *f, PropertyDefRNA *dp)
fprintf(f, " %s *data= (%s*)(ptr->data);\n", dp->dnastructname, dp->dnastructname);
}
+static void rna_print_id_get(FILE *f, PropertyDefRNA *dp)
+{
+ fprintf(f, " ID *id= ptr->id.data;\n");
+}
+
static char *rna_alloc_function_name(const char *structname, const char *propname, const char *type)
{
AllocDefRNA *alloc;
@@ -530,6 +535,11 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
else {
rna_print_data_get(f, dp);
+ if(prop->flag & PROP_ID_SELF_CHECK) {
+ rna_print_id_get(f, dp);
+ fprintf(f, " if(id==value.data) return;\n\n");
+ }
+
if(prop->flag & PROP_ID_REFCOUNT) {
fprintf(f, "\n if(data->%s)\n", dp->dnaname);
fprintf(f, " id_us_min((ID*)data->%s);\n", dp->dnaname);
@@ -1406,6 +1416,7 @@ static const char *rna_property_subtypename(PropertyType type)
case PROP_DIRPATH: return "PROP_DIRPATH";
case PROP_UNSIGNED: return "PROP_UNSIGNED";
case PROP_PERCENTAGE: return "PROP_PERCENTAGE";
+ case PROP_FACTOR: return "PROP_FACTOR";
case PROP_ANGLE: return "PROP_ANGLE";
case PROP_TIME: return "PROP_TIME";
case PROP_DISTANCE: return "PROP_DISTANCE";
@@ -1415,11 +1426,11 @@ static const char *rna_property_subtypename(PropertyType type)
case PROP_MATRIX: return "PROP_MATRIX";
case PROP_EULER: return "PROP_EULER";
case PROP_QUATERNION: return "PROP_QUATERNION";
+ case PROP_AXISANGLE: return "PROP_AXISANGLE";
case PROP_VELOCITY: return "PROP_VELOCITY";
case PROP_ACCELERATION: return "PROP_ACCELERATION";
case PROP_XYZ: return "PROP_XYZ";
case PROP_RGB: return "PROP_RGB";
- case PROP_NEVER_NULL: return "PROP_NEVER_NULL";
case PROP_LAYER: return "PROP_LAYER";
case PROP_LAYER_MEMBER: return "PROP_LAYER_MEMBER";
default: {
@@ -1969,7 +1980,7 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"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_action.c", "rna_action_api.c", RNA_def_action},
{"rna_animation.c", "rna_animation_api.c", RNA_def_animation},
{"rna_actuator.c", NULL, RNA_def_actuator},
{"rna_armature.c", NULL, RNA_def_armature},
@@ -1986,12 +1997,12 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_fluidsim.c", NULL, RNA_def_fluidsim},
{"rna_gpencil.c", NULL, RNA_def_gpencil},
{"rna_group.c", NULL, RNA_def_group},
- {"rna_image.c", NULL, RNA_def_image},
+ {"rna_image.c", "rna_image_api.c", 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_material.c", "rna_material_api.c", 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},
@@ -2001,7 +2012,7 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"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_pose.c", "rna_pose_api.c", RNA_def_pose},
{"rna_property.c", NULL, RNA_def_gameproperty},
{"rna_render.c", NULL, RNA_def_render},
{"rna_scene.c", "rna_scene_api.c", RNA_def_scene},
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index f5c6063e892..2fc1fcfc681 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -33,6 +33,38 @@
#include "rna_internal.h"
+/* enum of ID-block types
+ * NOTE: need to keep this in line with the other defines for these
+ */
+EnumPropertyItem id_type_items[] = {
+ {ID_AC, "ACTION", ICON_ACTION, "Action", ""},
+ {ID_AR, "ARMATURE", ICON_ARMATURE_DATA, "Armature", ""},
+ {ID_BR, "BRUSH", ICON_BRUSH_DATA, "Brush", ""},
+ {ID_CA, "CAMERA", ICON_CAMERA_DATA, "Camera", ""},
+ {ID_CU, "CURVE", ICON_CURVE_DATA, "Curve", ""},
+ {ID_VF, "FONT", ICON_FONT_DATA, "Font", ""},
+ {ID_GD, "GREASEPENCIL", ICON_GREASEPENCIL, "Grease Pencil", ""},
+ {ID_GR, "GROUP", ICON_GROUP, "Group", ""},
+ {ID_IM, "IMAGE", ICON_IMAGE_DATA, "Image", ""},
+ {ID_KE, "KEY", ICON_SHAPEKEY_DATA, "Key", ""},
+ {ID_LA, "LAMP", ICON_LAMP_DATA, "Lamp", ""},
+ {ID_LI, "LIBRARY", ICON_LIBRARY_DATA_DIRECT, "Library", ""},
+ {ID_LT, "LATTICE", ICON_LATTICE_DATA, "Lattice", ""},
+ {ID_MA, "MATERIAL", ICON_MATERIAL_DATA, "Material", ""},
+ {ID_MB, "META", ICON_META_DATA, "MetaBall", ""},
+ {ID_ME, "MESH", ICON_MESH_DATA, "Mesh", ""},
+ {ID_NT, "NODETREE", ICON_NODE, "NodeTree", ""},
+ {ID_OB, "OBJECT", ICON_OBJECT_DATA, "Object", ""},
+ {ID_PA, "PARTICLE", ICON_PARTICLE_DATA, "Particle", ""},
+ {ID_SCE, "SCENE", ICON_SCENE_DATA, "Scene", ""},
+ {ID_SCR, "SCREEN", ICON_SPLITSCREEN, "Screen", ""},
+ {ID_SO, "SOUND", ICON_PLAY_AUDIO, "Sound", ""},
+ {ID_TXT, "TEXT", ICON_TEXT, "Text", ""},
+ {ID_TE, "TEXTURE", ICON_TEXTURE_DATA, "Texture", ""},
+ {ID_WO, "WORLD", ICON_WORLD_DATA, "World", ""},
+ {ID_WM, "WINDOWMANAGER", ICON_FULLSCREEN, "Window Manager", ""},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
#include "BKE_idprop.h"
@@ -178,6 +210,18 @@ StructRNA* rna_IDPropertyGroup_refine(PointerRNA *ptr)
return ptr->type;
}
+ID *rna_ID_copy(ID *id)
+{
+ ID *newid;
+
+ if(id_copy(id, &newid, 0)) {
+ if(newid) newid->us--;
+ return newid;
+ }
+
+ return NULL;
+}
+
#else
static void rna_def_ID_properties(BlenderRNA *brna)
@@ -243,7 +287,8 @@ static void rna_def_ID_properties(BlenderRNA *brna)
static void rna_def_ID(BlenderRNA *brna)
{
StructRNA *srna;
- PropertyRNA *prop;
+ FunctionRNA *func;
+ PropertyRNA *prop, *parm;
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.");
@@ -271,6 +316,12 @@ 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.");
+
+ /* functions */
+ func= RNA_def_function(srna, "copy", "rna_ID_copy");
+ RNA_def_function_ui_description(func, "Create a copy of this datablock (not supported for all datablocks).");
+ parm= RNA_def_pointer(func, "id", "ID", "", "New copy of the ID.");
+ RNA_def_function_return(func, parm);
}
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 9472cdb300c..6cf2fd0c60f 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -620,7 +620,7 @@ char RNA_property_array_item_char(PropertyRNA *prop, int index)
PropertySubType subtype= rna_ensure_property(prop)->subtype;
/* get string to use for array index */
- if ((index < 4) && (subtype == PROP_QUATERNION))
+ if ((index < 4) && ELEM(subtype, PROP_QUATERNION, PROP_AXISANGLE))
return quatitem[index];
else if((index < 4) && ELEM6(subtype, PROP_TRANSLATION, PROP_DIRECTION, PROP_XYZ, PROP_EULER, PROP_VELOCITY, PROP_ACCELERATION))
return vectoritem[index];
@@ -727,7 +727,7 @@ void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, En
*free= 0;
- if(eprop->itemf) {
+ if(eprop->itemf && C) {
int tot= 0;
*item= eprop->itemf(C, ptr, free);
@@ -1409,10 +1409,17 @@ PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value)
{
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+ IDProperty *idprop;
+
+ if((idprop=rna_idproperty_check(&prop, ptr))) {
+ /* not supported */
+ }
+ else {
+ PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
- if(pprop->set)
- pprop->set(ptr, ptr_value);
+ if(pprop->set && !((prop->flag & PROP_NEVER_NULL) && ptr_value.data == NULL))
+ pprop->set(ptr, ptr_value);
+ }
}
void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop)
@@ -2219,6 +2226,9 @@ int RNA_path_resolve(PointerRNA *ptr, const char *path, PointerRNA *r_ptr, Prope
prop= NULL;
curptr= *ptr;
+ if(path==NULL)
+ return 0;
+
while(*path) {
/* look up property name in current struct */
token= rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 0);
@@ -2380,12 +2390,11 @@ char *RNA_path_back(const char *path)
return result;
}
-char *RNA_path_from_ID_to_property(PointerRNA *ptr, PropertyRNA *prop)
+char *RNA_path_from_ID_to_struct(PointerRNA *ptr)
{
- char *ptrpath=NULL, *path;
- const char *propname;
+ char *ptrpath=NULL;
- if(!ptr->id.data || !ptr->data || !prop)
+ if(!ptr->id.data || !ptr->data)
return NULL;
if(!RNA_struct_is_ID(ptr->type)) {
@@ -2411,6 +2420,20 @@ char *RNA_path_from_ID_to_property(PointerRNA *ptr, PropertyRNA *prop)
else
return NULL;
}
+
+ return ptrpath;
+}
+
+char *RNA_path_from_ID_to_property(PointerRNA *ptr, PropertyRNA *prop)
+{
+ const char *propname;
+ char *ptrpath, *path;
+
+ if(!ptr->id.data || !ptr->data || !prop)
+ return NULL;
+
+ /* path from ID to the struct holding this property */
+ ptrpath= RNA_path_from_ID_to_struct(ptr);
propname= RNA_property_identifier(prop);
@@ -2762,7 +2785,10 @@ int RNA_property_is_set(PointerRNA *ptr, const char *name)
PropertyRNA *prop= RNA_struct_find_property(ptr, name);
if(prop) {
- return (rna_idproperty_find(ptr, name) != NULL);
+ if(prop->flag & PROP_IDPROPERTY)
+ return (rna_idproperty_find(ptr, name) != NULL);
+ else
+ return 1;
}
else {
// printf("RNA_property_is_set: %s.%s not found.\n", ptr->type->identifier, name);
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 99090b62938..eaa11b4ad38 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -100,6 +100,8 @@ static void rna_def_action(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
RNA_def_property_struct_type(prop, "TimelineMarker");
RNA_def_property_ui_text(prop, "Pose Markers", "Markers specific to this Action, for labeling poses.");
+
+ RNA_api_action(srna);
}
/* --------- */
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 473e726db60..ce83d1c469b 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -58,6 +58,7 @@ void RNA_def_actuator(BlenderRNA *brna)
{ACT_PARENT, "PARENT", 0, "Parent", ""},
{ACT_SHAPEACTION, "SHAPE_ACTION", 0, "Shape Action", ""},
{ACT_STATE, "STATE", 0, "State", ""},
+ {ACT_ARMATURE, "ARMATURE", 0, "Armature", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Actuator", NULL);
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index a8d3a6edaae..23a9c48710e 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
+#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
#include "RNA_enum_types.h"
@@ -57,6 +58,26 @@ static int rna_AnimData_action_editable(PointerRNA *ptr)
return 1;
}
+static void rna_AnimData_action_set(PointerRNA *ptr, PointerRNA value)
+{
+ AnimData *adt= (AnimData*)(ptr->data);
+ adt->action= value.data;
+}
+
+/* ****************************** */
+
+static StructRNA *rna_ksPath_id_typef(PointerRNA *ptr)
+{
+ KS_Path *ksp= (KS_Path*)ptr->data;
+ return ID_code_to_RNA_type(ksp->idtype);
+}
+
+static int rna_ksPath_id_editable(PointerRNA *ptr)
+{
+ KS_Path *ksp= (KS_Path*)ptr->data;
+ return (ksp->idtype)? PROP_EDITABLE : 0;
+}
+
static void rna_ksPath_RnaPath_get(PointerRNA *ptr, char *value)
{
KS_Path *ksp= (KS_Path *)ptr->data;
@@ -90,6 +111,50 @@ static void rna_ksPath_RnaPath_set(PointerRNA *ptr, const char *value)
ksp->rna_path= NULL;
}
+/* ****************************** */
+
+static int rna_KeyingSet_active_ksPath_editable(PointerRNA *ptr)
+{
+ KeyingSet *ks= (KeyingSet *)ptr->data;
+
+ /* only editable if there are some paths to change to */
+ return (ks->paths.first != NULL);
+}
+
+static PointerRNA rna_KeyingSet_active_ksPath_get(PointerRNA *ptr)
+{
+ KeyingSet *ks= (KeyingSet *)ptr->data;
+ return rna_pointer_inherit_refine(ptr, &RNA_KeyingSetPath, BLI_findlink(&ks->paths, ks->active_path-1));
+}
+
+static void rna_KeyingSet_active_ksPath_set(PointerRNA *ptr, PointerRNA value)
+{
+ KeyingSet *ks= (KeyingSet *)ptr->data;
+ KS_Path *ksp= (KS_Path*)value.data;
+ ks->active_path= BLI_findindex(&ks->paths, ksp) + 1;
+}
+
+static int rna_KeyingSet_active_ksPath_index_get(PointerRNA *ptr)
+{
+ KeyingSet *ks= (KeyingSet *)ptr->data;
+ return MAX2(ks->active_path-1, 0);
+}
+
+static void rna_KeyingSet_active_ksPath_index_set(PointerRNA *ptr, int value)
+{
+ KeyingSet *ks= (KeyingSet *)ptr->data;
+ ks->active_path= value+1;
+}
+
+static void rna_KeyingSet_active_ksPath_index_range(PointerRNA *ptr, int *min, int *max)
+{
+ KeyingSet *ks= (KeyingSet *)ptr->data;
+
+ *min= 0;
+ *max= BLI_countlist(&ks->paths)-1;
+ *max= MAX2(0, *max);
+}
+
#else
@@ -104,8 +169,18 @@ static void rna_def_keyingset_path(BlenderRNA *brna)
/* ID */
prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "ID");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_editable_func(prop, "rna_ksPath_id_editable");
+ RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_ksPath_id_typef");
RNA_def_property_ui_text(prop, "ID-Block", "ID-Block that keyframes for Keying Set should be added to (for Absolute Keying Sets only).");
+ prop= RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "idtype");
+ RNA_def_property_enum_items(prop, id_type_items);
+ RNA_def_property_enum_default(prop, ID_OB);
+ RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used.");
+
/* Group */
prop= RNA_def_property(srna, "group", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Group Name", "Name of Action Group to assign setting(s) for this path to.");
@@ -118,12 +193,11 @@ static void rna_def_keyingset_path(BlenderRNA *brna)
/* Path + Array Index */
prop= RNA_def_property(srna, "rna_path", PROP_STRING, PROP_NONE);
- //RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now editable
RNA_def_property_string_funcs(prop, "rna_ksPath_RnaPath_get", "rna_ksPath_RnaPath_length", "rna_ksPath_RnaPath_set");
RNA_def_property_ui_text(prop, "RNA Path", "RNA Path to property setting.");
+ RNA_def_struct_name_property(srna, prop); // XXX this is the best indicator for now...
prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE);
- //RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now editable
RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific setting if applicable.");
/* Flags */
@@ -151,6 +225,18 @@ static void rna_def_keyingset(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "KeyingSetPath");
RNA_def_property_ui_text(prop, "Paths", "Keying Set Paths to define settings that get keyframed together.");
+ prop= RNA_def_property(srna, "active_path", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "KeyingSetPath");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_editable_func(prop, "rna_KeyingSet_active_ksPath_editable");
+ RNA_def_property_pointer_funcs(prop, "rna_KeyingSet_active_ksPath_get", "rna_KeyingSet_active_ksPath_set", NULL);
+ RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes.");
+
+ prop= RNA_def_property(srna, "active_path_index", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "active_path");
+ RNA_def_property_int_funcs(prop, "rna_KeyingSet_active_ksPath_index_get", "rna_KeyingSet_active_ksPath_index_set", "rna_KeyingSet_active_ksPath_index_range");
+ RNA_def_property_ui_text(prop, "Active Path Index", "Current Keying Set index.");
+
/* Flags */
prop= RNA_def_property(srna, "builtin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -202,8 +288,11 @@ void rna_def_animdata(BlenderRNA *brna)
/* Active Action */
prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Action", "Active Action for this datablock.");
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_AnimData_action_set", NULL);
+ RNA_def_property_flag(prop, PROP_EDITABLE); /* this flag as well as the dynamic test must be defined for this to be editable... */
RNA_def_property_editable_func(prop, "rna_AnimData_action_editable");
+ RNA_def_property_ui_text(prop, "Action", "Active Action for this datablock.");
+
/* Active Action Settings */
prop= RNA_def_property(srna, "action_extrapolation", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_animation_api.c b/source/blender/makesrna/intern/rna_animation_api.c
index 6af87335e02..5852c494936 100644
--- a/source/blender/makesrna/intern/rna_animation_api.c
+++ b/source/blender/makesrna/intern/rna_animation_api.c
@@ -54,6 +54,7 @@ static void rna_KeyingSet_add_destination(KeyingSet *keyingset, ReportList *repo
/* if data is valid, call the API function for this */
if (keyingset) {
BKE_keyingset_add_destination(keyingset, id, group_name, rna_path, array_index, flag, grouping_method);
+ keyingset->active_path= BLI_countlist(&keyingset->paths);
}
else {
BKE_report(reports, RPT_ERROR, "Keying Set Destination could not be added.");
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index dcf89b7ac1e..6c9d9263eeb 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -52,6 +52,7 @@ static void rna_Armature_update_data(bContext *C, PointerRNA *ptr)
DAG_id_flush_update(id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
+ //WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
}
static void rna_Armature_redraw_data(bContext *C, PointerRNA *ptr)
@@ -61,6 +62,11 @@ static void rna_Armature_redraw_data(bContext *C, PointerRNA *ptr)
WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
}
+static char *rna_Bone_path(PointerRNA *ptr)
+{
+ return BLI_sprintfN("bones[\"%s\"]", ((Bone*)ptr->data)->name);
+}
+
static void rna_bone_layer_set(short *layer, const int *values)
{
int i, tot= 0;
@@ -374,6 +380,11 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
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.");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
+
+ prop= RNA_def_property(srna, "selectable", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_UNSELECTABLE);
+ RNA_def_property_ui_text(prop, "Selectable", "Bone is able to be selected");
+ RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* Number values */
/* envelope deform settings */
@@ -430,6 +441,7 @@ static void rna_def_bone(BlenderRNA *brna)
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);
+ RNA_def_struct_path_func(srna, "rna_Bone_path");
/* pointers/collections */
/* parent (pointer) */
@@ -457,6 +469,37 @@ static void rna_def_bone(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_SELECTED);
RNA_def_property_ui_text(prop, "Selected", "");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+
+ /* XXX better matrix descriptions possible (Arystan) */
+ prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
+ RNA_def_property_float_sdna(prop, NULL, "bone_mat");
+ RNA_def_property_array(prop, 9);
+ RNA_def_property_ui_text(prop, "Bone Matrix", "3x3 bone matrix.");
+
+ prop= RNA_def_property(srna, "armature_matrix", PROP_FLOAT, PROP_MATRIX);
+ RNA_def_property_float_sdna(prop, NULL, "arm_mat");
+ RNA_def_property_array(prop, 16);
+ RNA_def_property_ui_text(prop, "Bone Armature-Relative Matrix", "4x4 bone matrix relative to armature.");
+
+ prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "tail");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Tail", "Location of tail end of the bone.");
+
+ prop= RNA_def_property(srna, "armature_tail", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "arm_tail");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Armature-Relative Tail", "Location of tail end of the bone relative to armature.");
+
+ prop= RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "head");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Head", "Location of head end of the bone.");
+
+ prop= RNA_def_property(srna, "armature_head", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "arm_head");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Armature-Relative Head", "Location of head end of the bone relative to armature.");
}
static void rna_def_edit_bone(BlenderRNA *brna)
@@ -526,23 +569,37 @@ static void rna_def_armature(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_drawtype_items[] = {
- {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."},
+ {ARM_OCTA, "OCTAHEDRAL", 0, "Octahedral", "Display bones as octahedral shape (default)."},
+ {ARM_LINE, "STICK", 0, "Stick", "Display bones as simple 2D lines with dots."},
+ {ARM_B_BONE, "BBONE", 0, "B-Bone", "Display bones as boxes, showing subdivision and B-Splines"},
+ {ARM_ENVELOPE, "ENVELOPE", 0, "Envelope", "Display bones as extruded spheres, showing defomation influence volume."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_ghost_type_items[] = {
- {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."},
+ {ARM_GHOST_CUR, "CURRENT_FRAME", 0, "Around Frame", "Display Ghosts of poses within a fixed number of frames around the current frame."},
+ {ARM_GHOST_RANGE, "RANGE", 0, "In Range", "Display Ghosts of poses within specified range."},
+ {ARM_GHOST_KEYS, "KEYS", 0, "On Keyframes", "Display Ghosts of poses on Keyframes."},
+ {0, NULL, 0, NULL, NULL}};
+ static const EnumPropertyItem prop_paths_type_items[]= {
+ {ARM_PATH_ACFRA, "CURRENT_FRAME", 0, "Around Frame", "Display Paths of poses within a fixed number of frames around the current frame."},
+ {0, "RANGE", 0, "In Range", "Display Paths of poses within specified range."},
+ {0, NULL, 0, NULL, NULL}};
+ static const EnumPropertyItem prop_paths_location_items[]= {
+ {ARM_PATH_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"},
+ {0, "TAILS", 0, "Tails", "Calculate bone paths from tails"},
+ {0, NULL, 0, NULL, NULL}};
+ static const EnumPropertyItem prop_pose_position_items[]= {
+ {0, "POSE_POSITION", 0, "Pose Position", "Show armature in posed state."},
+ {ARM_RESTPOS, "REST_POSITION", 0, "Rest Position", "Show Armature in binding pose state. No posing possible."},
{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.");
RNA_def_struct_ui_icon(srna, ICON_ARMATURE_DATA);
-
RNA_def_struct_sdna(srna, "bArmature");
+ /* Animation Data */
+ rna_def_animdata_common(srna);
+
/* Collections */
prop= RNA_def_property(srna, "bones", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bonebase", NULL);
@@ -556,6 +613,17 @@ static void rna_def_armature(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Edit Bones", "");
/* Enum values */
+// prop= RNA_def_property(srna, "rest_position", PROP_BOOLEAN, PROP_NONE);
+// RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_RESTPOS);
+// RNA_def_property_ui_text(prop, "Rest Position", "Show Armature in Rest Position. No posing possible.");
+// RNA_def_property_update(prop, 0, "rna_Armature_update_data");
+
+ prop= RNA_def_property(srna, "pose_position", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, prop_pose_position_items);
+ RNA_def_property_ui_text(prop, "Pose Position", "Show armature in binding pose or final posed state.");
+ RNA_def_property_update(prop, 0, "rna_Armature_update_data");
+
prop= RNA_def_property(srna, "drawtype", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_drawtype_items);
RNA_def_property_ui_text(prop, "Draw Type", "");
@@ -564,7 +632,19 @@ static void rna_def_armature(BlenderRNA *brna)
prop= RNA_def_property(srna, "ghost_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ghosttype");
RNA_def_property_enum_items(prop, prop_ghost_type_items);
- RNA_def_property_ui_text(prop, "Ghost Drawing", "Method of Onion-skinning for active Action");
+ RNA_def_property_ui_text(prop, "Ghost Type", "Method of Onion-skinning for active Action");
+ RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+
+ prop= RNA_def_property(srna, "paths_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "pathflag");
+ RNA_def_property_enum_items(prop, prop_paths_type_items);
+ RNA_def_property_ui_text(prop, "Paths Type", "Type of range to show for Bone Paths");
+ RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+
+ prop= RNA_def_property(srna, "paths_location", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "pathflag");
+ RNA_def_property_enum_items(prop, prop_paths_location_items);
+ RNA_def_property_ui_text(prop, "Paths Location", "When calculating Bone Paths, use Head or Tips");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* Boolean values */
@@ -574,7 +654,7 @@ static 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);
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
/* layer protection */
@@ -585,10 +665,7 @@ static void rna_def_armature(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* flag */
- prop= RNA_def_property(srna, "rest_position", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_RESTPOS);
- RNA_def_property_ui_text(prop, "Rest Position", "Show Armature in Rest Position. No posing possible.");
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
+
prop= RNA_def_property(srna, "draw_axes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_DRAWAXES);
@@ -626,8 +703,8 @@ static void rna_def_armature(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
prop= RNA_def_property(srna, "ghost_only_selected", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ARM_GHOST_ONLYSEL);
- RNA_def_property_ui_text(prop, "Draw Ghosts on Selected Keyframes Only", "");
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_GHOST_ONLYSEL);
+ RNA_def_property_ui_text(prop, "Draw Ghosts on Selected Bones Only", "");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* deformflag */
@@ -672,15 +749,6 @@ static void rna_def_armature(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Paths Show Keyframe Numbers", "When drawing Armature in Pose Mode, show frame numbers of Keyframes on Bone Paths");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "paths_show_around_current_frame", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pathflag", ARM_PATH_ACFRA);
- RNA_def_property_ui_text(prop, "Paths Around Current Frame", "When drawing Armature in Pose Mode, only show section of Bone Paths that falls around current frame");
- RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-
- prop= RNA_def_property(srna, "paths_calculate_head_positions", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pathflag", ARM_PATH_HEADS);
- RNA_def_property_ui_text(prop, "Paths Use Heads", "When calculating Bone Paths, use Head locations instead of Tips");
- RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* Number fields */
/* ghost/onionskining settings */
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index 8002aa89313..36a648c8a82 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -74,44 +74,33 @@ EnumPropertyItem boidruleset_type_items[] ={
static void rna_Boids_reset(bContext *C, PointerRNA *ptr)
{
- Scene *scene = CTX_data_scene(C);
- ParticleSettings *part;
-
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_id_flush_update(&ob->id, OB_RECALC_DATA);
- }
- else {
- part = ptr->id.data;
- psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET);
+ DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
}
+ else
+ DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET);
WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Boids_reset_deps(bContext *C, PointerRNA *ptr)
{
Scene *scene = CTX_data_scene(C);
- ParticleSettings *part;
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_id_flush_update(&ob->id, OB_RECALC_DATA);
- }
- else {
- part = ptr->id.data;
- psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET);
- DAG_scene_sort(scene);
+ DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
}
+ else
+ DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET);
+
+ DAG_scene_sort(scene);
WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 70daa3690da..e9744c7f5ed 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * Contributor(s): Blender Foundation (2008), Juho Vepsäläinen
+ * Contributor(s): Blender Foundation (2008), Juho Veps�l�inen
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -51,6 +51,9 @@ EnumPropertyItem brush_sculpt_tool_items[] = {
#include "BKE_texture.h"
+#include "WM_api.h"
+#include "WM_types.h"
+
static void rna_Brush_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Brush *brush= (Brush*)ptr->data;
@@ -62,33 +65,68 @@ static PointerRNA rna_Brush_active_texture_get(PointerRNA *ptr)
Brush *br= (Brush*)ptr->data;
Tex *tex;
- tex= (br->mtex[(int)br->texact])? br->mtex[(int)br->texact]->tex: NULL;
+ tex= give_current_brush_texture(br);
return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
}
static void rna_Brush_active_texture_set(PointerRNA *ptr, PointerRNA value)
{
Brush *br= (Brush*)ptr->data;
- int act= br->texact;
- if(br->mtex[act] && br->mtex[act]->tex)
- id_us_min(&br->mtex[act]->tex->id);
+ set_current_brush_texture(br, value.data);
+}
- if(value.data) {
- if(!br->mtex[act])
- br->mtex[act]= add_mtex();
-
- br->mtex[act]->tex= value.data;
- id_us_plus(&br->mtex[act]->tex->id);
- }
- else if(br->mtex[act]) {
- MEM_freeN(br->mtex[act]);
- br->mtex[act]= NULL;
- }
+static void rna_Brush_update(bContext *C, PointerRNA *ptr)
+{
+ Brush *br= (Brush*)ptr->data;
+ WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, br);
+}
+
+static float rna_BrushTextureSlot_angle_get(PointerRNA *ptr)
+{
+ MTex *tex= (MTex*)ptr->data;
+ const float conv = 57.295779506;
+ return tex->rot * conv;
+}
+
+static void rna_BrushTextureSlot_angle_set(PointerRNA *ptr, float v)
+{
+ MTex *tex= (MTex*)ptr->data;
+ const float conv = 0.017453293;
+ tex->rot = v * conv;
}
#else
+static void rna_def_brush_texture_slot(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_map_mode_items[] = {
+ {MTEX_MAP_MODE_FIXED, "FIXED", 0, "Fixed", ""},
+ {MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""},
+ {MTEX_MAP_MODE_3D, "3D", 0, "3D", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "BrushTextureSlot", "TextureSlot");
+ RNA_def_struct_sdna(srna, "MTex");
+ RNA_def_struct_ui_text(srna, "Brush Texture Slot", "Texture slot for textures in a Brush datablock.");
+
+ prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
+ RNA_def_property_float_sdna(prop, NULL, "rot");
+ RNA_def_property_range(prop, 0, 360);
+ RNA_def_property_float_funcs(prop, "rna_BrushTextureSlot_angle_get", "rna_BrushTextureSlot_angle_set", NULL);
+ RNA_def_property_ui_text(prop, "Angle", "Defines brush texture rotation.");
+ RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
+
+ prop= RNA_def_property(srna, "map_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "brush_map_mode");
+ RNA_def_property_enum_items(prop, prop_map_mode_items);
+ RNA_def_property_ui_text(prop, "Mode", "");
+ RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
+}
+
static void rna_def_brush(BlenderRNA *brna)
{
StructRNA *srna;
@@ -118,129 +156,157 @@ static void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "blend", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_blend_items);
RNA_def_property_ui_text(prop, "Blending mode", "Brush blending mode.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "sculpt_tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, brush_sculpt_tool_items);
RNA_def_property_ui_text(prop, "Sculpt Tool", "");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_flip_direction_items);
RNA_def_property_ui_text(prop, "Direction", "Mapping type to use for this image in the game engine.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
/* number values */
prop= RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 200);
RNA_def_property_ui_text(prop, "Size", "Diameter of the brush.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "innerradius");
+ prop= RNA_def_property(srna, "jitter", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "jitter");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Falloff", "Falloff radius of the brush.");
-
+ RNA_def_property_ui_text(prop, "Jitter", "Jitter the position of the brush while painting.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop= RNA_def_property(srna, "spacing", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spacing");
RNA_def_property_range(prop, 1.0f, 100.0f);
RNA_def_property_ui_text(prop, "Spacing", "Spacing between brush stamps.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "smooth_stroke_radius", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 10, 200);
RNA_def_property_ui_text(prop, "Smooth Stroke Radius", "Minimum distance from last point before stroke continues.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "smooth_stroke_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.5, 0.99);
RNA_def_property_ui_text(prop, "Smooth Stroke Factor", "Higher values give a smoother stroke.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "rate", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rate");
RNA_def_property_range(prop, 0.010f, 1.0f);
RNA_def_property_ui_text(prop, "Rate", "Number of paints per second for Airbrush.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "rgb");
RNA_def_property_ui_text(prop, "Color", "");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alpha");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Strength", "The amount of pressure on the brush.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
/* flag */
- prop= RNA_def_property(srna, "airbrush", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_airbrush", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_AIRBRUSH);
RNA_def_property_ui_text(prop, "Airbrush", "Keep applying paint effect while holding mouse (spray).");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "wrap", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_TORUS);
RNA_def_property_ui_text(prop, "Wrap", "Enable torus wrapping while painting.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "strength_pressure", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_strength_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ALPHA_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Strength Pressure", "Enable tablet pressure sensitivity for strength.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "size_pressure", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_size_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SIZE_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure sensitivity for size.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "falloff_pressure", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_RAD_PRESSURE);
+ prop= RNA_def_property(srna, "use_jitter_pressure", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_JITTER_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
- RNA_def_property_ui_text(prop, "Falloff Pressure", "Enable tablet pressure sensitivity for falloff.");
-
- prop= RNA_def_property(srna, "spacing_pressure", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Jitter Pressure", "Enable tablet pressure sensitivity for jitter.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
+ prop= RNA_def_property(srna, "use_spacing_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACING_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Spacing Pressure", "Enable tablet pressure sensitivity for spacing.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "rake", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_rake", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_RAKE);
RNA_def_property_ui_text(prop, "Rake", "Rotate the brush texture to match the stroke direction.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "anchored", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_anchor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ANCHORED);
RNA_def_property_ui_text(prop, "Anchored", "Keep the brush anchored to the initial location.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "space", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_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.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "smooth_stroke", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_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.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "persistent", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_persistent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_PERSISTENT);
RNA_def_property_ui_text(prop, "Persistent", "Sculpts on a persistent layer of the mesh.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
/* not exposed in the interface yet
prop= RNA_def_property(srna, "fixed_tex", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_FIXED_TEX);
- RNA_def_property_ui_text(prop, "Fixed Texture", "Keep texture origin in fixed position.");*/
+ RNA_def_property_ui_text(prop, "Fixed Texture", "Keep texture origin in fixed position.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update"); */
- prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Curve", "Editable falloff curve.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
/* texture */
rna_def_mtex_common(srna, "rna_Brush_mtex_begin", "rna_Brush_active_texture_get",
- "rna_Brush_active_texture_set", "TextureSlot");
+ "rna_Brush_active_texture_set", "BrushTextureSlot", "rna_Brush_update");
/* clone tool */
prop= RNA_def_property(srna, "clone_image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "clone.image");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Clone Image", "Image for clone tool.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "clone_opacity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clone.alpha");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clone Opacity", "Opacity of clone image display.");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "clone_offset", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "clone.offset");
RNA_def_property_ui_text(prop, "Clone Offset", "");
RNA_def_property_ui_range(prop, -1.0f , 1.0f, 10.0f, 3);
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
}
@@ -292,6 +358,7 @@ static void rna_def_operator_stroke_element(BlenderRNA *brna)
void RNA_def_brush(BlenderRNA *brna)
{
rna_def_brush(brna);
+ rna_def_brush_texture_slot(brna);
rna_def_operator_stroke_element(brna);
}
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 9c33b0afb00..6254041c7ef 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -22,7 +22,9 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#define _USE_MATH_DEFINES
#include <stdlib.h>
+#include <math.h>
#include "RNA_define.h"
#include "RNA_types.h"
@@ -35,6 +37,19 @@
#ifdef RNA_RUNTIME
+static void rna_Camera_angle_update(bContext *C, PointerRNA *ptr)
+{
+ Camera *cam= (Camera*)ptr->id.data;
+ cam->lens = 16.0f / tan(M_PI*cam->angle/360.0f);
+}
+
+static void rna_Camera_lens_update(bContext *C, PointerRNA *ptr)
+{
+ Camera *cam= (Camera*)ptr->id.data;
+ cam->angle= 360.0f * atan(16.0f/cam->lens) / M_PI;
+}
+
+
#else
void RNA_def_camera(BlenderRNA *brna)
@@ -62,7 +77,7 @@ void RNA_def_camera(BlenderRNA *brna)
/* Number values */
- prop= RNA_def_property(srna, "passepartout_alpha", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "passepartout_alpha", PROP_FLOAT, PROP_FACTOR);
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.");
@@ -72,7 +87,7 @@ void RNA_def_camera(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "angle");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Angle", "Perspective Camera lend field of view in degrees.");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_angle_update");
prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipsta");
@@ -90,7 +105,7 @@ void RNA_def_camera(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "lens");
RNA_def_property_range(prop, 1.0f, 250.0f);
RNA_def_property_ui_text(prop, "Lens", "Perspective Camera lens value in mm.");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_lens_update");
prop= RNA_def_property(srna, "ortho_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ortho_scale");
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 22cc2e2c9c3..d64e2c7119b 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -306,6 +306,11 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Bending Stiffness Vertex Group", "Vertex group for fine control over bending stiffness.");
RNA_def_property_update(prop, 0, "rna_cloth_update");
+ prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "EffectorWeights");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Effector Weights", "");
+
/* unused */
/* unused still
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 420add2622a..4cef6fa481f 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -216,13 +216,15 @@ static void rna_def_curvemapping(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "CurveMap");
RNA_def_property_ui_text(prop, "Curves", "");
- prop= RNA_def_property(srna, "black_level", PROP_FLOAT, PROP_COLOR);
+ prop= RNA_def_property(srna, "black_level", PROP_FLOAT, PROP_RGB);
RNA_def_property_float_sdna(prop, NULL, "black");
+ RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Black Level", "For RGB curves, the color that black is mapped to");
RNA_def_property_float_funcs(prop, NULL, "rna_CurveMapping_black_level_set", NULL);
- prop= RNA_def_property(srna, "white_level", PROP_FLOAT, PROP_COLOR);
+ prop= RNA_def_property(srna, "white_level", PROP_FLOAT, PROP_RGB);
RNA_def_property_float_sdna(prop, NULL, "white");
+ RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "White Level", "For RGB curves, the color that white is mapped to");
RNA_def_property_float_funcs(prop, NULL, "rna_CurveMapping_white_level_set", NULL);
}
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 04d56eb666e..53c8db6ff0f 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -33,6 +33,7 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "ED_object.h"
#include "WM_types.h"
EnumPropertyItem constraint_type_items[] ={
@@ -80,6 +81,18 @@ EnumPropertyItem space_object_items[] = {
{1, "LOCAL", 0, "Local (Without Parent) Space", ""},
{0, NULL, 0, NULL, NULL}};
+EnumPropertyItem constraint_ik_type_items[] ={
+ {CONSTRAINT_IK_COPYPOSE, "COPY_POSE", 0, "Copy Pose", ""},
+ {CONSTRAINT_IK_DISTANCE, "DISTANCE", 0, "Distance", ""},
+ {0, NULL, 0, NULL, NULL},
+};
+
+EnumPropertyItem constraint_ik_axisref_items[] ={
+ {0, "BONE", 0, "Bone", ""},
+ {CONSTRAINT_IK_TARGETAXIS, "TARGET", 0, "Target", ""},
+ {0, NULL, 0, NULL, NULL},
+};
+
#ifdef RNA_RUNTIME
#include "BKE_action.h"
@@ -139,6 +152,24 @@ static StructRNA *rna_ConstraintType_refine(struct PointerRNA *ptr)
}
}
+static void rna_Constraint_name_set(PointerRNA *ptr, const char *value)
+{
+ bConstraint *con= ptr->data;
+
+ /* copy the new name into the name slot */
+ BLI_strncpy(con->name, value, sizeof(con->name));
+
+ /* make sure name is unique */
+ if (ptr->id.data) {
+ Object *ob= ptr->id.data;
+ ListBase *list= get_active_constraints(ob);
+
+ /* if we have the list, check for unique name, otherwise give up */
+ if (list)
+ unique_constraint_name(con, list);
+ }
+}
+
static char *rna_Constraint_path(PointerRNA *ptr)
{
Object *ob= ptr->id.data;
@@ -160,24 +191,12 @@ static char *rna_Constraint_path(PointerRNA *ptr)
static void rna_Constraint_update(bContext *C, PointerRNA *ptr)
{
- Object *ob= ptr->id.data;
-
- if(ob->pose) update_pose_constraint_flags(ob->pose);
-
- object_test_constraints(ob);
-
- if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
- else DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ ED_object_constraint_update(ptr->id.data);
}
static void rna_Constraint_dependency_update(bContext *C, PointerRNA *ptr)
{
- Object *ob= ptr->id.data;
-
- rna_Constraint_update(C, ptr);
-
- if(ob->pose) ob->pose->flag |= POSE_RECALC; // checks & sorts pose channels
- DAG_scene_sort(CTX_data_scene(C));
+ ED_object_constraint_dependency_update(CTX_data_scene(C), ptr->id.data);
}
static void rna_Constraint_influence_update(bContext *C, PointerRNA *ptr)
@@ -190,25 +209,29 @@ static void rna_Constraint_influence_update(bContext *C, PointerRNA *ptr)
rna_Constraint_update(C, ptr);
}
+static void rna_Constraint_ik_type_set(struct PointerRNA *ptr, int value)
+{
+ bConstraint *con = ptr->data;
+ bKinematicConstraint *ikdata = con->data;
+
+ if (ikdata->type != value) {
+ // the type of IK constraint has changed, set suitable default values
+ // in case constraints reuse same fields incompatible
+ switch (value) {
+ case CONSTRAINT_IK_COPYPOSE:
+ break;
+ case CONSTRAINT_IK_DISTANCE:
+ break;
+ }
+ ikdata->type = value;
+ }
+}
+
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;
else /* object */
@@ -222,20 +245,6 @@ static EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *C, PointerR
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);
@@ -253,8 +262,32 @@ static EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *C, PointerR
return space_object_items;
}
+static void rna_ActionConstraint_minmax_range(PointerRNA *ptr, float *min, float *max)
+{
+ bConstraint *con= (bConstraint*)ptr->data;
+ bActionConstraint *acon = (bActionConstraint *)con->data;
+
+ /* 0, 1, 2 = magic numbers for rotX, rotY, rotZ */
+ if (ELEM3(acon->type, 0, 1, 2)) {
+ *min= -90.f;
+ *max= 90.f;
+ } else {
+ *min= -1000.f;
+ *max= 1000.f;
+ }
+}
+
+
#else
+EnumPropertyItem constraint_distance_items[] = {
+ {LIMITDIST_INSIDE, "LIMITDIST_INSIDE", 0, "Inside", ""},
+ {LIMITDIST_OUTSIDE, "LIMITDIST_OUTSIDE", 0, "Outside", ""},
+ {LIMITDIST_ONSURFACE, "LIMITDIST_ONSURFACE", 0, "On Surface", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+
static void rna_def_constrainttarget(BlenderRNA *brna)
{
StructRNA *srna;
@@ -417,7 +450,7 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
prop= RNA_def_property(srna, "pole_angle", PROP_FLOAT, PROP_ANGLE); // XXX - todo, convert to rad
RNA_def_property_float_sdna(prop, NULL, "poleangle");
- RNA_def_property_range(prop, 0.0, 180.f);
+ RNA_def_property_range(prop, -180.0f, 180.f);
RNA_def_property_ui_text(prop, "Pole Angle", "Pole rotation offset.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -440,21 +473,81 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
prop= RNA_def_property(srna, "tail", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_IK_TIP);
RNA_def_property_ui_text(prop, "Use Tail", "Include bone's tail as last element in chain.");
- RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
+
+ prop= RNA_def_property(srna, "axis_reference", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, constraint_ik_axisref_items);
+ RNA_def_property_ui_text(prop, "Axis Reference", "Constraint axis Lock options relative to Bone or Target reference");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
+
+ prop= RNA_def_property(srna, "position", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_IK_POS);
+ RNA_def_property_ui_text(prop, "Position", "Chain follows position of target.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
+
+ prop= RNA_def_property(srna, "pos_lock_x", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_NO_POS_X);
+ RNA_def_property_ui_text(prop, "Lock X Pos", "Constraint position along X axis");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Constraint_dependency_update");
+
+ prop= RNA_def_property(srna, "pos_lock_y", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_NO_POS_Y);
+ RNA_def_property_ui_text(prop, "Lock Y Pos", "Constraint position along Y axis");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Constraint_dependency_update");
+
+ prop= RNA_def_property(srna, "pos_lock_z", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_NO_POS_Z);
+ RNA_def_property_ui_text(prop, "Lock Z Pos", "Constraint position along Z axis");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_IK_ROT);
RNA_def_property_ui_text(prop, "Rotation", "Chain follows rotation of target.");
- RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
+
+ prop= RNA_def_property(srna, "rot_lock_x", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_NO_ROT_X);
+ RNA_def_property_ui_text(prop, "Lock X Rot", "Constraint rotation along X axis");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Constraint_dependency_update");
+
+ prop= RNA_def_property(srna, "rot_lock_y", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_NO_ROT_Y);
+ RNA_def_property_ui_text(prop, "Lock Y Rot", "Constraint rotation along Y axis");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Constraint_dependency_update");
+
+ prop= RNA_def_property(srna, "rot_lock_z", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_NO_ROT_Z);
+ RNA_def_property_ui_text(prop, "Lock Z Rot", "Constraint rotation along Z axis");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "targetless", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_IK_AUTO);
RNA_def_property_ui_text(prop, "Targetless", "Use targetless IK.");
- RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_IK_STRETCH);
RNA_def_property_ui_text(prop, "Stretch", "Enable IK Stretching.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
+
+ prop= RNA_def_property(srna, "ik_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type");
+ RNA_def_property_enum_funcs(prop, NULL, "rna_Constraint_ik_type_set", NULL);
+ RNA_def_property_enum_items(prop, constraint_ik_type_items);
+ RNA_def_property_ui_text(prop, "IK Type", "");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
+
+ prop= RNA_def_property(srna, "limit_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mode");
+ RNA_def_property_enum_items(prop, constraint_distance_items);
+ RNA_def_property_ui_text(prop, "Limit Mode", "Distances in relation to sphere of influence to allow.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
+
+ prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "dist");
+ RNA_def_property_range(prop, 0.0, 100.f);
+ RNA_def_property_ui_text(prop, "Distance", "Radius of limiting sphere.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -575,7 +668,7 @@ 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);
+ prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
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");
@@ -781,15 +874,17 @@ static void rna_def_constraint_action(BlenderRNA *brna)
prop= RNA_def_property(srna, "maximum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
- RNA_def_property_range(prop, 0.0, 1000.f);
+ RNA_def_property_range(prop, -1000.f, 1000.f);
RNA_def_property_ui_text(prop, "Maximum", "Maximum value for target channel range.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+ RNA_def_property_float_funcs(prop, NULL, NULL, "rna_ActionConstraint_minmax_range");
prop= RNA_def_property(srna, "minimum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
- RNA_def_property_range(prop, 0.0, 1000.f);
+ RNA_def_property_range(prop, -1000.f, 1000.f);
RNA_def_property_ui_text(prop, "Minimum", "Minimum value for target channel range.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+ RNA_def_property_float_funcs(prop, NULL, NULL, "rna_ActionConstraint_minmax_range");
}
static void rna_def_constraint_locked_track(BlenderRNA *brna)
@@ -875,10 +970,10 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Offset", "Offset from the position corresponding to the time frame.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "offset_percentage", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "offset_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "offset"); // XXX we might be better with another var or some hackery?
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Offset Percentage", "Percentage value defining target position along length of bone.");
+ RNA_def_property_ui_text(prop, "Offset Factor", "Percentage value defining target position along length of bone.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "forward", PROP_ENUM, PROP_NONE);
@@ -1457,12 +1552,6 @@ static void rna_def_constraint_distance_limit(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem distance_items[] = {
- {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.");
RNA_def_struct_sdna_from(srna, "bDistLimitConstraint", "data");
@@ -1486,7 +1575,7 @@ static void rna_def_constraint_distance_limit(BlenderRNA *brna)
prop= RNA_def_property(srna, "limit_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
- RNA_def_property_enum_items(prop, distance_items);
+ RNA_def_property_enum_items(prop, constraint_distance_items);
RNA_def_property_ui_text(prop, "Limit Mode", "Distances in relation to sphere of influence to allow.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -1555,6 +1644,7 @@ void RNA_def_constraint(BlenderRNA *brna)
/* strings */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Constraint_name_set");
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
@@ -1599,12 +1689,23 @@ void RNA_def_constraint(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Proxy Local", "Constraint was added in this proxy instance (i.e. did not belong to source Armature).");
/* values */
- prop= RNA_def_property(srna, "influence", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "influence", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "enforce");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Influence", "Amount of influence constraint will have on the final solution.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_influence_update");
-
+
+ /* readonly values */
+ prop= RNA_def_property(srna, "lin_error", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "lin_error");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Lin error", "Amount of residual error in Blender space unit for constraints that work on position.");
+
+ prop= RNA_def_property(srna, "rot_error", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "rot_error");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Rot error", "Amount of residual error in radiant for constraints that work on orientation.");
+
/* pointers */
rna_def_constrainttarget(brna);
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 4a5af56d64a..1f1caeaa9b5 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -54,6 +54,7 @@ EnumPropertyItem beztriple_interpolation_mode_items[] = {
EnumPropertyItem beztriple_keyframe_type_items[] = {
{BEZT_KEYTYPE_KEYFRAME, "KEYFRAME", 0, "Keyframe", ""},
{BEZT_KEYTYPE_BREAKDOWN, "BREAKDOWN", 0, "Breakdown", ""},
+ {BEZT_KEYTYPE_EXTREME, "EXTREME", 0, "Extreme", ""},
{0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -470,7 +471,8 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
/* number values */
prop= RNA_def_property(srna, "text_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fsize");
- RNA_def_property_range(prop, 0.1f, 10.0f);
+ RNA_def_property_range(prop, 0.0001f, 10000.0f);
+ RNA_def_property_ui_range(prop, 0.01, 10, 1, 1);
RNA_def_property_ui_text(prop, "Font size", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 0b54d4a8e14..48de7ace222 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -134,7 +134,7 @@ PropertyDefRNA *rna_find_struct_property_def(StructRNA *srna, PropertyRNA *prop)
if(!DefRNA.preprocess) {
/* we should never get here */
- fprintf(stderr, "rna_find_property_def: only at preprocess time.\n");
+ fprintf(stderr, "rna_find_struct_property_def: only at preprocess time.\n");
return NULL;
}
@@ -155,6 +155,7 @@ PropertyDefRNA *rna_find_struct_property_def(StructRNA *srna, PropertyRNA *prop)
return NULL;
}
+#if 0
static PropertyDefRNA *rna_find_property_def(PropertyRNA *prop)
{
PropertyDefRNA *dprop;
@@ -175,6 +176,7 @@ static PropertyDefRNA *rna_find_property_def(PropertyRNA *prop)
return NULL;
}
+#endif
FunctionDefRNA *rna_find_function_def(FunctionRNA *func)
{
@@ -665,6 +667,7 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *
}
prop= RNA_def_property(&srna->cont, "rna_type", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_HIDDEN);
RNA_def_property_ui_text(prop, "RNA", "RNA type definition.");
if(DefRNA.preprocess) {
@@ -888,7 +891,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
fprop->softmin= 0.0f;
fprop->softmax= 1.0f;
}
- else if(subtype == PROP_PERCENTAGE) {
+ else if(subtype == PROP_FACTOR) {
fprop->softmin= fprop->hardmin= 0.0f;
fprop->softmax= fprop->hardmax= 1.0f;
}
@@ -1528,7 +1531,7 @@ void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const
iprop->softmax= 10000;
}
- if(prop->subtype == PROP_UNSIGNED || prop->subtype == PROP_PERCENTAGE)
+ if(prop->subtype == PROP_UNSIGNED || prop->subtype == PROP_PERCENTAGE || prop->subtype == PROP_FACTOR)
iprop->hardmin= iprop->softmin= 0;
}
}
@@ -2132,6 +2135,11 @@ PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, co
{
ContainerRNA *cont= cont_;
PropertyRNA *prop;
+
+ if(!items) {
+ printf("RNA_def_enum: items not allowed to be NULL.\n");
+ return NULL;
+ }
prop= RNA_def_property(cont, identifier, PROP_ENUM, PROP_NONE);
if(items) RNA_def_property_enum_items(prop, items);
@@ -2259,6 +2267,21 @@ PropertyRNA *RNA_def_float_percentage(StructOrFunctionRNA *cont_, const char *id
return prop;
}
+PropertyRNA *RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, float default_value,
+ float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
+{
+ ContainerRNA *cont= cont_;
+ PropertyRNA *prop;
+
+ prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, default_value);
+ if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
+ RNA_def_property_ui_text(prop, ui_name, ui_description);
+ RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
+
+ return prop;
+}
+
PropertyRNA *RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type,
const char *ui_name, const char *ui_description)
{
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 2802665c639..e69e2cd0e2c 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -24,12 +24,15 @@
#include <stdlib.h>
+#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
#include "DNA_anim_types.h"
+#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
@@ -50,7 +53,7 @@ EnumPropertyItem fmodifier_type_items[] = {
#ifdef RNA_RUNTIME
-/* --------- */
+#include "WM_api.h"
static StructRNA *rna_FModifierType_refine(struct PointerRNA *ptr)
{
@@ -80,6 +83,33 @@ static StructRNA *rna_FModifierType_refine(struct PointerRNA *ptr)
/* ****************************** */
+#include "BKE_depsgraph.h"
+
+static void rna_ChannelDriver_update_data(bContext *C, PointerRNA *ptr)
+{
+ ID *id= ptr->id.data;
+
+ // TODO: this really needs an update guard...
+ DAG_scene_sort(CTX_data_scene(C));
+ DAG_id_flush_update(id, OB_RECALC_DATA);
+
+ WM_event_add_notifier(C, NC_SCENE, id);
+}
+
+/* ----------- */
+
+static StructRNA *rna_DriverTarget_id_typef(PointerRNA *ptr)
+{
+ DriverTarget *dtar= (DriverTarget*)ptr->data;
+ return ID_code_to_RNA_type(dtar->idtype);
+}
+
+static int rna_DriverTarget_id_editable(PointerRNA *ptr)
+{
+ DriverTarget *dtar= (DriverTarget*)ptr->data;
+ return (dtar->idtype)? PROP_EDITABLE : 0;
+}
+
static void rna_DriverTarget_RnaPath_get(PointerRNA *ptr, char *value)
{
DriverTarget *dtar= (DriverTarget *)ptr->data;
@@ -157,7 +187,7 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_mode_items[] = {
+ static EnumPropertyItem generator_mode_items[] = {
{FCM_GENERATOR_POLYNOMIAL, "POLYNOMIAL", 0, "Expanded Polynomial", ""},
{FCM_GENERATOR_POLYNOMIAL_FACTORISED, "POLYNOMIAL_FACTORISED", 0, "Factorised Polynomial", ""},
{0, NULL, 0, NULL, NULL}};
@@ -174,7 +204,7 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
// XXX this has a special validation func
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_mode_items);
+ RNA_def_property_enum_items(prop, generator_mode_items);
RNA_def_property_ui_text(prop, "Mode", "Type of generator to use.");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
@@ -521,19 +551,34 @@ static void rna_def_drivertarget(BlenderRNA *brna)
/* Variable Name */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
- RNA_def_property_ui_text(prop, "Name", "Name to use in scripted expressions/functions.");
-
- /* Target Properties */
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "id");
- RNA_def_property_ui_text(prop, "Object", "Object the specific property used can be found from");
-
+ RNA_def_property_ui_text(prop, "Name", "Name to use in scripted expressions/functions. (No spaces or dots are allowed. Also, must not start with a symbol or digit)");
+ //RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates
+
+ /* Target Properties - ID-block to Drive */
+ prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "ID");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_editable_func(prop, "rna_DriverTarget_id_editable");
+ RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_DriverTarget_id_typef");
+ RNA_def_property_ui_text(prop, "ID", "ID-block that the specific property used can be found from");
+ //RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates
+
+ prop= RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "idtype");
+ RNA_def_property_enum_items(prop, id_type_items);
+ RNA_def_property_enum_default(prop, ID_OB);
+ RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used.");
+ //RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates
+
+ /* Target Properties - Property to Drive */
prop= RNA_def_property(srna, "rna_path", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_DriverTarget_RnaPath_get", "rna_DriverTarget_RnaPath_length", "rna_DriverTarget_RnaPath_set");
RNA_def_property_ui_text(prop, "RNA Path", "RNA Path (from Object) to property used");
+ //RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates
prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific property used (if applicable)");
+ //RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates
}
static void rna_def_channeldriver(BlenderRNA *brna)
@@ -555,10 +600,12 @@ static void rna_def_channeldriver(BlenderRNA *brna)
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", "Driver types.");
+ RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data");
/* String values */
prop= RNA_def_property(srna, "expression", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Expression", "Expression to use for Scripted Expression.");
+ //RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates
/* Collections */
prop= RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index c415b3d716a..ae52c811c92 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -114,6 +114,7 @@ static void rna_FluidSettings_update_type(bContext *C, PointerRNA *ptr)
sprintf(psmd->modifier.name, "FluidParticleSystem" );
psmd->psys= psys;
BLI_addtail(&ob->modifiers, psmd);
+ modifier_unique_name(&ob->modifiers, (ModifierData *)psmd);
}
}
else {
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 4d04f4ee1f3..44c55e821a9 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -37,6 +37,14 @@
#include "WM_types.h"
+static EnumPropertyItem image_source_items[]= {
+ {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}};
+
#ifdef RNA_RUNTIME
#include "IMB_imbuf_types.h"
@@ -66,6 +74,107 @@ static int rna_Image_dirty_get(PointerRNA *ptr)
return 0;
}
+static void rna_Image_source_update(bContext *C, PointerRNA *ptr)
+{
+ Image *ima= ptr->id.data;
+ BKE_image_signal(ima, NULL, IMA_SIGNAL_SRC_CHANGE);
+}
+
+static void rna_Image_fields_update(bContext *C, PointerRNA *ptr)
+{
+ Image *ima= ptr->id.data;
+ ImBuf *ibuf;
+ void *lock;
+
+ ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock);
+
+ if(ibuf) {
+ short nr= 0;
+
+ if(!(ima->flag & IMA_FIELDS) && (ibuf->flags & IB_fields)) nr= 1;
+ if((ima->flag & IMA_FIELDS) && !(ibuf->flags & IB_fields)) nr= 1;
+
+ if(nr)
+ BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE);
+ }
+
+ BKE_image_release_ibuf(ima, lock);
+}
+
+static void rna_Image_reload_update(bContext *C, PointerRNA *ptr)
+{
+ Image *ima= ptr->id.data;
+ BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD);
+ printf("reload %p\n", ima);
+}
+
+static void rna_Image_generated_update(bContext *C, PointerRNA *ptr)
+{
+ Image *ima= ptr->id.data;
+ BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE);
+}
+
+static void rna_ImageUser_update(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene= CTX_data_scene(C);
+ ImageUser *iuser= ptr->data;
+
+ BKE_image_user_calc_imanr(iuser, scene->r.cfra, 0);
+}
+
+static EnumPropertyItem *rna_Image_source_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ Image *ima= (Image*)ptr->data;
+ EnumPropertyItem *item= NULL;
+ int totitem= 0;
+
+ if(ima->source == IMA_SRC_VIEWER) {
+ RNA_enum_items_add_value(&item, &totitem, image_source_items, IMA_SRC_VIEWER);
+ }
+ else {
+ RNA_enum_items_add_value(&item, &totitem, image_source_items, IMA_SRC_FILE);
+ RNA_enum_items_add_value(&item, &totitem, image_source_items, IMA_SRC_SEQUENCE);
+ RNA_enum_items_add_value(&item, &totitem, image_source_items, IMA_SRC_MOVIE);
+ RNA_enum_items_add_value(&item, &totitem, image_source_items, IMA_SRC_GENERATED);
+ }
+
+ RNA_enum_item_end(&item, &totitem);
+ *free= 1;
+
+ return item;
+}
+
+static int rna_Image_has_data_get(PointerRNA *ptr)
+{
+ Image *im= (Image*)ptr->data;
+
+ if (im->ibufs.first)
+ return 1;
+
+ return 0;
+}
+
+static int rna_Image_depth_get(PointerRNA *ptr)
+{
+ Image *im= (Image*)ptr->data;
+ ImBuf *ibuf;
+ void *lock;
+ int depth;
+
+ ibuf= BKE_image_acquire_ibuf(im, NULL, &lock);
+
+ if(!ibuf)
+ depth= 0;
+ else if(ibuf->rect_float)
+ depth= 128;
+ else
+ depth= ibuf->depth;
+
+ BKE_image_release_ibuf(im, lock);
+
+ return depth;
+}
+
#else
static void rna_def_imageuser(BlenderRNA *brna)
@@ -79,29 +188,35 @@ static void rna_def_imageuser(BlenderRNA *brna)
prop= RNA_def_property(srna, "auto_refresh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_ANIM_ALWAYS);
RNA_def_property_ui_text(prop, "Auto Refresh", "Always refresh image on frame changes.");
+ RNA_def_property_update(prop, 0, "rna_ImageUser_update");
/* animation */
prop= RNA_def_property(srna, "cyclic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cycl", 0);
RNA_def_property_ui_text(prop, "Cyclic", "Cycle the images in the movie.");
+ RNA_def_property_update(prop, 0, "rna_ImageUser_update");
prop= RNA_def_property(srna, "frames", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Frames", "Sets the number of images of a movie to use.");
+ RNA_def_property_update(prop, 0, "rna_ImageUser_update");
prop= RNA_def_property(srna, "offset", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Offset", "Offsets the number of the frame to use in the animation.");
+ RNA_def_property_update(prop, 0, "rna_ImageUser_update");
prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "sfra");
RNA_def_property_range(prop, 1.0f, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start Frame", "Sets the global starting frame of the movie.");
+ RNA_def_property_update(prop, 0, "rna_ImageUser_update");
prop= RNA_def_property(srna, "fields_per_frame", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "fie_ima");
RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Fields per Frame", "The number of fields per rendered frame (2 fields is 1 image).");
+ RNA_def_property_update(prop, 0, "rna_ImageUser_update");
prop= RNA_def_property(srna, "multilayer_layer", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "layer");
@@ -121,25 +236,22 @@ static void rna_def_image(BlenderRNA *brna)
static const EnumPropertyItem prop_type_items[]= {
{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_UV_TEST, "UV_TEST", 0, "UV Test", ""},
+ {IMA_TYPE_R_RESULT, "RENDER_RESULT", 0, "Render Result", ""},
{IMA_TYPE_COMPOSITE, "COMPOSITING", 0, "Compositing", ""},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem prop_source_items[]= {
- {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", 0, "Blank", "Generate a blank image"},
- {1, "UVTESTGRID", 0, "UV Test Grid", "Generated grid to test UV mappings"},
+ {1, "UVGRID", 0, "UV Grid", "Generated grid to test UV mappings"},
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem prop_mapping_items[]= {
{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}};
+ static const EnumPropertyItem prop_field_order_items[]= {
+ {0, "EVEN", 0, "Even", "Even Fields first"},
+ {IMA_STD_FIELD, "ODD", 0, "Odd", "Odd Fields first"},
+ {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.");
@@ -147,36 +259,36 @@ static void rna_def_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
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);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_reload_update");
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_enum_items(prop, image_source_items);
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Image_source_itemf");
RNA_def_property_ui_text(prop, "Source", "Where the image comes from.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_source_update");
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_clear_flag(prop, PROP_EDITABLE);
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");
RNA_def_property_ui_text(prop, "Packed File", "");
-
+
+ prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, prop_field_order_items);
+ RNA_def_property_ui_text(prop, "Field Order", "Order of video fields. Select which lines are displayed first.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+
/* booleans */
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);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_fields_update");
prop= RNA_def_property(srna, "antialias", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_ANTIALI);
@@ -198,19 +310,19 @@ static void rna_def_image(BlenderRNA *brna)
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);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_generated_update");
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);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_generated_update");
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);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_generated_update");
/* realtime properties */
prop= RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
@@ -275,6 +387,22 @@ static void rna_def_image(BlenderRNA *brna)
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);
+
+ /*
+ Image.has_data and Image.depth are temporary,
+ Update import_obj.py when they are replaced (Arystan)
+ */
+ prop= RNA_def_property(srna, "has_data", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_Image_has_data_get", NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Has data", "True if this image has data.");
+
+ prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
+ RNA_def_property_int_funcs(prop, "rna_Image_depth_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Depth", "Image bit depth.");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ RNA_api_image(srna);
}
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 4d8ef7082b6..23592212f68 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -173,7 +173,7 @@ void RNA_def_world(struct BlenderRNA *brna);
void rna_def_animdata_common(struct StructRNA *srna);
void rna_def_texmat_common(struct StructRNA *srna, const char *texspace_editable);
-void rna_def_mtex_common(struct StructRNA *srna, const char *begin, const char *activeget, const char *activeset, const char *structname);
+void rna_def_mtex_common(struct StructRNA *srna, const char *begin, const char *activeget, const char *activeset, const char *structname, const char *update);
void rna_def_render_layer_common(struct StructRNA *srna, int scene);
void rna_ID_name_get(struct PointerRNA *ptr, char *value);
@@ -197,14 +197,20 @@ void rna_object_vcollayer_name_set(struct PointerRNA *ptr, const char *value, ch
void rna_Object_update(struct bContext *C, struct PointerRNA *ptr);
void rna_Object_update_data(struct bContext *C, struct PointerRNA *ptr);
void rna_Mesh_update_draw(struct bContext *C, struct PointerRNA *ptr);
+void rna_TextureSlot_update(struct bContext *C, struct PointerRNA *ptr);
/* API functions */
+void RNA_api_action(StructRNA *srna);
+void RNA_api_image(struct StructRNA *srna);
+void RNA_api_keyconfig(struct StructRNA *srna);
void RNA_api_keyingset(struct StructRNA *srna);
+void RNA_api_keymap(struct StructRNA *srna);
void RNA_api_main(struct StructRNA *srna);
+void RNA_api_material(StructRNA *srna);
void RNA_api_mesh(struct StructRNA *srna);
void RNA_api_object(struct StructRNA *srna);
-void RNA_api_scene(struct StructRNA *srna);
+void RNA_api_scene(struct StructRNA *srna);
void RNA_api_text(struct StructRNA *srna);
void RNA_api_ui_layout(struct StructRNA *srna);
void RNA_api_wm(struct StructRNA *srna);
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index fbe339fe7f3..e1551404438 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -257,6 +257,11 @@ static PointerRNA rna_ShapeKey_data_get(CollectionPropertyIterator *iter)
return rna_pointer_inherit_refine(&iter->parent, type, rna_iterator_array_get(iter));
}
+static char *rna_ShapeKey_path(PointerRNA *ptr)
+{
+ return BLI_sprintfN("keys[\"%s\"]", ((KeyBlock*)ptr->data)->name);
+}
+
static void rna_Key_update_data(bContext *C, PointerRNA *ptr)
{
Main *bmain= CTX_data_main(C);
@@ -343,6 +348,7 @@ static void rna_def_keyblock(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ShapeKey", NULL);
RNA_def_struct_ui_text(srna, "Shape Key", "Shape key in a shape keys datablock.");
RNA_def_struct_sdna(srna, "KeyBlock");
+ RNA_def_struct_path_func(srna, "rna_ShapeKey_path");
RNA_def_struct_ui_icon(srna, ICON_SHAPEKEY_DATA);
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -414,7 +420,8 @@ static void rna_def_key(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Key", "Shape keys datablock containing different shapes of geometric datablocks.");
RNA_def_struct_ui_icon(srna, ICON_SHAPEKEY_DATA);
- prop= RNA_def_property(srna, "reference_key", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "reference_key", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_sdna(prop, NULL, "refkey");
RNA_def_property_ui_text(prop, "Reference Key", "");
@@ -426,7 +433,8 @@ static void rna_def_key(BlenderRNA *brna)
rna_def_animdata_common(srna);
- prop= RNA_def_property(srna, "user", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "user", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "from");
RNA_def_property_ui_text(prop, "User", "Datablock using these shape keys.");
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index dc59a75edbc..a518bd28d24 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -33,14 +33,17 @@
#include "DNA_material_types.h"
#include "DNA_texture_types.h"
-#include "WM_types.h"
-
#ifdef RNA_RUNTIME
#include "MEM_guardedalloc.h"
+#include "BKE_depsgraph.h"
+#include "BKE_main.h"
#include "BKE_texture.h"
+#include "WM_api.h"
+#include "WM_types.h"
+
static void rna_Lamp_buffer_size_set(PointerRNA *ptr, int value)
{
Lamp *la= (Lamp*)ptr->data;
@@ -66,31 +69,15 @@ static PointerRNA rna_Lamp_active_texture_get(PointerRNA *ptr)
Lamp *la= (Lamp*)ptr->data;
Tex *tex;
- tex= (la->mtex[(int)la->texact])? la->mtex[(int)la->texact]->tex: NULL;
+ tex= give_current_lamp_texture(la);
return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
}
static void rna_Lamp_active_texture_set(PointerRNA *ptr, PointerRNA value)
{
Lamp *la= (Lamp*)ptr->data;
- int act= la->texact;
- if(la->mtex[act] && la->mtex[act]->tex)
- id_us_min(&la->mtex[act]->tex->id);
-
- if(value.data) {
- if(!la->mtex[act]) {
- la->mtex[act]= add_mtex();
- la->mtex[act]->texco= TEXCO_GLOB;
- }
-
- la->mtex[act]->tex= value.data;
- id_us_plus(&la->mtex[act]->tex->id);
- }
- else if(la->mtex[act]) {
- MEM_freeN(la->mtex[act]);
- la->mtex[act]= NULL;
- }
+ set_current_lamp_texture(la, value.data);
}
static StructRNA* rna_Lamp_refine(struct PointerRNA *ptr)
@@ -99,7 +86,7 @@ static StructRNA* rna_Lamp_refine(struct PointerRNA *ptr)
switch(la->type) {
case LA_LOCAL:
- return &RNA_LocalLamp;
+ return &RNA_PointLamp;
case LA_SUN:
return &RNA_SunLamp;
case LA_SPOT:
@@ -113,6 +100,30 @@ static StructRNA* rna_Lamp_refine(struct PointerRNA *ptr)
}
}
+static void rna_Lamp_update(bContext *C, PointerRNA *ptr)
+{
+ Lamp *la= ptr->id.data;
+
+ DAG_id_flush_update(&la->id, 0);
+ WM_event_add_notifier(C, NC_LAMP|ND_LIGHTING, la);
+}
+
+static void rna_Lamp_draw_update(bContext *C, PointerRNA *ptr)
+{
+ Lamp *la= ptr->id.data;
+
+ DAG_id_flush_update(&la->id, 0);
+ WM_event_add_notifier(C, NC_LAMP|ND_LIGHTING_DRAW, la);
+}
+
+static void rna_Lamp_sky_update(bContext *C, PointerRNA *ptr)
+{
+ Lamp *la= ptr->id.data;
+
+ DAG_id_flush_update(&la->id, 0);
+ WM_event_add_notifier(C, NC_LAMP|ND_SKY, la);
+}
+
#else
static void rna_def_lamp_mtex(BlenderRNA *brna)
@@ -144,24 +155,24 @@ static void rna_def_lamp_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "map_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", LAMAP_COL);
RNA_def_property_ui_text(prop, "Color", "Lets the texture affect the basic color of the lamp.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "map_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", LAMAP_SHAD);
RNA_def_property_ui_text(prop, "Shadow", "Lets the texture affect the shadow color of the lamp.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Color Factor", "Amount texture affects color values.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
+ RNA_def_property_float_sdna(prop, NULL, "shadowfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Shadow Factor", "Amount texture affects shadow.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
}
static void rna_def_lamp_sky_settings(BlenderRNA *brna)
@@ -203,92 +214,92 @@ static void rna_def_lamp_sky_settings(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "sky_colorspace");
RNA_def_property_enum_items(prop, prop_skycolorspace_items);
RNA_def_property_ui_text(prop, "Sky Color Space", "Color space to use for internal XYZ->RGB color conversion.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "sky_blend_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "skyblendtype");
RNA_def_property_enum_items(prop, prop_blendmode_items);
RNA_def_property_ui_text(prop, "Sky Blend Mode", "Blend mode for combining sun sky with world sky.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
/* Number values */
prop= RNA_def_property(srna, "horizon_brightness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Horizon Brightness", "Horizon brightness.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "spread", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Horizon Spread", "Horizon Spread.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "sun_brightness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Sun Brightness", "Sun brightness.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "sun_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Sun Size", "Sun size.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "backscattered_light", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Backscattered Light", "Backscattered light.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "sun_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Sun Intensity", "Sun intensity.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "atmosphere_turbidity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "atm_turbidity");
RNA_def_property_range(prop, 1.0f, 30.0f);
RNA_def_property_ui_text(prop, "Atmosphere Turbidity", "Sky turbidity.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "atmosphere_inscattering", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "atm_inscattering_factor");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Atmosphere Inscatter", "Scatter contribution factor.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "atmosphere_extinction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "atm_extinction_factor");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Atmosphere Extinction", "Extinction scattering contribution factor.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "atmosphere_distance_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "atm_distance_factor");
RNA_def_property_range(prop, 0.0f, 500.0f);
RNA_def_property_ui_text(prop, "Atmosphere Distance Factor", "Multiplier to convert blender units to physical distance.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "sky_blend", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "skyblendfac");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Sky Blend", "Blend factor with sky.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "sky_exposure", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Sky Exposure", "Strength of sky shading exponential exposure correction.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
/* boolean */
prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_SKY);
RNA_def_property_ui_text(prop, "Sky", "Apply sun effect on sky.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "atmosphere", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_AP);
RNA_def_property_ui_text(prop, "Atmosphere", "Apply sun effect on atmosphere.");
- RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
}
static void rna_def_lamp(BlenderRNA *brna)
@@ -312,48 +323,51 @@ static void rna_def_lamp(BlenderRNA *brna)
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 Lamp.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_ui_range(prop, 0, 1000, 1.0, 2);
RNA_def_property_ui_text(prop, "Distance", "Falloff distance - the light is at half the original intensity at this point.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_range(prop, 0, 10.0, 0.1, 2);
RNA_def_property_ui_text(prop, "Energy", "Amount of light that the lamp emits.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Color", "Light color.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_LAYER);
RNA_def_property_ui_text(prop, "Layer", "Illuminates objects only on the same layer the lamp is on.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "negative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_NEG);
RNA_def_property_ui_text(prop, "Negative", "Lamp casts negative light.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_SPEC);
RNA_def_property_ui_text(prop, "Specular", "Lamp creates specular highlights.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_DIFF);
RNA_def_property_ui_text(prop, "Diffuse", "Lamp does diffuse shading.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
-
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ /* common */
+ rna_def_animdata_common(srna);
+
/* textures */
rna_def_mtex_common(srna, "rna_Lamp_mtex_begin", "rna_Lamp_active_texture_get",
- "rna_Lamp_active_texture_set", "LampTextureSlot");
+ "rna_Lamp_active_texture_set", "LampTextureSlot", "rna_Lamp_update");
}
static void rna_def_lamp_falloff(StructRNA *srna)
@@ -371,29 +385,29 @@ static void rna_def_lamp_falloff(StructRNA *srna)
prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_fallofftype_items);
RNA_def_property_ui_text(prop, "Falloff Type", "Intensity Decay with distance.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curfalloff");
RNA_def_property_ui_text(prop, "Falloff Curve", "Custom Lamp Falloff Curve");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "sphere", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SPHERE);
RNA_def_property_ui_text(prop, "Sphere", "Sets light intensity to zero beyond lamp distance.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "linear_attenuation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "att1");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Linear Attenuation", "Linear distance attentuation.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "quadratic_attenuation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "att2");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Quadratic Attenuation", "Quadratic distance attentuation.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
}
static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
@@ -426,64 +440,65 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, (spot)? prop_spot_shadow_items: prop_shadow_items);
RNA_def_property_ui_text(prop, "Shadow Method", "Method to compute lamp shadow with.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shdwr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Shadow Color", "Color of shadows cast by the lamp.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "only_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_ONLYSHADOW);
RNA_def_property_ui_text(prop, "Only Shadow", "Causes light to cast shadows only without illuminating objects.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_ray_sampling_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ray_samp_method");
RNA_def_property_enum_items(prop, (area)? prop_spot_ray_sampling_method_items: prop_ray_sampling_method_items);
RNA_def_property_ui_text(prop, "Shadow Ray Sampling Method", "Method for generating shadow samples: Adaptive QMC is fastest, Constant QMC is less noisy but slower.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, (area)? "shadow_ray_samples_x": "shadow_ray_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_samp");
RNA_def_property_range(prop, 1, 64);
RNA_def_property_ui_text(prop, (area)? "Shadow Ray Samples": "Shadow Ray Samples X","Amount of samples taken extra (samples x samples).");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
if(area) {
prop= RNA_def_property(srna, "shadow_ray_samples_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_sampy");
RNA_def_property_range(prop, 1, 64);
RNA_def_property_ui_text(prop, "Shadow Ray Samples Y", "Amount of samples taken extra (samples x samples).");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
}
prop= RNA_def_property(srna, "shadow_adaptive_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Adaptive Threshold", "Threshold for Adaptive Sampling (Raytraced shadows).");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_sdna(prop, NULL, "soft");
+ RNA_def_property_float_sdna(prop, NULL, "area_size");
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows).");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_LAYER_SHADOW);
RNA_def_property_ui_text(prop, "Shadow Layer", "Causes only objects on the same layer to cast shadows.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
}
-static void rna_def_local_lamp(BlenderRNA *brna)
+static void rna_def_point_lamp(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "LocalLamp", "Lamp");
+ srna= RNA_def_struct(brna, "PointLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
- RNA_def_struct_ui_text(srna, "Local Lamp", "Omnidirectional point lamp.");
+ RNA_def_struct_ui_text(srna, "Point Lamp", "Omnidirectional point lamp.");
+ RNA_def_struct_ui_icon(srna, ICON_LAMP_POINT);
rna_def_lamp_falloff(srna);
rna_def_lamp_shadow(srna, 0, 0);
@@ -502,47 +517,48 @@ static void rna_def_area_lamp(BlenderRNA *brna)
srna= RNA_def_struct(brna, "AreaLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_ui_text(srna, "Area Lamp", "Directional area lamp.");
+ RNA_def_struct_ui_icon(srna, ICON_LAMP_AREA);
rna_def_lamp_shadow(srna, 0, 1);
prop= RNA_def_property(srna, "umbra", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_UMBRA);
RNA_def_property_ui_text(prop, "Umbra", "Emphasize parts that are fully shadowed (Constant Jittered sampling).");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "dither", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_DITHER);
RNA_def_property_ui_text(prop, "Dither", "Use 2x2 dithering for sampling (Constant Jittered sampling).");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "jitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_JITTER);
RNA_def_property_ui_text(prop, "Jitter", "Use noise for sampling (Constant Jittered sampling).");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shape", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "area_shape");
RNA_def_property_enum_items(prop, prop_areashape_items);
RNA_def_property_ui_text(prop, "Shape", "Shape of the area lamp.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "area_size");
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Size", "Size of the area of the area Lamp, X direction size for Rectangle shapes.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "area_sizey");
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Size Y", "Size of the area of the area Lamp in the Y direction for Rectangle shapes.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "k");
RNA_def_property_ui_range(prop, 0.001, 2.0, 0.1, 3);
RNA_def_property_ui_text(prop, "Gamma", "Light gamma correction value.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
}
static void rna_def_spot_lamp(BlenderRNA *brna)
@@ -554,6 +570,7 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
{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."},
+ {LA_SHADBUF_DEEP, "DEEP", 0, "Deep", "Deep shadow buffer supports transparency and better filtering, at the cost of more memory usage and processing time."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_shadbuffiltertype_items[] = {
@@ -571,6 +588,7 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpotLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_ui_text(srna, "Spot Lamp", "Directional cone lamp.");
+ RNA_def_struct_ui_icon(srna, ICON_LAMP_SPOT);
rna_def_lamp_falloff(srna);
rna_def_lamp_shadow(srna, 1, 0);
@@ -578,101 +596,107 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
prop= RNA_def_property(srna, "square", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SQUARE);
RNA_def_property_ui_text(prop, "Square", "Casts a square spot light shape.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_HALO);
RNA_def_property_ui_text(prop, "Halo", "Renders spotlight with a volumetric halo (Buffer Shadows).");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "halo_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "haint");
RNA_def_property_ui_range(prop, 0, 5.0, 0.1, 3);
RNA_def_property_ui_text(prop, "Halo Intensity", "Brightness of the spotlight's halo cone (Buffer Shadows).");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "halo_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "shadhalostep");
RNA_def_property_range(prop, 0, 12);
RNA_def_property_ui_text(prop, "Halo Step", "Volumetric halo sampling frequency.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bufsize");
RNA_def_property_range(prop, 512, 10240);
RNA_def_property_ui_text(prop, "Shadow Buffer Size", "Resolution of the shadow buffer, higher values give crisper shadows but use more memory");
RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL);
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_filter_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "filtertype");
RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items);
RNA_def_property_ui_text(prop, "Shadow Filter Type", "Type of shadow filter (Buffer Shadows).");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_sample_buffers", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "buffers");
RNA_def_property_enum_items(prop, prop_numbuffer_items);
RNA_def_property_ui_text(prop, "Shadow Sample Buffers", "Number of shadow buffers to render for better AA, this increases memory usage.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "spot_blend", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spotblend");
RNA_def_property_range(prop, 0.0f ,1.0f);
RNA_def_property_ui_text(prop, "Spot Blend", "The softness of the spotlight edge.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "spot_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spotsize");
RNA_def_property_range(prop, 1.0f ,180.0f);
RNA_def_property_ui_text(prop, "Spot Size", "Angle of the spotlight beam in degrees.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipsta");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Clip Start", "Shadow map clip start: objects closer will not generate shadows");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "shadow_buffer_clip_end", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipend");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Clip End", "Shadow map clip end beyond which objects will not generate shadows.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bias");
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Shadow buffer sampling bias.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_buffer_soft", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "soft");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Soft", "Size of shadow buffer sampling area.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_buffer_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp");
RNA_def_property_range(prop, 1, 16);
RNA_def_property_ui_text(prop, "Samples", "Number of shadow buffer samples.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_buffer_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "buftype");
RNA_def_property_enum_items(prop, prop_shadbuftype_items);
RNA_def_property_ui_text(prop, "Shadow Buffer Type", "Type of shadow buffer.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "auto_clip_start", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_START);
RNA_def_property_ui_text(prop, "Autoclip Start", "Automatic calculation of clipping-start, based on visible vertices.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "auto_clip_end", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_END);
RNA_def_property_ui_text(prop, "Autoclip End", "Automatic calculation of clipping-end, based on visible vertices.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+
+ prop= RNA_def_property(srna, "compression_threshold", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "compressthresh");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Compress", "Deep shadow map compression threshold.");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
}
static void rna_def_sun_lamp(BlenderRNA *brna)
@@ -683,11 +707,13 @@ static void rna_def_sun_lamp(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SunLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_ui_text(srna, "Sun Lamp", "Constant direction parallel ray lamp.");
+ RNA_def_struct_ui_icon(srna, ICON_LAMP_SUN);
rna_def_lamp_shadow(srna, 0, 0);
/* sky */
- prop= RNA_def_property(srna, "sky", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "sky", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "LampSkySettings");
RNA_def_property_pointer_funcs(prop, "rna_Lamp_sky_settings_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Sky Settings", "Sky related settings for sun lamps.");
@@ -702,12 +728,13 @@ static void rna_def_hemi_lamp(BlenderRNA *brna)
srna= RNA_def_struct(brna, "HemiLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_ui_text(srna, "Hemi Lamp", "180 degree constant lamp.");
+ RNA_def_struct_ui_icon(srna, ICON_LAMP_HEMI);
}
void RNA_def_lamp(BlenderRNA *brna)
{
rna_def_lamp(brna);
- rna_def_local_lamp(brna);
+ rna_def_point_lamp(brna);
rna_def_area_lamp(brna);
rna_def_spot_lamp(brna);
rna_def_sun_lamp(brna);
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index 344135acaff..910a15890cb 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -259,9 +259,9 @@ void RNA_def_main(BlenderRNA *brna)
{"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks.", NULL, NULL},
{"groups", "Group", "rna_Main_group_begin", "Groups", "Group datablocks.", NULL, NULL},
{"keys", "Key", "rna_Main_key_begin", "Keys", "Key datablocks.", NULL, NULL},
- {"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks.", NULL, NULL},
+ {"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks (DEPRECATED).", NULL, NULL},
{"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks.", NULL, NULL},
- {"sounds", "ID", "rna_Main_sound_begin", "Sounds", "Sound datablocks.", NULL, NULL},
+ {"sounds", "Sound", "rna_Main_sound_begin", "Sounds", "Sound datablocks.", NULL, NULL},
{"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks.", NULL, NULL},
{"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks.", NULL, NULL},
{"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks.", NULL, NULL},
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 5e3cdb2f842..7a63f7ebd1d 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -31,14 +31,23 @@
#include "RNA_define.h"
#include "RNA_types.h"
+#include "RNA_enum_types.h"
+
+#include "DNA_object_types.h"
+#include "DNA_material_types.h"
+#include "DNA_mesh_types.h"
#ifdef RNA_RUNTIME
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_library.h"
+#include "BKE_object.h"
+#include "BKE_material.h"
+#include "BKE_image.h"
+#include "BKE_texture.h"
-#include "DNA_mesh_types.h"
+#include "DNA_lamp_types.h"
static Mesh *rna_Main_add_mesh(Main *main, char *name)
{
@@ -57,24 +66,130 @@ static void rna_Main_remove_mesh(Main *main, ReportList *reports, Mesh *me)
/* XXX python now has invalid pointer? */
}
+static Lamp *rna_Main_add_lamp(Main *main, char *name)
+{
+ Lamp *la= add_lamp(name);
+ la->id.us--;
+ return la;
+}
+
+/*
+static void rna_Main_remove_lamp(Main *main, ReportList *reports, Lamp *la)
+{
+ if(la->id.us == 0)
+ free_libblock(&main->lamp, la);
+ else
+ BKE_report(reports, RPT_ERROR, "Lamp must have zero users to be removed.");
+}
+*/
+
+static Object* rna_Main_add_object(Main *main, int type, char *name)
+{
+ Object *ob= add_only_object(type, name);
+ ob->id.us--;
+ return ob;
+}
+
+/*
+ NOTE: the following example shows when this function should _not_ be called
+
+ ob = bpy.data.add_object()
+ scene.add_object(ob)
+
+ # ob is freed here
+ scene.remove_object(ob)
+
+ # don't do this since ob is already freed!
+ bpy.data.remove_object(ob)
+*/
+static void rna_Main_remove_object(Main *main, ReportList *reports, Object *ob)
+{
+ if(ob->id.us == 0)
+ free_libblock(&main->object, ob);
+ else
+ BKE_report(reports, RPT_ERROR, "Object must have zero users to be removed.");
+}
+
+static Material *rna_Main_add_material(Main *main, char *name)
+{
+ return add_material(name);
+}
+
+/* TODO: remove material? */
+
+struct Tex *rna_Main_add_texture(Main *main, char *name)
+{
+ return add_texture(name);
+}
+
+/* TODO: remove texture? */
+
+struct Image *rna_Main_add_image(Main *main, char *filename)
+{
+ return BKE_add_image_file(filename, 0);
+}
+
#else
void RNA_api_main(StructRNA *srna)
{
FunctionRNA *func;
- PropertyRNA *prop;
+ PropertyRNA *parm;
+
+ func= RNA_def_function(srna, "add_object", "rna_Main_add_object");
+ RNA_def_function_ui_description(func, "Add a new object.");
+ parm= RNA_def_enum(func, "type", object_type_items, 0, "", "Type of Object.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_string(func, "name", "Object", 0, "", "New name for the datablock.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "object", "Object", "", "New object.");
+ RNA_def_function_return(func, parm);
+
+ func= RNA_def_function(srna, "remove_object", "rna_Main_remove_object");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ RNA_def_function_ui_description(func, "Remove an object if it has zero users.");
+ parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "add_mesh", "rna_Main_add_mesh");
RNA_def_function_ui_description(func, "Add a new mesh.");
- prop= RNA_def_string(func, "name", "Mesh", 0, "", "New name for the datablock.");
- prop= RNA_def_pointer(func, "mesh", "Mesh", "", "New mesh.");
- RNA_def_function_return(func, prop);
+ parm= RNA_def_string(func, "name", "Mesh", 0, "", "New name for the datablock.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "mesh", "Mesh", "", "New mesh.");
+ RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove_mesh", "rna_Main_remove_mesh");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a mesh if it has zero users.");
- prop= RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to remove.");
- RNA_def_property_flag(prop, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to remove.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ func= RNA_def_function(srna, "add_lamp", "rna_Main_add_lamp");
+ RNA_def_function_ui_description(func, "Add a new lamp.");
+ parm= RNA_def_string(func, "name", "Lamp", 0, "", "New name for the datablock.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "mesh", "Lamp", "", "New lamp.");
+ RNA_def_function_return(func, parm);
+
+ func= RNA_def_function(srna, "add_material", "rna_Main_add_material");
+ RNA_def_function_ui_description(func, "Add a new material.");
+ parm= RNA_def_string(func, "name", "Material", 0, "", "New name for the datablock."); /* optional */
+ parm= RNA_def_pointer(func, "material", "Material", "", "New material.");
+ RNA_def_function_return(func, parm);
+
+ func= RNA_def_function(srna, "add_texture", "rna_Main_add_texture");
+ RNA_def_function_ui_description(func, "Add a new texture.");
+ parm= RNA_def_string(func, "name", "Tex", 0, "", "New name for the datablock."); /* optional */
+ parm= RNA_def_pointer(func, "texture", "Texture", "", "New texture.");
+ RNA_def_function_return(func, parm);
+
+ func= RNA_def_function(srna, "add_image", "rna_Main_add_image");
+ RNA_def_function_ui_description(func, "Add a new image.");
+ parm= RNA_def_string(func, "filename", "", 0, "", "Filename to load image from.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "image", "Image", "", "New image.");
+ RNA_def_function_return(func, parm);
+
}
#endif
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index e23333713c4..74cb8675ad5 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -33,6 +33,7 @@
#include "DNA_material_types.h"
#include "DNA_texture_types.h"
+#include "WM_api.h"
#include "WM_types.h"
static EnumPropertyItem prop_texture_coordinates_items[] = {
@@ -53,10 +54,31 @@ static EnumPropertyItem prop_texture_coordinates_items[] = {
#include "MEM_guardedalloc.h"
+#include "DNA_node_types.h"
+
+#include "BKE_depsgraph.h"
+#include "BKE_main.h"
#include "BKE_texture.h"
+#include "BKE_node.h"
#include "ED_node.h"
+static void rna_Material_update(bContext *C, PointerRNA *ptr)
+{
+ Material *ma= ptr->id.data;
+
+ DAG_id_flush_update(&ma->id, 0);
+ WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING, ma);
+}
+
+static void rna_Material_draw_update(bContext *C, PointerRNA *ptr)
+{
+ Material *ma= ptr->id.data;
+
+ DAG_id_flush_update(&ma->id, 0);
+ WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING_DRAW, ma);
+}
+
static PointerRNA rna_Material_mirror_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_MaterialRaytraceMirror, ptr->id.data);
@@ -108,29 +130,40 @@ static PointerRNA rna_Material_active_texture_get(PointerRNA *ptr)
Material *ma= (Material*)ptr->data;
Tex *tex;
- tex= (ma->mtex[(int)ma->texact])? ma->mtex[(int)ma->texact]->tex: NULL;
+ tex= give_current_material_texture(ma);
return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
}
static void rna_Material_active_texture_set(PointerRNA *ptr, PointerRNA value)
{
Material *ma= (Material*)ptr->data;
- int act= ma->texact;
- if(ma->mtex[act] && ma->mtex[act]->tex)
- id_us_min(&ma->mtex[act]->tex->id);
+ set_current_material_texture(ma, value.data);
+}
- if(value.data) {
- if(!ma->mtex[act])
- ma->mtex[act]= add_mtex();
-
- ma->mtex[act]->tex= value.data;
- id_us_plus(&ma->mtex[act]->tex->id);
- }
- else if(ma->mtex[act]) {
- MEM_freeN(ma->mtex[act]);
- ma->mtex[act]= NULL;
+static PointerRNA rna_Material_active_node_material_get(PointerRNA *ptr)
+{
+ Material *ma= (Material*)ptr->data;
+ Material *ma_node= NULL;
+
+ /* used in buttons to check context, also checks for edited groups */
+
+ if(ma && ma->use_nodes && ma->nodetree) {
+ bNode *node= nodeGetActiveID(ma->nodetree, ID_MA);
+
+ if(node)
+ ma_node= (Material *)node->id;
}
+
+ return rna_pointer_inherit_refine(ptr, &RNA_Material, ma_node);
+}
+
+static void rna_Material_active_node_material_set(PointerRNA *ptr, PointerRNA value)
+{
+ Material *ma= (Material*)ptr->data;
+ Material *ma_act= value.data;
+
+ nodeSetActiveID(ma->nodetree, ID_MA, &ma_act->id);
}
static void rna_MaterialStrand_start_size_range(PointerRNA *ptr, float *min, float *max)
@@ -227,10 +260,6 @@ static EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *C, Poi
EnumPropertyItem *item= NULL;
int totitem= 0;
- if(C==NULL) {
- return prop_texture_coordinates_items;
- }
-
RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_GLOB);
RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_OBJECT);
RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_ORCO);
@@ -250,7 +279,6 @@ static EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *C, Poi
}
RNA_enum_item_end(&item, &totitem);
-
*free= 1;
return item;
@@ -308,291 +336,302 @@ static void rna_def_material_mtex(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Material_texture_coordinates_itemf");
RNA_def_property_ui_text(prop, "Texture Coordinates", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvname");
RNA_def_property_ui_text(prop, "UV Layer", "UV layer to use for mapping with UV texture coordinates.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "from_dupli", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_DUPLI_MAPTO);
RNA_def_property_ui_text(prop, "From Dupli", "Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "from_original", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_OB_DUPLI_ORIG);
RNA_def_property_ui_text(prop, "From Original", "Dupli's derive their object coordinates from the original objects transformation.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_colordiff", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_COL);
RNA_def_property_ui_text(prop, "Diffuse Color", "Causes the texture to affect basic color of the material");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_NORM);
RNA_def_property_ui_text(prop, "Normal", "Causes the texture to affect the rendered normal");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_colorspec", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_COLSPEC);
RNA_def_property_ui_text(prop, "Specular Color", "Causes the texture to affect the specularity color");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_mirror", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_COLMIR);
RNA_def_property_ui_text(prop, "Mirror", "Causes the texture to affect the mirror color");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_REF);
RNA_def_property_ui_text(prop, "Diffuse", "Causes the texture to affect the value of the materials diffuse reflectivity");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_SPEC);
RNA_def_property_ui_text(prop, "Specular", "Causes the texture to affect the value of specular reflectivity");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_ambient", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_AMB);
RNA_def_property_ui_text(prop, "Ambient", "Causes the texture to affect the value of ambient");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_hardness", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_HAR);
RNA_def_property_ui_text(prop, "Hardness", "Causes the texture to affect the hardness value");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_raymir", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_RAYMIRR);
RNA_def_property_ui_text(prop, "Ray-Mirror", "Causes the texture to affect the ray-mirror value");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_ALPHA);
RNA_def_property_ui_text(prop, "Alpha", "Causes the texture to affect the alpha value");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_emit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMIT);
RNA_def_property_ui_text(prop, "Emit", "Causes the texture to affect the emit value");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_translucency", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_TRANSLU);
RNA_def_property_ui_text(prop, "Translucency", "Causes the texture to affect the translucency value");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_displacement", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_DISPLACE);
RNA_def_property_ui_text(prop, "Displacement", "Let the texture displace the surface");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_warp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_WARP);
RNA_def_property_ui_text(prop, "Warp", "Let the texture warp texture coordinates of next channels");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "x_mapping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "projx");
RNA_def_property_enum_items(prop, prop_x_mapping_items);
RNA_def_property_ui_text(prop, "X Mapping", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "y_mapping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "projy");
RNA_def_property_enum_items(prop, prop_y_mapping_items);
RNA_def_property_ui_text(prop, "Y Mapping", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "z_mapping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "projz");
RNA_def_property_enum_items(prop, prop_z_mapping_items);
RNA_def_property_ui_text(prop, "Z Mapping", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mapping_items);
RNA_def_property_ui_text(prop, "Mapping", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- /* XXX: pmapto, pmaptoneg */
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "normal_map_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "normapspace");
RNA_def_property_enum_items(prop, prop_normal_map_space_items);
RNA_def_property_ui_text(prop, "Normal Map Space", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- /* XXX: MTex.which_output */
-
- /* XXX: MTex.k */
+ prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "norfac");
+ RNA_def_property_ui_range(prop, 0, 5, 10, 3);
+ RNA_def_property_ui_text(prop, "Normal Factor", "Amount texture affects normal values.");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "displacement_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dispfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Displacement Factor", "Amount texture displaces the surface.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "warp_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "warpfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Warp Factor", "Amount texture affects texture coordinates of next channels.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "colorspec_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
+ RNA_def_property_float_sdna(prop, NULL, "colspecfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Specular Color Factor", "Amount texture affects specular color.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "colordiff_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Diffuse Color Factor", "Amount texture affects diffuse color.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "mirror_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
+ RNA_def_property_float_sdna(prop, NULL, "mirrfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Mirror Factor", "Amount texture affects mirror color.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "alpha_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
+ RNA_def_property_float_sdna(prop, NULL, "alphafac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Alpha Factor", "Amount texture affects alpha.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "diffuse_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
+ RNA_def_property_float_sdna(prop, NULL, "difffac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Diffuse Factor", "Amount texture affects diffuse reflectivity.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "specular_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
+ RNA_def_property_float_sdna(prop, NULL, "specfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Specular Factor", "Amount texture affects specular reflectivity.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "emit_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
+ RNA_def_property_float_sdna(prop, NULL, "emitfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Emit Factor", "Amount texture affects emission.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "hardness_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
+ RNA_def_property_float_sdna(prop, NULL, "hardfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Hardness Factor", "Amount texture affects hardness.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "raymir_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
+ RNA_def_property_float_sdna(prop, NULL, "raymirrfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Ray Mirror Factor", "Amount texture affects ray mirror.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "translucency_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
+ RNA_def_property_float_sdna(prop, NULL, "translfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Translucency Factor", "Amount texture affects translucency.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ambient_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
+ RNA_def_property_float_sdna(prop, NULL, "ambfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Ambient Factor", "Amount texture affects ambient.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
/* volume material */
prop= RNA_def_property(srna, "map_coloremission", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMISSION_COL);
- RNA_def_property_ui_text(prop, "Emission Color", "Causes the texture to affect the colour of emission");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_ui_text(prop, "Emission Color", "Causes the texture to affect the color of emission");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "map_colorabsorption", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_ABSORPTION_COL);
- RNA_def_property_ui_text(prop, "Absorption Color", "Causes the texture to affect the result colour after absorption");
+ prop= RNA_def_property(srna, "map_colorreflection", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_REFLECTION_COL);
+ RNA_def_property_ui_text(prop, "Reflection Color", "Causes the texture to affect the color of scattered light");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
+
+ prop= RNA_def_property(srna, "map_colortransmission", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_TRANSMISSION_COL);
+ RNA_def_property_ui_text(prop, "Transmission Color", "Causes the texture to affect the result color after other light has been scattered/absorbed");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "map_density", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_DENSITY);
RNA_def_property_ui_text(prop, "Density", "Causes the texture to affect the volume's density");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_emission", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMISSION);
RNA_def_property_ui_text(prop, "Emission", "Causes the texture to affect the volume's emission");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "map_absorption", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_ABSORPTION);
- RNA_def_property_ui_text(prop, "Absorption", "Causes the texture to affect the volume's absorption");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_scattering", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_SCATTERING);
RNA_def_property_ui_text(prop, "Scattering", "Causes the texture to affect the volume's scattering");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
+
+ prop= RNA_def_property(srna, "map_reflection", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_REFLECTION);
+ RNA_def_property_ui_text(prop, "Reflection", "Causes the texture to affect the reflected light's brightness");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "coloremission_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
+ RNA_def_property_float_sdna(prop, NULL, "colemitfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Emission Color Factor", "Amount texture affects emission color.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "colorabsorption_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
+ prop= RNA_def_property(srna, "colorreflection_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "colreflfac");
+ RNA_def_property_ui_range(prop, 0, 1, 10, 3);
+ RNA_def_property_ui_text(prop, "Reflection Color Factor", "Amount texture affects color of out-scattered light");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
+
+ prop= RNA_def_property(srna, "colortransmission_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "coltransfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Absorpion Color Factor", "Amount texture affects diffuse color.");
+ RNA_def_property_ui_text(prop, "Transmission Color Factor", "Amount texture affects result color after light has been scattered/absorbed.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "density_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
+ RNA_def_property_float_sdna(prop, NULL, "densfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Density Factor", "Amount texture affects density.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "emission_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
+ RNA_def_property_float_sdna(prop, NULL, "emitfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Emission Factor", "Amount texture affects emission.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "absorption_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Absorption Factor", "Amount texture affects absorption.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "scattering_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
+ RNA_def_property_float_sdna(prop, NULL, "scatterfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Scattering Factor", "Amount texture affects scattering.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
+
+ prop= RNA_def_property(srna, "reflection_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "reflfac");
+ RNA_def_property_ui_range(prop, 0, 1, 10, 3);
+ RNA_def_property_ui_text(prop, "Reflection Factor", "Amount texture affects brightness of out-scattered light.");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
/* end volume material */
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_MaterialTextureSlot_enabled_get", "rna_MaterialTextureSlot_enabled_set");
RNA_def_property_ui_text(prop, "Enabled", "Enable this material texture slot.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "new_bump", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_NEW_BUMP);
RNA_def_property_ui_text(prop, "New Bump", "Use new, corrected bump mapping code (backwards compatibility option).");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
}
static void rna_def_material_colors(StructRNA *srna)
@@ -631,78 +670,91 @@ static void rna_def_material_colors(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Diffuse Color", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_draw_update");
prop= RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "specr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Specular Color", "Specular color of the material.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_draw_update");
prop= RNA_def_property(srna, "mirror_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "mirr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Mirror Color", "Mirror color of the material.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Alpha", "Alpha transparency of the material.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "specular_alpha", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "specular_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "spectra");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Specular Alpha", "Alpha transparency for specular areas.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
/* Color bands */
prop= RNA_def_property(srna, "use_diffuse_ramp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAMP_COL);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_diffuse_ramp_set");
RNA_def_property_ui_text(prop, "Use Diffuse Ramp", "Toggle diffuse ramp operations.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "diffuse_ramp", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ramp_col");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Diffuse Ramp", "Color ramp used to affect diffuse shading.");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_specular_ramp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAMP_SPEC);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_specular_ramp_set");
RNA_def_property_ui_text(prop, "Use Specular Ramp", "Toggle specular ramp operations.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "specular_ramp", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ramp_spec");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Specular Ramp", "Color ramp used to affect specular shading.");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "diffuse_ramp_blend", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rampblend_col");
RNA_def_property_enum_items(prop, prop_ramp_blend_diffuse_items);
RNA_def_property_ui_text(prop, "Diffuse Ramp Blend", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "specular_ramp_blend", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rampblend_spec");
RNA_def_property_enum_items(prop, prop_ramp_blend_diffuse_items);
RNA_def_property_ui_text(prop, "Diffuse Ramp Blend", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "diffuse_ramp_input", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rampin_col");
RNA_def_property_enum_items(prop, prop_ramp_input_items);
RNA_def_property_ui_text(prop, "Diffuse Ramp Input", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "specular_ramp_input", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rampin_spec");
RNA_def_property_enum_items(prop, prop_ramp_input_items);
RNA_def_property_ui_text(prop, "Specular Ramp Input", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
+ prop= RNA_def_property(srna, "diffuse_ramp_factor", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "rampfac_col");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Diffuse Ramp Factor", "Blending factor (also uses alpha in Colorband).");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
+
+ prop= RNA_def_property(srna, "specular_ramp_factor", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "rampfac_spec");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Specular Ramp Factor", "Blending factor (also uses alpha in Colorband).");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
}
static void rna_def_material_diffuse(StructRNA *srna)
@@ -721,47 +773,47 @@ static void rna_def_material_diffuse(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "diff_shader");
RNA_def_property_enum_items(prop, prop_diff_shader_items);
RNA_def_property_ui_text(prop, "Diffuse Shader Model", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "diffuse_intensity", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "diffuse_intensity", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "ref");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Diffuse Intensity", "Amount of diffuse reflection.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_draw_update");
prop= RNA_def_property(srna, "roughness", PROP_FLOAT, PROP_NONE);
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "diffuse_toon_smooth", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "diffuse_toon_smooth", PROP_FLOAT, PROP_FACTOR);
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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, "Diffuse Fresnel", "Power of Fresnel.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "darkness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Darkness", "Minnaert darkness.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
}
static void rna_def_material_raymirror(BlenderRNA *brna)
@@ -782,67 +834,67 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYMIRROR); /* use bitflags */
RNA_def_property_ui_text(prop, "Enabled", "Enable raytraced reflections.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "reflect_factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "reflect_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "ray_mirror");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Reflectivity", "Sets the amount mirror reflection for raytrace.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_mir");
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for mirror reflection.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "fresnel_mir_i");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Amount", "The shininess of the reflection. Values < 1.0 give diffuse, blurry reflections.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "gloss_anisotropic", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "gloss_anisotropic", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "aniso_gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Anisotropy", "The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp_gloss_mir");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry reflections.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_depth");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-reflections.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist_mir");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Maximum Distance", "Maximum distance of reflected rays. Reflections further than this range fade to sky color or material color.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "fade_to", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "fadeto_mir");
RNA_def_property_enum_items(prop, prop_fadeto_mir_items);
RNA_def_property_ui_text(prop, "Fade-out Color", "The color that rays with no intersection within the Max Distance take. Material color can be best for indoor scenes, sky color for outdoor.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
}
static void rna_def_material_raytra(BlenderRNA *brna)
@@ -859,61 +911,61 @@ static void rna_def_material_raytra(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "ang");
RNA_def_property_range(prop, 1.0f, 3.0f);
RNA_def_property_ui_text(prop, "IOR", "Sets angular index of refraction for raytraced refraction.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_tra");
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for transparency (Ray or ZTransp).");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "fresnel_tra_i");
RNA_def_property_range(prop, 1.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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "gloss_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Amount", "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp_gloss_tra");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry refractions.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_depth_tra");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-refractions.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "filter", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "filter", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "filter");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Filter", "Amount to blend in the material's diffuse color in raytraced transparency (simulating absorption).");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "limit", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "tx_limit");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Limit", "Maximum depth for light to travel through the transparent material before becoming fully filtered (0.0 is disabled).");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tx_falloff");
RNA_def_property_range(prop, 0.1f, 10.0f);
RNA_def_property_ui_text(prop, "Falloff", "Falloff power for transmissivity filter effect (1.0 is linear).");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
}
static void rna_def_material_volume(BlenderRNA *brna)
@@ -921,11 +973,12 @@ static void rna_def_material_volume(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_scattering_items[] = {
- {MA_VOL_SHADE_NONE, "NONE", 0, "None", ""},
- {MA_VOL_SHADE_SINGLE, "SINGLE_SCATTERING", 0, "Single Scattering", ""},
+ static EnumPropertyItem prop_lighting_items[] = {
+ {MA_VOL_SHADE_SHADELESS, "SHADELESS", 0, "Shadeless", ""},
+ {MA_VOL_SHADE_SHADOWED, "SHADOWED", 0, "Shadowed", ""},
+ {MA_VOL_SHADE_SHADED, "SHADED", 0, "Shaded", ""},
{MA_VOL_SHADE_MULTIPLE, "MULTIPLE_SCATTERING", 0, "Multiple Scattering", ""},
- {MA_VOL_SHADE_SINGLEPLUSMULTIPLE, "SINGLE_PLUS_MULTIPLE_SCATTERING", 0, "Single + Multiple Scattering", ""},
+ {MA_VOL_SHADE_SHADEDPLUSMULTIPLE, "SHADED_PLUS_MULTIPLE_SCATTERING", 0, "Shaded + Multiple Scattering", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_stepsize_items[] = {
@@ -934,15 +987,6 @@ static void rna_def_material_volume(BlenderRNA *brna)
//{MA_VOL_STEP_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", ""},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem prop_phasefunction_items[] = {
- {MA_VOL_PH_ISOTROPIC, "ISOTROPIC", 0, "Isotropic", ""},
- {MA_VOL_PH_MIEHAZY, "MIE_HAZY", 0, "Mie Hazy", ""},
- {MA_VOL_PH_MIEMURKY, "MIE_MURKY", 0, "Mie Murky", ""},
- {MA_VOL_PH_RAYLEIGH, "RAYLEIGH", 0, "Rayleigh", ""},
- {MA_VOL_PH_HG, "HENYEY-GREENSTEIN", 0, "Henyey-Greenstein", ""},
- {MA_VOL_PH_SCHLICK, "SCHLICK", 0, "Schlick", ""},
- {0, NULL, 0, NULL, NULL}};
-
srna= RNA_def_struct(brna, "MaterialVolume", NULL);
RNA_def_struct_sdna(srna, "VolumeSettings");
RNA_def_struct_nested(brna, srna, "Material");
@@ -952,120 +996,118 @@ static void rna_def_material_volume(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "stepsize_type");
RNA_def_property_enum_items(prop, prop_stepsize_items);
RNA_def_property_ui_text(prop, "Step Calculation", "Method of calculating the steps through the volume");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "step_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stepsize");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3);
RNA_def_property_ui_text(prop, "Step Size", "Distance between subsequent volume depth samples.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "shading_step_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "shade_stepsize");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Shading Step Size", "Distance between subsequent volume shading samples.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "scattering_mode", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "lighting_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "shade_type");
- RNA_def_property_enum_items(prop, prop_scattering_items);
- RNA_def_property_ui_text(prop, "Scattering Mode", "Method of shading, attenuating, and scattering light through the volume");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_enum_items(prop, prop_lighting_items);
+ RNA_def_property_ui_text(prop, "Lighting Mode", "Method of shading, attenuating, and scattering light through the volume");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
+
+ prop= RNA_def_property(srna, "external_shadows", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "shadeflag", MA_VOL_RECV_EXT_SHADOW); /* use bitflags */
+ RNA_def_property_ui_text(prop, "External Shadows", "Receive shadows from sources outside the volume (temporary)");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "light_cache", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shadeflag", MA_VOL_PRECACHESHADING); /* use bitflags */
RNA_def_property_ui_text(prop, "Light Cache", "Pre-calculate the shading information into a voxel grid, speeds up shading at slightly less accuracy");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "cache_resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "precache_resolution");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_ui_text(prop, "Resolution", "Resolution of the voxel grid, low resolutions are faster, high resolutions use more memory.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ms_diffusion", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ms_diff");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Diffusion", "Diffusion factor, the strength of the blurring effect");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ms_spread", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ms_steps");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_ui_text(prop, "Spread", "Simulation steps, the effective distance over which the light is diffused");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ms_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ms_intensity");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Intensity", "Multiplier for multiple scattered light energy");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "depth_cutoff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "depth_cutoff");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Depth Cutoff", "Stop ray marching early if transmission drops below this luminance - higher values give speedups in dense volumes at the expense of accuracy.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "density", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "density", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "density");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Density", "The base density of the volume");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "density_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "density_scale");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
RNA_def_property_ui_text(prop, "Density Scale", "Multiplier for the material's density");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "absorption", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "absorption");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Absorption", "Amount of light that gets absorbed by the volume - higher values mean light travels less distance");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "absorption_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "absorption_col");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Absorption Color", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "scattering", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scattering");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1 ,3);
- RNA_def_property_ui_text(prop, "Scattering", "Amount of light that gets scattered by the volume - values > 1.0 are non-physical");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_ui_text(prop, "Scattering", "Amount of light that gets scattered out by the volume - the more out-scattering, the shallower the light will penetrate ");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "emission", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "emission");
+ prop= RNA_def_property(srna, "transmission_color", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "transmission_col");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Transmission Color", "Result color of the volume, after other light has been scattered/absorbed");
+ RNA_def_property_update(prop, 0, "rna_Material_draw_update");
+
+ prop= RNA_def_property(srna, "reflection_color", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "reflection_col");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Reflection Color", "Colour of light scattered out of the volume (does not affect transmission)");
+ RNA_def_property_update(prop, 0, "rna_Material_draw_update");
+
+ prop= RNA_def_property(srna, "reflection", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "reflection");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Emission", "Amount of light that gets emitted by the volume");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1 ,3);
+ RNA_def_property_ui_text(prop, "Reflection", "Multiplier to make out-scattered light brighter or darker (non-physically correct)");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "emission_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "emission_col");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Emission Color", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
-
- prop= RNA_def_property(srna, "phase_function", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "phasefunc_type");
- RNA_def_property_enum_items(prop, prop_phasefunction_items);
- RNA_def_property_ui_text(prop, "Phase Function", "Isotropic/Anisotropic scattering");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_draw_update");
+ prop= RNA_def_property(srna, "emission", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "emission");
+ RNA_def_property_range(prop, 0.0f, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
+ RNA_def_property_ui_text(prop, "Emission", "Amount of light that gets emitted by the volume");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
+
prop= RNA_def_property(srna, "asymmetry", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "phasefunc_g");
+ RNA_def_property_float_sdna(prop, NULL, "asymmetry");
RNA_def_property_range(prop, -1.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Asymmetry", "Continuum between forward scattering and back scattering");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_ui_text(prop, "Asymmetry", "Back scattering (-1.0) to Forward scattering (1.0) and the range in between.");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
}
@@ -1083,118 +1125,118 @@ static void rna_def_material_halo(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "hasize");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Size", "Sets the dimension of the halo.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "hardness", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "har");
RNA_def_property_range(prop, 0, 127);
RNA_def_property_ui_text(prop, "Hardness", "Sets the hardness of the halo.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "add", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "add", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "add");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Add", "Sets the strength of the add effect.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "rings", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ringc");
RNA_def_property_range(prop, 0, 24);
RNA_def_property_ui_text(prop, "Rings", "Sets the number of rings rendered over the halo.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "line_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "linec");
RNA_def_property_range(prop, 0, 250);
RNA_def_property_ui_text(prop, "Line Number", "Sets the number of star shaped lines rendered over the halo.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "star_tips", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "starc");
RNA_def_property_range(prop, 3, 50);
RNA_def_property_ui_text(prop, "Star Tips", "Sets the number of points on the star shaped halo.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "seed1");
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Seed", "Randomizes ring dimension and line location.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_FLARE); /* use bitflags */
RNA_def_property_ui_text(prop, "Flare", "Renders halo as a lensflare.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "flaresize");
RNA_def_property_range(prop, 0.1f, 25.0f);
RNA_def_property_ui_text(prop, "Flare Size", "Sets the factor by which the flare is larger than the halo.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_subsize", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "subsize");
RNA_def_property_range(prop, 0.1f, 25.0f);
RNA_def_property_ui_text(prop, "Flare Subsize", "Sets the dimension of the subflares, dots and circles.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_boost", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "flareboost");
RNA_def_property_range(prop, 0.1f, 10.0f);
RNA_def_property_ui_text(prop, "Flare Boost", "Gives the flare extra strength.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_seed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "seed2");
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Flare Seed", "Specifies an offset in the flare seed table.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flares_sub", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "flarec");
RNA_def_property_range(prop, 1, 32);
RNA_def_property_ui_text(prop, "Flares Sub", "Sets the number of subflares.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ring", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_RINGS);
RNA_def_property_ui_text(prop, "Rings", "Renders rings over halo.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_LINES);
RNA_def_property_ui_text(prop, "Lines", "Renders star shaped lines over halo.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "star", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STAR);
RNA_def_property_ui_text(prop, "Star", "Renders halo as a star.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOTEX);
RNA_def_property_ui_text(prop, "Texture", "Gives halo a texture.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "vertex_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOPUNO);
RNA_def_property_ui_text(prop, "Vertex Normal", "Uses the vertex normal to specify the dimension of the halo.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "xalpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_XALPHA);
RNA_def_property_ui_text(prop, "Extreme Alpha", "Uses extreme alpha.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "shaded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SHADE);
RNA_def_property_ui_text(prop, "Shaded", "Lets halo receive light and shadows from external objects.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "soft", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SOFT);
RNA_def_property_ui_text(prop, "Soft", "Softens the edges of halos at intersections with other geometry.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
}
static void rna_def_material_sss(BlenderRNA *brna)
@@ -1212,59 +1254,59 @@ static void rna_def_material_sss(BlenderRNA *brna)
RNA_def_property_range(prop, 0.001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.001, 10000, 1, 3);
RNA_def_property_ui_text(prop, "Radius", "Mean red/green/blue scattering path length.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "sss_col");
RNA_def_property_ui_text(prop, "Color", "Scattering color.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "error_tolerance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_error");
RNA_def_property_ui_range(prop, 0.0001, 10, 1, 3);
RNA_def_property_ui_text(prop, "Error Tolerance", "Error tolerance (low values are slower and higher quality).");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_scale");
RNA_def_property_ui_range(prop, 0.001, 1000, 1, 3);
RNA_def_property_ui_text(prop, "Scale", "Object scale factor.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_ior");
RNA_def_property_ui_range(prop, 0.1, 2, 1, 3);
RNA_def_property_ui_text(prop, "IOR", "Index of refraction (higher values are denser).");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "sss_colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Color Factor", "Blend factor for SSS colors.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "texture_factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "texture_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "sss_texfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Texture Factor", "Texture scatting blend factor.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "front", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_front");
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "Front", "Front scattering weight.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "back", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_back");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Back", "Back scattering weight.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "sss_flag", MA_DIFF_SSS);
RNA_def_property_ui_text(prop, "Enabled", "Enable diffuse subsurface scatting effects in a material.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
}
static void rna_def_material_specularity(StructRNA *srna)
@@ -1283,13 +1325,13 @@ static void rna_def_material_specularity(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "spec_shader");
RNA_def_property_enum_items(prop, prop_specular_shader_items);
RNA_def_property_ui_text(prop, "Specular Shader Model", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "specular_intensity", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "specular_intensity", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "spec");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Specular Intensity", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
/* 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
@@ -1300,31 +1342,31 @@ static void rna_def_material_specularity(StructRNA *srna)
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "specular_toon_smooth", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "specular_toon_smooth", PROP_FLOAT, PROP_FACTOR);
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
}
static void rna_def_material_strand(BlenderRNA *brna)
@@ -1340,58 +1382,58 @@ static 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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "blend_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "strand_surfnor");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Blend Distance", "Worldspace distance over which to blend in the surface normal.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "root_size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_sta");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_start_size_range");
RNA_def_property_ui_text(prop, "Root Size", "Start size of strands in pixels Blender units.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "tip_size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_end");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_end_size_range");
RNA_def_property_ui_text(prop, "Tip Size", "Start size of strands in pixels or Blender units.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
}
static void rna_def_material_physics(BlenderRNA *brna)
@@ -1459,45 +1501,45 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Material type defining how the object is rendered.");
RNA_def_property_enum_funcs(prop, NULL, "rna_Material_type_set", NULL);
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_draw_update");
prop= RNA_def_property(srna, "transparency", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRANSP);
RNA_def_property_ui_text(prop, "Transparency", "Render material as transparent.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "transparency_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, transparency_items);
RNA_def_property_ui_text(prop, "Transparency Method", "Method to use for rendering transparency.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "ambient", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "ambient", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "amb");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Ambient", "Amount of global ambient color the material receives.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "emit", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 2.0f, 10, 2);
RNA_def_property_ui_text(prop, "Emit", "Amount of light to emit.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "translucency", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "translucency", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Translucency", "Amount of diffuse shading on the back side.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "shadow_ray_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sbias");
@@ -1509,143 +1551,150 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Factor to multiply shadow buffer bias with (0 is ignore.)");
- prop= RNA_def_property(srna, "shadow_casting_alpha", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "shadow_casting_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "shad_alpha");
RNA_def_property_range(prop, 0.001, 1);
- RNA_def_property_ui_text(prop, "Shadow Casting Alpha", "Shadow casting alpha, only in use for Irregular Shadowbuffer.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_ui_text(prop, "Shadow Casting Alpha", "Shadow casting alpha, in use for Irregular and Deep shadow buffer.");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "light_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "group");
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Light Group", "Limit lighting to lamps in this Group.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
/* flags */
prop= RNA_def_property(srna, "light_group_exclusive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_GROUP_NOLAY);
RNA_def_property_ui_text(prop, "Light Group Exclusive", "Material uses the light group exclusively - these lamps are excluded from other scene lighting.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "traceable", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRACEBLE);
RNA_def_property_ui_text(prop, "Traceable", "Include this material and geometry that uses it in ray tracing calculations.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADOW);
RNA_def_property_ui_text(prop, "Shadows", "Allows this material to receive shadows.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "shadeless", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHLESS);
RNA_def_property_ui_text(prop, "Shadeless", "Makes this material insensitive to light or shadow.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "vertex_color_light", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_VERTEXCOL);
RNA_def_property_ui_text(prop, "Vertex Color Light", "Add vertex colors as additional lighting.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "vertex_color_paint", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_VERTEXCOLP);
RNA_def_property_ui_text(prop, "Vertex Color Paint", "Replaces object base color with vertex colors (multiplies with 'texture face' face assigned textures).");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ZINV);
RNA_def_property_ui_text(prop, "Invert Z Depth", "Renders material's faces with an inverted Z buffer (scanline only).");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ENV);
RNA_def_property_ui_text(prop, "Sky", "Renders this material with zero alpha, with sky background in place (scanline only).");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "only_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYSHADOW);
RNA_def_property_ui_text(prop, "Only Shadow", "Renders shadows as the material's alpha value, making materials transparent except for shadowed areas.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "face_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FACETEXTURE);
RNA_def_property_ui_text(prop, "Face Textures", "Replaces the object's base color with color from face assigned image textures");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "face_texture_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FACETEXTURE_ALPHA);
RNA_def_property_ui_text(prop, "Face Textures Alpha", "Replaces the object's base alpha value with alpha from face assigned image textures");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "cast_shadows_only", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYCAST);
RNA_def_property_ui_text(prop, "Cast Shadows Only", "Makes objects with this material appear invisible, only casting shadows (not rendered).");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "exclude_mist", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_NOMIST);
RNA_def_property_ui_text(prop, "Exclude Mist", "Excludes this material from mist effects (in world settings)");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "receive_transparent_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADOW_TRA);
RNA_def_property_ui_text(prop, "Receive Transparent Shadows", "Allow this object to receive transparent shadows casted through other objects");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ray_shadow_bias", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYBIAS);
RNA_def_property_ui_text(prop, "Ray Shadow Bias", "Prevents raytraced shadow errors on surfaces with smooth shaded normals (terminator problem)");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "full_oversampling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FULL_OSA);
RNA_def_property_ui_text(prop, "Full Oversampling", "Force this material to render full shading/textures for all anti-aliasing samples");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "cast_buffer_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADBUF);
RNA_def_property_ui_text(prop, "Cast Buffer Shadows", "Allow this material to cast shadows from shadow buffer lamps");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "tangent_shading", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TANGENT_V);
RNA_def_property_ui_text(prop, "Tangent Shading", "Use the material's tangent vector instead of the normal for shading - for anisotropic shading effects");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
/* nested structs */
- prop= RNA_def_property(srna, "raytrace_mirror", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "raytrace_mirror", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialRaytraceMirror");
RNA_def_property_pointer_funcs(prop, "rna_Material_mirror_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Raytrace Mirror", "Raytraced reflection settings for the material.");
- prop= RNA_def_property(srna, "raytrace_transparency", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "raytrace_transparency", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialRaytraceTransparency");
RNA_def_property_pointer_funcs(prop, "rna_Material_transp_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Raytrace Transparency", "Raytraced reflection settings for the material.");
- prop= RNA_def_property(srna, "volume", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "volume", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "vol");
RNA_def_property_struct_type(prop, "MaterialVolume");
RNA_def_property_ui_text(prop, "Volume", "Volume settings for the material.");
- prop= RNA_def_property(srna, "halo", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "halo", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialHalo");
RNA_def_property_pointer_funcs(prop, "rna_Material_halo_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Halo", "Halo settings for the material.");
- prop= RNA_def_property(srna, "subsurface_scattering", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "subsurface_scattering", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialSubsurfaceScattering");
RNA_def_property_pointer_funcs(prop, "rna_Material_sss_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Subsurface Scattering", "Subsurface scattering settings for the material.");
- prop= RNA_def_property(srna, "strand", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "strand", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialStrand");
RNA_def_property_pointer_funcs(prop, "rna_Material_strand_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Strand", "Strand settings for the material.");
- prop= RNA_def_property(srna, "physics", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "physics", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialPhysics");
RNA_def_property_pointer_funcs(prop, "rna_Material_physics_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Physics", "Game physics settings.");
@@ -1659,13 +1708,27 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_nodes_set");
RNA_def_property_ui_text(prop, "Use Nodes", "Use shader nodes to render the material.");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
+
+ prop= RNA_def_property(srna, "active_node_material", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Material");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_funcs(prop, "rna_Material_active_node_material_get", "rna_Material_active_node_material_set", NULL);
+ RNA_def_property_ui_text(prop, "Material", "Active node material.");
RNA_def_property_update(prop, NC_MATERIAL, NULL);
/* common */
rna_def_animdata_common(srna);
rna_def_mtex_common(srna, "rna_Material_mtex_begin", "rna_Material_active_texture_get",
- "rna_Material_active_texture_set", "MaterialTextureSlot");
+ "rna_Material_active_texture_set", "MaterialTextureSlot", "rna_Material_update");
+ /* only material has this one */
+ prop= RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "septex", 1);
+ RNA_def_property_array(prop, 18);
+ RNA_def_property_ui_text(prop, "Use Textures", "Enable/Disable each texture.");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
+
rna_def_material_colors(srna);
rna_def_material_diffuse(srna);
rna_def_material_specularity(srna);
@@ -1679,9 +1742,11 @@ void RNA_def_material(BlenderRNA *brna)
rna_def_material_mtex(brna);
rna_def_material_strand(brna);
rna_def_material_physics(brna);
+
+ RNA_api_material(srna);
}
-void rna_def_mtex_common(StructRNA *srna, const char *begin, const char *activeget, const char *activeset, const char *structname)
+void rna_def_mtex_common(StructRNA *srna, const char *begin, const char *activeget, const char *activeset, const char *structname, const char *update)
{
PropertyRNA *prop;
@@ -1696,13 +1761,13 @@ void rna_def_mtex_common(StructRNA *srna, const char *begin, const char *activeg
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, activeget, activeset, NULL);
RNA_def_property_ui_text(prop, "Active Texture", "Active texture slot being displayed.");
- RNA_def_property_update(prop, NC_TEXTURE|ND_SHADING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, update);
prop= RNA_def_property(srna, "active_texture_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "texact");
RNA_def_property_range(prop, 0, MAX_MTEX-1);
RNA_def_property_ui_text(prop, "Active Texture Index", "Index of active texture slot.");
- RNA_def_property_update(prop, NC_TEXTURE|ND_SHADING_DRAW, NULL);
+ RNA_def_property_update(prop, 0, update);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 53c34a8de32..ff995538d1e 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -700,6 +700,27 @@ static void rna_MeshFace_verts_set(PointerRNA *ptr, const int *values)
memcpy(&face->v1, values, (face->v4 ? 4 : 3) * sizeof(int));
}
+static int rna_MeshVertex_index_get(PointerRNA *ptr)
+{
+ Mesh *me= (Mesh*)ptr->id.data;
+ MVert *vert= (MVert*)ptr->data;
+ return (int)(vert - me->mvert);
+}
+
+static int rna_MeshEdge_index_get(PointerRNA *ptr)
+{
+ Mesh *me= (Mesh*)ptr->id.data;
+ MEdge *edge= (MEdge*)ptr->data;
+ return (int)(edge - me->medge);
+}
+
+static int rna_MeshFace_index_get(PointerRNA *ptr)
+{
+ Mesh *me= (Mesh*)ptr->id.data;
+ MFace *face= (MFace*)ptr->data;
+ return (int)(face - me->mface);
+}
+
/* path construction */
static char *rna_VertexGroupElement_path(PointerRNA *ptr)
@@ -873,6 +894,11 @@ static void rna_def_mvert(BlenderRNA *brna)
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.");
+
+ prop= RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_int_funcs(prop, "rna_MeshVertex_index_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Index", "Index number of the vertex.");
}
static void rna_def_medge(BlenderRNA *brna)
@@ -921,6 +947,21 @@ static void rna_def_medge(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SHARP);
RNA_def_property_ui_text(prop, "Sharp", "Sharp edge for the EdgeSplit modifier");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "loose", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_LOOSEEDGE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Loose", "Loose edge");
+
+ prop= RNA_def_property(srna, "fgon", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_FGON);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Fgon", "Fgon edge");
+
+ prop= RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_int_funcs(prop, "rna_MeshEdge_index_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Index", "Index number of the vertex.");
}
static void rna_def_mface(BlenderRNA *brna)
@@ -942,6 +983,12 @@ static void rna_def_mface(BlenderRNA *brna)
RNA_def_property_int_funcs(prop, "rna_MeshFace_verts_get", "rna_MeshFace_verts_set", NULL);
RNA_def_property_ui_text(prop, "Vertices", "Vertex indices");
+ /* leaving this fixed size array for foreach_set used in import scripts */
+ prop= RNA_def_property(srna, "verts_raw", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "v1");
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Vertices", "Fixed size vertex indices array");
+
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", "");
@@ -969,6 +1016,11 @@ static void rna_def_mface(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_funcs(prop, "rna_MeshFace_normal_get", NULL, NULL);
RNA_def_property_ui_text(prop, "face normal", "local space unit length normal vector for this face");
+
+ prop= RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_int_funcs(prop, "rna_MeshFace_index_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Index", "Index number of the vertex.");
}
static void rna_def_mtexpoly(BlenderRNA *brna)
@@ -1316,8 +1368,13 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "MeshSticky");
RNA_def_property_ui_text(prop, "Sticky", "Sticky texture coordinates.");
- /* UV textures */
+ /* TODO, should this be allowed to be its self? */
+ prop= RNA_def_property(srna, "texture_mesh", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "texcomesh");
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
+ RNA_def_property_ui_text(prop, "Texture Mesh", "Use another mesh for texture indicies (vertex indicies must be aligned).");
+ /* UV textures */
prop= RNA_def_property(srna, "uv_textures", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "pdata.layers", "pdata.totlayer");
RNA_def_property_collection_funcs(prop, "rna_Mesh_uv_textures_begin", 0, 0, 0, "rna_Mesh_uv_textures_length", 0, 0, 0, 0);
@@ -1408,6 +1465,10 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Draw Edges", "Displays selected edges using hilights in the 3d view and UV editor");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ prop= RNA_def_property(srna, "all_edges", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_ALLEDGES);
+ RNA_def_property_ui_text(prop, "All Edges", "Displays all edges for wireframe in all view modes in the 3d view");
+
prop= RNA_def_property(srna, "draw_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWFACES);
RNA_def_property_ui_text(prop, "Draw Faces", "Displays all faces as shades in the 3d view and UV editor");
@@ -1443,7 +1504,6 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Draw Sharp", "Displays sharp edges, used with the EdgeSplit modifier");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
-
prop= RNA_def_property(srna, "draw_edge_lenght", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_EDGELEN);
RNA_def_property_ui_text(prop, "Edge Length", "Displays selected edge lengths");
@@ -1463,6 +1523,20 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_PINS);
RNA_def_property_ui_text(prop, "Draw Pins", "Displays pinned mesh elements");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ /* editflag */
+ prop= RNA_def_property(srna, "use_mirror_x", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_MIRROR_X);
+ RNA_def_property_ui_text(prop, "X Mirror", "X Axis mirror editing");
+
+ /*
+ prop= RNA_def_property(srna, "use_mirror_y", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_MIRROR_Y);
+ RNA_def_property_ui_text(prop, "Y Mirror", "Y Axis mirror editing");
+
+ prop= RNA_def_property(srna, "use_mirror_x", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_MIRROR_Z);
+ RNA_def_property_ui_text(prop, "Z Mirror", "Z Axis mirror editing");
+ */
rna_def_texmat_common(srna, "rna_Mesh_texspace_editable");
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index f5cf50da26f..32bcf5c1bc8 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -32,183 +32,15 @@
#include "RNA_define.h"
#include "RNA_types.h"
-#ifdef RNA_RUNTIME
-
-#include "DNA_mesh_types.h"
-#include "DNA_scene_types.h"
-
-#include "BKE_customdata.h"
-#include "BKE_depsgraph.h"
-#include "BKE_DerivedMesh.h"
-#include "BKE_main.h"
-#include "BKE_mesh.h"
-
-#include "BLI_edgehash.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-static void rna_Mesh_calc_edges(Mesh *mesh)
-{
- CustomData edata;
- EdgeHashIterator *ehi;
- MFace *mf = mesh->mface;
- MEdge *med;
- EdgeHash *eh = BLI_edgehash_new();
- int i, *index, totedge, totface = mesh->totface;
-
- for (i = 0; i < totface; i++, mf++) {
- if (!BLI_edgehash_haskey(eh, mf->v1, mf->v2))
- BLI_edgehash_insert(eh, mf->v1, mf->v2, NULL);
- if (!BLI_edgehash_haskey(eh, mf->v2, mf->v3))
- BLI_edgehash_insert(eh, mf->v2, mf->v3, NULL);
-
- if (mf->v4) {
- if (!BLI_edgehash_haskey(eh, mf->v3, mf->v4))
- BLI_edgehash_insert(eh, mf->v3, mf->v4, NULL);
- if (!BLI_edgehash_haskey(eh, mf->v4, mf->v1))
- BLI_edgehash_insert(eh, mf->v4, mf->v1, NULL);
- } else {
- if (!BLI_edgehash_haskey(eh, mf->v3, mf->v1))
- BLI_edgehash_insert(eh, mf->v3, mf->v1, NULL);
- }
- }
-
- totedge = BLI_edgehash_size(eh);
-
- /* write new edges into a temporary CustomData */
- memset(&edata, 0, sizeof(edata));
- CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge);
-
- ehi = BLI_edgehashIterator_new(eh);
- med = CustomData_get_layer(&edata, CD_MEDGE);
- for(i = 0; !BLI_edgehashIterator_isDone(ehi);
- BLI_edgehashIterator_step(ehi), ++i, ++med, ++index) {
- BLI_edgehashIterator_getKey(ehi, (int*)&med->v1, (int*)&med->v2);
-
- med->flag = ME_EDGEDRAW|ME_EDGERENDER;
- }
- BLI_edgehashIterator_free(ehi);
-
- /* free old CustomData and assign new one */
- CustomData_free(&mesh->edata, mesh->totedge);
- mesh->edata = edata;
- mesh->totedge = totedge;
-
- mesh->medge = CustomData_get_layer(&mesh->edata, CD_MEDGE);
-
- BLI_edgehash_free(eh, NULL);
-}
-
-static void rna_Mesh_update(Mesh *mesh, bContext *C)
-{
- if(mesh->totface && mesh->totedge == 0)
- rna_Mesh_calc_edges(mesh);
-
- mesh_calc_normals(mesh->mvert, mesh->totvert, mesh->mface, mesh->totface, NULL);
-
- DAG_id_flush_update(&mesh->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, mesh);
-}
-
-static void rna_Mesh_add_verts(Mesh *mesh, int len)
-{
- CustomData vdata;
- MVert *mvert;
- int i, totvert;
-
- if(len == 0)
- return;
-
- totvert= mesh->totvert + len;
- CustomData_copy(&mesh->vdata, &vdata, CD_MASK_MESH, CD_DEFAULT, totvert);
- CustomData_copy_data(&mesh->vdata, &vdata, 0, 0, mesh->totvert);
-
- if(!CustomData_has_layer(&vdata, CD_MVERT))
- CustomData_add_layer(&vdata, CD_MVERT, CD_CALLOC, NULL, totvert);
-
- CustomData_free(&mesh->vdata, mesh->totvert);
- mesh->vdata= vdata;
- mesh_update_customdata_pointers(mesh);
-
- /* scan the input list and insert the new vertices */
-
- mvert= &mesh->mvert[mesh->totvert];
- for(i=0; i<len; i++, mvert++)
- mvert->flag |= SELECT;
-
- /* set final vertex list size */
- mesh->totvert= totvert;
-}
-
-static void rna_Mesh_add_edges(Mesh *mesh, int len)
-{
- CustomData edata;
- MEdge *medge;
- int i, totedge;
+#include "BLO_sys_types.h"
- if(len == 0)
- return;
+#include "ED_mesh.h"
- totedge= mesh->totedge+len;
-
- /* update customdata */
- CustomData_copy(&mesh->edata, &edata, CD_MASK_MESH, CD_DEFAULT, totedge);
- CustomData_copy_data(&mesh->edata, &edata, 0, 0, mesh->totedge);
-
- if(!CustomData_has_layer(&edata, CD_MEDGE))
- CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge);
-
- CustomData_free(&mesh->edata, mesh->totedge);
- mesh->edata= edata;
- mesh_update_customdata_pointers(mesh);
-
- /* set default flags */
- medge= &mesh->medge[mesh->totedge];
- for(i=0; i<len; i++, medge++)
- medge->flag= ME_EDGEDRAW|ME_EDGERENDER|SELECT;
-
- mesh->totedge= totedge;
-}
-
-static void rna_Mesh_add_faces(Mesh *mesh, int len)
-{
- CustomData fdata;
- MFace *mface;
- int i, totface;
-
- if(len == 0)
- return;
-
- totface= mesh->totface + len; /* new face count */
-
- /* update customdata */
- CustomData_copy(&mesh->fdata, &fdata, CD_MASK_MESH, CD_DEFAULT, totface);
- CustomData_copy_data(&mesh->fdata, &fdata, 0, 0, mesh->totface);
-
- if(!CustomData_has_layer(&fdata, CD_MFACE))
- CustomData_add_layer(&fdata, CD_MFACE, CD_CALLOC, NULL, totface);
-
- CustomData_free(&mesh->fdata, mesh->totface);
- mesh->fdata= fdata;
- mesh_update_customdata_pointers(mesh);
-
- /* set default flags */
- mface= &mesh->mface[mesh->totface];
- for(i=0; i<len; i++, mface++)
- mface->flag= SELECT;
-
- mesh->totface= totface;
-}
+#ifdef RNA_RUNTIME
-static void rna_Mesh_add_geometry(Mesh *mesh, int verts, int edges, int faces)
+static void rna_Mesh_uv_texture_add(struct Mesh *me, struct bContext *C)
{
- if(verts)
- rna_Mesh_add_verts(mesh, verts);
- if(edges)
- rna_Mesh_add_edges(mesh, edges);
- if(faces)
- rna_Mesh_add_faces(mesh, faces);
+ ED_mesh_uv_texture_add(C, NULL, NULL, me);
}
#else
@@ -218,7 +50,13 @@ void RNA_api_mesh(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "add_geometry", "rna_Mesh_add_geometry");
+ func= RNA_def_function(srna, "transform", "ED_mesh_transform");
+ RNA_def_function_ui_description(func, "Transform mesh vertices by a matrix.");
+ parm= RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix.", 0.0f, 0.0f);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ func= RNA_def_function(srna, "add_geometry", "ED_mesh_geometry_add");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_int(func, "verts", 0, 0, INT_MAX, "Number", "Number of vertices to add.", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_int(func, "edges", 0, 0, INT_MAX, "Number", "Number of edges to add.", 0, INT_MAX);
@@ -226,8 +64,21 @@ void RNA_api_mesh(StructRNA *srna)
parm= RNA_def_int(func, "faces", 0, 0, INT_MAX, "Number", "Number of faces to add.", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "update", "rna_Mesh_update");
+ func= RNA_def_function(srna, "add_uv_texture", "rna_Mesh_uv_texture_add");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ RNA_def_function_ui_description(func, "Add a UV texture layer to Mesh.");
+
+ func= RNA_def_function(srna, "calc_normals", "ED_mesh_calc_normals");
+ RNA_def_function_ui_description(func, "Calculate vertex normals.");
+
+ func= RNA_def_function(srna, "update", "ED_mesh_update");
+ RNA_def_boolean(func, "calc_edges", 0, "Calculate Edges", "Force recalculation of edges.");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+
+ func= RNA_def_function(srna, "add_material", "ED_mesh_material_add");
+ RNA_def_function_ui_description(func, "Add a new material to Mesh.");
+ parm= RNA_def_pointer(func, "material", "Material", "", "Material to add.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 32e34559f1f..09d80e75a49 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -85,6 +85,7 @@ EnumPropertyItem modifier_type_items[] ={
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_library.h"
+#include "BKE_modifier.h"
static void rna_UVProject_projectors_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
@@ -164,9 +165,23 @@ static StructRNA* rna_Modifier_refine(struct PointerRNA *ptr)
}
}
+void rna_Modifier_name_set(PointerRNA *ptr, const char *value)
+{
+ ModifierData *md= ptr->data;
+
+ /* copy the new name into the name slot */
+ BLI_strncpy(md->name, value, sizeof(md->name));
+
+ /* make sure the name is truly unique */
+ if (ptr->id.data) {
+ Object *ob= ptr->id.data;
+ modifier_unique_name(&ob->modifiers, md);
+ }
+}
+
static char *rna_Modifier_path(PointerRNA *ptr)
{
- return BLI_sprintfN("modifiers[%s]", ((ModifierData*)ptr->data)->name); // XXX not unique
+ return BLI_sprintfN("modifiers[\"%s\"]", ((ModifierData*)ptr->data)->name);
}
static void rna_Modifier_update(bContext *C, PointerRNA *ptr)
@@ -930,12 +945,14 @@ static void rna_def_modifier_softbody(BlenderRNA *brna)
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);
+ prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, 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", "");
- prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "PointCache");
RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_point_cache_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Soft Body Point Cache", "");
@@ -1551,15 +1568,18 @@ static void rna_def_modifier_cloth(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "ClothModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_CLOTH);
- prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "sim_parms");
RNA_def_property_ui_text(prop, "Cloth Settings", "");
- prop= RNA_def_property(srna, "collision_settings", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "collision_settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coll_parms");
RNA_def_property_ui_text(prop, "Cloth Collision Settings", "");
- prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Point Cache", "");
}
@@ -1609,16 +1629,11 @@ static void rna_def_modifier_collision(BlenderRNA *brna)
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);
+ prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, 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");
- RNA_def_property_ui_range(prop, 0, 100, 1, 2);
- RNA_def_property_ui_text(prop, "Absorption %", "How much of effector force gets lost during collision with this object (in percent).");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_bevel(BlenderRNA *brna)
@@ -1679,7 +1694,7 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_mode_items[] = {
+ static EnumPropertyItem shrink_type_items[] = {
{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", ""},
@@ -1692,7 +1707,7 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "shrinkType");
- RNA_def_property_enum_items(prop, prop_mode_items);
+ RNA_def_property_enum_items(prop, shrink_type_items);
RNA_def_property_ui_text(prop, "Mode", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -1780,7 +1795,8 @@ static void rna_def_modifier_fluidsim(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "FluidsimModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_FLUIDSIM);
- prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "fss");
RNA_def_property_ui_text(prop, "Settings", "Settings for how this object is used in the fluid simulation.");
}
@@ -1790,7 +1806,7 @@ static void rna_def_modifier_mask(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_mode_items[] = {
+ static EnumPropertyItem modifier_mask_mode_items[] = {
{MOD_MASK_MODE_VGROUP, "VERTEX_GROUP", 0, "Vertex Group", ""},
{MOD_MASK_MODE_ARM, "ARMATURE", 0, "Armature", ""},
{0, NULL, 0, NULL, NULL}};
@@ -1801,7 +1817,7 @@ static void rna_def_modifier_mask(BlenderRNA *brna)
RNA_def_struct_ui_icon(srna, ICON_MOD_MASK);
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_mode_items);
+ RNA_def_property_enum_items(prop, modifier_mask_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -1829,7 +1845,7 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_mode_items[] = {
+ static EnumPropertyItem simple_deform_mode_items[] = {
{MOD_SIMPLEDEFORM_MODE_TWIST, "TWIST", 0, "Twist", ""},
{MOD_SIMPLEDEFORM_MODE_BEND, "BEND", 0, "Bend", ""},
{MOD_SIMPLEDEFORM_MODE_TAPER, "TAPER", 0, "Taper", ""},
@@ -1842,7 +1858,7 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
RNA_def_struct_ui_icon(srna, ICON_MOD_SIMPLEDEFORM);
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_mode_items);
+ RNA_def_property_enum_items(prop, simple_deform_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -1910,6 +1926,7 @@ void RNA_def_modifier(BlenderRNA *brna)
/* strings */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Modifier_name_set");
RNA_def_property_ui_text(prop, "Name", "Modifier name.");
RNA_def_struct_name_property(srna, prop);
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 99f61c7a724..bd018973f5a 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -25,20 +25,96 @@
#include <stdlib.h>
#include <string.h>
+#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
#include "rna_internal.h"
+#include "DNA_material_types.h"
#include "DNA_node_types.h"
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
+#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_image.h"
+static EnumPropertyItem node_blend_type_items[] = {
+ { 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", ""},
+ {16, "SOFT_LIGHT", 0, "Soft Light", ""},
+ {17, "LINEAR_LIGHT", 0, "Linear Light",""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+static EnumPropertyItem node_flip_items[] = {
+ {0, "X", 0, "Flip X", ""},
+ {1, "Y", 0, "Flip Y", ""},
+ {2, "XY", 0, "Flip X & Y", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+static EnumPropertyItem node_math_items[] = {
+ { 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, 0, NULL, NULL}
+};
+
+static EnumPropertyItem node_vec_math_items[] = {
+ {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, 0, NULL, NULL}
+};
+
+static EnumPropertyItem node_filter_items[] = {
+ {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}
+};
+
#ifdef RNA_RUNTIME
+#include "ED_node.h"
+
static StructRNA *rna_Node_refine(struct PointerRNA *ptr)
{
bNode *node = (bNode*)ptr->data;
@@ -66,6 +142,84 @@ static char *rna_Node_path(PointerRNA *ptr)
return BLI_sprintfN("nodes[%d]", index);
}
+static int has_nodetree(bNodeTree *ntree, bNodeTree *lookup)
+{
+ bNode *node;
+
+ if(ntree == lookup)
+ return 1;
+
+ for(node=ntree->nodes.first; node; node=node->next)
+ if(node->type == NODE_GROUP && node->id)
+ if(has_nodetree((bNodeTree*)node->id, lookup))
+ return 1;
+
+ return 0;
+}
+
+static void rna_Node_update(bContext *C, PointerRNA *ptr)
+{
+ Main *bmain= CTX_data_main(C);
+ bNodeTree *ntree= (bNodeTree*)ptr->id.data;
+ bNode *node= (bNode*)ptr->data;
+ Material *ma;
+ Tex *tex;
+ Scene *sce;
+
+ /* look through all datablocks, to support groups */
+ for(ma=bmain->mat.first; ma; ma=ma->id.next)
+ if(ma->nodetree && ma->use_nodes && has_nodetree(ma->nodetree, ntree))
+ ED_node_changed_update(&ma->id, node);
+
+ for(tex=bmain->tex.first; tex; tex=tex->id.next)
+ if(tex->nodetree && tex->use_nodes && has_nodetree(tex->nodetree, ntree))
+ ED_node_changed_update(&tex->id, node);
+
+ for(sce=bmain->scene.first; sce; sce=sce->id.next)
+ if(sce->nodetree && sce->use_nodes && has_nodetree(sce->nodetree, ntree))
+ ED_node_changed_update(&sce->id, node);
+}
+
+static void rna_Node_update_name(bContext *C, PointerRNA *ptr)
+{
+ bNode *node= (bNode*)ptr->data;
+ const char *name;
+
+ if(node->id) {
+ BLI_strncpy(node->name, node->id->name+2, NODE_MAXSTR);
+ }
+ else {
+ switch(node->typeinfo->type) {
+ case SH_NODE_MIX_RGB:
+ case CMP_NODE_MIX_RGB:
+ case TEX_NODE_MIX_RGB:
+ if(RNA_enum_name(node_blend_type_items, node->custom1, &name))
+ BLI_strncpy(node->name, name, NODE_MAXSTR);
+ break;
+ case CMP_NODE_FILTER:
+ if(RNA_enum_name(node_filter_items, node->custom1, &name))
+ BLI_strncpy(node->name, name, NODE_MAXSTR);
+ break;
+ case CMP_NODE_FLIP:
+ if(RNA_enum_name(node_flip_items, node->custom1, &name))
+ BLI_strncpy(node->name, name, NODE_MAXSTR);
+ break;
+ case SH_NODE_MATH:
+ case CMP_NODE_MATH:
+ case TEX_NODE_MATH:
+ if(RNA_enum_name(node_math_items, node->custom1, &name))
+ BLI_strncpy(node->name, name, NODE_MAXSTR);
+ break;
+ case SH_NODE_VECT_MATH:
+ if(RNA_enum_name(node_vec_math_items, node->custom1, &name))
+ BLI_strncpy(node->name, name, NODE_MAXSTR);
+ break;
+ }
+ }
+
+ rna_Node_update(C, ptr);
+}
+
#else
#define MaxNodes 1000
@@ -183,53 +337,22 @@ static void def_math(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem items[] = {
- { 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, 0, NULL, NULL}
- };
-
prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "custom1");
- RNA_def_property_enum_items(prop, items);
+ RNA_def_property_enum_items(prop, node_math_items);
RNA_def_property_ui_text(prop, "Operation", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update_name");
}
static void def_vector_math(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem items[] = {
- {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, 0, NULL, NULL}
- };
-
prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "custom1");
- RNA_def_property_enum_items(prop, items);
+ RNA_def_property_enum_items(prop, node_vec_math_items);
RNA_def_property_ui_text(prop, "Operation", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update_name");
}
static void def_rgb_curve(StructRNA *srna)
@@ -240,6 +363,7 @@ static void def_rgb_curve(StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "storage");
RNA_def_property_struct_type(prop, "CurveMapping");
RNA_def_property_ui_text(prop, "Mapping", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_vector_curve(StructRNA *srna)
@@ -250,6 +374,7 @@ static void def_vector_curve(StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "storage");
RNA_def_property_struct_type(prop, "CurveMapping");
RNA_def_property_ui_text(prop, "Mapping", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_time(StructRNA *srna)
@@ -260,59 +385,44 @@ static void def_time(StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "storage");
RNA_def_property_struct_type(prop, "CurveMapping");
RNA_def_property_ui_text(prop, "Curve", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom1");
RNA_def_property_ui_text(prop, "Start Frame", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "end", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom2");
RNA_def_property_ui_text(prop, "End Frame", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_val_to_rgb(StructRNA *srna)
{
- /*PropertyRNA *prop;*/
+ PropertyRNA *prop;
- /* TODO: uncomment when ColorBand is wrapped *//*
- prop = RNA_def_property(srna, "color_band", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "storage");
- RNA_def_property_struct_type(prop, "ColorBand");
- RNA_def_property_ui_text(prop, "Color Band", "");*/
+ RNA_def_property_struct_type(prop, "ColorRamp");
+ RNA_def_property_ui_text(prop, "Color Ramp", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_mix_rgb(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem blend_type_items[] = {
- { 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);
RNA_def_property_enum_sdna(prop, NULL, "custom1");
- RNA_def_property_enum_items(prop, blend_type_items);
+ RNA_def_property_enum_items(prop, node_blend_type_items);
RNA_def_property_ui_text(prop, "Blend Type", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update_name");
prop = RNA_def_property(srna, "alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom2", 1);
- RNA_def_property_ui_text(prop, "Diffuse", "Include alpha of second input in this operation");
+ RNA_def_property_ui_text(prop, "Alpha", "Include alpha of second input in this operation");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_texture(StructRNA *srna)
@@ -324,10 +434,12 @@ static void def_texture(StructRNA *srna)
RNA_def_property_struct_type(prop, "Texture");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Texture", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update_name");
prop = RNA_def_property(srna, "node_output", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom1");
RNA_def_property_ui_text(prop, "Node Output", "For node-based textures, which output node to use");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
@@ -342,18 +454,22 @@ static void def_sh_material(StructRNA *srna)
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Material", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update_name");
prop = RNA_def_property(srna, "diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", SH_NODE_MAT_DIFF);
RNA_def_property_ui_text(prop, "Diffuse", "Material Node outputs Diffuse");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", SH_NODE_MAT_SPEC);
RNA_def_property_ui_text(prop, "Specular", "Material Node outputs Specular");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "invert_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", SH_NODE_MAT_NEG);
RNA_def_property_ui_text(prop, "Invert Normal", "Material Node uses inverted normal");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_sh_mapping(StructRNA *srna)
@@ -364,6 +480,7 @@ static void def_sh_mapping(StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "storage");
RNA_def_property_struct_type(prop, "TexMapping");
RNA_def_property_ui_text(prop, "Mapping", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_sh_geometry(StructRNA *srna)
@@ -375,10 +492,12 @@ static void def_sh_geometry(StructRNA *srna)
prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvname");
RNA_def_property_ui_text(prop, "UV Layer", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "color_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "colname");
RNA_def_property_ui_text(prop, "Vertex Color Layer", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
@@ -387,10 +506,12 @@ static void def_sh_geometry(StructRNA *srna)
static void def_cmp_alpha_over(StructRNA *srna)
{
PropertyRNA *prop;
-
+
+ // XXX: Tooltip
prop = RNA_def_property(srna, "convert_premul", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", 1);
- RNA_def_property_ui_text(prop, "convert_premul", "TODO: don't know what this is");
+ RNA_def_property_ui_text(prop, "Convert Premul", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
RNA_def_struct_sdna_from(srna, "NodeTwoFloats", "storage");
@@ -398,6 +519,32 @@ static void def_cmp_alpha_over(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Premul", "Mix Factor");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
+}
+
+static void def_cmp_hue_saturation(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "NodeHueSat", "storage");
+
+ prop = RNA_def_property(srna, "hue", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "hue");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Hue", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "sat", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sat");
+ RNA_def_property_range(prop, 0.0f, 2.0f);
+ RNA_def_property_ui_text(prop, "Saturation", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "val", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "val");
+ RNA_def_property_range(prop, 0.0f, 2.0f);
+ RNA_def_property_ui_text(prop, "Value", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_blur(StructRNA *srna)
@@ -422,58 +569,70 @@ static void def_cmp_blur(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "sizex");
RNA_def_property_range(prop, 0, 256);
RNA_def_property_ui_text(prop, "Size X", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "sizey", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sizey");
- RNA_def_property_range(prop, 1, 256);
+ RNA_def_property_range(prop, 0, 256);
RNA_def_property_ui_text(prop, "Size Y", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samples");
RNA_def_property_range(prop, 1, 256);
RNA_def_property_ui_text(prop, "Samples", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "max_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxspeed");
RNA_def_property_range(prop, 1, 1024);
RNA_def_property_ui_text(prop, "Max Speed", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "min_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "minspeed");
RNA_def_property_range(prop, 1, 1024);
RNA_def_property_ui_text(prop, "Min Speed", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "relative", 1);
RNA_def_property_ui_text(prop, "Relative", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Factor", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "factor_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "percentx");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Relative Size X", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "factor_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "percenty");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Relative Size Y", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "filtertype");
RNA_def_property_enum_items(prop, filter_type_items);
RNA_def_property_ui_text(prop, "Filter Type", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "bokeh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bokeh", 1);
RNA_def_property_ui_text(prop, "Bokeh", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "gamma", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gamma", 1);
RNA_def_property_ui_text(prop, "Gamma", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
/*
TODO:
@@ -490,21 +649,11 @@ static void def_cmp_filter(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem type_items[] = {
- {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, "filter_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "custom1");
- RNA_def_property_enum_items(prop, type_items);
+ RNA_def_property_enum_items(prop, node_filter_items);
RNA_def_property_ui_text(prop, "Filter Type", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update_name");
}
static void def_cmp_map_value(StructRNA *srna)
@@ -515,31 +664,41 @@ static void def_cmp_map_value(StructRNA *srna)
prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "loc");
+ RNA_def_property_array(prop, 1);
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Offset", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
+ RNA_def_property_array(prop, 1);
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Size", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "use_min", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MIN);
RNA_def_property_ui_text(prop, "Use Minimum", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "use_max", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MAX);
RNA_def_property_ui_text(prop, "Use Maximum", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
+ RNA_def_property_array(prop, 1);
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
+ RNA_def_property_array(prop, 1);
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_vector_blur(StructRNA *srna)
@@ -551,22 +710,47 @@ static void def_cmp_vector_blur(StructRNA *srna)
prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samples");
RNA_def_property_ui_text(prop, "Samples", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "min_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "minspeed");
RNA_def_property_ui_text(prop, "Min Speed", "Minimum speed for a pixel to be blurred; used to separate background from foreground");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "max_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxspeed");
- RNA_def_property_ui_text(prop, "Min Speed", "Maximum speed, or zero for none");
+ RNA_def_property_ui_text(prop, "Max Speed", "Maximum speed, or zero for none");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_ui_text(prop, "Blur Factor", "Scaling factor for motion vectors; actually 'shutter speed' in frames");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "curved", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "curved", 1);
RNA_def_property_ui_text(prop, "Curved", "Interpolate between frames in a bezier curve, rather than linearly");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
+}
+
+static void def_cmp_levels(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ static EnumPropertyItem space_items[] = {
+ {1, "COMNINED_RGB", 0, "C", "Combined RGB"},
+ {2, "RED", 0, "R", "Red Channel"},
+ {3, "GREEN", 0, "G", "Green Channel"},
+ {4, "BLUE", 0, "B", "Blue Channel"},
+ {5, "LUMINANCE", 0, "L", "Luminance Channel"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ prop = RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "custom1");
+ RNA_def_property_enum_items(prop, space_items);
+ RNA_def_property_ui_text(prop, "Color Space", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_image(StructRNA *srna)
@@ -586,6 +770,7 @@ static void def_cmp_image(StructRNA *srna)
RNA_def_property_struct_type(prop, "Image");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Image", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update_name");
RNA_def_struct_sdna_from(srna, "ImageUser", "storage");
@@ -595,24 +780,29 @@ static void def_cmp_image(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "frames");
RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Frames", "Number of images used in animation");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sfra");
RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start Frame", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "offset", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "offset");
- RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
+ RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Offset", "Offsets the number of the frame to use in the animation");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "cyclic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cycl", 1);
RNA_def_property_ui_text(prop, "Cyclic", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "auto_refresh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_ANIM_ALWAYS);
RNA_def_property_ui_text(prop, "Auto-Refresh", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
/* } */
@@ -622,6 +812,7 @@ static void def_cmp_image(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "layer");
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Layer", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
/* } */
@@ -638,16 +829,19 @@ static void def_cmp_render_layers(StructRNA *srna)
RNA_def_property_struct_type(prop, "Scene");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Scene", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update_name");
/* TODO: layers in menu */
prop = RNA_def_property(srna, "layer", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom1");
RNA_def_property_ui_text(prop, "Layer", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
/* TODO: comments indicate this might be a hack */
prop = RNA_def_property(srna, "re_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom2", 1);
RNA_def_property_ui_text(prop, "Re-render", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_output_file(StructRNA *srna)
@@ -709,13 +903,15 @@ static void def_cmp_output_file(StructRNA *srna)
prop = RNA_def_property(srna, "start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sfra");
- RNA_def_property_range(prop, 1, MAXFRAMEF);
+ RNA_def_property_range(prop, MINFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start Frame", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "end", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "efra");
- RNA_def_property_range(prop, 1, MAXFRAMEF);
+ RNA_def_property_range(prop, MINFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "End Frame", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_dilate_erode(StructRNA *srna)
@@ -724,7 +920,9 @@ static void def_cmp_dilate_erode(StructRNA *srna)
prop = RNA_def_property(srna, "distance", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom2");
+ RNA_def_property_range(prop, -100, 100);
RNA_def_property_ui_text(prop, "Distance", "Distance to grow/shrink (number of iterations)");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_scale(StructRNA *srna)
@@ -742,6 +940,7 @@ static void def_cmp_scale(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, space_items);
RNA_def_property_ui_text(prop, "Space", "Coordinate space to scale relative to");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_diff_matte(StructRNA *srna)
@@ -756,11 +955,13 @@ static void def_cmp_diff_matte(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "t1");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed.");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed.");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_color_matte(StructRNA *srna)
@@ -775,16 +976,19 @@ static void def_cmp_color_matte(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "t1");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "H", "Hue tolerance for colors to be considered a keying color");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "s", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "S", "Saturation Tolerance for the color");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "v", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t3");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "V", "Value Tolerance for the color");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_distance_matte(StructRNA *srna)
@@ -799,11 +1003,13 @@ static void def_cmp_distance_matte(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "t1");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed.");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed.");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_color_spill(StructRNA *srna)
@@ -811,9 +1017,9 @@ static void def_cmp_color_spill(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem channel_items[] = {
- {1, "R", 0, "Red", ""},
- {2, "G", 0, "Green", ""},
- {3, "B", 0, "Blue", ""},
+ {1, "R", 0, "R", "Red Spill Suppression"},
+ {2, "G", 0, "G", "Green Spill Suppression"},
+ {3, "B", 0, "B", "Blue Spill Suppression"},
{0, NULL, 0, NULL, NULL}
};
@@ -821,6 +1027,7 @@ static void def_cmp_color_spill(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, channel_items);
RNA_def_property_ui_text(prop, "Channel", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
@@ -828,6 +1035,7 @@ static void def_cmp_color_spill(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "t1");
RNA_def_property_range(prop, 0.0f, 0.5f);
RNA_def_property_ui_text(prop, "Amount", "How much the selected channel is affected by");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_chroma_matte(StructRNA *srna)
@@ -840,26 +1048,31 @@ static void def_cmp_chroma_matte(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "t1");
RNA_def_property_range(prop, 1.0f, 80.0f);
RNA_def_property_ui_text(prop, "Acceptance", "Tolerance for a color to be considered a keying color");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "cutoff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_range(prop, 0.0f, 30.0f);
RNA_def_property_ui_text(prop, "Cutoff", "Tolerance below which colors will be considered as exact matches");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fsize");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Lift", "Alpha lift");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fstrength");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gain", "Alpha gain");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "shadow_adjust", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t3");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Adjust", "Adjusts the brightness of any shadows captured");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
/* TODO:
if(c->t2 > c->t1)
@@ -883,10 +1096,12 @@ static void def_cmp_channel_matte(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, color_space_items);
RNA_def_property_ui_text(prop, "Color Space", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
/* TODO: channel must be 1, 2 or 3 */
prop = RNA_def_property(srna, "channel", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom2");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
RNA_def_property_ui_text(prop, "Channel", "");
RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
@@ -895,11 +1110,13 @@ static void def_cmp_channel_matte(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "t1");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "High", "Values higher than this setting are 100% opaque");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "low", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Low", "Values lower than this setting are 100% keyed");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
/* TODO:
if(c->t2 > c->t1)
@@ -911,17 +1128,11 @@ static void def_cmp_flip(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem axis_items[] = {
- {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);
RNA_def_property_enum_sdna(prop, NULL, "custom1");
- RNA_def_property_enum_items(prop, axis_items);
+ RNA_def_property_enum_items(prop, node_flip_items);
RNA_def_property_ui_text(prop, "Axis", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update_name");
}
static void def_cmp_splitviewer(StructRNA *srna)
@@ -938,12 +1149,13 @@ static void def_cmp_splitviewer(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom2");
RNA_def_property_enum_items(prop, axis_items);
RNA_def_property_ui_text(prop, "Axis", "");
-
- /* TODO: percentage */
- prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_PERCENTAGE);
- RNA_def_property_float_sdna(prop, NULL, "custom1");
- RNA_def_property_range(prop, 0.0f, 100.0f);
+ RNA_def_property_update(prop, 0, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "factor", PROP_INT, PROP_FACTOR);
+ RNA_def_property_int_sdna(prop, NULL, "custom1");
+ RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Factor", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_id_mask(StructRNA *srna)
@@ -954,17 +1166,18 @@ static void def_cmp_id_mask(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "custom1");
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Index", "Pass index number to convert to alpha");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_map_uv(StructRNA *srna)
{
PropertyRNA *prop;
-
- /* TODO: percentage */
- prop = RNA_def_property(srna, "alpha", PROP_INT, PROP_PERCENTAGE);
+
+ prop = RNA_def_property(srna, "alpha", PROP_INT, PROP_FACTOR);
RNA_def_property_int_sdna(prop, NULL, "custom1");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Alpha", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_defocus(StructRNA *srna)
@@ -988,50 +1201,60 @@ static void def_cmp_defocus(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "bktype");
RNA_def_property_enum_items(prop, bokeh_items);
RNA_def_property_ui_text(prop, "Bokeh Type", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
/* TODO: angle in degrees */
prop = RNA_def_property(srna, "angle", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rotation");
RNA_def_property_range(prop, 0, 90);
RNA_def_property_ui_text(prop, "Angle", "Bokeh shape rotation offset in degrees");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "gamma_correction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gamco", 1);
RNA_def_property_ui_text(prop, "Gamma Correction", "Enable gamma correction before and after main process");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
/* TODO */
prop = RNA_def_property(srna, "f_stop", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fstop");
RNA_def_property_range(prop, 0.0f, 128.0f);
RNA_def_property_ui_text(prop, "fStop", "Amount of focal blur, 128=infinity=perfect focus, half the value doubles the blur radius");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "max_blur", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxblur");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Max Blur", "blur limit, maximum CoC radius, 0=no limit");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bthresh");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Threshold", "CoC radius threshold, prevents background bleed on in-focus midground, 0=off");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "preview", 1);
RNA_def_property_ui_text(prop, "Preview", "Enable sampling mode, useful for preview when using low samplecounts");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samples");
RNA_def_property_range(prop, 16, 256);
RNA_def_property_ui_text(prop, "Samples", "Number of samples (16=grainy, higher=less noise)");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "use_zbuffer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "no_zbuf", 1);
RNA_def_property_ui_text(prop, "Use Z-Buffer", "Disable when using an image as input instead of actual zbuffer (auto enabled if node not image based, eg. time node)");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "z_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scale");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Z-Scale", "Scales the Z input when not using a zbuffer, controls maximum blur designated by the color white or input value 1");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_luma_matte(StructRNA *srna)
@@ -1044,11 +1267,13 @@ static void def_cmp_luma_matte(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "t1");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "High", "Values higher than this setting are 100% opaque");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "low", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Low", "Values lower than this setting are 100% keyed");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
/* TODO: keep low less than high */
@@ -1061,10 +1286,12 @@ static void def_cmp_invert(StructRNA *srna)
prop = RNA_def_property(srna, "rgb", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", CMP_CHAN_RGB);
RNA_def_property_ui_text(prop, "RGB", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", CMP_CHAN_A);
RNA_def_property_ui_text(prop, "Alpha", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_crop(StructRNA *srna)
@@ -1074,6 +1301,7 @@ static void def_cmp_crop(StructRNA *srna)
prop = RNA_def_property(srna, "crop_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", 1);
RNA_def_property_ui_text(prop, "Crop Image Size", "Whether to crop the size of the input image");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
RNA_def_struct_sdna_from(srna, "NodeTwoXYs", "storage");
@@ -1081,21 +1309,25 @@ static void def_cmp_crop(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "x1");
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "X1", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "x2", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "x2");
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "X2", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "y1", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "y1");
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Y1", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "y2", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "y2");
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Y2", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_dblur(StructRNA *srna)
@@ -1106,42 +1338,50 @@ static void def_cmp_dblur(StructRNA *srna)
prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "iter");
- RNA_def_property_range(prop, 1, 128);
+ RNA_def_property_range(prop, 1, 32);
RNA_def_property_ui_text(prop, "Iterations", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "wrap", 1);
RNA_def_property_ui_text(prop, "Wrap", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "center_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "center_x");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Center X", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "center_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "center_y");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Center Y", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "distance");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Distance", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "angle");
RNA_def_property_range(prop, 0.0f, 360.0f);
RNA_def_property_ui_text(prop, "Angle", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "spin", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spin");
RNA_def_property_range(prop, -360.0f, 360.0f);
RNA_def_property_ui_text(prop, "Spin", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zoom");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Zoom", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_bilateral_blur(StructRNA *srna)
@@ -1154,16 +1394,19 @@ static void def_cmp_bilateral_blur(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "iter");
RNA_def_property_range(prop, 1, 128);
RNA_def_property_ui_text(prop, "Iterations", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "sigma_color", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sigma_color");
RNA_def_property_range(prop, 0.01f, 3.0f);
RNA_def_property_ui_text(prop, "Color Sigma", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "sigma_space", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sigma_space");
RNA_def_property_range(prop, 0.01f, 30.0f);
RNA_def_property_ui_text(prop, "Space Sigma", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_premul_key(StructRNA *srna)
@@ -1180,6 +1423,7 @@ static void def_cmp_premul_key(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, type_items);
RNA_def_property_ui_text(prop, "Mapping", "Conversion between premultiplied alpha and key alpha");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
@@ -1195,12 +1439,12 @@ static void def_cmp_glare(StructRNA *srna)
{0, NULL, 0, NULL, NULL}
};
- /*static EnumPropertyItem quality_items[] = {
+ static EnumPropertyItem quality_items[] = {
{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");
@@ -1208,55 +1452,66 @@ static void def_cmp_glare(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, type_items);
RNA_def_property_ui_text(prop, "Glare Type", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "quality", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "quality");
- RNA_def_property_enum_items(prop, type_items);
+ RNA_def_property_enum_items(prop, quality_items);
RNA_def_property_ui_text(prop, "Quality", "If not set to high quality, the effect will be applied to a low-res copy of the source image");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "iter");
RNA_def_property_range(prop, 2, 5);
RNA_def_property_ui_text(prop, "Iterations", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "color_modulation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colmod");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Color Modulation", "");
+ RNA_def_property_ui_text(prop, "Color Modulation", "Amount of Color Modulation, modulates colors of streaks and ghosts for a spectral dispersion effect");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "mix", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mix");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Mix", "-1 is original image only, 0 is exact 50/50 mix, 1 is processed image only");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "threshold");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Threshold", "The glare filter will only be applied to pixels brighter than this value");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "streaks", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "angle");
RNA_def_property_range(prop, 2, 16);
RNA_def_property_ui_text(prop, "Streaks", "Total number of streaks");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "angle_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "angle_ofs");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "Angle Offset", "Streak angle offset in degrees");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "fade", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fade");
RNA_def_property_range(prop, 0.75f, 1.0f);
RNA_def_property_ui_text(prop, "Fade", "Streak fade-out factor");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "rotate_45", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "angle", 1);
RNA_def_property_ui_text(prop, "Rotate 45", "Simple star filter: add 45 degree rotation offset");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "size");
RNA_def_property_range(prop, 6, 9);
RNA_def_property_ui_text(prop, "Size", "Glow/glare size (not actual size; relative to initial size of bright area of pixels)");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
/* TODO */
}
@@ -1277,45 +1532,49 @@ static void def_cmp_tonemap(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, type_items);
RNA_def_property_ui_text(prop, "Tonemap Type", "");
-
- /* TODO: if type==0 { */
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "key", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "key");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Key", "The value the average luminance is mapped to");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "offset");
RNA_def_property_range(prop, 0.001f, 10.0f);
RNA_def_property_ui_text(prop, "Offset", "Normally always 1, but can be used as an extra control to alter the brightness curve");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gamma");
RNA_def_property_range(prop, 0.001f, 3.0f);
RNA_def_property_ui_text(prop, "Gamma", "If not used, set to 1");
-
- /* TODO: } else { */
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f");
RNA_def_property_range(prop, -8.0f, 8.0f);
RNA_def_property_ui_text(prop, "Intensity", "If less than zero, darkens image; otherwise, makes it brighter");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "m");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Contrast", "Set to 0 to use estimate from input image");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "adaptation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "a");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Adaptation", "If 0, global; if 1, based on pixel intensity");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "c");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Color Correction", "If 0, same for all channels; if 1, each independent");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_cmp_lensdist(StructRNA *srna)
@@ -1327,16 +1586,17 @@ static void def_cmp_lensdist(StructRNA *srna)
prop = RNA_def_property(srna, "projector", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "proj", 1);
RNA_def_property_ui_text(prop, "Projector", "Enable/disable projector mode. Effect is applied in horizontal direction only.");
-
- /* TODO: if proj mode is off { */
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "jitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "jit", 1);
RNA_def_property_ui_text(prop, "Jitter", "Enable/disable jittering; faster, but also noisier");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "fit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "fit", 1);
RNA_def_property_ui_text(prop, "Fit", "For positive distortion factor only: scale image such that black areas are not visible");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
@@ -1352,6 +1612,7 @@ static void def_tex_output(StructRNA *srna)
prop = RNA_def_property(srna, "output_name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Output Name", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_tex_image(StructRNA *srna)
@@ -1362,6 +1623,7 @@ static void def_tex_image(StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "storage");
RNA_def_property_struct_type(prop, "ImageUser");
RNA_def_property_ui_text(prop, "Settings", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
static void def_tex_bricks(StructRNA *srna)
@@ -1372,21 +1634,25 @@ static void def_tex_bricks(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "custom3");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Offset Amount", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "offset_frequency", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom1");
RNA_def_property_range(prop, 2, 99);
RNA_def_property_ui_text(prop, "Offset Frequency", "Offset every N rows");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "squash", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "custom4");
RNA_def_property_range(prop, 0.0f, 99.0f);
RNA_def_property_ui_text(prop, "Squash Amount", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "squash_frequency", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom2");
RNA_def_property_range(prop, 2, 99);
RNA_def_property_ui_text(prop, "Squash Frequency", "Squash every N rows");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
}
/* -------------------------------------------------------------------------- */
@@ -1478,6 +1744,8 @@ static void rna_def_nodetree(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Node Tree", "Node tree consisting of linked nodes used for materials, textures and compositing.");
RNA_def_struct_sdna(srna, "bNodeTree");
RNA_def_struct_ui_icon(srna, ICON_NODE);
+
+ rna_def_animdata_common(srna);
prop = RNA_def_property(srna, "nodes", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "nodes", NULL);
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index be4f131a6d6..69424649b3b 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -64,7 +64,7 @@ DefNode( CompositorNode, CMP_NODE_VECBLUR, def_cmp_vector_blur, "VECBL
DefNode( CompositorNode, CMP_NODE_SEPRGBA, 0, "SEPRGBA", SepRGBA, "Separate RGBA", "" )
DefNode( CompositorNode, CMP_NODE_SEPHSVA, 0, "SEPHSVA", SepHSVA, "Separate HSVA", "" )
DefNode( CompositorNode, CMP_NODE_SETALPHA, 0, "SETALPHA", SetAlpha, "Set Alpha", "" )
-DefNode( CompositorNode, CMP_NODE_HUE_SAT, 0, "HUE_SAT", HueSat, "Hue/Saturation", "" )
+DefNode( CompositorNode, CMP_NODE_HUE_SAT, def_cmp_hue_saturation, "HUE_SAT", HueSat, "Hue/Saturation", "" )
DefNode( CompositorNode, CMP_NODE_IMAGE, def_cmp_image, "IMAGE", Image, "Image", "" )
DefNode( CompositorNode, CMP_NODE_R_LAYERS, def_cmp_render_layers, "R_LAYERS", RLayers, "Render Layers", "" )
DefNode( CompositorNode, CMP_NODE_COMPOSITE, 0, "COMPOSITE", Composite, "Composite", "" )
@@ -104,7 +104,7 @@ DefNode( CompositorNode, CMP_NODE_PREMULKEY, def_cmp_premul_key, "PREMU
DefNode( CompositorNode, CMP_NODE_GLARE, def_cmp_glare, "GLARE", Glare, "Glare", "" )
DefNode( CompositorNode, CMP_NODE_TONEMAP, def_cmp_tonemap, "TONEMAP", Tonemap, "Tonemap", "" )
DefNode( CompositorNode, CMP_NODE_LENSDIST, def_cmp_lensdist, "LENSDIST", Lensdist, "Lensdist", "" )
-DefNode( CompositorNode, CMP_NODE_VIEW_LEVELS, 0, "LEVELS", Levels, "Levels", "" )
+DefNode( CompositorNode, CMP_NODE_VIEW_LEVELS, def_cmp_levels, "LEVELS", Levels, "Levels", "" )
DefNode( CompositorNode, CMP_NODE_COLOR_MATTE, def_cmp_color_matte, "COLOR_MATTE", ColorMatte, "Color Matte", "" )
DefNode( CompositorNode, CMP_NODE_DIST_MATTE, def_cmp_distance_matte, "DISTANCE_MATTE", DistanceMatte, "Distance Matte", "" )
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 3d43dfdfc2c..8dd8d591088 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -31,6 +31,7 @@
#include "rna_internal.h"
+#include "DNA_action_types.h"
#include "DNA_customdata_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
@@ -39,6 +40,8 @@
#include "DNA_property_types.h"
#include "DNA_scene_types.h"
+#include "BKE_tessmesh.h"
+
#include "WM_api.h"
#include "WM_types.h"
@@ -82,6 +85,8 @@ EnumPropertyItem object_type_items[] = {
#ifdef RNA_RUNTIME
+#include "BLI_arithb.h"
+
#include "DNA_key_types.h"
#include "BKE_armature.h"
@@ -96,13 +101,22 @@ EnumPropertyItem object_type_items[] = {
#include "BKE_particle.h"
#include "BKE_scene.h"
+#include "BLI_editVert.h" /* for EditMesh->mat_nr */
+
#include "ED_object.h"
+#include "ED_particle.h"
void rna_Object_update(bContext *C, PointerRNA *ptr)
{
DAG_id_flush_update(ptr->id.data, OB_RECALC_OB);
}
+void rna_Object_matrix_update(bContext *C, PointerRNA *ptr)
+{
+ ED_object_apply_obmat(ptr->id.data);
+ rna_Object_update(C, ptr);
+}
+
void rna_Object_update_data(bContext *C, PointerRNA *ptr)
{
DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
@@ -115,6 +129,14 @@ static void rna_Object_dependency_update(bContext *C, PointerRNA *ptr)
DAG_scene_sort(CTX_data_scene(C));
}
+/* when changing the selection flag the scene needs updating */
+static void rna_Object_select_update(bContext *C, PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ short mode = ob->flag & SELECT ? BA_SELECT : BA_DESELECT;
+ ED_base_object_select(object_in_scene(ob, CTX_data_scene(C)), mode);
+}
+
static void rna_Object_layer_update(bContext *C, PointerRNA *ptr)
{
Object *ob= (Object*)ptr->id.data;
@@ -203,24 +225,12 @@ static void rna_Object_parent_type_set(PointerRNA *ptr, int value)
ED_object_parent(ob, ob->parent, value, ob->parsubstr);
}
-static void rna_Object_track_set(PointerRNA *ptr, PointerRNA value)
-{
- Object *ob= (Object*)ptr->data;
-
- if(ob != value.data)
- ob->track= value.data;
-}
-
static EnumPropertyItem *rna_Object_parent_type_itemf(bContext *C, PointerRNA *ptr, int *free)
{
Object *ob= (Object*)ptr->data;
EnumPropertyItem *item= NULL;
int totitem= 0;
- if(C==NULL) {
- return parent_type_items;
- }
-
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PAROBJECT);
if(ob->parent) {
@@ -241,7 +251,6 @@ static EnumPropertyItem *rna_Object_parent_type_itemf(bContext *C, PointerRNA *p
}
RNA_enum_item_end(&item, &totitem);
-
*free= 1;
return item;
@@ -395,6 +404,13 @@ static void rna_Object_active_material_index_set(PointerRNA *ptr, int value)
{
Object *ob= (Object*)ptr->id.data;
ob->actcol= value+1;
+
+ if((ob->mode & OB_MODE_EDIT) && ob->type==OB_MESH) {
+ Mesh *me= ob->data;
+
+ if(me->edit_btmesh)
+ me->edit_btmesh->mat_nr= value;
+ }
}
static void rna_Object_active_material_index_range(PointerRNA *ptr, int *min, int *max)
@@ -434,12 +450,79 @@ static int rna_Object_active_particle_system_index_get(PointerRNA *ptr)
return psys_get_current_num(ob);
}
-static void rna_Object_active_particle_system_index_set(struct PointerRNA *ptr, int value)
+static void rna_Object_active_particle_system_index_set(PointerRNA *ptr, int value)
{
Object *ob= (Object*)ptr->id.data;
psys_set_current_num(ob, value);
}
+static void rna_Object_particle_update(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= (Object*)ptr->id.data;
+
+ PE_current_changed(scene, ob);
+}
+
+/* rotation - axis-angle */
+static void rna_Object_rotation_axis_angle_get(PointerRNA *ptr, float *value)
+{
+ Object *ob= ptr->data;
+
+ /* for now, assume that rotation mode is axis-angle */
+ value[0]= ob->rotAngle;
+ VecCopyf(&value[1], ob->rotAxis);
+}
+
+/* rotation - axis-angle */
+static void rna_Object_rotation_axis_angle_set(PointerRNA *ptr, const float *value)
+{
+ Object *ob= ptr->data;
+
+ /* for now, assume that rotation mode is axis-angle */
+ ob->rotAngle= value[0];
+ VecCopyf(ob->rotAxis, (float *)&value[1]);
+
+ // TODO: validate axis?
+}
+
+static void rna_Object_rotation_mode_set(PointerRNA *ptr, int value)
+{
+ Object *ob= ptr->data;
+
+ /* use API Method for conversions... */
+ BKE_rotMode_change_values(ob->quat, ob->rot, ob->rotAxis, &ob->rotAngle, ob->rotmode, (short)value);
+
+ /* finally, set the new rotation type */
+ ob->rotmode= value;
+}
+
+/* not called directly */
+static void rna_Object_scale_linked_set(Object *ob, float value, int axis)
+{
+ if(ob->size[axis]==0.0f || value==0.0f) {
+ ob->size[0]= ob->size[1]= ob->size[2]= value;
+ }
+ else {
+ VecMulf(ob->size, value / ob->size[axis]);
+ }
+}
+
+static void rna_Object_scale_x_linked_set(PointerRNA *ptr, float value)
+{
+ rna_Object_scale_linked_set(ptr->data, value, 0);
+}
+static void rna_Object_scale_y_linked_set(PointerRNA *ptr, float value)
+{
+ rna_Object_scale_linked_set(ptr->data, value, 1);
+}
+static void rna_Object_scale_z_linked_set(PointerRNA *ptr, float value)
+{
+ rna_Object_scale_linked_set(ptr->data, value, 2);
+}
+
+
+
static PointerRNA rna_MaterialSlot_material_get(PointerRNA *ptr)
{
Object *ob= (Object*)ptr->id.data;
@@ -661,7 +744,6 @@ 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)
@@ -685,8 +767,6 @@ static void rna_Object_shape_key_lock_set(PointerRNA *ptr, int value)
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)
@@ -695,7 +775,7 @@ static PointerRNA rna_Object_field_get(PointerRNA *ptr)
/* weak */
if(!ob->pd)
- ob->pd= object_add_collision_fields();
+ ob->pd= object_add_collision_fields(0);
return rna_pointer_inherit_refine(ptr, &RNA_FieldSettings, ob->pd);
}
@@ -706,7 +786,7 @@ static PointerRNA rna_Object_collision_get(PointerRNA *ptr)
/* weak */
if(!ob->pd)
- ob->pd= object_add_collision_fields();
+ ob->pd= object_add_collision_fields(0);
return rna_pointer_inherit_refine(ptr, &RNA_CollisionSettings, ob->pd);
}
@@ -1045,6 +1125,18 @@ static void rna_def_object(BlenderRNA *brna)
{OB_DUPLIFACES, "FACES", 0, "Faces", "Duplicate child objects on all faces."},
{OB_DUPLIGROUP, "GROUP", 0, "Group", "Enable group instancing."},
{0, NULL, 0, NULL, NULL}};
+
+ // XXX: this RNA enum define is currently duplicated for objects, since there is some text here which is not applicable
+ static EnumPropertyItem prop_rotmode_items[] = {
+ {ROT_MODE_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock."},
+ {ROT_MODE_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order. Prone to Gimbal Lock. (Default)"},
+ {ROT_MODE_XZY, "XZY", 0, "XZY Euler", "XZY Rotation Order. Prone to Gimbal Lock"},
+ {ROT_MODE_YXZ, "YXZ", 0, "YXZ Euler", "YXZ Rotation Order. Prone to Gimbal Lock"},
+ {ROT_MODE_YZX, "YZX", 0, "YZX Euler", "YZX Rotation Order. Prone to Gimbal Lock"},
+ {ROT_MODE_ZXY, "ZXY", 0, "ZXY Euler", "ZXY Rotation Order. Prone to Gimbal Lock"},
+ {ROT_MODE_ZYX, "ZYX", 0, "ZYX Euler", "ZYX Rotation Order. Prone to Gimbal Lock"},
+ {ROT_MODE_AXISANGLE, "AXIS_ANGLE", 0, "Axis Angle", "Axis Angle (W+XYZ). Defines a rotation around some axis defined by 3D-Vector."},
+ {0, NULL, 0, NULL, NULL}};
int matrix_dimsize[]= {4, 4};
@@ -1082,12 +1174,10 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Selected", "Object selection state.");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_select_update");
/* parent and track */
-
prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_parent_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1115,8 +1205,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
prop= RNA_def_property(srna, "track", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_track_set", NULL);
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_ui_text(prop, "Track", "Object being tracked to define the rotation (Old Track).");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
@@ -1133,7 +1222,6 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
/* proxy */
-
prop= RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Proxy", "Library object this proxy object controls.");
@@ -1161,57 +1249,124 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_SHADING, NULL);
/* transform */
-
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "Location of the object.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
-
- prop= RNA_def_property(srna, "delta_location", PROP_FLOAT, PROP_TRANSLATION);
- RNA_def_property_float_sdna(prop, NULL, "dloc");
- RNA_def_property_ui_text(prop, "Delta Location", "Extra added translation to object location.");
+
+ prop= RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
+ RNA_def_property_float_sdna(prop, NULL, "quat");
+ RNA_def_property_ui_text(prop, "Quaternion Rotation", "Rotation in Quaternions.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
+
+ /* XXX: for axis-angle, it would have been nice to have 2 separate fields for UI purposes, but
+ * having a single one is better for Keyframing and other property-management situations...
+ */
+ prop= RNA_def_property(srna, "rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE);
+ RNA_def_property_array(prop, 4); // TODO: maybe we'll need to define the 'default value' getter too...
+ RNA_def_property_float_funcs(prop, "rna_Object_rotation_axis_angle_get", "rna_Object_rotation_axis_angle_set", NULL);
+ RNA_def_property_ui_text(prop, "Axis-Angle Rotation", "Angle of Rotation for Axis-Angle rotation representation.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_EULER);
+ prop= RNA_def_property(srna, "rotation_euler", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "rot");
- RNA_def_property_ui_text(prop, "Rotation", "Rotation of the object.");
+ RNA_def_property_ui_text(prop, "Euler Rotation", "Rotation in Eulers.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
-
- prop= RNA_def_property(srna, "delta_rotation", PROP_FLOAT, PROP_EULER);
- RNA_def_property_float_sdna(prop, NULL, "drot");
- RNA_def_property_ui_text(prop, "Delta Rotation", "Extra added rotation to the rotation of the object.");
+
+ prop= RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "rotmode");
+ RNA_def_property_enum_items(prop, prop_rotmode_items); // XXX move to using a single define of this someday
+ RNA_def_property_enum_funcs(prop, NULL, "rna_Object_rotation_mode_set", NULL);
+ RNA_def_property_ui_text(prop, "Rotation Mode", "");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Scale", "Scaling of the object.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
+
+ /* linked scale for the transform panel */
+ prop= RNA_def_property(srna, "scale_linked_x", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "size[0]");
+ RNA_def_property_float_funcs(prop, NULL, "rna_Object_scale_x_linked_set", NULL);
+ RNA_def_property_ui_text(prop, "Scale X", "Scaling of the objects X axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
+
+ prop= RNA_def_property(srna, "scale_linked_y", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "size[1]");
+ RNA_def_property_float_funcs(prop, NULL, "rna_Object_scale_y_linked_set", NULL);
+ RNA_def_property_ui_text(prop, "Scale Y", "Scaling of the objects X axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
+
+ prop= RNA_def_property(srna, "scale_linked_z", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "size[2]");
+ RNA_def_property_float_funcs(prop, NULL, "rna_Object_scale_z_linked_set", NULL);
+ RNA_def_property_ui_text(prop, "Scale Z", "Scaling of the objects Z axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
+
+ /* delta transforms */
+ prop= RNA_def_property(srna, "delta_location", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "dloc");
+ RNA_def_property_ui_text(prop, "Delta Location", "Extra added translation to object location.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
+
+ prop= RNA_def_property(srna, "delta_rotation_euler", PROP_FLOAT, PROP_EULER);
+ RNA_def_property_float_sdna(prop, NULL, "drot");
+ RNA_def_property_ui_text(prop, "Delta Rotation (Euler)", "Extra added rotation to the rotation of the object (when using Euler rotations).");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
+
+ prop= RNA_def_property(srna, "delta_rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
+ RNA_def_property_float_sdna(prop, NULL, "dquat");
+ RNA_def_property_ui_text(prop, "Delta Rotation (Quaternion)", "Extra added rotation to the rotation of the object (when using Quaternion rotations).");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
+
+#if 0 // XXX not supported well yet...
+ prop= RNA_def_property(srna, "delta_rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE);
+ RNA_def_property_float_sdna(prop, NULL, "dquat"); // FIXME: this is not a single field any more! (drotAxis and drotAngle)
+ RNA_def_property_ui_text(prop, "Delta Rotation (Axis Angle)", "Extra added rotation to the rotation of the object (when using Axis-Angle rotations).");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
+#endif
+
prop= RNA_def_property(srna, "delta_scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "dsize");
RNA_def_property_ui_text(prop, "Delta Scale", "Extra added scaling to the scale of the object.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
-
+
+ /* transform locks */
prop= RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
+
+ // XXX this is sub-optimal - it really should be included above, but due to technical reasons we can't do this!
+ prop= RNA_def_property(srna, "lock_rotation_w", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTW);
+ RNA_def_property_ui_text(prop, "Lock Rotation (4D Angle)", "Lock editing of 'angle' component of four-component rotations in the interface.");
+ // XXX this needs a better name
+ prop= RNA_def_property(srna, "lock_rotations_4d", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROT4D);
+ RNA_def_property_ui_text(prop, "Lock Rotations (4D)", "Lock editing of four component rotations by components (instead of as Eulers).");
prop= RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
/* matrix */
prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "obmat");
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
RNA_def_property_ui_text(prop, "Matrix", "Transformation matrix.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_matrix_update");
/* collections */
prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
@@ -1223,14 +1378,13 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the geometric data of the Object.");
/* game engine */
-
- prop= RNA_def_property(srna, "game", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "game", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "GameObjectSettings");
RNA_def_property_pointer_funcs(prop, "rna_Object_game_settings_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Game Settings", "Game engine related settings for the object.");
/* vertex groups */
-
prop= RNA_def_property(srna, "vertex_groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "defbase", NULL);
RNA_def_property_struct_type(prop, "VertexGroup");
@@ -1249,7 +1403,6 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Object_update_data");
/* empty */
-
prop= RNA_def_property(srna, "empty_draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "empty_drawtype");
RNA_def_property_enum_items(prop, empty_drawtype_items);
@@ -1263,7 +1416,6 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* render */
-
prop= RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "index");
RNA_def_property_ui_text(prop, "Pass Index", "Index # for the IndexOB render pass.");
@@ -1274,7 +1426,6 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* physics */
-
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");
@@ -1305,10 +1456,9 @@ static void rna_def_object(BlenderRNA *brna)
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.");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_particle_update");
/* restrict */
-
prop= RNA_def_property(srna, "restrict_view", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_VIEW);
RNA_def_property_ui_text(prop, "Restrict View", "Restrict visibility in the viewport.");
@@ -1325,20 +1475,9 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* anim */
-
rna_def_animdata_common(srna);
- prop= RNA_def_property(srna, "draw_keys", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_DRAWKEY);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // update ipo flag indirect
- RNA_def_property_ui_text(prop, "Draw Keys", "Draw object as key positions.");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
-
- prop= RNA_def_property(srna, "draw_keys_selected", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_DRAWKEYSEL);
- RNA_def_property_ui_text(prop, "Draw Keys Selected", "Limit the drawing of object keys to selected.");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
-
+ /* duplicates */
prop= RNA_def_property(srna, "track_override_parent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_POWERTRACK);
RNA_def_property_ui_text(prop, "Track Override Parent", "Override rotation from parenting.");
@@ -1384,30 +1523,36 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "dupli_frames_start", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupsta");
- RNA_def_property_range(prop, 1, 32767);
+ RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Dupli Frames Start", "Start frame for DupliFrames.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_frames_end", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupend");
- RNA_def_property_range(prop, 1, 32767);
+ RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Dupli Frames End", "End frame for DupliFrames.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_frames_on", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupon");
- RNA_def_property_range(prop, 1, 1500);
+ RNA_def_property_range(prop, MINFRAME, MAXFRAME);
+ RNA_def_property_ui_range(prop, 1, 1500, 1, 0);
RNA_def_property_ui_text(prop, "Dupli Frames On", "Number of frames to use between DupOff frames.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_frames_off", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupoff");
- RNA_def_property_range(prop, 0, 1500);
+ RNA_def_property_range(prop, 0, MAXFRAME);
+ RNA_def_property_ui_range(prop, 0, 1500, 1, 0);
RNA_def_property_ui_text(prop, "Dupli Frames Off", "Recurring frames to exclude from the Dupliframes.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
- /* time offset */
+ prop= RNA_def_property(srna, "dupli_list", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "duplilist", NULL);
+ RNA_def_property_struct_type(prop, "DupliObject");
+ RNA_def_property_ui_text(prop, "Dupli list", "Object duplis.");
+ /* time offset */
prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_float_sdna(prop, NULL, "sf");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
@@ -1434,7 +1579,6 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
/* drawing */
-
prop= RNA_def_property(srna, "max_draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt");
RNA_def_property_enum_items(prop, drawtype_items);
@@ -1501,7 +1645,6 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pose", "Current pose for armatures.");
/* 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_boolean_funcs(prop, NULL, "rna_Object_shape_key_lock_set");
@@ -1523,12 +1666,43 @@ static void rna_def_object(BlenderRNA *brna)
RNA_api_object(srna);
}
+static void rna_def_dupli_object(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "DupliObject", NULL);
+ RNA_def_struct_sdna(srna, "DupliObject");
+ RNA_def_struct_ui_text(srna, "Dupli Object", "Dupli Object data.");
+ /* RNA_def_struct_ui_icon(srna, ICON_OBJECT_DATA); */
+
+ prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ /* RNA_def_property_struct_type(prop, "Object"); */
+ RNA_def_property_pointer_sdna(prop, NULL, "ob");
+ /* RNA_def_property_pointer_funcs(prop, "rna_DupliObject_object_get", NULL, NULL); */
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Object", "Object this DupliObject represents.");
+
+ prop= RNA_def_property(srna, "ob_matrix", PROP_FLOAT, PROP_MATRIX);
+ RNA_def_property_float_sdna(prop, NULL, "omat");
+ RNA_def_property_array(prop, 16);
+ RNA_def_property_ui_text(prop, "Object Matrix", "Object transformation matrix.");
+
+ prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
+ RNA_def_property_float_sdna(prop, NULL, "mat");
+ RNA_def_property_array(prop, 16);
+ RNA_def_property_ui_text(prop, "DupliObject Matrix", "DupliObject transformation matrix.");
+
+ /* TODO: DupliObject has more properties that can be wrapped */
+}
+
void RNA_def_object(BlenderRNA *brna)
{
rna_def_object(brna);
rna_def_object_game_settings(brna);
rna_def_vertex_group(brna);
rna_def_material_slot(brna);
+ rna_def_dupli_object(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 88b6e6919e0..098604c1eab 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -1,5 +1,5 @@
/**
- * $Id: rna_object_api.c 21094 2009-06-23 00:09:26Z gsrb3d $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -28,42 +28,64 @@
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
+#include <time.h>
#include "RNA_define.h"
#include "RNA_types.h"
+#include "DNA_object_types.h"
+
+#include "BLO_sys_types.h" /* needed for intptr_t used in ED_mesh.h */
+
+#include "ED_mesh.h"
+
#ifdef RNA_RUNTIME
-#include "MEM_guardedalloc.h"
+#include "BKE_main.h"
+#include "BKE_global.h"
+#include "BKE_context.h"
+#include "BKE_report.h"
+#include "BKE_object.h"
+#include "BKE_mesh.h"
+#include "BKE_DerivedMesh.h"
#include "BKE_customdata.h"
-#include "BKE_DerivedMesh.h"
+#include "BKE_anim.h"
+#include "BKE_depsgraph.h"
#include "BKE_displist.h"
-#include "BKE_object.h"
-#include "BKE_main.h"
+#include "BKE_font.h"
+#include "BKE_mball.h"
+
+#include "BLI_arithb.h"
#include "DNA_mesh_types.h"
-#include "DNA_curve_types.h"
#include "DNA_scene_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_curve_types.h"
+#include "DNA_modifier_types.h"
+
+#include "MEM_guardedalloc.h"
-/* copied from init_render_mesh (render code) */
-static Mesh *rna_Object_create_render_mesh(Object *ob, bContext *C, Scene *scene)
+/* copied from Mesh_getFromObject and adapted to RNA interface */
+/* settings: 0 - preview, 1 - render */
+static Mesh *rna_Object_create_mesh(Object *ob, bContext *C, ReportList *reports, int apply_modifiers, int settings)
{
- CustomDataMask mask = CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL;
+ Mesh *tmpmesh;
+ Curve *tmpcu = NULL;
Object *tmpobj = NULL;
- DerivedMesh *dm;
- Mesh *me;
-
- switch(ob->type) {
+ int render = settings, i;
+ int cage = !apply_modifiers;
+ Scene *sce = CTX_data_scene(C);
+
+ /* perform the mesh extraction based on type */
+ switch (ob->type) {
case OB_FONT:
case OB_CURVE:
case OB_SURF:
- {
- int cage = 0; //XXX -todo
- Curve *tmpcu = NULL;
/* copies object and modifiers (but not the data) */
- tmpobj= copy_object( ob );
+ tmpobj= copy_object(ob);
tmpcu = (Curve *)tmpobj->data;
tmpcu->id.us--;
@@ -87,80 +109,321 @@ static Mesh *rna_Object_create_render_mesh(Object *ob, bContext *C, Scene *scene
#endif
/* get updated display list, and convert to a mesh */
- makeDispListCurveTypes( scene, tmpobj, 0 );
+ makeDispListCurveTypes( sce, tmpobj, 0 );
nurbs_to_mesh( tmpobj );
-
- /* nurbs_to_mesh changes the type tp a mesh, check it worked */
+
+ /* nurbs_to_mesh changes the type to a mesh, check it worked */
if (tmpobj->type != OB_MESH) {
free_libblock_us( &(CTX_data_main(C)->object), tmpobj );
- printf("cant convert curve to mesh. Does the curve have any segments?" ); // XXX use report api
+ BKE_report(reports, RPT_ERROR, "cant convert curve to mesh. Does the curve have any segments?");
+ return NULL;
}
- me = tmpobj->data;
- free_libblock_us( &(CTX_data_main(C)->object), tmpobj );
- break;
- }
+ tmpmesh = tmpobj->data;
+ free_libblock_us( &G.main->object, tmpobj );
+ break;
+
case OB_MBALL:
/* metaballs don't have modifiers, so just convert to mesh */
- ob = find_basis_mball( ob );
+ ob = find_basis_mball( sce, ob );
/* todo, re-generatre for render-res */
- // metaball_polygonize(scene, ob)
- me = add_mesh("Mesh");
- mball_to_mesh( &ob->disp, me );
+ /* metaball_polygonize(scene, ob) */
+
+ tmpmesh = add_mesh("Mesh");
+ mball_to_mesh( &ob->disp, tmpmesh );
+ break;
+
+ case OB_MESH:
+ /* copies object and modifiers (but not the data) */
+ if (cage) {
+ /* copies the data */
+ tmpmesh = copy_mesh( ob->data );
+ /* if not getting the original caged mesh, get final derived mesh */
+ } else {
+ /* Make a dummy mesh, saves copying */
+ DerivedMesh *dm;
+ /* CustomDataMask mask = CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL; */
+ CustomDataMask mask = CD_MASK_MESH; /* this seems more suitable, exporter,
+ for example, needs CD_MASK_MDEFORMVERT */
+
+ /* Write the display mesh into the dummy mesh */
+ if (render)
+ dm = mesh_create_derived_render( sce, ob, mask );
+ else
+ dm = mesh_create_derived_view( sce, ob, mask );
+
+ tmpmesh = add_mesh( "Mesh" );
+ DM_to_mesh( dm, tmpmesh );
+ dm->release( dm );
+ }
+
break;
- case OB_MESH:
- {
- dm= mesh_create_derived_render(scene, ob, mask);
- // dm= mesh_create_derived_view(scene, ob, mask);
+ default:
+ BKE_report(reports, RPT_ERROR, "Object does not have geometry data");
+ return NULL;
+ }
- if(!dm)
- return NULL;
+ /* Copy materials to new mesh */
+ switch (ob->type) {
+ case OB_SURF:
+ tmpmesh->totcol = tmpcu->totcol;
+
+ /* free old material list (if it exists) and adjust user counts */
+ if( tmpcu->mat ) {
+ for( i = tmpcu->totcol; i-- > 0; ) {
+ /* are we an object material or data based? */
+ if (ob->colbits & 1<<i)
+ tmpmesh->mat[i] = ob->mat[i];
+ else
+ tmpmesh->mat[i] = tmpcu->mat[i];
+
+ if (tmpmesh->mat[i])
+ tmpmesh->mat[i]->id.us++;
+ }
+ }
+ break;
+
+#if 0
+ /* Crashes when assigning the new material, not sure why */
+ case OB_MBALL:
+ tmpmb = (MetaBall *)ob->data;
+ tmpmesh->totcol = tmpmb->totcol;
+
+ /* free old material list (if it exists) and adjust user counts */
+ if( tmpmb->mat ) {
+ for( i = tmpmb->totcol; i-- > 0; ) {
+ tmpmesh->mat[i] = tmpmb->mat[i]; /* CRASH HERE ??? */
+ if (tmpmesh->mat[i]) {
+ tmpmb->mat[i]->id.us++;
+ }
+ }
+ }
+ break;
+#endif
- me= add_mesh("tmp_render_mesh");
- me->id.us--; /* we don't assign it to anything */
- DM_to_mesh(dm, me);
- dm->release(dm);
+ case OB_MESH:
+ if (!cage) {
+ Mesh *origmesh= ob->data;
+ tmpmesh->flag= origmesh->flag;
+ tmpmesh->mat = MEM_dupallocN(origmesh->mat);
+ tmpmesh->totcol = origmesh->totcol;
+ tmpmesh->smoothresh= origmesh->smoothresh;
+ if( origmesh->mat ) {
+ for( i = origmesh->totcol; i-- > 0; ) {
+ /* are we an object material or data based? */
+ if (ob->colbits & 1<<i)
+ tmpmesh->mat[i] = ob->mat[i];
+ else
+ tmpmesh->mat[i] = origmesh->mat[i];
+ if (tmpmesh->mat[i])
+ tmpmesh->mat[i]->id.us++;
+ }
+ }
+ }
break;
+ } /* end copy materials */
+
+ /* we don't assign it to anything */
+ tmpmesh->id.us--;
+
+ /* make sure materials get updated in objects */
+ test_object_materials( ( ID * ) tmpmesh );
+
+ return tmpmesh;
+}
+
+/* When no longer needed, duplilist should be freed with Object.free_duplilist */
+static void rna_Object_create_duplilist(Object *ob, bContext *C, ReportList *reports)
+{
+ if (!(ob->transflag & OB_DUPLI)) {
+ BKE_report(reports, RPT_ERROR, "Object does not have duplis.");
+ return;
}
- default:
- return NULL;
+
+ /* free duplilist if a user forgets to */
+ if (ob->duplilist) {
+ BKE_reportf(reports, RPT_WARNING, "Object.dupli_list has not been freed.");
+
+ free_object_duplilist(ob->duplilist);
+ ob->duplilist= NULL;
+ }
+
+ ob->duplilist= object_duplilist(CTX_data_scene(C), ob);
+
+ /* ob->duplilist should now be freed with Object.free_duplilist */
+}
+
+static void rna_Object_free_duplilist(Object *ob, ReportList *reports)
+{
+ if (ob->duplilist) {
+ free_object_duplilist(ob->duplilist);
+ ob->duplilist= NULL;
}
+}
+
+static bDeformGroup *rna_Object_add_vertex_group(Object *ob, char *group_name)
+{
+ return ED_vgroup_add_name(ob, group_name);
+}
+static void rna_Object_add_vertex_to_group(Object *ob, int vertex_index, bDeformGroup *def, float weight, int assignmode)
+{
+ /* creates dverts if needed */
+ ED_vgroup_vert_add(ob, def, vertex_index, weight, assignmode);
+}
+
+/* copied from old API Object.makeDisplayList (Object.c) */
+static void rna_Object_make_display_list(Object *ob, bContext *C)
+{
+ Scene *sce= CTX_data_scene(C);
+
+ if (ob->type == OB_FONT) {
+ Curve *cu = ob->data;
+ freedisplist(&cu->disp);
+ BKE_text_to_curve(sce, ob, CU_LEFT);
+ }
- { /* update the material */
- short i, *totcol =give_totcolp(ob);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+}
- /* free the current material list */
- if(me->mat)
- MEM_freeN((void *)me->mat);
+static Object *rna_Object_find_armature(Object *ob)
+{
+ Object *ob_arm = NULL;
- me->mat= (Material **)MEM_callocN(sizeof(void *)*(*totcol), "matarray");
+ if (ob->type != OB_MESH) return NULL;
- for(i=0; i<*totcol; i++) {
- Material *mat= give_current_material(ob, i+1);
- if(mat) {
- me->mat[i]= mat;
- mat->id.us++;
+ if (ob->parent && ob->partype == PARSKEL && ob->parent->type == OB_ARMATURE) {
+ ob_arm = ob->parent;
+ }
+ else {
+ ModifierData *mod = (ModifierData*)ob->modifiers.first;
+ while (mod) {
+ if (mod->type == eModifierType_Armature) {
+ ob_arm = ((ArmatureModifierData*)mod)->object;
}
+
+ mod = mod->next;
}
}
- return me;
+ return ob_arm;
+}
+
+int rna_Object_is_visible(Object *ob, bContext *C)
+{
+ return ob->lay & CTX_data_scene(C)->lay;
+}
+
+/*
+static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int *indices, int totindex, float weight, int assignmode)
+{
+ if (ob->type != OB_MESH) {
+ BKE_report(reports, RPT_ERROR, "Object should be of MESH type.");
+ return;
+ }
+
+ Mesh *me = (Mesh*)ob->data;
+ int group_index = get_defgroup_num(ob, group);
+ if (group_index == -1) {
+ BKE_report(reports, RPT_ERROR, "No deform groups assigned to mesh.");
+ return;
+ }
+
+ if (assignmode != WEIGHT_REPLACE && assignmode != WEIGHT_ADD && assignmode != WEIGHT_SUBTRACT) {
+ BKE_report(reports, RPT_ERROR, "Bad assignment mode." );
+ return;
+ }
+
+ // makes a set of dVerts corresponding to the mVerts
+ if (!me->dvert)
+ create_dverts(&me->id);
+
+ // loop list adding verts to group
+ for (i= 0; i < totindex; i++) {
+ if(i < 0 || i >= me->totvert) {
+ BKE_report(reports, RPT_ERROR, "Bad vertex index in list.");
+ return;
+ }
+
+ add_vert_defnr(ob, group_index, i, weight, assignmode);
+ }
}
+*/
#else
void RNA_api_object(StructRNA *srna)
{
FunctionRNA *func;
- PropertyRNA *prop;
+ PropertyRNA *parm;
+
+ static EnumPropertyItem mesh_type_items[] = {
+ {0, "PREVIEW", 0, "Preview", "Apply modifier preview settings."},
+ {1, "RENDER", 0, "Render", "Apply modifier render settings."},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ static EnumPropertyItem assign_mode_items[] = {
+ {WEIGHT_REPLACE, "REPLACE", 0, "Replace", "Replace."}, /* TODO: more meaningful descriptions */
+ {WEIGHT_ADD, "ADD", 0, "Add", "Add."},
+ {WEIGHT_SUBTRACT, "SUBTRACT", 0, "Subtract", "Subtract."},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ /* mesh */
+ func= RNA_def_function(srna, "create_mesh", "rna_Object_create_mesh");
+ RNA_def_function_ui_description(func, "Create a Mesh datablock with modifiers applied.");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
+ parm= RNA_def_boolean(func, "apply_modifiers", 0, "", "Apply modifiers.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh created from object, remove it if it is only used for export.");
+ RNA_def_function_return(func, parm);
+
+ /* duplis */
+ func= RNA_def_function(srna, "create_dupli_list", "rna_Object_create_duplilist");
+ RNA_def_function_ui_description(func, "Create a list of dupli objects for this object, needs to be freed manually with free_dupli_list.");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
+
+ func= RNA_def_function(srna, "free_dupli_list", "rna_Object_free_duplilist");
+ RNA_def_function_ui_description(func, "Free the list of dupli objects.");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+
+ /* vertex groups */
+ func= RNA_def_function(srna, "add_vertex_group", "rna_Object_add_vertex_group");
+ RNA_def_function_ui_description(func, "Add vertex group to object.");
+ parm= RNA_def_string(func, "name", "Group", 0, "", "Vertex group name."); /* optional */
+ parm= RNA_def_pointer(func, "group", "VertexGroup", "", "New vertex group.");
+ RNA_def_function_return(func, parm);
+
+ func= RNA_def_function(srna, "add_vertex_to_group", "rna_Object_add_vertex_to_group");
+ RNA_def_function_ui_description(func, "Add vertex to a vertex group.");
+ parm= RNA_def_int(func, "vertex_index", 0, 0, 0, "", "Vertex index.", 0, 0);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "group", "VertexGroup", "", "Vertex group to add vertex to.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_float(func, "weight", 0, 0.0f, 1.0f, "", "Vertex weight.", 0.0f, 1.0f);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_enum(func, "type", assign_mode_items, 0, "", "Vertex assign mode.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ /* Armature */
+ func= RNA_def_function(srna, "find_armature", "rna_Object_find_armature");
+ RNA_def_function_ui_description(func, "Find armature influencing this object as a parent or via a modifier.");
+ parm= RNA_def_pointer(func, "ob_arm", "Object", "", "Armature object influencing this object or NULL.");
+ RNA_def_function_return(func, parm);
+
+ /* DAG */
+ func= RNA_def_function(srna, "make_display_list", "rna_Object_make_display_list");
+ RNA_def_function_ui_description(func, "Update object's display data."); /* XXX describe better */
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- func= RNA_def_function(srna, "create_render_mesh", "rna_Object_create_render_mesh");
- RNA_def_function_ui_description(func, "Create a Mesh datablock with all modifiers applied.");
+ /* View */
+ func= RNA_def_function(srna, "is_visible", "rna_Object_is_visible");
+ RNA_def_function_ui_description(func, "Determine if object is visible in active scene.");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- prop= RNA_def_pointer(func, "scene", "Scene", "", "");
- RNA_def_property_flag(prop, PROP_REQUIRED);
- prop= RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh created from object, remove it if it is only used for export.");
- RNA_def_function_return(func, prop);
+ parm= RNA_def_boolean(func, "is_visible", 0, "", "Object visibility.");
+ RNA_def_function_return(func, parm);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 3dfbfcccacf..2247e5499fb 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -31,11 +31,54 @@
#include "DNA_object_types.h"
#include "DNA_object_force.h"
+#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "WM_api.h"
#include "WM_types.h"
+EnumPropertyItem effector_shape_items[] = {
+ {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
+ {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
+ {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface", ""},
+ {PFIELD_SHAPE_POINTS, "POINTS", 0, "Every Point", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+EnumPropertyItem curve_shape_items[] = {
+ {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
+ {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
+ {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+EnumPropertyItem empty_shape_items[] = {
+ {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
+ {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+EnumPropertyItem vortex_shape_items[] = {
+ {PFIELD_SHAPE_POINT, "POINT", 0, "Old", ""},
+ {PFIELD_SHAPE_PLANE, "PLANE", 0, "New", ""},
+ {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface falloff (New)", ""},
+ {PFIELD_SHAPE_POINTS, "POINTS", 0, "Every Point (New)", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+EnumPropertyItem curve_vortex_shape_items[] = {
+ {PFIELD_SHAPE_POINT, "POINT", 0, "Old", ""},
+ {PFIELD_SHAPE_PLANE, "PLANE", 0, "New", ""},
+ {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve (New)", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+EnumPropertyItem empty_vortex_shape_items[] = {
+ {PFIELD_SHAPE_POINT, "POINT", 0, "Old", ""},
+ {PFIELD_SHAPE_PLANE, "PLANE", 0, "New", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
#ifdef RNA_RUNTIME
#include "MEM_guardedalloc.h"
@@ -358,65 +401,115 @@ static void rna_SoftBodySettings_goal_vgroup_set(PointerRNA *ptr, const char *va
rna_object_vgroup_name_index_set(ptr, value, &sb->vertgroup);
}
+static int particle_field_check(PointerRNA *ptr)
+{
+ ID *id= ptr->id.data;
+
+ return (GS(id->name) == ID_PA);
+}
static void rna_FieldSettings_update(bContext *C, PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ if(particle_field_check(ptr)) {
+ ParticleSettings *part = (ParticleSettings*)ptr->id.data;
+
+ if(part->pd->forcefield != PFIELD_TEXTURE && part->pd->tex) {
+ part->pd->tex->id.us--;
+ part->pd->tex= 0;
+ }
+
+ if(part->pd2->forcefield != PFIELD_TEXTURE && part->pd2->tex) {
+ part->pd2->tex->id.us--;
+ part->pd2->tex= 0;
+ }
+
+ DAG_id_flush_update(&part->id, OB_RECALC|PSYS_RECALC_RESET);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL);
- if(ob->pd->forcefield != PFIELD_TEXTURE && ob->pd->tex) {
- ob->pd->tex->id.us--;
- ob->pd->tex= 0;
}
+ else {
+ Object *ob = (Object*)ptr->id.data;
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ if(ob->pd->forcefield != PFIELD_TEXTURE && ob->pd->tex) {
+ ob->pd->tex->id.us--;
+ ob->pd->tex= 0;
+ }
+
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ }
}
-static void rna_FieldSettings_surface_update(bContext *C, PointerRNA *ptr)
+static void rna_FieldSettings_shape_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(ELEM6(pd->forcefield,PFIELD_HARMONIC,PFIELD_FORCE,PFIELD_HARMONIC,PFIELD_CHARGE,PFIELD_LENNARDJ,PFIELD_BOID))
+ if(!particle_field_check(ptr)) {
+ 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->shape == PFIELD_SHAPE_SURFACE) && ELEM(pd->forcefield,PFIELD_GUIDE,PFIELD_TEXTURE)==0)
if(ELEM4(ob->type, OB_MESH, OB_SURF, OB_FONT, OB_CURVE))
ED_object_modifier_add(NULL, scene, ob, eModifierType_Surface);
- }
- else {
- if(!pd || !(pd->flag & PFIELD_SURFACE))
- ED_object_modifier_remove(NULL, scene, ob, md);
- }
+ }
+ else {
+ if(!pd || pd->shape != PFIELD_SHAPE_SURFACE)
+ ED_object_modifier_remove(NULL, scene, ob, md);
+ }
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ 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
- }*/
+ if(particle_field_check(ptr)) {
+ DAG_id_flush_update((ID*)ptr->id.data, OB_RECALC|PSYS_RECALC_RESET);
+ }
+ else {
+ Object *ob= (Object*)ptr->id.data;
- rna_FieldSettings_surface_update(C, ptr);
+ /* 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
+ }*/
- DAG_scene_sort(scene);
+ rna_FieldSettings_shape_update(C, ptr);
- if(ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE)
- DAG_id_flush_update(&ob->id, OB_RECALC);
- else
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_scene_sort(scene);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ if(ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE)
+ DAG_id_flush_update(&ob->id, OB_RECALC);
+ else
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ }
+}
+
+static void rna_EffectorWeight_update(bContext *C, PointerRNA *ptr)
+{
+ DAG_id_flush_update((ID*)ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL);
}
+static void rna_EffectorWeight_dependency_update(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene= CTX_data_scene(C);
+
+ DAG_scene_sort(scene);
+
+ DAG_id_flush_update((ID*)ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL);
+}
static void rna_CollisionSettings_dependency_update(bContext *C, PointerRNA *ptr)
{
Scene *scene= CTX_data_scene(C);
@@ -448,6 +541,37 @@ static void rna_softbody_update(bContext *C, PointerRNA *ptr)
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
}
+
+static EnumPropertyItem *rna_Effector_shape_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ Object *ob= NULL;
+
+ if(particle_field_check(ptr))
+ return empty_shape_items;
+
+ ob= (Object*)ptr->id.data;
+
+ if(ob->type == OB_CURVE) {
+ if(ob->pd->forcefield == PFIELD_VORTEX)
+ return curve_vortex_shape_items;
+
+ return curve_shape_items;
+ }
+ else if(ELEM3(ob->type, OB_MESH, OB_SURF, OB_FONT)) {
+ if(ob->pd->forcefield == PFIELD_VORTEX)
+ return vortex_shape_items;
+
+ return effector_shape_items;
+ }
+ else {
+ if(ob->pd->forcefield == PFIELD_VORTEX)
+ return empty_vortex_shape_items;
+
+ return empty_shape_items;
+ }
+}
+
+
#else
static void rna_def_pointcache(BlenderRNA *brna)
@@ -617,6 +741,135 @@ static void rna_def_collision(BlenderRNA *brna)
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");
*/
+
+ prop= RNA_def_property(srna, "absorption", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 2);
+ RNA_def_property_ui_text(prop, "Absorption", "How much of effector force gets lost during collision with this object (in percent).");
+ RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
+}
+
+static void rna_def_effector_weight(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "EffectorWeights", NULL);
+ RNA_def_struct_ui_text(srna, "Effector Weights", "Effector weights for physics simulation.");
+ RNA_def_struct_ui_icon(srna, ICON_PHYSICS);
+
+ /* Flags */
+ prop= RNA_def_property(srna, "do_growing_hair", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", EFF_WEIGHT_DO_HAIR);
+ RNA_def_property_ui_text(prop, "Use For Growing Hair", "Use force fields when growing hair.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ /* General */
+ prop= RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "group");
+ RNA_def_property_struct_type(prop, "Group");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Effector Group", "Limit effectors to this Group.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_dependency_update");
+
+ prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "global_gravity");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Gravity", "Global gravity weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ /* Effector weights */
+ prop= RNA_def_property(srna, "all", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "weight[0]");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "All", "All effector's weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "weight[1]");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Force", "Force effector weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ prop= RNA_def_property(srna, "vortex", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "weight[2]");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Vortex", "Vortex effector weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ prop= RNA_def_property(srna, "magnetic", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "weight[3]");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Magnetic", "Magnetic effector weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ prop= RNA_def_property(srna, "wind", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "weight[4]");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Wind", "Wind effector weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ prop= RNA_def_property(srna, "curveguide", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "weight[5]");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Curve Guide", "Curve guide effector weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ prop= RNA_def_property(srna, "texture", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "weight[6]");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Texture", "Texture effector weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ prop= RNA_def_property(srna, "harmonic", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "weight[7]");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Harmonic", "Harmonic effector weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ prop= RNA_def_property(srna, "charge", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "weight[8]");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Charge", "Charge effector weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ prop= RNA_def_property(srna, "lennardjones", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "weight[9]");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Lennard-Jones", "Lennard-Jones effector weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ prop= RNA_def_property(srna, "boid", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "weight[10]");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Boid", "Boid effector weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "weight[11]");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Turbulence", "Turbulence effector weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
+
+ prop= RNA_def_property(srna, "drag", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "weight[12]");
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Drag", "Drag effector weight.");
+ RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
}
static void rna_def_field(BlenderRNA *brna)
@@ -626,18 +879,20 @@ static void rna_def_field(BlenderRNA *brna)
static EnumPropertyItem field_type_items[] = {
{0, "NONE", 0, "None", ""},
- {PFIELD_FORCE, "SPHERICAL", 0, "Spherical", ""},
+ {PFIELD_FORCE, "FORCE", 0, "Force", ""},
+ {PFIELD_WIND, "WIND", 0, "Wind", ""},
{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", ""},
+ {PFIELD_TEXTURE, "TEXTURE", 0, "Texture", ""},
+ {PFIELD_GUIDE, "GUIDE", 0, "Curve Guide", ""},
{PFIELD_BOID, "BOID", 0, "Boid", ""},
+ {PFIELD_TURBULENCE, "TURBULENCE", 0, "Turbulence", ""},
+ {PFIELD_DRAG, "DRAG", 0, "Drag", ""},
{0, NULL, 0, NULL, NULL}};
-
+
static EnumPropertyItem falloff_items[] = {
{PFIELD_FALL_SPHERE, "SPHERE", 0, "Sphere", ""},
{PFIELD_FALL_TUBE, "TUBE", 0, "Tube", ""},
@@ -650,6 +905,28 @@ static void rna_def_field(BlenderRNA *brna)
{PFIELD_TEX_CURL, "CURL", 0, "Curl", ""},
{0, NULL, 0, NULL, NULL}};
+ static EnumPropertyItem zdirection_items[] = {
+ {PFIELD_Z_BOTH, "BOTH", 0, "Both Z", ""},
+ {PFIELD_Z_POS, "POSITIVE", 0, "+Z", ""},
+ {PFIELD_Z_NEG, "NEGATIVE", 0, "-Z", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem guide_kink_items[] = {
+ {0, "NONE", 0, "Nothing", ""},
+ {1, "CURL", 0, "Curl", ""},
+ {2, "RADIAL", 0, "Radial", ""},
+ {3, "WAVE", 0, "Wave", ""},
+ {4, "BRAID", 0, "Braid", ""},
+ {5, "ROTATION", 0, "Rotation", ""},
+ {6, "ROLL", 0, "Roll", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem guide_kink_axis_items[] = {
+ {0, "X", 0, "X", ""},
+ {1, "Y", 0, "Y", ""},
+ {2, "Z", 0, "Z", ""},
+ {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.");
@@ -662,6 +939,12 @@ static void rna_def_field(BlenderRNA *brna)
RNA_def_property_enum_items(prop, field_type_items);
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, "shape", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, effector_shape_items);
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Effector_shape_itemf");
+ RNA_def_property_ui_text(prop, "Shape", "Which direction is used to calculate the effector force.");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_shape_update");
prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "falloff");
@@ -674,6 +957,12 @@ static void rna_def_field(BlenderRNA *brna)
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");
+
+ prop= RNA_def_property(srna, "z_direction", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "zdir");
+ RNA_def_property_enum_items(prop, zdirection_items);
+ RNA_def_property_ui_text(prop, "Z Direction", "Effect in full or only positive/negative Z direction.");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* Float */
@@ -682,18 +971,51 @@ static void rna_def_field(BlenderRNA *brna)
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)");
+
+ /* different ui range to above */
+ prop= RNA_def_property(srna, "linear_drag", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "f_strength");
+ RNA_def_property_range(prop, -2.0f, 2.0f);
+ RNA_def_property_ui_text(prop, "Linear Drag", "Drag component proportional to velocity.");
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");
+
+ /* different ui range to above */
+ prop= RNA_def_property(srna, "quadratic_drag", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "f_damp");
+ RNA_def_property_range(prop, -2.0f, 2.0f);
+ RNA_def_property_ui_text(prop, "Quadratic Drag", "Drag component proportional to the square of velocity.");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ prop= RNA_def_property(srna, "flow", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "f_flow");
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_ui_text(prop, "Flow", "Convert effector force into air flow velocity");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ /* different ui range to above */
+ prop= RNA_def_property(srna, "inflow", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "f_flow");
+ RNA_def_property_range(prop, -10.0f, 10.0f);
+ RNA_def_property_ui_text(prop, "Inflow", "Inwards component of the vortex force");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "f_size");
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_ui_text(prop, "Size", "Size of the noise");
+ 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, "minimum_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mindist");
@@ -765,31 +1087,16 @@ static void rna_def_field(BlenderRNA *brna)
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, "global_coordinates", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_GLOBAL_CO);
+ RNA_def_property_ui_text(prop, "Use Global Coordinates", "Use effector/global coordinates for turbulence");
+ 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);
@@ -800,6 +1107,21 @@ static void rna_def_field(BlenderRNA *brna)
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");
+
+ prop= RNA_def_property(srna, "do_location", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_DO_LOCATION);
+ RNA_def_property_ui_text(prop, "Location", "Effect particles' location");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ prop= RNA_def_property(srna, "do_rotation", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_DO_ROTATION);
+ RNA_def_property_ui_text(prop, "Rotation", "Effect particles' dynamic rotation");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ prop= RNA_def_property(srna, "do_absorption", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_VISIBILITY);
+ RNA_def_property_ui_text(prop, "Absorption", "Force gets absorbed by collision objects");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* Pointer */
@@ -808,6 +1130,74 @@ static void rna_def_field(BlenderRNA *brna)
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");
+
+ /********** Curve Guide Field Settings **********/
+
+ prop= RNA_def_property(srna, "guide_minimum", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "f_strength");
+ RNA_def_property_range(prop, 0.0f, 1000.0f);
+ RNA_def_property_ui_text(prop, "Minimum Distance", "The distance from which particles are affected fully.");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ prop= RNA_def_property(srna, "guide_free", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "free_end");
+ RNA_def_property_range(prop, 0.0f, 0.99f);
+ RNA_def_property_ui_text(prop, "Free", "Guide-free time from particle life's end");
+ 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");
+
+ /* Clump Settings */
+
+ prop= RNA_def_property(srna, "guide_clump_amount", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "clump_fac");
+ RNA_def_property_range(prop, -1.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Amount", "Amount of clumpimg");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ prop= RNA_def_property(srna, "guide_clump_shape", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "clump_pow");
+ RNA_def_property_range(prop, -0.999f, 0.999f);
+ RNA_def_property_ui_text(prop, "Shape", "Shape of clumpimg");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ /* Kink Settings */
+
+ prop= RNA_def_property(srna, "guide_kink_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "kink");
+ RNA_def_property_enum_items(prop, guide_kink_items);
+ RNA_def_property_ui_text(prop, "Kink", "Type of periodic offset on the curve");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ prop= RNA_def_property(srna, "guide_kink_axis", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "kink_axis");
+ RNA_def_property_enum_items(prop, guide_kink_axis_items);
+ RNA_def_property_ui_text(prop, "Axis", "Which axis to use for offset");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ prop= RNA_def_property(srna, "guide_kink_frequency", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "kink_freq");
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_ui_text(prop, "Frequency", "The frequency of the offset (1/total length)");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ prop= RNA_def_property(srna, "guide_kink_shape", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "kink_shape");
+ RNA_def_property_range(prop, -0.999f, 0.999f);
+ RNA_def_property_ui_text(prop, "Shape", "djust the offset to the beginning/end");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ prop= RNA_def_property(srna, "guide_kink_amplitude", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "kink_amp");
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_ui_text(prop, "Amplitude", "The amplitude of the offset");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
+
+ /* Variables used for Curve Guide, allready wrapped, used for other fields too */
+ // falloff_power, use_max_distance, maximum_distance
}
static void rna_def_game_softbody(BlenderRNA *brna)
@@ -1109,12 +1499,18 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_self_collision_get", "rna_SoftBodySettings_self_collision_set");
RNA_def_property_ui_text(prop, "Self Collision", "Enable naive vertex ball self collision.");
RNA_def_property_update(prop, 0, "rna_softbody_update");
+
+ prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "EffectorWeights");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Effector Weights", "");
}
void RNA_def_object_force(BlenderRNA *brna)
{
rna_def_pointcache(brna);
rna_def_collision(brna);
+ rna_def_effector_weight(brna);
rna_def_field(brna);
rna_def_game_softbody(brna);
rna_def_softbody(brna);
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index bbbb13c6e97..d261bda739e 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -99,55 +99,52 @@ EnumPropertyItem part_hair_ren_as_items[] = {
#include "BKE_context.h"
#include "BKE_cloth.h"
#include "BKE_depsgraph.h"
+#include "BKE_effect.h"
#include "BKE_modifier.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BLI_arithb.h"
+#include "BLI_listbase.h"
/* property update functions */
-static void rna_Particle_redo(bContext *C, PointerRNA *ptr)
+static void particle_recalc(bContext *C, PointerRNA *ptr, short flag)
{
- Scene *scene = CTX_data_scene(C);
- ParticleSettings *part;
if(ptr->type==&RNA_ParticleSystem) {
ParticleSystem *psys = (ParticleSystem*)ptr->data;
- Object *ob = psys_find_object(scene, psys);
- psys->recalc = PSYS_RECALC_REDO;
+ psys->recalc = flag;
- if(ob)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- }
- else {
- part = ptr->id.data;
- psys_flush_particle_settings(scene, part, PSYS_RECALC_REDO);
+ DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
}
+ else
+ DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA|flag);
WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
+static void rna_Particle_redo(bContext *C, PointerRNA *ptr)
+{
+ particle_recalc(C, ptr, PSYS_RECALC_REDO);
+}
static void rna_Particle_reset(bContext *C, PointerRNA *ptr)
{
- Scene *scene = CTX_data_scene(C);
- ParticleSettings *part;
+ particle_recalc(C, ptr, PSYS_RECALC_RESET);
+}
- if(ptr->type==&RNA_ParticleSystem) {
- ParticleSystem *psys = (ParticleSystem*)ptr->data;
- Object *ob = psys_find_object(scene, psys);
-
- psys->recalc = PSYS_RECALC_RESET;
+static void rna_Particle_change_type(bContext *C, PointerRNA *ptr)
+{
+ particle_recalc(C, ptr, PSYS_RECALC_RESET|PSYS_RECALC_TYPE);
+}
- if(ob) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- }
- }
- else {
- part = ptr->id.data;
- psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET);
- }
+static void rna_Particle_change_physics(bContext *C, PointerRNA *ptr)
+{
+ particle_recalc(C, ptr, PSYS_RECALC_RESET|PSYS_RECALC_PHYS);
+}
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
+static void rna_Particle_redo_child(bContext *C, PointerRNA *ptr)
+{
+ particle_recalc(C, ptr, PSYS_RECALC_CHILD);
}
static void rna_Particle_target_reset(bContext *C, PointerRNA *ptr)
@@ -199,59 +196,6 @@ static void rna_Particle_target_redo(bContext *C, PointerRNA *ptr)
}
}
-static void rna_Particle_change_type(bContext *C, PointerRNA *ptr)
-{
- Scene *scene = CTX_data_scene(C);
- ParticleSettings *part;
-
- 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_id_flush_update(&ob->id, OB_RECALC_DATA);
- }
- }
- else {
- part = ptr->id.data;
- psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET|PSYS_RECALC_TYPE);
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
-}
-
-static void rna_Particle_change_physics(bContext *C, PointerRNA *ptr)
-{
- Scene *scene = CTX_data_scene(C);
- ParticleSettings *part = ptr->id.data;
- psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET|PSYS_RECALC_PHYS);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
-}
-
-static void rna_Particle_redo_child(bContext *C, PointerRNA *ptr)
-{
- Scene *scene = CTX_data_scene(C);
- ParticleSettings *part;
-
- 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_id_flush_update(&ob->id, OB_RECALC_DATA);
- }
- else {
- part = ptr->id.data;
-
- psys_flush_particle_settings(scene, part, PSYS_RECALC_CHILD);
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
-}
static void rna_Particle_hair_dynamics(bContext *C, PointerRNA *ptr)
{
/* Scene *scene = CTX_data_scene(C); */
@@ -312,9 +256,10 @@ static void rna_PartSettings_start_set(struct PointerRNA *ptr, float value)
if(value > settings->end)
value = settings->end;
- if(settings->type==PART_REACTOR && value < 1.0)
- value = 1.0;
- else if (value < MINAFRAMEF)
+ //if(settings->type==PART_REACTOR && value < 1.0)
+ // value = 1.0;
+ //else
+ if (value < MINAFRAMEF)
value = MINAFRAMEF;
settings->sta = value;
@@ -475,10 +420,7 @@ static int rna_ParticleSystem_editable_get(PointerRNA *ptr)
{
ParticleSystem *psys= (ParticleSystem*)ptr->data;
- if(psys->part && psys->part->type==PART_HAIR)
- return (psys->flag & PSYS_HAIR_DONE);
- else
- return (psys->pointcache->flag & PTCACHE_BAKED);
+ return psys_check_edited(psys);
}
static int rna_ParticleSystem_edited_get(PointerRNA *ptr)
{
@@ -489,42 +431,77 @@ static int rna_ParticleSystem_edited_get(PointerRNA *ptr)
else
return (psys->pointcache->edit && psys->pointcache->edit->edited);
}
-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 PointerRNA rna_ParticleDupliWeight_active_get(PointerRNA *ptr)
+{
+ ParticleSettings *part= (ParticleSettings*)ptr->id.data;
+ ParticleDupliWeight *dw = part->dupliweights.first;
-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}
-};
+ for(; dw; dw=dw->next) {
+ if(dw->flag & PART_DUPLIW_CURRENT)
+ return rna_pointer_inherit_refine(ptr, &RNA_ParticleDupliWeight, dw);
+ }
+ return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, NULL);
+}
+static void rna_ParticleDupliWeight_active_index_range(PointerRNA *ptr, int *min, int *max)
+{
+ ParticleSettings *part= (ParticleSettings*)ptr->id.data;
+ *min= 0;
+ *max= BLI_countlist(&part->dupliweights)-1;
+ *max= MAX2(0, *max);
+}
-static EnumPropertyItem *rna_Particle_from_itemf(bContext *C, PointerRNA *ptr, int *free)
+static int rna_ParticleDupliWeight_active_index_get(PointerRNA *ptr)
{
- ParticleSettings *part = ptr->id.data;
+ ParticleSettings *part= (ParticleSettings*)ptr->id.data;
+ ParticleDupliWeight *dw = part->dupliweights.first;
+ int i=0;
- 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;
+ for(; dw; dw=dw->next, i++)
+ if(dw->flag & PART_DUPLIW_CURRENT)
+ return i;
+
+ return 0;
+}
+
+static void rna_ParticleDupliWeight_active_index_set(struct PointerRNA *ptr, int value)
+{
+ ParticleSettings *part= (ParticleSettings*)ptr->id.data;
+ ParticleDupliWeight *dw = part->dupliweights.first;
+ int i=0;
+
+ for(; dw; dw=dw->next, i++) {
+ if(i==value)
+ dw->flag |= PART_DUPLIW_CURRENT;
+ else
+ dw->flag &= ~PART_DUPLIW_CURRENT;
}
-
- if(part->type==PART_REACTOR)
- return part_reactor_from_items;
+}
+
+static int rna_ParticleDupliWeight_name_length(PointerRNA *ptr)
+{
+ ParticleDupliWeight *dw= ptr->data;
+
+ if(dw->ob)
+ return strlen(dw->ob->id.name+2) + 7;
else
+ return 9 + 7;
+}
+
+static void rna_ParticleDupliWeight_name_get(PointerRNA *ptr, char *str)
+{
+ ParticleDupliWeight *dw= ptr->data;
+
+ if(dw->ob)
+ sprintf(str, "%s: %i", dw->ob->id.name+2, dw->count);
+ else
+ strcpy(str, "No object");
+}
+
+static EnumPropertyItem *rna_Particle_from_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ //if(part->type==PART_REACTOR)
+ // return part_reactor_from_items;
+ //else
return part_from_items;
}
@@ -532,20 +509,6 @@ static EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *C, PointerRNA *ptr
{
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 part_hair_draw_as_items;
else
@@ -556,26 +519,34 @@ static EnumPropertyItem *rna_Particle_ren_as_itemf(bContext *C, PointerRNA *ptr,
{
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 part_hair_ren_as_items;
else
return part_ren_as_items;
}
+static PointerRNA rna_Particle_field1_get(PointerRNA *ptr)
+{
+ ParticleSettings *part= (ParticleSettings*)ptr->id.data;
+
+ /* weak */
+ if(!part->pd)
+ part->pd= object_add_collision_fields(0);
+
+ return rna_pointer_inherit_refine(ptr, &RNA_FieldSettings, part->pd);
+}
+
+static PointerRNA rna_Particle_field2_get(PointerRNA *ptr)
+{
+ ParticleSettings *part= (ParticleSettings*)ptr->id.data;
+
+ /* weak */
+ if(!part->pd2)
+ part->pd2= object_add_collision_fields(0);
+
+ return rna_pointer_inherit_refine(ptr, &RNA_FieldSettings, part->pd2);
+}
+
#else
@@ -649,7 +620,7 @@ static void rna_def_particle(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem alive_items[] = {
- {PARS_KILLED, "KILLED", 0, "Killed", ""},
+ //{PARS_KILLED, "KILLED", 0, "Killed", ""},
{PARS_DEAD, "DEAD", 0, "Dead", ""},
{PARS_UNBORN, "UNBORN", 0, "Unborn", ""},
{PARS_ALIVE, "ALIVE", 0, "Alive", ""},
@@ -760,6 +731,27 @@ static void rna_def_particle(BlenderRNA *brna)
// short rt2;
}
+static void rna_def_particle_dupliweight(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "ParticleDupliWeight", NULL);
+ RNA_def_struct_ui_text(srna, "Particle Dupliobject Weight", "Weight of a particle dupliobject in a group.");
+ RNA_def_struct_sdna(srna, "ParticleDupliWeight");
+
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_funcs(prop, "rna_ParticleDupliWeight_name_get", "rna_ParticleDupliWeight_name_length", NULL);
+ RNA_def_property_ui_text(prop, "Name", "Particle dupliobject name.");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_struct_name_property(srna, prop);
+
+ prop= RNA_def_property(srna, "count", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_range(prop, 0, INT_MAX);
+ RNA_def_property_ui_text(prop, "Count", "The number of times this object is repeated with respect to other objects.");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
+}
+
static void rna_def_particle_settings(BlenderRNA *brna)
{
StructRNA *srna;
@@ -767,7 +759,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
static EnumPropertyItem type_items[] = {
{PART_EMITTER, "EMITTER", 0, "Emitter", ""},
- {PART_REACTOR, "REACTOR", 0, "Reactor", ""},
+ //{PART_REACTOR, "REACTOR", 0, "Reactor", ""},
{PART_HAIR, "HAIR", 0, "Hair", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -986,10 +978,10 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Children", "Apply effectors to children.");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "child_seams", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_SEAMS);
- RNA_def_property_ui_text(prop, "Use seams", "Use seams to determine parents");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ //prop= RNA_def_property(srna, "child_seams", PROP_BOOLEAN, PROP_NONE);
+ //RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_SEAMS);
+ //RNA_def_property_ui_text(prop, "Use seams", "Use seams to determine parents");
+ //RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* TODO: used somewhere? */
prop= RNA_def_property(srna, "child_render", PROP_BOOLEAN, PROP_NONE);
@@ -1103,6 +1095,16 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pick Random", "Pick objects from group randomly");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ prop= RNA_def_property(srna, "use_group_count", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_COUNT_GR);
+ RNA_def_property_ui_text(prop, "Use Count", "Use object multiple times in the same group");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
+
+ prop= RNA_def_property(srna, "use_global_dupli", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_GLOBAL_OB);
+ RNA_def_property_ui_text(prop, "Use Global", "Use object's global coordinates for duplication.");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
+
prop= RNA_def_property(srna, "render_adaptive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_ADAPT);
RNA_def_property_ui_text(prop, "Adaptive render", "Draw steps of the particle path");
@@ -1408,6 +1410,13 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Reactor", "Let the vector away from the target particles location give the particle a starting speed.");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ prop= RNA_def_property(srna, "object_aligned_factor", PROP_FLOAT, PROP_VELOCITY);
+ RNA_def_property_float_sdna(prop, NULL, "ob_vel");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_text(prop, "Object Aligned", "Let the emitter object orientation give the particle a starting speed");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
+
prop= RNA_def_property(srna, "angular_velocity_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "avefac");
RNA_def_property_range(prop, -200.0f, 200.0f);
@@ -1460,19 +1469,6 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* global physical properties */
- prop= RNA_def_property(srna, "acceleration", PROP_FLOAT, PROP_ACCELERATION);
- 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, "Acceleration", "Constant acceleration");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
- prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
- RNA_def_property_float_sdna(prop, NULL, "acc[2]");
- RNA_def_property_range(prop, -200.0f, 200.0f);
- RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in global Z axis direction");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
prop= RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dragfac");
RNA_def_property_range(prop, 0.0f, 1.0f);
@@ -1699,6 +1695,19 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Dupli Group", "Show Objects in this Group in place of particles");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ prop= RNA_def_property(srna, "dupliweights", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "ParticleDupliWeight");
+ RNA_def_property_ui_text(prop, "Dupli Group Weights", "Weights for all of the objects in the dupli group.");
+
+ prop= RNA_def_property(srna, "active_dupliweight", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "ParticleDupliWeight");
+ RNA_def_property_pointer_funcs(prop, "rna_ParticleDupliWeight_active_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Active Dupli Object", "");
+
+ prop= RNA_def_property(srna, "active_dupliweight_index", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_funcs(prop, "rna_ParticleDupliWeight_active_index_get", "rna_ParticleDupliWeight_active_index_set", "rna_ParticleDupliWeight_active_index_range");
+ RNA_def_property_ui_text(prop, "Active Dupli Object Index", "");
+
prop= RNA_def_property(srna, "dupli_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dup_ob");
RNA_def_property_struct_type(prop, "Object");
@@ -1713,89 +1722,25 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Billboard Object", "Billboards face this object (default is active camera)");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- /* effectors */
- prop= RNA_def_property(srna, "effector_group", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "eff_group");
- RNA_def_property_struct_type(prop, "Group");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Effector Group", "Limit effectors to this Group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
- prop= RNA_def_property(srna, "eweight_all", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "effector_weight[0]");
- RNA_def_property_range(prop, -200.0f, 200.0f);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
- RNA_def_property_ui_text(prop, "All", "All effector's weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
- prop= RNA_def_property(srna, "eweight_spherical", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "effector_weight[1]");
- RNA_def_property_range(prop, -200.0f, 200.0f);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
- RNA_def_property_ui_text(prop, "Spherical", "Spherical effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
- prop= RNA_def_property(srna, "eweight_vortex", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "effector_weight[2]");
- RNA_def_property_range(prop, -200.0f, 200.0f);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
- RNA_def_property_ui_text(prop, "Vortex", "Vortex effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
- prop= RNA_def_property(srna, "eweight_magnetic", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "effector_weight[3]");
- RNA_def_property_range(prop, -200.0f, 200.0f);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
- RNA_def_property_ui_text(prop, "Magnetic", "Magnetic effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
- prop= RNA_def_property(srna, "eweight_wind", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "effector_weight[4]");
- RNA_def_property_range(prop, -200.0f, 200.0f);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
- RNA_def_property_ui_text(prop, "Wind", "Wind effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
- prop= RNA_def_property(srna, "eweight_curveguide", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "effector_weight[5]");
- RNA_def_property_range(prop, -200.0f, 200.0f);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
- RNA_def_property_ui_text(prop, "Curve Guide", "Curve guide effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
- prop= RNA_def_property(srna, "eweight_texture", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "effector_weight[6]");
- RNA_def_property_range(prop, -200.0f, 200.0f);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
- RNA_def_property_ui_text(prop, "Texture", "Texture effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
- prop= RNA_def_property(srna, "eweight_harmonic", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "effector_weight[7]");
- RNA_def_property_range(prop, -200.0f, 200.0f);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
- RNA_def_property_ui_text(prop, "Harmonic", "Harmonic effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
- prop= RNA_def_property(srna, "eweight_charge", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "effector_weight[8]");
- RNA_def_property_range(prop, -200.0f, 200.0f);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
- RNA_def_property_ui_text(prop, "Charge", "Charge effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
- prop= RNA_def_property(srna, "eweight_lennardjones", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "effector_weight[9]");
- RNA_def_property_range(prop, -200.0f, 200.0f);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
- RNA_def_property_ui_text(prop, "Lennard-Jones", "Lennard-Jones effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "EffectorWeights");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Effector Weights", "");
/* animation here? */
rna_def_animdata_common(srna);
-// struct PartDeflect *pd;
-// struct PartDeflect *pd2;
+ prop= RNA_def_property(srna, "force_field_1", 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_Particle_field1_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Force Field 1", "");
+
+ prop= RNA_def_property(srna, "force_field_2", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "pd2");
+ RNA_def_property_struct_type(prop, "FieldSettings");
+ RNA_def_property_pointer_funcs(prop, "rna_Particle_field2_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Force Field 2", "");
}
static void rna_def_particle_target(BlenderRNA *brna)
@@ -1871,10 +1816,10 @@ static void rna_def_particle_system(BlenderRNA *brna)
/* 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);
+ prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
//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_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
RNA_def_property_pointer_funcs(prop, "rna_particle_settings_get", "rna_particle_settings_set", NULL);
RNA_def_property_ui_text(prop, "Settings", "Particle system settings.");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
@@ -1904,9 +1849,10 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Hair Dynamics", "Enable hair dynamics using cloth simulation.");
RNA_def_property_update(prop, 0, "rna_Particle_hair_dynamics");
- prop= RNA_def_property(srna, "cloth", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "cloth", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "clmd");
RNA_def_property_struct_type(prop, "ClothModifier");
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Cloth", "Cloth dynamics for hair");
@@ -2082,7 +2028,8 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* pointcache */
- prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "pointcache");
RNA_def_property_struct_type(prop, "PointCache");
RNA_def_property_ui_text(prop, "Point Cache", "");
@@ -2120,6 +2067,7 @@ void RNA_def_particle(BlenderRNA *brna)
rna_def_child_particle(brna);
rna_def_particle(brna);
+ rna_def_particle_dupliweight(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 b568fb38dfb..584c971951a 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -23,6 +23,7 @@
*/
#include <stdlib.h>
+#include <string.h>
#include "RNA_define.h"
#include "RNA_types.h"
@@ -39,8 +40,9 @@
#ifdef RNA_RUNTIME
-#include <string.h>
-
+#include "BIK_api.h"
+#include "BKE_action.h"
+#include "BKE_armature.h"
#include "BLI_arithb.h"
#include "DNA_userdef_types.h"
@@ -49,8 +51,11 @@
#include "BKE_depsgraph.h"
#include "BKE_idprop.h"
+#include "ED_object.h"
#include "ED_armature.h"
+#include "MEM_guardedalloc.h"
+
static void rna_Pose_update(bContext *C, PointerRNA *ptr)
{
// XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
@@ -58,6 +63,15 @@ static void rna_Pose_update(bContext *C, PointerRNA *ptr)
DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
}
+static void rna_Pose_IK_update(bContext *C, PointerRNA *ptr)
+{
+ // XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
+ Object *ob= ptr->id.data;
+
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ BIK_clear_data(ob->pose);
+}
+
static char *rna_PoseChannel_path(PointerRNA *ptr)
{
return BLI_sprintfN("pose.pose_channels[\"%s\"]", ((bPoseChannel*)ptr->data)->name);
@@ -110,106 +124,66 @@ static IDProperty *rna_PoseChannel_idproperties(PointerRNA *ptr, int create)
return pchan->prop;
}
-/* rotation - euler angles */
-static void rna_PoseChannel_euler_rotation_get(PointerRNA *ptr, float *value)
+static void rna_Pose_ik_solver_set(struct PointerRNA *ptr, int value)
{
- bPoseChannel *pchan= ptr->data;
-
- if(pchan->rotmode == PCHAN_ROT_AXISANGLE) /* default XYZ eulers */
- AxisAngleToEulO(&pchan->quat[1], pchan->quat[0], value, EULER_ORDER_DEFAULT);
- else if(pchan->rotmode == PCHAN_ROT_QUAT) /* default XYZ eulers */
- QuatToEul(pchan->quat, value);
- else
- VECCOPY(value, pchan->eul);
+ bPose *pose= (bPose*)ptr->data;
+
+ if (pose->iksolver != value) {
+ // the solver has changed, must clean any temporary structures
+ BIK_clear_data(pose);
+ if (pose->ikparam) {
+ MEM_freeN(pose->ikparam);
+ pose->ikparam = NULL;
+ }
+ pose->iksolver = value;
+ init_pose_ikparam(pose);
+ }
}
-/* rotation - euler angles */
-static void rna_PoseChannel_euler_rotation_set(PointerRNA *ptr, const float *value)
+static void rna_Pose_ik_solver_update(bContext *C, PointerRNA *ptr)
{
- bPoseChannel *pchan= ptr->data;
+ Object *ob= ptr->id.data;
+ bPose *pose = ptr->data;
+ Scene *scene = CTX_data_scene(C);
+
+ pose->flag |= POSE_RECALC; // checks & sorts pose channels
+ DAG_scene_sort(scene);
- if(pchan->rotmode == PCHAN_ROT_AXISANGLE) /* default XYZ eulers */
- EulOToAxisAngle((float *)value, EULER_ORDER_DEFAULT, &pchan->quat[1], &pchan->quat[0]);
- else if(pchan->rotmode == PCHAN_ROT_QUAT) /* default XYZ eulers */
- EulToQuat((float*)value, pchan->quat);
- else
- VECCOPY(pchan->eul, value);
+ update_pose_constraint_flags(pose);
+
+ object_test_constraints(ob);
+
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
}
-/* rotation - axis angle only */
-static void rna_PoseChannel_rotation_axis_get(PointerRNA *ptr, float *value)
+/* rotation - axis-angle */
+static void rna_PoseChannel_rotation_axis_angle_get(PointerRNA *ptr, float *value)
{
bPoseChannel *pchan= ptr->data;
- if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
- /* axis is stord in quat for now */
- VecCopyf(value, &pchan->quat[1]);
- }
+ /* for now, assume that rotation mode is axis-angle */
+ value[0]= pchan->rotAngle;
+ VecCopyf(&value[1], pchan->rotAxis);
}
-/* rotation - axis angle only */
-static void rna_PoseChannel_rotation_axis_set(PointerRNA *ptr, const float *value)
+/* rotation - axis-angle */
+static void rna_PoseChannel_rotation_axis_angle_set(PointerRNA *ptr, const float *value)
{
bPoseChannel *pchan= ptr->data;
- if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
- /* axis is stored in quat for now */
- VecCopyf(&pchan->quat[1], (float *)value);
- }
+ /* for now, assume that rotation mode is axis-angle */
+ pchan->rotAngle= value[0];
+ VecCopyf(pchan->rotAxis, (float *)&value[1]);
+
+ // TODO: validate axis?
}
static void rna_PoseChannel_rotation_mode_set(PointerRNA *ptr, int value)
{
bPoseChannel *pchan= ptr->data;
- /* check if any change - if so, need to convert data */
- // TODO: this needs to be generalised at some point to work for objects too...
- if (value > 0) { /* to euler */
- if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
- /* axis-angle to euler */
- AxisAngleToEulO(&pchan->quat[1], pchan->quat[0], pchan->eul, value);
- }
- else if (pchan->rotmode == PCHAN_ROT_QUAT) {
- /* quat to euler */
- QuatToEulO(pchan->quat, pchan->eul, value);
- }
- /* else { no conversion needed } */
- }
- else if (value == PCHAN_ROT_QUAT) { /* to quat */
- if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
- /* axis angle to quat */
- float q[4];
-
- /* copy to temp var first, since quats and axis-angle are stored in same place */
- QuatCopy(q, pchan->quat);
- AxisAngleToQuat(q, &pchan->quat[1], pchan->quat[0]);
- }
- else if (pchan->rotmode > 0) {
- /* euler to quat */
- EulOToQuat(pchan->eul, pchan->rotmode, pchan->quat);
- }
- /* else { no conversion needed } */
- }
- else { /* to axis-angle */
- if (pchan->rotmode > 0) {
- /* euler to axis angle */
- EulOToAxisAngle(pchan->eul, pchan->rotmode, &pchan->quat[1], &pchan->quat[0]);
- }
- else if (pchan->rotmode == PCHAN_ROT_QUAT) {
- /* quat to axis angle */
- float q[4];
-
- /* copy to temp var first, since quats and axis-angle are stored in same place */
- QuatCopy(q, pchan->quat);
- QuatToAxisAngle(q, &pchan->quat[1], &pchan->quat[0]);
- }
-
- /* when converting to axis-angle, we need a special exception for the case when there is no axis */
- if (IS_EQ(pchan->quat[1], pchan->quat[2]) && IS_EQ(pchan->quat[2], pchan->quat[3])) {
- /* for now, rotate around y-axis then (so that it simply becomes the roll) */
- pchan->quat[2]= 1.0f;
- }
- }
+ /* use API Method for conversions... */
+ BKE_rotMode_change_values(pchan->quat, pchan->eul, pchan->rotAxis, &pchan->rotAngle, pchan->rotmode, (short)value);
/* finally, set the new rotation type */
pchan->rotmode= value;
@@ -236,6 +210,70 @@ static int rna_PoseChannel_has_ik_get(PointerRNA *ptr)
return ED_pose_channel_in_IK_chain(ob, pchan);
}
+StructRNA *rna_IKParam_refine(PointerRNA *ptr)
+{
+ bIKParam *param = (bIKParam *)ptr->data;
+
+ switch (param->iksolver) {
+ case IKSOLVER_ITASC:
+ return &RNA_Itasc;
+ default:
+ return &RNA_IKParam;
+ }
+}
+
+PointerRNA rna_Pose_ikparam_get(struct PointerRNA *ptr)
+{
+ bPose *pose= (bPose*)ptr->data;
+ return rna_pointer_inherit_refine(ptr, &RNA_IKParam, pose->ikparam);
+}
+
+static StructRNA *rna_Pose_ikparam_typef(PointerRNA *ptr)
+{
+ bPose *pose= (bPose*)ptr->data;
+
+ switch (pose->iksolver) {
+ case IKSOLVER_ITASC:
+ return &RNA_Itasc;
+ default:
+ return &RNA_IKParam;
+ }
+}
+
+static void rna_Itasc_update(bContext *C, PointerRNA *ptr)
+{
+ Object *ob = ptr->id.data;
+ bItasc *itasc = ptr->data;
+
+ /* verify values */
+ if (itasc->precision < 0.0001f)
+ itasc->precision = 0.0001f;
+ if (itasc->minstep < 0.001f)
+ itasc->minstep = 0.001f;
+ if (itasc->maxstep < itasc->minstep)
+ itasc->maxstep = itasc->minstep;
+ if (itasc->feedback < 0.01f)
+ itasc->feedback = 0.01f;
+ if (itasc->feedback > 100.f)
+ itasc->feedback = 100.f;
+ if (itasc->maxvel < 0.01f)
+ itasc->maxvel = 0.01f;
+ if (itasc->maxvel > 100.f)
+ itasc->maxvel = 100.f;
+ BIK_update_param(ob->pose);
+
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+}
+
+static void rna_Itasc_update_rebuild(bContext *C, PointerRNA *ptr)
+{
+ Object *ob= ptr->id.data;
+ bPose *pose = ob->pose;
+
+ pose->flag |= POSE_RECALC; // checks & sorts pose channels
+ rna_Itasc_update(C, ptr);
+}
+
static PointerRNA rna_PoseChannel_bone_group_get(PointerRNA *ptr)
{
Object *ob= (Object*)ptr->id.data;
@@ -323,6 +361,7 @@ static void rna_Pose_active_bone_group_index_range(PointerRNA *ptr, int *min, in
*max= MAX2(0, *max);
}
+#if 0
static void rna_pose_bgroup_name_index_get(PointerRNA *ptr, char *value, int index)
{
bPose *pose= (bPose*)ptr->data;
@@ -373,6 +412,7 @@ static void rna_pose_pgroup_name_set(PointerRNA *ptr, const char *value, char *r
BLI_strncpy(result, "", maxlen);
}
+#endif
#else
@@ -428,24 +468,36 @@ static void rna_def_bone_group(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
// TODO: editing the colors for this should result in changes to the color type...
- prop= RNA_def_property(srna, "colors", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "colors", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
RNA_def_property_pointer_sdna(prop, NULL, "cs"); /* NOTE: the DNA data is not really a pointer, but this code works :) */
RNA_def_property_ui_text(prop, "Colors", "Copy of the colors associated with the group's color set.");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
}
+static EnumPropertyItem prop_iksolver_items[] = {
+ {IKSOLVER_LEGACY, "LEGACY", 0, "Legacy", "Original IK solver."},
+ {IKSOLVER_ITASC, "ITASC", 0, "iTaSC", "Multi constraint, stateful IK solver."},
+ {0, NULL, 0, NULL, NULL}};
+
+static EnumPropertyItem prop_solver_items[] = {
+ {ITASC_SOLVER_SDLS, "SDLS", 0, "SDLS", "Selective Damped Least Square"},
+ {ITASC_SOLVER_DLS, "DLS", 0, "DLS", "Damped Least Square with Numerical Filtering"},
+ {0, NULL, 0, NULL, NULL}};
+
static void rna_def_pose_channel(BlenderRNA *brna)
{
+ // XXX: this RNA enum define is currently duplicated for objects, since there is some text here which is not applicable
static EnumPropertyItem prop_rotmode_items[] = {
- {PCHAN_ROT_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock (default)"},
- {PCHAN_ROT_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_XZY, "XZY", 0, "XZY Euler", "XZY Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_YXZ, "YXZ", 0, "YXZ Euler", "YXZ Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_YZX, "YZX", 0, "YZX Euler", "YZX Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_ZXY, "ZXY", 0, "ZXY Euler", "ZXY Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_ZYX, "ZYX", 0, "ZYX Euler", "ZYX Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_AXISANGLE, "AXIS_ANGLE", 0, "Axis Angle", "Axis Angle (W+XYZ). Defines a rotation around some axis defined by 3D-Vector."},
+ {ROT_MODE_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock (default)"},
+ {ROT_MODE_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order. Prone to Gimbal Lock"},
+ {ROT_MODE_XZY, "XZY", 0, "XZY Euler", "XZY Rotation Order. Prone to Gimbal Lock"},
+ {ROT_MODE_YXZ, "YXZ", 0, "YXZ Euler", "YXZ Rotation Order. Prone to Gimbal Lock"},
+ {ROT_MODE_YZX, "YZX", 0, "YZX Euler", "YZX Rotation Order. Prone to Gimbal Lock"},
+ {ROT_MODE_ZXY, "ZXY", 0, "ZXY Euler", "ZXY Rotation Order. Prone to Gimbal Lock"},
+ {ROT_MODE_ZYX, "ZYX", 0, "ZYX Euler", "ZYX Rotation Order. Prone to Gimbal Lock"},
+ {ROT_MODE_AXISANGLE, "AXIS_ANGLE", 0, "Axis Angle", "Axis Angle (W+XYZ). Defines a rotation around some axis defined by 3D-Vector."},
{0, NULL, 0, NULL, NULL}};
StructRNA *srna;
@@ -467,7 +519,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_PoseChannel_name_set");
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
-
+
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "selectflag", BONE_SELECTED);
RNA_def_property_ui_text(prop, "Selected", "");
@@ -477,16 +529,17 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "pathsf");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bone Paths Calculation Start Frame", "Starting frame of range of frames to use for Bone Path calculations.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop= RNA_def_property(srna, "path_end_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "pathef");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bone Paths Calculation End Frame", "End frame of range of frames to use for Bone Path calculations.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* Relationships to other bones */
- prop= RNA_def_property(srna, "bone", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "bone", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bone", "Bone associated with this Pose Channel.");
@@ -512,52 +565,51 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Scale", "");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
+ prop= RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "quat");
- RNA_def_property_ui_text(prop, "Rotation", "Rotation in Quaternions.");
+ RNA_def_property_ui_text(prop, "Quaternion Rotation", "Rotation in Quaternions.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
- prop= RNA_def_property(srna, "rotation_angle", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "quat[0]");
- RNA_def_property_ui_text(prop, "Rotation Angle", "Angle of Rotation for Axis-Angle rotation representation.");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "rotation_axis", PROP_FLOAT, PROP_XYZ);
- RNA_def_property_float_sdna(prop, NULL, "quat");
- RNA_def_property_float_funcs(prop, "rna_PoseChannel_rotation_axis_get", "rna_PoseChannel_rotation_axis_set", NULL);
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Rotation Axis", "Axis for Axis-Angle rotation representation.");
+ /* XXX: for axis-angle, it would have been nice to have 2 separate fields for UI purposes, but
+ * having a single one is better for Keyframing and other property-management situations...
+ */
+ prop= RNA_def_property(srna, "rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE);
+ RNA_def_property_array(prop, 4); // TODO: maybe we'll need to define the 'default value' getter too...
+ RNA_def_property_float_funcs(prop, "rna_PoseChannel_rotation_axis_angle_get", "rna_PoseChannel_rotation_axis_angle_set", NULL);
+ RNA_def_property_ui_text(prop, "Axis-Angle Rotation", "Angle of Rotation for Axis-Angle rotation representation.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
- prop= RNA_def_property(srna, "euler_rotation", PROP_FLOAT, PROP_EULER);
+ prop= RNA_def_property(srna, "rotation_euler", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "eul");
- RNA_def_property_float_funcs(prop, "rna_PoseChannel_euler_rotation_get", "rna_PoseChannel_euler_rotation_set", NULL);
- RNA_def_property_ui_text(prop, "Rotation (Euler)", "Rotation in Eulers.");
+ RNA_def_property_ui_text(prop, "Euler Rotation", "Rotation in Eulers.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rotmode");
- RNA_def_property_enum_items(prop, prop_rotmode_items);
+ RNA_def_property_enum_items(prop, prop_rotmode_items); // XXX move to using a single define of this someday
RNA_def_property_enum_funcs(prop, NULL, "rna_PoseChannel_rotation_mode_set", NULL);
RNA_def_property_ui_text(prop, "Rotation Mode", "");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- /* These three matrix properties await an implementation of the PROP_MATRIX subtype, which currently doesn't exist. */
-/* prop= RNA_def_property(srna, "channel_matrix", PROP_FLOAT, PROP_MATRIX);
- RNA_def_property_struct_type(prop, "chan_mat");
+
+ /* transform matrices - should be read-only since these are set directly by AnimSys evaluation */
+ prop= RNA_def_property(srna, "channel_matrix", PROP_FLOAT, PROP_MATRIX);
+ RNA_def_property_float_sdna(prop, NULL, "chan_mat");
+ RNA_def_property_array(prop, 16);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Channel Matrix", "4x4 matrix, before constraints.");*/
-
- /* kaito says this should be not user-editable; I disagree; power users should be able to force this in python; he's the boss. */
-/* prop= RNA_def_property(srna, "pose_matrix", PROP_FLOAT, PROP_MATRIX);
- RNA_def_property_struct_type(prop, "pose_mat");
+ RNA_def_property_ui_text(prop, "Channel Matrix", "4x4 matrix, before constraints.");
+
+ prop= RNA_def_property(srna, "pose_matrix", PROP_FLOAT, PROP_MATRIX);
+ RNA_def_property_float_sdna(prop, NULL, "pose_mat");
+ RNA_def_property_array(prop, 16);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Pose Matrix", "Final 4x4 matrix for this channel.");
+ /*
prop= RNA_def_property(srna, "constraint_inverse_matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_struct_type(prop, "constinv");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Constraint Inverse Matrix", "4x4 matrix, defines transform from final position to unconstrained position."); */
+ RNA_def_property_ui_text(prop, "Constraint Inverse Matrix", "4x4 matrix, defines transform from final position to unconstrained position.");
+ */
/* Head/Tail Coordinates (in Pose Space) - Automatically calculated... */
prop= RNA_def_property(srna, "pose_head", PROP_FLOAT, PROP_TRANSLATION);
@@ -573,96 +625,118 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_boolean_funcs(prop, "rna_PoseChannel_has_ik_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Has IK", "Is part of an IK chain.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_dof_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_XDOF);
RNA_def_property_ui_text(prop, "IK X DoF", "Allow movement around the X axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_dof_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_YDOF);
RNA_def_property_ui_text(prop, "IK Y DoF", "Allow movement around the Y axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_dof_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_ZDOF);
RNA_def_property_ui_text(prop, "IK Z DoF", "Allow movement around the Z axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_limit_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_XLIMIT);
RNA_def_property_ui_text(prop, "IK X Limit", "Limit movement around the X axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_limit_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_YLIMIT);
RNA_def_property_ui_text(prop, "IK Y Limit", "Limit movement around the Y axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_limit_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_ZLIMIT);
RNA_def_property_ui_text(prop, "IK Z Limit", "Limit movement around the Z axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
+
+ prop= RNA_def_property(srna, "ik_rot_control", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_ROTCTL);
+ RNA_def_property_ui_text(prop, "IK rot control", "Apply channel rotation as IK constraint");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
+
+ prop= RNA_def_property(srna, "ik_lin_control", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_LINCTL);
+ RNA_def_property_ui_text(prop, "IK rot control", "Apply channel size as IK constraint if stretching is enabled");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_min_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[0]");
RNA_def_property_range(prop, -180.0f, 0.0f);
RNA_def_property_ui_text(prop, "IK X Minimum", "Minimum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_max_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[0]");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "IK X Maximum", "Maximum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_min_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[1]");
RNA_def_property_range(prop, -180.0f, 0.0f);
RNA_def_property_ui_text(prop, "IK Y Minimum", "Minimum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_max_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[1]");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "IK Y Maximum", "Maximum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_min_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[2]");
RNA_def_property_range(prop, -180.0f, 0.0f);
RNA_def_property_ui_text(prop, "IK Z Minimum", "Minimum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_max_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[2]");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "IK Z Maximum", "Maximum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_stiffness_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness[0]");
RNA_def_property_range(prop, 0.0f, 0.99f);
RNA_def_property_ui_text(prop, "IK X Stiffness", "IK stiffness around the X axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_stiffness_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness[1]");
RNA_def_property_range(prop, 0.0f, 0.99f);
RNA_def_property_ui_text(prop, "IK Y Stiffness", "IK stiffness around the Y axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_stiffness_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness[2]");
RNA_def_property_range(prop, 0.0f, 0.99f);
RNA_def_property_ui_text(prop, "IK Z Stiffness", "IK stiffness around the Z axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_stretch", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ikstretch");
RNA_def_property_range(prop, 0.0f,1.0f);
RNA_def_property_ui_text(prop, "IK Stretch", "Allow scaling of the bone for IK.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
+
+ prop= RNA_def_property(srna, "ik_rot_weight", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "ikrotweight");
+ RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_ui_text(prop, "IK Rot Weight", "Weight of rotation constraint for IK.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_lin_weight", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "iklinweight");
+ RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_ui_text(prop, "IK Lin Weight", "Weight of scale constraint for IK.");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* custom bone shapes */
@@ -719,6 +793,120 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
}
+static void rna_def_pose_itasc(BlenderRNA *brna)
+{
+ static const EnumPropertyItem prop_itasc_mode_items[]= {
+ {0, "ANIMATION", 0, "Animation", "Stateless solver computing pose starting from current action and non-IK constraints."},
+ {ITASC_SIMULATION, "SIMULATION", 0, "Simulation", "Statefull solver running in real-time context and ignoring actions and non-IK constraints."},
+ {0, NULL, 0, NULL, NULL}};
+ static const EnumPropertyItem prop_itasc_reiteration_items[]= {
+ {0, "NEVER", 0, "Never", "The solver does not reiterate, not even on first frame (starts from rest pose)."},
+ {ITASC_INITIAL_REITERATION, "INITIAL", 0, "Initial", "The solver reiterates (converges) on the first frame but not on subsequent frame."},
+ {ITASC_INITIAL_REITERATION|ITASC_REITERATION, "ALWAYS", 0, "Always", "The solver reiterates (converges) on all frames."},
+ {0, NULL, 0, NULL, NULL}};
+
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "Itasc", "IKParam");
+ RNA_def_struct_sdna(srna, "bItasc");
+ RNA_def_struct_ui_text(srna, "bItasc", "Parameters for the iTaSC IK solver.");
+
+ prop= RNA_def_property(srna, "precision", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "precision");
+ RNA_def_property_range(prop, 0.0f,0.1f);
+ RNA_def_property_ui_text(prop, "Precision", "Precision of convergence in case of reiteration.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
+
+ prop= RNA_def_property(srna, "num_iter", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "numiter");
+ RNA_def_property_range(prop, 1.f,1000.f);
+ RNA_def_property_ui_text(prop, "Iterations", "Maximum number of iterations for convergence in case of reiteration.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
+
+ prop= RNA_def_property(srna, "num_step", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "numstep");
+ RNA_def_property_range(prop, 1.f, 50.f);
+ RNA_def_property_ui_text(prop, "Num steps", "Divides the frame interval into this many steps.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
+
+ prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, prop_itasc_mode_items);
+ RNA_def_property_ui_text(prop, "Mode", NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update_rebuild");
+
+ prop= RNA_def_property(srna, "reiteration", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, prop_itasc_reiteration_items);
+ RNA_def_property_ui_text(prop, "Reiteration", "Defines if the solver is allowed to reiterate (converges until precision is met) on none, first or all frames");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
+
+ prop= RNA_def_property(srna, "auto_step", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ITASC_AUTO_STEP);
+ RNA_def_property_ui_text(prop, "Auto step", "Automatically determine the optimal number of steps for best performance/accurary trade off.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
+
+ prop= RNA_def_property(srna, "min_step", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "minstep");
+ RNA_def_property_range(prop, 0.0f,0.1f);
+ RNA_def_property_ui_text(prop, "Min step", "Lower bound for timestep in second in case of automatic substeps.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
+
+ prop= RNA_def_property(srna, "max_step", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "maxstep");
+ RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_ui_text(prop, "Max step", "Higher bound for timestep in second in case of automatic substeps.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
+
+ prop= RNA_def_property(srna, "feedback", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "feedback");
+ RNA_def_property_range(prop, 0.0f,100.0f);
+ RNA_def_property_ui_text(prop, "Feedback", "Feedback coefficient for error correction. Average response time=1/feedback. Default=20.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
+
+ prop= RNA_def_property(srna, "max_velocity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "maxvel");
+ RNA_def_property_range(prop, 0.0f,100.0f);
+ RNA_def_property_ui_text(prop, "Max Velocity", "Maximum joint velocity in rad/s. Default=50.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
+
+ prop= RNA_def_property(srna, "solver", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "solver");
+ RNA_def_property_enum_items(prop, prop_solver_items);
+ RNA_def_property_ui_text(prop, "Solver", "Solving method selection: Automatic damping or manual damping");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update_rebuild");
+
+ prop= RNA_def_property(srna, "dampmax", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "dampmax");
+ RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_ui_text(prop, "Damp", "Maximum damping coefficient when singular value is nearly 0. Higher values=more stability, less reactivity. Default=0.5");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
+
+ prop= RNA_def_property(srna, "dampeps", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "dampeps");
+ RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_ui_text(prop, "Epsilon", "Singular value under which damping is progressively applied. Higher values=more stability, less reactivity. Default=0.1");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
+}
+
+static void rna_def_pose_ikparam(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "IKParam", NULL);
+ RNA_def_struct_sdna(srna, "bIKParam");
+ RNA_def_struct_ui_text(srna, "IKParam", "Base type for IK solver parameters.");
+ RNA_def_struct_refine_func(srna, "rna_IKParam_refine");
+
+ prop= RNA_def_property(srna, "ik_solver", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "iksolver");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_enum_items(prop, prop_iksolver_items);
+ RNA_def_property_ui_text(prop, "IK Solver", "IK solver for which these parameters are defined, 0 for Legacy, 1 for iTaSC.");
+}
+
static void rna_def_pose(BlenderRNA *brna)
{
StructRNA *srna;
@@ -753,13 +941,29 @@ static void rna_def_pose(BlenderRNA *brna)
RNA_def_property_int_funcs(prop, "rna_Pose_active_bone_group_index_get", "rna_Pose_active_bone_group_index_set", "rna_Pose_active_bone_group_index_range");
RNA_def_property_ui_text(prop, "Active Bone Group Index", "Active index in bone groups array.");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_solver", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "iksolver");
+ RNA_def_property_enum_funcs(prop, NULL, "rna_Pose_ik_solver_set", NULL);
+ RNA_def_property_enum_items(prop, prop_iksolver_items);
+ RNA_def_property_ui_text(prop, "IK Solver", "Selection of IK solver for IK chain, current choice is 0 for Legacy, 1 for iTaSC.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_ik_solver_update");
+
+ prop= RNA_def_property(srna, "ik_param", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "IKParam");
+ RNA_def_property_pointer_funcs(prop, "rna_Pose_ikparam_get", NULL, "rna_Pose_ikparam_typef");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "IK Param", "Parameters for IK solver.");
+
+ /* RNA_api_pose(srna); */
}
void RNA_def_pose(BlenderRNA *brna)
{
rna_def_pose(brna);
rna_def_pose_channel(brna);
-
+ rna_def_pose_ikparam(brna);
+ rna_def_pose_itasc(brna);
rna_def_bone_group(brna);
}
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 196d25ada86..31aecbb8a76 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -383,14 +383,13 @@ static void rna_Property_description_get(PointerRNA *ptr, char *value)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
- strcpy(value, prop->description);
+ strcpy(value, prop->description ? prop->description:"");
}
-
static int rna_Property_description_length(PointerRNA *ptr)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
- return strlen(prop->description);
+ return prop->description ? strlen(prop->description) : 0;
}
static int rna_Property_type_get(PointerRNA *ptr)
@@ -625,7 +624,7 @@ static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA
rna_idproperty_check(&prop, ptr);
eprop= (EnumPropertyRNA*)prop;
- if(eprop->itemf==NULL || eprop->itemf==rna_EnumProperty_default_itemf)
+ if(eprop->itemf==NULL || eprop->itemf==rna_EnumProperty_default_itemf || !C)
return eprop->item;
return eprop->itemf(C, ptr, free);
@@ -842,6 +841,7 @@ static void rna_def_property(BlenderRNA *brna)
{PROP_DIRPATH, "DIRECTORY_PATH", 0, "Directory Path", ""},
{PROP_UNSIGNED, "UNSIGNED", 0, "Unsigned Number", ""},
{PROP_PERCENTAGE, "PERCENTAGE", 0, "Percentage", ""},
+ {PROP_FACTOR, "FACTOR", 0, "Factor", ""},
{PROP_ANGLE, "ANGLE", 0, "Angle", ""},
{PROP_TIME, "TIME", 0, "Time", ""},
{PROP_DISTANCE, "DISTANCE", 0, "Distance", ""},
@@ -853,7 +853,6 @@ static void rna_def_property(BlenderRNA *brna)
{PROP_QUATERNION, "QUATERNION", 0, "Quaternion", ""},
{PROP_XYZ, "XYZ", 0, "XYZ", ""},
{PROP_RGB, "RGB", 0, "RGB", ""},
- {PROP_NEVER_NULL, "NEVER_NULL", 0, "Never Null", ""},
{PROP_LAYER, "LAYER", 0, "Layer", ""},
{PROP_LAYER_MEMBER, "LAYER_MEMBERSHIP", 0, "Layer Membership", ""},
{0, NULL, 0, NULL, NULL}};
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 15329b126d3..b9fd2926ca3 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -43,8 +43,15 @@
#include "WM_types.h"
-/* prop_mode needs to be accessible from transform operator */
-EnumPropertyItem prop_mode_items[] ={
+
+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}};
+
+EnumPropertyItem proportional_falloff_items[] ={
{PROP_SMOOTH, "SMOOTH", 0, "Smooth", ""},
{PROP_SPHERE, "SPHERE", 0, "Sphere", ""},
{PROP_ROOT, "ROOT", 0, "Root", ""},
@@ -54,14 +61,24 @@ EnumPropertyItem prop_mode_items[] ={
{PROP_RANDOM, "RANDOM", 0, "Random", ""},
{0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem proportional_editing_items[] = {
+ {PROP_EDIT_OFF, "DISABLED", 0, "Disable", ""},
+ {PROP_EDIT_ON, "ENABLED", 0, "Enable", ""},
+ {PROP_EDIT_CONNECTED, "CONNECTED", 0, "Connected", ""},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
#include "DNA_anim_types.h"
#include "DNA_node_types.h"
+#include "DNA_object_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
+#include "BKE_scene.h"
#include "BKE_node.h"
+#include "BKE_pointcache.h"
#include "BLI_threads.h"
@@ -78,6 +95,35 @@ static PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base*)internal->link)->object);
}
+static PointerRNA rna_Scene_active_object_get(PointerRNA *ptr)
+{
+ Scene *scene= (Scene*)ptr->data;
+ return rna_pointer_inherit_refine(ptr, &RNA_Object, scene->basact ? scene->basact->object : NULL);
+}
+
+static void rna_Scene_active_object_set(PointerRNA *ptr, PointerRNA value)
+{
+ Scene *scene= (Scene*)ptr->data;
+ if(value.data)
+ scene->basact= object_in_scene((Object*)value.data, scene);
+ else
+ scene->basact= NULL;
+}
+
+static void rna_Scene_set_set(PointerRNA *ptr, PointerRNA value)
+{
+ Scene *scene= (Scene*)ptr->data;
+ Scene *set= (Scene*)value.data;
+ Scene *nested_set;
+
+ for(nested_set= set; nested_set; nested_set= nested_set->set) {
+ if(nested_set==scene)
+ return;
+ }
+
+ scene->set= set;
+}
+
static int layer_set(int lay, const int *values)
{
int i, tot= 0;
@@ -257,6 +303,43 @@ static void rna_SceneRenderData_file_format_set(PointerRNA *ptr, int value)
#endif
}
+void rna_SceneRenderData_jpeg2k_preset_update(RenderData *rd)
+{
+ rd->subimtype &= ~(R_JPEG2K_12BIT|R_JPEG2K_16BIT | R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS);
+
+ switch(rd->jp2_depth) {
+ case 8: break;
+ case 12: rd->subimtype |= R_JPEG2K_12BIT; break;
+ case 16: rd->subimtype |= R_JPEG2K_16BIT; break;
+ }
+
+ switch(rd->jp2_preset) {
+ case 1: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
+ case 2: rd->subimtype |= R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS; break;
+ case 3: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
+ case 4: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
+ case 5: rd->subimtype |= R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS; break;
+ case 6: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
+ case 7: rd->subimtype |= R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS; break;
+ }
+}
+
+#ifdef WITH_OPENJPEG
+static void rna_SceneRenderData_jpeg2k_preset_set(PointerRNA *ptr, int value)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+ rd->jp2_preset= value;
+ rna_SceneRenderData_jpeg2k_preset_update(rd);
+}
+
+static void rna_SceneRenderData_jpeg2k_depth_set(PointerRNA *ptr, int value)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+ rd->jp2_depth= value;
+ rna_SceneRenderData_jpeg2k_preset_update(rd);
+}
+#endif
+
static int rna_SceneRenderData_active_layer_index_get(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
@@ -380,8 +463,36 @@ static void rna_Scene_use_nodes_set(PointerRNA *ptr, int value)
ED_node_composit_default(scene);
}
+static void rna_Physics_update(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene= (Scene*)ptr->id.data;
+ Base *base;
+
+ for(base = scene->base.first; base; base=base->next)
+ BKE_ptcache_object_reset(scene, base->object, PTCACHE_RESET_DEPSGRAPH);
+}
#else
+static void rna_def_transform_orientation(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ int matrix_dimsize[]= {3, 3};
+
+ srna= RNA_def_struct(brna, "TransformOrientation", NULL);
+
+ prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
+ RNA_def_property_float_sdna(prop, NULL, "mat");
+ RNA_def_property_multi_array(prop, 2, matrix_dimsize);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "name");
+ RNA_def_struct_name_property(srna, prop);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+}
+
static void rna_def_tool_settings(BlenderRNA *brna)
{
StructRNA *srna;
@@ -407,13 +518,6 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{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}};
-
static EnumPropertyItem auto_key_items[] = {
{AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""},
{AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
@@ -443,14 +547,17 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Particle Edit", "");
/* Transform */
- prop= RNA_def_property(srna, "proportional_editing", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "proportional", 0);
+ prop= RNA_def_property(srna, "proportional_editing", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "proportional");
+ RNA_def_property_enum_items(prop, proportional_editing_items);
RNA_def_property_ui_text(prop, "Proportional Editing", "Proportional editing mode.");
+ RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
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_enum_items(prop, proportional_falloff_items);
RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
+ RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
prop= RNA_def_property(srna, "normal_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "normalsize");
@@ -488,6 +595,11 @@ static void rna_def_tool_settings(BlenderRNA *brna)
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);
+ prop= RNA_def_property(srna, "snap_project", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT);
+ RNA_def_property_ui_text(prop, "Project Individual Elements", "DOC_BROKEN");
+ RNA_def_property_ui_icon(prop, ICON_RETOPO, 0);
+
/* Auto Keying */
prop= RNA_def_property(srna, "enable_auto_key", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
@@ -523,7 +635,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
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);
+ prop= RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "vgroup_weight");
RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign in vertex groups.");
}
@@ -561,7 +673,6 @@ static void rna_def_unit_settings(BlenderRNA *brna)
RNA_def_property_update(prop, NC_WINDOW, NULL);
}
-
void rna_def_render_layer_common(StructRNA *srna, int scene)
{
PropertyRNA *prop;
@@ -1142,7 +1253,17 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{256, "OCTREE_RES_256", 0, "256", ""},
{512, "OCTREE_RES_512", 0, "512", ""},
{0, NULL, 0, NULL, NULL}};
-
+
+ static EnumPropertyItem raytrace_structure_items[] = {
+ {R_RAYSTRUCTURE_AUTO, "AUTO", 0, "Auto", ""},
+ {R_RAYSTRUCTURE_OCTREE, "OCTREE", 0, "Octree", "Use old Octree structure."},
+ {R_RAYSTRUCTURE_BLIBVH, "BLIBVH", 0, "BLI BVH", "Use BLI K-Dop BVH.c"},
+ {R_RAYSTRUCTURE_VBVH, "VBVH", 0, "vBVH", ""},
+ {R_RAYSTRUCTURE_SIMD_SVBVH, "SIMD_SVBVH", 0, "SIMD SVBVH", ""},
+ {R_RAYSTRUCTURE_SIMD_QBVH, "SIMD_QBVH", 0, "SIMD QBVH", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
static EnumPropertyItem fixed_oversample_items[] = {
{5, "OVERSAMPLE_5", 0, "5", ""},
{8, "OVERSAMPLE_8", 0, "8", ""},
@@ -1159,61 +1280,53 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{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", 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[] = {
{0, "", 0, "Image", NULL},
- {R_PNG, "PNG", 0, "PNG", ""},
- {R_JPEG90, "JPEG", 0, "JPEG", ""},
+ {R_PNG, "PNG", ICON_FILE_IMAGE, "PNG", ""},
+ {R_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", ""},
#ifdef WITH_OPENJPEG
- {R_JP2, "JPEG2000", 0, "JPEG 2000", ""},
+ {R_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", ""},
#endif
- {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", ""},
+ {R_BMP, "BMP", ICON_FILE_IMAGE, "BMP", ""},
+ {R_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", ""},
+ {R_RAWTGA, "RAWTARGA", ICON_FILE_IMAGE, "Targa Raw", ""},
+ //{R_DDS, "DDS", ICON_FILE_IMAGE, "DDS", ""}, // XXX not yet implemented
+ {R_HAMX, "HAMX", ICON_FILE_IMAGE, "HamX", ""},
+ {R_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", ""},
{0, "", 0, " ", NULL},
#ifdef WITH_OPENEXR
- {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
- {R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""},
+ {R_OPENEXR, "OPENEXR", ICON_FILE_IMAGE, "OpenEXR", ""},
+ {R_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", ""},
#endif
- {R_TIFF, "TIFF", 0, "TIFF", ""}, // XXX only with G.have_libtiff
- {R_RADHDR, "RADHDR", 0, "Radiance HDR", ""},
- {R_CINEON, "CINEON", 0, "Cineon", ""},
- {R_DPX, "DPX", 0, "DPX", ""},
+ {R_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", ""}, // XXX only with G.have_libtiff
+ {R_RADHDR, "RADHDR", ICON_FILE_IMAGE, "Radiance HDR", ""},
+ {R_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", ""},
+ {R_DPX, "DPX", ICON_FILE_IMAGE, "DPX", ""},
{0, "", 0, "Movie", NULL},
- {R_AVIRAW, "AVIRAW", 0, "AVI Raw", ""},
- {R_AVIJPEG, "AVIJPEG", 0, "AVI JPEG", ""},
+ {R_AVIRAW, "AVIRAW", ICON_FILE_MOVIE, "AVI Raw", ""},
+ {R_AVIJPEG, "AVIJPEG", ICON_FILE_MOVIE, "AVI JPEG", ""},
#ifdef _WIN32
- {R_AVICODEC, "AVICODEC", 0, "AVI Codec", ""},
+ {R_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", ""},
#endif
#ifdef WITH_QUICKTIME
- {R_QUICKTIME, "QUICKTIME", 0, "QuickTime", ""},
+ {R_QUICKTIME, "QUICKTIME", ICON_FILE_MOVIE, "QuickTime", ""},
#endif
#ifdef __sgi
- {R_MOVIE, "MOVIE", 0, "Movie", ""},
+ {R_MOVIE, "MOVIE", ICON_FILE_MOVIE, "Movie", ""},
#endif
#ifdef WITH_FFMPEG
- {R_H264, "H264", 0, "H.264", ""},
- {R_XVID, "XVID", 0, "Xvid", ""},
+ {R_H264, "H264", ICON_FILE_MOVIE, "H.264", ""},
+ {R_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", ""},
// XXX broken
#if 0
#ifdef WITH_OGG
- {R_THEORA, "THEORA", 0, "Ogg Theora", ""},
+ {R_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", ""},
#endif
#endif
- {R_FFMPEG, "FFMPEG", 0, "FFMpeg", ""},
+ {R_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "FFMpeg", ""},
#endif
- {R_FRAMESERVER, "FRAMESERVER", 0, "Frame Server", ""},
+ {R_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", ""},
{0, NULL, 0, NULL, NULL}};
#ifdef WITH_OPENEXR
@@ -1229,19 +1342,19 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
#ifdef WITH_OPENJPEG
static EnumPropertyItem jp2_preset_items[] = {
{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", ""},
+ {1, "CINE_24FPS", 0, "Cinema 24fps 2048x1080", ""},
+ {2, "CINE_48FPS", 0, "Cinema 48fps 2048x1080", ""},
+ {3, "CINE_24FPS_4K", 0, "Cinema 24fps 4096x2160", ""},
+ {4, "CINE_SCOPE_48FPS", 0, "Cine-Scope 24fps 2048x858", ""},
+ {5, "CINE_SCOPE_48FPS", 0, "Cine-Scope 48fps 2048x858", ""},
+ {6, "CINE_FLAT_24FPS", 0, "Cine-Flat 24fps 1998x1080", ""},
+ {7, "CINE_FLAT_48FPS", 0, "Cine-Flat 48fps 1998x1080", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem jp2_depth_items[] = {
- {0, "8", 0, "8", ""},
- {R_JPEG2K_12BIT, "16", 0, "16", ""},
- {R_JPEG2K_16BIT, "32", 0, "32", ""},
+ {8, "8", 0, "8", "8 bit color channels"},
+ {12, "12", 0, "12", "12 bit color channels"},
+ {16, "16", 0, "16", "16 bit color channels"},
{0, NULL, 0, NULL, NULL}};
#endif
@@ -1302,23 +1415,25 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
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", "Choose BW for saving greyscale images, RGB for saving red, green and blue channels, AND RGBA for saving red, green, blue + alpha channels");
-
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xsch");
RNA_def_property_range(prop, 4, 10000);
RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image.");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ysch");
RNA_def_property_range(prop, 4, 10000);
RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image.");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);
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 %", "Percentage scale for render resolution");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xparts");
@@ -1336,13 +1451,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "xasp");
RNA_def_property_range(prop, 1.0f, 200.0f);
RNA_def_property_ui_text(prop, "Pixel Aspect X", "Horizontal aspect ratio - for anamorphic or non-square pixel output");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yasp");
RNA_def_property_range(prop, 1.0f, 200.0f);
RNA_def_property_ui_text(prop, "Pixel Aspect Y", "Vertical aspect ratio - for anamorphic or non-square pixel output");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);
/* JPEG and AVI JPEG */
@@ -1412,19 +1527,21 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
#ifdef WITH_OPENJPEG
/* Jpeg 2000 */
- prop= RNA_def_property(srna, "jpeg_preset", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_preset");
+ prop= RNA_def_property(srna, "jpeg2k_preset", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "jp2_preset");
RNA_def_property_enum_items(prop, jp2_preset_items);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_jpeg2k_preset_set", NULL);
RNA_def_property_ui_text(prop, "Preset", "Use a DCI Standard preset for saving jpeg2000");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "jpeg_depth", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "jpeg2k_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_enum_funcs(prop, NULL, "rna_SceneRenderData_jpeg2k_depth_set", NULL);
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);
+ prop= RNA_def_property(srna, "jpeg2k_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 channels instead of RGB colors");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -1510,6 +1627,19 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
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);
+
+ prop= RNA_def_property(srna, "ffmpeg_audio_mixrate", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_mixrate");
+ RNA_def_property_range(prop, 8000, 192000);
+ RNA_def_property_ui_text(prop, "Samplerate", "Audio samplerate(samples/s)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "ffmpeg_audio_volume", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "ffcodecdata.audio_volume");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Volume", "Audio volume");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
#endif
prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
@@ -1553,7 +1683,23 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
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_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
+
+ prop= RNA_def_property(srna, "raytrace_structure", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "raytrace_structure");
+ RNA_def_property_enum_items(prop, raytrace_structure_items);
+ RNA_def_property_ui_text(prop, "Raytrace Acceleration Structure", "Type of raytrace accelerator structure.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "use_instances", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_INSTANCES);
+ RNA_def_property_ui_text(prop, "Use Instances", "Instance support leads to effective memory reduction when using duplicates.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_LOCAL_COORDS);
+ RNA_def_property_ui_text(prop, "Use Local Coords", "Vertex coordinates are stored localy on each primitive. Increases memory usage, but may have impact on speed.");
+ 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", "Render and combine multiple samples per pixel to prevent jagged edges.");
@@ -1574,17 +1720,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
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", "Order of video fields. Select which lines get rendered first, to create smooth motion for TV output");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
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", "Disable the time difference between fields.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "sync_audio", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
- RNA_def_property_ui_text(prop, "Sync Audio", "Play back and sync with audio from Sequence Editor");
- RNA_def_property_update(prop, NC_SCENE, NULL);
-
prop= RNA_def_property(srna, "render_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
RNA_def_property_ui_text(prop, "Render Shadows", "Calculate shadows while rendering.");
@@ -1643,6 +1785,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
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", "Determine the amount of render threads used");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "motion_blur", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
@@ -1653,6 +1796,30 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER);
RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "border.xmin");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Border Minimum X", "Sets minimum X value to for the render border.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "border_min_y", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "border.ymin");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Border Minimum Y", "Sets minimum Y value for the render border");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "border_max_x", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "border.xmax");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Border Maximum X", "Sets maximum X value for the render border");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "border_max_y", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "border.ymax");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Border Maximum Y", "Sets maximum Y value for the render border");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "crop_to_border", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP);
@@ -1726,6 +1893,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
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");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "output_path", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "pic");
@@ -1829,23 +1997,28 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP);
RNA_def_property_ui_text(prop, "Stamp Sequence Strip", "Include the name of the foreground sequence strip in image metadata");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_render_time", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_RENDERTIME);
+ RNA_def_property_ui_text(prop, "Stamp Render Time", "Include the render time in the stamp image");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "stamp_udata");
RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear in the stamp note");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
+
prop= RNA_def_property(srna, "render_stamp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DRAW);
RNA_def_property_ui_text(prop, "Render Stamp", "Render the stamp info text in the rendered image");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- 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 text");
+ prop= RNA_def_property(srna, "stamp_font_size", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "stamp_font_id");
+ RNA_def_property_range(prop, 8, 64);
+ RNA_def_property_ui_text(prop, "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);
@@ -1902,6 +2075,16 @@ void RNA_def_scene(BlenderRNA *brna)
PropertyRNA *prop;
FunctionRNA *func;
+ static EnumPropertyItem audio_distance_model_items[] = {
+ {0, "NONE", 0, "None", "No distance attenuation."},
+ {1, "INVERSE", 0, "Inverse", "Inverse distance model."},
+ {2, "INVERSE_CLAMPED", 0, "Inverse Clamped", "Inverse distance model with clamping."},
+ {3, "LINEAR", 0, "Linear", "Linear distance model."},
+ {4, "LINEAR_CLAMPED", 0, "Linear Clamped", "Linear distance model with clamping."},
+ {5, "EXPONENT", 0, "Exponent", "Exponent distance model."},
+ {6, "EXPONENT_CLAMPED", 0, "Exponent Clamped", "Exponent distance model with clamping."},
+ {0, NULL, 0, NULL, NULL}};
+
/* Struct definition */
srna= RNA_def_struct(brna, "Scene", "ID");
RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings.");
@@ -1913,6 +2096,21 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Camera", "Active camera used for rendering the scene.");
+ prop= RNA_def_property(srna, "set", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "set");
+ RNA_def_property_struct_type(prop, "Scene");
+ //RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_set_set", NULL);
+ RNA_def_property_ui_text(prop, "Set Scene", "Background set scene.");
+
+ prop= RNA_def_property(srna, "active_object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_pointer_funcs(prop, "rna_Scene_active_object_get", "rna_Scene_active_object_set", NULL);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Object", "Object to use as projector transform.");
+
+
prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "World", "World used for rendering the scene.");
@@ -1951,6 +2149,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_int_sdna(prop, NULL, "r.sfra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL);
+ RNA_def_property_range(prop, MINFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Start Frame", "");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -1958,12 +2157,15 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_int_sdna(prop, NULL, "r.efra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL);
+ RNA_def_property_range(prop, MINFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "End Frame", "");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_int_sdna(prop, NULL, "frame_step");
+ RNA_def_property_range(prop, 0, MAXFRAME);
+ RNA_def_property_ui_range(prop, 0, 100, 1, 0);
RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -1994,6 +2196,9 @@ 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);
+ /* Animation Data (for Scene) */
+ rna_def_animdata_common(srna);
+
/* Nodes (Compositing) */
prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree.");
@@ -2032,19 +2237,35 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
/* Tool Settings */
- prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "toolsettings");
RNA_def_property_struct_type(prop, "ToolSettings");
RNA_def_property_ui_text(prop, "Tool Settings", "");
/* Unit Settings */
- prop= RNA_def_property(srna, "unit_settings", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "unit_settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "unit");
RNA_def_property_struct_type(prop, "UnitSettings");
RNA_def_property_ui_text(prop, "Unit Settings", "Unit editing settings");
+
+ /* Physics Settings */
+ prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
+ RNA_def_property_float_sdna(prop, NULL, "physics_settings.gravity");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in a given direction");
+ RNA_def_property_update(prop, 0, "rna_Physics_update");
+
+ prop= RNA_def_property(srna, "use_gravity", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "physics_settings.flag", PHYS_GLOBAL_GRAVITY);
+ RNA_def_property_ui_text(prop, "Global Gravity", "Use global gravity for all dynamics.");
+ RNA_def_property_update(prop, 0, "rna_Physics_update");
/* Render Data */
- prop= RNA_def_property(srna, "render_data", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "render_data", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "r");
RNA_def_property_struct_type(prop, "SceneRenderData");
RNA_def_property_ui_text(prop, "Render Data", "");
@@ -2055,8 +2276,43 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "TimelineMarker");
RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all timelines for the current scene.");
+ /* Audio Settings */
+ prop= RNA_def_property(srna, "mute_audio", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_MUTE);
+ RNA_def_property_ui_text(prop, "Audio Muted", "Play back of audio from Sequence Editor will be muted.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "sync_audio", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
+ RNA_def_property_ui_text(prop, "Audio Sync", "Play back and sync with audio from Sequence Editor.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "scrub_audio", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SCRUB);
+ RNA_def_property_ui_text(prop, "Audio Scrubbing", "Play audio from Sequence Editor while scrubbing.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "speed_of_sound", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "audio.speed_of_sound");
+ RNA_def_property_range(prop, 0.01f, FLT_MAX);
+ RNA_def_property_ui_text(prop, "Speed of Sound", "Speed of sound for doppler effect calculation.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "doppler_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "audio.doppler_factor");
+ RNA_def_property_range(prop, 0.0, FLT_MAX);
+ RNA_def_property_ui_text(prop, "Doppler Factor", "Pitch factor for doppler effect calculation.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "distance_model", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio.distance_model");
+ RNA_def_property_enum_items(prop, audio_distance_model_items);
+ RNA_def_property_ui_text(prop, "Distance Model", "Distance model for distance attenuation calculation.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
/* Game Settings */
- prop= RNA_def_property(srna, "game_data", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "game_data", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "gm");
RNA_def_property_struct_type(prop, "SceneGameData");
RNA_def_property_ui_text(prop, "Game Data", "");
@@ -2073,12 +2329,19 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "GreasePencil");
RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock");
+ /* Transform Orientations */
+ prop= RNA_def_property(srna, "orientations", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "transform_spaces", NULL);
+ RNA_def_property_struct_type(prop, "TransformOrientation");
+ RNA_def_property_ui_text(prop, "Transform Orientations", "");
+
/* Nestled Data */
rna_def_tool_settings(brna);
rna_def_unit_settings(brna);
rna_def_scene_render_data(brna);
rna_def_scene_game_data(brna);
rna_def_scene_render_layer(brna);
+ rna_def_transform_orientation(brna);
/* Scene API */
RNA_api_scene(srna);
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 26047ab5dc3..40f2db6d4a4 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -1,5 +1,5 @@
/**
- * $Id:
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -21,7 +21,7 @@
* All rights reserved.
*
*
- * Contributor(s): Joshua Leung
+ * Contributor(s): Joshua Leung, Arystanbek Dyussenov
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -40,9 +40,49 @@
#ifdef RNA_RUNTIME
#include "BKE_animsys.h"
+#include "BKE_scene.h"
+#include "BKE_depsgraph.h"
-// Scene API stuff from kazanbas branch here...
+#include "ED_object.h"
+#include "WM_api.h"
+
+static void rna_Scene_add_object(Scene *sce, ReportList *reports, Object *ob)
+{
+ Base *base= object_in_scene(ob, sce);
+ if (base) {
+ BKE_report(reports, RPT_ERROR, "Object is already in this scene.");
+ return;
+ }
+ base= scene_add_base(sce, ob);
+ ob->id.us++;
+
+ /* this is similar to what object_add_type and add_object do */
+ ob->lay= base->lay= sce->lay;
+ ob->recalc |= OB_RECALC;
+
+ DAG_scene_sort(sce);
+}
+
+static void rna_Scene_remove_object(Scene *sce, ReportList *reports, Object *ob)
+{
+ Base *base= object_in_scene(ob, sce);
+ if (!base) {
+ BKE_report(reports, RPT_ERROR, "Object is not in this scene.");
+ return;
+ }
+ /* as long as ED_base_object_free_and_unlink calls free_libblock_us, we don't have to decrement ob->id.us */
+ ED_base_object_free_and_unlink(sce, base);
+}
+
+static void rna_Scene_set_frame(Scene *sce, bContext *C, int frame)
+{
+ sce->r.cfra= frame;
+ CLAMP(sce->r.cfra, MINAFRAME, MAXFRAME);
+ scene_update_for_newframe(sce, (1<<20) - 1);
+
+ WM_event_add_notifier(C, NC_SCENE|ND_FRAME, sce);
+}
static KeyingSet *rna_Scene_add_keying_set(Scene *sce, ReportList *reports,
char name[], int absolute, int insertkey_needed, int insertkey_visual)
@@ -77,21 +117,37 @@ void RNA_api_scene(StructRNA *srna)
{
FunctionRNA *func;
PropertyRNA *parm;
-
- // Scene API stuff from kazanbas branch here...
-
+
+ func= RNA_def_function(srna, "add_object", "rna_Scene_add_object");
+ RNA_def_function_ui_description(func, "Add object to scene.");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ parm= RNA_def_pointer(func, "object", "Object", "", "Object to add to scene.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ func= RNA_def_function(srna, "remove_object", "rna_Scene_remove_object");
+ RNA_def_function_ui_description(func, "Remove object from scene.");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove from scene.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ func= RNA_def_function(srna, "set_frame", "rna_Scene_set_frame");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ RNA_def_function_ui_description(func, "Set scene frame updating all objects immediately.");
+ parm= RNA_def_int(func, "frame", 0, MINAFRAME, MAXFRAME, "", "Frame number to set.", MINAFRAME, MAXFRAME);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
/* Add Keying Set */
func= RNA_def_function(srna, "add_keying_set", "rna_Scene_add_keying_set");
RNA_def_function_ui_description(func, "Add a new Keying Set to Scene.");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- /* returns the new KeyingSet */
+ /* returns the new KeyingSet */
parm= RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly created Keying Set.");
- RNA_def_function_return(func, parm);
- /* name */
+ RNA_def_function_return(func, parm);
+ /* name */
RNA_def_string(func, "name", "KeyingSet", 64, "Name", "Name of Keying Set");
- /* flags */
+ /* flags */
RNA_def_boolean(func, "absolute", 1, "Absolute", "Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)");
- /* keying flags */
+ /* keying flags */
RNA_def_boolean(func, "insertkey_needed", 0, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves.");
RNA_def_boolean(func, "insertkey_visual", 0, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'.");
}
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 7a243327bd1..004c57eedfc 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -26,6 +26,7 @@
#include "RNA_define.h"
#include "RNA_types.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
@@ -77,6 +78,22 @@ static int rna_Screen_animation_playing_get(PointerRNA *ptr)
return (sc->animtimer != NULL);
}
+static void rna_Area_type_set(PointerRNA *ptr, int value)
+{
+ ScrArea *sa= (ScrArea*)ptr->data;
+ sa->butspacetype= value;
+}
+
+static void rna_Area_type_update(bContext *C, PointerRNA *ptr)
+{
+ ScrArea *sa= (ScrArea*)ptr->data;
+
+ if(sa) {
+ ED_area_newspace(C, sa, sa->butspacetype); /* XXX - this uses the window */
+ ED_area_tag_redraw(sa);
+ }
+}
+
#else
static void rna_def_area(BlenderRNA *brna)
@@ -107,6 +124,14 @@ static void rna_def_area(BlenderRNA *brna)
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", HEADER_NO_PULLDOWN);
RNA_def_property_ui_text(prop, "Show Menus", "Show menus in the header.");
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "spacetype");
+ RNA_def_property_enum_items(prop, space_type_items);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_Area_type_set", NULL);
+ RNA_def_property_ui_text(prop, "Type", "Space type.");
+ RNA_def_property_update(prop, 0, "rna_Area_type_update");
+
+
RNA_def_function(srna, "tag_redraw", "ED_area_tag_redraw");
}
@@ -135,10 +160,10 @@ static void rna_def_screen(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Screen", "Screen datablock, defining the layout of areas in a window.");
RNA_def_struct_ui_icon(srna, ICON_SPLITSCREEN);
- 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);
+ prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Screen_scene_set", NULL);
+ RNA_def_property_ui_text(prop, "Scene", "Active scene to be edited in the screen.");
RNA_def_property_update(prop, 0, "rna_Screen_scene_update");
prop= RNA_def_property(srna, "areas", PROP_COLLECTION, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index ab4b27cea7b..7f8ded7d3ee 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -119,27 +119,13 @@ static void rna_ParticleEdit_update(bContext *C, PointerRNA *ptr)
static EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *ptr, int *free)
{
- if(C==NULL) {
- EnumPropertyItem *item= NULL;
- int totitem= 0;
-
- /* needed for doc generation */
- RNA_enum_items_add(&item, &totitem, particle_edit_hair_brush_items);
- RNA_enum_item_end(&item, &totitem);
-
- *free= 1;
-
- return item;
- }
- else {
- Scene *scene= CTX_data_scene(C);
- PTCacheEdit *edit = PE_get_current(scene, CTX_data_active_object(C));
-
- if(edit && edit->psys)
- return particle_edit_hair_brush_items;
+ Scene *scene= CTX_data_scene(C);
+ PTCacheEdit *edit = PE_get_current(scene, CTX_data_active_object(C));
+
+ if(edit && edit->psys)
+ return particle_edit_hair_brush_items;
- return particle_edit_cache_brush_items;
- }
+ return particle_edit_cache_brush_items;
}
static int rna_ParticleEdit_editable_get(PointerRNA *ptr)
@@ -231,7 +217,7 @@ static void rna_def_vertex_paint(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_mode_items[] = {
+ static EnumPropertyItem brush_mode_items[] = {
{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."},
@@ -246,7 +232,7 @@ static void rna_def_vertex_paint(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Vertex Paint", "Properties of vertex and weight paint mode.");
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_mode_items);
+ RNA_def_property_enum_items(prop, brush_mode_items);
RNA_def_property_ui_text(prop, "Brush Mode", "Mode in which color is painted.");
prop= RNA_def_property(srna, "all_faces", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index a5d76fdb039..1003af6d4d1 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -48,6 +48,8 @@ static StructRNA* rna_Sensor_refine(struct PointerRNA *ptr)
return &RNA_KeyboardSensor;
case SENS_PROPERTY:
return &RNA_PropertySensor;
+ case SENS_ARMATURE:
+ return &RNA_ArmatureSensor;
case SENS_MOUSE:
return &RNA_MouseSensor;
case SENS_COLLISION:
@@ -92,6 +94,7 @@ static void rna_def_sensor(BlenderRNA *brna)
{SENS_JOYSTICK, "JOYSTICK", 0, "joystick", ""},
{SENS_ACTUATOR, "ACTUATOR", 0, "Actuator", ""},
{SENS_DELAY, "DELAY", 0, "Delay", ""},
+ {SENS_ARMATURE, "ARMATURE", 0, "Armature", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Sensor", NULL);
@@ -278,6 +281,40 @@ static void rna_def_property_sensor(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Maximum Value", "Specify maximum value in Interval type.");
}
+static void rna_def_armature_sensor(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+ static EnumPropertyItem prop_type_items[] ={
+ {SENS_ARM_STATE_CHANGED, "STATECHG", 0, "State Changed", ""},
+ {SENS_ARM_LIN_ERROR_BELOW, "LINERRORBELOW", 0, "Lin error below", ""},
+ {SENS_ARM_LIN_ERROR_ABOVE, "LINERRORABOVE", 0, "Lin error above", ""},
+ {SENS_ARM_ROT_ERROR_BELOW, "ROTERRORBELOW", 0, "Rot error below", ""},
+ {SENS_ARM_ROT_ERROR_ABOVE, "ROTERRORBELOW", 0, "Rot error above", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "ArmatureSensor", "Sensor");
+ RNA_def_struct_ui_text(srna, "Armature Sensor", "Sensor to detect values and changes in values of IK solver.");
+ RNA_def_struct_sdna_from(srna, "bArmatureSensor", "data");
+
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type");
+ RNA_def_property_enum_items(prop, prop_type_items);
+ RNA_def_property_ui_text(prop, "Test Type", "Type of value and test.");
+
+ prop= RNA_def_property(srna, "channel_name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "posechannel");
+ RNA_def_property_ui_text(prop, "Bone name", "Identify the bone to check value from");
+
+ prop= RNA_def_property(srna, "constraint_name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "constraint");
+ RNA_def_property_ui_text(prop, "Constraint name", "Identify the bone constraint to check value from.");
+
+ prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "value");
+ RNA_def_property_ui_text(prop, "Compare Value", "Specify value to be used in comparison.");
+}
+
static void rna_def_actuator_sensor(BlenderRNA *brna)
{
StructRNA *srna;
@@ -531,6 +568,7 @@ void RNA_def_sensor(BlenderRNA *brna)
rna_def_touch_sensor(brna);
rna_def_keyboard_sensor(brna);
rna_def_property_sensor(brna);
+ rna_def_armature_sensor(brna);
rna_def_actuator_sensor(brna);
rna_def_delay_sensor(brna);
rna_def_collision_sensor(brna);
diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c
index 4e12aab853e..c48031d51b3 100644
--- a/source/blender/makesrna/intern/rna_sequence.c
+++ b/source/blender/makesrna/intern/rna_sequence.c
@@ -228,7 +228,15 @@ static char *rna_Sequence_path(PointerRNA *ptr)
/* sequencer data comes from scene...
* TODO: would be nice to make SequenceEditor data a datablock of its own (for shorter paths)
*/
- return BLI_sprintfN("sequence_editor.sequences[\"%s\"]", seq->name+2);
+ if (seq->name+2)
+ return BLI_sprintfN("sequence_editor.sequences[\"%s\"]", seq->name+2);
+ else {
+ /* compromise for the frequent sitation when strips don't have names... */
+ Scene *sce= (Scene*)ptr->id.data;
+ Editing *ed= seq_give_editing(sce, FALSE);
+
+ return BLI_sprintfN("sequence_editor.sequences[%d]", BLI_findindex(&ed->seqbase, seq));
+ }
}
static PointerRNA rna_SequenceEdtior_meta_stack_get(CollectionPropertyIterator *iter)
@@ -239,6 +247,35 @@ static PointerRNA rna_SequenceEdtior_meta_stack_get(CollectionPropertyIterator *
return rna_pointer_inherit_refine(&iter->parent, &RNA_Sequence, ms->parseq);
}
+static void rna_MovieSequence_filename_set(PointerRNA *ptr, const char *value)
+{
+ Sequence *seq= (Sequence*)(ptr->data);
+ char dir[FILE_MAX], name[FILE_MAX];
+
+ BLI_split_dirfile_basic(value, dir, name);
+ BLI_strncpy(seq->strip->dir, dir, sizeof(seq->strip->dir));
+ BLI_strncpy(seq->strip->stripdata->name, name, sizeof(seq->strip->stripdata->name));
+}
+
+static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
+{
+ Sequence *seq= (Sequence*)(ptr->data);
+ char dir[FILE_MAX], name[FILE_MAX];
+
+ BLI_split_dirfile_basic(value, dir, name);
+ BLI_strncpy(seq->strip->dir, dir, sizeof(seq->strip->dir));
+ BLI_strncpy(seq->strip->stripdata->name, name, sizeof(seq->strip->stripdata->name));
+}
+
+static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value)
+{
+ StripElem *elem= (StripElem*)(ptr->data);
+ char name[FILE_MAX];
+
+ BLI_split_dirfile_basic(value, NULL, name);
+ BLI_strncpy(elem->name, name, sizeof(elem->name));
+}
+
#else
static void rna_def_strip_element(BlenderRNA *brna)
@@ -253,6 +290,7 @@ static void rna_def_strip_element(BlenderRNA *brna)
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Filename", "");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SequenceElement_filename_set");
}
static void rna_def_strip_crop(BlenderRNA *brna)
@@ -490,6 +528,7 @@ static void rna_def_sequence(BlenderRNA *brna)
prop= RNA_def_property(srna, "channel", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "machine");
+ RNA_def_property_range(prop, 0, MAXSEQ-1);
RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip.");
RNA_def_property_int_funcs(prop, NULL, "rna_SequenceEditor_channel_set",NULL); // overlap test
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
@@ -509,7 +548,7 @@ static void rna_def_sequence(BlenderRNA *brna)
/* 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);
+ prop= RNA_def_int(func, "frame", 0, -MAXFRAME, MAXFRAME, "Frame", "The frame to get the strip element from", -MAXFRAME, MAXFRAME);
RNA_def_property_flag(prop, PROP_REQUIRED);
RNA_def_function_return(func, RNA_def_pointer(func, "elem", "SequenceElement", "", "strip element of the current frame"));
}
@@ -736,6 +775,7 @@ static void rna_def_movie(BlenderRNA *brna)
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "strip->stripdata->name");
RNA_def_property_ui_text(prop, "Filename", "");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MovieSequence_filename_set");
prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "strip->dir");
@@ -762,6 +802,7 @@ static void rna_def_sound(BlenderRNA *brna)
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "strip->stripdata->name");
RNA_def_property_ui_text(prop, "Filename", "");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SoundSequence_filename_set");
prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "strip->dir");
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 943129c7169..c8193bb4005 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -211,13 +211,20 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Logarithmic dissolve", "Using 1/x ");
RNA_def_property_update(prop, 0, NULL);
- prop= RNA_def_property(srna, "point_cache_low", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "point_cache_low", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "point_cache[0]");
RNA_def_property_ui_text(prop, "Point Cache", "");
- prop= RNA_def_property(srna, "point_cache_high", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "point_cache_high", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "point_cache[1]");
RNA_def_property_ui_text(prop, "Point Cache", "");
+
+ prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "EffectorWeights");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Effector Weights", "");
}
static void rna_def_smoke_flow_settings(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index bb01ab9a9c7..72856e54bdf 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -38,8 +38,7 @@
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
-#include "BKE_paint.h"
-
+#include "WM_api.h"
#include "WM_types.h"
EnumPropertyItem space_type_items[] = {
@@ -65,26 +64,35 @@ EnumPropertyItem space_type_items[] = {
{SPACE_USERPREF, "USER_PREFERENCES", 0, "User Preferences", ""},
{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)."}
+static EnumPropertyItem draw_channels_items[] = {
+ {0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors."},
+ {SI_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha", "Draw image with RGB colors and alpha transparency."},
+ {SI_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Draw alpha transparency channel."},
+ {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}
+ {SI_COLOR_CORRECTION, "COLOR_CORRECTED", ICON_IMAGE_ALPHA, "Color Corrected", "Display color corrected image."},
#endif
-#define DC_ZERO {0, NULL, 0, NULL, NULL}
+ {0, NULL, 0, NULL, NULL}};
-static EnumPropertyItem dc_all_items[] = {DC_RGB, DC_RGBA, DC_ALPHA, DC_Z, DC_LCMS, DC_ZERO};
+static EnumPropertyItem transform_orientation_items[] = {
+ {V3D_MANIP_GLOBAL, "GLOBAL", 0, "Global", "Align the transformation axes to world space"},
+ {V3D_MANIP_LOCAL, "LOCAL", 0, "Local", "Align the transformation axes to the selected objects' local space"},
+ {V3D_MANIP_NORMAL, "NORMAL", 0, "Normal", "Align the transformation axes to average normal of selected elements (bone Y axis for pose mode)"},
+ {V3D_MANIP_VIEW, "VIEW", 0, "View", "Align the transformation axes to the window"},
+ {V3D_MANIP_CUSTOM, "CUSTOM", 0, "Custom", "Use a custom transform orientation"},
+ {0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
+#include "DNA_anim_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
+#include "BKE_animsys.h"
#include "BKE_brush.h"
+#include "BKE_colortools.h"
#include "BKE_context.h"
+#include "BKE_paint.h"
#include "ED_image.h"
#include "ED_screen.h"
@@ -139,6 +147,59 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
}
}
+static PointerRNA rna_CurrentOrientation_get(PointerRNA *ptr)
+{
+ Scene *scene = ((bScreen*)ptr->id.data)->scene;
+ View3D *v3d= (View3D*)ptr->data;
+
+ if (v3d->twmode < 4)
+ return rna_pointer_inherit_refine(ptr, &RNA_TransformOrientation, NULL);
+ else
+ return rna_pointer_inherit_refine(ptr, &RNA_TransformOrientation, BLI_findlink(&scene->transform_spaces, v3d->twmode - 4));
+}
+
+EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ Scene *scene = NULL;
+ ListBase *transform_spaces;
+ TransformOrientation *ts= NULL;
+ EnumPropertyItem tmp = {0, "", 0, "", ""};
+ EnumPropertyItem *item= NULL;
+ int i = V3D_MANIP_CUSTOM, totitem= 0;
+
+ RNA_enum_items_add_value(&item, &totitem, transform_orientation_items, V3D_MANIP_GLOBAL);
+ RNA_enum_items_add_value(&item, &totitem, transform_orientation_items, V3D_MANIP_NORMAL);
+ RNA_enum_items_add_value(&item, &totitem, transform_orientation_items, V3D_MANIP_LOCAL);
+ RNA_enum_items_add_value(&item, &totitem, transform_orientation_items, V3D_MANIP_VIEW);
+
+ if (ptr->type == &RNA_Space3DView)
+ scene = ((bScreen*)ptr->id.data)->scene;
+ else
+ scene = CTX_data_scene(C); /* can't use scene from ptr->id.data because that enum is also used by operators */
+
+ if(scene) {
+ transform_spaces = &scene->transform_spaces;
+ ts = transform_spaces->first;
+ }
+
+ if(ts)
+ {
+ RNA_enum_item_add_separator(&item, &totitem);
+
+ for(; ts; ts = ts->next) {
+ tmp.identifier = ts->name;
+ tmp.name= ts->name;
+ tmp.value = i++;
+ RNA_enum_item_add(&item, &totitem, &tmp);
+ }
+ }
+
+ RNA_enum_item_end(&item, &totitem);
+ *free= 1;
+
+ return item;
+}
+
/* Space Image Editor */
static PointerRNA rna_SpaceImageEditor_uvedit_get(PointerRNA *ptr)
@@ -181,34 +242,58 @@ static void rna_SpaceImageEditor_image_set(PointerRNA *ptr, PointerRNA value)
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;
+ EnumPropertyItem *item= NULL;
+ ImBuf *ibuf;
+ void *lock;
+ int zbuf, alpha, totitem= 0;
- if(C==NULL) {
- /* needed for doc generation */
- return dc_all_items;
- }
+ ibuf= ED_space_image_acquire_buffer(sima, &lock);
alpha= ibuf && (ibuf->channels == 4);
zbuf= ibuf && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1));
+ ED_space_image_release_buffer(sima, lock);
+
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;
+ return draw_channels_items;
+
+ RNA_enum_items_add_value(&item, &totitem, draw_channels_items, 0);
+
+ if(alpha) {
+ RNA_enum_items_add_value(&item, &totitem, draw_channels_items, SI_SHOW_ALPHA);
+ RNA_enum_items_add_value(&item, &totitem, draw_channels_items, SI_USE_ALPHA);
+ }
+ else if(zbuf) {
+ RNA_enum_items_add_value(&item, &totitem, draw_channels_items, SI_SHOW_ZBUF);
+ }
+
+#ifdef WITH_LCMS
+ RNA_enum_items_add_value(&item, &totitem, draw_channels_items, SI_COLOR_CORRECTION);
+#endif
+
+ RNA_enum_item_end(&item, &totitem);
+ *free= 1;
+
+ return item;
}
+static void rna_SpaceImageEditor_curves_update(bContext *C, PointerRNA *ptr)
+{
+ SpaceImage *sima= (SpaceImage*)ptr->data;
+ ImBuf *ibuf;
+ void *lock;
+
+ ibuf= ED_space_image_acquire_buffer(sima, &lock);
+ curvemapping_do_ibuf(sima->cumap, ibuf);
+ ED_space_image_release_buffer(sima, lock);
+
+ WM_event_add_notifier(C, NC_IMAGE, sima->image);
+}
+
+
/* Space Text Editor */
static void rna_SpaceTextEditor_word_wrap_set(PointerRNA *ptr, int value)
@@ -227,13 +312,6 @@ static void rna_SpaceTextEditor_text_set(PointerRNA *ptr, PointerRNA value)
st->top= 0;
}
-static void rna_SpaceFileBrowser_params_set(PointerRNA *ptr, PointerRNA value)
-{
- SpaceFile *sfile= (SpaceFile*)(ptr->data);
-
- sfile->params= value.data;
-}
-
/* Space Properties */
static StructRNA *rna_SpaceProperties_pin_id_typef(PointerRNA *ptr)
@@ -311,12 +389,36 @@ static void rna_View3D_display_background_image_set(PointerRNA *ptr, int value)
}
/* Space Time */
+
static void rna_SpaceTime_redraw_update(bContext *C, PointerRNA *ptr)
{
SpaceTime *st= (SpaceTime*)ptr->data;
ED_screen_animation_timer_update(C, st->redraws);
}
+/* Space Dopesheet */
+
+static void rna_SpaceDopeSheetEditor_action_set(PointerRNA *ptr, PointerRNA value)
+{
+ SpaceAction *saction= (SpaceAction*)(ptr->data);
+ saction->action= value.data;
+}
+
+static void rna_SpaceDopeSheetEditor_action_update(bContext *C, PointerRNA *ptr)
+{
+ SpaceAction *saction= (SpaceAction*)(ptr->data);
+ Object *obact= CTX_data_active_object(C);
+
+ /* we must set this action to be the one used by active object (if not pinned) */
+ if(obact && saction->pin == 0) {
+ AnimData *adt= BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */
+
+ /* set action */
+ adt->action= saction->action;
+ id_us_plus(&adt->action->id);
+ }
+}
+
#else
static void rna_def_space(BlenderRNA *brna)
@@ -491,7 +593,8 @@ static void rna_def_background_image(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed.");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
@@ -540,19 +643,12 @@ static void rna_def_space_3dview(BlenderRNA *brna)
{V3D_ACTIVE, "ACTIVE_ELEMENT", 0, "Active Element", ""},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem transform_orientation_items[] = {
- {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");
RNA_def_struct_ui_text(srna, "3D View Space", "3D View space data");
prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_sdna(prop, NULL, "camera");
RNA_def_property_ui_text(prop, "Camera", "Active camera used in this view (when unlocked from the scene's active camera).");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
@@ -572,11 +668,9 @@ static void rna_def_space_3dview(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Viewport Shading", "Method to display/shade objects in the 3D View.");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "localview", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "localview", 0);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ prop= RNA_def_property(srna, "local_view", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "localvd");
RNA_def_property_ui_text(prop, "Local View", "Display an isolated sub-set of objects, apart from the scene visibility.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lens");
@@ -666,6 +760,11 @@ static void rna_def_space_3dview(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling.");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ prop= RNA_def_property(srna, "pivot_point_align", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_ALIGN);
+ RNA_def_property_ui_text(prop, "Align", "Manipulate object centers only.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+
prop= RNA_def_property(srna, "manipulator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twflag", V3D_USE_MANIPULATOR);
RNA_def_property_ui_text(prop, "Manipulator", "Use a 3D manipulator widget for controlling transforms.");
@@ -689,9 +788,15 @@ static void rna_def_space_3dview(BlenderRNA *brna)
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_enum_funcs(prop, NULL, NULL, "rna_TransformOrientation_itemf");
+ RNA_def_property_ui_text(prop, "Transform Orientation", "Transformation orientation.");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ prop= RNA_def_property(srna, "current_orientation", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "TransformOrientation");
+ RNA_def_property_pointer_funcs(prop, "rna_CurrentOrientation_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Current Transform Orientation", "Current Transformation orientation.");
+
prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, "RegionView3D", "viewlock", RV3D_LOCKED);
RNA_def_property_ui_text(prop, "Lock", "Lock View Rotation");
@@ -715,12 +820,14 @@ static void rna_def_space_buttons(BlenderRNA *brna)
static EnumPropertyItem buttons_context_items[] = {
{BCONTEXT_SCENE, "SCENE", ICON_SCENE, "Scene", "Scene"},
+ {BCONTEXT_RENDER, "RENDER", ICON_SCENE_DATA, "Render", "Render"},
{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_CONSTRAINT, "CONSTRAINT", ICON_CONSTRAINT, "Constraints", "Constraints"},
+ {BCONTEXT_MODIFIER, "MODIFIER", ICON_MODIFIER, "Modifiers", "Modifiers"},
{BCONTEXT_DATA, "DATA", 0, "Data", "Data"},
{BCONTEXT_BONE, "BONE", ICON_BONE_DATA, "Bone", "Bone"},
+ {BCONTEXT_BONE_CONSTRAINT, "BONE_CONSTRAINT", ICON_CONSTRAINT, "Bone Constraints", "Bone Constraints"},
{BCONTEXT_MATERIAL, "MATERIAL", ICON_MATERIAL, "Material", "Material"},
{BCONTEXT_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture"},
{BCONTEXT_PARTICLE, "PARTICLE", ICON_PARTICLES, "Particle", "Particle"},
@@ -779,7 +886,8 @@ static void rna_def_space_image(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed.");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
@@ -787,7 +895,7 @@ static void rna_def_space_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "curves", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "cumap");
RNA_def_property_ui_text(prop, "Curves", "Color curve mapping to use for displaying the image.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_curves_update");
prop= RNA_def_property(srna, "image_pin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pin", 0);
@@ -802,13 +910,14 @@ static void rna_def_space_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "draw_channels", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
- RNA_def_property_enum_items(prop, dc_all_items);
+ RNA_def_property_enum_items(prop, draw_channels_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_draw_channels_itemf");
RNA_def_property_ui_text(prop, "Draw Channels", "Channels of the image to draw.");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* uv */
- prop= RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "SpaceUVEditor");
RNA_def_property_pointer_funcs(prop, "rna_SpaceImageEditor_uvedit_get", NULL, NULL);
RNA_def_property_ui_text(prop, "UV Editor", "UV editor settings.");
@@ -1036,6 +1145,13 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
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.");
+
+ /* data */
+ prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceDopeSheetEditor_action_set", NULL);
+ RNA_def_property_ui_text(prop, "Action", "Action displayed and edited in this space.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, "rna_SpaceDopeSheetEditor_action_update");
/* mode */
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
@@ -1199,6 +1315,11 @@ static void rna_def_space_time(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Sequencer Windows", "");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+ prop= RNA_def_property(srna, "play_nodes", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_NODES);
+ RNA_def_property_ui_text(prop, "Node Windows", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+
/* Other options */
prop= RNA_def_property(srna, "continue_physics", PROP_BOOLEAN, PROP_NONE);
@@ -1422,7 +1543,6 @@ static void rna_def_space_filebrowser(BlenderRNA *brna)
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.");
}
diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c
index 22cf7e7aeae..8c9b2b58887 100644
--- a/source/blender/makesrna/intern/rna_text.c
+++ b/source/blender/makesrna/intern/rna_text.c
@@ -198,7 +198,8 @@ static void rna_def_text(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "TextLine");
RNA_def_property_ui_text(prop, "Lines", "Lines of text.");
- prop= RNA_def_property(srna, "current_line", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "current_line", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "curl");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "TextLine");
@@ -209,7 +210,8 @@ static void rna_def_text(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Current Character", "Index of current character in current line, and also start index of character in selection if one exists.");
- prop= RNA_def_property(srna, "selection_end_line", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "selection_end_line", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "sell");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "TextLine");
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 7a81138a3be..f49eb4122c5 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -37,11 +37,10 @@
#include "DNA_texture_types.h"
#include "DNA_world_types.h"
#include "DNA_node_types.h"
+#include "DNA_scene_types.h" /* MAXFRAME only */
#include "BKE_node.h"
-#include "WM_types.h"
-
static EnumPropertyItem texture_filter_items[] = {
{TXF_BOX, "BOX", 0, "Box", ""},
{TXF_EWA, "EWA", 0, "EWA", ""},
@@ -52,9 +51,15 @@ static EnumPropertyItem texture_filter_items[] = {
#ifdef RNA_RUNTIME
+#include "BKE_depsgraph.h"
#include "BKE_texture.h"
+#include "BKE_main.h"
+
#include "ED_node.h"
+#include "WM_api.h"
+#include "WM_types.h"
+
static StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
{
Tex *tex= (Tex*)ptr->data;
@@ -95,6 +100,22 @@ static StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
}
}
+static void rna_Texture_update(bContext *C, PointerRNA *ptr)
+{
+ Tex *tex= ptr->id.data;
+
+ DAG_id_flush_update(&tex->id, 0);
+ WM_event_add_notifier(C, NC_TEXTURE, tex);
+}
+
+static void rna_Texture_nodes_update(bContext *C, PointerRNA *ptr)
+{
+ Tex *tex= ptr->id.data;
+
+ DAG_id_flush_update(&tex->id, 0);
+ WM_event_add_notifier(C, NC_TEXTURE|ND_NODES, tex);
+}
+
static void rna_Texture_type_set(PointerRNA *ptr, int value)
{
Tex *tex= (Tex*)ptr->data;
@@ -112,6 +133,28 @@ static void rna_Texture_type_set(PointerRNA *ptr, int value)
tex->type = value;
}
+void rna_TextureSlot_update(bContext *C, PointerRNA *ptr)
+{
+ ID *id= ptr->id.data;
+
+ DAG_id_flush_update(id, 0);
+
+ switch(GS(id->name)) {
+ case ID_MA:
+ WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING, id);
+ break;
+ case ID_WO:
+ WM_event_add_notifier(C, NC_WORLD, id);
+ break;
+ case ID_LA:
+ WM_event_add_notifier(C, NC_LAMP|ND_LIGHTING, id);
+ break;
+ case ID_BR:
+ WM_event_add_notifier(C, NC_BRUSH, id);
+ break;
+ }
+}
+
static int rna_TextureSlot_name_length(PointerRNA *ptr)
{
MTex *mtex= ptr->data;
@@ -163,7 +206,7 @@ static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *C, PointerR
EnumPropertyItem *item= NULL;
int totitem= 0;
- if(tex && C) { /* Note, tex/mtex/ntree can be invalid of C is NULL, TODO - can this give valid results when C is NULL? */
+ if(tex) {
bNodeTree *ntree= tex->nodetree;
if(ntree) {
EnumPropertyItem tmp= {0, "", 0, "", ""};
@@ -186,8 +229,8 @@ static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *C, PointerR
}
RNA_enum_item_end(&item, &totitem);
-
*free = 1;
+
return item;
}
@@ -242,20 +285,6 @@ static EnumPropertyItem *rna_ImageTexture_filter_itemf(bContext *C, PointerRNA *
return item;
}
-static float rna_TextureSlot_angle_get(PointerRNA *ptr)
-{
- MTex *tex= (MTex*)ptr->data;
- const float conv = 57.295779506;
- return tex->rot * conv;
-}
-
-static void rna_TextureSlot_angle_set(PointerRNA *ptr, float v)
-{
- MTex *tex= (MTex*)ptr->data;
- const float conv = 0.017453293;
- tex->rot = v * conv;
-}
-
#else
static void rna_def_color_ramp_element(BlenderRNA *brna)
@@ -271,13 +300,13 @@ static void rna_def_color_ramp_element(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Color", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "position", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "pos");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Position", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_color_ramp(BlenderRNA *brna)
@@ -301,13 +330,13 @@ static void rna_def_color_ramp(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "data", "tot");
RNA_def_property_struct_type(prop, "ColorRampElement");
RNA_def_property_ui_text(prop, "Elements", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ipotype");
RNA_def_property_enum_items(prop, prop_interpolation_items);
RNA_def_property_ui_text(prop, "Interpolation", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texmapping(BlenderRNA *brna)
@@ -321,37 +350,37 @@ static void rna_def_texmapping(BlenderRNA *brna)
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Rotation", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Scale", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "minimum", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_ui_text(prop, "Minimum", "Minimum value for clipping");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "maximum", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_ui_text(prop, "Maximum", "Maximum value for clipping");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "has_minimum", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MIN);
RNA_def_property_ui_text(prop, "Has Minimum", "Whether to use minimum clipping value");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "has_maximum", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MAX);
RNA_def_property_ui_text(prop, "Has Maximum", "Whether to use maximum clipping value");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_mtex(BlenderRNA *brna)
@@ -378,12 +407,6 @@ static void rna_def_mtex(BlenderRNA *brna)
{MTEX_LIN_LIGHT , "LINEAR LIGHT", 0, "Linear Light", ""},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem prop_map_mode_items[] = {
- {MTEX_MAP_MODE_FIXED, "FIXED", 0, "Fixed", ""},
- {MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""},
- {MTEX_MAP_MODE_3D, "3D", 0, "3D", ""},
- {0, NULL, 0, NULL, NULL}};
-
static EnumPropertyItem output_node_items[] = {
{0, "DUMMY", 0, "Dummy", ""},
{0, NULL, 0, NULL, NULL}};
@@ -398,89 +421,66 @@ static void rna_def_mtex(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Texture");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Texture", "Texture datablock used by this texture slot.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_TextureSlot_name_get", "rna_TextureSlot_name_length", NULL);
RNA_def_property_ui_text(prop, "Name", "Texture slot name.");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_struct_name_property(srna, prop);
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
/* mapping */
prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "ofs");
RNA_def_property_ui_range(prop, -10, 10, 10, 2);
RNA_def_property_ui_text(prop, "Offset", "Fine tunes texture mapping X, Y and Z locations.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_XYZ);
RNA_def_property_ui_range(prop, -100, 100, 10, 2);
RNA_def_property_ui_text(prop, "Size", "Sets scaling for the texture's X, Y and Z sizes.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Color", "The default color for textures that don't return RGB.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "blendtype");
RNA_def_property_enum_items(prop, prop_blend_type_items);
RNA_def_property_ui_text(prop, "Blend Type", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "stencil", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_STENCIL);
RNA_def_property_ui_text(prop, "Stencil", "Use this texture as a blending value on the next texture.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_NEGATIVE);
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);
+ RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
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, "RGB to Intensity", "Converts texture RGB values to intensity (gray) values.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
- RNA_def_property_float_sdna(prop, NULL, "rot");
- RNA_def_property_range(prop, 0, 360);
- RNA_def_property_float_funcs(prop, "rna_TextureSlot_angle_get", "rna_TextureSlot_angle_set", NULL);
- RNA_def_property_ui_text(prop, "Angle", "Defines brush texture rotation.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "brush_map_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_map_mode_items);
- RNA_def_property_ui_text(prop, "Mode", "");
+ RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "def_var");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Default Value", "Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "variable_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Variable Factor", "Amount texture affects other values.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "norfac");
- RNA_def_property_ui_range(prop, 0, 5, 10, 3);
- RNA_def_property_ui_text(prop, "Normal Factor", "Amount texture affects normal values.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "output_node", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "which_output");
RNA_def_property_enum_items(prop, output_node_items);
RNA_def_property_enum_funcs(prop, "rna_TextureSlot_output_node_get", NULL, "rna_TextureSlot_output_node_itemf");
RNA_def_property_ui_text(prop, "Output Node", "Which output node to use, for node-based textures.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
}
static void rna_def_filter_size_common(StructRNA *srna)
@@ -491,14 +491,14 @@ static void rna_def_filter_size_common(StructRNA *srna)
prop= RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_FILTER_MIN);
RNA_def_property_ui_text(prop, "Use Filter", "Use Filter Size as a minimal filter value in pixels");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "filtersize");
RNA_def_property_range(prop, 0.1, 50.0);
RNA_def_property_ui_range(prop, 0.1, 50.0, 1, 0.2);
RNA_def_property_ui_text(prop, "Filter Size", "Multiplies the filter size used by MIP Map and Interpolation");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_environment_map_common(StructRNA *srna)
@@ -515,14 +515,14 @@ static void rna_def_environment_map_common(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_source_items);
RNA_def_property_ui_text(prop, "Source", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
/* XXX: move this to specific types if needed */
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ima");
RNA_def_property_struct_type(prop, "Image");
RNA_def_property_ui_text(prop, "Image", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_environment_map(BlenderRNA *brna)
@@ -545,28 +545,28 @@ static void rna_def_environment_map(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipsta");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_range(prop, 0.01, 50, 100, 2);
RNA_def_property_ui_text(prop, "Clip Start", "Objects nearer than this are not visible to map.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipend");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_range(prop, 0.10, 20000, 100, 2);
RNA_def_property_ui_text(prop, "Clip End", "Objects further than this are not visible to map.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "viewscale");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_range(prop, 0.5, 5, 100, 2);
RNA_def_property_ui_text(prop, "Zoom", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
/* XXX: EnvMap.notlay */
@@ -574,12 +574,12 @@ static void rna_def_environment_map(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "cuberes");
RNA_def_property_range(prop, 50, 4096);
RNA_def_property_ui_text(prop, "Resolution", "Pixel resolution of the rendered environment map.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 5);
RNA_def_property_ui_text(prop, "Depth", "Number of times a map will be rendered recursively (mirror effects.)");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static EnumPropertyItem prop_noise_basis_items[] = {
@@ -620,38 +620,38 @@ static void rna_def_texture_clouds(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "noisedepth");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_range(prop, 0, 6, 0, 2);
RNA_def_property_ui_text(prop, "Noise Depth", "Sets the depth of the cloud calculation");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisetype");
RNA_def_property_enum_items(prop, prop_noise_type);
RNA_def_property_ui_text(prop, "Noise Type", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "stype", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_clouds_stype);
RNA_def_property_ui_text(prop, "Color", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texture_wood(BlenderRNA *brna)
@@ -681,44 +681,44 @@ static void rna_def_texture_wood(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "turbul");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
RNA_def_property_ui_text(prop, "Turbulence", "Sets the turbulence of the bandnoise and ringnoise types");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisetype");
RNA_def_property_enum_items(prop, prop_noise_type);
RNA_def_property_ui_text(prop, "Noise Type", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "stype", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_wood_stype);
RNA_def_property_ui_text(prop, "Pattern", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noisebasis2", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
RNA_def_property_enum_items(prop, prop_wood_noisebasis2);
RNA_def_property_ui_text(prop, "Noise Basis 2", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
@@ -748,51 +748,51 @@ static void rna_def_texture_marble(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "turbul");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
RNA_def_property_ui_text(prop, "Turbulence", "Sets the turbulence of the bandnoise and ringnoise types");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "noisedepth");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_range(prop, 0, 6, 0, 2);
RNA_def_property_ui_text(prop, "Noise Depth", "Sets the depth of the cloud calculation");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisetype");
RNA_def_property_enum_items(prop, prop_noise_type);
RNA_def_property_ui_text(prop, "Noise Type", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "stype", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_marble_stype);
RNA_def_property_ui_text(prop, "Pattern", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noisebasis2", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
RNA_def_property_enum_items(prop, prop_marble_noisebasis2);
RNA_def_property_ui_text(prop, "Noise Basis 2", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
@@ -810,14 +810,14 @@ static void rna_def_texture_magic(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
RNA_def_property_ui_text(prop, "Turbulence", "Sets the turbulence of the bandnoise and ringnoise types");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "noisedepth");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_range(prop, 0, 6, 0, 2);
RNA_def_property_ui_text(prop, "Noise Depth", "Sets the depth of the cloud calculation");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texture_blend(BlenderRNA *brna)
@@ -848,13 +848,13 @@ static void rna_def_texture_blend(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_blend_progression);
RNA_def_property_ui_text(prop, "Progression", "Sets the style of the color blending");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "flip_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_flip_axis_items);
RNA_def_property_ui_text(prop, "Flip Axis", "Flips the texture's X and Y axis");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
@@ -878,32 +878,32 @@ static void rna_def_texture_stucci(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
RNA_def_property_ui_text(prop, "Turbulence", "Sets the turbulence of the bandnoise and ringnoise types");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noisesize");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisetype");
RNA_def_property_enum_items(prop, prop_noise_type);
RNA_def_property_ui_text(prop, "Noise Type", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "stype", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_stucci_stype);
RNA_def_property_ui_text(prop, "Pattern", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texture_noise(BlenderRNA *brna)
@@ -921,11 +921,11 @@ static void rna_def_texture_image(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_image_extension[] = {
- {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"},
+ {TEX_EXTEND, "EXTEND", 0, "Extend", "Extends by repeating edge pixels of the image"},
+ {TEX_CLIP, "CLIP", 0, "Clip", "Clips to image size and sets exterior pixels as transparent"},
+ {TEX_CLIPCUBE, "CLIP_CUBE", 0, "Clip Cube", "Clips to cubic-shaped area around the image and sets exterior pixels as transparent"},
+ {TEX_REPEAT, "REPEAT", 0, "Repeat", "Causes the image to repeat horizontally and vertically"},
+ {TEX_CHECKER, "CHECKER", 0, "Checker", "Causes the image to repeat in checker board pattern"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ImageTexture", "Texture");
@@ -936,45 +936,45 @@ static void rna_def_texture_image(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_MIPMAP);
RNA_def_property_boolean_funcs(prop, NULL, "rna_ImageTexture_mipmap_set");
RNA_def_property_ui_text(prop, "MIP Map", "Uses auto-generated MIP maps for the image");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "mipmap_gauss", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_GAUSS_MIP);
RNA_def_property_ui_text(prop, "MIP Map Gauss", "Uses Gauss filter to sample down MIP maps");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "interpolation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_INTERPOL);
RNA_def_property_ui_text(prop, "Interpolation", "Interpolates pixels using Area filter");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
/* XXX: I think flip_axis should be a generic Texture property, enabled for all the texture types */
prop= RNA_def_property(srna, "flip_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_IMAROT);
RNA_def_property_ui_text(prop, "Flip Axis", "Flips the texture's X and Y axis");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_USEALPHA);
RNA_def_property_ui_text(prop, "Use Alpha", "Uses the alpha channel information in the image");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "calculate_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_CALCALPHA);
RNA_def_property_ui_text(prop, "Calculate Alpha", "Calculates an alpha channel based on RGB values in the image");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "invert_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_NEGALPHA);
RNA_def_property_ui_text(prop, "Invert Alpha", "Inverts all the alpha values in the image");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
rna_def_filter_size_common(srna);
prop= RNA_def_property(srna, "normal_map", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_NORMALMAP);
RNA_def_property_ui_text(prop, "Normal Map", "Uses image RGB values for normal mapping");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
/* XXX: mtex->normapspace "Sets space of normal map image" "Normal Space %t|Camera %x0|World %x1|Object %x2|Tangent %x3"
* not sure why this goes in mtex instead of texture directly? */
@@ -982,47 +982,47 @@ static void rna_def_texture_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "extend");
RNA_def_property_enum_items(prop, prop_image_extension);
- RNA_def_property_ui_text(prop, "Extension", "Sets how the image is stretched in the texture");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_ui_text(prop, "Extension", "Sets how the image is extrapolated past its original bounds");
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "repeat_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xrepeat");
RNA_def_property_range(prop, 1, 512);
RNA_def_property_ui_text(prop, "Repeat X", "Sets a repetition multiplier in the X direction");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "repeat_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "yrepeat");
RNA_def_property_range(prop, 1, 512);
RNA_def_property_ui_text(prop, "Repeat Y", "Sets a repetition multiplier in the Y direction");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "mirror_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_REPEAT_XMIR);
RNA_def_property_ui_text(prop, "Mirror X", "Mirrors the image repetition on the X direction");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "mirror_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_REPEAT_YMIR);
RNA_def_property_ui_text(prop, "Mirror Y", "Mirrors the image repetition on the Y direction");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "checker_odd", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_CHECKER_ODD);
RNA_def_property_ui_text(prop, "Checker Odd", "Sets odd checker tiles");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "checker_even", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_CHECKER_EVEN);
RNA_def_property_ui_text(prop, "Checker Even", "Sets even checker tiles");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "checker_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "checkerdist");
RNA_def_property_range(prop, 0.0, 0.99);
RNA_def_property_ui_range(prop, 0.0, 0.99, 0.1, 0.01);
RNA_def_property_ui_text(prop, "Checker Distance", "Sets distance between checker tiles");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
#if 0
@@ -1034,7 +1034,7 @@ static void rna_def_texture_image(BlenderRNA *brna)
RNA_def_property_array(prop, 4);
RNA_def_property_range(prop, -10, 10);
RNA_def_property_ui_text(prop, "Crop Rectangle", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
#endif
@@ -1043,35 +1043,40 @@ static void rna_def_texture_image(BlenderRNA *brna)
RNA_def_property_range(prop, -10.0, 10.0);
RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2);
RNA_def_property_ui_text(prop, "Crop Minimum X", "Sets minimum X value to crop the image");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "crop_min_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cropymin");
RNA_def_property_range(prop, -10.0, 10.0);
RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2);
RNA_def_property_ui_text(prop, "Crop Minimum Y", "Sets minimum Y value to crop the image");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "crop_max_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cropxmax");
RNA_def_property_range(prop, -10.0, 10.0);
RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2);
RNA_def_property_ui_text(prop, "Crop Maximum X", "Sets maximum X value to crop the image");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "crop_max_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cropymax");
RNA_def_property_range(prop, -10.0, 10.0);
RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2);
RNA_def_property_ui_text(prop, "Crop Maximum Y", "Sets maximum Y value to crop the image");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ima");
RNA_def_property_struct_type(prop, "Image");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Image", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+ 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, 0, "rna_Texture_update");
/* filtering */
prop= RNA_def_property(srna, "filter", PROP_ENUM, PROP_NONE);
@@ -1079,19 +1084,19 @@ static void rna_def_texture_image(BlenderRNA *brna)
RNA_def_property_enum_items(prop, texture_filter_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageTexture_filter_itemf");
RNA_def_property_ui_text(prop, "Filter", "Texture filter to use for sampling image.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "filter_probes", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "afmax");
RNA_def_property_range(prop, 1, 256);
RNA_def_property_ui_text(prop, "Filter Probes", "Maximum number of samples. Higher gives less blur at distant/oblique angles, but is also slower.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "filter_eccentricity", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "afmax");
RNA_def_property_range(prop, 1, 256);
RNA_def_property_ui_text(prop, "Filter Eccentricity", "Maximum eccentricity. Higher gives less blur at distant/oblique angles, but is also slower.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texture_plugin(BlenderRNA *brna)
@@ -1116,11 +1121,16 @@ static void rna_def_texture_environment_map(BlenderRNA *brna)
rna_def_environment_map_common(srna);
+ 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, 0, "rna_Texture_update");
+
prop= RNA_def_property(srna, "environment_map", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "env");
RNA_def_property_struct_type(prop, "EnvironmentMap");
RNA_def_property_ui_text(prop, "Environment Map", "Gets the environment map associated with this texture");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
rna_def_filter_size_common(srna);
}
@@ -1146,62 +1156,62 @@ static void rna_def_texture_musgrave(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_musgrave_type);
RNA_def_property_ui_text(prop, "Type", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "highest_dimension", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mg_H");
RNA_def_property_range(prop, 0.0001, 2);
RNA_def_property_ui_text(prop, "Highest Dimension", "Highest fractal dimension");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "lacunarity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mg_lacunarity");
RNA_def_property_range(prop, 0, 6);
RNA_def_property_ui_text(prop, "Lacunarity", "Gap between succesive frequencies");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "octaves", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mg_octaves");
RNA_def_property_range(prop, 0, 8);
RNA_def_property_ui_text(prop, "Octaves", "Number of frequencies used");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mg_offset");
RNA_def_property_range(prop, 0, 6);
RNA_def_property_ui_text(prop, "Offset", "The fractal offset");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mg_gain");
RNA_def_property_range(prop, 0, 6);
RNA_def_property_ui_text(prop, "Gain", "The gain multiplier");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ns_outscale");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Noise Intensity", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noisesize");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texture_voronoi(BlenderRNA *brna)
@@ -1235,62 +1245,62 @@ static void rna_def_texture_voronoi(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "vn_w1");
RNA_def_property_range(prop, -2, 2);
RNA_def_property_ui_text(prop, "Weight 1", "Voronoi feature weight 1");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "weight_2", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vn_w2");
RNA_def_property_range(prop, -2, 2);
RNA_def_property_ui_text(prop, "Weight 2", "Voronoi feature weight 2");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "weight_3", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vn_w3");
RNA_def_property_range(prop, -2, 2);
RNA_def_property_ui_text(prop, "Weight 3", "Voronoi feature weight 3");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "weight_4", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vn_w4");
RNA_def_property_range(prop, -2, 2);
RNA_def_property_ui_text(prop, "Weight 4", "Voronoi feature weight 4");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "minkovsky_exponent", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vn_mexp");
RNA_def_property_range(prop, 0.01, 10);
RNA_def_property_ui_text(prop, "Minkovsky Exponent", "Minkovsky exponent");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "distance_metric", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "vn_distm");
RNA_def_property_enum_items(prop, prop_distance_metric_items);
RNA_def_property_ui_text(prop, "Distance Metric", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "coloring", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "vn_coltype");
RNA_def_property_enum_items(prop, prop_coloring_items);
RNA_def_property_ui_text(prop, "Coloring", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ns_outscale");
RNA_def_property_range(prop, 0.01, 10);
RNA_def_property_ui_text(prop, "Noise Intensity", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noisesize");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texture_distorted_noise(BlenderRNA *brna)
@@ -1306,32 +1316,32 @@ static void rna_def_texture_distorted_noise(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "dist_amount");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Distortion Amount", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noisesize");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_distortion", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Distortion", "Sets the noise basis for the distortion");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texture_pointdensity(BlenderRNA *brna)
@@ -1387,104 +1397,104 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "source");
RNA_def_property_enum_items(prop, point_source_items);
RNA_def_property_ui_text(prop, "Point Source", "Point data to use as renderable point density");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_ui_text(prop, "Object", "Object to take point data from");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "psys");
RNA_def_property_ui_text(prop, "Particle System", "Particle System to render as points");
RNA_def_property_struct_type(prop, "ParticleSystem");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "particle_cache", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "psys_cache_space");
RNA_def_property_enum_items(prop, particle_cache_items);
RNA_def_property_ui_text(prop, "Particle Cache", "Co-ordinate system to cache particles in");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "vertices_cache", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ob_cache_space");
RNA_def_property_enum_items(prop, vertice_cache_items);
RNA_def_property_ui_text(prop, "Vertices Cache", "Co-ordinate system to cache vertices in");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_text(prop, "Radius", "Radius from the shaded sample to look for points within");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "falloff_type");
RNA_def_property_enum_items(prop, falloff_items);
RNA_def_property_ui_text(prop, "Falloff", "Method of attenuating density by distance from the point");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "falloff_softness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "falloff_softness");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_text(prop, "Softness", "Softness of the 'soft' falloff option");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "color_source", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "color_source");
RNA_def_property_enum_items(prop, color_source_items);
RNA_def_property_ui_text(prop, "Color Source", "Data to derive color results from");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "speed_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "speed_scale");
RNA_def_property_range(prop, 0.001, 100.0);
RNA_def_property_ui_text(prop, "Scale", "Multipler to bring particle speed within an acceptable range");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coba");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Color Ramp", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
/* Turbulence */
prop= RNA_def_property(srna, "turbulence", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_PD_TURBULENCE);
RNA_def_property_ui_text(prop, "Turbulence", "Add directed noise to the density at render-time");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "turbulence_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noise_size");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_text(prop, "Size", "Scale of the added turbulent noise");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "turbulence_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noise_fac");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_text(prop, "Strength", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "turbulence_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "noise_depth");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_text(prop, "Depth", "Level of detail in the added turbulent noise");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "turbulence_influence", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noise_influence");
RNA_def_property_enum_items(prop, turbulence_influence_items);
RNA_def_property_ui_text(prop, "Turbulence Influence", "Method for driving added turbulent noise");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noise_basis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Noise formula used for tubulence");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
srna= RNA_def_struct(brna, "PointDensityTexture", "Texture");
@@ -1495,7 +1505,7 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "pd");
RNA_def_property_struct_type(prop, "PointDensity");
RNA_def_property_ui_text(prop, "Point Density", "The point density settings associated with this texture");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texture_voxeldata(BlenderRNA *brna)
@@ -1518,6 +1528,12 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
{TEX_VD_IMAGE_SEQUENCE, "IMAGE_SEQUENCE", 0, "Image Sequence", "Generate voxels from a sequence of image slices"},
{TEX_VD_SMOKE, "SMOKE", 0, "Smoke", "Render voxels from a Blender smoke simulation"},
{0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem voxeldata_extension[] = {
+ {TEX_EXTEND, "EXTEND", 0, "Extend", "Extends by repeating edge pixels of the image"},
+ {TEX_CLIP, "CLIP", 0, "Clip", "Clips to image size and sets exterior pixels as transparent"},
+ {TEX_REPEAT, "REPEAT", 0, "Repeat", "Causes the image to repeat horizontally and vertically"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "VoxelData", NULL);
RNA_def_struct_sdna(srna, "VoxelData");
@@ -1527,46 +1543,52 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "interp_type");
RNA_def_property_enum_items(prop, interpolation_type_items);
RNA_def_property_ui_text(prop, "Interpolation", "Method to interpolate/smooth values between voxel cells");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+ prop= RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "extend");
+ RNA_def_property_enum_items(prop, voxeldata_extension);
+ RNA_def_property_ui_text(prop, "Extension", "Sets how the texture is extrapolated past its original bounds");
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "int_multiplier");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_text(prop, "Intensity", "Multiplier for intensity values");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "file_format");
RNA_def_property_enum_items(prop, file_format_items);
RNA_def_property_ui_text(prop, "File Format", "Format of the source data set to render ");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "source_path", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "source_path");
RNA_def_property_ui_text(prop, "Source Path", "The external source data file to use");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resol");
RNA_def_property_ui_text(prop, "Resolution", "Resolution of the voxel grid.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "still", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_VD_STILL);
RNA_def_property_ui_text(prop, "Still Frame Only", "Always render a still frame from the voxel data sequence");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "still_frame_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "still_frame");
- RNA_def_property_range(prop, 0, INT_MAX);
+ RNA_def_property_range(prop, -MAXFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Still Frame Number", "The frame number to always use");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "domain_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_ui_text(prop, "Domain Object", "Object used as the smoke simulation domain");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
srna= RNA_def_struct(brna, "VoxelDataTexture", "Texture");
@@ -1577,7 +1599,7 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "vd");
RNA_def_property_struct_type(prop, "VoxelData");
RNA_def_property_ui_text(prop, "Voxel Data", "The voxel data associated with this texture");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texture(BlenderRNA *brna)
@@ -1587,9 +1609,9 @@ static void rna_def_texture(BlenderRNA *brna)
static EnumPropertyItem prop_type_items[] = {
{0, "NONE", 0, "None", ""},
- {TEX_PLUGIN, "PLUGIN", ICON_CONSTRAINT, "Plugin", ""},
- {TEX_IMAGE, "IMAGE", ICON_RENDER_RESULT, "Image or Movie", ""},
- {TEX_ENVMAP, "ENVIRONMENT_MAP", ICON_RENDER_RESULT, "Environment Map", ""},
+ {TEX_PLUGIN, "PLUGIN", ICON_PLUGIN, "Plugin", ""},
+ {TEX_IMAGE, "IMAGE", ICON_IMAGE_DATA, "Image or Movie", ""},
+ {TEX_ENVMAP, "ENVIRONMENT_MAP", ICON_IMAGE_DATA, "Environment Map", ""},
{TEX_CLOUDS, "CLOUDS", ICON_TEXTURE, "Clouds", ""},
{TEX_WOOD, "WOOD", ICON_TEXTURE, "Wood", ""},
{TEX_MARBLE, "MARBLE", ICON_TEXTURE, "Marble", ""},
@@ -1616,51 +1638,61 @@ static void rna_def_texture(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Texture_type_set", NULL);
RNA_def_property_ui_text(prop, "Type", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "use_color_ramp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_COLORBAND);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Texture_use_color_ramp_set");
RNA_def_property_ui_text(prop, "Use Color Ramp", "Toggle color ramp operations.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coba");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Color Ramp", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "brightness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bright");
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "Brightness", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01, 5);
RNA_def_property_ui_text(prop, "Contrast", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- /* XXX: would be nicer to have this as a color selector?
- but the values can go past [0,1]. */
- prop= RNA_def_property(srna, "rgb_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+ /* RGB Factor */
+ prop= RNA_def_property(srna, "factor_red", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rfac");
- RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, 0, 2);
- RNA_def_property_ui_text(prop, "RGB Factor", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_ui_text(prop, "Factor Red", "");
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+ prop= RNA_def_property(srna, "factor_green", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "gfac");
+ RNA_def_property_range(prop, 0, 2);
+ RNA_def_property_ui_text(prop, "Factor Green", "");
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+ prop= RNA_def_property(srna, "factor_blue", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "bfac");
+ RNA_def_property_range(prop, 0, 2);
+ RNA_def_property_ui_text(prop, "Factor Blue", "");
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
/* nodetree */
prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Texture_use_nodes_set");
RNA_def_property_ui_text(prop, "Use Nodes", "Make this a node-based texture");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node-based textures");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
rna_def_animdata_common(srna);
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index f16180451a7..303511a2dca 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -343,17 +343,15 @@ static void menu_draw(const bContext *C, Menu *hdr)
static void rna_Menu_unregister(const bContext *C, StructRNA *type)
{
- ARegionType *art;
MenuType *mt= RNA_struct_blender_type_get(type);
if(!mt)
return;
- if(!(art=region_type_find(NULL, mt->space_type, RGN_TYPE_HEADER)))
- return;
RNA_struct_free_extension(type, &mt->ext);
- BLI_freelinkN(&art->menutypes, mt);
+ WM_menutype_freelink(mt);
+
RNA_struct_free(&BLENDER_RNA, type);
/* update while blender is running */
@@ -363,7 +361,6 @@ static void rna_Menu_unregister(const bContext *C, StructRNA *type)
static StructRNA *rna_Menu_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
- ARegionType *art;
MenuType *mt, dummymt = {0};
Menu dummymenu= {0};
PointerRNA dummymtr;
@@ -376,18 +373,11 @@ static StructRNA *rna_Menu_register(const bContext *C, ReportList *reports, void
/* validate the python class */
if(validate(&dummymtr, data, have_function) != 0)
return NULL;
-
- if(!(art=region_type_find(reports, dummymt.space_type, RGN_TYPE_HEADER)))
- return NULL;
/* check if we have registered this menu type before, and remove it */
- for(mt=art->menutypes.first; mt; mt=mt->next) {
- if(strcmp(mt->idname, dummymt.idname) == 0) {
- if(mt->ext.srna)
- rna_Menu_unregister(C, mt->ext.srna);
- break;
- }
- }
+ mt= WM_menutype_find(dummymt.idname, TRUE);
+ if(mt && mt->ext.srna)
+ rna_Menu_unregister(C, mt->ext.srna);
/* create a new menu type */
mt= MEM_callocN(sizeof(MenuType), "python buttons menu");
@@ -402,7 +392,7 @@ static StructRNA *rna_Menu_register(const bContext *C, ReportList *reports, void
mt->poll= (have_function[0])? menu_poll: NULL;
mt->draw= (have_function[1])? menu_draw: NULL;
- BLI_addtail(&art->menutypes, mt);
+ WM_menutype_add(mt);
/* update while blender is running */
if(C)
@@ -738,11 +728,6 @@ static void rna_def_menu(BlenderRNA *brna)
RNA_def_property_string_sdna(prop, NULL, "type->label");
RNA_def_property_flag(prop, PROP_REGISTER);
- prop= RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "type->space_type");
- RNA_def_property_enum_items(prop, space_type_items);
- RNA_def_property_flag(prop, PROP_REGISTER);
-
RNA_define_verify_sdna(1);
}
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index e3cae8ab453..cce8fb0fef7 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -37,7 +37,7 @@
#ifdef RNA_RUNTIME
-static void rna_uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *propname, int expand, int slider, int toggle, int icon_only)
+static void rna_uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *propname, int expand, int slider, int toggle, int icon_only, int event, int full_event)
{
int flag= 0;
@@ -45,6 +45,8 @@ static void rna_uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr,
flag |= (expand)? UI_ITEM_R_EXPAND: 0;
flag |= (toggle)? UI_ITEM_R_TOGGLE: 0;
flag |= (icon_only)? UI_ITEM_R_ICON_ONLY: 0;
+ flag |= (event)? UI_ITEM_R_EVENT: 0;
+ flag |= (full_event)? UI_ITEM_R_FULL_EVENT: 0;
uiItemR(layout, name, icon, ptr, propname, flag);
}
@@ -89,7 +91,7 @@ static void api_ui_item_rna_common(FunctionRNA *func)
PropertyRNA *parm;
parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -146,7 +148,9 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
RNA_def_boolean(func, "slider", 0, "", "Use slider widget for numeric values.");
RNA_def_boolean(func, "toggle", 0, "", "Use toggle widget for boolean values.");
- RNA_def_boolean(func, "icon_only", 0, "", "Only show the property's icon, with no text");
+ RNA_def_boolean(func, "icon_only", 0, "", "Draw only icons in buttons, no text.");
+ RNA_def_boolean(func, "event", 0, "", "Use button to input key events.");
+ RNA_def_boolean(func, "full_event", 0, "", "Use button to input full events including modifiers.");
func= RNA_def_function(srna, "items_enumR", "uiItemsEnumR");
api_ui_item_rna_common(func);
@@ -165,7 +169,7 @@ void RNA_api_ui_layout(StructRNA *srna)
api_ui_item_common(func);
api_ui_item_rna_common(func);
parm= RNA_def_pointer(func, "search_data", "AnyType", "", "Data from which to take collection to search in.");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_string(func, "search_property", "", 0, "", "Identifier of search collection property.");
RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -251,34 +255,52 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block.");
RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block.");
RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block.");
-
+
+ func= RNA_def_function(srna, "template_any_ID", "uiTemplateAnyID");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_string(func, "type_property", "", 0, "", "Identifier of property in data giving the type of the ID-blocks to use.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI.");
+
+ func= RNA_def_function(srna, "template_path_builder", "uiTemplatePathBuilder");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from.");
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
+ parm= RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI.");
+
func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
parm= RNA_def_pointer(func, "data", "Modifier", "", "Modifier data.");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "template_constraint", "uiTemplateConstraint");
parm= RNA_def_pointer(func, "data", "Constraint", "", "Constraint data.");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
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);
- parm= RNA_def_pointer(func, "parent", "ID", "", "ID datablock.");
- parm= RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot.");
+ RNA_def_pointer(func, "parent", "ID", "", "ID datablock.");
+ RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot.");
func= RNA_def_function(srna, "template_curve_mapping", "uiTemplateCurveMapping");
- parm= RNA_def_pointer(func, "curvemap", "CurveMapping", "", "Curve mapping pointer.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ api_ui_item_rna_common(func);
RNA_def_enum(func, "type", curve_type_items, 0, "Type", "Type of curves to display.");
- RNA_def_boolean(func, "compact", 0, "", "Use more compact curve mapping.");
+ RNA_def_boolean(func, "levels", 0, "", "Show black/white levels.");
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);
+ api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
func= RNA_def_function(srna, "template_layers", "uiTemplateLayers");
@@ -294,11 +316,21 @@ void RNA_api_ui_layout(StructRNA *srna)
parm= RNA_def_pointer(func, "image_user", "ImageUser", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "template_list", "uiTemplateList");
+ func= RNA_def_function(srna, "template_image", "uiTemplateImage");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
- parm= RNA_def_pointer(func, "active_data", "AnyType", "", "Data from which to take property for the active element.");
+ parm= RNA_def_pointer(func, "image_user", "ImageUser", "", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
+ RNA_def_boolean(func, "compact", 0, "", "Use more compact layout.");
+
+ func= RNA_def_function(srna, "template_list", "uiTemplateList");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "active_data", "AnyType", "", "Data from which to take property for the active element.");
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for the active element.");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display.", 0, INT_MAX);
@@ -316,11 +348,6 @@ void RNA_api_ui_layout(StructRNA *srna)
func= RNA_def_function(srna, "view3d_select_faceselmenu", "uiTemplate_view3d_select_faceselmenu");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
-
- func= RNA_def_function(srna, "template_texture_image", "uiTemplateTextureImage");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- parm= RNA_def_pointer(func, "texture", "Texture", "", "");
- RNA_def_property_flag(parm, PROP_REQUIRED);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index fc66c04ee26..76778214537 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -42,6 +42,11 @@
#ifdef RNA_RUNTIME
+#include "BKE_main.h"
+#include "BKE_DerivedMesh.h"
+#include "BKE_depsgraph.h"
+#include "DNA_object_types.h"
+
static void rna_userdef_update(bContext *C, PointerRNA *ptr)
{
WM_event_add_notifier(C, NC_WINDOW, NULL);
@@ -59,10 +64,12 @@ static void rna_userdef_lmb_select_set(PointerRNA *ptr,int value)
userdef->flag &= ~USER_LMOUSESELECT;
}
+#if 0
static void rna_userdef_rmb_select_set(PointerRNA *ptr,int value)
{
rna_userdef_lmb_select_set(ptr, !value);
}
+#endif
static void rna_userdef_emulate_set(PointerRNA *ptr,int value)
{
@@ -109,11 +116,6 @@ static PointerRNA rna_UserDef_edit_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesEdit, ptr->data);
}
-static PointerRNA rna_UserDef_language_get(PointerRNA *ptr)
-{
- return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesLanguage, ptr->data);
-}
-
static PointerRNA rna_UserDef_filepaths_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesFilePaths, ptr->data);
@@ -129,6 +131,23 @@ static void rna_UserDef_audio_update(bContext *C, PointerRNA *ptr)
sound_init(C);
}
+static void rna_UserDef_weight_color_update(bContext *C, PointerRNA *ptr)
+{
+ Main *bmain= CTX_data_main(C);
+ Object *ob;
+
+ vDM_ColorBand_store((U.flag & USER_CUSTOM_RANGE) ? (&U.coba_weight):NULL);
+
+ for(ob= bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->mode & OB_MODE_WEIGHT_PAINT)
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ }
+
+ rna_userdef_update(C, ptr);
+}
+
+
+
#else
static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
@@ -197,25 +216,29 @@ static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
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);
+ prop= RNA_def_property(srna, "paneltitle", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, 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, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "grouplabel", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "grouplabel", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "grouplabel");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Group Label Font", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "widgetlabel", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "widgetlabel", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "widgetlabel");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Widget Label Font", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "widget", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "widget", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, 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", "");
@@ -317,7 +340,7 @@ static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Driven Selected", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "blend", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "blend", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_ui_text(prop, "Blend", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
@@ -334,97 +357,113 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "ThemeUI");
RNA_def_struct_ui_text(srna, "Theme User Interface", "Theme settings for user interface elements.");
- prop= RNA_def_property(srna, "wcol_regular", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_regular", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_regular");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Regular Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_tool");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Tool Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_radio");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Radio Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_text");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Text Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_option");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Option Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_toggle");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Toggle Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_num");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Number Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_numslider");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Slider Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_box");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Box Backdrop Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_pulldown");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Pulldown Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_back");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Backdrop Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_item");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Item Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_scroll");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Scroll Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_list_item");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "List Item Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, 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", "");
@@ -1390,87 +1429,104 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Name", "Name of the theme.");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "user_interface", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "user_interface", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tui");
RNA_def_property_struct_type(prop, "ThemeUserInterface");
RNA_def_property_ui_text(prop, "User Interface", "");
- prop= RNA_def_property(srna, "view_3d", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "view_3d", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tv3d");
RNA_def_property_struct_type(prop, "ThemeView3D");
RNA_def_property_ui_text(prop, "3D View", "");
- prop= RNA_def_property(srna, "graph_editor", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "graph_editor", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tipo");
RNA_def_property_struct_type(prop, "ThemeGraphEditor");
RNA_def_property_ui_text(prop, "Graph Editor", "");
- prop= RNA_def_property(srna, "file_browser", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "file_browser", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tfile");
RNA_def_property_struct_type(prop, "ThemeFileBrowser");
RNA_def_property_ui_text(prop, "File Browser", "");
- prop= RNA_def_property(srna, "nla_editor", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "nla_editor", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tnla");
RNA_def_property_struct_type(prop, "ThemeNLAEditor");
RNA_def_property_ui_text(prop, "NLA Editor", "");
- prop= RNA_def_property(srna, "dopesheet_editor", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "dopesheet_editor", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tact");
RNA_def_property_struct_type(prop, "ThemeDopeSheet");
RNA_def_property_ui_text(prop, "DopeSheet", "");
- prop= RNA_def_property(srna, "image_editor", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "image_editor", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tima");
RNA_def_property_struct_type(prop, "ThemeImageEditor");
RNA_def_property_ui_text(prop, "Image Editor", "");
- prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tseq");
RNA_def_property_struct_type(prop, "ThemeSequenceEditor");
RNA_def_property_ui_text(prop, "Sequence Editor", "");
- prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tbuts");
RNA_def_property_struct_type(prop, "ThemeProperties");
RNA_def_property_ui_text(prop, "Properties", "");
- prop= RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "text");
RNA_def_property_struct_type(prop, "ThemeTextEditor");
RNA_def_property_ui_text(prop, "Text Editor", "");
- prop= RNA_def_property(srna, "timeline", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "timeline", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "ttime");
RNA_def_property_struct_type(prop, "ThemeTimeline");
RNA_def_property_ui_text(prop, "Timeline", "");
- prop= RNA_def_property(srna, "node_editor", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "node_editor", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tnode");
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);
+ prop= RNA_def_property(srna, "logic_editor", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, 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);
+ prop= RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "toops");
RNA_def_property_struct_type(prop, "ThemeOutliner");
RNA_def_property_ui_text(prop, "Outliner", "");
- prop= RNA_def_property(srna, "info", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "info", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tinfo");
RNA_def_property_struct_type(prop, "ThemeInfo");
RNA_def_property_ui_text(prop, "Info", "");
- prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tuserpref");
RNA_def_property_struct_type(prop, "ThemeUserPreferences");
RNA_def_property_ui_text(prop, "User Preferences", "");
- prop= RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_collection_sdna(prop, NULL, "tarm", "");
RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
RNA_def_property_ui_text(prop, "Bone Color Sets", "");
@@ -1541,6 +1597,16 @@ static void rna_def_userdef_view(BlenderRNA *brna)
{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 select_mouse_items[] = {
+ {USER_LMOUSESELECT, "LEFT", 0, "Left", "Use left Mouse Button for selection."},
+ {0, "RIGHT", 0, "Right", "Use Right Mouse Button for selection."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem middle_mouse_mouse_items[] = {
+ {0, "PAN", 0, "Pan", "Use the middle mouse button for panning the viewport."},
+ {USER_VIEWMOVE, "ROTATE", 0, "Rotate", "Use the middle mouse button for rotation the viewport."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem view_rotation_items[] = {
{0, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport."},
@@ -1623,6 +1689,10 @@ static void rna_def_userdef_view(BlenderRNA *brna)
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.");
+ prop= RNA_def_property(srna, "continuous_mouse", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_CONTINUOUS_MOUSE);
+ RNA_def_property_ui_text(prop, "Continuous Grab", "Experimental option to allow moving the mouse outside the view");
+
prop= RNA_def_property(srna, "global_pivot", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCKAROUND);
RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/scaling pivot in all 3D Views.");
@@ -1656,15 +1726,11 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Rotate Around Selection", "Use selection as the orbiting center.");
/* select with */
- prop= RNA_def_property(srna, "left_mouse_button_select", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_LMOUSESELECT);
- RNA_def_property_boolean_funcs(prop, NULL, "rna_userdef_lmb_select_set");
- RNA_def_property_ui_text(prop, "Left Mouse Button Select", "Use left Mouse Button for selection.");
- prop= RNA_def_property(srna, "right_mouse_button_select", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_LMOUSESELECT);
- RNA_def_property_boolean_funcs(prop, NULL, "rna_userdef_rmb_select_set");
- RNA_def_property_ui_text(prop, "Right Mouse Button Select", "Use Right Mouse Button for selection.");
+ prop= RNA_def_property(srna, "select_mouse", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, select_mouse_items);
+ RNA_def_property_ui_text(prop, "Select Mouse", "The mouse button used for selection.");
prop= RNA_def_property(srna, "emulate_3_button_mouse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TWOBUTTONMOUSE);
@@ -1693,13 +1759,11 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* middle mouse button */
- prop= RNA_def_property(srna, "middle_mouse_rotate", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_VIEWMOVE);
- RNA_def_property_ui_text(prop, "Middle Mouse Rotate", "Use the middle mouse button for rotation the viewport.");
-
- prop= RNA_def_property(srna, "middle_mouse_pan", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_VIEWMOVE);
- RNA_def_property_ui_text(prop, "Middle Mouse Pan", "Use the middle mouse button for panning the viewport.");
+
+ prop= RNA_def_property(srna, "middle_mouse", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, middle_mouse_mouse_items);
+ RNA_def_property_ui_text(prop, "Middle Mouse", "Use the middle mouse button to pan or zoom the view.");
prop= RNA_def_property(srna, "wheel_invert_zoom", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_WHEELZOOMDIR);
@@ -1851,10 +1915,14 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
prop= RNA_def_property(srna, "auto_keyframe_insert_available", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTAVAIL);
RNA_def_property_ui_text(prop, "Auto Keyframe Insert Available", "Automatic keyframe insertion in available curves.");
-
- prop= RNA_def_property(srna, "auto_keyframe_insert_needed", PROP_BOOLEAN, PROP_NONE);
+
+ prop= RNA_def_property(srna, "auto_keyframe_insert_keyingset", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_ONLYKEYINGSET);
+ RNA_def_property_ui_text(prop, "Auto Keyframe Insert Keying Set", "Automatic keyframe insertion using active Keying Set.");
+
+ prop= RNA_def_property(srna, "keyframe_insert_needed", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTNEEDED);
- RNA_def_property_ui_text(prop, "Auto Keyframe Insert Needed", "Automatic keyframe insertion only when keyframe needed.");
+ RNA_def_property_ui_text(prop, "Keyframe Insert Needed", "Keyframe insertion only when keyframe needed.");
prop= RNA_def_property(srna, "use_visual_keying", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_AUTOMATKEY);
@@ -1937,12 +2005,83 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Duplicate Particle", "Causes particle systems to be duplicated with the object.");
}
-static void rna_def_userdef_language(BlenderRNA *brna)
+static void rna_def_userdef_system(BlenderRNA *brna)
{
PropertyRNA *prop;
StructRNA *srna;
-
- /* hardcoded here, could become dynamic somehow */
+
+ static EnumPropertyItem gl_texture_clamp_items[] = {
+ {0, "CLAMP_OFF", 0, "Off", ""},
+ {8192, "CLAMP_8192", 0, "8192", ""},
+ {4096, "CLAMP_4096", 0, "4096", ""},
+ {2048, "CLAMP_2048", 0, "2048", ""},
+ {1024, "CLAMP_1024", 0, "1024", ""},
+ {512, "CLAMP_512", 0, "512", ""},
+ {256, "CLAMP_256", 0, "256", ""},
+ {128, "CLAMP_128", 0, "128", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem audio_mixing_samples_items[] = {
+ {256, "SAMPLES_256", 0, "256", "Set audio mixing buffer size to 256 samples"},
+ {512, "SAMPLES_512", 0, "512", "Set audio mixing buffer size to 512 samples"},
+ {1024, "SAMPLES_1024", 0, "1024", "Set audio mixing buffer size to 1024 samples"},
+ {2048, "SAMPLES_2048", 0, "2048", "Set audio mixing buffer size to 2048 samples"},
+ {4096, "SAMPLES_4096", 0, "4096", "Set audio mixing buffer size to 4096 samples"},
+ {8192, "SAMPLES_8192", 0, "8192", "Set audio mixing buffer size to 8192 samples"},
+ {16384, "SAMPLES_16384", 0, "16384", "Set audio mixing buffer size to 16384 samples"},
+ {32768, "SAMPLES_32768", 0, "32768", "Set audio mixing buffer size to 32768 samples"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem audio_device_items[] = {
+ {0, "NONE", 0, "None", "Null device - there will be no audio output."},
+#ifdef WITH_SDL
+ {1, "SDL", 0, "SDL", "SDL device - simple direct media layer, recommended for sequencer usage."},
+#endif
+#ifdef WITH_OPENAL
+ {2, "OPENAL", 0, "OpenAL", "OpenAL device - supports 3D audio, recommended for game engine usage."},
+#endif
+#ifdef WITH_JACK
+ {3, "JACK", 0, "Jack", "Jack device - open source pro audio, recommended for pro audio users."},
+#endif
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem audio_rate_items[] = {
+// {8000, "RATE_8000", 0, "8 kHz", "Set audio sampling rate to 8000 samples per second."},
+// {11025, "RATE_11025", 0, "11.025 kHz", "Set audio sampling rate to 11025 samples per second."},
+// {16000, "RATE_16000", 0, "16 kHz", "Set audio sampling rate to 16000 samples per second."},
+// {22050, "RATE_22050", 0, "22.05 kHz", "Set audio sampling rate to 22050 samples per second."},
+// {32000, "RATE_32000", 0, "32 kHz", "Set audio sampling rate to 32000 samples per second."},
+ {44100, "RATE_44100", 0, "44.1 kHz", "Set audio sampling rate to 44100 samples per second."},
+ {48000, "RATE_48000", 0, "48 kHz", "Set audio sampling rate to 48000 samples per second."},
+// {88200, "RATE_88200", 0, "88.2 kHz", "Set audio sampling rate to 88200 samples per second."},
+ {96000, "RATE_96000", 0, "96 kHz", "Set audio sampling rate to 96000 samples per second."},
+ {192000, "RATE_192000", 0, "192 kHz", "Set audio sampling rate to 192000 samples per second."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem audio_format_items[] = {
+ {0x01, "U8", 0, "8-bit Unsigned", "Set audio sample format to 8 bit unsigned integer."},
+ {0x12, "S16", 0, "16-bit Signed", "Set audio sample format to 16 bit signed integer."},
+ {0x13, "S24", 0, "24-bit Signed", "Set audio sample format to 24 bit signed integer."},
+ {0x14, "S32", 0, "32-bit Signed", "Set audio sample format to 32 bit signed integer."},
+ {0x24, "FLOAT", 0, "32-bit Float", "Set audio sample format to 32 bit float."},
+ {0x28, "DOUBLE", 0, "64-bit Float", "Set audio sample format to 64 bit float."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem audio_channel_items[] = {
+ {1, "MONO", 0, "Mono", "Set audio channels to mono."},
+ {2, "STEREO", 0, "Stereo", "Set audio channels to stereo."},
+ {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels."},
+ {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound."},
+ {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem draw_method_items[] = {
+ {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}};
+
+ /* hardcoded here, could become dynamic somehow */
static EnumPropertyItem language_items[] = {
{0, "ENGLISH", 0, "English", ""},
{1, "JAPANESE", 0, "Japanese", ""},
@@ -1968,11 +2107,13 @@ static void rna_def_userdef_language(BlenderRNA *brna)
{21, "GREEK", 0, "Greek", ""},
{22, "KOREAN", 0, "Korean", ""},
{0, NULL, 0, NULL, NULL}};
-
- srna= RNA_def_struct(brna, "UserPreferencesLanguage", NULL);
+
+ srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
- RNA_def_struct_ui_text(srna, "Language & Font", "User interface translation settings.");
+ RNA_def_struct_ui_text(srna, "System & OpenGL", "Graphics driver and operating system settings.");
+
+ /* Language */
prop= RNA_def_property(srna, "international_fonts", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_DOTRANSLATE);
@@ -2016,88 +2157,6 @@ static void rna_def_userdef_language(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_USETEXTUREFONT);
RNA_def_property_ui_text(prop, "Textured Fonts", "Use textures for drawing international fonts.");
RNA_def_property_update(prop, 0, "rna_userdef_update");
-}
-
-static void rna_def_userdef_system(BlenderRNA *brna)
-{
- PropertyRNA *prop;
- StructRNA *srna;
-
- static EnumPropertyItem gl_texture_clamp_items[] = {
- {0, "GL_CLAMP_OFF", 0, "Off", ""},
- {8192, "GL_CLAMP_8192", 0, "8192", ""},
- {4096, "GL_CLAMP_4096", 0, "4096", ""},
- {2048, "GL_CLAMP_2048", 0, "2048", ""},
- {1024, "GL_CLAMP_1024", 0, "1024", ""},
- {512, "GL_CLAMP_512", 0, "512", ""},
- {256, "GL_CLAMP_256", 0, "256", ""},
- {128, "GL_CLAMP_128", 0, "128", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem audio_mixing_samples_items[] = {
- {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"},
- {4096, "AUDIO_SAMPLES_4096", 0, "4096", "Set audio mixing buffer size to 4096 samples"},
- {8192, "AUDIO_SAMPLES_8192", 0, "8192", "Set audio mixing buffer size to 8192 samples"},
- {16384, "AUDIO_SAMPLES_16384", 0, "16384", "Set audio mixing buffer size to 16384 samples"},
- {32768, "AUDIO_SAMPLES_32768", 0, "32768", "Set audio mixing buffer size to 32768 samples"},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem audio_device_items[] = {
- {0, "AUDIO_DEVICE_NULL", 0, "No Audio", "Null device - there will be no audio output."},
-#ifdef WITH_SDL
- {1, "AUDIO_DEVICE_SDL", 0, "SDL", "SDL device - simple direct media layer, recommended for sequencer usage."},
-#endif
-#ifdef WITH_OPENAL
- {2, "AUDIO_DEVICE_OPENAL", 0, "OpenAL", "OpenAL device - supports 3D audio, recommended for game engine usage."},
-#endif
-#ifdef WITH_JACK
- {3, "AUDIO_DEVICE_JACK", 0, "Jack", "Jack device - open source pro audio, recommended for pro audio users."},
-#endif
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem audio_rate_items[] = {
-// {8000, "AUDIO_RATE_8000", 0, "8 kHz", "Set audio sampling rate to 8000 samples per second."},
-// {11025, "AUDIO_RATE_11025", 0, "11.025 kHz", "Set audio sampling rate to 11025 samples per second."},
-// {16000, "AUDIO_RATE_16000", 0, "16 kHz", "Set audio sampling rate to 16000 samples per second."},
-// {22050, "AUDIO_RATE_22050", 0, "22.05 kHz", "Set audio sampling rate to 22050 samples per second."},
-// {32000, "AUDIO_RATE_32000", 0, "32 kHz", "Set audio sampling rate to 32000 samples per second."},
- {44100, "AUDIO_RATE_44100", 0, "44.1 kHz", "Set audio sampling rate to 44100 samples per second."},
- {48000, "AUDIO_RATE_48000", 0, "48 kHz", "Set audio sampling rate to 48000 samples per second."},
-// {88200, "AUDIO_RATE_88200", 0, "88.2 kHz", "Set audio sampling rate to 88200 samples per second."},
- {96000, "AUDIO_RATE_96000", 0, "96 kHz", "Set audio sampling rate to 96000 samples per second."},
- {192000, "AUDIO_RATE_192000", 0, "192 kHz", "Set audio sampling rate to 192000 samples per second."},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem audio_format_items[] = {
- {0x01, "AUDIO_FORMAT_U8", 0, "8-bit Unsigned", "Set audio sample format to 8 bit unsigned integer."},
- {0x12, "AUDIO_FORMAT_S16", 0, "16-bit Signed", "Set audio sample format to 16 bit signed integer."},
- {0x13, "AUDIO_FORMAT_S24", 0, "24-bit Signed", "Set audio sample format to 24 bit signed integer."},
- {0x14, "AUDIO_FORMAT_S32", 0, "32-bit Signed", "Set audio sample format to 32 bit signed integer."},
- {0x24, "AUDIO_FORMAT_FLOAT", 0, "32-bit Float", "Set audio sample format to 32 bit float."},
- {0x28, "AUDIO_FORMAT_DOUBLE", 0, "64-bit Float", "Set audio sample format to 64 bit float."},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem audio_channel_items[] = {
- {1, "AUDIO_CHANNELS_MONO", 0, "Mono", "Set audio channels to mono."},
- {2, "AUDIO_CHANNELS_STEREO", 0, "Stereo", "Set audio channels to stereo."},
- {4, "AUDIO_CHANNELS_SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels."},
- {6, "AUDIO_CHANNELS_SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound."},
- {8, "AUDIO_CHANNELS_SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound."},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem draw_method_items[] = {
- {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");
- RNA_def_struct_nested(brna, srna, "UserPreferences");
- RNA_def_struct_ui_text(srna, "System & OpenGL", "Graphics driver and operating system settings.");
/* System & OpenGL */
@@ -2109,11 +2168,14 @@ static void rna_def_userdef_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_weight_color_range", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_CUSTOM_RANGE);
RNA_def_property_ui_text(prop, "Use Weight Color Range", "Enable color range used for weight visualization in weight painting mode.");
+ RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
- prop= RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coba_weight");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Weight Color Range", "Color range used for weight visualization in weight painting mode.");
+ RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
prop= RNA_def_property(srna, "enable_all_codecs", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ALLWINCODECS);
@@ -2146,14 +2208,6 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_SOUND);
RNA_def_property_ui_text(prop, "Game Sound", "Enables sounds to be played in games.");
- prop= RNA_def_property(srna, "filter_file_extensions", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_FILTERFILEEXTS);
- RNA_def_property_ui_text(prop, "Filter File Extensions", "Display only files with extensions in the image select window.");
-
- prop= RNA_def_property(srna, "hide_dot_files_datablocks", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_DOT);
- RNA_def_property_ui_text(prop, "Hide Dot Files/Datablocks", "Hide files/datablocks that start with a dot(.*)");
-
prop= RNA_def_property(srna, "clip_alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "glalphaclip");
RNA_def_property_range(prop, 0.0f, 1.0f);
@@ -2163,6 +2217,10 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_MIPMAP);
RNA_def_property_ui_text(prop, "Mipmaps", "Scale textures for the 3d View (looks nicer but uses more memory and slows image reloading.)");
+ prop= RNA_def_property(srna, "use_vbos", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_VBO);
+ RNA_def_property_ui_text(prop, "VBOs", "Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering.");
+
prop= RNA_def_property(srna, "gl_texture_limit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "glreslimit");
RNA_def_property_enum_items(prop, gl_texture_clamp_items);
@@ -2233,7 +2291,15 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
RNA_def_struct_ui_text(srna, "File Paths", "Default paths for external files.");
-
+
+ prop= RNA_def_property(srna, "hide_dot_files_datablocks", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_DOT);
+ RNA_def_property_ui_text(prop, "Hide Dot Files/Datablocks", "Hide files/datablocks that start with a dot(.*)");
+
+ prop= RNA_def_property(srna, "filter_file_extensions", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_FILTERFILEEXTS);
+ RNA_def_property_ui_text(prop, "Filter File Extensions", "Display only files with extensions in the image select window.");
+
prop= RNA_def_property(srna, "use_relative_paths", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELPATHS);
RNA_def_property_ui_text(prop, "Relative Paths", "Default relative path option for the file selector.");
@@ -2310,12 +2376,12 @@ void RNA_def_userdef(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem user_pref_sections[] = {
- {0, "VIEW_CONTROLS", 0, "View", ""},
- {1, "EDIT_METHODS", 0, "Editing", ""},
- {2, "LANGUAGE_COLORS", 0, "Language", ""},
- {3, "SYSTEM_OPENGL", 0, "System", ""},
- {4, "FILE_PATHS", 0, "File", ""},
- {5, "THEMES", 0, "Themes", ""},
+ {USER_SECTION_INTERFACE, "INTERFACE", 0, "Interface", ""},
+ {USER_SECTION_EDIT, "EDITING", 0, "Editing", ""},
+ {USER_SECTION_INPUT, "INPUT", 0, "Input", ""},
+// {USER_SECTION_THEME, "THEMES", 0, "Themes", ""}, // Leave this out until we figure out a way to manage themes in the prefs.
+ {USER_SECTION_FILE, "FILES", 0, "File", ""},
+ {USER_SECTION_SYSTEM, "SYSTEM", 0, "System", ""},
{0, NULL, 0, NULL, NULL}};
rna_def_userdef_dothemes(brna);
@@ -2329,6 +2395,7 @@ void RNA_def_userdef(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "userpref");
RNA_def_property_enum_items(prop, user_pref_sections);
RNA_def_property_ui_text(prop, "Active Section", "Active section of the user preferences shown in the user interface.");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "themes", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "themes", NULL);
@@ -2341,34 +2408,32 @@ void RNA_def_userdef(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Styles", "");
/* nested structs */
- prop= RNA_def_property(srna, "view", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "view", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesView");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_view_get", NULL, NULL);
RNA_def_property_ui_text(prop, "View & Controls", "Preferences related to viewing data.");
- prop= RNA_def_property(srna, "edit", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "edit", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesEdit");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_edit_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Edit Methods", "Settings for interacting with Blender data.");
- prop= RNA_def_property(srna, "language", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_struct_type(prop, "UserPreferencesLanguage");
- RNA_def_property_pointer_funcs(prop, "rna_UserDef_language_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Language & Font", "User interface translation settings.");
-
- prop= RNA_def_property(srna, "filepaths", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "filepaths", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesFilePaths");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_filepaths_get", NULL, NULL);
RNA_def_property_ui_text(prop, "File Paths", "Default paths for external files.");
- prop= RNA_def_property(srna, "system", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "system", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesSystem");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_system_get", NULL, NULL);
RNA_def_property_ui_text(prop, "System & OpenGL", "Graphics driver and operating system settings.");
rna_def_userdef_view(brna);
rna_def_userdef_edit(brna);
- rna_def_userdef_language(brna);
rna_def_userdef_filepaths(brna);
rna_def_userdef_system(brna);
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 53532e3f383..82b244fa702 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -24,14 +24,37 @@
#include <stdlib.h>
+#include "RNA_access.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "RNA_types.h"
#include "rna_internal.h"
+#include "DNA_screen_types.h"
+#include "DNA_space_types.h"
+#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
-#include "WM_types.h" /* wmEvent */
+#include "WM_types.h"
+
+EnumPropertyItem event_keymouse_value_items[] = {
+ {KM_ANY, "ANY", 0, "Any", ""},
+ {KM_PRESS, "PRESS", 0, "Press", ""},
+ {KM_RELEASE, "RELEASE", 0, "Release", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem event_tweak_value_items[]= {
+ {KM_ANY, "ANY", 0, "Any", ""},
+ {EVT_GESTURE_N, "NORTH", 0, "North", ""},
+ {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
+ {EVT_GESTURE_E, "EAST", 0, "East", ""},
+ {EVT_GESTURE_SE, "SOUTH_EAST", 0, "South-East", ""},
+ {EVT_GESTURE_S, "SOUTH", 0, "South", ""},
+ {EVT_GESTURE_SW, "SOUTH_WEST", 0, "South-West", ""},
+ {EVT_GESTURE_W, "WEST", 0, "West", ""},
+ {EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""},
+ {0, NULL, 0, NULL, NULL}};
EnumPropertyItem event_value_items[] = {
{KM_ANY, "ANY", 0, "Any", ""},
@@ -40,28 +63,64 @@ EnumPropertyItem event_value_items[] = {
{KM_RELEASE, "RELEASE", 0, "Release", ""},
{0, NULL, 0, NULL, NULL}};
+EnumPropertyItem event_tweak_type_items[]= {
+ {EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Left", ""},
+ {EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Middle", ""},
+ {EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Right", ""},
+ {EVT_TWEAK_A, "EVT_TWEAK_A", 0, "Action", ""},
+ {EVT_TWEAK_S, "EVT_TWEAK_S", 0, "Select", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem event_mouse_type_items[]= {
+ {LEFTMOUSE, "LEFTMOUSE", 0, "Left", ""},
+ {MIDDLEMOUSE, "MIDDLEMOUSE", 0, "Middle", ""},
+ {RIGHTMOUSE, "RIGHTMOUSE", 0, "Right", ""},
+ {BUTTON4MOUSE, "BUTTON4MOUSE", 0, "Button4", ""},
+ {BUTTON5MOUSE, "BUTTON5MOUSE", 0, "Button5", ""},
+ {ACTIONMOUSE, "ACTIONMOUSE", 0, "Action", ""},
+ {SELECTMOUSE, "SELECTMOUSE", 0, "Select", ""},
+ {0, "", 0, NULL, NULL},
+ {MOUSEMOVE, "MOUSEMOVE", 0, "Move", ""},
+ {0, "", 0, NULL, NULL},
+ {WHEELUPMOUSE, "WHEELUPMOUSE", 0, "Wheel Up", ""},
+ {WHEELDOWNMOUSE, "WHEELDOWNMOUSE", 0, "Wheel Down", ""},
+ {WHEELINMOUSE, "WHEELINMOUSE", 0, "Wheel In", ""},
+ {WHEELOUTMOUSE, "WHEELOUTMOUSE", 0, "Wheel Out", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem event_timer_type_items[]= {
+ {TIMER, "TIMER", 0, "Timer", ""},
+ {TIMER0, "TIMER0", 0, "Timer 0", ""},
+ {TIMER1, "TIMER1", 0, "Timer 1", ""},
+ {TIMER2, "TIMER2", 0, "Timer 2", ""},
+ {TIMERJOBS, "JOBS_TIMER", 0, "Jobs Timer", ""},
+ {0, NULL, 0, NULL, NULL}};
+
/* not returned: CAPSLOCKKEY, UNKNOWNKEY, GRLESSKEY */
EnumPropertyItem event_type_items[] = {
+ {0, "NONE", 0, "", ""},
{LEFTMOUSE, "LEFTMOUSE", 0, "Left Mouse", ""},
{MIDDLEMOUSE, "MIDDLEMOUSE", 0, "Middle Mouse", ""},
{RIGHTMOUSE, "RIGHTMOUSE", 0, "Right Mouse", ""},
+ {BUTTON4MOUSE, "BUTTON4MOUSE", 0, "Button4 Mouse", ""},
+ {BUTTON5MOUSE, "BUTTON5MOUSE", 0, "Button5 Mouse", ""},
{ACTIONMOUSE, "ACTIONMOUSE", 0, "Action Mouse", ""},
{SELECTMOUSE, "SELECTMOUSE", 0, "Select Mouse", ""},
-
+ {0, "", 0, NULL, NULL},
{MOUSEMOVE, "MOUSEMOVE", 0, "Mouse Move", ""},
-
+ {0, "", 0, NULL, NULL},
{WHEELUPMOUSE, "WHEELUPMOUSE", 0, "Wheel Up", ""},
{WHEELDOWNMOUSE, "WHEELDOWNMOUSE", 0, "Wheel Down", ""},
{WHEELINMOUSE, "WHEELINMOUSE", 0, "Wheel In", ""},
{WHEELOUTMOUSE, "WHEELOUTMOUSE", 0, "Wheel Out", ""},
-
+ {0, "", 0, NULL, NULL},
{EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Tweak Left", ""},
{EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Tweak Middle", ""},
{EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Tweak Right", ""},
{EVT_TWEAK_A, "EVT_TWEAK_A", 0, "Tweak Action", ""},
{EVT_TWEAK_S, "EVT_TWEAK_S", 0, "Tweak Select", ""},
-
+ {0, "", 0, NULL, NULL},
{AKEY, "A", 0, "A", ""},
{BKEY, "B", 0, "B", ""},
{CKEY, "C", 0, "C", ""},
@@ -88,7 +147,7 @@ EnumPropertyItem event_type_items[] = {
{XKEY, "X", 0, "X", ""},
{YKEY, "Y", 0, "Y", ""},
{ZKEY, "Z", 0, "Z", ""},
-
+ {0, "", 0, NULL, NULL},
{ZEROKEY, "ZERO", 0, "0", ""},
{ONEKEY, "ONE", 0, "1", ""},
{TWOKEY, "TWO", 0, "2", ""},
@@ -99,16 +158,16 @@ EnumPropertyItem event_type_items[] = {
{SEVENKEY, "SEVEN", 0, "7", ""},
{EIGHTKEY, "EIGHT", 0, "8", ""},
{NINEKEY, "NINE", 0, "9", ""},
-
+ {0, "", 0, NULL, NULL},
{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", ""},
-
+ {0, "", 0, NULL, NULL},
{COMMANDKEY, "COMMAND", 0, "Command", ""},
-
+ {0, "", 0, NULL, NULL},
{ESCKEY, "ESC", 0, "Esc", ""},
{TABKEY, "TAB", 0, "Tab", ""},
{RETKEY, "RET", 0, "Return", ""},
@@ -165,8 +224,20 @@ EnumPropertyItem event_type_items[] = {
{PAGEUPKEY, "PAGE_UP", 0, "Page Up", ""},
{PAGEDOWNKEY, "PAGE_DOWN", 0, "Page Down", ""},
{ENDKEY, "END", 0, "End", ""},
+ {0, "", 0, NULL, NULL},
+ {TIMER, "TIMER", 0, "Timer", ""},
+ {TIMER0, "TIMER0", 0, "Timer 0", ""},
+ {TIMER1, "TIMER1", 0, "Timer 1", ""},
+ {TIMER2, "TIMER2", 0, "Timer 2", ""},
+ {TIMERJOBS, "JOBS_TIMER", 0, "Jobs Timer", ""},
{0, NULL, 0, NULL, NULL}};
+#define KMI_TYPE_KEYBOARD 0
+#define KMI_TYPE_MOUSE 1
+#define KMI_TYPE_TWEAK 2
+#define KMI_TYPE_TEXTINPUT 3
+#define KMI_TYPE_TIMER 4
+
#ifdef RNA_RUNTIME
#include "WM_api.h"
@@ -261,6 +332,156 @@ static void rna_Window_screen_update(bContext *C, PointerRNA *ptr)
}
}
+static PointerRNA rna_KeyMapItem_properties_get(PointerRNA *ptr)
+{
+ wmKeyMapItem *kmi= ptr->data;
+
+ if(kmi->ptr)
+ return *(kmi->ptr);
+
+ //return rna_pointer_inherit_refine(ptr, &RNA_OperatorProperties, op->properties);
+ return PointerRNA_NULL;
+}
+
+static int rna_wmKeyMapItem_map_type_get(PointerRNA *ptr)
+{
+ wmKeyMapItem *kmi= ptr->data;
+
+ if(ISTIMER(kmi->type)) return KMI_TYPE_TIMER;
+ if(ISKEYBOARD(kmi->type)) return KMI_TYPE_KEYBOARD;
+ if(ISTWEAK(kmi->type)) return KMI_TYPE_TWEAK;
+ if(ISMOUSE(kmi->type)) return KMI_TYPE_MOUSE;
+ if(kmi->type == KM_TEXTINPUT) return KMI_TYPE_TEXTINPUT;
+ return KMI_TYPE_KEYBOARD;
+}
+
+static void rna_wmKeyMapItem_map_type_set(PointerRNA *ptr, int value)
+{
+ wmKeyMapItem *kmi= ptr->data;
+ int map_type= rna_wmKeyMapItem_map_type_get(ptr);
+
+ if(value != map_type) {
+ switch(value) {
+ case KMI_TYPE_KEYBOARD:
+ kmi->type= AKEY;
+ kmi->val= KM_PRESS;
+ break;
+ case KMI_TYPE_TWEAK:
+ kmi->type= EVT_TWEAK_L;
+ kmi->val= KM_ANY;
+ break;
+ case KMI_TYPE_MOUSE:
+ kmi->type= LEFTMOUSE;
+ kmi->val= KM_PRESS;
+ break;
+ case KMI_TYPE_TEXTINPUT:
+ kmi->type= KM_TEXTINPUT;
+ kmi->val= KM_NOTHING;
+ break;
+ case KMI_TYPE_TIMER:
+ kmi->type= TIMER;
+ kmi->val= KM_NOTHING;
+ break;
+ }
+ }
+}
+
+static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ int map_type= rna_wmKeyMapItem_map_type_get(ptr);
+
+ if(map_type == KMI_TYPE_MOUSE) return event_mouse_type_items;
+ if(map_type == KMI_TYPE_TWEAK) return event_tweak_type_items;
+ if(map_type == KMI_TYPE_TIMER) return event_timer_type_items;
+ else return event_type_items;
+}
+
+static EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ int map_type= rna_wmKeyMapItem_map_type_get(ptr);
+
+ if(map_type == KMI_TYPE_MOUSE || map_type == KMI_TYPE_KEYBOARD) return event_keymouse_value_items;
+ if(map_type == KMI_TYPE_TWEAK) return event_tweak_value_items;
+ else return event_value_items;
+}
+
+static PointerRNA rna_WindowManager_active_keyconfig_get(PointerRNA *ptr)
+{
+ wmWindowManager *wm= ptr->data;
+ wmKeyConfig *kc;
+
+ for(kc=wm->keyconfigs.first; kc; kc=kc->next)
+ if(strcmp(kc->idname, U.keyconfigstr) == 0)
+ break;
+
+ if(!kc)
+ kc= wm->defaultconf;
+
+ return rna_pointer_inherit_refine(ptr, &RNA_KeyConfig, kc);
+}
+
+static void rna_WindowManager_active_keyconfig_set(PointerRNA *ptr, PointerRNA value)
+{
+ wmKeyConfig *kc= value.data;
+
+ if(kc)
+ BLI_strncpy(U.keyconfigstr, kc->idname, sizeof(U.keyconfigstr));
+}
+
+static PointerRNA rna_WindowManager_active_keymap_get(PointerRNA *ptr)
+{
+ wmWindowManager *wm= ptr->data;
+ wmKeyMap *km= NULL;
+
+ if(wm->defaultconf) {
+ km= BLI_findlink(&wm->defaultconf->keymaps, wm->defaultactmap);
+
+ if(!km)
+ km= wm->defaultconf->keymaps.first;
+ }
+
+ return rna_pointer_inherit_refine(ptr, &RNA_KeyMap, WM_keymap_active(wm, km));
+}
+
+static void rna_WindowManager_active_keymap_set(PointerRNA *ptr, PointerRNA value)
+{
+ wmWindowManager *wm= ptr->data;
+ wmKeyMap *km= value.data;
+ int index;
+
+ if(wm->defaultconf && km) {
+ km= WM_keymap_find(wm->defaultconf, km->idname, km->spaceid, km->regionid);
+ index= BLI_findindex(&wm->defaultconf->keymaps, km);
+
+ if(index != -1) wm->defaultactmap= index;
+ else wm->defaultactmap= 0;
+ }
+}
+
+static void rna_wmKeyMapItem_idname_get(PointerRNA *ptr, char *value)
+{
+ wmKeyMapItem *kmi= ptr->data;
+ WM_operator_py_idname(value, kmi->idname);
+}
+
+static int rna_wmKeyMapItem_idname_length(PointerRNA *ptr)
+{
+ wmKeyMapItem *kmi= ptr->data;
+ char pyname[OP_MAX_TYPENAME];
+
+ WM_operator_py_idname(pyname, kmi->idname);
+ return strlen(pyname);
+}
+
+static void rna_wmKeyMapItem_idname_set(PointerRNA *ptr, const char *value)
+{
+ wmKeyMapItem *kmi= ptr->data;
+ char idname[OP_MAX_TYPENAME];
+
+ WM_operator_bl_idname(idname, value);
+ BLI_strncpy(kmi->idname, idname, sizeof(kmi->idname));
+}
+
#else
static void rna_def_operator(BlenderRNA *brna)
@@ -278,7 +499,8 @@ static void rna_def_operator(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "OperatorProperties");
RNA_def_property_ui_text(prop, "Properties", "");
RNA_def_property_pointer_funcs(prop, "rna_Operator_properties_get", NULL, NULL);
@@ -404,7 +626,8 @@ static void rna_def_window(BlenderRNA *brna)
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);
+ prop= RNA_def_property(srna, "screen", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, 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);
@@ -430,9 +653,154 @@ static void rna_def_windowmanager(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Window");
RNA_def_property_ui_text(prop, "Windows", "Open windows.");
+ prop= RNA_def_property(srna, "keyconfigs", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "KeyConfig");
+ RNA_def_property_ui_text(prop, "Key Configurations", "Registered key configurations.");
+
+ prop= RNA_def_property(srna, "active_keyconfig", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "KeyConfig");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_funcs(prop, "rna_WindowManager_active_keyconfig_get", "rna_WindowManager_active_keyconfig_set", 0);
+ RNA_def_property_ui_text(prop, "Active Key Configuration", "");
+
+ prop= RNA_def_property(srna, "default_keyconfig", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "defaultconf");
+ RNA_def_property_struct_type(prop, "KeyConfig");
+ RNA_def_property_ui_text(prop, "Default Key Configuration", "");
+
+ prop= RNA_def_property(srna, "active_keymap", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "KeyMap");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_funcs(prop, "rna_WindowManager_active_keymap_get", "rna_WindowManager_active_keymap_set", 0);
+ RNA_def_property_ui_text(prop, "Active Key Map", "");
+
RNA_api_wm(srna);
}
+static void rna_def_keyconfig(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ FunctionRNA *func;
+ PropertyRNA *prop, *parm;
+
+ static EnumPropertyItem map_type_items[] = {
+ {KMI_TYPE_KEYBOARD, "KEYBOARD", 0, "Keyboard", ""},
+ {KMI_TYPE_TWEAK, "TWEAK", 0, "Tweak", ""},
+ {KMI_TYPE_MOUSE, "MOUSE", 0, "Mouse", ""},
+ {KMI_TYPE_TEXTINPUT, "TEXTINPUT", 0, "Text Input", ""},
+ {KMI_TYPE_TIMER, "TIMER", 0, "Timer", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ /* KeyConfig */
+ srna= RNA_def_struct(brna, "KeyConfig", NULL);
+ RNA_def_struct_sdna(srna, "wmKeyConfig");
+ RNA_def_struct_ui_text(srna, "Key Configuration", "Input configuration, including keymaps.");
+
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "idname");
+ RNA_def_property_ui_text(prop, "Name", "Name of the key configuration.");
+ RNA_def_struct_name_property(srna, prop);
+
+ prop= RNA_def_property(srna, "keymaps", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "KeyMap");
+ RNA_def_property_ui_text(prop, "Key Maps", "Key maps configured as part of this configuration.");
+
+ RNA_api_keyconfig(srna);
+
+ /* KeyMap */
+ srna= RNA_def_struct(brna, "KeyMap", NULL);
+ RNA_def_struct_sdna(srna, "wmKeyMap");
+ RNA_def_struct_ui_text(srna, "Key Map", "Input configuration, including keymaps.");
+
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "idname");
+ RNA_def_property_ui_text(prop, "Name", "Name of the key map.");
+ RNA_def_struct_name_property(srna, prop);
+
+ prop= RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "spaceid");
+ RNA_def_property_enum_items(prop, space_type_items);
+ RNA_def_property_ui_text(prop, "Space Type", "Optional space type keymap is associated with.");
+
+ prop= RNA_def_property(srna, "region_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "regionid");
+ RNA_def_property_enum_items(prop, region_type_items);
+ RNA_def_property_ui_text(prop, "Region Type", "Optional region type keymap is associated with.");
+
+ prop= RNA_def_property(srna, "items", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "KeyMapItem");
+ RNA_def_property_ui_text(prop, "Items", "Items in the keymap, linking an operator to an input event.");
+
+ prop= RNA_def_property(srna, "user_defined", PROP_BOOLEAN, PROP_NEVER_NULL);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_USER);
+ RNA_def_property_ui_text(prop, "User Defined", "Keymap is defined by the user.");
+
+ RNA_api_keymap(srna);
+
+ /* KeyMapItem */
+ srna= RNA_def_struct(brna, "KeyMapItem", NULL);
+ RNA_def_struct_sdna(srna, "wmKeyMapItem");
+ RNA_def_struct_ui_text(srna, "Key Map Item", "Item in a Key Map.");
+
+ prop= RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "idname");
+ RNA_def_property_ui_text(prop, "Identifier", "Identifier of operator to call on input event.");
+ RNA_def_property_string_funcs(prop, "rna_wmKeyMapItem_idname_get", "rna_wmKeyMapItem_idname_length", "rna_wmKeyMapItem_idname_set");
+ RNA_def_struct_name_property(srna, prop);
+
+ prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "OperatorProperties");
+ RNA_def_property_pointer_funcs(prop, "rna_KeyMapItem_properties_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Properties", "Properties to set when the operator is called.");
+
+ prop= RNA_def_property(srna, "map_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "maptype");
+ RNA_def_property_enum_items(prop, map_type_items);
+ RNA_def_property_enum_funcs(prop, "rna_wmKeyMapItem_map_type_get", "rna_wmKeyMapItem_map_type_set", NULL);
+ RNA_def_property_ui_text(prop, "Map Type", "Type of event mapping.");
+
+ 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_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_type_itemf");
+ RNA_def_property_ui_text(prop, "Type", "Type of event.");
+
+ 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_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_value_itemf");
+ RNA_def_property_ui_text(prop, "Value", "");
+
+ prop= RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "shift", 0);
+ RNA_def_property_ui_text(prop, "Shift", "Shift key pressed.");
+
+ prop= RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ctrl", 0);
+ RNA_def_property_ui_text(prop, "Ctrl", "Control key pressed.");
+
+ prop= RNA_def_property(srna, "alt", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "alt", 0);
+ RNA_def_property_ui_text(prop, "Alt", "Alt key pressed.");
+
+ prop= RNA_def_property(srna, "oskey", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "oskey", 0);
+ RNA_def_property_ui_text(prop, "OS Key", "Operating system key pressed.");
+
+ prop= RNA_def_property(srna, "key_modifier", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "keymodifier");
+ RNA_def_property_enum_items(prop, event_type_items);
+ RNA_def_property_ui_text(prop, "Key Modifier", "Regular key pressed as a modifier.");
+
+ prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", KMI_EXPANDED);
+ RNA_def_property_ui_text(prop, "Expanded", "Expanded in the user interface.");
+
+ prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", KMI_INACTIVE);
+ RNA_def_property_ui_text(prop, "Active", "Activate or deactivate item.");
+}
+
void RNA_def_wm(BlenderRNA *brna)
{
rna_def_operator(brna);
@@ -441,6 +809,7 @@ void RNA_def_wm(BlenderRNA *brna)
rna_def_event(brna);
rna_def_window(brna);
rna_def_windowmanager(brna);
+ rna_def_keyconfig(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index 5bf7999d67f..1a5568cb4f4 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -31,25 +31,93 @@
#include "RNA_define.h"
#include "RNA_types.h"
+#include "RNA_enum_types.h"
+
+#include "DNA_screen_types.h"
+#include "DNA_space_types.h"
#ifdef RNA_RUNTIME
#include "BKE_context.h"
#include "WM_api.h"
+#include "WM_types.h"
+
+static wmKeyMapItem *rna_KeyMap_add_item(wmKeyMap *km, char *idname, int type, int value, int shift, int ctrl, int alt, int oskey, int keymodifier)
+{
+ int modifier= 0;
+
+ if(shift) modifier |= KM_SHIFT;
+ if(ctrl) modifier |= KM_CTRL;
+ if(alt) modifier |= KM_ALT;
+ if(oskey) modifier |= KM_OSKEY;
+
+ return WM_keymap_add_item(km, idname, type, value, modifier, keymodifier);
+}
#else
void RNA_api_wm(StructRNA *srna)
{
FunctionRNA *func;
- PropertyRNA *prop;
+ PropertyRNA *parm;
func= RNA_def_function(srna, "add_fileselect", "WM_event_add_fileselect");
RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Show up the file selector.");
- prop= RNA_def_pointer(func, "operator", "Operator", "", "Operator to call.");
- RNA_def_property_flag(prop, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "operator", "Operator", "", "Operator to call.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ func= RNA_def_function(srna, "add_keyconfig", "WM_keyconfig_add");
+ parm= RNA_def_string(func, "name", "", 0, "Name", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "keyconfig", "KeyConfig", "Key Configuration", "Added key configuration.");
+ RNA_def_function_return(func, parm);
+}
+
+void RNA_api_keyconfig(StructRNA *srna)
+{
+ FunctionRNA *func;
+ PropertyRNA *parm;
+
+ func= RNA_def_function(srna, "add_keymap", "WM_keymap_find");
+ parm= RNA_def_string(func, "name", "", 0, "Name", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_enum(func, "space_type", space_type_items, SPACE_EMPTY, "Space Type", "");
+ RNA_def_enum(func, "region_type", region_type_items, RGN_TYPE_WINDOW, "Region Type", "");
+ parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Added key map.");
+ RNA_def_function_return(func, parm);
+}
+
+void RNA_api_keymap(StructRNA *srna)
+{
+ FunctionRNA *func;
+ PropertyRNA *parm;
+
+ func= RNA_def_function(srna, "add_item", "rna_KeyMap_add_item");
+ parm= RNA_def_string(func, "idname", "", 0, "Operator Identifier", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_enum(func, "type", event_type_items, 0, "Type", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_enum(func, "value", event_value_items, 0, "Value", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_boolean(func, "shift", 0, "Shift", "");
+ RNA_def_boolean(func, "ctrl", 0, "Ctrl", "");
+ RNA_def_boolean(func, "alt", 0, "Alt", "");
+ RNA_def_boolean(func, "oskey", 0, "OS Key", "");
+ RNA_def_enum(func, "key_modifier", event_type_items, 0, "Key Modifier", "");
+ parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "Added key map item.");
+ RNA_def_function_return(func, parm);
+
+ func= RNA_def_function(srna, "remove_item", "WM_keymap_remove_item");
+ parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ func= RNA_def_function(srna, "copy_to_user", "WM_keymap_copy_to_user");
+ parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "User editable key map.");
+ RNA_def_function_return(func, parm);
+
+ func= RNA_def_function(srna, "restore_to_default", "WM_keymap_restore_to_default");
}
#endif
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index d2eebbc61aa..c0c9c1d6568 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -34,14 +34,17 @@
#include "DNA_texture_types.h"
#include "DNA_world_types.h"
-#include "WM_types.h"
-
#ifdef RNA_RUNTIME
#include "MEM_guardedalloc.h"
+#include "BKE_depsgraph.h"
+#include "BKE_main.h"
#include "BKE_texture.h"
+#include "WM_api.h"
+#include "WM_types.h"
+
static PointerRNA rna_World_ambient_occlusion_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_WorldAmbientOcclusion, ptr->id.data);
@@ -68,31 +71,31 @@ static PointerRNA rna_World_active_texture_get(PointerRNA *ptr)
World *wo= (World*)ptr->data;
Tex *tex;
- tex= (wo->mtex[(int)wo->texact])? wo->mtex[(int)wo->texact]->tex: NULL;
+ tex= give_current_world_texture(wo);
return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
}
static void rna_World_active_texture_set(PointerRNA *ptr, PointerRNA value)
{
World *wo= (World*)ptr->data;
- int act= wo->texact;
-
- if(wo->mtex[act] && wo->mtex[act]->tex)
- id_us_min(&wo->mtex[act]->tex->id);
-
- if(value.data) {
- if(!wo->mtex[act]) {
- wo->mtex[act]= add_mtex();
- wo->mtex[act]->texco= TEXCO_VIEW;
- }
-
- wo->mtex[act]->tex= value.data;
- id_us_plus(&wo->mtex[act]->tex->id);
- }
- else if(wo->mtex[act]) {
- MEM_freeN(wo->mtex[act]);
- wo->mtex[act]= NULL;
- }
+
+ set_current_world_texture(wo, value.data);
+}
+
+static void rna_World_update(bContext *C, PointerRNA *ptr)
+{
+ World *wo= ptr->id.data;
+
+ DAG_id_flush_update(&wo->id, 0);
+ WM_event_add_notifier(C, NC_WORLD, wo);
+}
+
+static void rna_World_draw_update(bContext *C, PointerRNA *ptr)
+{
+ World *wo= ptr->id.data;
+
+ DAG_id_flush_update(&wo->id, 0);
+ WM_event_add_notifier(C, NC_WORLD|ND_WORLD_DRAW, wo);
}
#else
@@ -119,22 +122,22 @@ static void rna_def_world_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "map_blend", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_BLEND);
RNA_def_property_ui_text(prop, "Blend", "Affect the color progression of the background.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "map_horizon", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_HORIZ);
RNA_def_property_ui_text(prop, "Horizon", "Affect the color of the horizon.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "map_zenith_up", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENUP);
RNA_def_property_ui_text(prop, "Zenith Up", "Affect the color of the zenith above.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "map_zenith_down", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENDOWN);
RNA_def_property_ui_text(prop, "Zenith Down", "Affect the color of the zenith below.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
/* unused
prop= RNA_def_property(srna, "map_mist", PROP_BOOLEAN, PROP_NONE);
@@ -145,38 +148,38 @@ static void rna_def_world_mtex(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "texco");
RNA_def_property_enum_items(prop, texco_items);
RNA_def_property_ui_text(prop, "Texture Coordinates", "Texture coordinates used to map the texture onto the background.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "blend_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
+ RNA_def_property_float_sdna(prop, NULL, "blendfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Blend Factor", "Amount texture affects color progression of the background.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "horizon_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Horizon Factor", "Amount texture affects color of the horizon.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "zenith_up_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
+ RNA_def_property_float_sdna(prop, NULL, "zenupfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Zenith Up Factor", "Amount texture affects color of the zenith above.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "zenith_down_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
+ RNA_def_property_float_sdna(prop, NULL, "zendownfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Zenith Down Factor", "Amount texture affects color of the zenith below.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
}
static void rna_def_ambient_occlusion(BlenderRNA *brna)
@@ -215,83 +218,100 @@ 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", "Use Ambient Occlusion to add light based on distance between elements, creating the illusion of omnipresent light");
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "aodist");
RNA_def_property_ui_text(prop, "Distance", "Length of rays, defines how far away other faces give occlusion effect.");
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "falloff_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aodistfac");
RNA_def_property_ui_text(prop, "Strength", "Distance attenuation factor, the higher, the 'shorter' the shadows.");
+ RNA_def_property_update(prop, 0, "rna_World_update");
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", "Amount of enerygy generated by ambient occlusion.");
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aobias");
RNA_def_property_range(prop, 0, 0.5);
RNA_def_property_ui_text(prop, "Bias", "Bias (in radians) to prevent smoothed faces from showing banding (for Raytrace Constant Jittered).");
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_adapt_thresh");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Threshold", "Samples below this threshold will be considered fully shadowed/unshadowed and skipped (for Raytrace Adaptive QMC).");
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "adapt_to_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_adapt_speed_fac");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Adapt To Speed", "Use the speed vector pass to reduce AO samples in fast moving pixels. Higher values result in more aggressive sample reduction. Requires Vec pass enabled (for Raytrace Adaptive QMC).");
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "error_tolerance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_approx_error");
RNA_def_property_range(prop, 0.0001, 10);
RNA_def_property_ui_text(prop, "Error Tolerance", "Low values are slower and higher quality (for Approximate).");
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_approx_correction");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
RNA_def_property_ui_text(prop, "Correction", "Ad-hoc correction for over-occlusion due to the approximation (for Approximate).");
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "falloff", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AODIST);
RNA_def_property_ui_text(prop, "Falloff", "");
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "pixel_cache", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AOCACHE);
RNA_def_property_ui_text(prop, "Pixel Cache", "Cache AO results in pixels and interpolate over neighbouring pixels for speedup (for Approximate).");
+ RNA_def_property_update(prop, 0, "rna_World_update");
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", "Amount of ray samples. Higher values give smoother results and longer rendering times");
+ RNA_def_property_update(prop, 0, "rna_World_update");
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", "Defines how AO mixes with material shading.");
+ RNA_def_property_update(prop, 0, "rna_World_update");
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", "Defines the color of the AO light");
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "sample_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ao_samp_method");
RNA_def_property_enum_items(prop, prop_sample_method_items);
RNA_def_property_ui_text(prop, "Sample Method", "Method for generating shadow samples (for Raytrace).");
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "gather_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ao_gather_method");
RNA_def_property_enum_items(prop, prop_gather_method_items);
RNA_def_property_ui_text(prop, "Gather Method", "");
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "passes", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ao_approx_passes");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Passes", "Number of preprocessing passes to reduce overocclusion (for Approximate).");
+ RNA_def_property_update(prop, 0, "rna_World_update");
}
static void rna_def_world_mist(BlenderRNA *brna)
@@ -313,35 +333,39 @@ 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", "Occlude objects with the environment color as they are further away.");
+ RNA_def_property_update(prop, 0, "rna_World_draw_update");
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 effect.");
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_DISTANCE);
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, measured from the camera");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_draw_update");
prop= RNA_def_property(srna, "depth", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "mistdist");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Depth", "The distance over which the mist effect fades in");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_draw_update");
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "misthi");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Height", "Control how much mist density decreases with height");
+ RNA_def_property_update(prop, 0, "rna_World_update");
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", "Type of transition used to fade mist");
+ RNA_def_property_update(prop, 0, "rna_World_update");
}
static void rna_def_world_stars(BlenderRNA *brna)
@@ -357,37 +381,38 @@ static void rna_def_world_stars(BlenderRNA *brna)
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_STARS);
RNA_def_property_ui_text(prop, "Enabled", "Enable starfield generation.");
- RNA_def_property_update(prop, NC_WORLD, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "starsize");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Size", "Average screen dimension of stars.");
- RNA_def_property_update(prop, NC_WORLD, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "min_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "starmindist");
RNA_def_property_range(prop, 0, 1000);
RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance to the camera for stars.");
- RNA_def_property_update(prop, NC_WORLD, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "average_separation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stardist");
RNA_def_property_range(prop, 2, 1000);
RNA_def_property_ui_text(prop, "Average Separation", "Average distance between any two stars.");
- RNA_def_property_update(prop, NC_WORLD, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
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", "Randomize star colors.");
- RNA_def_property_update(prop, NC_WORLD, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
/* unused
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "starr");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Color", "Stars color.");*/
+ RNA_def_property_ui_text(prop, "Color", "Stars color.");
+ RNA_def_property_update(prop, 0, "rna_World_update");*/
}
void RNA_def_world(BlenderRNA *brna)
@@ -412,66 +437,71 @@ void RNA_def_world(BlenderRNA *brna)
rna_def_animdata_common(srna);
rna_def_mtex_common(srna, "rna_World_mtex_begin", "rna_World_active_texture_get",
- "rna_World_active_texture_set", "WorldTextureSlot");
+ "rna_World_active_texture_set", "WorldTextureSlot", "rna_World_update");
/* colors */
prop= RNA_def_property(srna, "horizon_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "horr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Horizon Color", "Color at the horizon.");
- RNA_def_property_update(prop, NC_WORLD, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "zenith_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "zenr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Zenith Color", "Color at the zenith.");
- RNA_def_property_update(prop, NC_WORLD, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "ambient_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ambr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Ambient Color", "");
- RNA_def_property_update(prop, NC_WORLD, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
/* exp, range */
prop= RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "exp");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Exposure", "Amount of exponential color correction for light.");
+ RNA_def_property_update(prop, 0, "rna_World_update");
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 range that will be mapped to 0-1.");
+ RNA_def_property_update(prop, 0, "rna_World_update");
/* 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", "Render background with natural progression from horizon to zenith.");
- RNA_def_property_update(prop, NC_WORLD, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
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", "Flatten blend or texture coordinates.");
- RNA_def_property_update(prop, NC_WORLD, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
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", "Render background with a real horizon, relative to the camera angle.");
- RNA_def_property_update(prop, NC_WORLD, NULL);
+ RNA_def_property_update(prop, 0, "rna_World_update");
/* nested structs */
- prop= RNA_def_property(srna, "ambient_occlusion", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "ambient_occlusion", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "WorldAmbientOcclusion");
RNA_def_property_pointer_funcs(prop, "rna_World_ambient_occlusion_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Ambient Occlusion", "World ambient occlusion settings.");
- prop= RNA_def_property(srna, "mist", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "mist", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "WorldMistSettings");
RNA_def_property_pointer_funcs(prop, "rna_World_mist_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Mist", "World mist settings.");
- prop= RNA_def_property(srna, "stars", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "stars", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "WorldStarsSettings");
RNA_def_property_pointer_funcs(prop, "rna_World_stars_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Stars", "World stars settings.");
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index df2567142ca..ee4b9a81ccd 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -34,19 +34,9 @@ SET(INC
${ZLIB_INC}
)
-IF(WITH_OPENEXR)
- ADD_DEFINITIONS(-DWITH_OPENEXR)
-ENDIF(WITH_OPENEXR)
-
-IF(WITH_QUICKTIME)
- SET(INC ${INC} ../quicktime ${QUICKTIME_INC})
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_QUICKTIME)
-
-IF(WITH_FFMPEG)
- SET(INC ${INC} ${FFMPEG_INC})
- ADD_DEFINITIONS(-DWITH_FFMPEG)
-ENDIF(WITH_FFMPEG)
+IF(WIN32)
+ SET(INC ${INC} ${PTHREADS_INC})
+ENDIF(WIN32)
IF(WITH_PYTHON)
SET(INC ${INC} ../python ${PYTHON_INC})
diff --git a/source/blender/nodes/SConscript b/source/blender/nodes/SConscript
index 771ce42e1dc..548f4973574 100644
--- a/source/blender/nodes/SConscript
+++ b/source/blender/nodes/SConscript
@@ -27,16 +27,12 @@ if env['WITH_BF_PYTHON']:
else:
defs.append('DISABLE_PYTHON')
-if env['WITH_BF_OPENEXR']:
- defs.append('WITH_OPENEXR')
+if env['OURPLATFORM'] == 'linux2':
+ cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
-if env['WITH_BF_FFMPEG']:
- defs.append('WITH_FFMPEG')
- incs += ' ' + env['BF_FFMPEG_INC']
-
-if env['WITH_BF_QUICKTIME']:
- defs.append('WITH_QUICKTIME')
- incs += ' ' + env['BF_QUICKTIME_INC']
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
env.BlenderLib ( libname = 'bf_nodes', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [190,105] )
env.BlenderLib ( libname = 'bf_cmpnodes', sources = cmpsources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [175,101] )
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c b/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
index a96f3489978..68ccb04581b 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
@@ -671,7 +671,7 @@ static void node_composit_exec_blur(void *data, bNode *node, bNodeStack **in, bN
free_compbuf(img);
}
- generate_preview(node, out[0]->data);
+ generate_preview(data, node, out[0]->data);
}
static void node_composit_init_blur(bNode* node)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
index b0a2531ac1f..ac940d76ed6 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
@@ -166,7 +166,7 @@ static void node_composit_exec_channel_matte(void *data, bNode *node, bNodeStack
break;
}
- generate_preview(node, outbuf);
+ generate_preview(data, node, outbuf);
out[0]->data=outbuf;
if(out[1]->hasoutput)
out[1]->data=valbuf_from_rgbabuf(outbuf, CHAN_A);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
index 28b81fe9f47..c8cbe4538c5 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
@@ -154,7 +154,7 @@ static void node_composit_exec_chroma_matte(void *data, bNode *node, bNodeStack
if(out[1]->hasoutput)
out[1]->data= valbuf_from_rgbabuf(chromabuf, CHAN_A);
- generate_preview(node, chromabuf);
+ generate_preview(data, node, chromabuf);
if(cbuf!=in[0]->data)
free_compbuf(cbuf);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c
index 470d04d9dcc..e1fa4d78b96 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c
@@ -95,7 +95,7 @@ static void node_composit_exec_color_matte(void *data, bNode *node, bNodeStack *
if(out[1]->hasoutput)
out[1]->data= valbuf_from_rgbabuf(colorbuf, CHAN_A);
- generate_preview(node, colorbuf);
+ generate_preview(data, node, colorbuf);
if(cbuf!=in[0]->data)
free_compbuf(cbuf);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_composite.c b/source/blender/nodes/intern/CMP_nodes/CMP_composite.c
index ee9545c3196..d117a3cb235 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_composite.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_composite.c
@@ -50,7 +50,8 @@ static void node_composit_exec_composite(void *data, bNode *node, bNodeStack **i
RenderData *rd= data;
if(scene && (rd->scemode & R_DOCOMP)) {
- RenderResult *rr= RE_GetResult(RE_GetRender(scene->id.name));
+ Render *re= RE_GetRender(scene->id.name);
+ RenderResult *rr= RE_AcquireResultWrite(re);
if(rr) {
CompBuf *outbuf, *zbuf=NULL;
@@ -72,21 +73,25 @@ static void node_composit_exec_composite(void *data, bNode *node, bNodeStack **i
zbuf->malloc= 0;
free_compbuf(zbuf);
}
- generate_preview(node, outbuf);
+ generate_preview(data, node, outbuf);
/* we give outbuf to rr... */
rr->rectf= outbuf->rect;
outbuf->malloc= 0;
free_compbuf(outbuf);
+
+ RE_ReleaseResult(re);
/* signal for imageviewer to refresh (it converts to byte rects...) */
BKE_image_signal(BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"), NULL, IMA_SIGNAL_FREE);
return;
}
+ else
+ RE_ReleaseResult(re);
}
}
if(in[0]->data)
- generate_preview(node, in[0]->data);
+ generate_preview(data, node, in[0]->data);
}
bNodeType cmp_node_composite= {
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c
index 68a1bcd5471..d36d586211b 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c
@@ -108,7 +108,7 @@ static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack **
out[0]->data=outbuf;
if(out[1]->hasoutput)
out[1]->data=valbuf_from_rgbabuf(outbuf, CHAN_A);
- generate_preview(node, outbuf);
+ generate_preview(data, node, outbuf);
if(imbuf1!=in[0]->data)
free_compbuf(imbuf1);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
index f24aedd6661..27b1ac1e181 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
@@ -111,7 +111,7 @@ static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStac
out[0]->data=workbuf;
if(out[1]->hasoutput)
out[1]->data=valbuf_from_rgbabuf(workbuf, CHAN_A);
- generate_preview(node, workbuf);
+ generate_preview(data, node, workbuf);
if(inbuf!=in[0]->data)
free_compbuf(inbuf);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_filter.c b/source/blender/nodes/intern/CMP_nodes/CMP_filter.c
index 2c3b78e13a3..8300c791698 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_filter.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_filter.c
@@ -212,7 +212,7 @@ static void node_composit_exec_filter(void *data, bNode *node, bNodeStack **in,
out[0]->data= stackbuf;
- generate_preview(node, out[0]->data);
+ generate_preview(data, node, out[0]->data);
}
}
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
index 5f444357776..5e22f5cf016 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
@@ -254,7 +254,7 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **in, b
if(out[1]->hasoutput)
out[1]->data= valbuf_from_rgbabuf(stackbuf, CHAN_A);
- generate_preview(node, stackbuf);
+ generate_preview(data, node, stackbuf);
}
}
};
@@ -350,11 +350,12 @@ void node_composit_rlayers_out(RenderData *rd, RenderLayer *rl, bNodeStack **out
static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
Scene *sce= (Scene *)node->id;
+ Render *re= (sce)? RE_GetRender(sce->id.name): NULL;
RenderData *rd= data;
RenderResult *rr= NULL;
- if(sce)
- rr= RE_GetResult(RE_GetRender(sce->id.name));
+ if(re)
+ rr= RE_AcquireResultRead(re);
if(rr) {
SceneRenderLayer *srl= BLI_findlink(&sce->r.layers, node->custom1);
@@ -385,11 +386,14 @@ static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **in,
node_composit_rlayers_out(rd, rl, out, rr->rectx, rr->recty);
- generate_preview(node, stackbuf);
+ generate_preview(data, node, stackbuf);
}
}
}
- }
+ }
+
+ if(re)
+ RE_ReleaseResult(re);
};
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_levels.c b/source/blender/nodes/intern/CMP_nodes/CMP_levels.c
index 28b769a8a97..f0e314793ed 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_levels.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_levels.c
@@ -305,7 +305,7 @@ static void node_composit_exec_view_levels(void *data, bNode *node, bNodeStack *
if(out[1]->hasoutput)
out[1]->vec[0]= std_dev;
- generate_preview(node, histogram);
+ generate_preview(data, node, histogram);
if(cbuf!=in[0]->data)
free_compbuf(cbuf);
@@ -329,8 +329,8 @@ bNodeType cmp_node_view_levels= {
/* execfunc */ node_composit_exec_view_levels,
/* butfunc */ NULL,
/* initfunc */ node_composit_init_view_levels,
- /* freestoragefunc */ node_free_standard_storage,
- /* copystoragefunc */ node_copy_standard_storage,
+ /* freestoragefunc */ NULL,
+ /* copystoragefunc */ NULL,
/* id */ NULL
};
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c
index 350def76736..3e284cd5ed1 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c
@@ -87,7 +87,7 @@ static void node_composit_exec_luma_matte(void *data, bNode *node, bNodeStack **
composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_luma_matte, CB_RGBA);
composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_yuva_to_rgba, CB_RGBA);
- generate_preview(node, outbuf);
+ generate_preview(data, node, outbuf);
out[0]->data=outbuf;
if (out[1]->hasoutput)
out[1]->data=valbuf_from_rgbabuf(outbuf, CHAN_A);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c b/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c
index ca6de027b1d..25bb82b4a9f 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c
@@ -74,7 +74,7 @@ static void node_composit_exec_mix_rgb(void *data, bNode *node, bNodeStack **in,
out[0]->data= stackbuf;
- generate_preview(node, out[0]->data);
+ generate_preview(data, node, out[0]->data);
}
}
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c b/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c
index 8c63c348b57..e63e5802507 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c
@@ -71,7 +71,7 @@ static void node_composit_exec_output_file(void *data, bNode *node, bNodeStack *
IMB_freeImBuf(ibuf);
- generate_preview(node, cbuf);
+ generate_preview(data, node, cbuf);
if(in[0]->data != cbuf)
free_compbuf(cbuf);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c b/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c
index 8ce5a7caa04..04383f478e9 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c
@@ -121,7 +121,7 @@ static void node_composit_exec_splitviewer(void *data, bNode *node, bNodeStack *
composit3_pixel_processor(node, cbuf, buf1, in[0]->vec, buf2, in[1]->vec, mask, NULL, do_copy_split_rgba, CB_RGBA, CB_RGBA, CB_VAL);
- generate_preview(node, cbuf);
+ generate_preview(data, node, cbuf);
free_compbuf(cbuf);
free_compbuf(mask);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c b/source/blender/nodes/intern/CMP_nodes/CMP_texture.c
index b4d04076032..26e734579e3 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_texture.c
@@ -105,7 +105,7 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in,
VECCOPY(prevbuf->procedural_size, in[1]->vec);
prevbuf->procedural_type= CB_RGBA;
composit1_pixel_processor(node, prevbuf, prevbuf, out[0]->vec, do_copy_rgba, CB_RGBA);
- generate_preview(node, prevbuf);
+ generate_preview(data, node, prevbuf);
free_compbuf(prevbuf);
if(out[0]->hasoutput) {
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c b/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c
index c9e95e768c1..d0dcc5c6973 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c
@@ -106,12 +106,12 @@ static void node_composit_exec_viewer(void *data, bNode *node, bNodeStack **in,
free_compbuf(zbuf);
}
- generate_preview(node, cbuf);
+ generate_preview(data, node, cbuf);
free_compbuf(cbuf);
}
else if(in[0]->data) {
- generate_preview(node, in[0]->data);
+ generate_preview(data, node, in[0]->data);
}
}
diff --git a/source/blender/nodes/intern/CMP_util.c b/source/blender/nodes/intern/CMP_util.c
index b396d5549d7..175a0a54371 100644
--- a/source/blender/nodes/intern/CMP_util.c
+++ b/source/blender/nodes/intern/CMP_util.c
@@ -604,9 +604,13 @@ static CompBuf *generate_procedural_preview(CompBuf *cbuf, int newx, int newy)
return outbuf;
}
-void generate_preview(bNode *node, CompBuf *stackbuf)
+void generate_preview(void *data, bNode *node, CompBuf *stackbuf)
{
+ RenderData *rd= data;
bNodePreview *preview= node->preview;
+ int xsize, ysize;
+ int color_manage= rd->color_mgt_flag & R_COLOR_MANAGEMENT;
+ unsigned char *rect;
if(preview && stackbuf) {
CompBuf *cbuf, *stackbuf_use;
@@ -614,28 +618,42 @@ void generate_preview(bNode *node, CompBuf *stackbuf)
if(stackbuf->rect==NULL && stackbuf->rect_procedural==NULL) return;
stackbuf_use= typecheck_compbuf(stackbuf, CB_RGBA);
-
+
if(stackbuf->x > stackbuf->y) {
- preview->xsize= 140;
- preview->ysize= (140*stackbuf->y)/stackbuf->x;
+ xsize= 140;
+ ysize= (140*stackbuf->y)/stackbuf->x;
}
else {
- preview->ysize= 140;
- preview->xsize= (140*stackbuf->x)/stackbuf->y;
+ ysize= 140;
+ xsize= (140*stackbuf->x)/stackbuf->y;
}
if(stackbuf_use->rect_procedural)
- cbuf= generate_procedural_preview(stackbuf_use, preview->xsize, preview->ysize);
+ cbuf= generate_procedural_preview(stackbuf_use, xsize, ysize);
else
- cbuf= scalefast_compbuf(stackbuf_use, preview->xsize, preview->ysize);
-
- /* this ensures free-compbuf does the right stuff */
- SWAP(float *, cbuf->rect, node->preview->rect);
+ cbuf= scalefast_compbuf(stackbuf_use, xsize, ysize);
+
+ /* convert to byte for preview */
+ rect= MEM_callocN(sizeof(unsigned char)*4*xsize*ysize, "bNodePreview.rect");
+
+ if(color_manage)
+ floatbuf_to_srgb_byte(cbuf->rect, rect, 0, xsize, 0, ysize, xsize);
+ else
+ floatbuf_to_byte(cbuf->rect, rect, 0, xsize, 0, ysize, xsize);
free_compbuf(cbuf);
if(stackbuf_use!=stackbuf)
free_compbuf(stackbuf_use);
+ BLI_lock_thread(LOCK_PREVIEW);
+
+ if(preview->rect)
+ MEM_freeN(preview->rect);
+ preview->xsize= xsize;
+ preview->ysize= ysize;
+ preview->rect= rect;
+
+ BLI_unlock_thread(LOCK_PREVIEW);
}
}
diff --git a/source/blender/nodes/intern/CMP_util.h b/source/blender/nodes/intern/CMP_util.h
index 2a2dc97ed73..bb08a448bf4 100644
--- a/source/blender/nodes/intern/CMP_util.h
+++ b/source/blender/nodes/intern/CMP_util.h
@@ -141,7 +141,7 @@ void composit4_pixel_processor(bNode *node, CompBuf *out, CompBuf *src1_buf, flo
int src1_type, int fac1_type, int src2_type, int fac2_type);
CompBuf *valbuf_from_rgbabuf(CompBuf *cbuf, int channel);
-void generate_preview(bNode *node, CompBuf *stackbuf);
+void generate_preview(void *data, bNode *node, CompBuf *stackbuf);
void do_copy_rgba(bNode *node, float *out, float *in);
void do_copy_rgb(bNode *node, float *out, float *in);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_at.c b/source/blender/nodes/intern/TEX_nodes/TEX_at.c
index 4d714d91130..7e6cce9f35a 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_at.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_at.c
@@ -50,7 +50,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &colorfn);
+ tex_output(node, in, out[0], &colorfn, data);
}
bNodeType tex_node_at = {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_bricks.c b/source/blender/nodes/intern/TEX_nodes/TEX_bricks.c
index f1f3b0919ae..2093679e39d 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_bricks.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_bricks.c
@@ -109,9 +109,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &colorfn);
-
- tex_do_preview(node, out[0], data);
+ tex_output(node, in, out[0], &colorfn, data);
}
bNodeType tex_node_bricks= {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_checker.c b/source/blender/nodes/intern/TEX_nodes/TEX_checker.c
index b889f1e2164..7b736206c51 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_checker.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_checker.c
@@ -61,9 +61,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &colorfn);
-
- tex_do_preview(node, out[0], data);
+ tex_output(node, in, out[0], &colorfn, data);
}
bNodeType tex_node_checker= {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_compose.c b/source/blender/nodes/intern/TEX_nodes/TEX_compose.c
index 9fc4b2ff7c2..dac6ca7c3ef 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_compose.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_compose.c
@@ -49,7 +49,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &colorfn);
+ tex_output(node, in, out[0], &colorfn, data);
}
bNodeType tex_node_compose= {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_coord.c b/source/blender/nodes/intern/TEX_nodes/TEX_coord.c
index e5c2b309fb3..a33a2608af0 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_coord.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_coord.c
@@ -42,9 +42,7 @@ static void vectorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, sho
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &vectorfn);
-
- tex_do_preview(node, out[0], data);
+ tex_output(node, in, out[0], &vectorfn, data);
}
bNodeType tex_node_coord= {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_curves.c b/source/blender/nodes/intern/TEX_nodes/TEX_curves.c
index 61ebcea7360..a1b20370687 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_curves.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_curves.c
@@ -50,7 +50,7 @@ static void time_colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in,
static void time_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &time_colorfn);
+ tex_output(node, in, out[0], &time_colorfn, data);
}
@@ -100,7 +100,7 @@ static void rgb_colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in,
static void rgb_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &rgb_colorfn);
+ tex_output(node, in, out[0], &rgb_colorfn, data);
}
static void rgb_init(bNode *node)
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_decompose.c b/source/blender/nodes/intern/TEX_nodes/TEX_decompose.c
index f7a409f0230..d5eeba2253c 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_decompose.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_decompose.c
@@ -67,10 +67,10 @@ static void valuefn_a(float *out, TexParams *p, bNode *node, bNodeStack **in, sh
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &valuefn_r);
- tex_output(node, in, out[1], &valuefn_g);
- tex_output(node, in, out[2], &valuefn_b);
- tex_output(node, in, out[3], &valuefn_a);
+ tex_output(node, in, out[0], &valuefn_r, data);
+ tex_output(node, in, out[1], &valuefn_g, data);
+ tex_output(node, in, out[2], &valuefn_b, data);
+ tex_output(node, in, out[3], &valuefn_a, data);
}
bNodeType tex_node_decompose= {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c b/source/blender/nodes/intern/TEX_nodes/TEX_distance.c
index 4e145e26b72..297fc02939d 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_distance.c
@@ -53,9 +53,7 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &valuefn);
-
- tex_do_preview(node, out[0], data);
+ tex_output(node, in, out[0], &valuefn, data);
}
bNodeType tex_node_distance= {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c b/source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c
index 192c7a39ee8..b267dc7acbb 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c
@@ -84,7 +84,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &colorfn);
+ tex_output(node, in, out[0], &colorfn, data);
}
bNodeType tex_node_hue_sat= {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_image.c b/source/blender/nodes/intern/TEX_nodes/TEX_image.c
index 0a55af70b52..123063a7900 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_image.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_image.c
@@ -73,9 +73,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &colorfn);
-
- tex_do_preview(node, out[0], data);
+ tex_output(node, in, out[0], &colorfn, data);
}
static void init(bNode* node)
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_invert.c b/source/blender/nodes/intern/TEX_nodes/TEX_invert.c
index 5663f897ff5..f2fcbfbf9eb 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_invert.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_invert.c
@@ -55,9 +55,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &colorfn);
-
- tex_do_preview(node, out[0], data);
+ tex_output(node, in, out[0], &colorfn, data);
}
bNodeType tex_node_invert= {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_math.c b/source/blender/nodes/intern/TEX_nodes/TEX_math.c
index 4ee04140fca..8c400a44832 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_math.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_math.c
@@ -171,9 +171,7 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &valuefn);
-
- tex_do_preview(node, out[0], data);
+ tex_output(node, in, out[0], &valuefn, data);
}
bNodeType tex_node_math= {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_mixRgb.c b/source/blender/nodes/intern/TEX_nodes/TEX_mixRgb.c
index 24bdde70127..f6955b47376 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_mixRgb.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_mixRgb.c
@@ -57,9 +57,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &colorfn);
-
- tex_do_preview(node, out[0], data);
+ tex_output(node, in, out[0], &colorfn, data);
}
bNodeType tex_node_mix_rgb= {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_output.c b/source/blender/nodes/intern/TEX_nodes/TEX_output.c
index 7ce5ec88c48..580b4cde8bf 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_output.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_output.c
@@ -83,14 +83,19 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
TexCallData *cdata = (TexCallData *)data;
TexResult *target = cdata->target;
- if(in[1]->hasinput && !in[0]->hasinput)
- tex_do_preview(node, in[1], data);
- else
- tex_do_preview(node, in[0], data);
-
- if(!cdata->do_preview) {
- if(cdata->which_output == node->custom1)
- {
+ if(cdata->do_preview) {
+ TexParams params;
+ params_from_cdata(&params, cdata);
+
+ if(in[1]->hasinput && !in[0]->hasinput)
+ tex_input_rgba(&target->tr, in[1], &params, cdata->thread);
+ else
+ tex_input_rgba(&target->tr, in[0], &params, cdata->thread);
+ tex_do_preview(node, params.coord, &target->tr);
+ }
+ else {
+ /* 0 means don't care, so just use first */
+ if(cdata->which_output == node->custom1 || (cdata->which_output == 0 && node->custom1 == 1)) {
TexParams params;
params_from_cdata(&params, cdata);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_proc.c b/source/blender/nodes/intern/TEX_nodes/TEX_proc.c
index ce7324e2085..9f355e6d8f0 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_proc.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_proc.c
@@ -125,9 +125,8 @@ static int count_outputs(bNode *node)
static void name##_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) \
{ \
int outs = count_outputs(node); \
- if(outs >= 1) tex_output(node, in, out[0], &name##_colorfn); \
- if(outs >= 2) tex_output(node, in, out[1], &name##_normalfn); \
- if(outs >= 1) tex_do_preview(node, out[0], data); \
+ if(outs >= 1) tex_output(node, in, out[0], &name##_colorfn, data); \
+ if(outs >= 2) tex_output(node, in, out[1], &name##_normalfn, data); \
}
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c b/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c
index bdf5a1ce079..2184d32fcf2 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c
@@ -95,7 +95,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
}
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &colorfn);
+ tex_output(node, in, out[0], &colorfn, data);
}
bNodeType tex_node_rotate= {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_scale.c b/source/blender/nodes/intern/TEX_nodes/TEX_scale.c
index 3d4415365aa..205549c97d9 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_scale.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_scale.c
@@ -56,7 +56,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
}
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &colorfn);
+ tex_output(node, in, out[0], &colorfn, data);
}
bNodeType tex_node_scale = {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_texture.c b/source/blender/nodes/intern/TEX_nodes/TEX_texture.c
index 0ca80a82271..d0536a8fda8 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_texture.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_texture.c
@@ -79,9 +79,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &colorfn);
-
- tex_do_preview(node, out[0], data);
+ tex_output(node, in, out[0], &colorfn, data);
}
bNodeType tex_node_texture= {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_translate.c b/source/blender/nodes/intern/TEX_nodes/TEX_translate.c
index ba3dcfa27a2..c2f7377da3b 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_translate.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_translate.c
@@ -56,7 +56,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
}
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &colorfn);
+ tex_output(node, in, out[0], &colorfn, data);
}
bNodeType tex_node_translate = {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c b/source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c
index 75b88c3a460..6b8349e90af 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c
@@ -72,9 +72,7 @@ static void normalfn(float *out, TexParams *p, bNode *node, bNodeStack **in, sho
}
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &normalfn);
-
- tex_do_preview(node, out[0], data);
+ tex_output(node, in, out[0], &normalfn, data);
}
bNodeType tex_node_valtonor = {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c b/source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c
index 90a444bcff0..669f45ec89a 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c
@@ -50,7 +50,7 @@ static void valtorgb_colorfn(float *out, TexParams *p, bNode *node, bNodeStack *
static void valtorgb_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &valtorgb_colorfn);
+ tex_output(node, in, out[0], &valtorgb_colorfn, data);
}
static void valtorgb_init(bNode *node)
@@ -97,9 +97,7 @@ static void rgbtobw_valuefn(float *out, TexParams *p, bNode *node, bNodeStack **
static void rgbtobw_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_output(node, in, out[0], &rgbtobw_valuefn);
-
- tex_do_preview(node, out[0], data);
+ tex_output(node, in, out[0], &rgbtobw_valuefn, data);
}
bNodeType tex_node_rgbtobw= {
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_viewer.c b/source/blender/nodes/intern/TEX_nodes/TEX_viewer.c
index 2d29b03b38c..5ebd971d9fb 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_viewer.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_viewer.c
@@ -39,7 +39,16 @@ static bNodeSocketType outputs[]= {
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- tex_do_preview(node, in[0], data);
+ TexCallData *cdata = (TexCallData *)data;
+
+ if(cdata->do_preview) {
+ TexParams params;
+ float col[4];
+ params_from_cdata(&params, cdata);
+
+ tex_input_rgba(col, in[0], &params, cdata->thread);
+ tex_do_preview(node, params.coord, col);
+ }
}
bNodeType tex_node_viewer = {
diff --git a/source/blender/nodes/intern/TEX_util.c b/source/blender/nodes/intern/TEX_util.c
index 2c21627dad9..8b247688e8c 100644
--- a/source/blender/nodes/intern/TEX_util.c
+++ b/source/blender/nodes/intern/TEX_util.c
@@ -47,12 +47,14 @@
#define PREV_RES 128 /* default preview resolution */
-int preview_flag = 0;
-
void tex_call_delegate(TexDelegate *dg, float *out, TexParams *params, short thread)
{
- if(dg->node->need_exec)
+ if(dg->node->need_exec) {
dg->fn(out, params, dg->node, dg->in, thread);
+
+ if(dg->cdata->do_preview)
+ tex_do_preview(dg->node, params->coord, out);
+ }
}
void tex_input(float *out, int sz, bNodeStack *in, TexParams *params, short thread)
@@ -97,26 +99,6 @@ float tex_input_value(bNodeStack *in, TexParams *params, short thread)
return out[0];
}
-static void init_preview(bNode *node)
-{
- int xsize = (int)(node->prvr.xmax - node->prvr.xmin);
- int ysize = (int)(node->prvr.ymax - node->prvr.ymin);
-
- if(xsize == 0) {
- xsize = PREV_RES;
- ysize = PREV_RES;
- }
-
- if(node->preview==NULL)
- node->preview= MEM_callocN(sizeof(bNodePreview), "node preview");
-
- if(node->preview->rect==NULL) {
- node->preview->rect= MEM_callocN(4*xsize + xsize*ysize*sizeof(float)*4, "node preview rect");
- node->preview->xsize= xsize;
- node->preview->ysize= ysize;
- }
-}
-
void params_from_cdata(TexParams *out, TexCallData *in)
{
out->coord = in->coord;
@@ -125,48 +107,19 @@ void params_from_cdata(TexParams *out, TexCallData *in)
out->cfra = in->cfra;
}
-void tex_do_preview(bNode *node, bNodeStack *ns, TexCallData *cdata)
+void tex_do_preview(bNode *node, float *coord, float *col)
{
- int x, y;
- float *result;
- bNodePreview *preview;
- float coord[3] = {0, 0, 0};
- TexParams params;
- int resolution;
- int xsize, ysize;
-
- if(!cdata->do_preview)
- return;
-
- if(!(node->typeinfo->flag & NODE_PREVIEW))
- return;
-
- init_preview(node);
-
- preview = node->preview;
- xsize = preview->xsize;
- ysize = preview->ysize;
-
- params.dxt = 0;
- params.dyt = 0;
- params.cfra = cdata->cfra;
- params.coord = coord;
-
- resolution = (xsize < ysize) ? xsize : ysize;
-
- for(x=0; x<xsize; x++)
- for(y=0; y<ysize; y++)
- {
- params.coord[0] = ((float) x / resolution) * 2 - 1;
- params.coord[1] = ((float) y / resolution) * 2 - 1;
-
- result = preview->rect + 4 * (xsize*y + x);
-
- tex_input_rgba(result, ns, &params, cdata->thread);
+ bNodePreview *preview= node->preview;
+
+ if(preview) {
+ int xs= ((coord[0] + 1.0f)*0.5f)*preview->xsize;
+ int ys= ((coord[1] + 1.0f)*0.5f)*preview->ysize;
+
+ nodeAddToPreview(node, col, xs, ys);
}
}
-void tex_output(bNode *node, bNodeStack **in, bNodeStack *out, TexFn texfn)
+void tex_output(bNode *node, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *cdata)
{
TexDelegate *dg;
if(!out->data)
@@ -175,7 +128,7 @@ void tex_output(bNode *node, bNodeStack **in, bNodeStack *out, TexFn texfn)
else
dg = out->data;
-
+ dg->cdata= cdata;
dg->fn = texfn;
dg->node = node;
memcpy(dg->in, in, MAX_SOCKET * sizeof(bNodeStack*));
@@ -217,35 +170,25 @@ void ntreeTexExecTree(
short thread,
Tex *tex,
short which_output,
- int cfra
+ int cfra,
+ int preview
){
TexResult dummy_texres;
TexCallData data;
- /* 0 means don't care, so just use first */
- if(which_output == 0)
- which_output = 1;
-
if(!texres) texres = &dummy_texres;
data.coord = coord;
data.dxt = dxt;
data.dyt = dyt;
data.target = texres;
- data.do_preview = preview_flag;
+ data.do_preview = preview;
data.thread = thread;
data.which_output = which_output;
data.cfra= cfra;
- preview_flag = 0;
-
ntreeExecTree(nodes, &data, thread);
}
-void ntreeTexSetPreviewFlag(int doit)
-{
- preview_flag = doit;
-}
-
char* ntreeTexOutputMenu(bNodeTree *ntree)
{
bNode *node;
diff --git a/source/blender/nodes/intern/TEX_util.h b/source/blender/nodes/intern/TEX_util.h
index 87a9cf288d6..14e2773414a 100644
--- a/source/blender/nodes/intern/TEX_util.h
+++ b/source/blender/nodes/intern/TEX_util.h
@@ -87,6 +87,7 @@ typedef struct TexParams {
typedef void(*TexFn) (float *out, TexParams *params, bNode *node, bNodeStack **in, short thread);
typedef struct TexDelegate {
+ TexCallData *cdata;
TexFn fn;
bNode *node;
bNodeStack *in[MAX_SOCKET];
@@ -99,10 +100,8 @@ void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread)
void tex_input_vec(float *out, bNodeStack *in, TexParams *params, short thread);
float tex_input_value(bNodeStack *in, TexParams *params, short thread);
-void tex_output(bNode *node, bNodeStack **in, bNodeStack *out, TexFn texfn);
-void tex_do_preview(bNode *node, bNodeStack *ns, TexCallData *cdata);
-
-void ntreeTexExecTree(bNodeTree *nodes, TexResult *texres, float *coord, float *dxt, float *dyt, short thread, struct Tex *tex, short which_output, int cfra);
+void tex_output(bNode *node, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *data);
+void tex_do_preview(bNode *node, float *coord, float *col);
void params_from_cdata(TexParams *out, TexCallData *in);
diff --git a/source/blender/python/CMakeLists.txt b/source/blender/python/CMakeLists.txt
index 7abec566505..a83e29e2fab 100644
--- a/source/blender/python/CMakeLists.txt
+++ b/source/blender/python/CMakeLists.txt
@@ -46,8 +46,6 @@ IF(WITH_FFMPEG)
ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
-ADD_DEFINITIONS(-DWITH_CCGSUBSURF)
-
BLENDERLIB(bf_python "${SRC}" "${INC}")
BLENDERLIB(bf_gen_python "${GENSRC}" "${INC}")
diff --git a/source/blender/python/generic/Mathutils.c b/source/blender/python/generic/Mathutils.c
index 86e0b64d648..715c463fa1f 100644
--- a/source/blender/python/generic/Mathutils.c
+++ b/source/blender/python/generic/Mathutils.c
@@ -912,7 +912,7 @@ static PyObject *M_Mathutils_LineIntersect( PyObject * self, PyObject * args )
PyErr_SetString( PyExc_TypeError, "expected 4 vector types\n" );
return NULL;
}
- if( vec1->size != vec2->size || vec1->size != vec3->size || vec1->size != vec2->size) {
+ if( vec1->size != vec2->size || vec1->size != vec3->size || vec3->size != vec2->size) {
PyErr_SetString( PyExc_TypeError,"vectors must be of the same size\n" );
return NULL;
}
diff --git a/source/blender/python/generic/matrix.c b/source/blender/python/generic/matrix.c
index 04e2a4c58d5..d8100746c9a 100644
--- a/source/blender/python/generic/matrix.c
+++ b/source/blender/python/generic/matrix.c
@@ -1315,7 +1315,7 @@ static PyObject *column_vector_multiplication(MatrixObject * mat, VectorObject*
}
vecNew[3] = 1.0f;
- for(x = 0; x < mat->colSize; z++) {
+ for(x = 0; x < mat->colSize; x++) {
for(y = 0; y < mat->rowSize; y++) {
dot += mat->matrix[y][x] * vecCopy[y];
}
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 878d7493b84..a3b807c9a8d 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -147,6 +147,17 @@ void bpy_context_clear(bContext *C, PyGILState_STATE *gilstate)
}
}
+static void bpy_import_test(char *modname)
+{
+ PyObject *mod= PyImport_ImportModuleLevel(modname, NULL, NULL, NULL, 0);
+ if(mod) {
+ Py_DECREF(mod);
+ }
+ else {
+ PyErr_Print();
+ PyErr_Clear();
+ }
+}
void BPY_free_compiled_text( struct Text *text )
{
@@ -176,7 +187,21 @@ static void bpy_init_modules( void )
PyDict_SetItemString(PySys_GetObject("modules"), "bpy", mod);
Py_DECREF(mod);
-
+ /* add our own modules dir */
+ {
+ char *modpath= BLI_gethome_folder("scripts/modules", BLI_GETHOME_ALL);
+
+ if(modpath) {
+ PyObject *sys_path= PySys_GetObject("path"); /* borrow */
+ PyObject *py_modpath= PyUnicode_FromString(modpath);
+ PyList_Insert(sys_path, 0, py_modpath); /* add first */
+ Py_DECREF(py_modpath);
+ }
+
+ bpy_import_test("bpy_ops"); /* adds its self to bpy.ops */
+ bpy_import_test("bpy_sys"); /* adds its self to bpy.sys */
+ }
+
/* stand alone utility modules not related to blender directly */
Geometry_Init();
Mathutils_Init();
@@ -216,6 +241,9 @@ static PyObject *CreateGlobalDictionary( bContext *C )
{"IntProperty", (PyCFunction)BPy_IntProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"BoolProperty", (PyCFunction)BPy_BoolProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"StringProperty", (PyCFunction)BPy_StringProperty, METH_VARARGS|METH_KEYWORDS, ""},
+ {"EnumProperty", (PyCFunction)BPy_EnumProperty, METH_VARARGS|METH_KEYWORDS, ""},
+ {"PointerProperty", (PyCFunction)BPy_PointerProperty, METH_VARARGS|METH_KEYWORDS, ""},
+ {"CollectionProperty", (PyCFunction)BPy_CollectionProperty, METH_VARARGS|METH_KEYWORDS, ""},
{NULL, NULL, 0, NULL}
};
@@ -232,26 +260,10 @@ static PyObject *CreateGlobalDictionary( bContext *C )
return dict;
}
-/* Use this so we can include our own python bundle */
-#if 0
-wchar_t* Py_GetPath(void)
-{
- int i;
- static wchar_t py_path[FILE_MAXDIR] = L"";
- char *dirname= BLI_gethome_folder("python");
- if(dirname) {
- i= mbstowcs(py_path, dirname, FILE_MAXDIR);
- printf("py path %s, %d\n", dirname, i);
- }
- return py_path;
-}
-#endif
-
-
/* must be called before Py_Initialize */
void BPY_start_python_path(void)
{
- char *py_path_bundle= BLI_gethome_folder("python");
+ char *py_path_bundle= BLI_gethome_folder("python", BLI_GETHOME_ALL);
if(py_path_bundle==NULL)
return;
@@ -311,6 +323,11 @@ void BPY_start_python( int argc, char **argv )
PyObject *d = PyEval_GetBuiltins( );
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);
+
+ /* a bit nasty but this prevents help() and input() from locking blender
+ * Ideally we could have some way for the console to replace sys.stdin but
+ * python would lock blender while waiting for a return value, not easy :| */
+ PySys_SetObject("stdin", Py_None);
}
pyrna_alloc_types();
@@ -591,8 +608,9 @@ void BPY_run_ui_scripts(bContext *C, int reload)
char *file_extension;
char *dirname;
char path[FILE_MAX];
- char *dirs[] = {"ui", "io", NULL};
- int a, err;
+ char *dirs[] = {"scripts/ui", "scripts/io", NULL};
+ int path_flags[] = {BLI_GETHOME_LOCAL|BLI_GETHOME_SYSTEM, BLI_GETHOME_USER}; /* SYSTEM / NON-SYSTEM */
+ int a, err, flag_iter;
PyGILState_STATE gilstate;
PyObject *sys_path;
@@ -602,56 +620,60 @@ void BPY_run_ui_scripts(bContext *C, int reload)
sys_path= PySys_GetObject("path"); /* borrow */
PyList_Insert(sys_path, 0, Py_None); /* place holder, resizes the list */
- for(a=0; dirs[a]; a++) {
- dirname= BLI_gethome_folder(dirs[a]);
+ /* Scan system scripts first, then local/user */
+ for(flag_iter=0; flag_iter < sizeof(path_flags)/sizeof(int); flag_iter++) {
+
+ for(a=0; dirs[a]; a++) {
+ dirname= BLI_gethome_folder(dirs[a], path_flags[flag_iter]);
- if(!dirname)
- continue;
+ if(!dirname)
+ continue;
- dir = opendir(dirname);
+ dir = opendir(dirname);
- if(!dir)
- continue;
-
- /* set the first dir in the sys.path for fast importing of modules */
- PyList_SetItem(sys_path, 0, PyUnicode_FromString(dirname)); /* steals the ref */
+ if(!dir)
+ continue;
- while((de = readdir(dir)) != NULL) {
- /* We could stat the file but easier just to let python
- * import it and complain if theres a problem */
- err = 0;
-
- if (de->d_name[0] == '.') {
- /* do nothing, probably .svn */
- }
- else if ((file_extension = strstr(de->d_name, ".py"))) {
- /* normal py files? */
- if(file_extension && file_extension[3] == '\0') {
- de->d_name[(file_extension - de->d_name)] = '\0';
- err= bpy_import_module(de->d_name, reload);
+ /* set the first dir in the sys.path for fast importing of modules */
+ PyList_SetItem(sys_path, 0, PyUnicode_FromString(dirname)); /* steals the ref */
+
+ while((de = readdir(dir)) != NULL) {
+ /* We could stat the file but easier just to let python
+ * import it and complain if theres a problem */
+ err = 0;
+
+ if (de->d_name[0] == '.') {
+ /* do nothing, probably .svn */
+ }
+ else if ((file_extension = strstr(de->d_name, ".py"))) {
+ /* normal py files? */
+ if(file_extension && file_extension[3] == '\0') {
+ de->d_name[(file_extension - de->d_name)] = '\0';
+ err= bpy_import_module(de->d_name, reload);
+ }
}
- }
#ifndef __linux__
- else if( BLI_join_dirfile(path, dirname, de->d_name), S_ISDIR(BLI_exist(path))) {
+ else if( BLI_join_dirfile(path, dirname, de->d_name), S_ISDIR(BLI_exist(path))) {
#else
- else if(de->d_type==DT_DIR) {
- BLI_join_dirfile(path, dirname, de->d_name);
+ else if(de->d_type==DT_DIR) {
+ BLI_join_dirfile(path, dirname, de->d_name);
#endif
- /* support packages */
- BLI_join_dirfile(path, path, "__init__.py");
+ /* support packages */
+ BLI_join_dirfile(path, path, "__init__.py");
- if(BLI_exists(path)) {
- err= bpy_import_module(de->d_name, reload);
+ if(BLI_exists(path)) {
+ err= bpy_import_module(de->d_name, reload);
+ }
}
- }
- if(err==-1) {
- BPy_errors_to_report(NULL);
- fprintf(stderr, "unable to import %s/%s\n", dirname, de->d_name);
+ if(err==-1) {
+ BPy_errors_to_report(NULL);
+ fprintf(stderr, "unable to import %s/%s\n", dirname, de->d_name);
+ }
}
- }
- closedir(dir);
+ closedir(dir);
+ }
}
PyList_SetSlice(sys_path, 0, 1, NULL); /* remove the first item */
diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c
index 69a7e554452..87752ca9c58 100644
--- a/source/blender/python/intern/bpy_operator.c
+++ b/source/blender/python/intern/bpy_operator.c
@@ -65,7 +65,7 @@ static PyObject *pyop_call( PyObject * self, PyObject * args)
return NULL;
}
- if(ot->poll && (ot->poll(C) == FALSE)) {
+ if(WM_operator_poll((bContext*)C, ot) == FALSE) {
PyErr_SetString( PyExc_SystemError, "bpy.__ops__.call: operator poll() function failed, context is incorrect");
return NULL;
}
@@ -89,6 +89,16 @@ static PyObject *pyop_call( PyObject * self, PyObject * args)
if(BPy_reports_to_error(reports))
error_val = -1;
+ /* operator output is nice to have in the terminal/console too */
+ if(reports->list.first) {
+ char *report_str= BKE_reports_string(reports, 0); /* all reports */
+
+ if(report_str) {
+ PySys_WriteStdout("%s\n", report_str);
+ MEM_freeN(report_str);
+ }
+ }
+
BKE_reports_clear(reports);
if ((reports->flag & RPT_FREE) == 0)
{
diff --git a/source/blender/python/intern/bpy_operator_wrap.c b/source/blender/python/intern/bpy_operator_wrap.c
index 0a487a8dbe8..769a8336d4a 100644
--- a/source/blender/python/intern/bpy_operator_wrap.c
+++ b/source/blender/python/intern/bpy_operator_wrap.c
@@ -47,6 +47,7 @@
#define PYOP_ATTR_IDNAME_BL "__idname_bl__" /* our own name converted into blender syntax, users wont see this */
#define PYOP_ATTR_DESCRIPTION "__doc__" /* use pythons docstring */
#define PYOP_ATTR_REGISTER "__register__" /* True/False. if this python operator should be registered */
+#define PYOP_ATTR_UNDO "__undo__" /* True/False. if this python operator should be undone */
static struct BPY_flag_def pyop_ret_flags[] = {
{"RUNNING_MODAL", OPERATOR_RUNNING_MODAL},
@@ -81,9 +82,9 @@ static struct BPY_flag_def pyop_ret_flags[] = {
extern void BPY_update_modules( void ); //XXX temp solution
-static int PYTHON_OT_generic(int mode, bContext *C, wmOperator *op, wmEvent *event)
+static int PYTHON_OT_generic(int mode, bContext *C, wmOperatorType *ot, wmOperator *op, wmEvent *event)
{
- PyObject *py_class = op->type->pyop_data;
+ PyObject *py_class = ot->pyop_data;
PyObject *args;
PyObject *ret= NULL, *py_class_instance, *item= NULL;
int ret_flag= (mode==PYOP_POLL ? 0:OPERATOR_CANCELLED);
@@ -105,7 +106,7 @@ static int PYTHON_OT_generic(int mode, bContext *C, wmOperator *op, wmEvent *eve
/* Assign instance attributes from operator properties */
- {
+ if(op) {
const char *arg_name;
RNA_STRUCT_BEGIN(op->ptr, prop) {
@@ -121,10 +122,12 @@ static int PYTHON_OT_generic(int mode, bContext *C, wmOperator *op, wmEvent *eve
}
/* set operator pointer RNA as instance "__operator__" attribute */
- RNA_pointer_create(NULL, &RNA_Operator, op, &ptr_operator);
- py_operator= pyrna_struct_CreatePyObject(&ptr_operator);
- PyObject_SetAttrString(py_class_instance, "__operator__", py_operator);
- Py_DECREF(py_operator);
+ if(op) {
+ RNA_pointer_create(NULL, &RNA_Operator, op, &ptr_operator);
+ py_operator= pyrna_struct_CreatePyObject(&ptr_operator);
+ PyObject_SetAttrString(py_class_instance, "__operator__", py_operator);
+ Py_DECREF(py_operator);
+ }
RNA_pointer_create(NULL, &RNA_Context, C, &ptr_context);
@@ -148,8 +151,7 @@ static int PYTHON_OT_generic(int mode, bContext *C, wmOperator *op, wmEvent *eve
else if (mode==PYOP_POLL) {
item= PyObject_GetAttrString(py_class, "poll");
args = PyTuple_New(2);
- //XXX Todo - wrap context in a useful way, None for now.
- PyTuple_SET_ITEM(args, 1, Py_None);
+ PyTuple_SET_ITEM(args, 1, pyrna_struct_CreatePyObject(&ptr_context));
}
PyTuple_SET_ITEM(args, 0, py_class_instance);
@@ -160,21 +162,24 @@ static int PYTHON_OT_generic(int mode, bContext *C, wmOperator *op, wmEvent *eve
}
if (ret == NULL) { /* covers py_class_instance failing too */
- BPy_errors_to_report(op->reports);
+ if(op)
+ BPy_errors_to_report(op->reports);
}
else {
if (mode==PYOP_POLL) {
if (PyBool_Check(ret) == 0) {
PyErr_SetString(PyExc_ValueError, "Python poll function return value ");
- BPy_errors_to_report(op->reports);
+ if(op)
+ BPy_errors_to_report(op->reports);
}
else {
ret_flag= ret==Py_True ? 1:0;
}
} else if (BPY_flag_from_seq(pyop_ret_flags, ret, &ret_flag) == -1) {
- /* the returned value could not be converted into a flag */
- BPy_errors_to_report(op->reports);
+ /* the returned value could not be converted into a flag */
+ if(op)
+ BPy_errors_to_report(op->reports);
ret_flag = OPERATOR_CANCELLED;
}
@@ -225,19 +230,17 @@ static int PYTHON_OT_generic(int mode, bContext *C, wmOperator *op, wmEvent *eve
static int PYTHON_OT_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- return PYTHON_OT_generic(PYOP_INVOKE, C, op, event);
+ return PYTHON_OT_generic(PYOP_INVOKE, C, op->type, op, event);
}
static int PYTHON_OT_execute(bContext *C, wmOperator *op)
{
- return PYTHON_OT_generic(PYOP_EXEC, C, op, NULL);
+ return PYTHON_OT_generic(PYOP_EXEC, C, op->type, op, NULL);
}
-static int PYTHON_OT_poll(bContext *C)
+static int PYTHON_OT_poll(bContext *C, wmOperatorType *ot)
{
- // XXX TODO - no way to get the operator type (and therefor class) from the poll function.
- //return PYTHON_OT_generic(PYOP_POLL, C, NULL, NULL);
- return 1;
+ return PYTHON_OT_generic(PYOP_POLL, C, ot, NULL, NULL);
}
void PYTHON_OT_wrapper(wmOperatorType *ot, void *userdata)
@@ -267,24 +270,38 @@ void PYTHON_OT_wrapper(wmOperatorType *ot, void *userdata)
/* api callbacks, detailed checks dont on adding */
if (PyObject_HasAttrString(py_class, "invoke"))
ot->invoke= PYTHON_OT_invoke;
+ //else
+ // ot->invoke= WM_operator_props_popup; /* could have an option for standard invokes */
+
if (PyObject_HasAttrString(py_class, "execute"))
ot->exec= PYTHON_OT_execute;
if (PyObject_HasAttrString(py_class, "poll"))
- ot->poll= PYTHON_OT_poll;
+ ot->pyop_poll= PYTHON_OT_poll;
ot->pyop_data= userdata;
/* flags */
+ ot->flag= 0;
+
item= PyObject_GetAttrString(py_class, PYOP_ATTR_REGISTER);
if (item) {
- ot->flag= PyObject_IsTrue(item)!=0 ? OPTYPE_REGISTER:0;
+ ot->flag |= PyObject_IsTrue(item)!=0 ? OPTYPE_REGISTER:0;
Py_DECREF(item);
}
else {
- ot->flag= OPTYPE_REGISTER; /* unspesified, leave on for now to help debug */
PyErr_Clear();
}
-
+ item= PyObject_GetAttrString(py_class, PYOP_ATTR_UNDO);
+ if (item) {
+ ot->flag |= PyObject_IsTrue(item)!=0 ? OPTYPE_UNDO:0;
+ Py_DECREF(item);
+ }
+ else {
+ PyErr_Clear();
+ }
+
+
+
props= PyObject_GetAttrString(py_class, PYOP_ATTR_PROP);
if (props) {
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index c2335bea995..fb83ae3f205 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -345,6 +345,27 @@ static char *pyrna_enum_as_string(PointerRNA *ptr, PropertyRNA *prop)
return result;
}
+static int pyrna_string_to_enum(PyObject *item, PointerRNA *ptr, PropertyRNA *prop, int *val, const char *error_prefix)
+{
+ char *param= _PyUnicode_AsString(item);
+
+ if (param==NULL) {
+ char *enum_str= pyrna_enum_as_string(ptr, prop);
+ PyErr_Format(PyExc_TypeError, "%.200s expected a string enum type in (%.200s)", error_prefix, enum_str);
+ MEM_freeN(enum_str);
+ return 0;
+ } else {
+ if (!RNA_property_enum_value(BPy_GetContext(), ptr, prop, param, val)) {
+ char *enum_str= pyrna_enum_as_string(ptr, prop);
+ PyErr_Format(PyExc_TypeError, "%.200s enum \"%.200s\" not found in (%.200s)", error_prefix, param, enum_str);
+ MEM_freeN(enum_str);
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
PyObject * pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop)
{
PyObject *ret;
@@ -603,42 +624,52 @@ int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyObject *v
}
case PROP_ENUM:
{
- char *param = _PyUnicode_AsString(value);
-
- if (param==NULL) {
+ int val, i;
+
+ if (PyUnicode_Check(value)) {
+ if (!pyrna_string_to_enum(value, ptr, prop, &val, error_prefix))
+ return -1;
+ }
+ else if (PyTuple_Check(value)) {
+ /* tuple of enum items, concatenate all values with OR */
+ val= 0;
+ for (i= 0; i < PyTuple_Size(value); i++) {
+ int tmpval;
+
+ /* PyTuple_GET_ITEM returns a borrowed reference */
+ if (!pyrna_string_to_enum(PyTuple_GET_ITEM(value, i), ptr, prop, &tmpval, error_prefix))
+ return -1;
+
+ val |= tmpval;
+ }
+ }
+ else {
char *enum_str= pyrna_enum_as_string(ptr, prop);
- PyErr_Format(PyExc_TypeError, "%.200s expected a string enum type in (%.200s)", error_prefix, enum_str);
+ PyErr_Format(PyExc_TypeError, "%.200s expected a string enum or a tuple of strings in (%.200s)", error_prefix, enum_str);
MEM_freeN(enum_str);
return -1;
- } else {
- int val;
- if (RNA_property_enum_value(BPy_GetContext(), ptr, prop, param, &val)) {
- if(data) *((int*)data)= val;
- else RNA_property_enum_set(ptr, prop, val);
- } else {
- char *enum_str= pyrna_enum_as_string(ptr, prop);
- PyErr_Format(PyExc_TypeError, "%.200s enum \"%.200s\" not found in (%.200s)", error_prefix, param, enum_str);
- MEM_freeN(enum_str);
- return -1;
- }
}
+
+ if(data) *((int*)data)= val;
+ else RNA_property_enum_set(ptr, prop, val);
break;
}
case PROP_POINTER:
{
StructRNA *ptype= RNA_property_pointer_type(ptr, prop);
+ int flag = RNA_property_flag(prop);
if(!BPy_StructRNA_Check(value) && value != Py_None) {
- PointerRNA tmp;
- RNA_pointer_create(NULL, ptype, NULL, &tmp);
- PyErr_Format(PyExc_TypeError, "%.200s expected a %.200s type", error_prefix, RNA_struct_identifier(tmp.type));
+ PyErr_Format(PyExc_TypeError, "%.200s expected a %.200s type", error_prefix, RNA_struct_identifier(ptype));
+ return -1;
+ } else if((flag & PROP_NEVER_NULL) && value == Py_None) {
+ PyErr_Format(PyExc_TypeError, "property can't be assigned a None value");
return -1;
} else {
BPy_StructRNA *param= (BPy_StructRNA*)value;
int raise_error= FALSE;
if(data) {
- int flag = RNA_property_flag(prop);
if(flag & PROP_RNAPTR) {
if(value == Py_None)
@@ -731,7 +762,10 @@ int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyObject *v
break;
}
}
-
+
+ /* Run rna property functions */
+ RNA_property_update(BPy_GetContext(), ptr, prop);
+
return 0;
}
@@ -1119,6 +1153,31 @@ static PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA * self, PyObject *ar
return PyBool_FromLong( insert_keyframe((ID *)self->ptr.data, NULL, NULL, path, index, cfra, 0));
}
+static PyObject *pyrna_struct_is_property_set(BPy_StructRNA * self, PyObject *args)
+{
+ char *name;
+
+ if (!PyArg_ParseTuple(args, "s:is_property_set", &name))
+ return NULL;
+
+ return PyBool_FromLong(RNA_property_is_set(&self->ptr, name));
+}
+
+static PyObject *pyrna_struct_is_property_hidden(BPy_StructRNA * self, PyObject *args)
+{
+ PropertyRNA *prop;
+ char *name;
+ int hidden;
+
+ if (!PyArg_ParseTuple(args, "s:is_property_hidden", &name))
+ return NULL;
+
+ prop= RNA_struct_find_property(&self->ptr, name);
+ hidden= (prop)? (RNA_property_flag(prop) & PROP_HIDDEN): 1;
+
+ return PyBool_FromLong(hidden);
+}
+
static PyObject *pyrna_struct_dir(BPy_StructRNA * self)
{
@@ -1711,6 +1770,8 @@ static struct PyMethodDef pyrna_struct_methods[] = {
/* maybe this become and ID function */
{"keyframe_insert", (PyCFunction)pyrna_struct_keyframe_insert, METH_VARARGS, NULL},
+ {"is_property_set", (PyCFunction)pyrna_struct_is_property_set, METH_VARARGS, NULL},
+ {"is_property_hidden", (PyCFunction)pyrna_struct_is_property_hidden, METH_VARARGS, NULL},
{"__dir__", (PyCFunction)pyrna_struct_dir, METH_NOARGS, NULL},
{NULL, NULL, 0, NULL}
@@ -1993,8 +2054,10 @@ static PyObject * pyrna_func_call(PyObject * self, PyObject *args, PyObject *kw)
/* Check if we gave args that dont exist in the function
* printing the error is slow but it should only happen when developing.
- * the if below is quick, checking if it passed less keyword args then we gave */
- if(kw && (PyDict_Size(kw) > kw_tot)) {
+ * the if below is quick, checking if it passed less keyword args then we gave.
+ * (Dont overwrite the error if we have one, otherwise can skip important messages and confuse with args)
+ */
+ if(err == 0 && kw && (PyDict_Size(kw) > kw_tot)) {
PyObject *key, *value;
Py_ssize_t pos = 0;
@@ -2252,6 +2315,19 @@ PyTypeObject pyrna_prop_Type = {
NULL
};
+static struct PyMethodDef pyrna_struct_subtype_methods[] = {
+ {"BoolProperty", (PyCFunction)BPy_BoolProperty, METH_VARARGS|METH_KEYWORDS, ""},
+ {"IntProperty", (PyCFunction)BPy_IntProperty, METH_VARARGS|METH_KEYWORDS, ""},
+ {"FloatProperty", (PyCFunction)BPy_FloatProperty, METH_VARARGS|METH_KEYWORDS, ""},
+ {"StringProperty", (PyCFunction)BPy_StringProperty, METH_VARARGS|METH_KEYWORDS, ""},
+ {"EnumProperty", (PyCFunction)BPy_EnumProperty, METH_VARARGS|METH_KEYWORDS, ""},
+ {"PointerProperty", (PyCFunction)BPy_PointerProperty, METH_VARARGS|METH_KEYWORDS, ""},
+ {"CollectionProperty", (PyCFunction)BPy_CollectionProperty, METH_VARARGS|METH_KEYWORDS, ""},
+
+// {"__get_rna", (PyCFunction)BPy_GetStructRNA, METH_NOARGS, ""},
+ {NULL, NULL, 0, NULL}
+};
+
static void pyrna_subtype_set_rna(PyObject *newclass, StructRNA *srna)
{
PointerRNA ptr;
@@ -2277,6 +2353,17 @@ static void pyrna_subtype_set_rna(PyObject *newclass, StructRNA *srna)
PyDict_SetItemString(((PyTypeObject *)newclass)->tp_dict, "__rna__", item);
Py_DECREF(item);
/* done with rna instance */
+
+ /* attach functions into the class
+ * so you can do... bpy.types.Scene.SomeFunction()
+ */
+ {
+ PyMethodDef *ml;
+
+ for(ml= pyrna_struct_subtype_methods; ml->ml_name; ml++){
+ PyObject_SetAttrString(newclass, ml->ml_name, PyCFunction_New(ml, newclass));
+ }
+ }
}
/*
@@ -2299,20 +2386,6 @@ PyObject *BPy_GetStructRNA(PyObject *self)
}
*/
-static struct PyMethodDef pyrna_struct_subtype_methods[] = {
- {"BoolProperty", (PyCFunction)BPy_BoolProperty, METH_VARARGS|METH_KEYWORDS, ""},
- {"IntProperty", (PyCFunction)BPy_IntProperty, METH_VARARGS|METH_KEYWORDS, ""},
- {"FloatProperty", (PyCFunction)BPy_FloatProperty, METH_VARARGS|METH_KEYWORDS, ""},
- {"StringProperty", (PyCFunction)BPy_StringProperty, METH_VARARGS|METH_KEYWORDS, ""},
- {"EnumProperty", (PyCFunction)BPy_EnumProperty, METH_VARARGS|METH_KEYWORDS, ""},
- {"PointerProperty", (PyCFunction)BPy_PointerProperty, METH_VARARGS|METH_KEYWORDS, ""},
- {"CollectionProperty", (PyCFunction)BPy_CollectionProperty, METH_VARARGS|METH_KEYWORDS, ""},
-
-// {"__get_rna", (PyCFunction)BPy_GetStructRNA, METH_NOARGS, ""},
- {NULL, NULL, 0, NULL}
-};
-
-
PyObject* pyrna_srna_Subtype(StructRNA *srna)
{
PyObject *newclass = NULL;
@@ -2362,18 +2435,6 @@ PyObject* pyrna_srna_Subtype(StructRNA *srna)
pyrna_subtype_set_rna(newclass, srna);
Py_DECREF(newclass); /* let srna own */
-
-
- /* attach functions into the class
- * so you can do... bpy.types.Scene.SomeFunction()
- */
- {
- PyMethodDef *ml;
- for(ml= pyrna_struct_subtype_methods; ml->ml_name; ml++){
- PyObject_SetAttrString(newclass, ml->ml_name, PyCFunction_New(ml, newclass));
- }
- }
-
}
else {
/* this should not happen */
@@ -2755,7 +2816,7 @@ PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw)
{
static char *kwlist[] = {"attr", "name", "description", "min", "max", "soft_min", "soft_max", "default", NULL};
char *id, *name="", *description="";
- float min=FLT_MIN, max=FLT_MAX, soft_min=FLT_MIN, soft_max=FLT_MAX, def=0.0f;
+ float min=-FLT_MAX, max=FLT_MAX, soft_min=-FLT_MAX, soft_max=FLT_MAX, def=0.0f;
PropertyRNA *prop;
StructRNA *srna;
diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt
index 3284f7ea79a..279ba7698b7 100644
--- a/source/blender/render/CMakeLists.txt
+++ b/source/blender/render/CMakeLists.txt
@@ -24,7 +24,7 @@
#
# ***** END GPL LICENSE BLOCK *****
-FILE(GLOB SRC intern/source/*.c)
+FILE(GLOB SRC intern/source/*.c intern/raytrace/*.cpp)
SET(INC
intern/include ../../../intern/guardedalloc ../blenlib ../makesdna
@@ -34,6 +34,10 @@ SET(INC
../makesrna
)
+IF(WIN32)
+ SET(INC ${INC} ${PTHREADS_INC})
+ENDIF(WIN32)
+
IF(WITH_OPENEXR)
ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
@@ -43,10 +47,6 @@ IF(WITH_QUICKTIME)
ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
-IF(WITH_FFMPEG)
- ADD_DEFINITIONS(-DWITH_FFMPEG)
-ENDIF(WITH_FFMPEG)
-
#TODO
#if env['OURPLATFORM']=='linux2':
# cflags='-pthread'
diff --git a/source/blender/render/SConscript b/source/blender/render/SConscript
index db151775b96..17c20e8807a 100644
--- a/source/blender/render/SConscript
+++ b/source/blender/render/SConscript
@@ -1,8 +1,16 @@
#!/usr/bin/python
Import ('env')
-cflags=''
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ # FIXME: need to set the appropriate flags for msvc, otherwise we get warnings
+ cflags = []
+ cxxflags = []
+else:
+ cflags = ['-O2','-msse2','-mfpmath=sse']
+ cxxflags = ['-O2','-msse2','-mfpmath=sse']
+
sources = env.Glob('intern/source/*.c')
+raysources = env.Glob('intern/raytrace/*.cpp')
incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna ../makesrna'
incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf'
@@ -14,13 +22,19 @@ if env['WITH_BF_QUICKTIME']:
defs.append('WITH_QUICKTIME')
incs += ' ../quicktime ' + env['BF_QUICKTIME_INC']
-if env['WITH_BF_FFMPEG']:
- defs.append('WITH_FFMPEG')
-
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
if env['OURPLATFORM']=='linux2':
+ cflags += ['-pthread']
+
+
+if env['OURPLATFORM'] == 'linux2':
cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
env.BlenderLib ( libname = 'bf_render', sources = sources, includes = Split(incs), defines=defs, libtype='core', priority=145, compileflags=cflags )
+env.BlenderLib ( libname = 'bf_render_raytrace', sources = raysources, includes = Split(incs), defines=defs, libtype='core', priority=145, compileflags=cflags, cxx_compileflags=cxxflags )
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h
index bf02af6ac36..56a81ac6b43 100644
--- a/source/blender/render/extern/include/RE_pipeline.h
+++ b/source/blender/render/extern/include/RE_pipeline.h
@@ -157,8 +157,11 @@ void RE_FreeAllRender (void);
/* get results and statistics */
void RE_FreeRenderResult(struct RenderResult *rr);
-struct RenderResult *RE_GetResult(struct Render *re);
-void RE_GetResultImage(struct Render *re, struct RenderResult *rr);
+struct RenderResult *RE_AcquireResultRead(struct Render *re);
+struct RenderResult *RE_AcquireResultWrite(struct Render *re);
+void RE_ReleaseResult(struct Render *re);
+void RE_AcquireResultImage(struct Render *re, struct RenderResult *rr);
+void RE_ReleaseResultImage(struct Render *re);
struct RenderStats *RE_GetStats(struct Render *re);
void RE_ResultGet32(struct Render *re, unsigned int *rect);
struct RenderLayer *RE_GetRenderLayer(struct RenderResult *rr, const char *name);
diff --git a/source/blender/render/extern/include/RE_raytrace.h b/source/blender/render/extern/include/RE_raytrace.h
index 8f429f7dd90..7d430d5550a 100644
--- a/source/blender/render/extern/include/RE_raytrace.h
+++ b/source/blender/render/extern/include/RE_raytrace.h
@@ -22,7 +22,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): none yet.
+ * Contributor(s): André Pinto.
*
* ***** END GPL LICENSE BLOCK *****
* RE_raytrace.h: ray tracing api, can be used independently from the renderer.
@@ -31,84 +31,183 @@
#ifndef RE_RAYTRACE_H
#define RE_RAYTRACE_H
-/* ray types */
-#define RE_RAY_SHADOW 0
-#define RE_RAY_MIRROR 1
-#define RE_RAY_SHADOW_TRA 2
+#ifdef __cplusplus
+extern "C" {
+#endif
-/* spatial tree for raytracing acceleration */
-typedef void RayTree;
-/* abstraction of face type */
-typedef void RayFace;
+// #define RE_RAYCOUNTER /* enable counters per ray, usefull for measuring raytrace structures performance */
-/* object numbers above this are transformed */
-#define RE_RAY_TRANSFORM_OFFS 0x8000000
+#define RE_RAY_LCTS_MAX_SIZE 256
+#define RT_USE_LAST_HIT /* last shadow hit is reused before raycasting on whole tree */
+//#define RT_USE_HINT /* last hit object is reused before raycasting on whole tree */
-/* convert from pointer to index in array and back, with offset if the
- * instance is transformed */
-#define RAY_OBJECT_SET(re, obi) \
- ((obi == NULL)? 0: \
- ((obi - (re)->objectinstance) + ((obi->flag & R_TRANSFORMED)? RE_RAY_TRANSFORM_OFFS: 0)))
+#ifdef RE_RAYCOUNTER
-#define RAY_OBJECT_GET(re, i) \
- ((re)->objectinstance + ((i >= RE_RAY_TRANSFORM_OFFS)? i-RE_RAY_TRANSFORM_OFFS: i))
+typedef struct RayCounter RayCounter;
+struct RayCounter
+{
+ struct
+ {
+ unsigned long long test, hit;
+
+ } faces, bb, simd_bb, raycast, raytrace_hint, rayshadow_last_hit;
+};
+#endif
-/* struct for intersection data */
-typedef struct Isect {
- float start[3]; /* start+vec = end, in ray_tree_intersect */
- float vec[3];
- float end[3];
+/* Internals about raycasting structures can be found on intern/raytree.h */
+typedef struct RayObject RayObject;
+typedef struct Isect Isect;
+typedef struct RayHint RayHint;
+typedef struct RayTraceHint RayTraceHint;
+
+struct DerivedMesh;
+struct Mesh;
+struct VlakRen;
+struct ObjectInstanceRen;
+
+int RE_rayobject_raycast(RayObject *r, Isect *i);
+void RE_rayobject_add (RayObject *r, RayObject *);
+void RE_rayobject_done(RayObject *r);
+void RE_rayobject_free(RayObject *r);
+
+/* Extend min/max coords so that the rayobject is inside them */
+void RE_rayobject_merge_bb(RayObject *ob, float *min, float *max);
+
+/* initializes an hint for optiming raycast where it is know that a ray will pass by the given BB often the origin point */
+void RE_rayobject_hint_bb(RayObject *r, RayHint *hint, float *min, float *max);
- float labda, u, v; /* distance to hitpoint, uv weights */
+/* initializes an hint for optiming raycast where it is know that a ray will be contained inside the given cone*/
+/* void RE_rayobject_hint_cone(RayObject *r, RayHint *hint, float *); */
- RayFace *face; /* face is where to intersect with */
- int ob;
- RayFace *faceorig; /* start face */
- int oborig;
- RayFace *face_last; /* for shadow optimize, last intersected face */
- int ob_last;
+/* RayObject constructors */
+RayObject* RE_rayobject_octree_create(int ocres, int size);
+RayObject* RE_rayobject_instance_create(RayObject *target, float transform[][4], void *ob, void *target_ob);
+RayObject* RE_rayobject_empty_create();
+
+RayObject* RE_rayobject_blibvh_create(int size); /* BLI_kdopbvh.c */
+RayObject* RE_rayobject_vbvh_create(int size); /* raytrace/rayobject_vbvh.c */
+RayObject* RE_rayobject_svbvh_create(int size); /* raytrace/rayobject_svbvh.c */
+RayObject* RE_rayobject_qbvh_create(int size); /* raytrace/rayobject_qbvh.c */
+
+
+/*
+ * This ray object represents a triangle or a quad face.
+ * All data needed to realize intersection is "localy" available.
+ */
+typedef struct RayFace
+{
+ float v1[4], v2[4], v3[4], v4[3];
+ int quad;
+ void *ob;
+ void *face;
+
+} RayFace;
+
+#define RE_rayface_isQuad(a) ((a)->quad)
+
+RayObject* RE_rayface_from_vlak(RayFace *face, struct ObjectInstanceRen *obi, struct VlakRen *vlr);
+RayObject* RE_rayface_from_coords(RayFace *rayface, void *ob, void *face, float *co1, float *co2, float *co3, float *co4);
+
+
+/*
+ * This ray object represents faces directly from a given VlakRen structure.
+ * Thus allowing to save memory, but making code triangle intersection dependant on render structures
+ */
+typedef struct VlakPrimitive
+{
+ struct ObjectInstanceRen *ob;
+ struct VlakRen *face;
+} VlakPrimitive;
+RayObject* RE_vlakprimitive_from_vlak(VlakPrimitive *face, struct ObjectInstanceRen *obi, struct VlakRen *vlr);
+
+
+
+/*
+ * Raytrace hints
+ */
+typedef struct LCTSHint LCTSHint;
+struct LCTSHint
+{
+ int size;
+ RayObject *stack[RE_RAY_LCTS_MAX_SIZE];
+};
+
+struct RayHint
+{
+ union
+ {
+ LCTSHint lcts;
+ } data;
+};
+
+
+/* Ray Intersection */
+struct Isect
+{
+ float start[3];
+ float vec[3];
+ float labda;
+
+ /* length of vec, configured by RE_rayobject_raycast */
+ int bv_index[6];
+ float idot_axis[3];
+ float dist;
+
+/* float end[3]; - not used */
+
+ float u, v;
+
+ struct
+ {
+ void *ob;
+ void *face;
+ }
+ hit, orig;
+
+ RayObject *last_hit; /* last hit optimization */
+
+#ifdef RT_USE_HINT
+ RayTraceHint *hint, *hit_hint;
+#endif
+
short isect; /* which half of quad */
short mode; /* RE_RAY_SHADOW, RE_RAY_MIRROR, RE_RAY_SHADOW_TRA */
int lay; /* -1 default, set for layer lamps */
+
+ int skip; /* RE_SKIP_CULLFACE */
- /* only used externally */
float col[4]; /* RGBA for shadow_tra */
- /* octree only */
- RayFace *facecontr;
- int obcontr;
- float ddalabda;
- short faceisect; /* flag if facecontr was done or not */
-
- /* custom pointer to be used in the RayCheckFunc */
void *userdata;
-} Isect;
-
-/* function callbacks for face type abstraction */
-typedef void (*RayCoordsFunc)(RayFace *face,
- float **v1, float **v2, float **v3, float **v4);
-typedef int (*RayCheckFunc)(Isect *is, int ob, RayFace *face);
-typedef float *(*RayObjectTransformFunc)(void *userdata, int ob);
-
-/* tree building and freeing */
-RayTree *RE_ray_tree_create(int ocres, int totface, float *min, float *max,
- RayCoordsFunc coordfunc, RayCheckFunc checkfunc,
- RayObjectTransformFunc transformfunc, void *userdata);
-void RE_ray_tree_add_face(RayTree *tree, int ob, RayFace *face);
-void RE_ray_tree_done(RayTree *tree);
-void RE_ray_tree_free(RayTree *tree);
-
-/* intersection with full tree and single face */
-int RE_ray_tree_intersect(RayTree *tree, Isect *is);
-int RE_ray_tree_intersect_check(RayTree *tree, Isect *is, RayCheckFunc check);
-int RE_ray_face_intersection(Isect *is, RayObjectTransformFunc transformfunc,
- RayCoordsFunc coordsfunc);
-
-/* retrieve the diameter of the tree structure, for setting intersection
- end distance */
-float RE_ray_tree_max_size(RayTree *tree);
+
+ RayHint *hint;
+
+#ifdef RE_RAYCOUNTER
+ RayCounter *raycounter;
+#endif
+};
-#endif /*__RE_RAYTRACE_H__*/
+/* ray types */
+#define RE_RAY_SHADOW 0
+#define RE_RAY_MIRROR 1
+#define RE_RAY_SHADOW_TRA 2
+
+/* skip options */
+#define RE_SKIP_CULLFACE (1 << 0)
+
+/* if using this flag then *face should be a pointer to a VlakRen */
+#define RE_SKIP_VLR_NEIGHBOUR (1 << 1)
+#define RE_SKIP_VLR_RENDER_CHECK (1 << 2)
+#define RE_SKIP_VLR_NON_SOLID_MATERIAL (1 << 3)
+/* TODO use: FLT_MAX? */
+#define RE_RAYTRACE_MAXDIST 1e33
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /*__RE_RAYTRACE_H__*/
diff --git a/source/blender/render/extern/include/RE_render_ext.h b/source/blender/render/extern/include/RE_render_ext.h
index 15b59f2c8cc..069861df992 100644
--- a/source/blender/render/extern/include/RE_render_ext.h
+++ b/source/blender/render/extern/include/RE_render_ext.h
@@ -55,7 +55,7 @@ int externtex(struct MTex *mtex, float *vec, float *tin, float *tr, float *tg, f
/* particle.c */
void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg, int blendtype);
-float texture_value_blend(float tex, float out, float fact, float facg, int blendtype, int flip);
+float texture_value_blend(float tex, float out, float fact, float facg, int blendtype);
/* node_composite.c */
void ibuf_sample(struct ImBuf *ibuf, float fx, float fy, float dx, float dy, float *result);
diff --git a/source/blender/render/extern/include/RE_shader_ext.h b/source/blender/render/extern/include/RE_shader_ext.h
index 435e3ddc07f..b36163f57c0 100644
--- a/source/blender/render/extern/include/RE_shader_ext.h
+++ b/source/blender/render/extern/include/RE_shader_ext.h
@@ -30,6 +30,7 @@
#ifndef RE_SHADER_EXT_H
#define RE_SHADER_EXT_H
+#include "RE_raytrace.h" /* For RE_RAYCOUNTER */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* this include is for shading and texture exports */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
@@ -56,6 +57,7 @@ typedef struct ShadeResult
float refr[3];
float nor[3];
float winspeed[4];
+ float rayhits[4];
} ShadeResult;
/* only here for quick copy */
@@ -128,7 +130,6 @@ typedef struct ShadeInput
/* individual copies: */
int har; /* hardness */
- float layerfac;
/* texture coordinates */
float lo[3], gl[3], ref[3], orn[3], winco[3], sticky[3], vcol[4];
@@ -178,6 +179,10 @@ typedef struct ShadeInput
struct Group *light_override;
struct Material *mat_override;
+#ifdef RE_RAYCOUNTER
+ RayCounter raycounter;
+#endif
+
} ShadeInput;
diff --git a/source/blender/render/intern/Makefile b/source/blender/render/intern/Makefile
index 859a813bd2f..4fce37df175 100644
--- a/source/blender/render/intern/Makefile
+++ b/source/blender/render/intern/Makefile
@@ -29,6 +29,6 @@
# Bounces make to subdirectories.
SOURCEDIR = source/blender/render/intern
-DIRS = source
+DIRS = source raytrace
include nan_subdirs.mk
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index e50e498228d..48bf34d0696 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -53,6 +53,8 @@ struct VlakTableNode;
struct GHash;
struct RenderBuckets;
struct ObjectInstanceRen;
+struct RayObject;
+struct RayFace;
#define TABLEINITSIZE 1024
#define LAMPINITSIZE 256
@@ -121,6 +123,10 @@ struct Render
RenderResult *pushedresult;
/* a list of RenderResults, for fullsample */
ListBase fullresult;
+ /* read/write mutex, all internal code that writes to re->result must use a
+ write lock, all external code must use a read lock. internal code is assumed
+ to not conflict with writes, so no lock used for that */
+ ThreadRWMutex resultmutex;
/* window size, display rect, viewplane */
int winx, winy;
@@ -168,7 +174,10 @@ struct Render
ListBase parts;
/* octree tables and variables for raytrace */
- void *raytree;
+ struct RayObject *raytree;
+ struct RayFace *rayfaces;
+ struct VlakPrimitive *rayprimitives;
+ float maxdist; /* needed for keeping an incorrect behaviour of SUN and HEMI lights (avoid breaking old scenes) */
/* occlusion tree */
void *occlusiontree;
@@ -236,10 +245,17 @@ struct Render
struct ISBData;
+typedef struct DeepSample {
+ int z;
+ float v;
+} DeepSample;
+
typedef struct ShadSampleBuf {
struct ShadSampleBuf *next, *prev;
intptr_t *zbuf;
char *cbuf;
+ DeepSample **deepbuf;
+ int *totbuf;
} ShadSampleBuf;
typedef struct ShadBuf {
@@ -249,7 +265,7 @@ typedef struct ShadBuf {
float viewmat[4][4];
float winmat[4][4];
float *jit, *weight;
- float d, clipend, pixsize, soft;
+ float d, clipend, pixsize, soft, compressthresh;
int co[3];
int size, bias;
ListBase buffers;
@@ -281,6 +297,13 @@ typedef struct ObjectRen {
int actmtface, actmcol, bakemtface;
float obmat[4][4]; /* only used in convertblender.c, for instancing */
+
+ /* used on makeraytree */
+ struct RayObject *raytree;
+ struct RayFace *rayfaces;
+ struct VlakPrimitive *rayprimitives;
+ struct ObjectInstanceRen *rayobi;
+
} ObjectRen;
typedef struct ObjectInstanceRen {
@@ -300,6 +323,11 @@ typedef struct ObjectInstanceRen {
float *vectors;
int totvector;
+
+ /* used on makeraytree */
+ struct RayObject *raytree;
+ int transform_primitives;
+
} ObjectInstanceRen;
/* ------------------------------------------------------------------------- */
@@ -425,7 +453,7 @@ typedef struct MatInside {
typedef struct VolPrecachePart
{
struct VolPrecachePart *next, *prev;
- struct RayTree *tree;
+ struct RayObject *tree;
struct ShadeInput *shi;
struct ObjectInstanceRen *obi;
int num;
@@ -506,6 +534,8 @@ typedef struct LampRen {
float clipend;
/** A small depth offset to prevent self-shadowing. */
float bias;
+ /* Compression threshold for deep shadow maps */
+ float compressthresh;
short ray_samp, ray_sampy, ray_sampz, ray_samp_method, ray_samp_type, area_shape, ray_totsamp;
short xold[BLENDER_MAX_THREADS], yold[BLENDER_MAX_THREADS]; /* last jitter table for area lights */
@@ -536,8 +566,7 @@ typedef struct LampRen {
short YF_glowtype;
/* ray optim */
- VlakRen *vlr_last[BLENDER_MAX_THREADS];
- ObjectInstanceRen *obi_last[BLENDER_MAX_THREADS];
+ struct RayObject *last_hit[BLENDER_MAX_THREADS];
struct MTex *mtex[MAX_MTEX];
diff --git a/source/blender/render/intern/include/rendercore.h b/source/blender/render/intern/include/rendercore.h
index 4b28529a147..250fbc000cb 100644
--- a/source/blender/render/intern/include/rendercore.h
+++ b/source/blender/render/intern/include/rendercore.h
@@ -95,6 +95,7 @@ int get_sample_layers(struct RenderPart *pa, struct RenderLayer *rl, struct Rend
extern void freeraytree(Render *re);
extern void makeraytree(Render *re);
+RayObject* makeraytree_object(Render *re, ObjectInstanceRen *obi);
extern void ray_shadow(ShadeInput *, LampRen *, float *);
extern void ray_trace(ShadeInput *, ShadeResult *);
diff --git a/source/blender/render/intern/include/volume_precache.h b/source/blender/render/intern/include/volume_precache.h
index 9d87a219c82..5c3a7bdfbf0 100644
--- a/source/blender/render/intern/include/volume_precache.h
+++ b/source/blender/render/intern/include/volume_precache.h
@@ -28,6 +28,6 @@
void volume_precache(Render *re);
void free_volume_precache(Render *re);
-int point_inside_volume_objectinstance(ObjectInstanceRen *obi, float *co);
+int point_inside_volume_objectinstance(Render *re, ObjectInstanceRen *obi, float *co);
-#define VOL_MS_TIMESTEP 0.1f \ No newline at end of file
+#define VOL_MS_TIMESTEP 0.1f
diff --git a/source/blender/render/intern/include/volumetric.h b/source/blender/render/intern/include/volumetric.h
index 026b4840ea3..97e7e022fa0 100644
--- a/source/blender/render/intern/include/volumetric.h
+++ b/source/blender/render/intern/include/volumetric.h
@@ -26,9 +26,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
-float vol_get_stepsize(struct ShadeInput *shi, int context);
float vol_get_density(struct ShadeInput *shi, float *co);
-void vol_get_scattering(ShadeInput *shi, float *scatter_col, float *co, float stepsize, float density);
+void vol_get_scattering(ShadeInput *shi, float *scatter_col, float *co_);
void shade_volume_outside(ShadeInput *shi, ShadeResult *shr);
void shade_volume_inside(ShadeInput *shi, ShadeResult *shr);
diff --git a/source/blender/render/intern/include/zbuf.h b/source/blender/render/intern/include/zbuf.h
index b6d0c656f63..a0665daf916 100644
--- a/source/blender/render/intern/include/zbuf.h
+++ b/source/blender/render/intern/include/zbuf.h
@@ -37,6 +37,7 @@ struct VlakRen;
struct ListBase;
struct ZSpan;
struct APixstrand;
+struct APixstr;
struct StrandShadeCache;
void fillrect(int *rect, int x, int y, int val);
@@ -50,11 +51,12 @@ void projectverto(float *v1, float winmat[][4], float *adr);
int testclip(float *v);
void zbuffer_shadow(struct Render *re, float winmat[][4], struct LampRen *lar, int *rectz, int size, float jitx, float jity);
+void zbuffer_abuf_shadow(struct Render *re, struct LampRen *lar, float winmat[][4], struct APixstr *APixbuf, struct APixstrand *apixbuf, struct ListBase *apsmbase, int size, int samples, float (*jit)[2]);
void zbuffer_solid(struct RenderPart *pa, struct RenderLayer *rl, void (*fillfunc)(struct RenderPart*, struct ZSpan*, int, void*), void *data);
unsigned short *zbuffer_transp_shade(struct RenderPart *pa, struct RenderLayer *rl, float *pass, struct ListBase *psmlist);
void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(void*, int, int, int, int, int));
-int zbuffer_strands_abuf(struct Render *re, struct RenderPart *pa, struct RenderLayer *rl, struct APixstrand *apixbuf, struct ListBase *apsmbase, struct StrandShadeCache *cache);
+int zbuffer_strands_abuf(struct Render *re, struct RenderPart *pa, struct APixstrand *apixbuf, struct ListBase *apsmbase, unsigned int lay, int negzmask, float winmat[][4], int winx, int winy, int sample, float (*jit)[2], float clipcrop, int shadow, struct StrandShadeCache *cache);
typedef struct APixstr {
unsigned short mask[4]; /* jitter mask */
@@ -118,6 +120,7 @@ typedef struct ZSpan {
/* exported to shadbuf.c */
void zbufclip4(struct ZSpan *zspan, int obi, int zvlnr, float *f1, float *f2, float *f3, float *f4, int c1, int c2, int c3, int c4);
void zbuf_free_span(struct ZSpan *zspan);
+void freepsA(struct ListBase *lb);
/* to rendercore.c */
void zspan_scanconvert(struct ZSpan *zpan, void *handle, float *v1, float *v2, float *v3, void (*func)(void *, int, int, float, float) );
@@ -128,7 +131,7 @@ void zbuf_alloc_span(struct ZSpan *zspan, int rectx, int recty, float clipcrop);
void zbufclipwire(struct ZSpan *zspan, int obi, int zvlnr, int ec, float *ho1, float *ho2, float *ho3, float *ho4, int c1, int c2, int c3, int c4);
/* exported to shadeinput.c */
-void zbuf_make_winmat(Render *re, float duplimat[][4], float winmat[][4]);
+void zbuf_make_winmat(Render *re, float winmat[][4]);
void zbuf_render_project(float winmat[][4], float *co, float *ho);
#endif
diff --git a/source/blender/render/intern/raytrace/Makefile b/source/blender/render/intern/raytrace/Makefile
new file mode 100644
index 00000000000..6e40c544c6f
--- /dev/null
+++ b/source/blender/render/intern/raytrace/Makefile
@@ -0,0 +1,65 @@
+#
+# $Id$
+#
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 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 = render_raytrace
+DIR = $(OCGDIR)/blender/render
+
+include nan_compile.mk
+
+CFLAGS += $(LEVEL_1_C_WARNINGS)
+
+# first /include is my own includes, second is the external interface.
+# The external modules follow after. There should be a nicer way to say this.
+CPPFLAGS += -I../include
+CPPFLAGS += -I../../extern/include
+CPPFLAGS += -I../../../blenlib
+CPPFLAGS += -I../../../imbuf
+CPPFLAGS += -I../../../makesdna
+CPPFLAGS += -I../../../makesrna
+CPPFLAGS += -I../../../blenkernel
+CPPFLAGS += -I../../../quicktime
+CPPFLAGS += -I../../../../kernel/gen_messaging
+CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
+# not very neat: the rest of blender..
+CPPFLAGS += -I../../../editors/include
+CPPFLAGS += $(NAN_SDLCFLAGS)
+CPPFLAGS += -I../../../../../intern/smoke/extern
+
+ifeq ($(WITH_QUICKTIME), true)
+ CPPFLAGS += -DWITH_QUICKTIME
+endif
+
+ifeq ($(WITH_FFMPEG),true)
+ CPPFLAGS += -DWITH_FFMPEG
+endif
+
+ifeq ($(WITH_OPENEXR),true)
+ CPPFLAGS += -DWITH_OPENEXR
+endif
diff --git a/source/blender/render/intern/raytrace/bvh.h b/source/blender/render/intern/raytrace/bvh.h
new file mode 100644
index 00000000000..ad7f44acb8d
--- /dev/null
+++ b/source/blender/render/intern/raytrace/bvh.h
@@ -0,0 +1,400 @@
+/**
+ * $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.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): André Pinto.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#include "rayobject.h"
+#include "raycounter.h"
+#include "MEM_guardedalloc.h"
+#include "rayobject_rtbuild.h"
+#include "rayobject_hint.h"
+
+#include <assert.h>
+
+#ifdef __SSE__
+#include <xmmintrin.h>
+#endif
+
+#ifndef RE_RAYTRACE_BVH_H
+#define RE_RAYTRACE_BVH_H
+
+#ifdef __SSE__
+inline int test_bb_group4(__m128 *bb_group, const Isect *isec)
+{
+
+ const __m128 tmin0 = _mm_setzero_ps();
+ const __m128 tmax0 = _mm_load1_ps(&isec->labda);
+
+ const __m128 tmin1 = _mm_max_ps(tmin0, _mm_mul_ps( _mm_sub_ps( bb_group[isec->bv_index[0]], _mm_load1_ps(&isec->start[0]) ), _mm_load1_ps(&isec->idot_axis[0])) );
+ const __m128 tmax1 = _mm_min_ps(tmax0, _mm_mul_ps( _mm_sub_ps( bb_group[isec->bv_index[1]], _mm_load1_ps(&isec->start[0]) ), _mm_load1_ps(&isec->idot_axis[0])) );
+ const __m128 tmin2 = _mm_max_ps(tmin1, _mm_mul_ps( _mm_sub_ps( bb_group[isec->bv_index[2]], _mm_load1_ps(&isec->start[1]) ), _mm_load1_ps(&isec->idot_axis[1])) );
+ const __m128 tmax2 = _mm_min_ps(tmax1, _mm_mul_ps( _mm_sub_ps( bb_group[isec->bv_index[3]], _mm_load1_ps(&isec->start[1]) ), _mm_load1_ps(&isec->idot_axis[1])) );
+ const __m128 tmin3 = _mm_max_ps(tmin2, _mm_mul_ps( _mm_sub_ps( bb_group[isec->bv_index[4]], _mm_load1_ps(&isec->start[2]) ), _mm_load1_ps(&isec->idot_axis[2])) );
+ const __m128 tmax3 = _mm_min_ps(tmax2, _mm_mul_ps( _mm_sub_ps( bb_group[isec->bv_index[5]], _mm_load1_ps(&isec->start[2]) ), _mm_load1_ps(&isec->idot_axis[2])) );
+
+ return _mm_movemask_ps(_mm_cmpge_ps(tmax3, tmin3));
+}
+#endif
+
+
+/* bvh tree generics */
+template<class Tree> static int bvh_intersect(Tree *obj, Isect *isec);
+
+template<class Tree> static void bvh_add(Tree *obj, RayObject *ob)
+{
+ rtbuild_add( obj->builder, ob );
+}
+
+template<class Node>
+inline bool is_leaf(Node *node)
+{
+ return !RE_rayobject_isAligned(node);
+}
+
+template<class Tree> static void bvh_done(Tree *obj);
+
+template<class Tree>
+static void bvh_free(Tree *obj)
+{
+ if(obj->builder)
+ rtbuild_free(obj->builder);
+
+ if(obj->node_arena)
+ BLI_memarena_free(obj->node_arena);
+
+ MEM_freeN(obj);
+}
+
+template<class Tree>
+static void bvh_bb(Tree *obj, float *min, float *max)
+{
+ bvh_node_merge_bb(obj->root, min, max);
+}
+
+
+template<class Tree>
+static float bvh_cost(Tree *obj)
+{
+ assert(obj->cost >= 0.0);
+ return obj->cost;
+}
+
+
+
+/* bvh tree nodes generics */
+template<class Node> static inline int bvh_node_hit_test(Node *node, Isect *isec)
+{
+ return RE_rayobject_bb_intersect_test(isec, (const float*)node->bb);
+}
+
+
+template<class Node>
+static inline void bvh_node_merge_bb(Node *node, float *min, float *max)
+{
+ if(is_leaf(node))
+ {
+ RE_rayobject_merge_bb( (RayObject*)node, min, max);
+ }
+ else
+ {
+ DO_MIN(node->bb , min);
+ DO_MAX(node->bb+3, max);
+ }
+}
+
+
+
+/*
+ * recursivly transverse a BVH looking for a rayhit using a local stack
+ */
+template<class Node> static inline void bvh_node_push_childs(Node *node, Isect *isec, Node **stack, int &stack_pos);
+
+template<class Node,int MAX_STACK_SIZE,bool TEST_ROOT>
+static int bvh_node_stack_raycast(Node *root, Isect *isec)
+{
+ Node *stack[MAX_STACK_SIZE];
+ int hit = 0, stack_pos = 0;
+
+ if(!TEST_ROOT && !is_leaf(root))
+ bvh_node_push_childs(root, isec, stack, stack_pos);
+ else
+ stack[stack_pos++] = root;
+
+ while(stack_pos)
+ {
+ Node *node = stack[--stack_pos];
+ if(!is_leaf(node))
+ {
+ if(bvh_node_hit_test(node,isec))
+ {
+ bvh_node_push_childs(node, isec, stack, stack_pos);
+ assert(stack_pos <= MAX_STACK_SIZE);
+ }
+ }
+ else
+ {
+ hit |= RE_rayobject_intersect( (RayObject*)node, isec);
+ if(hit && isec->mode == RE_RAY_SHADOW) return hit;
+ }
+ }
+ return hit;
+}
+
+
+#ifdef __SSE__
+/*
+ * Generic SIMD bvh recursion
+ * this was created to be able to use any simd (with the cost of some memmoves)
+ * it can take advantage of any SIMD width and doens't needs any special tree care
+ */
+template<class Node,int MAX_STACK_SIZE,bool TEST_ROOT>
+static int bvh_node_stack_raycast_simd(Node *root, Isect *isec)
+{
+ Node *stack[MAX_STACK_SIZE];
+
+ int hit = 0, stack_pos = 0;
+
+ if(!TEST_ROOT)
+ {
+ if(!is_leaf(root))
+ {
+ if(!is_leaf(root->child))
+ bvh_node_push_childs(root, isec, stack, stack_pos);
+ else
+ return RE_rayobject_intersect( (RayObject*)root->child, isec);
+ }
+ else
+ return RE_rayobject_intersect( (RayObject*)root, isec);
+ }
+ else
+ {
+ if(!is_leaf(root))
+ stack[stack_pos++] = root;
+ else
+ return RE_rayobject_intersect( (RayObject*)root, isec);
+ }
+
+ while(true)
+ {
+ //Use SIMD 4
+ if(stack_pos >= 4)
+ {
+ __m128 t_bb[6];
+ Node * t_node[4];
+
+ stack_pos -= 4;
+
+ /* prepare the 4BB for SIMD */
+ t_node[0] = stack[stack_pos+0]->child;
+ t_node[1] = stack[stack_pos+1]->child;
+ t_node[2] = stack[stack_pos+2]->child;
+ t_node[3] = stack[stack_pos+3]->child;
+
+ const float *bb0 = stack[stack_pos+0]->bb;
+ const float *bb1 = stack[stack_pos+1]->bb;
+ const float *bb2 = stack[stack_pos+2]->bb;
+ const float *bb3 = stack[stack_pos+3]->bb;
+
+ const __m128 x0y0x1y1 = _mm_shuffle_ps( _mm_load_ps(bb0), _mm_load_ps(bb1), _MM_SHUFFLE(1,0,1,0) );
+ const __m128 x2y2x3y3 = _mm_shuffle_ps( _mm_load_ps(bb2), _mm_load_ps(bb3), _MM_SHUFFLE(1,0,1,0) );
+ t_bb[0] = _mm_shuffle_ps( x0y0x1y1, x2y2x3y3, _MM_SHUFFLE(2,0,2,0) );
+ t_bb[1] = _mm_shuffle_ps( x0y0x1y1, x2y2x3y3, _MM_SHUFFLE(3,1,3,1) );
+
+ const __m128 z0X0z1X1 = _mm_shuffle_ps( _mm_load_ps(bb0), _mm_load_ps(bb1), _MM_SHUFFLE(3,2,3,2) );
+ const __m128 z2X2z3X3 = _mm_shuffle_ps( _mm_load_ps(bb2), _mm_load_ps(bb3), _MM_SHUFFLE(3,2,3,2) );
+ t_bb[2] = _mm_shuffle_ps( z0X0z1X1, z2X2z3X3, _MM_SHUFFLE(2,0,2,0) );
+ t_bb[3] = _mm_shuffle_ps( z0X0z1X1, z2X2z3X3, _MM_SHUFFLE(3,1,3,1) );
+
+ const __m128 Y0Z0Y1Z1 = _mm_shuffle_ps( _mm_load_ps(bb0+4), _mm_load_ps(bb1+4), _MM_SHUFFLE(1,0,1,0) );
+ const __m128 Y2Z2Y3Z3 = _mm_shuffle_ps( _mm_load_ps(bb2+4), _mm_load_ps(bb3+4), _MM_SHUFFLE(1,0,1,0) );
+ t_bb[4] = _mm_shuffle_ps( Y0Z0Y1Z1, Y2Z2Y3Z3, _MM_SHUFFLE(2,0,2,0) );
+ t_bb[5] = _mm_shuffle_ps( Y0Z0Y1Z1, Y2Z2Y3Z3, _MM_SHUFFLE(3,1,3,1) );
+/*
+ for(int i=0; i<4; i++)
+ {
+ Node *t = stack[stack_pos+i];
+ assert(!is_leaf(t));
+
+ float *bb = ((float*)t_bb)+i;
+ bb[4*0] = t->bb[0];
+ bb[4*1] = t->bb[1];
+ bb[4*2] = t->bb[2];
+ bb[4*3] = t->bb[3];
+ bb[4*4] = t->bb[4];
+ bb[4*5] = t->bb[5];
+ t_node[i] = t->child;
+ }
+*/
+ RE_RC_COUNT(isec->raycounter->simd_bb.test);
+ int res = test_bb_group4( t_bb, isec );
+
+ for(int i=0; i<4; i++)
+ if(res & (1<<i))
+ {
+ RE_RC_COUNT(isec->raycounter->simd_bb.hit);
+ if(!is_leaf(t_node[i]))
+ {
+ for(Node *t=t_node[i]; t; t=t->sibling)
+ {
+ assert(stack_pos < MAX_STACK_SIZE);
+ stack[stack_pos++] = t;
+ }
+ }
+ else
+ {
+ hit |= RE_rayobject_intersect( (RayObject*)t_node[i], isec);
+ if(hit && isec->mode == RE_RAY_SHADOW) return hit;
+ }
+ }
+ }
+ else if(stack_pos > 0)
+ {
+ Node *node = stack[--stack_pos];
+ assert(!is_leaf(node));
+
+ if(bvh_node_hit_test(node,isec))
+ {
+ if(!is_leaf(node->child))
+ {
+ bvh_node_push_childs(node, isec, stack, stack_pos);
+ assert(stack_pos <= MAX_STACK_SIZE);
+ }
+ else
+ {
+ hit |= RE_rayobject_intersect( (RayObject*)node->child, isec);
+ if(hit && isec->mode == RE_RAY_SHADOW) return hit;
+ }
+ }
+ }
+ else break;
+ }
+ return hit;
+}
+#endif
+
+/*
+ * recursively transverse a BVH looking for a rayhit using system stack
+ */
+/*
+template<class Node>
+static int bvh_node_raycast(Node *node, Isect *isec)
+{
+ int hit = 0;
+ if(bvh_test_node(node, isec))
+ {
+ if(isec->idot_axis[node->split_axis] > 0.0f)
+ {
+ int i;
+ for(i=0; i<BVH_NCHILDS; i++)
+ if(!is_leaf(node->child[i]))
+ {
+ if(node->child[i] == 0) break;
+
+ hit |= bvh_node_raycast(node->child[i], isec);
+ if(hit && isec->mode == RE_RAY_SHADOW) return hit;
+ }
+ else
+ {
+ hit |= RE_rayobject_intersect( (RayObject*)node->child[i], isec);
+ if(hit && isec->mode == RE_RAY_SHADOW) return hit;
+ }
+ }
+ else
+ {
+ int i;
+ for(i=BVH_NCHILDS-1; i>=0; i--)
+ if(!is_leaf(node->child[i]))
+ {
+ if(node->child[i])
+ {
+ hit |= dfs_raycast(node->child[i], isec);
+ if(hit && isec->mode == RE_RAY_SHADOW) return hit;
+ }
+ }
+ else
+ {
+ hit |= RE_rayobject_intersect( (RayObject*)node->child[i], isec);
+ if(hit && isec->mode == RE_RAY_SHADOW) return hit;
+ }
+ }
+ }
+ return hit;
+}
+*/
+
+template<class Node,class HintObject>
+void bvh_dfs_make_hint(Node *node, LCTSHint *hint, int reserve_space, HintObject *hintObject)
+{
+ assert( hint->size + reserve_space + 1 <= RE_RAY_LCTS_MAX_SIZE );
+
+ if(is_leaf(node))
+ {
+ hint->stack[hint->size++] = (RayObject*)node;
+ }
+ else
+ {
+ int childs = count_childs(node);
+ if(hint->size + reserve_space + childs <= RE_RAY_LCTS_MAX_SIZE)
+ {
+ int result = hint_test_bb(hintObject, node->bb, node->bb+3);
+ if(result == HINT_RECURSE)
+ {
+ /* We are 100% sure the ray will be pass inside this node */
+ bvh_dfs_make_hint_push_siblings(node->child, hint, reserve_space, hintObject);
+ }
+ else if(result == HINT_ACCEPT)
+ {
+ hint->stack[hint->size++] = (RayObject*)node;
+ }
+ }
+ else
+ {
+ hint->stack[hint->size++] = (RayObject*)node;
+ }
+ }
+}
+
+
+template<class Tree>
+static RayObjectAPI* bvh_get_api(int maxstacksize);
+
+
+template<class Tree, int DFS_STACK_SIZE>
+static inline RayObject *bvh_create_tree(int size)
+{
+ Tree *obj= (Tree*)MEM_callocN(sizeof(Tree), "BVHTree" );
+ assert( RE_rayobject_isAligned(obj) ); /* RayObject API assumes real data to be 4-byte aligned */
+
+ obj->rayobj.api = bvh_get_api<Tree>(DFS_STACK_SIZE);
+ obj->root = NULL;
+
+ obj->node_arena = NULL;
+ obj->builder = rtbuild_create( size );
+
+ return RE_rayobject_unalignRayAPI((RayObject*) obj);
+}
+
+#endif
diff --git a/source/blender/render/intern/raytrace/rayobject.cpp b/source/blender/render/intern/raytrace/rayobject.cpp
new file mode 100644
index 00000000000..8aff7a38317
--- /dev/null
+++ b/source/blender/render/intern/raytrace/rayobject.cpp
@@ -0,0 +1,580 @@
+/**
+ * $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.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): André Pinto.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#include <assert.h>
+
+#include "BKE_utildefines.h"
+#include "BLI_arithb.h"
+#include "DNA_material_types.h"
+
+#include "RE_raytrace.h"
+#include "render_types.h"
+#include "rayobject.h"
+#include "raycounter.h"
+
+/*
+ * Determines the distance that the ray must travel to hit the bounding volume of the given node
+ * Based on Tactical Optimization of Ray/Box Intersection, by Graham Fyffe
+ * [http://tog.acm.org/resources/RTNews/html/rtnv21n1.html#art9]
+ */
+int RE_rayobject_bb_intersect_test(const Isect *isec, const float *_bb)
+{
+ const float *bb = _bb;
+
+ float t1x = (bb[isec->bv_index[0]] - isec->start[0]) * isec->idot_axis[0];
+ float t2x = (bb[isec->bv_index[1]] - isec->start[0]) * isec->idot_axis[0];
+ float t1y = (bb[isec->bv_index[2]] - isec->start[1]) * isec->idot_axis[1];
+ float t2y = (bb[isec->bv_index[3]] - isec->start[1]) * isec->idot_axis[1];
+ float t1z = (bb[isec->bv_index[4]] - isec->start[2]) * isec->idot_axis[2];
+ float t2z = (bb[isec->bv_index[5]] - isec->start[2]) * isec->idot_axis[2];
+
+ RE_RC_COUNT(isec->raycounter->bb.test);
+
+ if(t1x > t2y || t2x < t1y || t1x > t2z || t2x < t1z || t1y > t2z || t2y < t1z) return 0;
+ if(t2x < 0.0 || t2y < 0.0 || t2z < 0.0) return 0;
+ if(t1x > isec->labda || t1y > isec->labda || t1z > isec->labda) return 0;
+ RE_RC_COUNT(isec->raycounter->bb.hit);
+
+ return 1;
+}
+
+
+/* only for self-intersecting test with current render face (where ray left) */
+static int intersection2(VlakRen *face, float r0, float r1, float r2, float rx1, float ry1, float rz1)
+{
+ float co1[3], co2[3], co3[3], co4[3];
+ float x0,x1,x2,t00,t01,t02,t10,t11,t12,t20,t21,t22;
+ float m0, m1, m2, divdet, det, det1;
+ float u1, v, u2;
+
+ VECCOPY(co1, face->v1->co);
+ VECCOPY(co2, face->v2->co);
+ if(face->v4)
+ {
+ VECCOPY(co3, face->v4->co);
+ VECCOPY(co4, face->v3->co);
+ }
+ else
+ {
+ VECCOPY(co3, face->v3->co);
+ }
+
+ t00= co3[0]-co1[0];
+ t01= co3[1]-co1[1];
+ t02= co3[2]-co1[2];
+ t10= co3[0]-co2[0];
+ t11= co3[1]-co2[1];
+ t12= co3[2]-co2[2];
+
+ x0= t11*r2-t12*r1;
+ x1= t12*r0-t10*r2;
+ x2= t10*r1-t11*r0;
+
+ divdet= t00*x0+t01*x1+t02*x2;
+
+ m0= rx1-co3[0];
+ m1= ry1-co3[1];
+ m2= rz1-co3[2];
+ det1= m0*x0+m1*x1+m2*x2;
+
+ if(divdet!=0.0f) {
+ u1= det1/divdet;
+
+ if(u1<ISECT_EPSILON) {
+ det= t00*(m1*r2-m2*r1);
+ det+= t01*(m2*r0-m0*r2);
+ det+= t02*(m0*r1-m1*r0);
+ v= det/divdet;
+
+ if(v<ISECT_EPSILON && (u1 + v) > -(1.0f+ISECT_EPSILON)) {
+ return 1;
+ }
+ }
+ }
+
+ if(face->v4) {
+
+ t20= co3[0]-co4[0];
+ t21= co3[1]-co4[1];
+ t22= co3[2]-co4[2];
+
+ divdet= t20*x0+t21*x1+t22*x2;
+ if(divdet!=0.0f) {
+ u2= det1/divdet;
+
+ if(u2<ISECT_EPSILON) {
+ det= t20*(m1*r2-m2*r1);
+ det+= t21*(m2*r0-m0*r2);
+ det+= t22*(m0*r1-m1*r0);
+ v= det/divdet;
+
+ if(v<ISECT_EPSILON && (u2 + v) >= -(1.0f+ISECT_EPSILON)) {
+ return 2;
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+static inline int vlr_check_intersect(Isect *is, ObjectInstanceRen *obi, VlakRen *vlr)
+{
+ /* for baking selected to active non-traceable materials might still
+ * be in the raytree */
+ if(!(vlr->mat->mode & MA_TRACEBLE))
+ return 0;
+
+ /* I know... cpu cycle waste, might do smarter once */
+ if(is->mode==RE_RAY_MIRROR)
+ return !(vlr->mat->mode & MA_ONLYCAST);
+ else
+ return (is->lay & obi->lay);
+}
+
+static inline int vlr_check_intersect_solid(Isect *is, ObjectInstanceRen* obi, VlakRen *vlr)
+{
+ /* solid material types only */
+ if (vlr->mat->material_type == MA_TYPE_SURFACE)
+ return 1;
+ else
+ return 0;
+}
+
+static inline int rayface_check_cullface(RayFace *face, Isect *is)
+{
+ float nor[3];
+
+ /* don't intersect if the ray faces along the face normal */
+ if(face->quad) CalcNormFloat4(face->v1, face->v2, face->v3, face->v4, nor);
+ else CalcNormFloat(face->v1, face->v2, face->v3, nor);
+
+ return (INPR(nor, is->vec) < 0);
+}
+
+/* ray - triangle or quad intersection */
+/* this function shall only modify Isect if it detects an hit */
+static int intersect_rayface(RayObject *hit_obj, RayFace *face, Isect *is)
+{
+ float co1[3],co2[3],co3[3],co4[3];
+ float x0,x1,x2,t00,t01,t02,t10,t11,t12,t20,t21,t22,r0,r1,r2;
+ float m0, m1, m2, divdet, det1;
+ float labda, u, v;
+ short ok=0;
+
+ if(is->orig.ob == face->ob && is->orig.face == face->face)
+ return 0;
+
+
+ if(is->skip & RE_SKIP_VLR_RENDER_CHECK)
+ {
+ if(vlr_check_intersect(is, (ObjectInstanceRen*)face->ob, (VlakRen*)face->face ) == 0)
+ return 0;
+ }
+ if(is->skip & RE_SKIP_VLR_NON_SOLID_MATERIAL)
+ {
+ if(vlr_check_intersect_solid(is, (ObjectInstanceRen*)face->ob, (VlakRen*)face->face) == 0)
+ return 0;
+ }
+ if(is->skip & RE_SKIP_CULLFACE)
+ {
+ if(rayface_check_cullface(face, is) == 0)
+ return 0;
+ }
+
+ RE_RC_COUNT(is->raycounter->faces.test);
+
+ //Load coords
+ VECCOPY(co1, face->v1);
+ VECCOPY(co2, face->v2);
+ if(RE_rayface_isQuad(face))
+ {
+ VECCOPY(co3, face->v4);
+ VECCOPY(co4, face->v3);
+ }
+ else
+ {
+ VECCOPY(co3, face->v3);
+ }
+
+ t00= co3[0]-co1[0];
+ t01= co3[1]-co1[1];
+ t02= co3[2]-co1[2];
+ t10= co3[0]-co2[0];
+ t11= co3[1]-co2[1];
+ t12= co3[2]-co2[2];
+
+ r0= is->vec[0];
+ r1= is->vec[1];
+ r2= is->vec[2];
+
+ x0= t12*r1-t11*r2;
+ x1= t10*r2-t12*r0;
+ x2= t11*r0-t10*r1;
+
+ divdet= t00*x0+t01*x1+t02*x2;
+
+ m0= is->start[0]-co3[0];
+ m1= is->start[1]-co3[1];
+ m2= is->start[2]-co3[2];
+ det1= m0*x0+m1*x1+m2*x2;
+
+ if(divdet!=0.0f) {
+
+ divdet= 1.0f/divdet;
+ u= det1*divdet;
+ if(u<ISECT_EPSILON && u>-(1.0f+ISECT_EPSILON)) {
+ float cros0, cros1, cros2;
+
+ cros0= m1*t02-m2*t01;
+ cros1= m2*t00-m0*t02;
+ cros2= m0*t01-m1*t00;
+ v= divdet*(cros0*r0 + cros1*r1 + cros2*r2);
+
+ if(v<ISECT_EPSILON && (u + v) > -(1.0f+ISECT_EPSILON)) {
+ labda= divdet*(cros0*t10 + cros1*t11 + cros2*t12);
+
+ if(labda>-ISECT_EPSILON && labda<is->labda) {
+ ok= 1;
+ }
+ }
+ }
+ }
+
+ if(ok==0 && RE_rayface_isQuad(face)) {
+
+ t20= co3[0]-co4[0];
+ t21= co3[1]-co4[1];
+ t22= co3[2]-co4[2];
+
+ divdet= t20*x0+t21*x1+t22*x2;
+ if(divdet!=0.0f) {
+ divdet= 1.0f/divdet;
+ u = det1*divdet;
+
+ if(u<ISECT_EPSILON && u>-(1.0f+ISECT_EPSILON)) {
+ float cros0, cros1, cros2;
+ cros0= m1*t22-m2*t21;
+ cros1= m2*t20-m0*t22;
+ cros2= m0*t21-m1*t20;
+ v= divdet*(cros0*r0 + cros1*r1 + cros2*r2);
+
+ if(v<ISECT_EPSILON && (u + v) >-(1.0f+ISECT_EPSILON)) {
+ labda= divdet*(cros0*t10 + cros1*t11 + cros2*t12);
+
+ if(labda>-ISECT_EPSILON && labda<is->labda) {
+ ok= 2;
+ }
+ }
+ }
+ }
+ }
+
+ if(ok) {
+
+ /* when a shadow ray leaves a face, it can be little outside the edges of it, causing
+ intersection to be detected in its neighbour face */
+ if(is->skip & RE_SKIP_VLR_NEIGHBOUR)
+ {
+ if(labda < 0.1f && is->orig.ob == face->ob)
+ {
+ VlakRen * a = (VlakRen*)is->orig.face;
+ VlakRen * b = (VlakRen*)face->face;
+
+ /* so there's a shared edge or vertex, let's intersect ray with face
+ itself, if that's true we can safely return 1, otherwise we assume
+ the intersection is invalid, 0 */
+ if(a->v1==b->v1 || a->v2==b->v1 || a->v3==b->v1 || a->v4==b->v1
+ || a->v1==b->v2 || a->v2==b->v2 || a->v3==b->v2 || a->v4==b->v2
+ || a->v1==b->v3 || a->v2==b->v3 || a->v3==b->v3 || a->v4==b->v3
+ || (b->v4 && (a->v1==b->v4 || a->v2==b->v4 || a->v3==b->v4 || a->v4==b->v4)))
+ if(!intersection2((VlakRen*)a, -r0, -r1, -r2, is->start[0], is->start[1], is->start[2]))
+ {
+ return 0;
+ }
+ }
+ }
+
+ RE_RC_COUNT(is->raycounter->faces.hit);
+
+ is->isect= ok; // wich half of the quad
+ is->labda= labda;
+ is->u= u; is->v= v;
+
+ is->hit.ob = face->ob;
+ is->hit.face = face->face;
+#ifdef RT_USE_LAST_HIT
+ is->last_hit = hit_obj;
+#endif
+ return 1;
+ }
+
+ return 0;
+}
+
+RayObject* RE_rayface_from_vlak(RayFace *rayface, ObjectInstanceRen *obi, VlakRen *vlr)
+{
+ return RE_rayface_from_coords(rayface, obi, vlr, vlr->v1->co, vlr->v2->co, vlr->v3->co, vlr->v4 ? vlr->v4->co : 0 );
+}
+
+RayObject* RE_rayface_from_coords(RayFace *rayface, void *ob, void *face, float *v1, float *v2, float *v3, float *v4)
+{
+ rayface->ob = ob;
+ rayface->face = face;
+
+ VECCOPY(rayface->v1, v1);
+ VECCOPY(rayface->v2, v2);
+ VECCOPY(rayface->v3, v3);
+ if(v4)
+ {
+ VECCOPY(rayface->v4, v4);
+ rayface->quad = 1;
+ }
+ else
+ {
+ rayface->quad = 0;
+ }
+
+ return RE_rayobject_unalignRayFace(rayface);
+}
+
+RayObject* RE_vlakprimitive_from_vlak(VlakPrimitive *face, struct ObjectInstanceRen *obi, struct VlakRen *vlr)
+{
+ face->ob = obi;
+ face->face = vlr;
+ return RE_rayobject_unalignVlakPrimitive(face);
+}
+
+
+int RE_rayobject_raycast(RayObject *r, Isect *isec)
+{
+ int i;
+ RE_RC_COUNT(isec->raycounter->raycast.test);
+
+ /* Setup vars used on raycast */
+ isec->dist = VecLength(isec->vec);
+
+ for(i=0; i<3; i++)
+ {
+ isec->idot_axis[i] = 1.0f / isec->vec[i];
+
+ isec->bv_index[2*i] = isec->idot_axis[i] < 0.0 ? 1 : 0;
+ isec->bv_index[2*i+1] = 1 - isec->bv_index[2*i];
+
+ isec->bv_index[2*i] = i+3*isec->bv_index[2*i];
+ isec->bv_index[2*i+1] = i+3*isec->bv_index[2*i+1];
+ }
+
+#ifdef RT_USE_LAST_HIT
+ /* Last hit heuristic */
+ if(isec->mode==RE_RAY_SHADOW && isec->last_hit)
+ {
+ RE_RC_COUNT(isec->raycounter->rayshadow_last_hit.test);
+
+ if(RE_rayobject_intersect(isec->last_hit, isec))
+ {
+ RE_RC_COUNT(isec->raycounter->raycast.hit);
+ RE_RC_COUNT(isec->raycounter->rayshadow_last_hit.hit);
+ return 1;
+ }
+ }
+#endif
+
+#ifdef RT_USE_HINT
+ isec->hit_hint = 0;
+#endif
+
+ if(RE_rayobject_intersect(r, isec))
+ {
+ RE_RC_COUNT(isec->raycounter->raycast.hit);
+
+#ifdef RT_USE_HINT
+ isec->hint = isec->hit_hint;
+#endif
+ return 1;
+ }
+ return 0;
+}
+
+int RE_rayobject_intersect(RayObject *r, Isect *i)
+{
+ if(RE_rayobject_isRayFace(r))
+ {
+ return intersect_rayface(r, (RayFace*) RE_rayobject_align(r), i);
+ }
+ else if(RE_rayobject_isVlakPrimitive(r))
+ {
+ //TODO optimize (useless copy to RayFace to avoid duplicate code)
+ VlakPrimitive *face = (VlakPrimitive*) RE_rayobject_align(r);
+ RayFace nface;
+ RE_rayface_from_vlak(&nface, face->ob, face->face);
+
+ if(face->ob->transform_primitives)
+ {
+ Mat4MulVecfl(face->ob->mat, nface.v1);
+ Mat4MulVecfl(face->ob->mat, nface.v2);
+ Mat4MulVecfl(face->ob->mat, nface.v3);
+ if(RE_rayface_isQuad(&nface))
+ Mat4MulVecfl(face->ob->mat, nface.v4);
+ }
+
+ return intersect_rayface(r, &nface, i);
+ }
+ else if(RE_rayobject_isRayAPI(r))
+ {
+ r = RE_rayobject_align( r );
+ return r->api->raycast( r, i );
+ }
+ else assert(0);
+}
+
+void RE_rayobject_add(RayObject *r, RayObject *o)
+{
+ r = RE_rayobject_align( r );
+ return r->api->add( r, o );
+}
+
+void RE_rayobject_done(RayObject *r)
+{
+ r = RE_rayobject_align( r );
+ r->api->done( r );
+}
+
+void RE_rayobject_free(RayObject *r)
+{
+ r = RE_rayobject_align( r );
+ r->api->free( r );
+}
+
+void RE_rayobject_merge_bb(RayObject *r, float *min, float *max)
+{
+ if(RE_rayobject_isRayFace(r))
+ {
+ RayFace *face = (RayFace*) RE_rayobject_align(r);
+
+ DO_MINMAX( face->v1, min, max );
+ DO_MINMAX( face->v2, min, max );
+ DO_MINMAX( face->v3, min, max );
+ if(RE_rayface_isQuad(face)) DO_MINMAX( face->v4, min, max );
+ }
+ else if(RE_rayobject_isVlakPrimitive(r))
+ {
+ VlakPrimitive *face = (VlakPrimitive*) RE_rayobject_align(r);
+ VlakRen *vlr = face->face;
+
+ DO_MINMAX( vlr->v1->co, min, max );
+ DO_MINMAX( vlr->v2->co, min, max );
+ DO_MINMAX( vlr->v3->co, min, max );
+ if(vlr->v4) DO_MINMAX( vlr->v4->co, min, max );
+ }
+ else if(RE_rayobject_isRayAPI(r))
+ {
+ r = RE_rayobject_align( r );
+ r->api->bb( r, min, max );
+ }
+ else assert(0);
+}
+
+float RE_rayobject_cost(RayObject *r)
+{
+ if(RE_rayobject_isRayFace(r) || RE_rayobject_isVlakPrimitive(r))
+ {
+ return 1.0;
+ }
+ else if(RE_rayobject_isRayAPI(r))
+ {
+ r = RE_rayobject_align( r );
+ return r->api->cost( r );
+ }
+ else assert(0);
+}
+
+void RE_rayobject_hint_bb(RayObject *r, RayHint *hint, float *min, float *max)
+{
+ if(RE_rayobject_isRayFace(r) || RE_rayobject_isVlakPrimitive(r))
+ {
+ return;
+ }
+ else if(RE_rayobject_isRayAPI(r))
+ {
+ r = RE_rayobject_align( r );
+ return r->api->hint_bb( r, hint, min, max );
+ }
+ else assert(0);
+}
+
+int RE_rayobjectcontrol_test_break(RayObjectControl *control)
+{
+ if(control->test_break)
+ return control->test_break( control->data );
+
+ return 0;
+}
+
+
+/*
+ * Empty raytree
+ */
+static int RE_rayobject_empty_intersect(RayObject *o, Isect *is)
+{
+ return 0;
+}
+
+static void RE_rayobject_empty_free(RayObject *o)
+{
+}
+
+static void RE_rayobject_empty_bb(RayObject *o, float *min, float *max)
+{
+ return;
+}
+
+static float RE_rayobject_empty_cost(RayObject *o)
+{
+ return 0.0;
+}
+
+static void RE_rayobject_empty_hint_bb(RayObject *o, RayHint *hint, float *min, float *max)
+{}
+
+static RayObjectAPI empty_api =
+{
+ RE_rayobject_empty_intersect,
+ NULL, //static void RE_rayobject_instance_add(RayObject *o, RayObject *ob);
+ NULL, //static void RE_rayobject_instance_done(RayObject *o);
+ RE_rayobject_empty_free,
+ RE_rayobject_empty_bb,
+ RE_rayobject_empty_cost,
+ RE_rayobject_empty_hint_bb
+};
+
+static RayObject empty_raytree = { &empty_api, {0, 0} };
+
+RayObject *RE_rayobject_empty_create()
+{
+ return RE_rayobject_unalignRayAPI( &empty_raytree );
+}
diff --git a/source/blender/render/intern/raytrace/rayobject_hint.h b/source/blender/render/intern/raytrace/rayobject_hint.h
new file mode 100644
index 00000000000..d85465aec66
--- /dev/null
+++ b/source/blender/render/intern/raytrace/rayobject_hint.h
@@ -0,0 +1,70 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2009 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): André Pinto.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#ifndef RE_RAYTRACE_RAYOBJECT_HINT_H
+#define RE_RAYTRACE_RAYOBJECT_HINT_H
+
+#define HINT_RECURSE 1
+#define HINT_ACCEPT 0
+#define HINT_DISCARD -1
+
+struct HintBB
+{
+ float bb[6];
+};
+
+inline int hint_test_bb(HintBB *obj, float *Nmin, float *Nmax)
+{
+ if(bb_fits_inside( Nmin, Nmax, obj->bb, obj->bb+3 ) )
+ return HINT_RECURSE;
+ else
+ return HINT_ACCEPT;
+}
+/*
+struct HintFrustum
+{
+ float co[3];
+ float no[4][3];
+};
+
+inline int hint_test_bb(HintFrustum &obj, float *Nmin, float *Nmax)
+{
+ //if frustum inside BB
+ {
+ return HINT_RECURSE;
+ }
+ //if BB outside frustum
+ {
+ return HINT_DISCARD;
+ }
+
+ return HINT_ACCEPT;
+}
+*/
+
+#endif
diff --git a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp
new file mode 100644
index 00000000000..2719675e3b8
--- /dev/null
+++ b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp
@@ -0,0 +1,149 @@
+/**
+ * $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.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): André Pinto.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#include "vbvh.h"
+#include "svbvh.h"
+#include "reorganize.h"
+
+#ifdef __SSE__
+
+#define DFS_STACK_SIZE 256
+
+struct QBVHTree
+{
+ RayObject rayobj;
+
+ SVBVHNode *root;
+ MemArena *node_arena;
+
+ float cost;
+ RTBuilder *builder;
+};
+
+
+template<>
+void bvh_done<QBVHTree>(QBVHTree *obj)
+{
+ rtbuild_done(obj->builder, &obj->rayobj.control);
+
+ //TODO find a away to exactly calculate the needed memory
+ MemArena *arena1 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ BLI_memarena_use_malloc(arena1);
+
+ MemArena *arena2 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ BLI_memarena_use_malloc(arena2);
+ BLI_memarena_use_align(arena2, 16);
+
+ //Build and optimize the tree
+ //TODO do this in 1 pass (half memory usage during building)
+ VBVHNode *root = BuildBinaryVBVH<VBVHNode>(arena1, &obj->rayobj.control).transform(obj->builder);
+
+ if(RE_rayobjectcontrol_test_break(&obj->rayobj.control))
+ {
+ BLI_memarena_free(arena1);
+ BLI_memarena_free(arena2);
+ return;
+ }
+
+ pushup_simd<VBVHNode,4>(root);
+ obj->root = Reorganize_SVBVH<VBVHNode>(arena2).transform(root);
+
+ //Cleanup
+ BLI_memarena_free(arena1);
+
+ rtbuild_free( obj->builder );
+ obj->builder = NULL;
+
+ obj->node_arena = arena2;
+ obj->cost = 1.0;
+}
+
+
+template<int StackSize>
+int intersect(QBVHTree *obj, Isect* isec)
+{
+ //TODO renable hint support
+ if(RE_rayobject_isAligned(obj->root))
+ return bvh_node_stack_raycast<SVBVHNode,StackSize,false>( obj->root, isec);
+ else
+ return RE_rayobject_intersect( (RayObject*) obj->root, isec );
+}
+
+template<class Tree>
+void bvh_hint_bb(Tree *tree, LCTSHint *hint, float *min, float *max)
+{
+ //TODO renable hint support
+ {
+ hint->size = 0;
+ hint->stack[hint->size++] = (RayObject*)tree->root;
+ }
+}
+/* the cast to pointer function is needed to workarround gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11407 */
+template<class Tree, int STACK_SIZE>
+RayObjectAPI make_api()
+{
+ static RayObjectAPI api =
+ {
+ (RE_rayobject_raycast_callback) ((int(*)(Tree*,Isect*)) &intersect<STACK_SIZE>),
+ (RE_rayobject_add_callback) ((void(*)(Tree*,RayObject*)) &bvh_add<Tree>),
+ (RE_rayobject_done_callback) ((void(*)(Tree*)) &bvh_done<Tree>),
+ (RE_rayobject_free_callback) ((void(*)(Tree*)) &bvh_free<Tree>),
+ (RE_rayobject_merge_bb_callback)((void(*)(Tree*,float*,float*)) &bvh_bb<Tree>),
+ (RE_rayobject_cost_callback) ((float(*)(Tree*)) &bvh_cost<Tree>),
+ (RE_rayobject_hint_bb_callback) ((void(*)(Tree*,LCTSHint*,float*,float*)) &bvh_hint_bb<Tree>)
+ };
+
+ return api;
+}
+
+template<class Tree>
+RayObjectAPI* bvh_get_api(int maxstacksize)
+{
+ static RayObjectAPI bvh_api256 = make_api<Tree,1024>();
+
+ if(maxstacksize <= 1024) return &bvh_api256;
+ assert(maxstacksize <= 256);
+ return 0;
+}
+
+
+RayObject *RE_rayobject_qbvh_create(int size)
+{
+ return bvh_create_tree<QBVHTree,DFS_STACK_SIZE>(size);
+}
+
+
+#else
+
+RayObject *RE_rayobject_qbvh_create(int size)
+{
+ puts("WARNING: SSE disabled at compile time\n");
+ return NULL;
+}
+
+#endif
diff --git a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
new file mode 100644
index 00000000000..a16499d4f91
--- /dev/null
+++ b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
@@ -0,0 +1,496 @@
+/**
+ * $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.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): André Pinto.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#include <assert.h>
+#include <math.h>
+#include <stdlib.h>
+#include <algorithm>
+
+#include "rayobject_rtbuild.h"
+#include "MEM_guardedalloc.h"
+#include "BLI_arithb.h"
+#include "BKE_utildefines.h"
+
+static bool selected_node(RTBuilder::Object *node)
+{
+ return node->selected;
+}
+
+static void rtbuild_init(RTBuilder *b)
+{
+ b->split_axis = -1;
+ b->primitives.begin = 0;
+ b->primitives.end = 0;
+ b->primitives.maxsize = 0;
+
+ for(int i=0; i<RTBUILD_MAX_CHILDS; i++)
+ b->child_offset[i] = 0;
+
+ for(int i=0; i<3; i++)
+ b->sorted_begin[i] = b->sorted_end[i] = 0;
+
+ INIT_MINMAX(b->bb, b->bb+3);
+}
+
+RTBuilder* rtbuild_create(int size)
+{
+ RTBuilder *builder = (RTBuilder*) MEM_mallocN( sizeof(RTBuilder), "RTBuilder" );
+ RTBuilder::Object *memblock= (RTBuilder::Object*)MEM_mallocN( sizeof(RTBuilder::Object)*size,"RTBuilder.objects");
+
+
+ rtbuild_init(builder);
+
+ builder->primitives.begin = builder->primitives.end = memblock;
+ builder->primitives.maxsize = size;
+
+ for(int i=0; i<3; i++)
+ {
+ builder->sorted_begin[i] = (RTBuilder::Object**)MEM_mallocN( sizeof(RTBuilder::Object*)*size,"RTBuilder.sorted_objects");
+ builder->sorted_end[i] = builder->sorted_begin[i];
+ }
+
+
+ return builder;
+}
+
+void rtbuild_free(RTBuilder *b)
+{
+ if(b->primitives.begin) MEM_freeN(b->primitives.begin);
+
+ for(int i=0; i<3; i++)
+ if(b->sorted_begin[i])
+ MEM_freeN(b->sorted_begin[i]);
+
+ MEM_freeN(b);
+}
+
+void rtbuild_add(RTBuilder *b, RayObject *o)
+{
+ assert( b->primitives.begin + b->primitives.maxsize != b->primitives.end );
+
+ b->primitives.end->obj = o;
+ b->primitives.end->cost = RE_rayobject_cost(o);
+
+ INIT_MINMAX(b->primitives.end->bb, b->primitives.end->bb+3);
+ RE_rayobject_merge_bb(o, b->primitives.end->bb, b->primitives.end->bb+3);
+
+ for(int i=0; i<3; i++)
+ {
+ *(b->sorted_end[i]) = b->primitives.end;
+ b->sorted_end[i]++;
+ }
+ b->primitives.end++;
+}
+
+int rtbuild_size(RTBuilder *b)
+{
+ return b->sorted_end[0] - b->sorted_begin[0];
+}
+
+
+template<class Obj,int Axis>
+static bool obj_bb_compare(const Obj &a, const Obj &b)
+{
+ if(a->bb[Axis] != b->bb[Axis])
+ return a->bb[Axis] < b->bb[Axis];
+ return a->obj < b->obj;
+}
+
+template<class Item>
+static void object_sort(Item *begin, Item *end, int axis)
+{
+ if(axis == 0) return std::sort(begin, end, obj_bb_compare<Item,0> );
+ if(axis == 1) return std::sort(begin, end, obj_bb_compare<Item,1> );
+ if(axis == 2) return std::sort(begin, end, obj_bb_compare<Item,2> );
+ assert(false);
+}
+
+void rtbuild_done(RTBuilder *b, RayObjectControl* ctrl)
+{
+ for(int i=0; i<3; i++)
+ if(b->sorted_begin[i])
+ {
+ if(RE_rayobjectcontrol_test_break(ctrl)) break;
+ object_sort( b->sorted_begin[i], b->sorted_end[i], i );
+ }
+}
+
+RayObject* rtbuild_get_primitive(RTBuilder *b, int index)
+{
+ return b->sorted_begin[0][index]->obj;
+}
+
+RTBuilder* rtbuild_get_child(RTBuilder *b, int child, RTBuilder *tmp)
+{
+ rtbuild_init( tmp );
+
+ for(int i=0; i<3; i++)
+ if(b->sorted_begin[i])
+ {
+ tmp->sorted_begin[i] = b->sorted_begin[i] + b->child_offset[child ];
+ tmp->sorted_end [i] = b->sorted_begin[i] + b->child_offset[child+1];
+ }
+ else
+ {
+ tmp->sorted_begin[i] = 0;
+ tmp->sorted_end [i] = 0;
+ }
+
+ return tmp;
+}
+
+void rtbuild_calc_bb(RTBuilder *b)
+{
+ if(b->bb[0] == 1.0e30f)
+ {
+ for(RTBuilder::Object **index = b->sorted_begin[0]; index != b->sorted_end[0]; index++)
+ RE_rayobject_merge_bb( (*index)->obj , b->bb, b->bb+3);
+ }
+}
+
+void rtbuild_merge_bb(RTBuilder *b, float *min, float *max)
+{
+ rtbuild_calc_bb(b);
+ DO_MIN(b->bb, min);
+ DO_MAX(b->bb+3, max);
+}
+
+/*
+int rtbuild_get_largest_axis(RTBuilder *b)
+{
+ rtbuild_calc_bb(b);
+ return bb_largest_axis(b->bb, b->bb+3);
+}
+
+//Left balanced tree
+int rtbuild_mean_split(RTBuilder *b, int nchilds, int axis)
+{
+ int i;
+ int mleafs_per_child, Mleafs_per_child;
+ int tot_leafs = rtbuild_size(b);
+ int missing_leafs;
+
+ long long s;
+
+ assert(nchilds <= RTBUILD_MAX_CHILDS);
+
+ //TODO optimize calc of leafs_per_child
+ for(s=nchilds; s<tot_leafs; s*=nchilds);
+ Mleafs_per_child = s/nchilds;
+ mleafs_per_child = Mleafs_per_child/nchilds;
+
+ //split min leafs per child
+ b->child_offset[0] = 0;
+ for(i=1; i<=nchilds; i++)
+ b->child_offset[i] = mleafs_per_child;
+
+ //split remaining leafs
+ missing_leafs = tot_leafs - mleafs_per_child*nchilds;
+ for(i=1; i<=nchilds; i++)
+ {
+ if(missing_leafs > Mleafs_per_child - mleafs_per_child)
+ {
+ b->child_offset[i] += Mleafs_per_child - mleafs_per_child;
+ missing_leafs -= Mleafs_per_child - mleafs_per_child;
+ }
+ else
+ {
+ b->child_offset[i] += missing_leafs;
+ missing_leafs = 0;
+ break;
+ }
+ }
+
+ //adjust for accumulative offsets
+ for(i=1; i<=nchilds; i++)
+ b->child_offset[i] += b->child_offset[i-1];
+
+ //Count created childs
+ for(i=nchilds; b->child_offset[i] == b->child_offset[i-1]; i--);
+ split_leafs(b, b->child_offset, i, axis);
+
+ assert( b->child_offset[0] == 0 && b->child_offset[i] == tot_leafs );
+ return i;
+}
+
+
+int rtbuild_mean_split_largest_axis(RTBuilder *b, int nchilds)
+{
+ int axis = rtbuild_get_largest_axis(b);
+ return rtbuild_mean_split(b, nchilds, axis);
+}
+*/
+
+/*
+ * "separators" is an array of dim NCHILDS-1
+ * and indicates where to cut the childs
+ */
+/*
+int rtbuild_median_split(RTBuilder *b, float *separators, int nchilds, int axis)
+{
+ int size = rtbuild_size(b);
+
+ assert(nchilds <= RTBUILD_MAX_CHILDS);
+ if(size <= nchilds)
+ {
+ return rtbuild_mean_split(b, nchilds, axis);
+ }
+ else
+ {
+ int i;
+
+ b->split_axis = axis;
+
+ //Calculate child offsets
+ b->child_offset[0] = 0;
+ for(i=0; i<nchilds-1; i++)
+ b->child_offset[i+1] = split_leafs_by_plane(b, b->child_offset[i], size, separators[i]);
+ b->child_offset[nchilds] = size;
+
+ for(i=0; i<nchilds; i++)
+ if(b->child_offset[i+1] - b->child_offset[i] == size)
+ return rtbuild_mean_split(b, nchilds, axis);
+
+ return nchilds;
+ }
+}
+
+int rtbuild_median_split_largest_axis(RTBuilder *b, int nchilds)
+{
+ int la, i;
+ float separators[RTBUILD_MAX_CHILDS];
+
+ rtbuild_calc_bb(b);
+
+ la = bb_largest_axis(b->bb,b->bb+3);
+ for(i=1; i<nchilds; i++)
+ separators[i-1] = (b->bb[la+3]-b->bb[la])*i / nchilds;
+
+ return rtbuild_median_split(b, separators, nchilds, la);
+}
+*/
+
+//Heuristics Object Splitter
+
+
+struct SweepCost
+{
+ float bb[6];
+ float cost;
+};
+
+/* Object Surface Area Heuristic splitter */
+int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds)
+{
+ int size = rtbuild_size(b);
+ assert(nchilds == 2);
+ assert(size > 1);
+ int baxis = -1, boffset = 0;
+
+ if(size > nchilds)
+ {
+ float bcost = FLT_MAX;
+ baxis = -1, boffset = size/2;
+
+ SweepCost *sweep = (SweepCost*)MEM_mallocN( sizeof(SweepCost)*size, "RTBuilder.HeuristicSweep" );
+
+ for(int axis=0; axis<3; axis++)
+ {
+ SweepCost sweep_left;
+
+ RTBuilder::Object **obj = b->sorted_begin[axis];
+
+// float right_cost = 0;
+ for(int i=size-1; i>=0; i--)
+ {
+ if(i == size-1)
+ {
+ VECCOPY(sweep[i].bb, obj[i]->bb);
+ VECCOPY(sweep[i].bb+3, obj[i]->bb+3);
+ sweep[i].cost = obj[i]->cost;
+ }
+ else
+ {
+ sweep[i].bb[0] = MIN2(obj[i]->bb[0], sweep[i+1].bb[0]);
+ sweep[i].bb[1] = MIN2(obj[i]->bb[1], sweep[i+1].bb[1]);
+ sweep[i].bb[2] = MIN2(obj[i]->bb[2], sweep[i+1].bb[2]);
+ sweep[i].bb[3] = MAX2(obj[i]->bb[3], sweep[i+1].bb[3]);
+ sweep[i].bb[4] = MAX2(obj[i]->bb[4], sweep[i+1].bb[4]);
+ sweep[i].bb[5] = MAX2(obj[i]->bb[5], sweep[i+1].bb[5]);
+ sweep[i].cost = obj[i]->cost + sweep[i+1].cost;
+ }
+// right_cost += obj[i]->cost;
+ }
+
+ sweep_left.bb[0] = obj[0]->bb[0];
+ sweep_left.bb[1] = obj[0]->bb[1];
+ sweep_left.bb[2] = obj[0]->bb[2];
+ sweep_left.bb[3] = obj[0]->bb[3];
+ sweep_left.bb[4] = obj[0]->bb[4];
+ sweep_left.bb[5] = obj[0]->bb[5];
+ sweep_left.cost = obj[0]->cost;
+
+// right_cost -= obj[0]->cost; if(right_cost < 0) right_cost = 0;
+
+ for(int i=1; i<size; i++)
+ {
+ //Worst case heuristic (cost of each child is linear)
+ float hcost, left_side, right_side;
+
+ left_side = bb_area(sweep_left.bb, sweep_left.bb+3)*(sweep_left.cost+logf((float)i));
+ right_side= bb_area(sweep[i].bb, sweep[i].bb+3)*(sweep[i].cost+logf((float)size-i));
+ hcost = left_side+right_side;
+
+ assert(left_side >= 0);
+ assert(right_side >= 0);
+
+ if(left_side > bcost) break; //No way we can find a better heuristic in this axis
+
+ assert(hcost >= 0);
+ if( hcost < bcost
+ || (hcost == bcost && axis < baxis)) //this makes sure the tree built is the same whatever is the order of the sorting axis
+ {
+ bcost = hcost;
+ baxis = axis;
+ boffset = i;
+ }
+ DO_MIN( obj[i]->bb, sweep_left.bb );
+ DO_MAX( obj[i]->bb+3, sweep_left.bb+3 );
+
+ sweep_left.cost += obj[i]->cost;
+// right_cost -= obj[i]->cost; if(right_cost < 0) right_cost = 0;
+ }
+
+ assert(baxis >= 0 && baxis < 3);
+ }
+
+
+ MEM_freeN(sweep);
+ }
+ else if(size == 2)
+ {
+ baxis = 0;
+ boffset = 1;
+ }
+ else if(size == 1)
+ {
+ b->child_offset[0] = 0;
+ b->child_offset[1] = 1;
+ return 1;
+ }
+
+ b->child_offset[0] = 0;
+ b->child_offset[1] = boffset;
+ b->child_offset[2] = size;
+
+
+ /* Adjust sorted arrays for childs */
+ for(int i=0; i<boffset; i++) b->sorted_begin[baxis][i]->selected = true;
+ for(int i=boffset; i<size; i++) b->sorted_begin[baxis][i]->selected = false;
+ for(int i=0; i<3; i++)
+ std::stable_partition( b->sorted_begin[i], b->sorted_end[i], selected_node );
+
+ return nchilds;
+}
+
+/*
+ * Helper code
+ * PARTITION code / used on mean-split
+ * basicly this a std::nth_element (like on C++ STL algorithm)
+ */
+/*
+static void split_leafs(RTBuilder *b, int *nth, int partitions, int split_axis)
+{
+ int i;
+ b->split_axis = split_axis;
+
+ for(i=0; i < partitions-1; i++)
+ {
+ assert(nth[i] < nth[i+1] && nth[i+1] < nth[partitions]);
+
+ if(split_axis == 0) std::nth_element(b, nth[i], nth[i+1], nth[partitions], obj_bb_compare<RTBuilder::Object,0>);
+ if(split_axis == 1) std::nth_element(b, nth[i], nth[i+1], nth[partitions], obj_bb_compare<RTBuilder::Object,1>);
+ if(split_axis == 2) std::nth_element(b, nth[i], nth[i+1], nth[partitions], obj_bb_compare<RTBuilder::Object,2>);
+ }
+}
+*/
+
+/*
+ * Bounding Box utils
+ */
+float bb_volume(float *min, float *max)
+{
+ return (max[0]-min[0])*(max[1]-min[1])*(max[2]-min[2]);
+}
+
+float bb_area(float *min, float *max)
+{
+ float sub[3], a;
+ sub[0] = max[0]-min[0];
+ sub[1] = max[1]-min[1];
+ sub[2] = max[2]-min[2];
+
+ a = (sub[0]*sub[1] + sub[0]*sub[2] + sub[1]*sub[2])*2;
+ assert(a >= 0.0);
+ return a;
+}
+
+int bb_largest_axis(float *min, float *max)
+{
+ float sub[3];
+
+ sub[0] = max[0]-min[0];
+ sub[1] = max[1]-min[1];
+ sub[2] = max[2]-min[2];
+ if(sub[0] > sub[1])
+ {
+ if(sub[0] > sub[2])
+ return 0;
+ else
+ return 2;
+ }
+ else
+ {
+ if(sub[1] > sub[2])
+ return 1;
+ else
+ return 2;
+ }
+}
+
+int bb_fits_inside(float *outer_min, float *outer_max, float *inner_min, float *inner_max)
+{
+ int i;
+ for(i=0; i<3; i++)
+ if(outer_min[i] > inner_min[i]) return 0;
+
+ for(i=0; i<3; i++)
+ if(outer_max[i] < inner_max[i]) return 0;
+
+ return 1;
+}
diff --git a/source/blender/render/intern/raytrace/rayobject_rtbuild.h b/source/blender/render/intern/raytrace/rayobject_rtbuild.h
new file mode 100644
index 00000000000..71665681586
--- /dev/null
+++ b/source/blender/render/intern/raytrace/rayobject_rtbuild.h
@@ -0,0 +1,121 @@
+/**
+ * $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.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): André Pinto.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#ifndef RE_RAYOBJECT_RTBUILD_H
+#define RE_RAYOBJECT_RTBUILD_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "rayobject.h"
+
+
+/*
+ * Ray Tree Builder
+ * this structs helps building any type of tree
+ * it contains several methods to organiza/split nodes
+ * allowing to create a given tree on the fly.
+ *
+ * Idea is that other trees BVH, BIH can use this code to
+ * generate with simple calls, and then convert to the theirs
+ * specific structure on the fly.
+ */
+#define RTBUILD_MAX_CHILDS 32
+
+
+typedef struct RTBuilder
+{
+ struct Object
+ {
+ RayObject *obj;
+ float cost;
+ float bb[6];
+ int selected;
+ };
+
+ /* list to all primitives added in this tree */
+ struct
+ {
+ Object *begin, *end;
+ int maxsize;
+ } primitives;
+
+ /* sorted list of rayobjects */
+ struct Object **sorted_begin[3], **sorted_end[3];
+
+ /* axis used (if any) on the split method */
+ int split_axis;
+
+ /* child partitions calculated during splitting */
+ int child_offset[RTBUILD_MAX_CHILDS+1];
+
+// int child_sorted_axis; /* -1 if not sorted */
+
+ float bb[6];
+
+} RTBuilder;
+
+/* used during creation */
+RTBuilder* rtbuild_create(int size);
+void rtbuild_free(RTBuilder *b);
+void rtbuild_add(RTBuilder *b, RayObject *o);
+void rtbuild_done(RTBuilder *b, RayObjectControl *c);
+void rtbuild_merge_bb(RTBuilder *b, float *min, float *max);
+int rtbuild_size(RTBuilder *b);
+
+RayObject* rtbuild_get_primitive(RTBuilder *b, int offset);
+
+/* used during tree reorganization */
+RTBuilder* rtbuild_get_child(RTBuilder *b, int child, RTBuilder *tmp);
+
+/* Calculates child partitions and returns number of efectively needed partitions */
+int rtbuild_get_largest_axis(RTBuilder *b);
+
+//Object partition
+int rtbuild_mean_split(RTBuilder *b, int nchilds, int axis);
+int rtbuild_mean_split_largest_axis(RTBuilder *b, int nchilds);
+
+int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds);
+
+//Space partition
+int rtbuild_median_split(RTBuilder *b, float *separators, int nchilds, int axis);
+int rtbuild_median_split_largest_axis(RTBuilder *b, int nchilds);
+
+
+/* bb utils */
+float bb_area(float *min, float *max);
+float bb_volume(float *min, float *max);
+int bb_largest_axis(float *min, float *max);
+int bb_fits_inside(float *outer_min, float *outer_max, float *inner_min, float *inner_max); /* only returns 0 if merging inner and outerbox would create a box larger than outer box */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/source/blender/render/intern/raytrace/rayobject_svbvh.cpp b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp
new file mode 100644
index 00000000000..a877b91e2ff
--- /dev/null
+++ b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp
@@ -0,0 +1,181 @@
+/**
+ * $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.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): André Pinto.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#include "vbvh.h"
+#include "svbvh.h"
+#include "reorganize.h"
+
+#ifdef __SSE__
+
+#define DFS_STACK_SIZE 256
+
+struct SVBVHTree
+{
+ RayObject rayobj;
+
+ SVBVHNode *root;
+ MemArena *node_arena;
+
+ float cost;
+ RTBuilder *builder;
+};
+
+/*
+ * Cost to test N childs
+ */
+struct PackCost
+{
+ float operator()(int n)
+ {
+ return (n / 4) + ((n % 4) > 2 ? 1 : n%4);
+ }
+};
+
+
+template<>
+void bvh_done<SVBVHTree>(SVBVHTree *obj)
+{
+ rtbuild_done(obj->builder, &obj->rayobj.control);
+
+ //TODO find a away to exactly calculate the needed memory
+ MemArena *arena1 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ BLI_memarena_use_malloc(arena1);
+
+ MemArena *arena2 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ BLI_memarena_use_malloc(arena2);
+ BLI_memarena_use_align(arena2, 16);
+
+ //Build and optimize the tree
+ if(0)
+ {
+ VBVHNode *root = BuildBinaryVBVH<VBVHNode>(arena1,&obj->rayobj.control).transform(obj->builder);
+ if(RE_rayobjectcontrol_test_break(&obj->rayobj.control))
+ {
+ BLI_memarena_free(arena1);
+ BLI_memarena_free(arena2);
+ return;
+ }
+
+ reorganize(root);
+ remove_useless(root, &root);
+ bvh_refit(root);
+
+ pushup(root);
+ pushdown(root);
+ pushup_simd<VBVHNode,4>(root);
+
+ obj->root = Reorganize_SVBVH<VBVHNode>(arena2).transform(root);
+ }
+ else
+ {
+ //Finds the optimal packing of this tree using a given cost model
+ //TODO this uses quite a lot of memory, find ways to reduce memory usage during building
+ OVBVHNode *root = BuildBinaryVBVH<OVBVHNode>(arena1,&obj->rayobj.control).transform(obj->builder);
+ if(RE_rayobjectcontrol_test_break(&obj->rayobj.control))
+ {
+ BLI_memarena_free(arena1);
+ BLI_memarena_free(arena2);
+ return;
+ }
+
+ VBVH_optimalPackSIMD<OVBVHNode,PackCost>(PackCost()).transform(root);
+ obj->root = Reorganize_SVBVH<OVBVHNode>(arena2).transform(root);
+ }
+
+
+ //Free data
+ BLI_memarena_free(arena1);
+
+ obj->node_arena = arena2;
+ obj->cost = 1.0;
+
+
+ rtbuild_free( obj->builder );
+ obj->builder = NULL;
+}
+
+template<int StackSize>
+int intersect(SVBVHTree *obj, Isect* isec)
+{
+ //TODO renable hint support
+ if(RE_rayobject_isAligned(obj->root))
+ return bvh_node_stack_raycast<SVBVHNode,StackSize,false>( obj->root, isec);
+ else
+ return RE_rayobject_intersect( (RayObject*) obj->root, isec );
+}
+
+template<class Tree>
+void bvh_hint_bb(Tree *tree, LCTSHint *hint, float *min, float *max)
+{
+ //TODO renable hint support
+ {
+ hint->size = 0;
+ hint->stack[hint->size++] = (RayObject*)tree->root;
+ }
+}
+/* the cast to pointer function is needed to workarround gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11407 */
+template<class Tree, int STACK_SIZE>
+RayObjectAPI make_api()
+{
+ static RayObjectAPI api =
+ {
+ (RE_rayobject_raycast_callback) ((int(*)(Tree*,Isect*)) &intersect<STACK_SIZE>),
+ (RE_rayobject_add_callback) ((void(*)(Tree*,RayObject*)) &bvh_add<Tree>),
+ (RE_rayobject_done_callback) ((void(*)(Tree*)) &bvh_done<Tree>),
+ (RE_rayobject_free_callback) ((void(*)(Tree*)) &bvh_free<Tree>),
+ (RE_rayobject_merge_bb_callback)((void(*)(Tree*,float*,float*)) &bvh_bb<Tree>),
+ (RE_rayobject_cost_callback) ((float(*)(Tree*)) &bvh_cost<Tree>),
+ (RE_rayobject_hint_bb_callback) ((void(*)(Tree*,LCTSHint*,float*,float*)) &bvh_hint_bb<Tree>)
+ };
+
+ return api;
+}
+
+template<class Tree>
+RayObjectAPI* bvh_get_api(int maxstacksize)
+{
+ static RayObjectAPI bvh_api256 = make_api<Tree,1024>();
+
+ if(maxstacksize <= 1024) return &bvh_api256;
+ assert(maxstacksize <= 256);
+ return 0;
+}
+
+RayObject *RE_rayobject_svbvh_create(int size)
+{
+ return bvh_create_tree<SVBVHTree,DFS_STACK_SIZE>(size);
+}
+#else
+
+RayObject *RE_rayobject_svbvh_create(int size)
+{
+ puts("WARNING: SSE disabled at compile time\n");
+ return NULL;
+}
+
+#endif
diff --git a/source/blender/render/intern/raytrace/rayobject_vbvh.cpp b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
new file mode 100644
index 00000000000..11f04c04141
--- /dev/null
+++ b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
@@ -0,0 +1,191 @@
+/**
+ * $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.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): André Pinto.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+int tot_pushup = 0;
+int tot_pushdown = 0;
+int tot_hints = 0;
+
+
+#include <assert.h>
+#include "rayobject.h"
+#include "rayobject_rtbuild.h"
+#include "RE_raytrace.h"
+#include "BLI_memarena.h"
+#include "MEM_guardedalloc.h"
+#include "BKE_utildefines.h"
+#include "BLI_arithb.h"
+
+#include "reorganize.h"
+#include "bvh.h"
+#include "vbvh.h"
+#include "svbvh.h"
+#include <queue>
+#include <algorithm>
+
+#define DFS_STACK_SIZE 256
+
+struct VBVHTree
+{
+ RayObject rayobj;
+ VBVHNode *root;
+ MemArena *node_arena;
+ float cost;
+ RTBuilder *builder;
+};
+
+/*
+ * Cost to test N childs
+ */
+struct PackCost
+{
+ float operator()(int n)
+ {
+ return n;
+ }
+};
+
+template<>
+void bvh_done<VBVHTree>(VBVHTree *obj)
+{
+ rtbuild_done(obj->builder, &obj->rayobj.control);
+
+ //TODO find a away to exactly calculate the needed memory
+ MemArena *arena1 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ BLI_memarena_use_malloc(arena1);
+
+ //Build and optimize the tree
+ if(1)
+ {
+ VBVHNode *root = BuildBinaryVBVH<VBVHNode>(arena1,&obj->rayobj.control).transform(obj->builder);
+ if(RE_rayobjectcontrol_test_break(&obj->rayobj.control))
+ {
+ BLI_memarena_free(arena1);
+ return;
+ }
+
+ reorganize(root);
+ remove_useless(root, &root);
+ bvh_refit(root);
+
+ pushup(root);
+ pushdown(root);
+ obj->root = root;
+ }
+ else
+ {
+/*
+ TODO
+ MemArena *arena2 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ BLI_memarena_use_malloc(arena2);
+
+ //Finds the optimal packing of this tree using a given cost model
+ //TODO this uses quite a lot of memory, find ways to reduce memory usage during building
+ OVBVHNode *root = BuildBinaryVBVH<OVBVHNode>(arena2).transform(obj->builder);
+ VBVH_optimalPackSIMD<OVBVHNode,PackCost>(PackCost()).transform(root);
+ obj->root = Reorganize_VBVH<OVBVHNode>(arena1).transform(root);
+
+ BLI_memarena_free(arena2);
+ */
+ }
+
+ //Cleanup
+ rtbuild_free( obj->builder );
+ obj->builder = NULL;
+
+ obj->node_arena = arena1;
+ obj->cost = 1.0;
+}
+
+template<int StackSize>
+int intersect(VBVHTree *obj, Isect* isec)
+{
+ //TODO renable hint support
+ if(RE_rayobject_isAligned(obj->root))
+ return bvh_node_stack_raycast<VBVHNode,StackSize,false>( obj->root, isec);
+ else
+ return RE_rayobject_intersect( (RayObject*) obj->root, isec );
+}
+
+template<class Tree>
+void bvh_hint_bb(Tree *tree, LCTSHint *hint, float *min, float *max)
+{
+ //TODO renable hint support
+ {
+ hint->size = 0;
+ hint->stack[hint->size++] = (RayObject*)tree->root;
+ }
+}
+
+void bfree(VBVHTree *tree)
+{
+ if(tot_pushup + tot_pushdown + tot_hints + tot_moves)
+ {
+ printf("tot pushups: %d\n", tot_pushup);
+ printf("tot pushdowns: %d\n", tot_pushdown);
+ printf("tot moves: %d\n", tot_moves);
+ printf("tot hints created: %d\n", tot_hints);
+ tot_pushup = 0;
+ tot_pushdown = 0;
+ tot_hints = 0;
+ tot_moves = 0;
+ }
+ bvh_free(tree);
+}
+
+/* the cast to pointer function is needed to workarround gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11407 */
+template<class Tree, int STACK_SIZE>
+RayObjectAPI make_api()
+{
+ static RayObjectAPI api =
+ {
+ (RE_rayobject_raycast_callback) ((int(*)(Tree*,Isect*)) &intersect<STACK_SIZE>),
+ (RE_rayobject_add_callback) ((void(*)(Tree*,RayObject*)) &bvh_add<Tree>),
+ (RE_rayobject_done_callback) ((void(*)(Tree*)) &bvh_done<Tree>),
+ (RE_rayobject_free_callback) ((void(*)(Tree*)) &bvh_free<Tree>),
+ (RE_rayobject_merge_bb_callback)((void(*)(Tree*,float*,float*)) &bvh_bb<Tree>),
+ (RE_rayobject_cost_callback) ((float(*)(Tree*)) &bvh_cost<Tree>),
+ (RE_rayobject_hint_bb_callback) ((void(*)(Tree*,LCTSHint*,float*,float*)) &bvh_hint_bb<Tree>)
+ };
+
+ return api;
+}
+
+template<class Tree>
+RayObjectAPI* bvh_get_api(int maxstacksize)
+{
+ static RayObjectAPI bvh_api256 = make_api<Tree,1024>();
+
+ if(maxstacksize <= 1024) return &bvh_api256;
+ assert(maxstacksize <= 256);
+ return 0;
+}
+
+RayObject *RE_rayobject_vbvh_create(int size)
+{
+ return bvh_create_tree<VBVHTree,DFS_STACK_SIZE>(size);
+}
diff --git a/source/blender/render/intern/raytrace/reorganize.h b/source/blender/render/intern/raytrace/reorganize.h
new file mode 100644
index 00000000000..f0335b769d5
--- /dev/null
+++ b/source/blender/render/intern/raytrace/reorganize.h
@@ -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.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): André Pinto.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#include <stdio.h>
+#include <math.h>
+#include <algorithm>
+#include <vector>
+#include <queue>
+
+extern int tot_pushup;
+extern int tot_pushdown;
+
+template<class Node>
+bool node_fits_inside(Node *a, Node *b)
+{
+ return bb_fits_inside(b->bb, b->bb+3, a->bb, a->bb+3);
+}
+
+template<class Node>
+void reorganize_find_fittest_parent(Node *tree, Node *node, std::pair<float,Node*> &cost)
+{
+ std::queue<Node*> q;
+ q.push(tree);
+
+ while(!q.empty())
+ {
+ Node *parent = q.front();
+ q.pop();
+
+ if(parent == node) continue;
+ if(node_fits_inside(node, parent) && RE_rayobject_isAligned(parent->child) )
+ {
+ float pcost = bb_area(parent->bb, parent->bb+3);
+ cost = std::min( cost, std::make_pair(pcost,parent) );
+ for(Node *child = parent->child; child; child = child->sibling)
+ q.push(child);
+ }
+ }
+}
+
+static int tot_moves = 0;
+template<class Node>
+void reorganize(Node *root)
+{
+ std::queue<Node*> q;
+
+ q.push(root);
+ while(!q.empty())
+ {
+ Node * node = q.front();
+ q.pop();
+
+ if( RE_rayobject_isAligned(node->child) )
+ {
+ for(Node **prev = &node->child; *prev; )
+ {
+ assert( RE_rayobject_isAligned(*prev) );
+ q.push(*prev);
+
+ std::pair<float,Node*> best(FLT_MAX, root);
+ reorganize_find_fittest_parent( root, *prev, best );
+
+ if(best.second == node)
+ {
+ //Already inside the fitnest BB
+ prev = &(*prev)->sibling;
+ }
+ else
+ {
+ Node *tmp = *prev;
+ *prev = (*prev)->sibling;
+
+ tmp->sibling = best.second->child;
+ best.second->child = tmp;
+
+ tot_moves++;
+ }
+
+
+ }
+ }
+ if(node != root)
+ {
+ }
+ }
+}
+
+/*
+ * Prunes useless nodes from trees:
+ * erases nodes with total ammount of primitives = 0
+ * prunes nodes with only one child (except if that child is a primitive)
+ */
+template<class Node>
+void remove_useless(Node *node, Node **new_node)
+{
+ if( RE_rayobject_isAligned(node->child) )
+ {
+
+ for(Node **prev = &node->child; *prev; )
+ {
+ Node *next = (*prev)->sibling;
+ remove_useless(*prev, prev);
+ if(*prev == 0)
+ *prev = next;
+ else
+ {
+ (*prev)->sibling = next;
+ prev = &((*prev)->sibling);
+ }
+ }
+ }
+ if(node->child)
+ {
+ if(RE_rayobject_isAligned(node->child) && node->child->sibling == 0)
+ *new_node = node->child;
+ }
+ else if(node->child == 0)
+ *new_node = 0;
+}
+
+/*
+ * Minimizes expected number of BBtest by colapsing nodes
+ * it uses surface area heuristic for determining whether a node should be colapsed
+ */
+template<class Node>
+void pushup(Node *parent)
+{
+ if(is_leaf(parent)) return;
+
+ float p_area = bb_area(parent->bb, parent->bb+3);
+ Node **prev = &parent->child;
+ for(Node *child = parent->child; RE_rayobject_isAligned(child) && child; )
+ {
+ float c_area = bb_area(child->bb, child->bb+3) ;
+ int nchilds = count_childs(child);
+ float original_cost = (c_area / p_area)*nchilds + 1;
+ float flatten_cost = nchilds;
+ if(flatten_cost < original_cost && nchilds >= 2)
+ {
+ append_sibling(child, child->child);
+ child = child->sibling;
+ *prev = child;
+
+// *prev = child->child;
+// append_sibling( *prev, child->sibling );
+// child = *prev;
+ tot_pushup++;
+ }
+ else
+ {
+ *prev = child;
+ prev = &(*prev)->sibling;
+ child = *prev;
+ }
+ }
+
+ for(Node *child = parent->child; RE_rayobject_isAligned(child) && child; child = child->sibling)
+ pushup(child);
+}
+
+/*
+ * try to optimize number of childs to be a multiple of SSize
+ */
+template<class Node, int SSize>
+void pushup_simd(Node *parent)
+{
+ if(is_leaf(parent)) return;
+
+ int n = count_childs(parent);
+
+ Node **prev = &parent->child;
+ for(Node *child = parent->child; RE_rayobject_isAligned(child) && child; )
+ {
+ int cn = count_childs(child);
+ if(cn-1 <= (SSize - (n%SSize) ) % SSize && RE_rayobject_isAligned(child->child) )
+ {
+ n += (cn - 1);
+ append_sibling(child, child->child);
+ child = child->sibling;
+ *prev = child;
+ }
+ else
+ {
+ *prev = child;
+ prev = &(*prev)->sibling;
+ child = *prev;
+ }
+ }
+
+ for(Node *child = parent->child; RE_rayobject_isAligned(child) && child; child = child->sibling)
+ pushup_simd<Node,SSize>(child);
+}
+
+
+/*
+ * Pushdown
+ * makes sure no child fits inside any of its sibling
+ */
+template<class Node>
+void pushdown(Node *parent)
+{
+ Node **s_child = &parent->child;
+ Node * child = parent->child;
+
+ while(child && RE_rayobject_isAligned(child))
+ {
+ Node *next = child->sibling;
+ Node **next_s_child = &child->sibling;
+
+ //assert(bb_fits_inside(parent->bb, parent->bb+3, child->bb, child->bb+3));
+
+ for(Node *i = parent->child; RE_rayobject_isAligned(i) && i; i = i->sibling)
+ if(child != i && bb_fits_inside(i->bb, i->bb+3, child->bb, child->bb+3) && RE_rayobject_isAligned(i->child))
+ {
+// todo optimize (should the one with the smallest area?)
+// float ia = bb_area(i->bb, i->bb+3)
+// if(child->i)
+ *s_child = child->sibling;
+ child->sibling = i->child;
+ i->child = child;
+ next_s_child = s_child;
+
+ tot_pushdown++;
+ break;
+ }
+ child = next;
+ s_child = next_s_child;
+ }
+
+ for(Node *i = parent->child; RE_rayobject_isAligned(i) && i; i = i->sibling)
+ pushdown( i );
+}
+
+
+/*
+ * BVH refit
+ * reajust nodes BB (useful if nodes childs where modified)
+ */
+template<class Node>
+float bvh_refit(Node *node)
+{
+ if(is_leaf(node)) return 0;
+ if(is_leaf(node->child)) return 0;
+
+ float total = 0;
+
+ for(Node *child = node->child; child; child = child->sibling)
+ total += bvh_refit(child);
+
+ float old_area = bb_area(node->bb, node->bb+3);
+ INIT_MINMAX(node->bb, node->bb+3);
+ for(Node *child = node->child; child; child = child->sibling)
+ {
+ DO_MIN(child->bb, node->bb);
+ DO_MAX(child->bb+3, node->bb+3);
+ }
+ total += old_area - bb_area(node->bb, node->bb+3);
+ return total;
+}
+
+
+/*
+ * this finds the best way to packing a tree acording to a given test cost function
+ * with the purpose to reduce the expected cost (eg.: number of BB tests).
+ */
+#include <vector>
+#include <cmath>
+#define MAX_CUT_SIZE 16
+#define MAX_OPTIMIZE_CHILDS MAX_CUT_SIZE
+
+struct OVBVHNode
+{
+ float bb[6];
+
+ OVBVHNode *child;
+ OVBVHNode *sibling;
+
+ /*
+ * Returns min cost to represent the subtree starting at the given node,
+ * allowing it to have a given cutsize
+ */
+ float cut_cost[MAX_CUT_SIZE];
+ float get_cost(int cutsize)
+ {
+ return cut_cost[cutsize-1];
+ }
+
+ /*
+ * This saves the cut size of this child, when parent is reaching
+ * its minimum cut with the given cut size
+ */
+ int cut_size[MAX_CUT_SIZE];
+ int get_cut_size(int parent_cut_size)
+ {
+ return cut_size[parent_cut_size-1];
+ }
+
+ /*
+ * Reorganize the node based on calculated cut costs
+ */
+ int best_cutsize;
+ void set_cut(int cutsize, OVBVHNode ***cut)
+ {
+ if(cutsize == 1)
+ {
+ **cut = this;
+ *cut = &(**cut)->sibling;
+ }
+ else
+ {
+ if(cutsize > MAX_CUT_SIZE)
+ {
+ for(OVBVHNode *child = this->child; child && RE_rayobject_isAligned(child); child = child->sibling)
+ {
+ child->set_cut( 1, cut );
+ cutsize--;
+ }
+ assert(cutsize == 0);
+ }
+ else
+ for(OVBVHNode *child = this->child; child && RE_rayobject_isAligned(child); child = child->sibling)
+ child->set_cut( child->get_cut_size( cutsize ), cut );
+ }
+ }
+
+ void optimize()
+ {
+ if(RE_rayobject_isAligned(this->child))
+ {
+ //Calc new childs
+ {
+ OVBVHNode **cut = &(this->child);
+ set_cut( best_cutsize, &cut );
+ *cut = NULL;
+ }
+
+ //Optimize new childs
+ for(OVBVHNode *child = this->child; child && RE_rayobject_isAligned(child); child = child->sibling)
+ child->optimize();
+ }
+ }
+};
+
+/*
+ * Calculates an optimal SIMD packing
+ *
+ */
+template<class Node, class TestCost>
+struct VBVH_optimalPackSIMD
+{
+ TestCost testcost;
+
+ VBVH_optimalPackSIMD(TestCost testcost)
+ {
+ this->testcost = testcost;
+ }
+
+ /*
+ * calc best cut on a node
+ */
+ struct calc_best
+ {
+ Node *child[MAX_OPTIMIZE_CHILDS];
+ float child_hit_prob[MAX_OPTIMIZE_CHILDS];
+
+ calc_best(Node *node)
+ {
+ int nchilds = 0;
+ //Fetch childs and needed data
+ {
+ float parent_area = bb_area(node->bb, node->bb+3);
+ for(Node *child = node->child; child && RE_rayobject_isAligned(child); child = child->sibling)
+ {
+ this->child[nchilds] = child;
+ this->child_hit_prob[nchilds] = bb_area(child->bb, child->bb+3) / parent_area;
+ nchilds++;
+ }
+
+ assert(nchilds >= 2 && nchilds <= MAX_OPTIMIZE_CHILDS);
+ }
+
+
+ //Build DP table to find minimum cost to represent this node with a given cutsize
+ int bt [MAX_OPTIMIZE_CHILDS+1][MAX_CUT_SIZE+1]; //backtrace table
+ float cost[MAX_OPTIMIZE_CHILDS+1][MAX_CUT_SIZE+1]; //cost table (can be reduced to float[2][MAX_CUT_COST])
+
+ for(int i=0; i<=nchilds; i++)
+ for(int j=0; j<=MAX_CUT_SIZE; j++)
+ cost[i][j] = INFINITY;
+
+ cost[0][0] = 0;
+
+ for(int i=1; i<=nchilds; i++)
+ for(int size=i-1; size/*+(nchilds-i)*/<=MAX_CUT_SIZE; size++)
+ for(int cut=1; cut+size/*+(nchilds-i)*/<=MAX_CUT_SIZE; cut++)
+ {
+ float new_cost = cost[i-1][size] + child_hit_prob[i-1]*child[i-1]->get_cost(cut);
+ if(new_cost < cost[i][size+cut])
+ {
+ cost[i][size+cut] = new_cost;
+ bt[i][size+cut] = cut;
+ }
+ }
+
+ //Save the ways to archieve the minimum cost with a given cutsize
+ for(int i = nchilds; i <= MAX_CUT_SIZE; i++)
+ {
+ node->cut_cost[i-1] = cost[nchilds][i];
+ if(cost[nchilds][i] < INFINITY)
+ {
+ int current_size = i;
+ for(int j=nchilds; j>0; j--)
+ {
+ child[j-1]->cut_size[i-1] = bt[j][current_size];
+ current_size -= bt[j][current_size];
+ }
+ }
+ }
+ }
+ };
+
+ void calc_costs(Node *node)
+ {
+
+ if( RE_rayobject_isAligned(node->child) )
+ {
+ int nchilds = 0;
+ for(Node *child = node->child; child && RE_rayobject_isAligned(child); child = child->sibling)
+ {
+ calc_costs(child);
+ nchilds++;
+ }
+
+ for(int i=0; i<MAX_CUT_SIZE; i++)
+ node->cut_cost[i] = INFINITY;
+
+ //We are not allowed to look on nodes with with so many childs
+ if(nchilds > MAX_CUT_SIZE)
+ {
+ float cost = 0;
+
+ float parent_area = bb_area(node->bb, node->bb+3);
+ for(Node *child = node->child; child && RE_rayobject_isAligned(child); child = child->sibling)
+ {
+ cost += ( bb_area(child->bb, child->bb+3) / parent_area ) * child->get_cost(1);
+ }
+
+ cost += testcost(nchilds);
+ node->cut_cost[0] = cost;
+ node->best_cutsize = nchilds;
+ }
+ else
+ {
+ calc_best calc(node);
+
+ //calc expected cost if we optimaly pack this node
+ for(int cutsize=nchilds; cutsize<=MAX_CUT_SIZE; cutsize++)
+ {
+ float m = node->get_cost(cutsize) + testcost(cutsize);
+ if(m < node->cut_cost[0])
+ {
+ node->cut_cost[0] = m;
+ node->best_cutsize = cutsize;
+ }
+ }
+ }
+ assert(node->cut_cost[0] != INFINITY);
+ }
+ else
+ {
+ node->cut_cost[0] = 1.0f;
+ for(int i=1; i<MAX_CUT_SIZE; i++)
+ node->cut_cost[i] = INFINITY;
+ }
+ }
+
+ Node *transform(Node *node)
+ {
+ if(RE_rayobject_isAligned(node->child))
+ {
+ static int num = 0;
+ bool first = false;
+ if(num == 0) { num++; first = true; }
+
+ calc_costs(node);
+ if(first) printf("expected cost = %f (%d)\n", node->cut_cost[0], node->best_cutsize );
+ node->optimize();
+ }
+ return node;
+ }
+};
diff --git a/source/blender/render/intern/raytrace/svbvh.h b/source/blender/render/intern/raytrace/svbvh.h
new file mode 100644
index 00000000000..80e6e2ea190
--- /dev/null
+++ b/source/blender/render/intern/raytrace/svbvh.h
@@ -0,0 +1,249 @@
+/**
+ * $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.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): André Pinto.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#ifdef __SSE__
+
+#ifndef RE_RAYTRACE_SVBVH_H
+#define RE_RAYTRACE_SVBVH_H
+
+#include "bvh.h"
+#include "BLI_memarena.h"
+#include <stdio.h>
+#include <algorithm>
+
+struct SVBVHNode
+{
+ int nchilds;
+
+ //Array of bb, array of childs
+ float *child_bb;
+ SVBVHNode **child;
+};
+
+template<>
+inline int bvh_node_hit_test<SVBVHNode>(SVBVHNode *node, Isect *isec)
+{
+ return 1;
+}
+
+template<>
+inline void bvh_node_push_childs<SVBVHNode>(SVBVHNode *node, Isect *isec, SVBVHNode **stack, int &stack_pos)
+{
+ int i=0;
+ while(i+4 <= node->nchilds)
+ {
+ int res = test_bb_group4( (__m128*) (node->child_bb+6*i), isec );
+ RE_RC_COUNT(isec->raycounter->simd_bb.test);
+
+ if(res & 1) { stack[stack_pos++] = node->child[i+0]; RE_RC_COUNT(isec->raycounter->simd_bb.hit); }
+ if(res & 2) { stack[stack_pos++] = node->child[i+1]; RE_RC_COUNT(isec->raycounter->simd_bb.hit); }
+ if(res & 4) { stack[stack_pos++] = node->child[i+2]; RE_RC_COUNT(isec->raycounter->simd_bb.hit); }
+ if(res & 8) { stack[stack_pos++] = node->child[i+3]; RE_RC_COUNT(isec->raycounter->simd_bb.hit); }
+
+ i += 4;
+ }
+ while(i < node->nchilds)
+ {
+ if(RE_rayobject_bb_intersect_test(isec, (const float*)node->child_bb+6*i))
+ stack[stack_pos++] = node->child[i];
+ i++;
+ }
+}
+
+template<>
+inline void bvh_node_merge_bb<SVBVHNode>(SVBVHNode *node, float *min, float *max)
+{
+ if(is_leaf(node))
+ {
+ RE_rayobject_merge_bb( (RayObject*)node, min, max);
+ }
+ else
+ {
+ int i=0;
+ while(i+4 <= node->nchilds)
+ {
+ float *res = node->child_bb + 6*i;
+ for(int j=0; j<3; j++)
+ {
+ min[j] = MIN2(min[j], res[4*j+0]);
+ min[j] = MIN2(min[j], res[4*j+1]);
+ min[j] = MIN2(min[j], res[4*j+2]);
+ min[j] = MIN2(min[j], res[4*j+3]);
+ }
+ for(int j=0; j<3; j++)
+ {
+ max[j] = MAX2(max[j], res[4*(j+3)+0]);
+ max[j] = MAX2(max[j], res[4*(j+3)+1]);
+ max[j] = MAX2(max[j], res[4*(j+3)+2]);
+ max[j] = MAX2(max[j], res[4*(j+3)+3]);
+ }
+
+ i += 4;
+ }
+
+ for(; i<node->nchilds; i++)
+ {
+ DO_MIN(node->child_bb+6*i , min);
+ DO_MAX(node->child_bb+3+6*i, max);
+ }
+ }
+}
+
+
+
+/*
+ * Builds a SVBVH tree form a VBVHTree
+ */
+template<class OldNode>
+struct Reorganize_SVBVH
+{
+ MemArena *arena;
+
+ float childs_per_node;
+ int nodes_with_childs[16];
+ int useless_bb;
+ int nodes;
+
+ Reorganize_SVBVH(MemArena *a)
+ {
+ arena = a;
+ nodes = 0;
+ childs_per_node = 0;
+ useless_bb = 0;
+
+ for(int i=0; i<16; i++)
+ nodes_with_childs[i] = 0;
+ }
+
+ ~Reorganize_SVBVH()
+ {
+ printf("%f childs per node\n", childs_per_node / nodes);
+ printf("%d childs BB are useless\n", useless_bb);
+ for(int i=0; i<16; i++)
+ printf("%i childs per node: %d/%d = %f\n", i, nodes_with_childs[i], nodes, nodes_with_childs[i]/float(nodes));
+ }
+
+ SVBVHNode *create_node(int nchilds)
+ {
+ SVBVHNode *node = (SVBVHNode*)BLI_memarena_alloc(arena, sizeof(SVBVHNode));
+ node->nchilds = nchilds;
+ node->child_bb = (float*)BLI_memarena_alloc(arena, sizeof(float)*6*nchilds);
+ node->child= (SVBVHNode**)BLI_memarena_alloc(arena, sizeof(SVBVHNode*)*nchilds);
+
+ return node;
+ }
+
+ void copy_bb(float *bb, const float *old_bb)
+ {
+ std::copy( old_bb, old_bb+6, bb );
+ }
+
+ void prepare_for_simd(SVBVHNode *node)
+ {
+ int i=0;
+ while(i+4 <= node->nchilds)
+ {
+ float vec_tmp[4*6];
+ float *res = node->child_bb+6*i;
+ std::copy( res, res+6*4, vec_tmp);
+
+ for(int j=0; j<6; j++)
+ {
+ res[4*j+0] = vec_tmp[6*0+j];
+ res[4*j+1] = vec_tmp[6*1+j];
+ res[4*j+2] = vec_tmp[6*2+j];
+ res[4*j+3] = vec_tmp[6*3+j];
+ }
+
+ i += 4;
+ }
+ }
+
+ /* amt must be power of two */
+ inline int padup(int num, int amt)
+ {
+ return ((num+(amt-1))&~(amt-1));
+ }
+
+ SVBVHNode *transform(OldNode *old)
+ {
+ if(is_leaf(old))
+ return (SVBVHNode*)old;
+ if(is_leaf(old->child))
+ return (SVBVHNode*)old->child;
+
+ int nchilds = count_childs(old);
+ int alloc_childs = nchilds;
+ if(nchilds % 4 > 2)
+ alloc_childs = padup(nchilds, 4);
+
+ SVBVHNode *node = create_node(alloc_childs);
+
+ childs_per_node += nchilds;
+ nodes++;
+ if(nchilds < 16)
+ nodes_with_childs[nchilds]++;
+
+ useless_bb += alloc_childs-nchilds;
+ while(alloc_childs > nchilds)
+ {
+ const static float def_bb[6] = { FLT_MAX, FLT_MAX, FLT_MAX, FLT_MIN, FLT_MIN, FLT_MIN };
+ alloc_childs--;
+ node->child[alloc_childs] = 0;
+ copy_bb(node->child_bb+alloc_childs*6, def_bb);
+ }
+
+ int i=nchilds;
+ for(OldNode *o_child = old->child; o_child; o_child = o_child->sibling)
+ {
+ i--;
+ node->child[i] = transform(o_child);
+ if(is_leaf(o_child))
+ {
+ float bb[6];
+ INIT_MINMAX(bb, bb+3);
+ RE_rayobject_merge_bb( (RayObject*)o_child, bb, bb+3);
+ copy_bb(node->child_bb+i*6, bb);
+ break;
+ }
+ else
+ {
+ copy_bb(node->child_bb+i*6, o_child->bb);
+ }
+ }
+ assert( i == 0 );
+
+ prepare_for_simd(node);
+
+ return node;
+ }
+};
+
+#endif
+
+#endif //__SSE__
diff --git a/source/blender/render/intern/raytrace/vbvh.h b/source/blender/render/intern/raytrace/vbvh.h
new file mode 100644
index 00000000000..7d3dbffd125
--- /dev/null
+++ b/source/blender/render/intern/raytrace/vbvh.h
@@ -0,0 +1,237 @@
+/**
+ * $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.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): André Pinto.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#include <assert.h>
+
+#include <algorithm>
+#include "rayobject_rtbuild.h"
+#include "BLI_memarena.h"
+
+
+/*
+ * VBVHNode represents a BVHNode with support for a variable number of childrens
+ */
+struct VBVHNode
+{
+ float bb[6];
+
+ VBVHNode *child;
+ VBVHNode *sibling;
+};
+
+
+/*
+ * Push nodes (used on dfs)
+ */
+template<class Node>
+inline static void bvh_node_push_childs(Node *node, Isect *isec, Node **stack, int &stack_pos)
+{
+ Node *child = node->child;
+
+ if(is_leaf(child))
+ {
+ stack[stack_pos++] = child;
+ }
+ else
+ {
+ while(child)
+ {
+ //Skips BB tests on primitives
+/*
+ if(is_leaf(child->child))
+ stack[stack_pos++] = child->child;
+ else
+*/
+ stack[stack_pos++] = child;
+
+ child = child->sibling;
+ }
+ }
+}
+
+
+template<class Node>
+int count_childs(Node *parent)
+{
+ int n = 0;
+ for(Node *i = parent->child; i; i = i->sibling)
+ {
+ n++;
+ if(is_leaf(i))
+ break;
+ }
+
+ return n;
+}
+
+
+template<class Node>
+void append_sibling(Node *node, Node *sibling)
+{
+ while(node->sibling)
+ node = node->sibling;
+
+ node->sibling = sibling;
+}
+
+
+/*
+ * Builds a binary VBVH from a rtbuild
+ */
+template<class Node>
+struct BuildBinaryVBVH
+{
+ MemArena *arena;
+ RayObjectControl *control;
+
+ void test_break()
+ {
+ if(RE_rayobjectcontrol_test_break(control))
+ throw "Stop";
+ }
+
+ BuildBinaryVBVH(MemArena *a, RayObjectControl *c)
+ {
+ arena = a;
+ control = c;
+ }
+
+ Node *create_node()
+ {
+ Node *node = (Node*)BLI_memarena_alloc( arena, sizeof(Node) );
+ assert( RE_rayobject_isAligned(node) );
+
+ node->sibling = NULL;
+ node->child = NULL;
+
+ return node;
+ }
+
+ int rtbuild_split(RTBuilder *builder)
+ {
+ return ::rtbuild_heuristic_object_split(builder, 2);
+ }
+
+ Node *transform(RTBuilder *builder)
+ {
+ try
+ {
+ return _transform(builder);
+
+ } catch(...)
+ {
+ }
+ return NULL;
+ }
+
+ Node *_transform(RTBuilder *builder)
+ {
+
+ int size = rtbuild_size(builder);
+ if(size == 1)
+ {
+ Node *node = create_node();
+ INIT_MINMAX(node->bb, node->bb+3);
+ rtbuild_merge_bb(builder, node->bb, node->bb+3);
+ node->child = (Node*) rtbuild_get_primitive( builder, 0 );
+ return node;
+ }
+ else
+ {
+ test_break();
+
+ Node *node = create_node();
+
+ INIT_MINMAX(node->bb, node->bb+3);
+ rtbuild_merge_bb(builder, node->bb, node->bb+3);
+
+ Node **child = &node->child;
+
+ int nc = rtbuild_split(builder);
+ assert(nc == 2);
+ for(int i=0; i<nc; i++)
+ {
+ RTBuilder tmp;
+ rtbuild_get_child(builder, i, &tmp);
+
+ *child = _transform(&tmp);
+ child = &((*child)->sibling);
+ }
+
+ *child = 0;
+ return node;
+ }
+ }
+};
+
+/*
+template<class Tree,class OldNode>
+struct Reorganize_VBVH
+{
+ Tree *tree;
+
+ Reorganize_VBVH(Tree *t)
+ {
+ tree = t;
+ }
+
+ VBVHNode *create_node()
+ {
+ VBVHNode *node = (VBVHNode*)BLI_memarena_alloc(tree->node_arena, sizeof(VBVHNode));
+ return node;
+ }
+
+ void copy_bb(VBVHNode *node, OldNode *old)
+ {
+ std::copy( old->bb, old->bb+6, node->bb );
+ }
+
+ VBVHNode *transform(OldNode *old)
+ {
+ if(is_leaf(old))
+ return (VBVHNode*)old;
+
+ VBVHNode *node = create_node();
+ VBVHNode **child_ptr = &node->child;
+ node->sibling = 0;
+
+ copy_bb(node,old);
+
+ for(OldNode *o_child = old->child; o_child; o_child = o_child->sibling)
+ {
+ VBVHNode *n_child = transform(o_child);
+ *child_ptr = n_child;
+ if(is_leaf(n_child)) return node;
+ child_ptr = &n_child->sibling;
+ }
+ *child_ptr = 0;
+
+ return node;
+ }
+};
+*/
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index a35e13e1df7..f54d7dd20ab 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -889,6 +889,28 @@ static void free_mesh_orco_hash(Render *re)
}
}
+static void check_material_mapto(Material *ma)
+{
+ int a;
+ ma->mapto_textured = 0;
+
+ /* cache which inputs are actually textured.
+ * this can avoid a bit of time spent iterating through all the texture slots, map inputs and map tos
+ * every time a property which may or may not be textured is accessed */
+
+ for(a=0; a<MAX_MTEX; a++) {
+ if(ma->mtex[a] && ma->mtex[a]->tex) {
+ /* currently used only in volume render, so we'll check for those flags */
+ if(ma->mtex[a]->mapto & MAP_DENSITY) ma->mapto_textured |= MAP_DENSITY;
+ if(ma->mtex[a]->mapto & MAP_EMISSION) ma->mapto_textured |= MAP_EMISSION;
+ if(ma->mtex[a]->mapto & MAP_EMISSION_COL) ma->mapto_textured |= MAP_EMISSION_COL;
+ if(ma->mtex[a]->mapto & MAP_SCATTERING) ma->mapto_textured |= MAP_SCATTERING;
+ if(ma->mtex[a]->mapto & MAP_TRANSMISSION_COL) ma->mapto_textured |= MAP_TRANSMISSION_COL;
+ if(ma->mtex[a]->mapto & MAP_REFLECTION) ma->mapto_textured |= MAP_REFLECTION;
+ if(ma->mtex[a]->mapto & MAP_REFLECTION_COL) ma->mapto_textured |= MAP_REFLECTION_COL;
+ }
+ }
+}
static void flag_render_node_material(Render *re, bNodeTree *ntree)
{
bNode *node;
@@ -920,7 +942,10 @@ static Material *give_render_material(Render *re, Object *ob, int nr)
if(re->r.mode & R_SPEED) ma->texco |= NEED_UV;
- if(ma->material_type == MA_TYPE_VOLUME) ma->mode |= MA_TRANSP;
+ if(ma->material_type == MA_TYPE_VOLUME) {
+ ma->mode |= MA_TRANSP;
+ ma->mode &= ~MA_SHADBUF;
+ }
if((ma->mode & MA_TRANSP) && (ma->mode & MA_ZTRANSP))
re->flag |= R_ZTRA;
@@ -930,6 +955,8 @@ static Material *give_render_material(Render *re, Object *ob, int nr)
if(ma->nodetree && ma->use_nodes)
flag_render_node_material(re, ma->nodetree);
+ check_material_mapto(ma);
+
return ma;
}
@@ -1474,7 +1501,7 @@ static void get_particle_uvco_mcol(short from, DerivedMesh *dm, float *fuv, int
static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem *psys, int timeoffset)
{
Object *ob= obr->ob;
- Object *tob=0;
+// Object *tob=0;
Material *ma=0;
ParticleSystemModifierData *psmd;
ParticleSystem *tpsys=0;
@@ -1484,6 +1511,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
ParticleKey state;
ParticleCacheKey *cache=0;
ParticleBillboardData bb;
+ ParticleSimulationData sim = {re->scene, ob, psys, NULL};
ParticleStrandData sd;
StrandBuffer *strandbuf=0;
StrandVert *svert=0;
@@ -1517,14 +1545,16 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
return 1;
/* 2. start initialising things */
- if(part->phystype==PART_PHYS_KEYED)
- psys_count_keyed_targets(ob,psys);
/* last possibility to bail out! */
- psmd= psys_get_modifier(ob,psys);
+ sim.psmd = psmd = psys_get_modifier(ob,psys);
if(!(psmd->modifier.mode & eModifierMode_Render))
return 0;
+ if(part->phystype==PART_PHYS_KEYED)
+ psys_count_keyed_targets(&sim);
+
+
if(G.rendering == 0) { /* preview render */
totchild = (int)((float)totchild * (float)part->disp / 100.0f);
}
@@ -1611,14 +1641,14 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
#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){
- psys_get_reactor_target(ob, psys, &tob, &tpsys);
- if(tpsys && (part->from==PART_FROM_PARTICLE || part->phystype==PART_PHYS_NO)){
- psmd = psys_get_modifier(tob,tpsys);
- tpart = tpsys->part;
- }
- }
+///* 2.4 setup reactors */
+// if(part->type == PART_REACTOR){
+// psys_get_reactor_target(ob, psys, &tob, &tpsys);
+// if(tpsys && (part->from==PART_FROM_PARTICLE || part->phystype==PART_PHYS_NO)){
+// psmd = psys_get_modifier(tob,tpsys);
+// tpart = tpsys->part;
+// }
+// }
/* 2.5 setup matrices */
Mat4MulMat4(mat, ob->obmat, re->viewmat);
@@ -1695,7 +1725,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
}
if(path_nbr == 0)
- psys->lattice = psys_get_lattice(re->scene, ob, psys);
+ psys->lattice = psys_get_lattice(&sim);
/* 3. start creating renderable things */
for(a=0,pa=pars; a<totpart+totchild; a++, pa++, seed++) {
@@ -1786,8 +1816,8 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
pa_size = psys_get_child_size(psys, cpa, cfra, &pa_time);
- r_tilt = 2.0f * cpa->rand[2];
- r_length = cpa->rand[1];
+ r_tilt = 2.0f*(PSYS_FRAND(a + 21) - 0.5f);
+ r_length = PSYS_FRAND(a + 22);
num = cpa->num;
@@ -1952,7 +1982,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
continue;
state.time = (part->draw & PART_ABS_PATH_TIME) ? -ct : ct;
- psys_get_particle_on_path(re->scene,ob,psys,a,&state,1);
+ psys_get_particle_on_path(&sim,a,&state,1);
if(psys->parent)
Mat4MulVecfl(psys->parent->obmat, state.co);
@@ -1971,7 +2001,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
else {
time=0.0f;
state.time=cfra;
- if(psys_get_particle_state(re->scene,ob,psys,a,&state,0)==0)
+ if(psys_get_particle_state(&sim,a,&state,0)==0)
continue;
if(psys->parent)
@@ -2996,7 +3026,7 @@ static void init_camera_inside_volumes(Render *re)
for(vo= re->volumes.first; vo; vo= vo->next) {
for(obi= re->instancetable.first; obi; obi= obi->next) {
if (obi->obr == vo->obr) {
- if (point_inside_volume_objectinstance(obi, co)) {
+ if (point_inside_volume_objectinstance(re, obi, co)) {
MatInside *mi;
mi = MEM_mallocN(sizeof(MatInside), "camera inside material");
@@ -3372,9 +3402,10 @@ static void initshadowbuf(Render *re, LampRen *lar, float mat[][4])
shb->bias= shb->bias*(100/re->r.size);
/* halfway method (average of first and 2nd z) reduces bias issues */
- if(lar->buftype==LA_SHADBUF_HALFWAY)
+ if(ELEM(lar->buftype, LA_SHADBUF_HALFWAY, LA_SHADBUF_DEEP))
shb->bias= 0.1f*shb->bias;
+ shb->compressthresh= lar->compressthresh;
}
static void area_lamp_vectors(LampRen *lar)
@@ -3456,6 +3487,7 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
lar->clipend = la->clipend;
lar->bias = la->bias;
+ lar->compressthresh = la->compressthresh;
lar->type= la->type;
lar->mode= la->mode;
@@ -4820,8 +4852,6 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
/* MAKE RENDER DATA */
database_init_objects(re, lay, 0, 0, 0, 0);
- init_camera_inside_volumes(re);
-
if(!re->test_break(re->tbh)) {
int tothalo;
@@ -4846,6 +4876,8 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
RE_make_stars(re, NULL, NULL, NULL, NULL);
sort_halos(re, tothalo);
+ init_camera_inside_volumes(re);
+
re->i.infostr= "Creating Shadowbuffers";
re->stats_draw(re->sdh, &re->i);
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 8ef52991ca2..edf3cd83404 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -213,11 +213,15 @@ static void free_render_result(ListBase *lb, RenderResult *rr)
/* all layers except the active one get temporally pushed away */
static void push_render_result(Render *re)
{
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
+
/* officially pushed result should be NULL... error can happen with do_seq */
RE_FreeRenderResult(re->pushedresult);
re->pushedresult= re->result;
re->result= NULL;
+
+ BLI_rw_mutex_unlock(&re->resultmutex);
}
/* if scemode is R_SINGLE_LAYER, at end of rendering, merge the both render results */
@@ -229,6 +233,8 @@ static void pop_render_result(Render *re)
return;
}
if(re->pushedresult) {
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
+
if(re->pushedresult->rectx==re->result->rectx && re->pushedresult->recty==re->result->recty) {
/* find which layer in pushedresult should be replaced */
SceneRenderLayer *srl;
@@ -255,6 +261,8 @@ static void pop_render_result(Render *re)
RE_FreeRenderResult(re->pushedresult);
re->pushedresult= NULL;
+
+ BLI_rw_mutex_unlock(&re->resultmutex);
}
}
@@ -350,6 +358,13 @@ static char *get_pass_name(int passtype, int channel)
if(channel==-1) return "Mist";
return "Mist.Z";
}
+ if(passtype == SCE_PASS_RAYHITS)
+ {
+ if(channel==-1) return "Rayhits";
+ if(channel==0) return "Rayhits.R";
+ if(channel==1) return "Rayhits.G";
+ return "Rayhits.B";
+ }
return "Unknown";
}
@@ -401,12 +416,14 @@ static int passtype_from_name(char *str)
if(strcmp(str, "Mist")==0)
return SCE_PASS_MIST;
+ if(strcmp(str, "RAYHITS")==0)
+ return SCE_PASS_RAYHITS;
return 0;
}
static void render_unique_exr_name(Render *re, char *str, int sample)
{
- char di[FILE_MAX], name[FILE_MAXFILE], fi[FILE_MAXFILE];
+ char di[FILE_MAX], name[FILE_MAXFILE+MAX_ID_NAME+100], fi[FILE_MAXFILE];
BLI_strncpy(di, G.sce, FILE_MAX);
BLI_splitdirstring(di, fi);
@@ -528,7 +545,7 @@ static RenderResult *new_render_result(Render *re, rcti *partrct, int crop, int
rl->lay= srl->lay;
rl->lay_zmask= srl->lay_zmask;
rl->layflag= srl->layflag;
- rl->passflag= srl->passflag;
+ rl->passflag= srl->passflag | SCE_PASS_RAYHITS;
rl->pass_xor= srl->pass_xor;
rl->light_override= srl->light_override;
rl->mat_override= srl->mat_override;
@@ -572,6 +589,8 @@ static RenderResult *new_render_result(Render *re, rcti *partrct, int crop, int
render_layer_add_pass(rr, rl, 1, SCE_PASS_INDEXOB);
if(srl->passflag & SCE_PASS_MIST)
render_layer_add_pass(rr, rl, 1, SCE_PASS_MIST);
+ if(rl->passflag & SCE_PASS_RAYHITS)
+ render_layer_add_pass(rr, rl, 4, SCE_PASS_RAYHITS);
}
/* sss, previewrender and envmap don't do layers, so we make a default one */
@@ -920,6 +939,8 @@ static void read_render_result(Render *re, int sample)
{
char str[FILE_MAX];
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
+
RE_FreeRenderResult(re->result);
re->result= new_render_result(re, &re->disprect, 0, RR_USEMEM);
@@ -928,6 +949,8 @@ static void read_render_result(Render *re, int sample)
if(!read_render_result_from_file(str, re->result))
printf("cannot read: %s\n", str);
+
+ BLI_rw_mutex_unlock(&re->resultmutex);
}
/* *************************************************** */
@@ -946,13 +969,32 @@ Render *RE_GetRender(const char *name)
}
/* if you want to know exactly what has been done */
-RenderResult *RE_GetResult(Render *re)
+RenderResult *RE_AcquireResultRead(Render *re)
{
- if(re)
+ if(re) {
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_READ);
+ return re->result;
+ }
+
+ return NULL;
+}
+
+RenderResult *RE_AcquireResultWrite(Render *re)
+{
+ if(re) {
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
return re->result;
+ }
+
return NULL;
}
+void RE_ReleaseResult(Render *re)
+{
+ if(re)
+ BLI_rw_mutex_unlock(&re->resultmutex);
+}
+
/* displist.c util.... */
Scene *RE_GetScene(Render *re)
{
@@ -973,38 +1015,49 @@ RenderLayer *render_get_active_layer(Render *re, RenderResult *rr)
/* fill provided result struct with what's currently active or done */
-void RE_GetResultImage(Render *re, RenderResult *rr)
+void RE_AcquireResultImage(Render *re, RenderResult *rr)
{
memset(rr, 0, sizeof(RenderResult));
- if(re && re->result) {
- RenderLayer *rl;
-
- rr->rectx= re->result->rectx;
- rr->recty= re->result->recty;
-
- rr->rectf= re->result->rectf;
- rr->rectz= re->result->rectz;
- rr->rect32= re->result->rect32;
-
- /* active layer */
- rl= render_get_active_layer(re, re->result);
+ if(re) {
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_READ);
- if(rl) {
- if(rr->rectf==NULL)
- rr->rectf= rl->rectf;
- if(rr->rectz==NULL)
- rr->rectz= RE_RenderLayerGetPass(rl, SCE_PASS_Z);
+ if(re->result) {
+ RenderLayer *rl;
+
+ rr->rectx= re->result->rectx;
+ rr->recty= re->result->recty;
+
+ rr->rectf= re->result->rectf;
+ rr->rectz= re->result->rectz;
+ rr->rect32= re->result->rect32;
+
+ /* active layer */
+ rl= render_get_active_layer(re, re->result);
+
+ if(rl) {
+ if(rr->rectf==NULL)
+ rr->rectf= rl->rectf;
+ if(rr->rectz==NULL)
+ rr->rectz= RE_RenderLayerGetPass(rl, SCE_PASS_Z);
+ }
}
}
}
+void RE_ReleaseResultImage(Render *re)
+{
+ if(re)
+ BLI_rw_mutex_unlock(&re->resultmutex);
+}
+
/* caller is responsible for allocating rect in correct size! */
void RE_ResultGet32(Render *re, unsigned int *rect)
{
RenderResult rres;
- RE_GetResultImage(re, &rres);
+ RE_AcquireResultImage(re, &rres);
+
if(rres.rect32)
memcpy(rect, rres.rect32, sizeof(int)*rres.rectx*rres.recty);
else if(rres.rectf) {
@@ -1022,6 +1075,8 @@ void RE_ResultGet32(Render *re, unsigned int *rect)
else
/* else fill with black */
memset(rect, 0, sizeof(int)*re->rectx*re->recty);
+
+ RE_ReleaseResultImage(re);
}
@@ -1042,12 +1097,15 @@ Render *RE_NewRender(const char *name)
re= MEM_callocN(sizeof(Render), "new render");
BLI_addtail(&RenderList, re);
strncpy(re->name, name, RE_MAXNAME);
+ BLI_rw_mutex_init(&re->resultmutex);
}
/* prevent UI to draw old results */
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
RE_FreeRenderResult(re->result);
re->result= NULL;
re->result_ok= 0;
+ BLI_rw_mutex_unlock(&re->resultmutex);
/* set default empty callbacks */
re->display_init= result_nothing;
@@ -1072,6 +1130,7 @@ Render *RE_NewRender(const char *name)
/* only call this while you know it will remove the link too */
void RE_FreeRender(Render *re)
{
+ BLI_rw_mutex_end(&re->resultmutex);
free_renderdata_tables(re);
free_sample_tables(re);
@@ -1153,6 +1212,8 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, int winx, int winy
make_sample_tables(re);
/* if preview render, we try to keep old result */
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
+
if(re->r.scemode & R_PREVIEWBUTS) {
if(re->result && re->result->rectx==re->rectx && re->result->recty==re->recty);
else {
@@ -1168,6 +1229,8 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, int winx, int winy
re->result->rectx= re->rectx;
re->result->recty= re->recty;
}
+
+ BLI_rw_mutex_unlock(&re->resultmutex);
/* we clip faces with a minimum of 2 pixel boundary outside of image border. see zbuf.c */
re->clipcrop= 1.0f + 2.0f/(float)(re->winx>re->winy?re->winy:re->winx);
@@ -1184,8 +1247,12 @@ void RE_SetDispRect (struct Render *re, rcti *disprect)
re->recty= disprect->ymax-disprect->ymin;
/* initialize render result */
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
+
RE_FreeRenderResult(re->result);
re->result= new_render_result(re, &re->disprect, 0, RR_USEMEM);
+
+ BLI_rw_mutex_unlock(&re->resultmutex);
}
void RE_SetWindow(Render *re, rctf *viewplane, float clipsta, float clipend)
@@ -1345,11 +1412,15 @@ static void render_tile_processor(Render *re, int firsttile)
if(re->test_break(re->tbh))
return;
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
+
/* hrmf... exception, this is used for preview render, re-entrant, so render result has to be re-used */
if(re->result==NULL || re->result->layers.first==NULL) {
if(re->result) RE_FreeRenderResult(re->result);
re->result= new_render_result(re, &re->disprect, 0, RR_USEMEM);
}
+
+ BLI_rw_mutex_unlock(&re->resultmutex);
re->stats_draw(re->sdh, &re->i);
@@ -1357,7 +1428,7 @@ static void render_tile_processor(Render *re, int firsttile)
return;
initparts(re);
-
+
/* assuming no new data gets added to dbase... */
R= *re;
@@ -1384,7 +1455,7 @@ static void render_tile_processor(Render *re, int firsttile)
break;
}
}
-
+
freeparts(re);
}
@@ -1522,6 +1593,8 @@ static void threaded_tile_processor(Render *re)
rctf viewplane= re->viewplane;
int rendering=1, counter= 1, drawtimer=0, hasdrawn, minx=0;
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
+
/* first step; free the entire render result, make new, and/or prepare exr buffer saving */
if(re->result==NULL || !(re->r.scemode & R_PREVIEWBUTS)) {
RE_FreeRenderResult(re->result);
@@ -1533,6 +1606,8 @@ static void threaded_tile_processor(Render *re)
else
re->result= new_render_result(re, &re->disprect, 0, re->r.scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE));
}
+
+ BLI_rw_mutex_unlock(&re->resultmutex);
if(re->result==NULL)
return;
@@ -1540,7 +1615,7 @@ static void threaded_tile_processor(Render *re)
/* warning; no return here without closing exr file */
initparts(re);
-
+
if(re->result->exrhandle) {
RenderResult *rr;
char str[FILE_MAX];
@@ -1629,6 +1704,8 @@ static void threaded_tile_processor(Render *re)
}
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
+
if(re->result->exrhandle) {
RenderResult *rr;
@@ -1644,6 +1721,8 @@ static void threaded_tile_processor(Render *re)
read_render_result(re, 0);
}
+
+ BLI_rw_mutex_unlock(&re->resultmutex);
/* unset threadsafety */
g_break= 0;
@@ -1823,8 +1902,10 @@ static void do_render_blur_3d(Render *re)
}
/* swap results */
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
RE_FreeRenderResult(re->result);
re->result= rres;
+ BLI_rw_mutex_unlock(&re->resultmutex);
set_mblur_offs(0.0f);
re->i.curblur= 0; /* stats */
@@ -1894,8 +1975,11 @@ static void do_render_fields_3d(Render *re)
do_render_blur_3d(re);
else
do_render_3d(re);
+
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
rr1= re->result;
re->result= NULL;
+ BLI_rw_mutex_unlock(&re->resultmutex);
/* second field */
if(!re->test_break(re->tbh)) {
@@ -1921,8 +2005,11 @@ static void do_render_fields_3d(Render *re)
re->recty *= 2;
re->disprect.ymin *= 2;
re->disprect.ymax *= 2;
+
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
re->result= new_render_result(re, &re->disprect, 0, RR_USEMEM);
-
+ RE_FreeRenderResult(rr1);
+
if(rr2) {
if(re->r.mode & R_ODDFIELD)
merge_renderresult_fields(re->result, rr2, rr1);
@@ -1931,12 +2018,14 @@ static void do_render_fields_3d(Render *re)
RE_FreeRenderResult(rr2);
}
- RE_FreeRenderResult(rr1);
re->i.curfield= 0; /* stats */
/* weak... the display callback wants an active renderlayer pointer... */
re->result->renlay= render_get_active_layer(re, re->result);
+
+ BLI_rw_mutex_unlock(&re->resultmutex);
+
re->display_draw(re->ddh, re->result, NULL);
}
@@ -2000,6 +2089,8 @@ static void do_render_fields_blur_3d(Render *re)
if((re->r.mode & R_CROP)==0) {
RenderResult *rres;
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
+
/* sub-rect for merge call later on */
re->result->tilerect= re->disprect;
@@ -2020,9 +2111,16 @@ static void do_render_fields_blur_3d(Render *re)
/* weak... the display callback wants an active renderlayer pointer... */
re->result->renlay= render_get_active_layer(re, re->result);
+ BLI_rw_mutex_unlock(&re->resultmutex);
+
re->display_init(re->dih, re->result);
re->display_draw(re->ddh, re->result, NULL);
}
+ else {
+ /* set offset (again) for use in compositor, disprect was manipulated. */
+ re->result->xof= 0;
+ re->result->yof= 0;
+ }
}
}
}
@@ -2176,7 +2274,7 @@ static void do_merge_fullsample(Render *re, bNodeTree *ntree)
}
/* ensure we get either composited result or the active layer */
- RE_GetResultImage(re, &rres);
+ RE_AcquireResultImage(re, &rres);
/* accumulate with filter, and clip */
mask= (1<<sample);
@@ -2195,6 +2293,8 @@ static void do_merge_fullsample(Render *re, bNodeTree *ntree)
}
}
+ RE_ReleaseResultImage(re);
+
/* show stuff */
if(sample!=re->osa-1) {
/* weak... the display callback wants an active renderlayer pointer... */
@@ -2206,9 +2306,11 @@ static void do_merge_fullsample(Render *re, bNodeTree *ntree)
break;
}
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
if(re->result->rectf)
MEM_freeN(re->result->rectf);
re->result->rectf= rectf;
+ BLI_rw_mutex_unlock(&re->resultmutex);
}
void RE_MergeFullSample(Render *re, Scene *sce, bNodeTree *ntree)
@@ -2309,9 +2411,12 @@ static void do_render_composite_fields_blur_3d(Render *re)
static void renderresult_stampinfo(Scene *scene)
{
RenderResult rres;
+ Render *re= RE_GetRender(scene->id.name);
+
/* this is the basic trick to get the displayed float or char rect from render result */
- RE_GetResultImage(RE_GetRender(scene->id.name), &rres);
+ RE_AcquireResultImage(re, &rres);
BKE_stamp_buf(scene, (unsigned char *)rres.rect32, rres.rectf, rres.rectx, rres.recty, 4);
+ RE_ReleaseResultImage(re);
}
static void do_render_seq(Render * re)
@@ -2327,6 +2432,8 @@ static void do_render_seq(Render * re)
recurs_depth--;
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
+
if(ibuf) {
if(ibuf->rect_float) {
if (!rr->rectf)
@@ -2369,6 +2476,8 @@ static void do_render_seq(Render * re)
else
rr->rect32= MEM_callocN(sizeof(int)*rr->rectx*rr->recty, "render_seq rect");
}
+
+ BLI_rw_mutex_unlock(&re->resultmutex);
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
@@ -2388,14 +2497,15 @@ static void do_render_all_options(Render *re)
re->stats_draw(re->sdh, &re->i);
re->display_draw(re->ddh, re->result, NULL);
-
}
else {
do_render_composite_fields_blur_3d(re);
}
/* for UI only */
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
renderresult_add_names(re->result);
+ BLI_rw_mutex_unlock(&re->resultmutex);
re->i.lastframetime= PIL_check_seconds_timer()- re->i.starttime;
@@ -2622,7 +2732,7 @@ static void do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh)
char name[FILE_MAX];
RenderResult rres;
- RE_GetResultImage(re, &rres);
+ RE_AcquireResultImage(re, &rres);
/* write movie or image */
if(BKE_imtype_is_movie(scene->r.imtype)) {
@@ -2686,6 +2796,8 @@ static void do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh)
}
}
+ RE_ReleaseResultImage(re);
+
BLI_timestr(re->i.lastframetime, name);
printf(" Time: %s\n", name);
fflush(stdout); /* needed for renderd !! (not anymore... (ton)) */
@@ -2723,7 +2835,8 @@ void RE_BlenderAnim(Render *re, Scene *scene, int sfra, int efra, int tfra)
do_write_image_or_movie(re, scene, mh);
}
} else {
- re->test_break(re->tbh);
+ if(re->test_break(re->tbh))
+ G.afbreek= 1;
}
}
} else {
@@ -2769,9 +2882,10 @@ void RE_BlenderAnim(Render *re, Scene *scene, int sfra, int efra, int tfra)
do_render_all_options(re);
- if(re->test_break(re->tbh) == 0) {
+ if(re->test_break(re->tbh) == 0)
do_write_image_or_movie(re, scene, mh);
- }
+ else
+ G.afbreek= 1;
if(G.afbreek==1) {
/* remove touched file */
@@ -3006,6 +3120,7 @@ static void external_render_3d(Render *re, RenderEngineType *type)
{
RenderEngine engine;
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
if(re->result==NULL || !(re->r.scemode & R_PREVIEWBUTS)) {
RE_FreeRenderResult(re->result);
@@ -3014,6 +3129,7 @@ static void external_render_3d(Render *re, RenderEngineType *type)
else
re->result= new_render_result(re, &re->disprect, 0, 0); // XXX re->r.scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE));
}
+ BLI_rw_mutex_unlock(&re->resultmutex);
if(re->result==NULL)
return;
@@ -3027,6 +3143,7 @@ static void external_render_3d(Render *re, RenderEngineType *type)
free_render_result(&engine.fullresult, engine.fullresult.first);
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
if(re->result->exrhandle) {
RenderResult *rr;
@@ -3042,5 +3159,6 @@ static void external_render_3d(Render *re, RenderEngineType *type)
read_render_result(re, 0);
}
+ BLI_rw_mutex_unlock(&re->resultmutex);
}
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index 5f8cf5504fa..b7832e74cd1 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -92,6 +92,7 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
{
DerivedMesh* dm;
ParticleKey state;
+ ParticleSimulationData sim = {re->scene, ob, psys, NULL};
ParticleData *pa=NULL;
float cfra = bsystem_time(re->scene, ob, (float)re->scene->r.cfra, 0.0);
int i, childexists;
@@ -120,7 +121,7 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
Mat4Invert(ob->imat, ob->obmat);
total_particles = psys->totpart+psys->totchild;
- psys->lattice=psys_get_lattice(re->scene,ob,psys);
+ psys->lattice=psys_get_lattice(&sim);
pd->point_tree = BLI_bvhtree_new(total_particles, 0.0, 4, 6);
alloc_point_data(pd, total_particles, data_used);
@@ -133,7 +134,7 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
for (i=0, pa=psys->particles; i < total_particles; i++, pa++) {
state.time = cfra;
- if(psys_get_particle_state(re->scene, ob, psys, i, &state, 0)) {
+ if(psys_get_particle_state(&sim, i, &state, 0)) {
VECCOPY(partco, state.co);
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index d2599f6050c..4ad4d6370f8 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -25,10 +25,12 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <float.h>
+#include <assert.h>
#include "MEM_guardedalloc.h"
@@ -57,6 +59,9 @@
#include "volumetric.h"
#include "RE_raytrace.h"
+#include "rayobject.h"
+#include "raycounter.h"
+
#define RAY_TRA 1
#define RAY_TRAFLIP 2
@@ -68,159 +73,396 @@
/* only to be used here in this file, it's for speed */
extern struct Render R;
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-
-static void vlr_face_coords(RayFace *face, float **v1, float **v2, float **v3, float **v4)
+static int test_break(void *data)
{
- VlakRen *vlr= (VlakRen*)face;
-
- *v1 = (vlr->v1)? vlr->v1->co: NULL;
- *v2 = (vlr->v2)? vlr->v2->co: NULL;
- *v3 = (vlr->v3)? vlr->v3->co: NULL;
- *v4 = (vlr->v4)? vlr->v4->co: NULL;
+ Render *re = (Render*)data;
+ return re->test_break(re->tbh);
}
-static int vlr_check_intersect(Isect *is, int ob, RayFace *face)
+static void RE_rayobject_config_control(RayObject *r, Render *re)
{
- ObjectInstanceRen *obi= RAY_OBJECT_GET((Render*)is->userdata, ob);
- VlakRen *vlr = (VlakRen*)face;
-
- /* for baking selected to active non-traceable materials might still
- * be in the raytree */
- if(!(vlr->mat->mode & MA_TRACEBLE))
- return 0;
-
- /* I know... cpu cycle waste, might do smarter once */
- if(is->mode==RE_RAY_MIRROR)
- return !(vlr->mat->mode & MA_ONLYCAST);
- else
- return (is->lay & obi->lay);
+ if(RE_rayobject_isRayAPI(r))
+ {
+ r = RE_rayobject_align( r );
+ r->control.data = re;
+ r->control.test_break = test_break;
+ }
}
-static int vlr_check_intersect_solid(Isect *is, int ob, RayFace *face)
+RayObject* RE_rayobject_create(Render *re, int type, int size)
{
- VlakRen *vlr = (VlakRen*)face;
+ RayObject * res = NULL;
- /* solid material types only */
- if (vlr->mat->material_type == MA_TYPE_SURFACE)
- return 1;
+ if(type == R_RAYSTRUCTURE_AUTO)
+ {
+ //TODO
+ //if(detect_simd())
+#ifdef __SSE__
+ type = R_RAYSTRUCTURE_SIMD_SVBVH;
+#else
+ type = R_RAYSTRUCTURE_VBVH;
+#endif
+ }
+
+#ifndef __SSE__
+ if(type == R_RAYSTRUCTURE_SIMD_SVBVH || type == R_RAYSTRUCTURE_SIMD_QBVH)
+ {
+ puts("Warning: Using VBVH (SSE was disabled at compile time)");
+ type = R_RAYSTRUCTURE_VBVH;
+ }
+#endif
+
+
+ if(type == R_RAYSTRUCTURE_OCTREE) //TODO dynamic ocres
+ res = RE_rayobject_octree_create(re->r.ocres, size);
+ else if(type == R_RAYSTRUCTURE_BLIBVH)
+ res = RE_rayobject_blibvh_create(size);
+ else if(type == R_RAYSTRUCTURE_VBVH)
+ res = RE_rayobject_vbvh_create(size);
+ else if(type == R_RAYSTRUCTURE_SIMD_SVBVH)
+ res = RE_rayobject_svbvh_create(size);
+ else if(type == R_RAYSTRUCTURE_SIMD_QBVH)
+ res = RE_rayobject_qbvh_create(size);
else
- return 0;
+ res = RE_rayobject_vbvh_create(size); //Fallback
+
+
+ if(res)
+ RE_rayobject_config_control( res, re );
+
+ return res;
}
-static float *vlr_get_transform(void *userdata, int i)
-{
- ObjectInstanceRen *obi= RAY_OBJECT_GET((Render*)userdata, i);
+#ifdef RE_RAYCOUNTER
+RayCounter re_rc_counter[BLENDER_MAX_THREADS];
+#endif
- return (obi->flag & R_TRANSFORMED)? (float*)obi->mat: NULL;
-}
void freeraytree(Render *re)
{
- if(re->raytree) {
- RE_ray_tree_free(re->raytree);
- re->raytree= NULL;
+ ObjectInstanceRen *obi;
+
+ if(re->raytree)
+ {
+ RE_rayobject_free(re->raytree);
+ re->raytree = NULL;
+ }
+ if(re->rayfaces)
+ {
+ MEM_freeN(re->rayfaces);
+ re->rayfaces = NULL;
+ }
+ if(re->rayprimitives)
+ {
+ MEM_freeN(re->rayprimitives);
+ re->rayprimitives = NULL;
+ }
+
+ for(obi=re->instancetable.first; obi; obi=obi->next)
+ {
+ ObjectRen *obr = obi->obr;
+ if(obr->raytree)
+ {
+ RE_rayobject_free(obr->raytree);
+ obr->raytree = NULL;
+ }
+ if(obr->rayfaces)
+ {
+ MEM_freeN(obr->rayfaces);
+ obr->rayfaces = NULL;
+ }
+ if(obi->raytree)
+ {
+ RE_rayobject_free(obi->raytree);
+ obi->raytree = NULL;
+ }
+ }
+
+#ifdef RE_RAYCOUNTER
+ {
+ RayCounter sum;
+ memset( &sum, 0, sizeof(sum) );
+ int i;
+ for(i=0; i<BLENDER_MAX_THREADS; i++)
+ RE_RC_MERGE(&sum, re_rc_counter+i);
+ RE_RC_INFO(&sum);
}
+#endif
}
-void makeraytree(Render *re)
+static int is_raytraceable_vlr(Render *re, VlakRen *vlr)
{
- ObjectInstanceRen *obi;
- ObjectRen *obr;
- VlakRen *vlr= NULL;
- float min[3], max[3], co1[3], co2[3], co3[3], co4[3];
- double lasttime= PIL_check_seconds_timer();
- int v, totv = 0, totface = 0;
+ if((re->flag & R_BAKE_TRACE) || (vlr->mat->mode & MA_TRACEBLE))
+ if(vlr->mat->material_type != MA_TYPE_WIRE)
+ return 1;
+ return 0;
+}
- INIT_MINMAX(min, max);
+static int is_raytraceable(Render *re, ObjectInstanceRen *obi)
+{
+ int v;
+ ObjectRen *obr = obi->obr;
- /* first min max raytree space */
- for(obi=re->instancetable.first; obi; obi=obi->next) {
- obr= obi->obr;
-
- if(re->excludeob && obr->ob == re->excludeob)
- continue;
-
- for(v=0;v<obr->totvlak;v++) {
- if((v & 255)==0) vlr= obr->vlaknodes[v>>8].vlak;
- else vlr++;
- /* baking selected to active needs non-traceable too */
- if((re->flag & R_BAKE_TRACE) || (vlr->mat->mode & MA_TRACEBLE)) {
- if(vlr->mat->material_type != MA_TYPE_WIRE) {
- VECCOPY(co1, vlr->v1->co);
- VECCOPY(co2, vlr->v2->co);
- VECCOPY(co3, vlr->v3->co);
-
- if(obi->flag & R_TRANSFORMED) {
- Mat4MulVecfl(obi->mat, co1);
- Mat4MulVecfl(obi->mat, co2);
- Mat4MulVecfl(obi->mat, co3);
- }
+ if(re->excludeob && obr->ob == re->excludeob)
+ return 0;
+
+ for(v=0;v<obr->totvlak;v++)
+ {
+ VlakRen *vlr = obr->vlaknodes[v>>8].vlak + (v&255);
+ if(is_raytraceable_vlr(re, vlr))
+ return 1;
+ }
+ return 0;
+}
- DO_MINMAX(co1, min, max);
- DO_MINMAX(co2, min, max);
- DO_MINMAX(co3, min, max);
- if(vlr->v4) {
- VECCOPY(co4, vlr->v4->co);
- if(obi->flag & R_TRANSFORMED)
- Mat4MulVecfl(obi->mat, co4);
- DO_MINMAX(co4, min, max);
- }
+RayObject* makeraytree_object(Render *re, ObjectInstanceRen *obi)
+{
+ //TODO
+ // out-of-memory safeproof
+ // break render
+ // update render stats
+ ObjectRen *obr = obi->obr;
+
+ if(obr->raytree == NULL)
+ {
+ RayObject *raytree;
+ RayFace *face = NULL;
+ VlakPrimitive *vlakprimitive = NULL;
+ int v;
+
+ //Count faces
+ int faces = 0;
+ for(v=0;v<obr->totvlak;v++)
+ {
+ VlakRen *vlr = obr->vlaknodes[v>>8].vlak + (v&255);
+ if(is_raytraceable_vlr(re, vlr))
+ faces++;
+ }
+ assert( faces > 0 );
- totface++;
+ //Create Ray cast accelaration structure
+ raytree = obr->raytree = RE_rayobject_create( re, re->r.raytrace_structure, faces );
+ if( (re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS) )
+ vlakprimitive = obr->rayprimitives = (VlakPrimitive*)MEM_callocN(faces*sizeof(VlakPrimitive), "ObjectRen primitives");
+ else
+ face = obr->rayfaces = (RayFace*)MEM_callocN(faces*sizeof(RayFace), "ObjectRen faces");
+
+ obr->rayobi = obi;
+
+ for(v=0;v<obr->totvlak;v++)
+ {
+ VlakRen *vlr = obr->vlaknodes[v>>8].vlak + (v&255);
+ if(is_raytraceable_vlr(re, vlr))
+ {
+ if( (re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS) )
+ {
+ RE_rayobject_add( raytree, RE_vlakprimitive_from_vlak( vlakprimitive, obi, vlr ) );
+ vlakprimitive++;
+ }
+ else
+ {
+ RE_rayface_from_vlak( face, obi, vlr );
+ RE_rayobject_add( raytree, RE_rayobject_unalignRayFace(face) );
+ face++;
}
}
}
+ RE_rayobject_done( raytree );
}
- re->raytree= RE_ray_tree_create(re->r.ocres, totface, min, max,
- vlr_face_coords, vlr_check_intersect, vlr_get_transform, re);
- if(min[0] > max[0]) { /* empty raytree */
- RE_ray_tree_done(re->raytree);
- return;
+ if((obi->flag & R_TRANSFORMED) && obi->raytree == NULL)
+ {
+ obi->transform_primitives = 0;
+ obi->raytree = RE_rayobject_instance_create( obr->raytree, obi->mat, obi, obi->obr->rayobi );
}
+
+ if(obi->raytree) return obi->raytree;
+ return obi->obr->raytree;
+}
+
+static int has_special_rayobject(Render *re, ObjectInstanceRen *obi)
+{
+ if( (obi->flag & R_TRANSFORMED) && (re->r.raytrace_options & R_RAYTRACE_USE_INSTANCES) )
+ {
+ ObjectRen *obr = obi->obr;
+ int v, faces = 0;
+
+ for(v=0;v<obr->totvlak;v++)
+ {
+ VlakRen *vlr = obr->vlaknodes[v>>8].vlak + (v&255);
+ if(is_raytraceable_vlr(re, vlr))
+ {
+ faces++;
+ if(faces > 4)
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+/*
+ * create a single raytrace structure with all faces
+ */
+static void makeraytree_single(Render *re)
+{
+ ObjectInstanceRen *obi;
+ RayObject *raytree;
+ RayFace *face = NULL;
+ VlakPrimitive *vlakprimitive = NULL;
+ int faces = 0, obs = 0, special = 0;
- for(obi=re->instancetable.first; obi; obi=obi->next) {
- obr= obi->obr;
+ for(obi=re->instancetable.first; obi; obi=obi->next)
+ if(is_raytraceable(re, obi))
+ {
+ int v;
+ ObjectRen *obr = obi->obr;
+ obs++;
+
+ if(has_special_rayobject(re, obi))
+ {
+ special++;
+ }
+ else
+ {
+ for(v=0;v<obr->totvlak;v++)
+ {
+ VlakRen *vlr = obr->vlaknodes[v>>8].vlak + (v&255);
+ if(is_raytraceable_vlr(re, vlr))
+ faces++;
+ }
+ }
+ }
+
+ if(faces + special == 0)
+ {
+ re->raytree = RE_rayobject_empty_create();
+ return;
+ }
+
+ //Create raytree
+ raytree = re->raytree = RE_rayobject_create( re, re->r.raytrace_structure, faces+special );
- if(re->excludeob && obr->ob == re->excludeob)
- continue;
+ if( (re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS) )
+ {
+ vlakprimitive = re->rayprimitives = (VlakPrimitive*)MEM_callocN(faces*sizeof(VlakPrimitive), "Raytrace vlak-primitives");
+ }
+ else
+ {
+ face = re->rayfaces = (RayFace*)MEM_callocN(faces*sizeof(RayFace), "Render ray faces");
+ }
+
+ for(obi=re->instancetable.first; obi; obi=obi->next)
+ if(is_raytraceable(re, obi))
+ {
+ if(test_break(re))
+ break;
- for(v=0; v<obr->totvlak; v++, totv++) {
- if((v & 255)==0) {
- double time= PIL_check_seconds_timer();
+ if(has_special_rayobject(re, obi))
+ {
+ RayObject *obj = makeraytree_object(re, obi);
+ RE_rayobject_add( re->raytree, obj );
+ }
+ else
+ {
+ int v;
+ ObjectRen *obr = obi->obr;
+
+ if(obi->flag & R_TRANSFORMED)
+ {
+ obi->transform_primitives = 1;
+ }
- vlr= obr->vlaknodes[v>>8].vlak;
- if(re->test_break(re->tbh))
- break;
- if(time-lasttime>1.0f) {
- char str[32];
- sprintf(str, "Filling Octree: %d", totv);
- re->i.infostr= str;
- re->stats_draw(re->sdh, &re->i);
- re->i.infostr= NULL;
- lasttime= time;
+ for(v=0;v<obr->totvlak;v++)
+ {
+ VlakRen *vlr = obr->vlaknodes[v>>8].vlak + (v&255);
+ if(is_raytraceable_vlr(re, vlr))
+ {
+ if( (re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS) )
+ {
+ RayObject *obj = RE_vlakprimitive_from_vlak( vlakprimitive, obi, vlr );
+ RE_rayobject_add( raytree, obj );
+ vlakprimitive++;
+ }
+ else
+ {
+ RE_rayface_from_vlak(face, obi, vlr);
+ if((obi->flag & R_TRANSFORMED))
+ {
+ Mat4MulVecfl(obi->mat, face->v1);
+ Mat4MulVecfl(obi->mat, face->v2);
+ Mat4MulVecfl(obi->mat, face->v3);
+ if(RE_rayface_isQuad(face))
+ Mat4MulVecfl(obi->mat, face->v4);
+ }
+
+ RE_rayobject_add( raytree, RE_rayobject_unalignRayFace(face) );
+ face++;
+ }
}
}
- else vlr++;
-
- if((re->flag & R_BAKE_TRACE) || (vlr->mat->mode & MA_TRACEBLE))
- if(vlr->mat->material_type != MA_TYPE_WIRE)
- RE_ray_tree_add_face(re->raytree, RAY_OBJECT_SET(re, obi), vlr);
}
}
+
+ if(!test_break(re))
+ {
+ re->i.infostr= "Raytree.. building";
+ re->stats_draw(re->sdh, &re->i);
- RE_ray_tree_done(re->raytree);
+ RE_rayobject_done( raytree );
+ }
+}
+
+void makeraytree(Render *re)
+{
+ float min[3], max[3], sub[3];
+ int i;
- re->i.infostr= NULL;
+ re->i.infostr= "Raytree.. preparing";
re->stats_draw(re->sdh, &re->i);
+
+ /* disable options not yet suported by octree,
+ they might actually never be supported (unless people really need it) */
+ if(re->r.raytrace_structure == R_RAYSTRUCTURE_OCTREE)
+ re->r.raytrace_options &= ~( R_RAYTRACE_USE_INSTANCES | R_RAYTRACE_USE_LOCAL_COORDS);
+
+ BENCH(makeraytree_single(re), tree_build);
+ if(test_break(re))
+ {
+ freeraytree(re);
+
+ re->i.infostr= "Raytree building canceled";
+ re->stats_draw(re->sdh, &re->i);
+ }
+ else
+ {
+ //Calculate raytree max_size
+ //This is ONLY needed to kept a bogus behaviour of SUN and HEMI lights
+ RE_rayobject_merge_bb( re->raytree, min, max );
+ for(i=0; i<3; i++)
+ {
+ min[i] += 0.01f;
+ max[i] += 0.01f;
+ sub[i] = max[i]-min[i];
+ }
+ re->maxdist = sqrt( sub[0]*sub[0] + sub[1]*sub[1] + sub[2]*sub[2] );
+
+ re->i.infostr= "Raytree finished";
+ re->stats_draw(re->sdh, &re->i);
+ }
+
+#ifdef RE_RAYCOUNTER
+ memset( re_rc_counter, 0, sizeof(re_rc_counter) );
+#endif
}
+
+
void shade_ray(Isect *is, ShadeInput *shi, ShadeResult *shr)
{
- VlakRen *vlr= (VlakRen*)is->face;
- ObjectInstanceRen *obi= RAY_OBJECT_GET(&R, is->ob);
+ ObjectInstanceRen *obi= (ObjectInstanceRen*)is->hit.ob;
+ VlakRen *vlr= (VlakRen*)is->hit.face;
int osatex= 0;
/* set up view vector */
@@ -450,7 +692,7 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, flo
ShadeResult shr;
Isect isec;
float f, f1, fr, fg, fb;
- float ref[3], maxsize=RE_ray_tree_max_size(R.raytree);
+ float ref[3];
float dist_mir = origshi->mat->dist_mir;
/* Warning, This is not that nice, and possibly a bit slow for every ray,
@@ -459,20 +701,17 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, flo
/* end warning! - Campbell */
VECCOPY(isec.start, start);
- if (dist_mir > 0.0) {
- isec.end[0]= start[0]+dist_mir*vec[0];
- isec.end[1]= start[1]+dist_mir*vec[1];
- isec.end[2]= start[2]+dist_mir*vec[2];
- } else {
- isec.end[0]= start[0]+maxsize*vec[0];
- isec.end[1]= start[1]+maxsize*vec[1];
- isec.end[2]= start[2]+maxsize*vec[2];
- }
+ VECCOPY(isec.vec, vec );
+ isec.labda = dist_mir > 0 ? dist_mir : RE_RAYTRACE_MAXDIST;
isec.mode= RE_RAY_MIRROR;
- isec.faceorig= (RayFace*)vlr;
- isec.oborig= RAY_OBJECT_SET(&R, obi);
+ isec.skip = RE_SKIP_VLR_NEIGHBOUR | RE_SKIP_VLR_RENDER_CHECK;
+ isec.hint = 0;
+
+ isec.orig.ob = obi;
+ isec.orig.face = vlr;
+ RE_RC_INIT(isec, shi);
- if(RE_ray_tree_intersect(R.raytree, &isec)) {
+ if(RE_rayobject_raycast(R.raytree, &isec)) {
float d= 1.0f;
shi.mask= origshi->mask;
@@ -596,6 +835,7 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, flo
else {
ray_fadeout_endcolor(col, origshi, &shi, origshr, &isec, vec);
}
+ RE_RC_MERGE(&origshi->raycounter, &shi.raycounter);
}
/* **************** jitter blocks ********** */
@@ -1214,7 +1454,6 @@ void ray_trace(ShadeInput *shi, ShadeResult *shr)
do_tra= ((shi->mat->mode & MA_TRANSP) && (shi->mat->mode & MA_RAYTRANSP) && shr->alpha!=1.0f);
do_mir= ((shi->mat->mode & MA_RAYMIRROR) && shi->ray_mirror!=0.0f);
-
/* raytrace mirror amd refract like to separate the spec color */
if(shi->combinedflag & SCE_PASS_SPEC)
@@ -1314,8 +1553,9 @@ static void ray_trace_shadow_tra(Isect *is, ShadeInput *origshi, int depth, int
if it has col[3]>0.0f continue. so exit when alpha is full */
ShadeInput shi;
ShadeResult shr;
-
- if(RE_ray_tree_intersect(R.raytree, is)) {
+ float initial_labda = is->labda;
+
+ if(RE_rayobject_raycast(R.raytree, is)) {
float d= 1.0f;
/* we got a face */
@@ -1343,18 +1583,22 @@ static void ray_trace_shadow_tra(Isect *is, ShadeInput *origshi, int depth, int
/* mix colors based on shadfac (rgb + amount of light factor) */
addAlphaLight(is->col, shr.diff, shr.alpha, d*shi.mat->filter);
} else if (shi.mat->material_type == MA_TYPE_VOLUME) {
- addAlphaLight(is->col, shr.combined, shr.alpha, 1.0f);
+ QUATCOPY(is->col, shr.combined);
+ is->col[3] = 1.f;
}
if(depth>0 && is->col[3]>0.0f) {
/* adapt isect struct */
VECCOPY(is->start, shi.co);
- is->oborig= RAY_OBJECT_SET(&R, shi.obi);
- is->faceorig= (RayFace*)shi.vlr;
+ is->labda = initial_labda-is->labda;
+ is->orig.ob = shi.obi;
+ is->orig.face = shi.vlr;
ray_trace_shadow_tra(is, origshi, depth-1, traflag | RAY_TRA);
}
+
+ RE_RC_MERGE(&origshi->raycounter, &shi.raycounter);
}
}
@@ -1367,9 +1611,11 @@ int ray_trace_shadow_rad(ShadeInput *ship, ShadeResult *shr)
Isect isec;
ShadeInput shi;
ShadeResult shr_t;
- float vec[3], accum[3], div= 0.0f, maxsize= RE_ray_tree_max_size(R.raytree);
+ float vec[3], accum[3], div= 0.0f;
int a;
+ assert(0);
+
if(only_one) {
return 0;
}
@@ -1377,8 +1623,13 @@ int ray_trace_shadow_rad(ShadeInput *ship, ShadeResult *shr)
accum[0]= accum[1]= accum[2]= 0.0f;
isec.mode= RE_RAY_MIRROR;
- isec.faceorig= (RayFace*)ship->vlr;
- isec.oborig= RAY_OBJECT_SET(&R, ship->obi);
+ isec.orig.ob = ship->obi;
+ isec.orig.face = ship->vlr;
+ isec.hint = 0;
+
+ VECCOPY(isec.start, ship->co);
+
+ RE_RC_INIT(isec, shi);
for(a=0; a<8*8; a++) {
@@ -1390,12 +1641,11 @@ int ray_trace_shadow_rad(ShadeInput *ship, ShadeResult *shr)
vec[1]-= vec[1];
vec[2]-= vec[2];
}
- VECCOPY(isec.start, ship->co);
- isec.end[0]= isec.start[0] + maxsize*vec[0];
- isec.end[1]= isec.start[1] + maxsize*vec[1];
- isec.end[2]= isec.start[2] + maxsize*vec[2];
-
- if(RE_ray_tree_intersect(R.raytree, &isec)) {
+
+ VECCOPY(isec.vec, vec );
+ isec.labda = RE_RAYTRACE_MAXDIST;
+
+ if(RE_rayobject_raycast(R.raytree, &isec)) {
float fac;
/* Warning, This is not that nice, and possibly a bit slow for every ray,
@@ -1568,6 +1818,7 @@ static float *sphere_sampler(int type, int resol, int thread, int xs, int ys)
static void ray_ao_qmc(ShadeInput *shi, float *shadfac)
{
Isect isec;
+ RayHint point_hint;
QMCSampler *qsa=NULL;
float samp3d[3];
float up[3], side[3], dir[3], nrm[3];
@@ -1583,13 +1834,25 @@ static void ray_ao_qmc(ShadeInput *shi, float *shadfac)
float dxyview[3], skyadded=0, div;
int aocolor;
- isec.faceorig= (RayFace*)shi->vlr;
- isec.oborig= RAY_OBJECT_SET(&R, shi->obi);
- isec.face_last= NULL;
- isec.ob_last= 0;
+ RE_RC_INIT(isec, *shi);
+ isec.orig.ob = shi->obi;
+ isec.orig.face = shi->vlr;
+ isec.skip = RE_SKIP_VLR_NEIGHBOUR | RE_SKIP_VLR_RENDER_CHECK | RE_SKIP_VLR_NON_SOLID_MATERIAL;
+ isec.hint = 0;
+
+ isec.hit.ob = 0;
+ isec.hit.face = 0;
+
+ isec.last_hit = NULL;
+
isec.mode= (R.wrld.aomode & WO_AODIST)?RE_RAY_SHADOW_TRA:RE_RAY_SHADOW;
isec.lay= -1;
+ VECCOPY(isec.start, shi->co);
+ RE_rayobject_hint_bb( R.raytree, &point_hint, isec.start, isec.start );
+ isec.hint = &point_hint;
+
+
shadfac[0]= shadfac[1]= shadfac[2]= 0.0f;
/* prevent sky colors to be added for only shadow (shadow becomes alpha) */
@@ -1627,6 +1890,7 @@ static void ray_ao_qmc(ShadeInput *shi, float *shadfac)
QMC_initPixel(qsa, shi->thread);
+
while (samples < max_samples) {
/* sampling, returns quasi-random vector in unit hemisphere */
@@ -1638,14 +1902,14 @@ static void ray_ao_qmc(ShadeInput *shi, float *shadfac)
Normalize(dir);
- VECCOPY(isec.start, shi->co);
- isec.end[0] = shi->co[0] - maxdist*dir[0];
- isec.end[1] = shi->co[1] - maxdist*dir[1];
- isec.end[2] = shi->co[2] - maxdist*dir[2];
+ isec.vec[0] = -dir[0];
+ isec.vec[1] = -dir[1];
+ isec.vec[2] = -dir[2];
+ isec.labda = maxdist;
prev = fac;
- if(RE_ray_tree_intersect_check(R.raytree, &isec, vlr_check_intersect_solid)) {
+ if(RE_rayobject_raycast(R.raytree, &isec)) {
if (R.wrld.aomode & WO_AODIST) fac+= exp(-isec.labda*R.wrld.aodistfac);
else fac+= 1.0f;
}
@@ -1705,18 +1969,29 @@ static void ray_ao_qmc(ShadeInput *shi, float *shadfac)
static void ray_ao_spheresamp(ShadeInput *shi, float *shadfac)
{
Isect isec;
+ RayHint point_hint;
float *vec, *nrm, div, bias, sh=0.0f;
float maxdist = R.wrld.aodist;
float dxyview[3];
int j= -1, tot, actual=0, skyadded=0, aocolor, resol= R.wrld.aosamp;
- isec.faceorig= (RayFace*)shi->vlr;
- isec.oborig= RAY_OBJECT_SET(&R, shi->obi);
- isec.face_last= NULL;
- isec.ob_last= 0;
+ RE_RC_INIT(isec, *shi);
+ isec.orig.ob = shi->obi;
+ isec.orig.face = shi->vlr;
+ isec.skip = RE_SKIP_VLR_NEIGHBOUR | RE_SKIP_VLR_RENDER_CHECK;
+ isec.hint = 0;
+
+ isec.hit.ob = 0;
+ isec.hit.face = 0;
+
+ isec.last_hit = NULL;
+
isec.mode= (R.wrld.aomode & WO_AODIST)?RE_RAY_SHADOW_TRA:RE_RAY_SHADOW;
isec.lay= -1;
+ VECCOPY(isec.start, shi->co);
+ RE_rayobject_hint_bb( R.raytree, &point_hint, isec.start, isec.start );
+ isec.hint = &point_hint;
shadfac[0]= shadfac[1]= shadfac[2]= 0.0f;
@@ -1763,14 +2038,14 @@ static void ray_ao_spheresamp(ShadeInput *shi, float *shadfac)
actual++;
- /* always set start/end, RE_ray_tree_intersect clips it */
- VECCOPY(isec.start, shi->co);
- isec.end[0] = shi->co[0] - maxdist*vec[0];
- isec.end[1] = shi->co[1] - maxdist*vec[1];
- isec.end[2] = shi->co[2] - maxdist*vec[2];
+ /* always set start/vec/labda */
+ isec.vec[0] = -vec[0];
+ isec.vec[1] = -vec[1];
+ isec.vec[2] = -vec[2];
+ isec.labda = maxdist;
/* do the trace */
- if(RE_ray_tree_intersect_check(R.raytree, &isec, vlr_check_intersect_solid)) {
+ if(RE_rayobject_raycast(R.raytree, &isec)) {
if (R.wrld.aomode & WO_AODIST) sh+= exp(-isec.labda*R.wrld.aodistfac);
else sh+= 1.0f;
}
@@ -1876,12 +2151,15 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, float *lampco, float *
int samples=0;
float samp3d[3];
- float fac=0.0f, vec[3];
+ float fac=0.0f, vec[3], end[3];
float colsq[4];
float adapt_thresh = lar->adapt_thresh;
int min_adapt_samples=4, max_samples = lar->ray_totsamp;
float *co;
- int do_soft=1, full_osa=0;
+ int do_soft=1, full_osa=0, i;
+
+ float min[3], max[3];
+ RayHint bb_hint;
float jitco[RE_MAX_OSA][3];
int totjitco;
@@ -1900,7 +2178,8 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, float *lampco, float *
else max_samples = 1;
} else {
if (do_soft) max_samples = lar->ray_totsamp;
- else max_samples = (R.osa > 4)?R.osa:5;
+ else if (shi->depth == 0) max_samples = (R.osa > 4)?R.osa:5;
+ else max_samples = 1;
}
ray_shadow_jittered_coords(shi, max_samples, jitco, &totjitco);
@@ -1912,13 +2191,22 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, float *lampco, float *
qsa = get_thread_qmcsampler(&R, shi->thread, SAMP_TYPE_HAMMERSLEY, max_samples);
QMC_initPixel(qsa, shi->thread);
+
+ INIT_MINMAX(min, max);
+ for(i=0; i<totjitco; i++)
+ {
+ DO_MINMAX(jitco[i], min, max);
+ }
+ RE_rayobject_hint_bb( R.raytree, &bb_hint, min, max);
+ isec->hint = &bb_hint;
+ isec->skip = RE_SKIP_VLR_NEIGHBOUR | RE_SKIP_VLR_RENDER_CHECK;
VECCOPY(vec, lampco);
-
while (samples < max_samples) {
- isec->faceorig= (RayFace*)shi->vlr;
- isec->oborig= RAY_OBJECT_SET(&R, shi->obi);
+
+ isec->orig.ob = shi->obi;
+ isec->orig.face = shi->vlr;
/* manually jitter the start shading co-ord per sample
* based on the pre-generated OSA texture sampling offsets,
@@ -1954,11 +2242,11 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, float *lampco, float *
/* align samples to lamp vector */
Mat3MulVecfl(lar->mat, samp3d);
}
- isec->end[0]= vec[0]+samp3d[0];
- isec->end[1]= vec[1]+samp3d[1];
- isec->end[2]= vec[2]+samp3d[2];
+ end[0] = vec[0]+samp3d[0];
+ end[1] = vec[1]+samp3d[1];
+ end[2] = vec[2]+samp3d[2];
} else {
- VECCOPY(isec->end, vec);
+ VECCOPY(end, vec);
}
if(shi->strand) {
@@ -1966,7 +2254,7 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, float *lampco, float *
float jitbias= 0.5f*(VecLength(shi->dxco) + VecLength(shi->dyco));
float v[3];
- VECSUB(v, co, isec->end);
+ VECSUB(v, co, end);
Normalize(v);
co[0] -= jitbias*v[0];
@@ -1975,6 +2263,10 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, float *lampco, float *
}
VECCOPY(isec->start, co);
+ isec->vec[0] = end[0]-isec->start[0];
+ isec->vec[1] = end[1]-isec->start[1];
+ isec->vec[2] = end[2]-isec->start[2];
+ isec->labda = 1.0f; // * Normalize(isec->vec);
/* trace the ray */
if(isec->mode==RE_RAY_SHADOW_TRA) {
@@ -1993,7 +2285,7 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, float *lampco, float *
colsq[2] += isec->col[2]*isec->col[2];
}
else {
- if( RE_ray_tree_intersect(R.raytree, isec) ) fac+= 1.0f;
+ if( RE_rayobject_raycast(R.raytree, isec) ) fac+= 1.0f;
}
samples++;
@@ -2033,6 +2325,7 @@ static void ray_shadow_jitter(ShadeInput *shi, LampRen *lar, float *lampco, floa
float *jitlamp;
float fac=0.0f, div=0.0f, vec[3];
int a, j= -1, mask;
+ RayHint point_hint;
if(isec->mode==RE_RAY_SHADOW_TRA) {
shadfac[0]= shadfac[1]= shadfac[2]= shadfac[3]= 0.0f;
@@ -2049,6 +2342,12 @@ static void ray_shadow_jitter(ShadeInput *shi, LampRen *lar, float *lampco, floa
if(a==4) mask |= (mask>>4)|(mask>>8);
else if(a==9) mask |= (mask>>9);
+ VECCOPY(isec->start, shi->co);
+ isec->orig.ob = shi->obi;
+ isec->orig.face = shi->vlr;
+ RE_rayobject_hint_bb( R.raytree, &point_hint, isec->start, isec->start );
+ isec->hint = &point_hint;
+
while(a--) {
if(R.r.mode & R_OSA) {
@@ -2060,19 +2359,17 @@ static void ray_shadow_jitter(ShadeInput *shi, LampRen *lar, float *lampco, floa
}
}
- isec->faceorig= (RayFace*)shi->vlr;
- isec->oborig= RAY_OBJECT_SET(&R, shi->obi);
-
vec[0]= jitlamp[0];
vec[1]= jitlamp[1];
vec[2]= 0.0f;
Mat3MulVecfl(lar->mat, vec);
- /* set start and end, RE_ray_tree_intersect clips it */
- VECCOPY(isec->start, shi->co);
- isec->end[0]= lampco[0]+vec[0];
- isec->end[1]= lampco[1]+vec[1];
- isec->end[2]= lampco[2]+vec[2];
+ /* set start and vec */
+ isec->vec[0] = vec[0]+lampco[0]-isec->start[0];
+ isec->vec[1] = vec[1]+lampco[1]-isec->start[1];
+ isec->vec[2] = vec[2]+lampco[2]-isec->start[2];
+ isec->labda = 1.0f;
+ isec->skip = RE_SKIP_VLR_NEIGHBOUR | RE_SKIP_VLR_RENDER_CHECK;
if(isec->mode==RE_RAY_SHADOW_TRA) {
/* isec.col is like shadfac, so defines amount of light (0.0 is full shadow) */
@@ -2085,7 +2382,7 @@ static void ray_shadow_jitter(ShadeInput *shi, LampRen *lar, float *lampco, floa
shadfac[2] += isec->col[2];
shadfac[3] += isec->col[3];
}
- else if( RE_ray_tree_intersect(R.raytree, isec) ) fac+= 1.0f;
+ else if( RE_rayobject_raycast(R.raytree, isec) ) fac+= 1.0f;
div+= 1.0f;
jitlamp+= 2;
@@ -2109,11 +2406,13 @@ static void ray_shadow_jitter(ShadeInput *shi, LampRen *lar, float *lampco, floa
void ray_shadow(ShadeInput *shi, LampRen *lar, float *shadfac)
{
Isect isec;
- float lampco[3], maxsize;
+ float lampco[3];
/* setup isec */
+ RE_RC_INIT(isec, *shi);
if(shi->mat->mode & MA_SHADOW_TRA) isec.mode= RE_RAY_SHADOW_TRA;
else isec.mode= RE_RAY_SHADOW;
+ isec.hint = 0;
if(lar->mode & (LA_LAYER|LA_LAYER_SHADOW))
isec.lay= lar->lay;
@@ -2122,19 +2421,29 @@ void ray_shadow(ShadeInput *shi, LampRen *lar, float *shadfac)
/* only when not mir tracing, first hit optimm */
if(shi->depth==0) {
- isec.face_last= (RayFace*)lar->vlr_last[shi->thread];
- isec.ob_last= RAY_OBJECT_SET(&R, lar->obi_last[shi->thread]);
+ isec.last_hit = lar->last_hit[shi->thread];
}
else {
- isec.face_last= NULL;
- isec.ob_last= 0;
+ isec.last_hit = NULL;
}
if(lar->type==LA_SUN || lar->type==LA_HEMI) {
- maxsize= RE_ray_tree_max_size(R.raytree);
- lampco[0]= shi->co[0] - maxsize*lar->vec[0];
- lampco[1]= shi->co[1] - maxsize*lar->vec[1];
- lampco[2]= shi->co[2] - maxsize*lar->vec[2];
+ /* jitter and QMC sampling add a displace vector to the lamp position
+ * that's incorrect because a SUN lamp does not has an exact position
+ * and the displace should be done at the ray vector instead of the
+ * lamp position.
+ * This is easily verified by noticing that shadows of SUN lights change
+ * with the scene BB.
+ *
+ * This was detected during SoC 2009 - Raytrace Optimization, but to keep
+ * consistency with older render code it wasn't removed.
+ *
+ * If the render code goes through some recode/serious bug-fix then this
+ * is something to consider!
+ */
+ lampco[0]= shi->co[0] - R.maxdist*lar->vec[0];
+ lampco[1]= shi->co[1] - R.maxdist*lar->vec[1];
+ lampco[2]= shi->co[2] - R.maxdist*lar->vec[2];
}
else {
VECCOPY(lampco, lar->co);
@@ -2147,13 +2456,15 @@ void ray_shadow(ShadeInput *shi, LampRen *lar, float *shadfac)
} else {
if(lar->ray_totsamp<2) {
- isec.faceorig= (RayFace*)shi->vlr;
- isec.oborig= RAY_OBJECT_SET(&R, shi->obi);
+ isec.orig.ob = shi->obi;
+ isec.orig.face = shi->vlr;
+
shadfac[3]= 1.0f; // 1.0=full light
/* set up isec vec */
VECCOPY(isec.start, shi->co);
- VECCOPY(isec.end, lampco);
+ VECSUB(isec.vec, lampco, isec.start);
+ isec.labda = 1.0f;
if(isec.mode==RE_RAY_SHADOW_TRA) {
/* isec.col is like shadfac, so defines amount of light (0.0 is full shadow) */
@@ -2163,7 +2474,8 @@ void ray_shadow(ShadeInput *shi, LampRen *lar, float *shadfac)
ray_trace_shadow_tra(&isec, shi, DEPTH_SHADOW_TRA, 0);
QUATCOPY(shadfac, isec.col);
}
- else if(RE_ray_tree_intersect(R.raytree, &isec)) shadfac[3]= 0.0f;
+ else if(RE_rayobject_raycast(R.raytree, &isec))
+ shadfac[3]= 0.0f;
}
else {
ray_shadow_jitter(shi, lar, lampco, shadfac, &isec);
@@ -2172,8 +2484,7 @@ void ray_shadow(ShadeInput *shi, LampRen *lar, float *shadfac)
/* for first hit optim, set last interesected shadow face */
if(shi->depth==0) {
- lar->vlr_last[shi->thread]= (VlakRen*)isec.face_last;
- lar->obi_last[shi->thread]= RAY_OBJECT_GET(&R, isec.ob_last);
+ lar->last_hit[shi->thread] = isec.last_hit;
}
}
@@ -2183,31 +2494,34 @@ void ray_shadow(ShadeInput *shi, LampRen *lar, float *shadfac)
static void ray_translucent(ShadeInput *shi, LampRen *lar, float *distfac, float *co)
{
Isect isec;
- float lampco[3], maxsize;
+ float lampco[3];
+
+ assert(0);
/* setup isec */
+ RE_RC_INIT(isec, *shi);
isec.mode= RE_RAY_SHADOW_TRA;
+ isec.hint = 0;
if(lar->mode & LA_LAYER) isec.lay= lar->lay; else isec.lay= -1;
if(lar->type==LA_SUN || lar->type==LA_HEMI) {
- maxsize= RE_ray_tree_max_size(R.raytree);
- lampco[0]= shi->co[0] - maxsize*lar->vec[0];
- lampco[1]= shi->co[1] - maxsize*lar->vec[1];
- lampco[2]= shi->co[2] - maxsize*lar->vec[2];
+ lampco[0]= shi->co[0] - RE_RAYTRACE_MAXDIST*lar->vec[0];
+ lampco[1]= shi->co[1] - RE_RAYTRACE_MAXDIST*lar->vec[1];
+ lampco[2]= shi->co[2] - RE_RAYTRACE_MAXDIST*lar->vec[2];
}
else {
VECCOPY(lampco, lar->co);
}
- isec.faceorig= (RayFace*)shi->vlr;
- isec.oborig= RAY_OBJECT_SET(&R, shi->obi);
+ isec.orig.ob = shi->obi;
+ isec.orig.face = shi->vlr;
/* set up isec vec */
VECCOPY(isec.start, shi->co);
VECCOPY(isec.end, lampco);
- if(RE_ray_tree_intersect(R.raytree, &isec)) {
+ if(RE_rayobject_raycast(R.raytree, &isec)) {
/* we got a face */
/* render co */
diff --git a/source/blender/render/intern/source/raytrace.c b/source/blender/render/intern/source/raytrace.c
deleted file mode 100644
index b34fe6a7039..00000000000
--- a/source/blender/render/intern/source/raytrace.c
+++ /dev/null
@@ -1,1442 +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) 1990-1998 NeoGeo BV.
- * All rights reserved.
- *
- * Contributors: 2004/2005 Blender Foundation, full recode
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/* IMPORTANT NOTE: this code must be independent of any other render code
- to use it outside the renderer! */
-
-#include <math.h>
-#include <string.h>
-#include <stdlib.h>
-#include <float.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "DNA_material_types.h"
-
-#include "BKE_utildefines.h"
-
-#include "BLI_arithb.h"
-
-#include "RE_raytrace.h"
-
-/* ********** structs *************** */
-
-#define BRANCH_ARRAY 1024
-#define NODE_ARRAY 4096
-
-typedef struct Branch
-{
- struct Branch *b[8];
-} Branch;
-
-typedef struct OcVal
-{
- short ocx, ocy, ocz;
-} OcVal;
-
-typedef struct Node
-{
- struct RayFace *v[8];
- int ob[8];
- struct OcVal ov[8];
- struct Node *next;
-} Node;
-
-typedef struct Octree {
- struct Branch **adrbranch;
- struct Node **adrnode;
- float ocsize; /* ocsize: mult factor, max size octree */
- float ocfacx,ocfacy,ocfacz;
- float min[3], max[3];
- int ocres;
- int branchcount, nodecount;
- char *ocface; /* during building only */
- RayCoordsFunc coordsfunc;
- RayCheckFunc checkfunc;
- RayObjectTransformFunc transformfunc;
- void *userdata;
-} Octree;
-
-/* ******** globals ***************** */
-
-/* just for statistics */
-static int raycount;
-static int accepted, rejected, coherent_ray;
-
-
-/* **************** ocval method ******************* */
-/* within one octree node, a set of 3x15 bits defines a 'boundbox' to OR with */
-
-#define OCVALRES 15
-#define BROW16(min, max) (((max)>=OCVALRES? 0xFFFF: (1<<(max+1))-1) - ((min>0)? ((1<<(min))-1):0) )
-
-static void calc_ocval_face(float *v1, float *v2, float *v3, float *v4, short x, short y, short z, OcVal *ov)
-{
- float min[3], max[3];
- int ocmin, ocmax;
-
- VECCOPY(min, v1);
- VECCOPY(max, v1);
- DO_MINMAX(v2, min, max);
- DO_MINMAX(v3, min, max);
- if(v4) {
- DO_MINMAX(v4, min, max);
- }
-
- ocmin= OCVALRES*(min[0]-x);
- ocmax= OCVALRES*(max[0]-x);
- ov->ocx= BROW16(ocmin, ocmax);
-
- ocmin= OCVALRES*(min[1]-y);
- ocmax= OCVALRES*(max[1]-y);
- ov->ocy= BROW16(ocmin, ocmax);
-
- ocmin= OCVALRES*(min[2]-z);
- ocmax= OCVALRES*(max[2]-z);
- ov->ocz= BROW16(ocmin, ocmax);
-
-}
-
-static void calc_ocval_ray(OcVal *ov, float xo, float yo, float zo, float *vec1, float *vec2)
-{
- int ocmin, ocmax;
-
- if(vec1[0]<vec2[0]) {
- ocmin= OCVALRES*(vec1[0] - xo);
- ocmax= OCVALRES*(vec2[0] - xo);
- } else {
- ocmin= OCVALRES*(vec2[0] - xo);
- ocmax= OCVALRES*(vec1[0] - xo);
- }
- ov->ocx= BROW16(ocmin, ocmax);
-
- if(vec1[1]<vec2[1]) {
- ocmin= OCVALRES*(vec1[1] - yo);
- ocmax= OCVALRES*(vec2[1] - yo);
- } else {
- ocmin= OCVALRES*(vec2[1] - yo);
- ocmax= OCVALRES*(vec1[1] - yo);
- }
- ov->ocy= BROW16(ocmin, ocmax);
-
- if(vec1[2]<vec2[2]) {
- ocmin= OCVALRES*(vec1[2] - zo);
- ocmax= OCVALRES*(vec2[2] - zo);
- } else {
- ocmin= OCVALRES*(vec2[2] - zo);
- ocmax= OCVALRES*(vec1[2] - zo);
- }
- ov->ocz= BROW16(ocmin, ocmax);
-}
-
-/* ************* octree ************** */
-
-static Branch *addbranch(Octree *oc, Branch *br, short ocb)
-{
- int index;
-
- if(br->b[ocb]) return br->b[ocb];
-
- oc->branchcount++;
- index= oc->branchcount>>12;
-
- if(oc->adrbranch[index]==NULL)
- oc->adrbranch[index]= MEM_callocN(4096*sizeof(Branch), "new oc branch");
-
- if(oc->branchcount>= BRANCH_ARRAY*4096) {
- printf("error; octree branches full\n");
- oc->branchcount=0;
- }
-
- return br->b[ocb]= oc->adrbranch[index]+(oc->branchcount & 4095);
-}
-
-static Node *addnode(Octree *oc)
-{
- int index;
-
- oc->nodecount++;
- index= oc->nodecount>>12;
-
- if(oc->adrnode[index]==NULL)
- oc->adrnode[index]= MEM_callocN(4096*sizeof(Node),"addnode");
-
- if(oc->nodecount> NODE_ARRAY*NODE_ARRAY) {
- printf("error; octree nodes full\n");
- oc->nodecount=0;
- }
-
- return oc->adrnode[index]+(oc->nodecount & 4095);
-}
-
-static int face_in_node(RayFace *face, short x, short y, short z, float rtf[][3])
-{
- static float nor[3], d;
- float fx, fy, fz;
-
- // init static vars
- if(face) {
- CalcNormFloat(rtf[0], rtf[1], rtf[2], nor);
- d= -nor[0]*rtf[0][0] - nor[1]*rtf[0][1] - nor[2]*rtf[0][2];
- return 0;
- }
-
- fx= x;
- fy= y;
- fz= z;
-
- if((fx)*nor[0] + (fy)*nor[1] + (fz)*nor[2] + d > 0.0f) {
- if((fx+1)*nor[0] + (fy )*nor[1] + (fz )*nor[2] + d < 0.0f) return 1;
- if((fx )*nor[0] + (fy+1)*nor[1] + (fz )*nor[2] + d < 0.0f) return 1;
- if((fx+1)*nor[0] + (fy+1)*nor[1] + (fz )*nor[2] + d < 0.0f) return 1;
-
- if((fx )*nor[0] + (fy )*nor[1] + (fz+1)*nor[2] + d < 0.0f) return 1;
- if((fx+1)*nor[0] + (fy )*nor[1] + (fz+1)*nor[2] + d < 0.0f) return 1;
- if((fx )*nor[0] + (fy+1)*nor[1] + (fz+1)*nor[2] + d < 0.0f) return 1;
- if((fx+1)*nor[0] + (fy+1)*nor[1] + (fz+1)*nor[2] + d < 0.0f) return 1;
- }
- else {
- if((fx+1)*nor[0] + (fy )*nor[1] + (fz )*nor[2] + d > 0.0f) return 1;
- if((fx )*nor[0] + (fy+1)*nor[1] + (fz )*nor[2] + d > 0.0f) return 1;
- if((fx+1)*nor[0] + (fy+1)*nor[1] + (fz )*nor[2] + d > 0.0f) return 1;
-
- if((fx )*nor[0] + (fy )*nor[1] + (fz+1)*nor[2] + d > 0.0f) return 1;
- if((fx+1)*nor[0] + (fy )*nor[1] + (fz+1)*nor[2] + d > 0.0f) return 1;
- if((fx )*nor[0] + (fy+1)*nor[1] + (fz+1)*nor[2] + d > 0.0f) return 1;
- if((fx+1)*nor[0] + (fy+1)*nor[1] + (fz+1)*nor[2] + d > 0.0f) return 1;
- }
-
- return 0;
-}
-
-static void ocwrite(Octree *oc, int ob, RayFace *face, int quad, short x, short y, short z, float rtf[][3])
-{
- Branch *br;
- Node *no;
- short a, oc0, oc1, oc2, oc3, oc4, oc5;
-
- x<<=2;
- y<<=1;
-
- br= oc->adrbranch[0];
-
- if(oc->ocres==512) {
- oc0= ((x & 1024)+(y & 512)+(z & 256))>>8;
- br= addbranch(oc, br, oc0);
- }
- if(oc->ocres>=256) {
- oc0= ((x & 512)+(y & 256)+(z & 128))>>7;
- br= addbranch(oc, br, oc0);
- }
- if(oc->ocres>=128) {
- oc0= ((x & 256)+(y & 128)+(z & 64))>>6;
- br= addbranch(oc, br, oc0);
- }
-
- oc0= ((x & 128)+(y & 64)+(z & 32))>>5;
- oc1= ((x & 64)+(y & 32)+(z & 16))>>4;
- oc2= ((x & 32)+(y & 16)+(z & 8))>>3;
- oc3= ((x & 16)+(y & 8)+(z & 4))>>2;
- oc4= ((x & 8)+(y & 4)+(z & 2))>>1;
- oc5= ((x & 4)+(y & 2)+(z & 1));
-
- br= addbranch(oc, br,oc0);
- br= addbranch(oc, br,oc1);
- br= addbranch(oc, br,oc2);
- br= addbranch(oc, br,oc3);
- br= addbranch(oc, br,oc4);
- no= (Node *)br->b[oc5];
- if(no==NULL) br->b[oc5]= (Branch *)(no= addnode(oc));
-
- while(no->next) no= no->next;
-
- a= 0;
- if(no->v[7]) { /* node full */
- no->next= addnode(oc);
- no= no->next;
- }
- else {
- while(no->v[a]!=NULL) a++;
- }
-
- no->v[a]= face;
- no->ob[a]= ob;
-
- if(quad)
- calc_ocval_face(rtf[0], rtf[1], rtf[2], rtf[3], x>>2, y>>1, z, &no->ov[a]);
- else
- calc_ocval_face(rtf[0], rtf[1], rtf[2], NULL, x>>2, y>>1, z, &no->ov[a]);
-}
-
-static void d2dda(Octree *oc, short b1, short b2, short c1, short c2, char *ocface, short rts[][3], float rtf[][3])
-{
- int ocx1,ocx2,ocy1,ocy2;
- int x,y,dx=0,dy=0;
- float ox1,ox2,oy1,oy2;
- float labda,labdao,labdax,labday,ldx,ldy;
-
- ocx1= rts[b1][c1];
- ocy1= rts[b1][c2];
- ocx2= rts[b2][c1];
- ocy2= rts[b2][c2];
-
- if(ocx1==ocx2 && ocy1==ocy2) {
- ocface[oc->ocres*ocx1+ocy1]= 1;
- return;
- }
-
- ox1= rtf[b1][c1];
- oy1= rtf[b1][c2];
- ox2= rtf[b2][c1];
- oy2= rtf[b2][c2];
-
- if(ox1!=ox2) {
- if(ox2-ox1>0.0f) {
- labdax= (ox1-ocx1-1.0f)/(ox1-ox2);
- ldx= -1.0f/(ox1-ox2);
- dx= 1;
- } else {
- labdax= (ox1-ocx1)/(ox1-ox2);
- ldx= 1.0f/(ox1-ox2);
- dx= -1;
- }
- } else {
- labdax=1.0f;
- ldx=0;
- }
-
- if(oy1!=oy2) {
- if(oy2-oy1>0.0f) {
- labday= (oy1-ocy1-1.0f)/(oy1-oy2);
- ldy= -1.0f/(oy1-oy2);
- dy= 1;
- } else {
- labday= (oy1-ocy1)/(oy1-oy2);
- ldy= 1.0f/(oy1-oy2);
- dy= -1;
- }
- } else {
- labday=1.0f;
- ldy=0;
- }
-
- x=ocx1; y=ocy1;
- labda= MIN2(labdax, labday);
-
- while(TRUE) {
-
- if(x<0 || y<0 || x>=oc->ocres || y>=oc->ocres);
- else ocface[oc->ocres*x+y]= 1;
-
- labdao=labda;
- if(labdax==labday) {
- labdax+=ldx;
- x+=dx;
- labday+=ldy;
- y+=dy;
- } else {
- if(labdax<labday) {
- labdax+=ldx;
- x+=dx;
- } else {
- labday+=ldy;
- y+=dy;
- }
- }
- labda=MIN2(labdax,labday);
- if(labda==labdao) break;
- if(labda>=1.0f) break;
- }
- ocface[oc->ocres*ocx2+ocy2]=1;
-}
-
-static void filltriangle(Octree *oc, short c1, short c2, char *ocface, short *ocmin)
-{
- short *ocmax;
- int a, x, y, y1, y2;
-
- ocmax=ocmin+3;
-
- for(x=ocmin[c1];x<=ocmax[c1];x++) {
- a= oc->ocres*x;
- for(y=ocmin[c2];y<=ocmax[c2];y++) {
- if(ocface[a+y]) {
- y++;
- while(ocface[a+y] && y!=ocmax[c2]) y++;
- for(y1=ocmax[c2];y1>y;y1--) {
- if(ocface[a+y1]) {
- for(y2=y;y2<=y1;y2++) ocface[a+y2]=1;
- y1=0;
- }
- }
- y=ocmax[c2];
- }
- }
- }
-}
-
-void RE_ray_tree_free(RayTree *tree)
-{
- Octree *oc= (Octree*)tree;
-
-#if 0
- printf("branches %d nodes %d\n", oc->branchcount, oc->nodecount);
- printf("raycount %d \n", raycount);
- printf("ray coherent %d \n", coherent_ray);
- printf("accepted %d rejected %d\n", accepted, rejected);
-#endif
- if(oc->ocface)
- MEM_freeN(oc->ocface);
-
- if(oc->adrbranch) {
- int a= 0;
- while(oc->adrbranch[a]) {
- MEM_freeN(oc->adrbranch[a]);
- oc->adrbranch[a]= NULL;
- a++;
- }
- MEM_freeN(oc->adrbranch);
- oc->adrbranch= NULL;
- }
- oc->branchcount= 0;
-
- if(oc->adrnode) {
- int a= 0;
- while(oc->adrnode[a]) {
- MEM_freeN(oc->adrnode[a]);
- oc->adrnode[a]= NULL;
- a++;
- }
- MEM_freeN(oc->adrnode);
- oc->adrnode= NULL;
- }
- oc->nodecount= 0;
-
- MEM_freeN(oc);
-}
-
-RayTree *RE_ray_tree_create(int ocres, int totface, float *min, float *max, RayCoordsFunc coordsfunc, RayCheckFunc checkfunc, RayObjectTransformFunc transformfunc, void *userdata)
-{
- Octree *oc;
- float t00, t01, t02;
- int c, ocres2;
-
- oc= MEM_callocN(sizeof(Octree), "Octree");
- oc->adrbranch= MEM_callocN(sizeof(void *)*BRANCH_ARRAY, "octree branches");
- oc->adrnode= MEM_callocN(sizeof(void *)*NODE_ARRAY, "octree nodes");
-
- oc->coordsfunc= coordsfunc;
- oc->checkfunc= checkfunc;
- oc->transformfunc= transformfunc;
- oc->userdata= userdata;
-
- /* only for debug info */
- raycount=0;
- accepted= 0;
- rejected= 0;
- coherent_ray= 0;
-
- /* fill main octree struct */
- oc->ocres= ocres;
- ocres2= oc->ocres*oc->ocres;
-
- VECCOPY(oc->min, min);
- VECCOPY(oc->max, max);
-
- oc->adrbranch[0]=(Branch *)MEM_callocN(4096*sizeof(Branch), "makeoctree");
-
- /* the lookup table, per face, for which nodes to fill in */
- oc->ocface= MEM_callocN( 3*ocres2 + 8, "ocface");
- memset(oc->ocface, 0, 3*ocres2);
-
- for(c=0;c<3;c++) { /* octree enlarge, still needed? */
- oc->min[c]-= 0.01f;
- oc->max[c]+= 0.01f;
- }
-
- t00= oc->max[0]-oc->min[0];
- t01= oc->max[1]-oc->min[1];
- t02= oc->max[2]-oc->min[2];
-
- /* this minus 0.1 is old safety... seems to be needed? */
- oc->ocfacx= (oc->ocres-0.1)/t00;
- oc->ocfacy= (oc->ocres-0.1)/t01;
- oc->ocfacz= (oc->ocres-0.1)/t02;
-
- oc->ocsize= sqrt(t00*t00+t01*t01+t02*t02); /* global, max size octree */
-
- return (RayTree*)oc;
-}
-
-void RE_ray_tree_add_face(RayTree *tree, int ob, RayFace *face)
-{
- Octree *oc = (Octree*)tree;
- float *v1, *v2, *v3, *v4, ocfac[3], rtf[4][3];
- float co1[3], co2[3], co3[3], co4[3];
- short rts[4][3], ocmin[6], *ocmax;
- char *ocface= oc->ocface; // front, top, size view of face, to fill in
- int a, b, c, oc1, oc2, oc3, oc4, x, y, z, ocres2;
-
- ocfac[0]= oc->ocfacx;
- ocfac[1]= oc->ocfacy;
- ocfac[2]= oc->ocfacz;
-
- ocres2= oc->ocres*oc->ocres;
-
- ocmax= ocmin+3;
-
- oc->coordsfunc(face, &v1, &v2, &v3, &v4);
-
- VECCOPY(co1, v1);
- VECCOPY(co2, v2);
- VECCOPY(co3, v3);
- if(v4)
- VECCOPY(co4, v4);
-
- if(ob >= RE_RAY_TRANSFORM_OFFS) {
- float (*mat)[4]= (float(*)[4])oc->transformfunc(oc->userdata, ob);
-
- if(mat) {
- Mat4MulVecfl(mat, co1);
- Mat4MulVecfl(mat, co2);
- Mat4MulVecfl(mat, co3);
- if(v4)
- Mat4MulVecfl(mat, co4);
- }
- }
-
- for(c=0;c<3;c++) {
- rtf[0][c]= (co1[c]-oc->min[c])*ocfac[c] ;
- rts[0][c]= (short)rtf[0][c];
- rtf[1][c]= (co2[c]-oc->min[c])*ocfac[c] ;
- rts[1][c]= (short)rtf[1][c];
- rtf[2][c]= (co3[c]-oc->min[c])*ocfac[c] ;
- rts[2][c]= (short)rtf[2][c];
- if(v4) {
- rtf[3][c]= (co4[c]-oc->min[c])*ocfac[c] ;
- rts[3][c]= (short)rtf[3][c];
- }
- }
-
- for(c=0;c<3;c++) {
- oc1= rts[0][c];
- oc2= rts[1][c];
- oc3= rts[2][c];
- if(v4==NULL) {
- ocmin[c]= MIN3(oc1,oc2,oc3);
- ocmax[c]= MAX3(oc1,oc2,oc3);
- }
- else {
- oc4= rts[3][c];
- ocmin[c]= MIN4(oc1,oc2,oc3,oc4);
- ocmax[c]= MAX4(oc1,oc2,oc3,oc4);
- }
- if(ocmax[c]>oc->ocres-1) ocmax[c]=oc->ocres-1;
- if(ocmin[c]<0) ocmin[c]=0;
- }
-
- if(ocmin[0]==ocmax[0] && ocmin[1]==ocmax[1] && ocmin[2]==ocmax[2]) {
- ocwrite(oc, ob, face, (v4 != NULL), ocmin[0], ocmin[1], ocmin[2], rtf);
- }
- else {
-
- d2dda(oc, 0,1,0,1,ocface+ocres2,rts,rtf);
- d2dda(oc, 0,1,0,2,ocface,rts,rtf);
- d2dda(oc, 0,1,1,2,ocface+2*ocres2,rts,rtf);
- d2dda(oc, 1,2,0,1,ocface+ocres2,rts,rtf);
- d2dda(oc, 1,2,0,2,ocface,rts,rtf);
- d2dda(oc, 1,2,1,2,ocface+2*ocres2,rts,rtf);
- if(v4==NULL) {
- d2dda(oc, 2,0,0,1,ocface+ocres2,rts,rtf);
- d2dda(oc, 2,0,0,2,ocface,rts,rtf);
- d2dda(oc, 2,0,1,2,ocface+2*ocres2,rts,rtf);
- }
- else {
- d2dda(oc, 2,3,0,1,ocface+ocres2,rts,rtf);
- d2dda(oc, 2,3,0,2,ocface,rts,rtf);
- d2dda(oc, 2,3,1,2,ocface+2*ocres2,rts,rtf);
- d2dda(oc, 3,0,0,1,ocface+ocres2,rts,rtf);
- d2dda(oc, 3,0,0,2,ocface,rts,rtf);
- d2dda(oc, 3,0,1,2,ocface+2*ocres2,rts,rtf);
- }
- /* nothing todo with triangle..., just fills :) */
- filltriangle(oc, 0,1,ocface+ocres2,ocmin);
- filltriangle(oc, 0,2,ocface,ocmin);
- filltriangle(oc, 1,2,ocface+2*ocres2,ocmin);
-
- /* init static vars here */
- face_in_node(face, 0,0,0, rtf);
-
- for(x=ocmin[0];x<=ocmax[0];x++) {
- a= oc->ocres*x;
- for(y=ocmin[1];y<=ocmax[1];y++) {
- if(ocface[a+y+ocres2]) {
- b= oc->ocres*y+2*ocres2;
- for(z=ocmin[2];z<=ocmax[2];z++) {
- if(ocface[b+z] && ocface[a+z]) {
- if(face_in_node(NULL, x, y, z, rtf))
- ocwrite(oc, ob, face, (v4 != NULL), x,y,z, rtf);
- }
- }
- }
- }
- }
-
- /* same loops to clear octree, doubt it can be done smarter */
- for(x=ocmin[0];x<=ocmax[0];x++) {
- a= oc->ocres*x;
- for(y=ocmin[1];y<=ocmax[1];y++) {
- /* x-y */
- ocface[a+y+ocres2]= 0;
-
- b= oc->ocres*y + 2*ocres2;
- for(z=ocmin[2];z<=ocmax[2];z++) {
- /* y-z */
- ocface[b+z]= 0;
- /* x-z */
- ocface[a+z]= 0;
- }
- }
- }
- }
-}
-
-void RE_ray_tree_done(RayTree *tree)
-{
- Octree *oc= (Octree*)tree;
-
- MEM_freeN(oc->ocface);
- oc->ocface= NULL;
-}
-
-/* ************ raytracer **************** */
-
-#define ISECT_EPSILON ((float)FLT_EPSILON)
-
-/* only for self-intersecting test with current render face (where ray left) */
-static int intersection2(RayFace *face, int ob, RayObjectTransformFunc transformfunc, RayCoordsFunc coordsfunc, void *userdata, float r0, float r1, float r2, float rx1, float ry1, float rz1)
-{
- float *v1, *v2, *v3, *v4, co1[3], co2[3], co3[3], co4[3];
- float x0,x1,x2,t00,t01,t02,t10,t11,t12,t20,t21,t22;
- float m0, m1, m2, divdet, det, det1;
- float u1, v, u2;
-
- coordsfunc(face, &v1, &v2, &v3, &v4);
-
- /* happens for baking with non existing face */
- if(v1==NULL)
- return 1;
-
- if(v4) {
- SWAP(float*, v3, v4);
- }
-
- VECCOPY(co1, v1);
- VECCOPY(co2, v2);
- VECCOPY(co3, v3);
- if(v4)
- VECCOPY(co4, v4);
-
- if(ob >= RE_RAY_TRANSFORM_OFFS) {
- float (*mat)[4]= (float(*)[4])transformfunc(userdata, ob);
-
- if(mat) {
- Mat4MulVecfl(mat, co1);
- Mat4MulVecfl(mat, co2);
- Mat4MulVecfl(mat, co3);
- if(v4)
- Mat4MulVecfl(mat, co4);
- }
- }
-
- t00= co3[0]-co1[0];
- t01= co3[1]-co1[1];
- t02= co3[2]-co1[2];
- t10= co3[0]-co2[0];
- t11= co3[1]-co2[1];
- t12= co3[2]-co2[2];
-
- x0= t11*r2-t12*r1;
- x1= t12*r0-t10*r2;
- x2= t10*r1-t11*r0;
-
- divdet= t00*x0+t01*x1+t02*x2;
-
- m0= rx1-co3[0];
- m1= ry1-co3[1];
- m2= rz1-co3[2];
- det1= m0*x0+m1*x1+m2*x2;
-
- if(divdet!=0.0f) {
- u1= det1/divdet;
-
- if(u1<ISECT_EPSILON) {
- det= t00*(m1*r2-m2*r1);
- det+= t01*(m2*r0-m0*r2);
- det+= t02*(m0*r1-m1*r0);
- v= det/divdet;
-
- if(v<ISECT_EPSILON && (u1 + v) > -(1.0f+ISECT_EPSILON)) {
- return 1;
- }
- }
- }
-
- if(v4) {
-
- t20= co3[0]-co4[0];
- t21= co3[1]-co4[1];
- t22= co3[2]-co4[2];
-
- divdet= t20*x0+t21*x1+t22*x2;
- if(divdet!=0.0f) {
- u2= det1/divdet;
-
- if(u2<ISECT_EPSILON) {
- det= t20*(m1*r2-m2*r1);
- det+= t21*(m2*r0-m0*r2);
- det+= t22*(m0*r1-m1*r0);
- v= det/divdet;
-
- if(v<ISECT_EPSILON && (u2 + v) >= -(1.0f+ISECT_EPSILON)) {
- return 2;
- }
- }
- }
- }
- return 0;
-}
-
-#if 0
-/* ray - line intersection */
-/* disabled until i got real & fast cylinder checking, this code doesnt work proper
-for faster strands */
-
-static int intersection_strand(Isect *is)
-{
- float v1[3], v2[3]; /* length of strand */
- float axis[3], rc[3], nor[3], radline, dist, len;
-
- /* radius strand */
- radline= 0.5f*VecLenf(is->vlr->v1->co, is->vlr->v2->co);
-
- VecMidf(v1, is->vlr->v1->co, is->vlr->v2->co);
- VecMidf(v2, is->vlr->v3->co, is->vlr->v4->co);
-
- VECSUB(rc, v1, is->start); /* vector from base ray to base cylinder */
- VECSUB(axis, v2, v1); /* cylinder axis */
-
- CROSS(nor, is->vec, axis);
- len= VecLength(nor);
-
- if(len<FLT_EPSILON)
- return 0;
-
- dist= INPR(rc, nor)/len; /* distance between ray and axis cylinder */
-
- if(dist<radline && dist>-radline) {
- float dot1, dot2, dot3, rlen, alen, div;
- float labda;
-
- /* calculating the intersection point of shortest distance */
- dot1 = INPR(rc, is->vec);
- dot2 = INPR(is->vec, axis);
- dot3 = INPR(rc, axis);
- rlen = INPR(is->vec, is->vec);
- alen = INPR(axis, axis);
-
- div = alen * rlen - dot2 * dot2;
- if (ABS(div) < FLT_EPSILON)
- return 0;
-
- labda = (dot1*dot2 - dot3*rlen)/div;
-
- radline/= sqrt(alen);
-
- /* labda: where on axis do we have closest intersection? */
- if(labda >= -radline && labda <= 1.0f+radline) {
- VlakRen *vlr= is->faceorig;
- VertRen *v1= is->vlr->v1, *v2= is->vlr->v2, *v3= is->vlr->v3, *v4= is->vlr->v4;
- /* but we dont do shadows from faces sharing edge */
-
- if(v1==vlr->v1 || v2==vlr->v1 || v3==vlr->v1 || v4==vlr->v1) return 0;
- if(v1==vlr->v2 || v2==vlr->v2 || v3==vlr->v2 || v4==vlr->v2) return 0;
- if(v1==vlr->v3 || v2==vlr->v3 || v3==vlr->v3 || v4==vlr->v3) return 0;
- if(vlr->v4) {
- if(v1==vlr->v4 || v2==vlr->v4 || v3==vlr->v4 || v4==vlr->v4) return 0;
- }
- return 1;
- }
- }
- return 0;
-}
-#endif
-
-/* ray - triangle or quad intersection */
-int RE_ray_face_intersection(Isect *is, RayObjectTransformFunc transformfunc, RayCoordsFunc coordsfunc)
-{
- RayFace *face= is->face;
- int ob= is->ob;
- float *v1,*v2,*v3,*v4,co1[3],co2[3],co3[3],co4[3];
- float x0,x1,x2,t00,t01,t02,t10,t11,t12,t20,t21,t22,r0,r1,r2;
- float m0, m1, m2, divdet, det1;
- short ok=0;
-
- /* disabled until i got real & fast cylinder checking, this code doesnt work proper
- for faster strands */
-// if(is->mode==RE_RAY_SHADOW && is->vlr->flag & R_STRAND)
-// return intersection_strand(is);
-
- coordsfunc(face, &v1, &v2, &v3, &v4);
-
- if(v4) {
- SWAP(float*, v3, v4);
- }
-
- VECCOPY(co1, v1);
- VECCOPY(co2, v2);
- VECCOPY(co3, v3);
- if(v4)
- VECCOPY(co4, v4);
-
- if(ob) {
- float (*mat)[4]= (float(*)[4])transformfunc(is->userdata, ob);
-
- if(mat) {
- Mat4MulVecfl(mat, co1);
- Mat4MulVecfl(mat, co2);
- Mat4MulVecfl(mat, co3);
- if(v4)
- Mat4MulVecfl(mat, co4);
- }
- }
-
- t00= co3[0]-co1[0];
- t01= co3[1]-co1[1];
- t02= co3[2]-co1[2];
- t10= co3[0]-co2[0];
- t11= co3[1]-co2[1];
- t12= co3[2]-co2[2];
-
- r0= is->vec[0];
- r1= is->vec[1];
- r2= is->vec[2];
-
- x0= t12*r1-t11*r2;
- x1= t10*r2-t12*r0;
- x2= t11*r0-t10*r1;
-
- divdet= t00*x0+t01*x1+t02*x2;
-
- m0= is->start[0]-co3[0];
- m1= is->start[1]-co3[1];
- m2= is->start[2]-co3[2];
- det1= m0*x0+m1*x1+m2*x2;
-
- if(divdet!=0.0f) {
- float u;
-
- divdet= 1.0f/divdet;
- u= det1*divdet;
- if(u<ISECT_EPSILON && u>-(1.0f+ISECT_EPSILON)) {
- float v, cros0, cros1, cros2;
-
- cros0= m1*t02-m2*t01;
- cros1= m2*t00-m0*t02;
- cros2= m0*t01-m1*t00;
- v= divdet*(cros0*r0 + cros1*r1 + cros2*r2);
-
- if(v<ISECT_EPSILON && (u + v) > -(1.0f+ISECT_EPSILON)) {
- float labda;
- labda= divdet*(cros0*t10 + cros1*t11 + cros2*t12);
-
- if(labda>-ISECT_EPSILON && labda<1.0f+ISECT_EPSILON) {
- is->labda= labda;
- is->u= u; is->v= v;
- ok= 1;
- }
- }
- }
- }
-
- if(ok==0 && v4) {
-
- t20= co3[0]-co4[0];
- t21= co3[1]-co4[1];
- t22= co3[2]-co4[2];
-
- divdet= t20*x0+t21*x1+t22*x2;
- if(divdet!=0.0f) {
- float u;
- divdet= 1.0f/divdet;
- u = det1*divdet;
-
- if(u<ISECT_EPSILON && u>-(1.0f+ISECT_EPSILON)) {
- float v, cros0, cros1, cros2;
- cros0= m1*t22-m2*t21;
- cros1= m2*t20-m0*t22;
- cros2= m0*t21-m1*t20;
- v= divdet*(cros0*r0 + cros1*r1 + cros2*r2);
-
- if(v<ISECT_EPSILON && (u + v) >-(1.0f+ISECT_EPSILON)) {
- float labda;
- labda= divdet*(cros0*t10 + cros1*t11 + cros2*t12);
-
- if(labda>-ISECT_EPSILON && labda<1.0f+ISECT_EPSILON) {
- ok= 2;
- is->labda= labda;
- is->u= u; is->v= v;
- }
- }
- }
- }
- }
-
- if(ok) {
- is->isect= ok; // wich half of the quad
-
- if(is->mode!=RE_RAY_SHADOW) {
- /* for mirror & tra-shadow: large faces can be filled in too often, this prevents
- a face being detected too soon... */
- if(is->labda > is->ddalabda) {
- return 0;
- }
- }
-
- /* when a shadow ray leaves a face, it can be little outside the edges of it, causing
- intersection to be detected in its neighbour face */
-
- if(is->facecontr && is->faceisect); // optimizing, the tests below are not needed
- else if(is->labda< .1 && is->faceorig) {
- RayFace *face= is->faceorig;
- float *origv1, *origv2, *origv3, *origv4;
- short de= 0;
-
- coordsfunc(face, &origv1, &origv2, &origv3, &origv4);
-
- if(ob == is->oborig) {
- if(v1==origv1 || v2==origv1 || v3==origv1 || v4==origv1) de++;
- if(v1==origv2 || v2==origv2 || v3==origv2 || v4==origv2) de++;
- if(v1==origv3 || v2==origv3 || v3==origv3 || v4==origv3) de++;
- if(origv4) {
- if(v1==origv4 || v2==origv4 || v3==origv4 || v4==origv4) de++;
- }
- }
- if(de) {
- /* so there's a shared edge or vertex, let's intersect ray with face
- itself, if that's true we can safely return 1, otherwise we assume
- the intersection is invalid, 0 */
-
- if(is->facecontr==NULL) {
- is->obcontr= is->oborig;
- is->facecontr= face;
- is->faceisect= intersection2(face, is->oborig, transformfunc, coordsfunc, is->userdata, -r0, -r1, -r2, is->start[0], is->start[1], is->start[2]);
- }
-
- if(is->faceisect) return 1;
- return 0;
- }
- }
-
- return 1;
- }
-
- return 0;
-}
-
-/* check all faces in this node */
-static int testnode(Octree *oc, Isect *is, Node *no, OcVal ocval, RayCheckFunc checkfunc)
-{
- RayFace *face;
- int ob;
- short nr=0;
- OcVal *ov;
-
- /* return on any first hit */
- if(is->mode==RE_RAY_SHADOW) {
-
- face= no->v[0];
- ob= no->ob[0];
- while(face) {
-
- if(!(is->faceorig == face && is->oborig == ob)) {
-
- if(checkfunc(is, ob, face)) {
-
- ov= no->ov+nr;
- if( (ov->ocx & ocval.ocx) && (ov->ocy & ocval.ocy) && (ov->ocz & ocval.ocz) ) {
- //accepted++;
- is->ob= ob;
- is->face= face;
-
- if(RE_ray_face_intersection(is, oc->transformfunc, oc->coordsfunc)) {
- is->ob_last= ob;
- is->face_last= face;
- return 1;
- }
- }
- //else rejected++;
- }
- }
-
- nr++;
- if(nr==8) {
- no= no->next;
- if(no==0) return 0;
- nr=0;
- }
- face= no->v[nr];
- ob= no->ob[nr];
- }
- }
- else { /* else mirror or glass or shadowtra, return closest face */
- Isect isect;
- int found= 0;
-
- is->labda= 1.0f; /* needed? */
- isect= *is; /* copy for sorting */
-
- face= no->v[0];
- ob= no->ob[0];
- while(face) {
-
- if(!(is->faceorig == face && is->oborig == ob)) {
- if(checkfunc(is, ob, face)) {
- ov= no->ov+nr;
- if( (ov->ocx & ocval.ocx) && (ov->ocy & ocval.ocy) && (ov->ocz & ocval.ocz) ) {
- //accepted++;
-
- isect.ob= ob;
- isect.face= face;
- if(RE_ray_face_intersection(&isect, oc->transformfunc, oc->coordsfunc)) {
- if(isect.labda<is->labda) {
- *is= isect;
- found= 1;
- }
-
- }
- }
- //else rejected++;
- }
- }
-
- nr++;
- if(nr==8) {
- no= no->next;
- if(no==NULL) break;
- nr=0;
- }
- face= no->v[nr];
- ob= no->ob[nr];
- }
-
- return found;
- }
-
- return 0;
-}
-
-/* find the Node for the octree coord x y z */
-static Node *ocread(Octree *oc, int x, int y, int z)
-{
- Branch *br;
- int oc1;
-
- x<<=2;
- y<<=1;
-
- br= oc->adrbranch[0];
-
- if(oc->ocres==512) {
- oc1= ((x & 1024)+(y & 512)+(z & 256))>>8;
- br= br->b[oc1];
- if(br==NULL) {
- return NULL;
- }
- }
- if(oc->ocres>=256) {
- oc1= ((x & 512)+(y & 256)+(z & 128))>>7;
- br= br->b[oc1];
- if(br==NULL) {
- return NULL;
- }
- }
- if(oc->ocres>=128) {
- oc1= ((x & 256)+(y & 128)+(z & 64))>>6;
- br= br->b[oc1];
- if(br==NULL) {
- return NULL;
- }
- }
-
- oc1= ((x & 128)+(y & 64)+(z & 32))>>5;
- br= br->b[oc1];
- if(br) {
- oc1= ((x & 64)+(y & 32)+(z & 16))>>4;
- br= br->b[oc1];
- if(br) {
- oc1= ((x & 32)+(y & 16)+(z & 8))>>3;
- br= br->b[oc1];
- if(br) {
- oc1= ((x & 16)+(y & 8)+(z & 4))>>2;
- br= br->b[oc1];
- if(br) {
- oc1= ((x & 8)+(y & 4)+(z & 2))>>1;
- br= br->b[oc1];
- if(br) {
- oc1= ((x & 4)+(y & 2)+(z & 1));
- return (Node *)br->b[oc1];
- }
- }
- }
- }
- }
-
- return NULL;
-}
-
-static int cliptest(float p, float q, float *u1, float *u2)
-{
- float r;
-
- if(p<0.0f) {
- if(q<p) return 0;
- else if(q<0.0f) {
- r= q/p;
- if(r>*u2) return 0;
- else if(r>*u1) *u1=r;
- }
- }
- else {
- if(p>0.0f) {
- if(q<0.0f) return 0;
- else if(q<p) {
- r= q/p;
- if(r<*u1) return 0;
- else if(r<*u2) *u2=r;
- }
- }
- else if(q<0.0f) return 0;
- }
- return 1;
-}
-
-/* extensive coherence checks/storage cancels out the benefit of it, and gives errors... we
- need better methods, sample code commented out below (ton) */
-
-/*
-
-in top: static int coh_nodes[16*16*16][6];
-in makeoctree: memset(coh_nodes, 0, sizeof(coh_nodes));
-
-static void add_coherence_test(int ocx1, int ocx2, int ocy1, int ocy2, int ocz1, int ocz2)
-{
- short *sp;
-
- sp= coh_nodes[ (ocx2 & 15) + 16*(ocy2 & 15) + 256*(ocz2 & 15) ];
- sp[0]= ocx1; sp[1]= ocy1; sp[2]= ocz1;
- sp[3]= ocx2; sp[4]= ocy2; sp[5]= ocz2;
-
-}
-
-static int do_coherence_test(int ocx1, int ocx2, int ocy1, int ocy2, int ocz1, int ocz2)
-{
- short *sp;
-
- sp= coh_nodes[ (ocx2 & 15) + 16*(ocy2 & 15) + 256*(ocz2 & 15) ];
- if(sp[0]==ocx1 && sp[1]==ocy1 && sp[2]==ocz1 &&
- sp[3]==ocx2 && sp[4]==ocy2 && sp[5]==ocz2) return 1;
- return 0;
-}
-
-*/
-
-int RE_ray_tree_intersect(RayTree *tree, Isect *is)
-{
- Octree *oc= (Octree*)tree;
-
- return RE_ray_tree_intersect_check(tree, is, oc->checkfunc);
-}
-
-/* return 1: found valid intersection */
-/* starts with is->faceorig */
-int RE_ray_tree_intersect_check(RayTree *tree, Isect *is, RayCheckFunc checkfunc)
-{
- Octree *oc= (Octree*)tree;
- Node *no;
- OcVal ocval;
- float vec1[3], vec2[3];
- float u1,u2,ox1,ox2,oy1,oy2,oz1,oz2;
- float labdao,labdax,ldx,labday,ldy,labdaz,ldz, ddalabda;
- int dx,dy,dz;
- int xo,yo,zo,c1=0;
- int ocx1,ocx2,ocy1, ocy2,ocz1,ocz2;
-
- /* clip with octree */
- if(oc->branchcount==0) return 0;
-
- /* do this before intersect calls */
- is->facecontr= NULL; /* to check shared edge */
- is->obcontr= 0;
- is->faceisect= is->isect= 0; /* shared edge, quad half flag */
- is->userdata= oc->userdata;
-
- /* only for shadow! */
- if(is->mode==RE_RAY_SHADOW) {
-
- /* check with last intersected shadow face */
- if(is->face_last!=NULL && !(is->face_last==is->faceorig && is->ob_last==is->oborig)) {
- if(checkfunc(is, is->ob_last, is->face_last)) {
- is->ob= is->ob_last;
- is->face= is->face_last;
- VECSUB(is->vec, is->end, is->start);
- if(RE_ray_face_intersection(is, oc->transformfunc, oc->coordsfunc)) return 1;
- }
- }
- }
-
- ldx= is->end[0] - is->start[0];
- u1= 0.0f;
- u2= 1.0f;
-
- /* clip with octree cube */
- if(cliptest(-ldx, is->start[0]-oc->min[0], &u1,&u2)) {
- if(cliptest(ldx, oc->max[0]-is->start[0], &u1,&u2)) {
- ldy= is->end[1] - is->start[1];
- if(cliptest(-ldy, is->start[1]-oc->min[1], &u1,&u2)) {
- if(cliptest(ldy, oc->max[1]-is->start[1], &u1,&u2)) {
- ldz= is->end[2] - is->start[2];
- if(cliptest(-ldz, is->start[2]-oc->min[2], &u1,&u2)) {
- if(cliptest(ldz, oc->max[2]-is->start[2], &u1,&u2)) {
- c1=1;
- if(u2<1.0f) {
- is->end[0]= is->start[0]+u2*ldx;
- is->end[1]= is->start[1]+u2*ldy;
- is->end[2]= is->start[2]+u2*ldz;
- }
- if(u1>0.0f) {
- is->start[0]+=u1*ldx;
- is->start[1]+=u1*ldy;
- is->start[2]+=u1*ldz;
- }
- }
- }
- }
- }
- }
- }
-
- if(c1==0) return 0;
-
- /* reset static variables in ocread */
- //ocread(oc, oc->ocres, 0, 0);
-
- /* setup 3dda to traverse octree */
- ox1= (is->start[0]-oc->min[0])*oc->ocfacx;
- oy1= (is->start[1]-oc->min[1])*oc->ocfacy;
- oz1= (is->start[2]-oc->min[2])*oc->ocfacz;
- ox2= (is->end[0]-oc->min[0])*oc->ocfacx;
- oy2= (is->end[1]-oc->min[1])*oc->ocfacy;
- oz2= (is->end[2]-oc->min[2])*oc->ocfacz;
-
- ocx1= (int)ox1;
- ocy1= (int)oy1;
- ocz1= (int)oz1;
- ocx2= (int)ox2;
- ocy2= (int)oy2;
- ocz2= (int)oz2;
-
- /* for intersection */
- VECSUB(is->vec, is->end, is->start);
-
- if(ocx1==ocx2 && ocy1==ocy2 && ocz1==ocz2) {
- no= ocread(oc, ocx1, ocy1, ocz1);
- if(no) {
- /* exact intersection with node */
- vec1[0]= ox1; vec1[1]= oy1; vec1[2]= oz1;
- vec2[0]= ox2; vec2[1]= oy2; vec2[2]= oz2;
- calc_ocval_ray(&ocval, (float)ocx1, (float)ocy1, (float)ocz1, vec1, vec2);
- is->ddalabda= 1.0f;
- if( testnode(oc, is, no, ocval, checkfunc) ) return 1;
- }
- }
- else {
- //static int coh_ocx1,coh_ocx2,coh_ocy1, coh_ocy2,coh_ocz1,coh_ocz2;
- float dox, doy, doz;
- int eqval;
-
- /* calc labda en ld */
- dox= ox1-ox2;
- doy= oy1-oy2;
- doz= oz1-oz2;
-
- if(dox<-FLT_EPSILON) {
- ldx= -1.0f/dox;
- labdax= (ocx1-ox1+1.0f)*ldx;
- dx= 1;
- } else if(dox>FLT_EPSILON) {
- ldx= 1.0f/dox;
- labdax= (ox1-ocx1)*ldx;
- dx= -1;
- } else {
- labdax=1.0f;
- ldx=0;
- dx= 0;
- }
-
- if(doy<-FLT_EPSILON) {
- ldy= -1.0f/doy;
- labday= (ocy1-oy1+1.0f)*ldy;
- dy= 1;
- } else if(doy>FLT_EPSILON) {
- ldy= 1.0f/doy;
- labday= (oy1-ocy1)*ldy;
- dy= -1;
- } else {
- labday=1.0f;
- ldy=0;
- dy= 0;
- }
-
- if(doz<-FLT_EPSILON) {
- ldz= -1.0f/doz;
- labdaz= (ocz1-oz1+1.0f)*ldz;
- dz= 1;
- } else if(doz>FLT_EPSILON) {
- ldz= 1.0f/doz;
- labdaz= (oz1-ocz1)*ldz;
- dz= -1;
- } else {
- labdaz=1.0f;
- ldz=0;
- dz= 0;
- }
-
- xo=ocx1; yo=ocy1; zo=ocz1;
- labdao= ddalabda= MIN3(labdax,labday,labdaz);
-
- vec2[0]= ox1;
- vec2[1]= oy1;
- vec2[2]= oz1;
-
- /* this loop has been constructed to make sure the first and last node of ray
- are always included, even when ddalabda==1.0f or larger */
-
- while(TRUE) {
-
- no= ocread(oc, xo, yo, zo);
- if(no) {
-
- /* calculate ray intersection with octree node */
- VECCOPY(vec1, vec2);
- // dox,y,z is negative
- vec2[0]= ox1-ddalabda*dox;
- vec2[1]= oy1-ddalabda*doy;
- vec2[2]= oz1-ddalabda*doz;
- calc_ocval_ray(&ocval, (float)xo, (float)yo, (float)zo, vec1, vec2);
-
- is->ddalabda= ddalabda;
- if( testnode(oc, is, no, ocval, checkfunc) ) return 1;
- }
-
- labdao= ddalabda;
-
- /* traversing ocree nodes need careful detection of smallest values, with proper
- exceptions for equal labdas */
- eqval= (labdax==labday);
- if(labday==labdaz) eqval += 2;
- if(labdax==labdaz) eqval += 4;
-
- if(eqval) { // only 4 cases exist!
- if(eqval==7) { // x=y=z
- xo+=dx; labdax+=ldx;
- yo+=dy; labday+=ldy;
- zo+=dz; labdaz+=ldz;
- }
- else if(eqval==1) { // x=y
- if(labday < labdaz) {
- xo+=dx; labdax+=ldx;
- yo+=dy; labday+=ldy;
- }
- else {
- zo+=dz; labdaz+=ldz;
- }
- }
- else if(eqval==2) { // y=z
- if(labdax < labday) {
- xo+=dx; labdax+=ldx;
- }
- else {
- yo+=dy; labday+=ldy;
- zo+=dz; labdaz+=ldz;
- }
- }
- else { // x=z
- if(labday < labdax) {
- yo+=dy; labday+=ldy;
- }
- else {
- xo+=dx; labdax+=ldx;
- zo+=dz; labdaz+=ldz;
- }
- }
- }
- else { // all three different, just three cases exist
- eqval= (labdax<labday);
- if(labday<labdaz) eqval += 2;
- if(labdax<labdaz) eqval += 4;
-
- if(eqval==7 || eqval==5) { // x smallest
- xo+=dx; labdax+=ldx;
- }
- else if(eqval==2 || eqval==6) { // y smallest
- yo+=dy; labday+=ldy;
- }
- else { // z smallest
- zo+=dz; labdaz+=ldz;
- }
-
- }
-
- ddalabda=MIN3(labdax,labday,labdaz);
- if(ddalabda==labdao) break;
- /* to make sure the last node is always checked */
- if(labdao>=1.0f) break;
- }
- }
-
- /* reached end, no intersections found */
- is->ob_last= 0;
- is->face_last= NULL;
- return 0;
-}
-
-float RE_ray_tree_max_size(RayTree *tree)
-{
- return ((Octree*)tree)->ocsize;
-}
-
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index 5db81288c1e..6c18592b8d2 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -31,6 +31,7 @@
#include <math.h>
#include <float.h>
#include <string.h>
+#include <assert.h>
/* External modules: */
#include "MEM_guardedalloc.h"
@@ -520,6 +521,12 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
}
}
break;
+
+ case SCE_PASS_RAYHITS:
+ /* */
+ col= shr->rayhits;
+ pixsize= 4;
+ break;
}
if(col) {
fp= rpass->rect + pixsize*offset;
@@ -596,6 +603,10 @@ static void add_passes(RenderLayer *rl, int offset, ShadeInput *shi, ShadeResult
fp= rpass->rect + offset;
*fp= shr->mist;
break;
+ case SCE_PASS_RAYHITS:
+ col= shr->rayhits;
+ pixsize= 4;
+ break;
}
if(col) {
fp= rpass->rect + pixsize*offset;
@@ -2227,6 +2238,7 @@ static void bake_displacement(void *handle, ShadeInput *shi, float dist, int x,
}
}
+#if 0
static int bake_check_intersect(Isect *is, int ob, RayFace *face)
{
BakeShade *bs = (BakeShade*)is->userdata;
@@ -2236,9 +2248,13 @@ static int bake_check_intersect(Isect *is, int ob, RayFace *face)
return (R.objectinstance[ob & ~RE_RAY_TRANSFORM_OFFS].obr->ob != bs->actob);
}
+#endif
-static int bake_intersect_tree(RayTree* raytree, Isect* isect, float *start, float *dir, float sign, float *hitco, float *dist)
+static int bake_intersect_tree(RayObject* raytree, Isect* isect, float *start, float *dir, float sign, float *hitco, float *dist)
{
+ //TODO
+ assert( 0 );
+#if 0
float maxdist;
int hit;
@@ -2246,15 +2262,17 @@ static int bake_intersect_tree(RayTree* raytree, Isect* isect, float *start, flo
if(R.r.bake_maxdist > 0.0f)
maxdist= R.r.bake_maxdist;
else
- maxdist= RE_ray_tree_max_size(R.raytree) + R.r.bake_biasdist;
+ maxdist= FLT_MAX + R.r.bake_biasdist;
+ //TODO normalized direction?
VECADDFAC(isect->start, start, dir, -R.r.bake_biasdist);
+ isect->dir[0] = dir[0]*sign;
+ isect->dir[1] = dir[1]*sign;
+ isect->dir[2] = dir[2]*sign;
+ isect->labda = maxdist;
- isect->end[0] = isect->start[0] + dir[0]*maxdist*sign;
- isect->end[1] = isect->start[1] + dir[1]*maxdist*sign;
- isect->end[2] = isect->start[2] + dir[2]*maxdist*sign;
-
- hit = RE_ray_tree_intersect_check(R.raytree, isect, bake_check_intersect);
+ hit = RE_rayobject_raycast(raytree, isect);
+ //TODO bake_check_intersect
if(hit) {
hitco[0] = isect->start[0] + isect->labda*isect->vec[0];
hitco[1] = isect->start[1] + isect->labda*isect->vec[1];
@@ -2264,6 +2282,8 @@ static int bake_intersect_tree(RayTree* raytree, Isect* isect, float *start, flo
}
return hit;
+#endif
+ return 0;
}
static void bake_set_vlr_dxyco(BakeShade *bs, float *uv1, float *uv2, float *uv3)
@@ -2380,8 +2400,9 @@ static void do_bake_shade(void *handle, int x, int y, float u, float v)
for(sign=-1; sign<=1; sign+=2) {
memset(&isec, 0, sizeof(isec));
isec.mode= RE_RAY_MIRROR;
- isec.faceorig= (RayFace*)vlr;
- isec.oborig= RAY_OBJECT_SET(&R, obi);
+
+ isec.orig.ob = obi;
+ isec.orig.face = vlr;
isec.userdata= bs;
if(bake_intersect_tree(R.raytree, &isec, shi->co, shi->vn, sign, co, &dist)) {
@@ -2405,8 +2426,8 @@ static void do_bake_shade(void *handle, int x, int y, float u, float v)
/* if hit, we shade from the new point, otherwise from point one starting face */
if(hit) {
- vlr= (VlakRen*)minisec.face;
- obi= RAY_OBJECT_GET(&R, minisec.ob);
+ obi= (ObjectInstanceRen*)minisec.hit.ob;
+ vlr= (VlakRen*)minisec.hit.face;
quad= (minisec.isect == 2);
VECCOPY(shi->co, minco);
diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c
index 621831fb341..54863ef3295 100644
--- a/source/blender/render/intern/source/renderdatabase.c
+++ b/source/blender/render/intern/source/renderdatabase.c
@@ -75,6 +75,7 @@
#include "BKE_DerivedMesh.h"
#include "RE_render_ext.h" /* externtex */
+#include "RE_raytrace.h"
#include "renderpipeline.h"
#include "render_types.h"
@@ -872,13 +873,34 @@ void free_renderdata_tables(Render *re)
MEM_freeN(obr->mtface);
if(obr->mcol)
MEM_freeN(obr->mcol);
+
+ if(obr->rayfaces)
+ {
+ MEM_freeN(obr->rayfaces);
+ obr->rayfaces = NULL;
+ }
+ if(obr->rayprimitives)
+ {
+ MEM_freeN(obr->rayprimitives);
+ obr->rayprimitives = NULL;
+ }
+ if(obr->raytree)
+ {
+ RE_rayobject_free(obr->raytree);
+ obr->raytree = NULL;
+ }
}
if(re->objectinstance) {
for(obi=re->instancetable.first; obi; obi=obi->next)
+ {
if(obi->vectors)
MEM_freeN(obi->vectors);
+ if(obi->raytree)
+ RE_rayobject_free(obi->raytree);
+ }
+
MEM_freeN(re->objectinstance);
re->objectinstance= NULL;
re->totinstance= 0;
@@ -1024,7 +1046,7 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f
externtex(mtex, texvec, &tin, &tr, &tg, &tb, &ta);
yn= tin*mtex->colfac;
- zn= tin*mtex->varfac;
+ zn= tin*mtex->alphafac;
if(mtex->mapto & MAP_COL) {
zn= 1.0-yn;
@@ -1156,7 +1178,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater
externtex(mtex, texvec, &tin, &tr, &tg, &tb, &ta);
//yn= tin*mtex->colfac;
- //zn= tin*mtex->varfac;
+ //zn= tin*mtex->alphafac;
if(mtex->mapto & MAP_COL) {
tex[0]=tr;
tex[1]=tg;
@@ -1175,11 +1197,11 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater
har->b= in[2];
}
if(mtex->mapto & MAP_ALPHA)
- har->alfa = texture_value_blend(mtex->def_var,har->alfa,tin,mtex->varfac,mtex->blendtype,mtex->maptoneg & MAP_ALPHA);
+ har->alfa = texture_value_blend(mtex->def_var,har->alfa,tin,mtex->alphafac,mtex->blendtype);
if(mtex->mapto & MAP_HAR)
- har->hard = 1.0+126.0*texture_value_blend(mtex->def_var,((float)har->hard)/127.0,tin,mtex->varfac,mtex->blendtype,mtex->maptoneg & MAP_HAR);
+ har->hard = 1.0+126.0*texture_value_blend(mtex->def_var,((float)har->hard)/127.0,tin,mtex->hardfac,mtex->blendtype);
if(mtex->mapto & MAP_RAYMIRR)
- har->hasize = 100.0*texture_value_blend(mtex->def_var,har->hasize/100.0,tin,mtex->varfac,mtex->blendtype,mtex->maptoneg & MAP_RAYMIRR);
+ har->hasize = 100.0*texture_value_blend(mtex->def_var,har->hasize/100.0,tin,mtex->raymirrfac,mtex->blendtype);
/* now what on earth is this good for?? */
//if(mtex->texco & 16) {
// har->alfa= tin;
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index 48305d31e10..50e0321a6eb 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -49,8 +49,8 @@
#include "render_types.h"
#include "renderdatabase.h"
#include "rendercore.h"
-
#include "shadbuf.h"
+#include "shading.h"
#include "zbuf.h"
/* XXX, could be better implemented... this is for endian issues
@@ -166,6 +166,326 @@ static void make_jitter_weight_tab(Render *re, ShadBuf *shb, short filtertype)
}
}
+static int verg_deepsample(const void *poin1, const void *poin2)
+{
+ const DeepSample *ds1= (const DeepSample*)poin1;
+ const DeepSample *ds2= (const DeepSample*)poin2;
+
+ if(ds1->z < ds2->z) return -1;
+ else if(ds1->z == ds2->z) return 0;
+ else return 1;
+}
+
+static int compress_deepsamples(DeepSample *dsample, int tot, float epsilon)
+{
+ /* uses doubles to avoid overflows and other numerical issues,
+ could be improved */
+ DeepSample *ds, *newds;
+ float v;
+ double slope, slopemin, slopemax, min, max, div, newmin, newmax;
+ int a, first, z, newtot= 0;
+
+ /*if(print) {
+ for(a=0, ds=dsample; a<tot; a++, ds++)
+ printf("%lf,%f ", ds->z/(double)0x7FFFFFFF, ds->v);
+ printf("\n");
+ }*/
+
+ /* read from and write into same array */
+ ds= dsample;
+ newds= dsample;
+ a= 0;
+
+ /* as long as we are not at the end of the array */
+ for(a++, ds++; a<tot; a++, ds++) {
+ slopemin= 0.0f;
+ slopemax= 0.0f;
+ first= 1;
+
+ for(; a<tot; a++, ds++) {
+ //dz= ds->z - newds->z;
+ if(ds->z == newds->z) {
+ /* still in same z position, simply check
+ visibility difference against epsilon */
+ if(!(fabs(newds->v - ds->v) <= epsilon)) {
+ break;
+ }
+ }
+ else {
+ /* compute slopes */
+ div= (double)0x7FFFFFFF/((double)ds->z - (double)newds->z);
+ min= ((ds->v - epsilon) - newds->v)*div;
+ max= ((ds->v + epsilon) - newds->v)*div;
+
+ /* adapt existing slopes */
+ if(first) {
+ newmin= min;
+ newmax= max;
+ first= 0;
+ }
+ else {
+ newmin= MAX2(slopemin, min);
+ newmax= MIN2(slopemax, max);
+
+ /* verify if there is still space between the slopes */
+ if(newmin > newmax) {
+ ds--;
+ a--;
+ break;
+ }
+ }
+
+ slopemin= newmin;
+ slopemax= newmax;
+ }
+ }
+
+ if(a == tot) {
+ ds--;
+ a--;
+ }
+
+ /* always previous z */
+ z= ds->z;
+
+ if(first || a==tot-1) {
+ /* if slopes were not initialized, use last visibility */
+ v= ds->v;
+ }
+ else {
+ /* compute visibility at center between slopes at z */
+ slope= (slopemin+slopemax)*0.5;
+ v= newds->v + slope*((z - newds->z)/(double)0x7FFFFFFF);
+ }
+
+ newds++;
+ newtot++;
+
+ newds->z= z;
+ newds->v= v;
+ }
+
+ if(newtot == 0 || (newds->v != (newds-1)->v))
+ newtot++;
+
+ /*if(print) {
+ for(a=0, ds=dsample; a<newtot; a++, ds++)
+ printf("%lf,%f ", ds->z/(double)0x7FFFFFFF, ds->v);
+ printf("\n");
+ }*/
+
+ return newtot;
+}
+
+static float deep_alpha(Render *re, int obinr, int facenr, int strand)
+{
+ ObjectInstanceRen *obi= &re->objectinstance[obinr];
+ Material *ma;
+
+ if(strand) {
+ StrandRen *strand= RE_findOrAddStrand(obi->obr, facenr-1);
+ ma= strand->buffer->ma;
+ }
+ else {
+ VlakRen *vlr= RE_findOrAddVlak(obi->obr, (facenr-1) & RE_QUAD_MASK);
+ ma= vlr->mat;
+ }
+
+ return ma->shad_alpha;
+}
+
+static void compress_deepshadowbuf(Render *re, ShadBuf *shb, APixstr *apixbuf, APixstrand *apixbufstrand)
+{
+ ShadSampleBuf *shsample;
+ DeepSample *ds[RE_MAX_OSA], *sampleds[RE_MAX_OSA], *dsb, *newbuf;
+ APixstr *ap, *apn;
+ APixstrand *aps, *apns;
+ float visibility, totbuf= shb->totbuf;
+ int a, b, c, tot, minz, found, size= shb->size, prevtot, newtot;
+ int sampletot[RE_MAX_OSA], totsample = 0, totsamplec = 0;
+
+ shsample= MEM_callocN( sizeof(ShadSampleBuf), "shad sample buf");
+ BLI_addtail(&shb->buffers, shsample);
+
+ shsample->totbuf= MEM_callocN(sizeof(int)*size*size, "deeptotbuf");
+ shsample->deepbuf= MEM_callocN(sizeof(DeepSample*)*size*size, "deepbuf");
+
+ ap= apixbuf;
+ aps= apixbufstrand;
+ for(a=0; a<size*size; a++, ap++, aps++) {
+ /* count number of samples */
+ for(c=0; c<totbuf; c++)
+ sampletot[c]= 0;
+
+ tot= 0;
+ for(apn=ap; apn; apn=apn->next)
+ for(b=0; b<4; b++)
+ if(apn->p[b])
+ for(c=0; c<totbuf; c++)
+ if(apn->mask[b] & (1<<c))
+ sampletot[c]++;
+
+ if(apixbufstrand) {
+ for(apns=aps; apns; apns=apns->next)
+ for(b=0; b<4; b++)
+ if(apns->p[b])
+ for(c=0; c<totbuf; c++)
+ if(apns->mask[b] & (1<<c))
+ sampletot[c]++;
+ }
+
+ for(c=0; c<totbuf; c++)
+ tot += sampletot[c];
+
+ if(tot == 0) {
+ shsample->deepbuf[a]= NULL;
+ shsample->totbuf[a]= 0;
+ continue;
+ }
+
+ /* fill samples */
+ ds[0]= sampleds[0]= MEM_callocN(sizeof(DeepSample)*tot*2, "deepsample");
+ for(c=1; c<totbuf; c++)
+ ds[c]= sampleds[c]= sampleds[c-1] + sampletot[c-1]*2;
+
+ for(apn=ap; apn; apn=apn->next) {
+ for(b=0; b<4; b++) {
+ if(apn->p[b]) {
+ for(c=0; c<totbuf; c++) {
+ if(apn->mask[b] & (1<<c)) {
+ /* two entries to create step profile */
+ ds[c]->z= apn->z[b];
+ ds[c]->v= 1.0f; /* not used */
+ ds[c]++;
+ ds[c]->z= apn->z[b];
+ ds[c]->v= deep_alpha(re, apn->obi[b], apn->p[b], 0);
+ ds[c]++;
+ }
+ }
+ }
+ }
+ }
+
+ if(apixbufstrand) {
+ for(apns=aps; apns; apns=apns->next) {
+ for(b=0; b<4; b++) {
+ if(apns->p[b]) {
+ for(c=0; c<totbuf; c++) {
+ if(apns->mask[b] & (1<<c)) {
+ /* two entries to create step profile */
+ ds[c]->z= apns->z[b];
+ ds[c]->v= 1.0f; /* not used */
+ ds[c]++;
+ ds[c]->z= apns->z[b];
+ ds[c]->v= deep_alpha(re, apns->obi[b], apns->p[b], 1);
+ ds[c]++;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ for(c=0; c<totbuf; c++) {
+ /* sort by increasing z */
+ qsort(sampleds[c], sampletot[c], sizeof(DeepSample)*2, verg_deepsample);
+
+ /* sum visibility, replacing alpha values */
+ visibility= 1.0f;
+ ds[c]= sampleds[c];
+
+ for(b=0; b<sampletot[c]; b++) {
+ /* two entries creating step profile */
+ ds[c]->v= visibility;
+ ds[c]++;
+
+ visibility *= 1.0f-ds[c]->v;
+ ds[c]->v= visibility;
+ ds[c]++;
+ }
+
+ /* halfway trick, probably won't work well for volumes? */
+ ds[c]= sampleds[c];
+ for(b=0; b<sampletot[c]; b++) {
+ if(b+1 < sampletot[c]) {
+ ds[c]->z= (ds[c]->z>>1) + ((ds[c]+2)->z>>1);
+ ds[c]++;
+ ds[c]->z= (ds[c]->z>>1) + ((ds[c]+2)->z>>1);
+ ds[c]++;
+ }
+ else {
+ ds[c]->z= (ds[c]->z>>1) + (0x7FFFFFFF>>1);
+ ds[c]++;
+ ds[c]->z= (ds[c]->z>>1) + (0x7FFFFFFF>>1);
+ ds[c]++;
+ }
+ }
+
+ /* init for merge loop */
+ ds[c]= sampleds[c];
+ sampletot[c] *= 2;
+ }
+
+ shsample->deepbuf[a]= MEM_callocN(sizeof(DeepSample)*tot*2, "deepsample");
+ shsample->totbuf[a]= 0;
+
+ /* merge buffers */
+ dsb= shsample->deepbuf[a];
+ while(1) {
+ minz= 0;
+ found= 0;
+
+ for(c=0; c<totbuf; c++) {
+ if(sampletot[c] && (!found || ds[c]->z < minz)) {
+ minz= ds[c]->z;
+ found= 1;
+ }
+ }
+
+ if(!found)
+ break;
+
+ dsb->z= minz;
+ dsb->v= 0.0f;
+
+ visibility= 0.0f;
+ for(c=0; c<totbuf; c++) {
+ if(sampletot[c] && ds[c]->z == minz) {
+ ds[c]++;
+ sampletot[c]--;
+ }
+
+ if(sampleds[c] == ds[c])
+ visibility += 1.0f/totbuf;
+ else
+ visibility += (ds[c]-1)->v/totbuf;
+ }
+
+ dsb->v= visibility;
+ dsb++;
+ shsample->totbuf[a]++;
+ }
+
+ prevtot= shsample->totbuf[a];
+ totsample += prevtot;
+
+ newtot= compress_deepsamples(shsample->deepbuf[a], prevtot, shb->compressthresh);
+ shsample->totbuf[a]= newtot;
+ totsamplec += newtot;
+
+ if(newtot < prevtot) {
+ newbuf= MEM_mallocN(sizeof(DeepSample)*newtot, "cdeepsample");
+ memcpy(newbuf, shsample->deepbuf[a], sizeof(DeepSample)*newtot);
+ MEM_freeN(shsample->deepbuf[a]);
+ shsample->deepbuf[a]= newbuf;
+ }
+
+ MEM_freeN(sampleds[0]);
+ }
+
+ //printf("%d -> %d, ratio %f\n", totsample, totsamplec, (float)totsamplec/(float)totsample);
+}
+
/* create Z tiles (for compression): this system is 24 bits!!! */
static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
{
@@ -176,7 +496,7 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
int a, x, y, minx, miny, byt1, byt2;
char *rc, *rcline, *ctile, *zt;
- shsample= MEM_mallocN( sizeof(ShadSampleBuf), "shad sample buf");
+ shsample= MEM_callocN( sizeof(ShadSampleBuf), "shad sample buf");
BLI_addtail(&shb->buffers, shsample);
shsample->zbuf= MEM_mallocN( sizeof(uintptr_t)*(size*size)/256, "initshadbuf2");
@@ -277,7 +597,6 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
}
MEM_freeN(rcline);
-
}
/* sets start/end clipping. lar->shb should be initialized */
@@ -381,11 +700,54 @@ static void shadowbuf_autoclip(Render *re, LampRen *lar)
}
}
+static void makeflatshadowbuf(Render *re, LampRen *lar, float *jitbuf)
+{
+ ShadBuf *shb= lar->shb;
+ int *rectz, samples;
+
+ /* zbuffering */
+ rectz= MEM_mapallocN(sizeof(int)*shb->size*shb->size, "makeshadbuf");
+
+ for(samples=0; samples<shb->totbuf; samples++) {
+ zbuffer_shadow(re, shb->persmat, lar, rectz, shb->size, jitbuf[2*samples], jitbuf[2*samples+1]);
+ /* create Z tiles (for compression): this system is 24 bits!!! */
+ compress_shadowbuf(shb, rectz, lar->mode & LA_SQUARE);
+
+ if(re->test_break(re->tbh))
+ break;
+ }
+
+ MEM_freeN(rectz);
+}
+
+static void makedeepshadowbuf(Render *re, LampRen *lar, float *jitbuf)
+{
+ ShadBuf *shb= lar->shb;
+ APixstr *apixbuf;
+ APixstrand *apixbufstrand= NULL;
+ ListBase apsmbase= {NULL, NULL};
+
+ /* zbuffering */
+ apixbuf= MEM_callocN(sizeof(APixstr)*shb->size*shb->size, "APixbuf");
+ if(re->totstrand)
+ apixbufstrand= MEM_callocN(sizeof(APixstrand)*shb->size*shb->size, "APixbufstrand");
+
+ zbuffer_abuf_shadow(re, lar, shb->persmat, apixbuf, apixbufstrand, &apsmbase, shb->size,
+ shb->totbuf, (float(*)[2])jitbuf);
+
+ /* create Z tiles (for compression): this system is 24 bits!!! */
+ compress_deepshadowbuf(re, shb, apixbuf, apixbufstrand);
+
+ MEM_freeN(apixbuf);
+ if(apixbufstrand)
+ MEM_freeN(apixbufstrand);
+ freepsA(&apsmbase);
+}
+
void makeshadowbuf(Render *re, LampRen *lar)
{
ShadBuf *shb= lar->shb;
float wsize, *jitbuf, twozero[2]= {0.0f, 0.0f}, angle, temp;
- int *rectz, samples;
if(lar->bufflag & (LA_SHADBUF_AUTO_START|LA_SHADBUF_AUTO_END))
shadowbuf_autoclip(re, lar);
@@ -405,31 +767,26 @@ void makeshadowbuf(Render *re, LampRen *lar)
i_window(-wsize, wsize, -wsize, wsize, shb->d, shb->clipend, shb->winmat);
Mat4MulMat4(shb->persmat, shb->viewmat, shb->winmat);
- if(ELEM(lar->buftype, LA_SHADBUF_REGULAR, LA_SHADBUF_HALFWAY)) {
+ if(ELEM3(lar->buftype, LA_SHADBUF_REGULAR, LA_SHADBUF_HALFWAY, LA_SHADBUF_DEEP)) {
+ shb->totbuf= lar->buffers;
+
/* jitter, weights - not threadsafe! */
BLI_lock_thread(LOCK_CUSTOM1);
shb->jit= give_jitter_tab(get_render_shadow_samples(&re->r, shb->samp));
make_jitter_weight_tab(re, shb, lar->filtertype);
BLI_unlock_thread(LOCK_CUSTOM1);
- shb->totbuf= lar->buffers;
if(shb->totbuf==4) jitbuf= give_jitter_tab(2);
else if(shb->totbuf==9) jitbuf= give_jitter_tab(3);
else jitbuf= twozero;
/* zbuffering */
- rectz= MEM_mapallocN(sizeof(int)*shb->size*shb->size, "makeshadbuf");
-
- for(samples=0; samples<shb->totbuf; samples++) {
- zbuffer_shadow(re, shb->persmat, lar, rectz, shb->size, jitbuf[2*samples], jitbuf[2*samples+1]);
- /* create Z tiles (for compression): this system is 24 bits!!! */
- compress_shadowbuf(shb, rectz, lar->mode & LA_SQUARE);
-
- if(re->test_break(re->tbh))
- break;
+ if(lar->buftype == LA_SHADBUF_DEEP) {
+ makedeepshadowbuf(re, lar, jitbuf);
+ shb->totbuf= 1;
}
-
- MEM_freeN(rectz);
+ else
+ makeflatshadowbuf(re, lar, jitbuf);
/* printf("lampbuf %d\n", sizeoflampbuf(shb)); */
}
@@ -539,17 +896,27 @@ void freeshadowbuf(LampRen *lar)
ShadSampleBuf *shsample;
int b, v;
- v= (shb->size*shb->size)/256;
-
for(shsample= shb->buffers.first; shsample; shsample= shsample->next) {
- intptr_t *ztile= shsample->zbuf;
- char *ctile= shsample->cbuf;
-
- for(b=0; b<v; b++, ztile++, ctile++)
- if(*ctile) MEM_freeN((void *) *ztile);
-
- MEM_freeN(shsample->zbuf);
- MEM_freeN(shsample->cbuf);
+ if(shsample->deepbuf) {
+ v= shb->size*shb->size;
+ for(b=0; b<v; b++)
+ if(shsample->deepbuf[b])
+ MEM_freeN(shsample->deepbuf[b]);
+
+ MEM_freeN(shsample->deepbuf);
+ MEM_freeN(shsample->totbuf);
+ }
+ else {
+ intptr_t *ztile= shsample->zbuf;
+ char *ctile= shsample->cbuf;
+
+ v= (shb->size*shb->size)/256;
+ for(b=0; b<v; b++, ztile++, ctile++)
+ if(*ctile) MEM_freeN((void *) *ztile);
+
+ MEM_freeN(shsample->zbuf);
+ MEM_freeN(shsample->cbuf);
+ }
}
BLI_freelistN(&shb->buffers);
@@ -567,6 +934,9 @@ static int firstreadshadbuf(ShadBuf *shb, ShadSampleBuf *shsample, int **rz, int
int ofs;
char *ct;
+ if(shsample->deepbuf)
+ return 0;
+
/* always test borders of shadowbuffer */
if(xs<0) xs= 0; else if(xs>=shb->size) xs= shb->size-1;
if(ys<0) ys= 0; else if(ys>=shb->size) ys= shb->size-1;
@@ -587,6 +957,67 @@ static int firstreadshadbuf(ShadBuf *shb, ShadSampleBuf *shsample, int **rz, int
return 0;
}
+static float readdeepvisibility(DeepSample *dsample, int tot, int z, int bias, float *biast)
+{
+ DeepSample *ds, *prevds;
+ float t;
+ int a;
+
+ /* tricky stuff here; we use ints which can overflow easily with bias values */
+
+ ds= dsample;
+ for(a=0; a<tot && (z-bias > ds->z); a++, ds++)
+ ;
+
+ if(a == tot) {
+ if(biast)
+ *biast= 0.0f;
+ return (ds-1)->v; /* completely behind all samples */
+ }
+
+ /* check if this read needs bias blending */
+ if(biast) {
+ if(z > ds->z)
+ *biast= (float)(z - ds->z)/(float)bias;
+ else
+ *biast= 0.0f;
+ }
+
+ if(a == 0)
+ return 1.0f; /* completely in front of all samples */
+
+ prevds= ds-1;
+ t= (float)(z-bias - prevds->z)/(float)(ds->z - prevds->z);
+ return t*ds->v + (1.0f-t)*prevds->v;
+}
+
+static float readdeepshadowbuf(ShadBuf *shb, ShadSampleBuf *shsample, int bias, int xs, int ys, int zs)
+{
+ float v, biasv, biast;
+ int ofs, tot;
+
+ if(zs < - 0x7FFFFE00 + bias)
+ return 1.0; /* extreme close to clipstart */
+
+ /* calc z */
+ ofs= ys*shb->size + xs;
+ tot= shsample->totbuf[ofs];
+ if(tot == 0)
+ return 1.0f;
+
+ v= readdeepvisibility(shsample->deepbuf[ofs], tot, zs, bias, &biast);
+
+ if(biast != 0.0f) {
+ /* in soft bias area */
+ biasv= readdeepvisibility(shsample->deepbuf[ofs], tot, zs, 0, 0);
+
+ biast= biast*biast;
+ return (1.0f-biast)*v + biast*biasv;
+ }
+
+ return v;
+}
+
/* return 1.0 : fully in light */
static float readshadowbuf(ShadBuf *shb, ShadSampleBuf *shsample, int bias, int xs, int ys, int zs)
{
@@ -603,6 +1034,9 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf *shsample, int bias, int
if(xs<0) xs= 0; else if(xs>=shb->size) xs= shb->size-1;
if(ys<0) ys= 0; else if(ys>=shb->size) ys= shb->size-1;
+ if(shsample->deepbuf)
+ return readdeepshadowbuf(shb, shsample, bias, xs, ys, zs);
+
/* calc z */
ofs= (ys>>4)*(shb->size>>4) + (xs>>4);
ct= shsample->cbuf+ofs;
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index 7541ce53073..79ee6c89460 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -44,6 +44,7 @@
#include "BKE_node.h"
/* local include */
+#include "raycounter.h"
#include "renderpipeline.h"
#include "render_types.h"
#include "renderdatabase.h"
@@ -181,6 +182,9 @@ void shade_input_do_shade(ShadeInput *shi, ShadeResult *shr)
float alpha;
/* ------ main shading loop -------- */
+#ifdef RE_RAYCOUNTER
+ memset(&shi->raycounter, 0, sizeof(shi->raycounter));
+#endif
if(shi->mat->nodetree && shi->mat->use_nodes) {
ntreeShaderExecTree(shi->mat->nodetree, shi, shr);
@@ -230,6 +234,18 @@ void shade_input_do_shade(ShadeInput *shi, ShadeResult *shr)
/* add z */
shr->z= -shi->co[2];
+
+ /* RAYHITS */
+/*
+ if(1 || shi->passflag & SCE_PASS_RAYHITS)
+ {
+ shr->rayhits[0] = (float)shi->raycounter.faces.test;
+ shr->rayhits[1] = (float)shi->raycounter.bb.hit;
+ shr->rayhits[2] = 0.0;
+ shr->rayhits[3] = 1.0;
+ }
+ */
+ RE_RC_MERGE(&re_rc_counter[shi->thread], &shi->raycounter);
}
/* **************************************************************************** */
@@ -1216,7 +1232,7 @@ void shade_input_set_shade_texco(ShadeInput *shi)
s3= RE_vertren_get_sticky(obr, v3, 0);
if(s1 && s2 && s3) {
- float winmat[4][4], ho1[4], ho2[4], ho3[4];
+ float obwinmat[4][4], winmat[4][4], ho1[4], ho2[4], ho3[4];
float Zmulx, Zmuly;
float hox, hoy, l, dl, u, v;
float s00, s01, s10, s11, detsh;
@@ -1224,14 +1240,15 @@ void shade_input_set_shade_texco(ShadeInput *shi)
/* old globals, localized now */
Zmulx= ((float)R.winx)/2.0f; Zmuly= ((float)R.winy)/2.0f;
+ zbuf_make_winmat(&R, winmat);
if(shi->obi->flag & R_TRANSFORMED)
- zbuf_make_winmat(&R, shi->obi->mat, winmat);
+ Mat4MulMat4(obwinmat, obi->mat, winmat);
else
- zbuf_make_winmat(&R, NULL, winmat);
+ Mat4CpyMat4(obwinmat, winmat);
- zbuf_render_project(winmat, v1->co, ho1);
- zbuf_render_project(winmat, v2->co, ho2);
- zbuf_render_project(winmat, v3->co, ho3);
+ zbuf_render_project(obwinmat, v1->co, ho1);
+ zbuf_render_project(obwinmat, v2->co, ho2);
+ zbuf_render_project(obwinmat, v3->co, ho3);
s00= ho3[0]/ho3[3] - ho1[0]/ho1[3];
s01= ho3[1]/ho3[3] - ho1[1]/ho1[3];
@@ -1290,7 +1307,7 @@ void shade_input_initialize(ShadeInput *shi, RenderPart *pa, RenderLayer *rl, in
shi->sample= sample;
shi->thread= pa->thread;
- shi->do_preview= R.r.scemode & R_NODE_PREVIEW;
+ shi->do_preview= (R.r.scemode & R_MATNODE_PREVIEW) != 0;
shi->lay= rl->lay;
shi->layflag= rl->layflag;
shi->passflag= rl->passflag;
diff --git a/source/blender/render/intern/source/sss.c b/source/blender/render/intern/source/sss.c
index 29f4d7729fe..a416c2d2764 100644
--- a/source/blender/render/intern/source/sss.c
+++ b/source/blender/render/intern/source/sss.c
@@ -862,6 +862,7 @@ static void sss_create_tree_mat(Render *re, Material *mat)
setting them back, maybe we need to create our own Render? */
/* do SSS preprocessing render */
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
rr= re->result;
osa= re->osa;
osaflag= re->r.mode & R_OSA;
@@ -875,13 +876,16 @@ static void sss_create_tree_mat(Render *re, Material *mat)
if(!(re->r.scemode & R_PREVIEWBUTS))
re->result= NULL;
+ BLI_rw_mutex_unlock(&re->resultmutex);
RE_TileProcessor(re, 0, 1);
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
if(!(re->r.scemode & R_PREVIEWBUTS)) {
RE_FreeRenderResult(re->result);
re->result= rr;
}
+ BLI_rw_mutex_unlock(&re->resultmutex);
re->i.partsdone= partsdone;
re->sss_mat= NULL;
diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c
index aeaca559918..28b45183771 100644
--- a/source/blender/render/intern/source/strand.c
+++ b/source/blender/render/intern/source/strand.c
@@ -417,6 +417,8 @@ typedef struct StrandPart {
intptr_t *rectdaps;
int rectx, recty;
int sample;
+ int shadow;
+ float (*jit)[2];
StrandSegment *segment;
float t[3], s[3];
@@ -525,7 +527,7 @@ static void do_strand_fillac(void *handle, int x, int y, float u, float v, float
}
}
else {
- bufferz= spart->rectz[offset];
+ bufferz= (spart->rectz)? spart->rectz[offset]: 0x7FFFFFFF;
if(spart->rectmask)
maskz= spart->rectmask[offset];
}
@@ -560,8 +562,10 @@ static void do_strand_fillac(void *handle, int x, int y, float u, float v, float
CHECK_ASSIGN(0);
}
- strand_shade_refcount(cache, sseg->v[1]);
- strand_shade_refcount(cache, sseg->v[2]);
+ if(cache) {
+ strand_shade_refcount(cache, sseg->v[1]);
+ strand_shade_refcount(cache, sseg->v[2]);
+ }
spart->totapixbuf[offset]++;
}
}
@@ -596,23 +600,16 @@ static void do_scanconvert_strand(Render *re, StrandPart *spart, ZSpan *zspan, f
VECCOPY(jco3, co3);
VECCOPY(jco4, co4);
- if(re->osa) {
- jx= -re->jit[sample][0];
- jy= -re->jit[sample][1];
+ if(spart->jit) {
+ jx= -spart->jit[sample][0];
+ jy= -spart->jit[sample][1];
jco1[0] += jx; jco1[1] += jy;
jco2[0] += jx; jco2[1] += jy;
jco3[0] += jx; jco3[1] += jy;
jco4[0] += jx; jco4[1] += jy;
- }
- else if(re->i.curblur) {
- jx= -re->jit[re->i.curblur-1][0];
- jy= -re->jit[re->i.curblur-1][1];
- jco1[0] += jx; jco1[1] += jy;
- jco2[0] += jx; jco2[1] += jy;
- jco3[0] += jx; jco3[1] += jy;
- jco4[0] += jx; jco4[1] += jy;
+ /* XXX mblur? */
}
spart->sample= sample;
@@ -756,7 +753,7 @@ void render_strand_segment(Render *re, float winmat[][4], StrandPart *spart, ZSp
}
/* render call to fill in strands */
-int zbuffer_strands_abuf(Render *re, RenderPart *pa, RenderLayer *rl, APixstrand *apixbuf, ListBase *apsmbase, StrandShadeCache *cache)
+int zbuffer_strands_abuf(Render *re, RenderPart *pa, APixstrand *apixbuf, ListBase *apsmbase, unsigned int lay, int negzmask, float winmat[][4], int winx, int winy, int sample, float (*jit)[2], float clipcrop, int shadow, StrandShadeCache *cache)
{
ObjectRen *obr;
ObjectInstanceRen *obi;
@@ -768,7 +765,7 @@ int zbuffer_strands_abuf(Render *re, RenderPart *pa, RenderLayer *rl, APixstrand
StrandSegment sseg;
StrandSortSegment *sortsegments = NULL, *sortseg, *firstseg;
MemArena *memarena;
- float z[4], bounds[4], winmat[4][4];
+ float z[4], bounds[4], obwinmat[4][4];
int a, b, c, i, totsegment, clip[4];
if(re->test_break(re->tbh))
@@ -788,27 +785,31 @@ int zbuffer_strands_abuf(Render *re, RenderPart *pa, RenderLayer *rl, APixstrand
spart.rectz= pa->rectz;
spart.rectmask= pa->rectmask;
spart.cache= cache;
+ spart.shadow= shadow;
+ spart.jit= jit;
- zbuf_alloc_span(&zspan, pa->rectx, pa->recty, re->clipcrop);
+ zbuf_alloc_span(&zspan, pa->rectx, pa->recty, clipcrop);
/* needed for transform from hoco to zbuffer co */
- zspan.zmulx= ((float)re->winx)/2.0;
- zspan.zmuly= ((float)re->winy)/2.0;
+ zspan.zmulx= ((float)winx)/2.0;
+ zspan.zmuly= ((float)winy)/2.0;
zspan.zofsx= -pa->disprect.xmin;
zspan.zofsy= -pa->disprect.ymin;
/* to center the sample position */
- zspan.zofsx -= 0.5f;
- zspan.zofsy -= 0.5f;
+ if(!shadow) {
+ zspan.zofsx -= 0.5f;
+ zspan.zofsy -= 0.5f;
+ }
zspan.apsmbase= apsmbase;
/* clipping setup */
- bounds[0]= (2*pa->disprect.xmin - re->winx-1)/(float)re->winx;
- bounds[1]= (2*pa->disprect.xmax - re->winx+1)/(float)re->winx;
- bounds[2]= (2*pa->disprect.ymin - re->winy-1)/(float)re->winy;
- bounds[3]= (2*pa->disprect.ymax - re->winy+1)/(float)re->winy;
+ bounds[0]= (2*pa->disprect.xmin - winx-1)/(float)winx;
+ bounds[1]= (2*pa->disprect.xmax - winx+1)/(float)winx;
+ bounds[2]= (2*pa->disprect.ymin - winy-1)/(float)winy;
+ bounds[3]= (2*pa->disprect.ymax - winy+1)/(float)winy;
memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
firstseg= NULL;
@@ -819,14 +820,14 @@ int zbuffer_strands_abuf(Render *re, RenderPart *pa, RenderLayer *rl, APixstrand
for(obi=re->instancetable.first, i=0; obi; obi=obi->next, i++) {
obr= obi->obr;
- if(!obr->strandbuf || !(obr->strandbuf->lay & rl->lay))
+ if(!obr->strandbuf || !(obr->strandbuf->lay & lay))
continue;
/* compute matrix and try clipping whole object */
if(obi->flag & R_TRANSFORMED)
- zbuf_make_winmat(re, obi->mat, winmat);
+ Mat4MulMat4(obwinmat, obi->mat, winmat);
else
- zbuf_make_winmat(re, NULL, winmat);
+ Mat4CpyMat4(obwinmat, winmat);
if(clip_render_object(obi->obr->boundbox, bounds, winmat))
continue;
@@ -843,14 +844,14 @@ int zbuffer_strands_abuf(Render *re, RenderPart *pa, RenderLayer *rl, APixstrand
svert= strand->vert;
/* keep clipping and z depth for 4 control points */
- clip[1]= strand_test_clip(winmat, &zspan, bounds, svert->co, &z[1]);
- clip[2]= strand_test_clip(winmat, &zspan, bounds, (svert+1)->co, &z[2]);
+ clip[1]= strand_test_clip(obwinmat, &zspan, bounds, svert->co, &z[1]);
+ clip[2]= strand_test_clip(obwinmat, &zspan, bounds, (svert+1)->co, &z[2]);
clip[0]= clip[1]; z[0]= z[1];
for(b=0; b<strand->totvert-1; b++, svert++) {
/* compute 4th point clipping and z depth */
if(b < strand->totvert-2) {
- clip[3]= strand_test_clip(winmat, &zspan, bounds, (svert+2)->co, &z[3]);
+ clip[3]= strand_test_clip(obwinmat, &zspan, bounds, (svert+2)->co, &z[3]);
}
else {
clip[3]= clip[2]; z[3]= z[2];
@@ -900,7 +901,11 @@ int zbuffer_strands_abuf(Render *re, RenderPart *pa, RenderLayer *rl, APixstrand
obi= &re->objectinstance[sortseg->obi];
obr= obi->obr;
- zbuf_make_winmat(re, NULL, winmat);
+
+ if(obi->flag & R_TRANSFORMED)
+ Mat4MulMat4(obwinmat, obi->mat, winmat);
+ else
+ Mat4CpyMat4(obwinmat, winmat);
sseg.obi= obi;
sseg.strand= RE_findOrAddStrand(obr, sortseg->strand);
@@ -917,7 +922,7 @@ int zbuffer_strands_abuf(Render *re, RenderPart *pa, RenderLayer *rl, APixstrand
spart.segment= &sseg;
- render_strand_segment(re, winmat, &spart, &zspan, 1, &sseg);
+ render_strand_segment(re, obwinmat, &spart, &zspan, 1, &sseg);
}
}
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c
index 2d2c01e0bf1..9510dc15e5a 100644
--- a/source/blender/render/intern/source/texture.c
+++ b/source/blender/render/intern/source/texture.c
@@ -721,7 +721,7 @@ static int evalnodes(Tex *tex, float *texvec, float *dxt, float *dyt, TexResult
short rv = TEX_INT;
bNodeTree *nodes = tex->nodetree;
- ntreeTexExecTree(nodes, texres, texvec, dxt, dyt, thread, tex, which_output, R.r.cfra);
+ ntreeTexExecTree(nodes, texres, texvec, dxt, dyt, thread, tex, which_output, R.r.cfra, (R.r.scemode & R_TEXNODE_PREVIEW) != 0);
if(texres->nor) rv |= TEX_NOR;
rv |= TEX_RGB;
@@ -1182,7 +1182,8 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
texres->talpha= 0; /* is set when image texture returns alpha (considered premul) */
if(tex->use_nodes && tex->nodetree) {
- retval = evalnodes(tex, texvec, dxt, dyt, texres, thread, which_output);
+ if(osatex) retval = evalnodes(tex, texvec, dxt, dyt, texres, thread, which_output);
+ else retval = evalnodes(tex, texvec, NULL, NULL, texres, thread, which_output);
}
else
switch(tex->type) {
@@ -1468,9 +1469,12 @@ void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg
}
}
-float texture_value_blend(float tex, float out, float fact, float facg, int blendtype, int flip)
+float texture_value_blend(float tex, float out, float fact, float facg, int blendtype)
{
float in=0.0, facm, col, scf;
+ int flip= (facg < 0.0f);
+
+ facg= fabsf(facg);
fact*= facg;
facm= 1.0-fact;
@@ -1631,7 +1635,7 @@ void do_material_tex(ShadeInput *shi)
float fact, facm, factt, facmm, stencilTin=1.0;
float texvec[3], dxt[3], dyt[3], tempvec[3], norvec[3], warpvec[3]={0.0f, 0.0f, 0.0f}, Tnor=1.0;
int tex_nr, rgbnor= 0, warpdone=0;
- float nu[3], nv[3], nn[3] = {0,0,0}, dudnu = 1.f, dudnv = 0.f, dvdnu = 0.f, dvdnv = 1.f; // bump mapping
+ float nu[3] = {0,0,0}, nv[3] = {0,0,0}, nn[3] = {0,0,0}, dudnu = 1.f, dudnv = 0.f, dvdnu = 0.f, dvdnv = 1.f; // bump mapping
int nunvdone= 0;
if (R.r.scemode & R_NO_TEX) return;
@@ -1732,6 +1736,16 @@ void do_material_tex(ShadeInput *shi)
vlr_set_uv_indices(shi->vlr, &j1, &j2, &j3);
+ // compute ortho basis around normal
+ if(!nunvdone) {
+ // render normal is negated
+ nn[0] = -shi->vn[0];
+ nn[1] = -shi->vn[1];
+ nn[2] = -shi->vn[2];
+ VecOrthoBasisf(nn, nu, nv);
+ nunvdone= 1;
+ }
+
if (tf) {
float *uv1 = tf->uv[j1], *uv2 = tf->uv[j2], *uv3 = tf->uv[j3];
const float an[3] = {fabsf(nn[0]), fabsf(nn[1]), fabsf(nn[2])};
@@ -1813,7 +1827,7 @@ void do_material_tex(ShadeInput *shi)
TexResult ttexr = {0, 0, 0, 0, 0, texres.talpha, NULL}; // temp TexResult
float tco[3], texv[3], cd, ud, vd, du, dv, idu, idv;
const int fromrgb = ((tex->type == TEX_IMAGE) || ((tex->flag & TEX_COLORBAND)!=0));
- const float bf = 0.04f*Tnor*((mtex->maptoneg & MAP_NORM) ? -mtex->norfac : mtex->norfac);
+ const float bf = 0.04f*Tnor*mtex->norfac;
// disable internal bump eval
float* nvec = texres.nor;
texres.nor = NULL;
@@ -2020,10 +2034,9 @@ void do_material_tex(ShadeInput *shi)
/* mapping */
if(mtex->mapto & (MAP_COL+MAP_COLSPEC+MAP_COLMIR)) {
- float tcol[3], colfac;
+ float tcol[3];
/* stencil maps on the texture control slider, not texture intensity value */
- colfac= mtex->colfac*stencilTin;
tcol[0]=texres.tr; tcol[1]=texres.tg; tcol[2]=texres.tb;
@@ -2043,15 +2056,19 @@ void do_material_tex(ShadeInput *shi)
}
if(mtex->mapto & MAP_COL) {
+ float colfac= mtex->colfac*stencilTin;
texture_rgb_blend(&shi->r, tcol, &shi->r, texres.tin, colfac, mtex->blendtype);
}
if(mtex->mapto & MAP_COLSPEC) {
- texture_rgb_blend(&shi->specr, tcol, &shi->specr, texres.tin, colfac, mtex->blendtype);
+ float colspecfac= mtex->colspecfac*stencilTin;
+ texture_rgb_blend(&shi->specr, tcol, &shi->specr, texres.tin, colspecfac, mtex->blendtype);
}
if(mtex->mapto & MAP_COLMIR) {
+ float mirrfac= mtex->mirrfac*stencilTin;
+
// exception for envmap only
if(tex->type==TEX_ENVMAP && mtex->blendtype==MTEX_BLEND) {
- fact= texres.tin*colfac;
+ fact= texres.tin*mirrfac;
facm= 1.0- fact;
shi->refcol[0]= fact + facm*shi->refcol[0];
shi->refcol[1]= fact*tcol[0] + facm*shi->refcol[1];
@@ -2059,14 +2076,13 @@ void do_material_tex(ShadeInput *shi)
shi->refcol[3]= fact*tcol[2] + facm*shi->refcol[3];
}
else {
- texture_rgb_blend(&shi->mirr, tcol, &shi->mirr, texres.tin, colfac, mtex->blendtype);
+ texture_rgb_blend(&shi->mirr, tcol, &shi->mirr, texres.tin, mirrfac, mtex->blendtype);
}
}
}
if( (mtex->mapto & MAP_NORM) ) {
if(texres.nor) {
- if(mtex->maptoneg & MAP_NORM) tex->norfac= -mtex->norfac;
- else tex->norfac= mtex->norfac;
+ tex->norfac= mtex->norfac;
/* we need to code blending modes for normals too once.. now 1 exception hardcoded */
@@ -2074,7 +2090,7 @@ void do_material_tex(ShadeInput *shi)
/* qdn: for normalmaps, to invert the normalmap vector,
it is better to negate x & y instead of subtracting the vector as was done before */
tex->norfac = mtex->norfac;
- if (mtex->maptoneg & MAP_NORM) {
+ if (tex->norfac < 0.0f) {
texres.nor[0] = -texres.nor[0];
texres.nor[1] = -texres.nor[1];
}
@@ -2159,8 +2175,7 @@ void do_material_tex(ShadeInput *shi)
/* Now that most textures offer both Nor and Intensity, allow */
/* both to work, and let user select with slider. */
if(texres.nor) {
- if(mtex->maptoneg & MAP_DISPLACE) tex->norfac= -mtex->norfac;
- else tex->norfac= mtex->norfac;
+ tex->norfac= mtex->norfac;
shi->displace[0]+= 0.2f*Tnor*tex->norfac*texres.nor[0];
shi->displace[1]+= 0.2f*Tnor*tex->norfac*texres.nor[1];
@@ -2172,12 +2187,7 @@ void do_material_tex(ShadeInput *shi)
else texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb);
}
- if(mtex->maptoneg & MAP_DISPLACE) {
- factt= (texres.tin-0.5f)*mtex->dispfac*stencilTin; facmm= 1.0f-factt;
- }
- else {
- factt= (0.5f-texres.tin)*mtex->dispfac*stencilTin; facmm= 1.0f-factt;
- }
+ factt= (0.5f-texres.tin)*mtex->dispfac*stencilTin; facmm= 1.0f-factt;
if(mtex->blendtype==MTEX_BLEND) {
shi->displace[0]= factt*shi->vn[0] + facmm*shi->displace[0];
@@ -2200,7 +2210,6 @@ void do_material_tex(ShadeInput *shi)
if(mtex->mapto & MAP_VARS) {
/* stencil maps on the texture control slider, not texture intensity value */
- float varfac= mtex->varfac*stencilTin;
if(rgbnor & TEX_RGB) {
if(texres.talpha) texres.tin= texres.ta;
@@ -2208,66 +2217,59 @@ void do_material_tex(ShadeInput *shi)
}
if(mtex->mapto & MAP_REF) {
- int flip= mtex->maptoneg & MAP_REF;
+ float difffac= mtex->difffac*stencilTin;
- shi->refl= texture_value_blend(mtex->def_var, shi->refl, texres.tin, varfac, mtex->blendtype, flip);
+ shi->refl= texture_value_blend(mtex->def_var, shi->refl, texres.tin, difffac, mtex->blendtype);
if(shi->refl<0.0) shi->refl= 0.0;
}
if(mtex->mapto & MAP_SPEC) {
- int flip= mtex->maptoneg & MAP_SPEC;
+ float specfac= mtex->specfac*stencilTin;
- shi->spec= texture_value_blend(mtex->def_var, shi->spec, texres.tin, varfac, mtex->blendtype, flip);
+ shi->spec= texture_value_blend(mtex->def_var, shi->spec, texres.tin, specfac, mtex->blendtype);
if(shi->spec<0.0) shi->spec= 0.0;
}
if(mtex->mapto & MAP_EMIT) {
- int flip= mtex->maptoneg & MAP_EMIT;
+ float emitfac= mtex->emitfac*stencilTin;
- shi->emit= texture_value_blend(mtex->def_var, shi->emit, texres.tin, varfac, mtex->blendtype, flip);
+ shi->emit= texture_value_blend(mtex->def_var, shi->emit, texres.tin, emitfac, mtex->blendtype);
if(shi->emit<0.0) shi->emit= 0.0;
}
if(mtex->mapto & MAP_ALPHA) {
- int flip= mtex->maptoneg & MAP_ALPHA;
+ float alphafac= mtex->alphafac*stencilTin;
- shi->alpha= texture_value_blend(mtex->def_var, shi->alpha, texres.tin, varfac, mtex->blendtype, flip);
+ shi->alpha= texture_value_blend(mtex->def_var, shi->alpha, texres.tin, alphafac, mtex->blendtype);
if(shi->alpha<0.0) shi->alpha= 0.0;
else if(shi->alpha>1.0) shi->alpha= 1.0;
}
if(mtex->mapto & MAP_HAR) {
- int flip= mtex->maptoneg & MAP_HAR;
float har; // have to map to 0-1
+ float hardfac= mtex->hardfac*stencilTin;
har= ((float)shi->har)/128.0;
- har= 128.0*texture_value_blend(mtex->def_var, har, texres.tin, varfac, mtex->blendtype, flip);
+ har= 128.0*texture_value_blend(mtex->def_var, har, texres.tin, hardfac, mtex->blendtype);
if(har<1.0) shi->har= 1;
else if(har>511.0) shi->har= 511;
else shi->har= (int)har;
}
if(mtex->mapto & MAP_RAYMIRR) {
- int flip= mtex->maptoneg & MAP_RAYMIRR;
+ float raymirrfac= mtex->raymirrfac*stencilTin;
- shi->ray_mirror= texture_value_blend(mtex->def_var, shi->ray_mirror, texres.tin, varfac, mtex->blendtype, flip);
+ shi->ray_mirror= texture_value_blend(mtex->def_var, shi->ray_mirror, texres.tin, raymirrfac, mtex->blendtype);
if(shi->ray_mirror<0.0) shi->ray_mirror= 0.0;
else if(shi->ray_mirror>1.0) shi->ray_mirror= 1.0;
}
if(mtex->mapto & MAP_TRANSLU) {
- int flip= mtex->maptoneg & MAP_TRANSLU;
+ float translfac= mtex->translfac*stencilTin;
- shi->translucency= texture_value_blend(mtex->def_var, shi->translucency, texres.tin, varfac, mtex->blendtype, flip);
+ shi->translucency= texture_value_blend(mtex->def_var, shi->translucency, texres.tin, translfac, mtex->blendtype);
if(shi->translucency<0.0) shi->translucency= 0.0;
else if(shi->translucency>1.0) shi->translucency= 1.0;
}
- if(mtex->mapto & MAP_LAYER) {
- int flip= mtex->maptoneg & MAP_LAYER;
-
- shi->layerfac= texture_value_blend(mtex->def_var, shi->layerfac, texres.tin, varfac, mtex->blendtype, flip);
- if(shi->layerfac<0.0) shi->layerfac= 0.0;
- else if(shi->layerfac>1.0) shi->layerfac= 1.0;
- }
if(mtex->mapto & MAP_AMB) {
- int flip= mtex->maptoneg & MAP_AMB;
+ float ambfac= mtex->ambfac*stencilTin;
- shi->amb= texture_value_blend(mtex->def_var, shi->amb, texres.tin, varfac, mtex->blendtype, flip);
+ shi->amb= texture_value_blend(mtex->def_var, shi->amb, texres.tin, ambfac, mtex->blendtype);
if(shi->amb<0.0) shi->amb= 0.0;
else if(shi->amb>1.0) shi->amb= 1.0;
@@ -2385,11 +2387,10 @@ void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, floa
}
- if((mapto_flag & (MAP_EMISSION_COL+MAP_ABSORPTION_COL)) && (mtex->mapto & (MAP_EMISSION_COL+MAP_ABSORPTION_COL))) {
- float tcol[3], colfac;
+ if((mapto_flag & (MAP_EMISSION_COL+MAP_TRANSMISSION_COL+MAP_REFLECTION_COL)) && (mtex->mapto & (MAP_EMISSION_COL+MAP_TRANSMISSION_COL+MAP_REFLECTION_COL))) {
+ float tcol[3];
/* stencil maps on the texture control slider, not texture intensity value */
- colfac= mtex->colfac*stencilTin;
if((rgbnor & TEX_RGB)==0) {
tcol[0]= mtex->r;
@@ -2410,18 +2411,23 @@ void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, floa
/* used for emit */
if((mapto_flag & MAP_EMISSION_COL) && (mtex->mapto & MAP_EMISSION_COL)) {
- texture_rgb_blend(col, tcol, col, texres.tin, colfac, mtex->blendtype);
+ float colemitfac= mtex->colemitfac*stencilTin;
+ texture_rgb_blend(col, tcol, col, texres.tin, colemitfac, mtex->blendtype);
}
- /* MAP_COLMIR is abused for absorption colour at the moment */
- if((mapto_flag & MAP_ABSORPTION_COL) && (mtex->mapto & MAP_ABSORPTION_COL)) {
- texture_rgb_blend(col, tcol, col, texres.tin, colfac, mtex->blendtype);
+ if((mapto_flag & MAP_REFLECTION_COL) && (mtex->mapto & MAP_REFLECTION_COL)) {
+ float colreflfac= mtex->colreflfac*stencilTin;
+ texture_rgb_blend(col, tcol, col, texres.tin, colreflfac, mtex->blendtype);
+ }
+
+ if((mapto_flag & MAP_TRANSMISSION_COL) && (mtex->mapto & MAP_TRANSMISSION_COL)) {
+ float coltransfac= mtex->coltransfac*stencilTin;
+ texture_rgb_blend(col, tcol, col, texres.tin, coltransfac, mtex->blendtype);
}
}
if((mapto_flag & MAP_VARS) && (mtex->mapto & MAP_VARS)) {
/* stencil maps on the texture control slider, not texture intensity value */
- float varfac= mtex->varfac*stencilTin;
/* convert RGB to intensity if intensity info isn't provided */
if (!(rgbnor & TEX_INT)) {
@@ -2432,27 +2438,27 @@ void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, floa
}
if((mapto_flag & MAP_EMISSION) && (mtex->mapto & MAP_EMISSION)) {
- int flip= mtex->maptoneg & MAP_EMISSION;
+ float emitfac= mtex->emitfac*stencilTin;
- *val = texture_value_blend(mtex->def_var, *val, texres.tin, varfac, mtex->blendtype, flip);
+ *val = texture_value_blend(mtex->def_var, *val, texres.tin, emitfac, mtex->blendtype);
if(*val<0.0) *val= 0.0;
}
if((mapto_flag & MAP_DENSITY) && (mtex->mapto & MAP_DENSITY)) {
- int flip= mtex->maptoneg & MAP_DENSITY;
+ float densfac= mtex->densfac*stencilTin;
- *val = texture_value_blend(mtex->def_var, *val, texres.tin, varfac, mtex->blendtype, flip);
+ *val = texture_value_blend(mtex->def_var, *val, texres.tin, densfac, mtex->blendtype);
CLAMP(*val, 0.0, 1.0);
}
- if((mapto_flag & MAP_ABSORPTION) && (mtex->mapto & MAP_ABSORPTION)) {
- int flip= mtex->maptoneg & MAP_ABSORPTION;
+ if((mapto_flag & MAP_SCATTERING) && (mtex->mapto & MAP_SCATTERING)) {
+ float scatterfac= mtex->scatterfac*stencilTin;
- *val = texture_value_blend(mtex->def_var, *val, texres.tin, varfac, mtex->blendtype, flip);
+ *val = texture_value_blend(mtex->def_var, *val, texres.tin, scatterfac, mtex->blendtype);
CLAMP(*val, 0.0, 1.0);
}
- if((mapto_flag & MAP_SCATTERING) && (mtex->mapto & MAP_SCATTERING)) {
- int flip= mtex->maptoneg & MAP_SCATTERING;
+ if((mapto_flag & MAP_REFLECTION) && (mtex->mapto & MAP_REFLECTION)) {
+ float reflfac= mtex->reflfac*stencilTin;
- *val = texture_value_blend(mtex->def_var, *val, texres.tin, varfac, mtex->blendtype, flip);
+ *val = texture_value_blend(mtex->def_var, *val, texres.tin, reflfac, mtex->blendtype);
CLAMP(*val, 0.0, 1.0);
}
}
@@ -2767,7 +2773,7 @@ void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, f
if(mtex->mapto & WOMAP_BLEND) {
if(rgb) texres.tin= (0.35*texres.tr+0.45*texres.tg+0.2*texres.tb);
- *blend= texture_value_blend(mtex->def_var, *blend, texres.tin, mtex->varfac, mtex->blendtype, 0);
+ *blend= texture_value_blend(mtex->def_var, *blend, texres.tin, mtex->blendfac, mtex->blendtype);
}
}
}
diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c
index 15d8643fea4..62d7343036a 100644
--- a/source/blender/render/intern/source/volume_precache.c
+++ b/source/blender/render/intern/source/volume_precache.c
@@ -46,6 +46,7 @@
#include "DNA_material_types.h"
#include "render_types.h"
+#include "rendercore.h"
#include "renderdatabase.h"
#include "volumetric.h"
#include "volume_precache.h"
@@ -66,18 +67,21 @@ extern struct Render R;
/* Recursive test for intersections, from a point inside the mesh, to outside
* Number of intersections (depth) determine if a point is inside or outside the mesh */
-int intersect_outside_volume(RayTree *tree, Isect *isect, float *offset, int limit, int depth)
+int intersect_outside_volume(RayObject *tree, Isect *isect, float *offset, int limit, int depth)
{
if (limit == 0) return depth;
- if (RE_ray_tree_intersect(tree, isect)) {
- float hitco[3];
+ if (RE_rayobject_raycast(tree, isect)) {
+
+ isect->start[0] = isect->start[0] + isect->labda*isect->vec[0];
+ isect->start[1] = isect->start[1] + isect->labda*isect->vec[1];
+ isect->start[2] = isect->start[2] + isect->labda*isect->vec[2];
+
+ isect->labda = FLT_MAX;
+ isect->skip = RE_SKIP_VLR_NEIGHBOUR;
+ isect->orig.face= isect->hit.face;
+ isect->orig.ob= isect->hit.ob;
- hitco[0] = isect->start[0] + isect->labda*isect->vec[0];
- hitco[1] = isect->start[1] + isect->labda*isect->vec[1];
- hitco[2] = isect->start[2] + isect->labda*isect->vec[2];
- VecAddf(isect->start, hitco, offset);
-
return intersect_outside_volume(tree, isect, offset, limit-1, depth+1);
} else {
return depth;
@@ -85,9 +89,8 @@ int intersect_outside_volume(RayTree *tree, Isect *isect, float *offset, int lim
}
/* Uses ray tracing to check if a point is inside or outside an ObjectInstanceRen */
-int point_inside_obi(RayTree *tree, ObjectInstanceRen *obi, float *co)
+int point_inside_obi(RayObject *tree, ObjectInstanceRen *obi, float *co)
{
- float maxsize = RE_ray_tree_max_size(tree);
Isect isect;
float vec[3] = {0.0f,0.0f,1.0f};
int final_depth=0, depth=0, limit=20;
@@ -95,18 +98,15 @@ int point_inside_obi(RayTree *tree, ObjectInstanceRen *obi, float *co)
/* set up the isect */
memset(&isect, 0, sizeof(isect));
VECCOPY(isect.start, co);
- isect.end[0] = co[0] + vec[0] * maxsize;
- isect.end[1] = co[1] + vec[1] * maxsize;
- isect.end[2] = co[2] + vec[2] * maxsize;
-
- /* and give it a little offset to prevent self-intersections */
- VecMulf(vec, 1e-5);
- VecAddf(isect.start, isect.start, vec);
-
+ VECCOPY(isect.vec, vec);
isect.mode= RE_RAY_MIRROR;
- isect.face_last= NULL;
+ isect.last_hit= NULL;
isect.lay= -1;
+ isect.labda = FLT_MAX;
+ isect.orig.face= NULL;
+ isect.orig.ob = NULL;
+
final_depth = intersect_outside_volume(tree, &isect, vec, limit, depth);
/* even number of intersections: point is outside
@@ -115,44 +115,6 @@ int point_inside_obi(RayTree *tree, ObjectInstanceRen *obi, float *co)
else return 1;
}
-static int inside_check_func(Isect *is, int ob, RayFace *face)
-{
- return 1;
-}
-static void vlr_face_coords(RayFace *face, float **v1, float **v2, float **v3, float **v4)
-{
- VlakRen *vlr= (VlakRen*)face;
-
- *v1 = (vlr->v1)? vlr->v1->co: NULL;
- *v2 = (vlr->v2)? vlr->v2->co: NULL;
- *v3 = (vlr->v3)? vlr->v3->co: NULL;
- *v4 = (vlr->v4)? vlr->v4->co: NULL;
-}
-
-RayTree *create_raytree_obi(ObjectInstanceRen *obi, float *bbmin, float *bbmax)
-{
- int v;
- VlakRen *vlr= NULL;
-
- /* create empty raytree */
- RayTree *tree = RE_ray_tree_create(64, obi->obr->totvlak, bbmin, bbmax,
- vlr_face_coords, inside_check_func, NULL, NULL);
-
- /* fill it with faces */
- for(v=0; v<obi->obr->totvlak; v++) {
- if((v & 255)==0)
- vlr= obi->obr->vlaknodes[v>>8].vlak;
- else
- vlr++;
-
- RE_ray_tree_add_face(tree, 0, vlr);
- }
-
- RE_ray_tree_done(tree);
-
- return tree;
-}
-
/* *** light cache filtering *** */
static float get_avg_surrounds(float *cache, int *res, int xx, int yy, int zz)
@@ -185,9 +147,9 @@ static float get_avg_surrounds(float *cache, int *res, int xx, int yy, int zz)
}
}
- tot /= added;
+ if (added > 0) tot /= added;
- return ((added>0)?tot:0.0f);
+ return tot;
}
/* function to filter the edges of the light cache, where there was no volume originally.
@@ -202,17 +164,54 @@ static void lightcache_filter(VolumePrecache *vp)
for (y=0; y < vp->res[1]; y++) {
for (x=0; x < vp->res[0]; x++) {
/* trigger for outside mesh */
- if (vp->data_r[ V_I(x, y, z, vp->res) ] < -0.5f)
+ if (vp->data_r[ V_I(x, y, z, vp->res) ] < -0.f)
vp->data_r[ V_I(x, y, z, vp->res) ] = get_avg_surrounds(vp->data_r, vp->res, x, y, z);
- if (vp->data_g[ V_I(x, y, z, vp->res) ] < -0.5f)
+ if (vp->data_g[ V_I(x, y, z, vp->res) ] < -0.f)
vp->data_g[ V_I(x, y, z, vp->res) ] = get_avg_surrounds(vp->data_g, vp->res, x, y, z);
- if (vp->data_b[ V_I(x, y, z, vp->res) ] < -0.5f)
+ if (vp->data_b[ V_I(x, y, z, vp->res) ] < -0.f)
vp->data_b[ V_I(x, y, z, vp->res) ] = get_avg_surrounds(vp->data_b, vp->res, x, y, z);
}
}
}
}
+static void lightcache_filter2(VolumePrecache *vp)
+{
+ int x, y, z;
+ float *new_r, *new_g, *new_b;
+ int field_size = vp->res[0]*vp->res[1]*vp->res[2]*sizeof(float);
+
+ new_r = MEM_mallocN(field_size, "temp buffer for light cache filter r channel");
+ new_g = MEM_mallocN(field_size, "temp buffer for light cache filter g channel");
+ new_b = MEM_mallocN(field_size, "temp buffer for light cache filter b channel");
+
+ memcpy(new_r, vp->data_r, field_size);
+ memcpy(new_g, vp->data_g, field_size);
+ memcpy(new_b, vp->data_b, field_size);
+
+ for (z=0; z < vp->res[2]; z++) {
+ for (y=0; y < vp->res[1]; y++) {
+ for (x=0; x < vp->res[0]; x++) {
+ /* trigger for outside mesh */
+ if (vp->data_r[ V_I(x, y, z, vp->res) ] < -0.f)
+ new_r[ V_I(x, y, z, vp->res) ] = get_avg_surrounds(vp->data_r, vp->res, x, y, z);
+ if (vp->data_g[ V_I(x, y, z, vp->res) ] < -0.f)
+ new_g[ V_I(x, y, z, vp->res) ] = get_avg_surrounds(vp->data_g, vp->res, x, y, z);
+ if (vp->data_b[ V_I(x, y, z, vp->res) ] < -0.f)
+ new_b[ V_I(x, y, z, vp->res) ] = get_avg_surrounds(vp->data_b, vp->res, x, y, z);
+ }
+ }
+ }
+
+ SWAP(float *, vp->data_r, new_r);
+ SWAP(float *, vp->data_g, new_g);
+ SWAP(float *, vp->data_b, new_b);
+
+ if (new_r) { MEM_freeN(new_r); new_r=NULL; }
+ if (new_g) { MEM_freeN(new_g); new_g=NULL; }
+ if (new_b) { MEM_freeN(new_b); new_b=NULL; }
+}
+
static inline int ms_I(int x, int y, int z, int *n) //has a pad of 1 voxel surrounding the core for boundary simulation
{
return z*(n[1]+2)*(n[0]+2) + y*(n[0]+2) + x;
@@ -364,7 +363,7 @@ void multiple_scattering_diffusion(Render *re, VolumePrecache *vp, Material *ma)
fac *= (energy_ss / energy_ms);
/* blend multiple scattering back in the light cache */
- if (shade_type == MA_VOL_SHADE_SINGLEPLUSMULTIPLE) {
+ if (shade_type == MA_VOL_SHADE_SHADEDPLUSMULTIPLE) {
/* conserve energy - half single, half multiple */
origf = 0.5f;
fac *= 0.5f;
@@ -421,13 +420,12 @@ static void *vol_precache_part(void *data)
{
VolPrecachePart *pa = (VolPrecachePart *)data;
ObjectInstanceRen *obi = pa->obi;
- RayTree *tree = pa->tree;
+ RayObject *tree = pa->tree;
ShadeInput *shi = pa->shi;
- float density, scatter_col[3] = {0.f, 0.f, 0.f};
+ float scatter_col[3] = {0.f, 0.f, 0.f};
float co[3];
int x, y, z;
const int res[3]= {pa->res[0], pa->res[1], pa->res[2]};
- const float stepsize = vol_get_stepsize(shi, STEPSIZE_VIEW);
for (z= pa->minz; z < pa->maxz; z++) {
co[2] = pa->bbmin[2] + (pa->voxel[2] * (z + 0.5f));
@@ -448,8 +446,7 @@ static void *vol_precache_part(void *data)
VecCopyf(shi->view, co);
Normalize(shi->view);
- density = vol_get_density(shi, co);
- vol_get_scattering(shi, scatter_col, co, stepsize, density);
+ vol_get_scattering(shi, scatter_col, co);
obi->volume_precache->data_r[ V_I(x, y, z, res) ] = scatter_col[0];
obi->volume_precache->data_g[ V_I(x, y, z, res) ] = scatter_col[1];
@@ -478,7 +475,7 @@ static void precache_setup_shadeinput(Render *re, ObjectInstanceRen *obi, Materi
shi->lay = re->scene->lay;
}
-static void precache_init_parts(Render *re, RayTree *tree, ShadeInput *shi, ObjectInstanceRen *obi, int totthread, int *parts)
+static void precache_init_parts(Render *re, RayObject *tree, ShadeInput *shi, ObjectInstanceRen *obi, int totthread, int *parts)
{
VolumePrecache *vp = obi->volume_precache;
int i=0, x, y, z;
@@ -593,7 +590,7 @@ void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *obi, Mat
{
VolumePrecache *vp;
VolPrecachePart *nextpa, *pa;
- RayTree *tree;
+ RayObject *tree;
ShadeInput shi;
ListBase threads;
float *bbmin=obi->obr->boundbox[0], *bbmax=obi->obr->boundbox[1];
@@ -608,8 +605,11 @@ void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *obi, Mat
/* create a raytree with just the faces of the instanced ObjectRen,
* used for checking if the cached point is inside or outside. */
- tree = create_raytree_obi(obi, bbmin, bbmax);
+ //tree = create_raytree_obi(obi, bbmin, bbmax);
+ tree = makeraytree_object(&R, obi);
if (!tree) return;
+ INIT_MINMAX(bbmin, bbmax);
+ RE_rayobject_merge_bb( tree, bbmin, bbmax);
vp = MEM_callocN(sizeof(VolumePrecache), "volume light cache");
@@ -672,13 +672,14 @@ void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *obi, Mat
BLI_freelistN(&re->volume_precache_parts);
if(tree) {
- RE_ray_tree_free(tree);
- tree= NULL;
+ //TODO: makeraytree_object creates a tree and saves it on OBI, if we free this tree we should also clear other pointers to it
+ //RE_rayobject_free(tree);
+ //tree= NULL;
}
lightcache_filter(obi->volume_precache);
- if (ELEM(ma->vol.shade_type, MA_VOL_SHADE_MULTIPLE, MA_VOL_SHADE_SINGLEPLUSMULTIPLE))
+ if (ELEM(ma->vol.shade_type, MA_VOL_SHADE_MULTIPLE, MA_VOL_SHADE_SHADEDPLUSMULTIPLE))
{
multiple_scattering_diffusion(re, vp, ma);
}
@@ -686,8 +687,8 @@ void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *obi, Mat
static int using_lightcache(Material *ma)
{
- return (((ma->vol.shadeflag & MA_VOL_PRECACHESHADING) && (ma->vol.shade_type == MA_VOL_SHADE_SINGLE))
- || (ELEM(ma->vol.shade_type, MA_VOL_SHADE_MULTIPLE, MA_VOL_SHADE_SINGLEPLUSMULTIPLE)));
+ return (((ma->vol.shadeflag & MA_VOL_PRECACHESHADING) && (ma->vol.shade_type == MA_VOL_SHADE_SHADED))
+ || (ELEM(ma->vol.shade_type, MA_VOL_SHADE_MULTIPLE, MA_VOL_SHADE_SHADEDPLUSMULTIPLE)));
}
/* loop through all objects (and their associated materials)
@@ -728,18 +729,19 @@ void free_volume_precache(Render *re)
BLI_freelistN(&re->volumes);
}
-int point_inside_volume_objectinstance(ObjectInstanceRen *obi, float *co)
+int point_inside_volume_objectinstance(Render *re, ObjectInstanceRen *obi, float *co)
{
- RayTree *tree;
+ RayObject *tree;
int inside=0;
- tree = create_raytree_obi(obi, obi->obr->boundbox[0], obi->obr->boundbox[1]);
+ tree = makeraytree_object(re, obi); //create_raytree_obi(obi, obi->obr->boundbox[0], obi->obr->boundbox[1]);
if (!tree) return 0;
inside = point_inside_obi(tree, obi, co);
- RE_ray_tree_free(tree);
- tree= NULL;
+ //TODO: makeraytree_object creates a tree and saves it on OBI, if we free this tree we should also clear other pointers to it
+ //RE_rayobject_free(tree);
+ //tree= NULL;
return inside;
}
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index bc425c8a1a3..7cb165ccaea 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -51,6 +51,7 @@
#include "render_types.h"
#include "pixelshading.h"
#include "shading.h"
+#include "shadbuf.h"
#include "texture.h"
#include "volumetric.h"
#include "volume_precache.h"
@@ -72,11 +73,53 @@ inline float luminance(float* col)
}
/* tracing */
+static float vol_get_shadow(ShadeInput *shi, LampRen *lar, float *co)
+{
+ float visibility = 1.f;
+
+ if(lar->shb) {
+ float dot=1.f;
+ float dxco[3]={0.f, 0.f, 0.f}, dyco[3]={0.f, 0.f, 0.f};
+
+ visibility = testshadowbuf(&R, lar->shb, co, dxco, dyco, 1.0, 0.0);
+ } else if (lar->mode & LA_SHAD_RAY) {
+ /* trace shadow manually, no good lamp api atm */
+ Isect is;
+
+ VecCopyf(is.start, co);
+ if(lar->type==LA_SUN || lar->type==LA_HEMI) {
+ is.vec[0] = -lar->vec[0];
+ is.vec[1] = -lar->vec[1];
+ is.vec[2] = -lar->vec[2];
+ is.labda = R.maxdist;
+ } else {
+ VECSUB( is.vec, lar->co, is.start );
+ is.labda = VecLength( is.vec );
+ }
+
+ is.mode = RE_RAY_MIRROR;
+ is.skip = RE_SKIP_VLR_RENDER_CHECK | RE_SKIP_VLR_NON_SOLID_MATERIAL;
+
+ if(lar->mode & (LA_LAYER|LA_LAYER_SHADOW))
+ is.lay= lar->lay;
+ else
+ is.lay= -1;
+
+ is.orig.ob = NULL;
+ is.orig.face = NULL;
+ is.last_hit = lar->last_hit[shi->thread];
+
+ if(RE_rayobject_raycast(R.raytree,&is)) {
+ visibility = 0.f;
+ }
+
+ lar->last_hit[shi->thread]= is.last_hit;
+ }
+ return visibility;
+}
static int vol_get_bounds(ShadeInput *shi, float *co, float *vec, float *hitco, Isect *isect, int intersect_type)
{
- float maxsize = RE_ray_tree_max_size(R.raytree);
-
/* XXX TODO - get raytrace max distance from object instance's bounding box */
/* need to account for scaling only, but keep coords in camera space...
* below code is WIP and doesn't work!
@@ -86,20 +129,22 @@ static int vol_get_bounds(ShadeInput *shi, float *co, float *vec, float *hitco,
*/
VECCOPY(isect->start, co);
- isect->end[0] = co[0] + vec[0] * maxsize;
- isect->end[1] = co[1] + vec[1] * maxsize;
- isect->end[2] = co[2] + vec[2] * maxsize;
-
+ VECCOPY(isect->vec, vec );
+ isect->labda = FLT_MAX;
isect->mode= RE_RAY_MIRROR;
- isect->oborig= RAY_OBJECT_SET(&R, shi->obi);
- isect->face_last= NULL;
- isect->ob_last= 0;
+ isect->last_hit = NULL;
isect->lay= -1;
- if (intersect_type == VOL_BOUNDS_DEPTH) isect->faceorig= (RayFace*)shi->vlr;
- else if (intersect_type == VOL_BOUNDS_SS) isect->faceorig= NULL;
+ if (intersect_type == VOL_BOUNDS_DEPTH) {
+ isect->skip = RE_SKIP_VLR_NEIGHBOUR;
+ isect->orig.face = (void*)shi->vlr;
+ isect->orig.ob = (void*)shi->obi;
+ } else if (intersect_type == VOL_BOUNDS_SS) {
+ isect->orig.face= NULL;
+ isect->orig.ob = NULL;
+ }
- if(RE_ray_tree_intersect(R.raytree, isect))
+ if(RE_rayobject_raycast(R.raytree, isect))
{
hitco[0] = isect->start[0] + isect->labda*isect->vec[0];
hitco[1] = isect->start[1] + isect->labda*isect->vec[1];
@@ -146,23 +191,20 @@ static void shade_intersection(ShadeInput *shi, float *col, Isect *is)
static void vol_trace_behind(ShadeInput *shi, VlakRen *vlr, float *co, float *col)
{
Isect isect;
- float maxsize = RE_ray_tree_max_size(R.raytree);
VECCOPY(isect.start, co);
- isect.end[0] = isect.start[0] + shi->view[0] * maxsize;
- isect.end[1] = isect.start[1] + shi->view[1] * maxsize;
- isect.end[2] = isect.start[2] + shi->view[2] * maxsize;
-
- isect.faceorig= (RayFace *)vlr;
+ VECCOPY(isect.vec, shi->view);
+ isect.labda = FLT_MAX;
isect.mode= RE_RAY_MIRROR;
- isect.oborig= RAY_OBJECT_SET(&R, shi->obi);
- isect.face_last= NULL;
- isect.ob_last= 0;
+ isect.skip = RE_SKIP_VLR_NEIGHBOUR | RE_SKIP_VLR_RENDER_CHECK;
+ isect.orig.ob = (void*) shi->obi;
+ isect.orig.face = (void*)vlr;
+ isect.last_hit = NULL;
isect.lay= -1;
/* check to see if there's anything behind the volume, otherwise shade the sky */
- if(RE_ray_tree_intersect(R.raytree, &isect)) {
+ if(RE_rayobject_raycast(R.raytree, &isect)) {
shade_intersection(shi, col, &isect);
} else {
shadeSkyView(col, co, shi->view, NULL, shi->thread);
@@ -170,29 +212,6 @@ static void vol_trace_behind(ShadeInput *shi, VlakRen *vlr, float *co, float *co
}
}
-/* input shader data */
-
-float vol_get_stepsize(struct ShadeInput *shi, int context)
-{
- if (shi->mat->vol.stepsize_type == MA_VOL_STEP_RANDOMIZED) {
- /* range between 0.75 and 1.25 */
- const float rnd = 0.5f * BLI_thread_frand(shi->thread) + 0.75f;
-
- if (context == STEPSIZE_VIEW)
- return shi->mat->vol.stepsize * rnd;
- else if (context == STEPSIZE_SHADE)
- return shi->mat->vol.shade_stepsize * rnd;
- }
- else { // MA_VOL_STEP_CONSTANT
-
- if (context == STEPSIZE_VIEW)
- return shi->mat->vol.stepsize;
- else if (context == STEPSIZE_SHADE)
- return shi->mat->vol.shade_stepsize;
- }
-
- return shi->mat->vol.stepsize;
-}
/* trilinear interpolation */
static void vol_get_precached_scattering(ShadeInput *shi, float *scatter_col, float *co)
@@ -212,9 +231,9 @@ static void vol_get_precached_scattering(ShadeInput *shi, float *scatter_col, fl
sample_co[1] = ((co[1] - bbmin[1]) / dim[1]);
sample_co[2] = ((co[2] - bbmin[2]) / dim[2]);
- scatter_col[0] = voxel_sample_trilinear(vp->data_r, vp->res, sample_co);
- scatter_col[1] = voxel_sample_trilinear(vp->data_g, vp->res, sample_co);
- scatter_col[2] = voxel_sample_trilinear(vp->data_b, vp->res, sample_co);
+ scatter_col[0] = voxel_sample_triquadratic(vp->data_r, vp->res, sample_co);
+ scatter_col[1] = voxel_sample_triquadratic(vp->data_g, vp->res, sample_co);
+ scatter_col[2] = voxel_sample_triquadratic(vp->data_b, vp->res, sample_co);
}
/* Meta object density, brute force for now
@@ -270,7 +289,8 @@ float vol_get_density(struct ShadeInput *shi, float *co)
float density = shi->mat->vol.density;
float density_scale = shi->mat->vol.density_scale;
- do_volume_tex(shi, co, MAP_DENSITY, NULL, &density);
+ if (shi->mat->mapto_textured & MAP_DENSITY)
+ do_volume_tex(shi, co, MAP_DENSITY, NULL, &density);
// if meta-object, modulate by metadensity without increasing it
if (shi->obi->obr->ob->type == OB_MBALL) {
@@ -281,79 +301,110 @@ float vol_get_density(struct ShadeInput *shi, float *co)
return density * density_scale;
}
-/* scattering multiplier, values above 1.0 are non-physical,
- * but can be useful to tweak lighting */
-float vol_get_scattering_fac(ShadeInput *shi, float *co)
+
+/* Color of light that gets scattered out by the volume */
+/* Uses same physically based scattering parameter as in transmission calculations,
+ * along with artificial reflection scale/reflection color tint */
+void vol_get_reflection_color(ShadeInput *shi, float *ref_col, float *co)
{
float scatter = shi->mat->vol.scattering;
- float col[3] = {0.0, 0.0, 0.0};
+ float reflection= shi->mat->vol.reflection;
+ VECCOPY(ref_col, shi->mat->vol.reflection_col);
- do_volume_tex(shi, co, MAP_SCATTERING, col, &scatter);
+ if (shi->mat->mapto_textured & (MAP_SCATTERING+MAP_REFLECTION_COL))
+ do_volume_tex(shi, co, MAP_SCATTERING+MAP_REFLECTION_COL, ref_col, &scatter);
- return scatter;
+ /* only one single float parameter at a time... :s */
+ if (shi->mat->mapto_textured & (MAP_REFLECTION))
+ do_volume_tex(shi, co, MAP_REFLECTION, NULL, &reflection);
+
+ ref_col[0] = reflection * ref_col[0] * scatter;
+ ref_col[1] = reflection * ref_col[1] * scatter;
+ ref_col[2] = reflection * ref_col[2] * scatter;
}
/* compute emission component, amount of radiance to add per segment
* can be textured with 'emit' */
-void vol_get_emission(ShadeInput *shi, float *emission_col, float *co, float density)
+void vol_get_emission(ShadeInput *shi, float *emission_col, float *co)
{
float emission = shi->mat->vol.emission;
VECCOPY(emission_col, shi->mat->vol.emission_col);
- do_volume_tex(shi, co, MAP_EMISSION+MAP_EMISSION_COL, emission_col, &emission);
+ if (shi->mat->mapto_textured & (MAP_EMISSION+MAP_EMISSION_COL))
+ do_volume_tex(shi, co, MAP_EMISSION+MAP_EMISSION_COL, emission_col, &emission);
- emission_col[0] = emission_col[0] * emission * density;
- emission_col[1] = emission_col[1] * emission * density;
- emission_col[2] = emission_col[2] * emission * density;
+ emission_col[0] = emission_col[0] * emission;
+ emission_col[1] = emission_col[1] * emission;
+ emission_col[2] = emission_col[2] * emission;
}
-void vol_get_absorption(ShadeInput *shi, float *absorb_col, float *co)
+
+/* A combination of scattering and absorption -> known as sigma T.
+ * This can possibly use a specific scattering colour,
+ * and absorption multiplier factor too, but these parameters are left out for simplicity.
+ * It's easy enough to get a good wide range of results with just these two parameters. */
+void vol_get_sigma_t(ShadeInput *shi, float *sigma_t, float *co)
{
- float absorption = shi->mat->vol.absorption;
- VECCOPY(absorb_col, shi->mat->vol.absorption_col);
+ /* technically absorption, but named transmission color
+ * since it describes the effect of the coloring *after* absorption */
+ float transmission_col[3] = {shi->mat->vol.transmission_col[0], shi->mat->vol.transmission_col[1], shi->mat->vol.transmission_col[2]};
+ float scattering = shi->mat->vol.scattering;
- do_volume_tex(shi, co, MAP_ABSORPTION+MAP_ABSORPTION_COL, absorb_col, &absorption);
+ if (shi->mat->mapto_textured & (MAP_SCATTERING+MAP_TRANSMISSION_COL))
+ do_volume_tex(shi, co, MAP_SCATTERING+MAP_TRANSMISSION_COL, transmission_col, &scattering);
- absorb_col[0] = (1.0f - absorb_col[0]) * absorption;
- absorb_col[1] = (1.0f - absorb_col[1]) * absorption;
- absorb_col[2] = (1.0f - absorb_col[2]) * absorption;
+ sigma_t[0] = (1.0f - transmission_col[0]) + scattering;
+ sigma_t[1] = (1.0f - transmission_col[1]) + scattering;
+ sigma_t[2] = (1.0f - transmission_col[2]) + scattering;
}
/* phase function - determines in which directions the light
* is scattered in the volume relative to incoming direction
* and view direction */
-float vol_get_phasefunc(ShadeInput *shi, short phasefunc_type, float g, float *w, float *wp)
+float vol_get_phasefunc(ShadeInput *shi, float g, float *w, float *wp)
{
- const float costheta = Inpf(w, wp);
- const float scale = M_PI;
-
- /*
- * Scale constant is required, since Blender's shading system doesn't normalise for
- * energy conservation - eg. scaling by 1/pi for a lambert shader.
- * This makes volumes darker than other solid objects, for the same lighting intensity.
- * To correct this, scale up the phase function values
+ const float normalize = 0.25f; // = 1.f/4.f = M_PI/(4.f*M_PI)
+
+ /* normalization constant is 1/4 rather than 1/4pi, since
+ * Blender's shading system doesn't normalise for
+ * energy conservation - eg. multiplying by pdf ( 1/pi for a lambert brdf ).
+ * This means that lambert surfaces in Blender are pi times brighter than they 'should be'
+ * and therefore, with correct energy conservation, volumes will darker than other solid objects,
+ * for the same lighting intensity.
+ * To correct this, scale up the phase function values by pi
* until Blender's shading system supports this better. --matt
*/
+ if (g == 0.f) { /* isotropic */
+ return normalize * 1.f;
+ } else { /* schlick */
+ const float k = 1.55f * g - .55f * g * g * g;
+ const float kcostheta = k * Inpf(w, wp);
+ return normalize * (1.f - k*k) / ((1.f - kcostheta) * (1.f - kcostheta));
+ }
+
+ /*
+ * not used, but here for reference:
switch (phasefunc_type) {
case MA_VOL_PH_MIEHAZY:
- return scale * (0.5f + 4.5f * powf(0.5 * (1.f + costheta), 8.f)) / (4.f*M_PI);
+ return normalize * (0.5f + 4.5f * powf(0.5 * (1.f + costheta), 8.f));
case MA_VOL_PH_MIEMURKY:
- return scale * (0.5f + 16.5f * powf(0.5 * (1.f + costheta), 32.f)) / (4.f*M_PI);
+ return normalize * (0.5f + 16.5f * powf(0.5 * (1.f + costheta), 32.f));
case MA_VOL_PH_RAYLEIGH:
- return scale * 3.f/(16.f*M_PI) * (1 + costheta * costheta);
+ return normalize * 3.f/4.f * (1 + costheta * costheta);
case MA_VOL_PH_HG:
- return scale * (1.f / (4.f * M_PI) * (1.f - g*g) / powf(1.f + g*g - 2.f * g * costheta, 1.5f));
+ return normalize * (1.f - g*g) / powf(1.f + g*g - 2.f * g * costheta, 1.5f));
case MA_VOL_PH_SCHLICK:
{
const float k = 1.55f * g - .55f * g * g * g;
const float kcostheta = k * costheta;
- return scale * (1.f / (4.f * M_PI) * (1.f - k*k) / ((1.f - kcostheta) * (1.f - kcostheta)));
+ return normalize * (1.f - k*k) / ((1.f - kcostheta) * (1.f - kcostheta));
}
case MA_VOL_PH_ISOTROPIC:
default:
- return scale * (1.f / (4.f * M_PI));
+ return normalize * 1.f;
}
+ */
}
/* Compute transmittance = e^(-attenuation) */
@@ -361,15 +412,15 @@ void vol_get_transmittance_seg(ShadeInput *shi, float *tr, float stepsize, float
{
/* input density = density at co */
float tau[3] = {0.f, 0.f, 0.f};
- float absorb[3];
- const float scatter_dens = vol_get_scattering_fac(shi, co) * density * stepsize;
-
- vol_get_absorption(shi, absorb, co);
+ const float stepd = density * stepsize;
+ float sigma_t[3];
+
+ vol_get_sigma_t(shi, sigma_t, co);
/* homogenous volume within the sampled distance */
- tau[0] += scatter_dens * absorb[0];
- tau[1] += scatter_dens * absorb[1];
- tau[2] += scatter_dens * absorb[2];
+ tau[0] += stepd * sigma_t[0];
+ tau[1] += stepd * sigma_t[1];
+ tau[2] += stepd * sigma_t[2];
tr[0] *= exp(-tau[0]);
tr[1] *= exp(-tau[1]);
@@ -381,31 +432,29 @@ static void vol_get_transmittance(ShadeInput *shi, float *tr, float *co, float *
{
float p[3] = {co[0], co[1], co[2]};
float step_vec[3] = {endco[0] - co[0], endco[1] - co[1], endco[2] - co[2]};
- //const float ambtau = -logf(shi->mat->vol.depth_cutoff); // never zero
float tau[3] = {0.f, 0.f, 0.f};
float t0 = 0.f;
float t1 = Normalize(step_vec);
float pt0 = t0;
- t0 += shi->mat->vol.shade_stepsize * ((shi->mat->vol.stepsize_type == MA_VOL_STEP_CONSTANT) ? 0.5f : BLI_thread_frand(shi->thread));
+ t0 += shi->mat->vol.stepsize * ((shi->mat->vol.stepsize_type == MA_VOL_STEP_CONSTANT) ? 0.5f : BLI_thread_frand(shi->thread));
p[0] += t0 * step_vec[0];
p[1] += t0 * step_vec[1];
p[2] += t0 * step_vec[2];
- VecMulf(step_vec, shi->mat->vol.shade_stepsize);
+ VecMulf(step_vec, shi->mat->vol.stepsize);
- for (; t0 < t1; pt0 = t0, t0 += shi->mat->vol.shade_stepsize) {
- float absorb[3];
+ for (; t0 < t1; pt0 = t0, t0 += shi->mat->vol.stepsize) {
const float d = vol_get_density(shi, p);
const float stepd = (t0 - pt0) * d;
- const float scatter_dens = vol_get_scattering_fac(shi, p) * stepd;
- vol_get_absorption(shi, absorb, p);
+ float sigma_t[3];
- tau[0] += scatter_dens * absorb[0];
- tau[1] += scatter_dens * absorb[1];
- tau[2] += scatter_dens * absorb[2];
+ vol_get_sigma_t(shi, sigma_t, co);
+
+ tau[0] += stepd * sigma_t[0];
+ tau[1] += stepd * sigma_t[1];
+ tau[2] += stepd * sigma_t[2];
- //if (luminance(tau) >= ambtau) break;
VecAddf(p, p, step_vec);
}
@@ -420,9 +469,7 @@ void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar, float *
float visifac, lv[3], lampdist;
float tr[3]={1.0,1.0,1.0};
float hitco[3], *atten_co;
- float p;
- float scatter_fac;
- float shade_stepsize = vol_get_stepsize(shi, STEPSIZE_SHADE);
+ float p, ref_col[3];
if (lar->mode & LA_LAYER) if((lar->lay & shi->obi->lay)==0) return;
if ((lar->lay & shi->lay)==0) return;
@@ -443,13 +490,22 @@ void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar, float *
VECCOPY(lv, lar->vec);
VecMulf(lv, -1.0f);
- if (shi->mat->vol.shade_type != MA_VOL_SHADE_NONE) {
+ if (shi->mat->vol.shade_type == MA_VOL_SHADE_SHADOWED) {
+ VecMulf(lacol, vol_get_shadow(shi, lar, co));
+ }
+ else if (shi->mat->vol.shade_type == MA_VOL_SHADE_SHADED)
+ {
Isect is;
+ if (shi->mat->vol.shadeflag & MA_VOL_RECV_EXT_SHADOW) {
+ VecMulf(lacol, vol_get_shadow(shi, lar, co));
+ if (luminance(lacol) < 0.001f) return;
+ }
+
/* find minimum of volume bounds, or lamp coord */
if (vol_get_bounds(shi, co, lv, hitco, &is, VOL_BOUNDS_SS)) {
float dist = VecLenf(co, hitco);
- VlakRen *vlr = (VlakRen *)is.face;
+ VlakRen *vlr = (VlakRen *)is.hit.face;
/* simple internal shadowing */
if (vlr->mat->material_type == MA_TYPE_SURFACE) {
@@ -476,15 +532,20 @@ void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar, float *
}
}
- p = vol_get_phasefunc(shi, shi->mat->vol.phasefunc_type, shi->mat->vol.phasefunc_g, shi->view, lv);
- VecMulf(lacol, p);
+ if (luminance(lacol) < 0.001f) return;
+
+ p = vol_get_phasefunc(shi, shi->mat->vol.asymmetry, shi->view, lv);
- scatter_fac = vol_get_scattering_fac(shi, co);
- VecMulf(lacol, scatter_fac);
+ /* physically based scattering with non-physically based RGB gain */
+ vol_get_reflection_color(shi, ref_col, co);
+
+ lacol[0] *= p * ref_col[0];
+ lacol[1] *= p * ref_col[1];
+ lacol[2] *= p * ref_col[2];
}
/* single scattering only for now */
-void vol_get_scattering(ShadeInput *shi, float *scatter_col, float *co, float stepsize, float density)
+void vol_get_scattering(ShadeInput *shi, float *scatter_col, float *co)
{
ListBase *lights;
GroupObject *go;
@@ -516,71 +577,69 @@ outgoing radiance from behind surface * beam transmittance/attenuation
--> radiance for each segment =
(radiance added by scattering + radiance added by emission) * beam transmittance/attenuation
*/
+
+/* For ease of use, I've also introduced a 'reflection' and 'reflection color' parameter, which isn't
+ * physically correct. This works as an RGB tint/gain on out-scattered light, but doesn't affect the light
+ * that is transmitted through the volume. While having wavelength dependent absorption/scattering is more correct,
+ * it also makes it harder to control the overall look of the volume since colouring the outscattered light results
+ * in the inverse colour being transmitted through the rest of the volume.
+ */
static void volumeintegrate(struct ShadeInput *shi, float *col, float *co, float *endco)
{
- float tr[3] = {1.0f, 1.0f, 1.0f};
- float radiance[3] = {0.f, 0.f, 0.f}, d_radiance[3] = {0.f, 0.f, 0.f};
- float stepsize = vol_get_stepsize(shi, STEPSIZE_VIEW);
- int nsteps, s;
- float emit_col[3], scatter_col[3] = {0.0, 0.0, 0.0};
- float stepvec[3], step_sta[3], step_end[3], step_mid[3];
- float density;
- const float depth_cutoff = shi->mat->vol.depth_cutoff;
-
- /* ray marching */
- nsteps = (int)((VecLenf(co, endco) / stepsize) + 0.5);
-
- VecSubf(stepvec, endco, co);
- VecMulf(stepvec, 1.0f / nsteps);
- VecCopyf(step_sta, co);
- VecAddf(step_end, step_sta, stepvec);
-
- /* get radiance from all points along the ray due to participating media */
- for (s = 0; s < nsteps; s++) {
-
- density = vol_get_density(shi, step_sta);
+ float radiance[3] = {0.f, 0.f, 0.f};
+ float tr[3] = {1.f, 1.f, 1.f};
+ float p[3] = {co[0], co[1], co[2]};
+ float step_vec[3] = {endco[0] - co[0], endco[1] - co[1], endco[2] - co[2]};
+ const float stepsize = shi->mat->vol.stepsize;
+
+ float t0 = 0.f;
+ float pt0 = t0;
+ float t1 = Normalize(step_vec); /* returns vector length */
+
+ t0 += stepsize * ((shi->mat->vol.stepsize_type == MA_VOL_STEP_CONSTANT) ? 0.5f : BLI_thread_frand(shi->thread));
+ p[0] += t0 * step_vec[0];
+ p[1] += t0 * step_vec[1];
+ p[2] += t0 * step_vec[2];
+ VecMulf(step_vec, stepsize);
+
+ for (; t0 < t1; pt0 = t0, t0 += stepsize) {
+ const float density = vol_get_density(shi, p);
- /* there's only any use in shading here if there's actually some density to shade! */
if (density > 0.01f) {
-
+ float scatter_col[3], emit_col[3];
+ const float stepd = (t0 - pt0) * density;
+
/* transmittance component (alpha) */
vol_get_transmittance_seg(shi, tr, stepsize, co, density);
-
- step_mid[0] = step_sta[0] + (stepvec[0] * 0.5);
- step_mid[1] = step_sta[1] + (stepvec[1] * 0.5);
- step_mid[2] = step_sta[2] + (stepvec[2] * 0.5);
-
- /* incoming light via emission or scattering (additive) */
- vol_get_emission(shi, emit_col, step_mid, density);
- if (shi->obi->volume_precache)
- vol_get_precached_scattering(shi, scatter_col, step_mid);
- else
- vol_get_scattering(shi, scatter_col, step_mid, stepsize, density);
+ if (luminance(tr) < shi->mat->vol.depth_cutoff) break;
- VecMulf(scatter_col, density);
- VecAddf(d_radiance, emit_col, scatter_col);
+ vol_get_emission(shi, emit_col, p);
- /* Lv += Tr * (Lve() + Ld) */
- VecMulVecf(d_radiance, tr, d_radiance);
- VecMulf(d_radiance, stepsize);
+ if (shi->obi->volume_precache) {
+ float p2[3];
+
+ p2[0] = p[0] + (step_vec[0] * 0.5);
+ p2[1] = p[1] + (step_vec[1] * 0.5);
+ p2[2] = p[2] + (step_vec[2] * 0.5);
+
+ vol_get_precached_scattering(shi, scatter_col, p2);
+ } else
+ vol_get_scattering(shi, scatter_col, p);
- VecAddf(radiance, radiance, d_radiance);
+ radiance[0] += stepd * tr[0] * (emit_col[0] + scatter_col[0]);
+ radiance[1] += stepd * tr[1] * (emit_col[1] + scatter_col[1]);
+ radiance[2] += stepd * tr[2] * (emit_col[2] + scatter_col[2]);
}
-
- VecCopyf(step_sta, step_end);
- VecAddf(step_end, step_end, stepvec);
-
- /* luminance rec. 709 */
- if ((0.2126*tr[0] + 0.7152*tr[1] + 0.0722*tr[2]) < depth_cutoff) break;
+ VecAddf(p, p, step_vec);
}
- /* multiply original color (behind volume) with beam transmittance over entire distance */
- VecMulVecf(col, tr, col);
+ /* multiply original color (from behind volume) with transmittance over entire distance */
+ VecMulVecf(col, tr, col);
VecAddf(col, col, radiance);
/* alpha <-- transmission luminance */
- col[3] = 1.0f -(0.2126*tr[0] + 0.7152*tr[1] + 0.0722*tr[2]);
+ col[3] = 1.0f - luminance(tr);
}
/* the main entry point for volume shading */
@@ -607,7 +666,7 @@ static void volume_trace(struct ShadeInput *shi, struct ShadeResult *shr, int in
/* don't render the backfaces of ztransp volume materials.
* volume shading renders the internal volume from between the
- * near view intersection of the solid volume to the
+ * ' view intersection of the solid volume to the
* intersection on the other side, as part of the shading of
* the front face.
@@ -646,7 +705,7 @@ static void volume_trace(struct ShadeInput *shi, struct ShadeResult *shr, int in
/* (ray intersect ignores front faces here) */
else if (vol_get_bounds(shi, shi->co, shi->view, hitco, &is, VOL_BOUNDS_DEPTH))
{
- VlakRen *vlr = (VlakRen *)is.face;
+ VlakRen *vlr = (VlakRen *)is.hit.face;
startco = shi->co;
endco = hitco;
@@ -655,7 +714,7 @@ static void volume_trace(struct ShadeInput *shi, struct ShadeResult *shr, int in
/* if it's another face in the same material */
if (vlr->mat == shi->mat) {
/* trace behind the 2nd (raytrace) hit point */
- vol_trace_behind(shi, (VlakRen *)is.face, endco, col);
+ vol_trace_behind(shi, (VlakRen *)is.hit.face, endco, col);
} else {
shade_intersection(shi, col, &is);
}
@@ -683,7 +742,6 @@ void shade_volume_shadow(struct ShadeInput *shi, struct ShadeResult *shr, struct
float hitco[3];
float tr[3] = {1.0,1.0,1.0};
Isect is;
- float shade_stepsize = vol_get_stepsize(shi, STEPSIZE_SHADE);
float *startco, *endco;
float density=0.f;
@@ -711,8 +769,7 @@ void shade_volume_shadow(struct ShadeInput *shi, struct ShadeResult *shr, struct
vol_get_transmittance(shi, tr, startco, endco);
VecCopyf(shr->combined, tr);
- shr->combined[3] = 1.0f -(0.2126*tr[0] + 0.7152*tr[1] + 0.0722*tr[2]);
- shr->alpha = shr->combined[3];
+ shr->combined[3] = 1.0f - luminance(tr);
}
@@ -749,4 +806,4 @@ void shade_volume_inside(ShadeInput *shi, ShadeResult *shr)
shi->mat = mat_backup;
shi->obi = obi_backup;
shi->obr = obi_backup->obr;
-} \ No newline at end of file
+}
diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c
index 9318d37620c..479f33c9ff2 100644
--- a/source/blender/render/intern/source/voxeldata.c
+++ b/source/blender/render/intern/source/voxeldata.c
@@ -226,9 +226,6 @@ void make_voxeldata(struct Render *re)
{
Tex *tex;
- if(re->scene->r.scemode & R_PREVIEWBUTS)
- return;
-
re->i.infostr= "Loading voxel datasets";
re->stats_draw(re->sdh, &re->i);
@@ -259,9 +256,6 @@ void free_voxeldata(Render *re)
{
Tex *tex;
- if(re->scene->r.scemode & R_PREVIEWBUTS)
- return;
-
for (tex= G.main->tex.first; tex; tex= tex->id.next) {
if(tex->id.us && tex->type==TEX_VOXELDATA) {
free_voxeldata_one(re, tex);
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index 3b3a8568933..6e305a2b82b 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -271,7 +271,7 @@ static APixstr *addpsmainA(ListBase *lb)
return psm->ps;
}
-static void freepsA(ListBase *lb)
+void freepsA(ListBase *lb)
{
APixstrMain *psm, *psmnext;
@@ -1760,12 +1760,12 @@ static int zbuf_shadow_project(ZbufProjectCache *cache, int index, float winmat[
}
}
-static void zbuffer_part_bounds(Render *re, RenderPart *pa, float *bounds)
+static void zbuffer_part_bounds(int winx, int winy, RenderPart *pa, float *bounds)
{
- bounds[0]= (2*pa->disprect.xmin - re->winx-1)/(float)re->winx;
- bounds[1]= (2*pa->disprect.xmax - re->winx+1)/(float)re->winx;
- bounds[2]= (2*pa->disprect.ymin - re->winy-1)/(float)re->winy;
- bounds[3]= (2*pa->disprect.ymax - re->winy+1)/(float)re->winy;
+ bounds[0]= (2*pa->disprect.xmin - winx-1)/(float)winx;
+ bounds[1]= (2*pa->disprect.xmax - winx+1)/(float)winx;
+ bounds[2]= (2*pa->disprect.ymin - winy-1)/(float)winy;
+ bounds[3]= (2*pa->disprect.ymax - winy+1)/(float)winy;
}
static int zbuf_part_project(ZbufProjectCache *cache, int index, float winmat[][4], float *bounds, float *co, float *ho)
@@ -1803,7 +1803,7 @@ void zbuf_render_project(float winmat[][4], float *co, float *ho)
projectvert(vec, winmat, ho);
}
-void zbuf_make_winmat(Render *re, float duplimat[][4], float winmat[][4])
+void zbuf_make_winmat(Render *re, float winmat[][4])
{
float panomat[4][4];
@@ -1814,13 +1814,8 @@ void zbuf_make_winmat(Render *re, float duplimat[][4], float winmat[][4])
panomat[2][0]= -re->panosi;
panomat[2][2]= re->panoco;
- if(duplimat)
- Mat4MulSerie(winmat, re->winmat, panomat, duplimat, 0, 0, 0, 0, 0);
- else
- Mat4MulMat4(winmat, panomat, re->winmat);
+ Mat4MulMat4(winmat, panomat, re->winmat);
}
- else if(duplimat)
- Mat4MulMat4(winmat, duplimat, re->winmat);
else
Mat4CpyMat4(winmat, re->winmat);
}
@@ -2047,12 +2042,15 @@ void zbuffer_solid(RenderPart *pa, RenderLayer *rl, void(*fillfunc)(RenderPart*,
Material *ma=0;
ObjectInstanceRen *obi;
ObjectRen *obr;
- float winmat[4][4], bounds[4], ho1[4], ho2[4], ho3[4], ho4[4]={0};
+ float obwinmat[4][4], winmat[4][4], bounds[4];
+ float ho1[4], ho2[4], ho3[4], ho4[4]={0};
unsigned int lay= rl->lay, lay_zmask= rl->lay_zmask;
int i, v, zvlnr, zsample, samples, c1, c2, c3, c4=0;
short nofill=0, env=0, wire=0, zmaskpass=0;
short all_z= (rl->layflag & SCE_LAY_ALL_Z) && !(rl->layflag & SCE_LAY_ZMASK);
short neg_zmask= (rl->layflag & SCE_LAY_ZMASK) && (rl->layflag & SCE_LAY_NEG_ZMASK);
+
+ zbuf_make_winmat(&R, winmat);
samples= (R.osa? R.osa: 1);
samples= MIN2(4, samples-pa->sample);
@@ -2060,7 +2058,7 @@ void zbuffer_solid(RenderPart *pa, RenderLayer *rl, void(*fillfunc)(RenderPart*,
for(zsample=0; zsample<samples; zsample++) {
zspan= &zspans[zsample];
- zbuffer_part_bounds(&R, pa, bounds);
+ zbuffer_part_bounds(R.winx, R.winy, pa, bounds);
zbuf_alloc_span(zspan, pa->rectx, pa->recty, R.clipcrop);
/* needed for transform from hoco to zbuffer co */
@@ -2135,9 +2133,9 @@ void zbuffer_solid(RenderPart *pa, RenderLayer *rl, void(*fillfunc)(RenderPart*,
continue;
if(obi->flag & R_TRANSFORMED)
- zbuf_make_winmat(&R, obi->mat, winmat);
+ Mat4MulMat4(obwinmat, obi->mat, winmat);
else
- zbuf_make_winmat(&R, NULL, winmat);
+ Mat4CpyMat4(obwinmat, winmat);
if(clip_render_object(obi->obr->boundbox, bounds, winmat))
continue;
@@ -2182,14 +2180,14 @@ void zbuffer_solid(RenderPart *pa, RenderLayer *rl, void(*fillfunc)(RenderPart*,
v3= vlr->v3;
v4= vlr->v4;
- c1= zbuf_part_project(cache, v1->index, winmat, bounds, v1->co, ho1);
- c2= zbuf_part_project(cache, v2->index, winmat, bounds, v2->co, ho2);
- c3= zbuf_part_project(cache, v3->index, winmat, bounds, v3->co, ho3);
+ c1= zbuf_part_project(cache, v1->index, obwinmat, bounds, v1->co, ho1);
+ c2= zbuf_part_project(cache, v2->index, obwinmat, bounds, v2->co, ho2);
+ c3= zbuf_part_project(cache, v3->index, obwinmat, bounds, v3->co, ho3);
/* partclipping doesn't need viewplane clipping */
partclip= c1 & c2 & c3;
if(v4) {
- c4= zbuf_part_project(cache, v4->index, winmat, bounds, v4->co, ho4);
+ c4= zbuf_part_project(cache, v4->index, obwinmat, bounds, v4->co, ho4);
partclip &= c4;
}
@@ -2511,11 +2509,13 @@ void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(vo
VlakRen *vlr= NULL;
VertRen *v1, *v2, *v3, *v4;
Material *ma=0, *sss_ma= R.sss_mat;
- float winmat[4][4], bounds[4], ho1[4], ho2[4], ho3[4], ho4[4]={0};
+ float obwinmat[4][4], winmat[4][4], bounds[4];
+ float ho1[4], ho2[4], ho3[4], ho4[4]={0};
int i, v, zvlnr, c1, c2, c3, c4=0;
short nofill=0, env=0, wire=0;
- zbuffer_part_bounds(&R, pa, bounds);
+ zbuf_make_winmat(&R, winmat);
+ zbuffer_part_bounds(R.winx, R.winy, pa, bounds);
zbuf_alloc_span(&zspan, pa->rectx, pa->recty, R.clipcrop);
zspan.sss_handle= handle;
@@ -2551,9 +2551,9 @@ void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(vo
continue;
if(obi->flag & R_TRANSFORMED)
- zbuf_make_winmat(&R, obi->mat, winmat);
+ Mat4MulMat4(obwinmat, obi->mat, winmat);
else
- zbuf_make_winmat(&R, NULL, winmat);
+ Mat4CpyMat4(obwinmat, winmat);
if(clip_render_object(obi->obr->boundbox, bounds, winmat))
continue;
@@ -3182,9 +3182,18 @@ static void copyto_abufz(RenderPart *pa, int *arectz, int *rectmask, int sample)
intptr_t *rd;
if(R.osa==0) {
- memcpy(arectz, pa->rectz, sizeof(int)*pa->rectx*pa->recty);
+ if(!pa->rectz)
+ fillrect(arectz, pa->rectx, pa->recty, 0x7FFFFFFE);
+ else
+ memcpy(arectz, pa->rectz, sizeof(int)*pa->rectx*pa->recty);
+
if(rectmask && pa->rectmask)
memcpy(rectmask, pa->rectmask, sizeof(int)*pa->rectx*pa->recty);
+
+ return;
+ }
+ else if(!pa->rectdaps) {
+ fillrect(arectz, pa->rectx, pa->recty, 0x7FFFFFFE);
return;
}
@@ -3222,7 +3231,7 @@ static void copyto_abufz(RenderPart *pa, int *arectz, int *rectmask, int sample)
* Do accumulation z buffering.
*/
-static int zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, RenderLayer *rl, unsigned int lay)
+static int zbuffer_abuf(Render *re, RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, unsigned int lay, int negzmask, float winmat[][4], int winx, int winy, int samples, float (*jit)[2], float clipcrop, int shadow)
{
ZbufProjectCache cache[ZBUF_PROJECT_CACHE_SIZE];
ZSpan zspans[16], *zspan; /* MAX_OSA */
@@ -3232,28 +3241,27 @@ static int zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, Re
VlakRen *vlr=NULL;
VertRen *v1, *v2, *v3, *v4;
float vec[3], hoco[4], mul, zval, fval;
- float winmat[4][4], bounds[4], ho1[4], ho2[4], ho3[4], ho4[4]={0};
+ float obwinmat[4][4], bounds[4], ho1[4], ho2[4], ho3[4], ho4[4]={0};
int i, v, zvlnr, c1, c2, c3, c4=0, dofill= 0;
- int zsample, samples, polygon_offset;
+ int zsample, polygon_offset;
- zbuffer_part_bounds(&R, pa, bounds);
- samples= (R.osa? R.osa: 1);
+ zbuffer_part_bounds(winx, winy, pa, bounds);
for(zsample=0; zsample<samples; zsample++) {
zspan= &zspans[zsample];
- zbuf_alloc_span(zspan, pa->rectx, pa->recty, R.clipcrop);
+ zbuf_alloc_span(zspan, pa->rectx, pa->recty, re->clipcrop);
/* needed for transform from hoco to zbuffer co */
- zspan->zmulx= ((float)R.winx)/2.0;
- zspan->zmuly= ((float)R.winy)/2.0;
+ zspan->zmulx= ((float)winx)/2.0;
+ zspan->zmuly= ((float)winy)/2.0;
/* the buffers */
zspan->arectz= MEM_mallocN(sizeof(int)*pa->rectx*pa->recty, "Arectz");
zspan->apixbuf= APixbuf;
zspan->apsmbase= apsmbase;
- if((rl->layflag & SCE_LAY_ZMASK) && (rl->layflag & SCE_LAY_NEG_ZMASK))
+ if(negzmask)
zspan->rectmask= MEM_mallocN(sizeof(int)*pa->rectx*pa->recty, "Arectmask");
/* filling methods */
@@ -3263,36 +3271,35 @@ static int zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, Re
copyto_abufz(pa, zspan->arectz, zspan->rectmask, zsample); /* init zbuffer */
zspan->mask= 1<<zsample;
- if(R.osa) {
- zspan->zofsx= -pa->disprect.xmin - R.jit[zsample][0];
- zspan->zofsy= -pa->disprect.ymin - R.jit[zsample][1];
- }
- else if(R.i.curblur) {
- zspan->zofsx= -pa->disprect.xmin - R.jit[R.i.curblur-1][0];
- zspan->zofsy= -pa->disprect.ymin - R.jit[R.i.curblur-1][1];
+ if(jit) {
+ zspan->zofsx= -pa->disprect.xmin + jit[zsample][0];
+ zspan->zofsy= -pa->disprect.ymin + jit[zsample][1];
}
else {
zspan->zofsx= -pa->disprect.xmin;
zspan->zofsy= -pa->disprect.ymin;
}
- /* to center the sample position */
- zspan->zofsx -= 0.5f;
- zspan->zofsy -= 0.5f;
+
+ if(!shadow) {
+ /* to center the sample position */
+ zspan->zofsx -= 0.5f;
+ zspan->zofsy -= 0.5f;
+ }
}
/* we use this to test if nothing was filled in */
zvlnr= 0;
- for(i=0, obi=R.instancetable.first; obi; i++, obi=obi->next) {
+ for(i=0, obi=re->instancetable.first; obi; i++, obi=obi->next) {
obr= obi->obr;
if(!(obi->lay & lay))
continue;
if(obi->flag & R_TRANSFORMED)
- zbuf_make_winmat(&R, obi->mat, winmat);
+ Mat4MulMat4(obwinmat, obi->mat, winmat);
else
- zbuf_make_winmat(&R, NULL, winmat);
+ Mat4CpyMat4(obwinmat, winmat);
if(clip_render_object(obi->obr->boundbox, bounds, winmat))
continue;
@@ -3306,7 +3313,7 @@ static int zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, Re
if(vlr->mat!=ma) {
ma= vlr->mat;
- dofill= ((ma->mode & MA_TRANSP) && (ma->mode & MA_ZTRANSP)) && !(ma->mode & MA_ONLYCAST);
+ dofill= shadow || (((ma->mode & MA_TRANSP) && (ma->mode & MA_ZTRANSP)) && !(ma->mode & MA_ONLYCAST));
}
if(dofill) {
@@ -3318,27 +3325,27 @@ static int zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, Re
v3= vlr->v3;
v4= vlr->v4;
- c1= zbuf_part_project(cache, v1->index, winmat, bounds, v1->co, ho1);
- c2= zbuf_part_project(cache, v2->index, winmat, bounds, v2->co, ho2);
- c3= zbuf_part_project(cache, v3->index, winmat, bounds, v3->co, ho3);
+ c1= zbuf_part_project(cache, v1->index, obwinmat, bounds, v1->co, ho1);
+ c2= zbuf_part_project(cache, v2->index, obwinmat, bounds, v2->co, ho2);
+ c3= zbuf_part_project(cache, v3->index, obwinmat, bounds, v3->co, ho3);
/* partclipping doesn't need viewplane clipping */
partclip= c1 & c2 & c3;
if(v4) {
- c4= zbuf_part_project(cache, v4->index, winmat, bounds, v4->co, ho4);
+ c4= zbuf_part_project(cache, v4->index, obwinmat, bounds, v4->co, ho4);
partclip &= c4;
}
if(partclip==0) {
/* a little advantage for transp rendering (a z offset) */
- if( ma->zoffs != 0.0) {
+ if(!shadow && ma->zoffs != 0.0) {
mul= 0x7FFFFFFF;
zval= mul*(1.0+ho1[2]/ho1[3]);
VECCOPY(vec, v1->co);
/* z is negative, otherwise its being clipped */
vec[2]-= ma->zoffs;
- projectverto(vec, R.winmat, hoco);
+ projectverto(vec, obwinmat, hoco);
fval= mul*(1.0+hoco[2]/hoco[3]);
polygon_offset= (int) fabs(zval - fval );
@@ -3376,13 +3383,13 @@ static int zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, Re
}
}
if((v & 255)==255)
- if(R.test_break(R.tbh))
+ if(re->test_break(re->tbh))
break;
}
}
}
- if(R.test_break(R.tbh)) break;
+ if(re->test_break(re->tbh)) break;
}
for(zsample=0; zsample<samples; zsample++) {
@@ -3396,6 +3403,51 @@ static int zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, Re
return zvlnr;
}
+static int zbuffer_abuf_render(RenderPart *pa, APixstr *APixbuf, APixstrand *APixbufstrand, ListBase *apsmbase, RenderLayer *rl, StrandShadeCache *sscache)
+{
+ float winmat[4][4], (*jit)[2];
+ int samples, negzmask, doztra= 0;
+
+ samples= (R.osa)? R.osa: 1;
+ negzmask= ((rl->layflag & SCE_LAY_ZMASK) && (rl->layflag & SCE_LAY_NEG_ZMASK));
+
+ if(R.osa)
+ jit= R.jit;
+ else if(R.i.curblur)
+ jit= &R.jit[R.i.curblur-1];
+ else
+ jit= NULL;
+
+ zbuf_make_winmat(&R, winmat);
+
+ if(rl->layflag & SCE_LAY_ZTRA)
+ doztra+= zbuffer_abuf(&R, pa, APixbuf, apsmbase, rl->lay, negzmask, winmat, R.winx, R.winy, samples, jit, R.clipcrop, 0);
+ if((rl->layflag & SCE_LAY_STRAND) && APixbufstrand)
+ doztra+= zbuffer_strands_abuf(&R, pa, APixbufstrand, apsmbase, rl->lay, negzmask, winmat, R.winx, R.winy, samples, jit, R.clipcrop, 0, sscache);
+
+ return doztra;
+}
+
+void zbuffer_abuf_shadow(Render *re, LampRen *lar, float winmat[][4], APixstr *APixbuf, APixstrand *APixbufstrand, ListBase *apsmbase, int size, int samples, float (*jit)[2])
+{
+ RenderPart pa;
+ int lay= -1;
+
+ if(lar->mode & LA_LAYER) lay= lar->lay;
+
+ memset(&pa, 0, sizeof(RenderPart));
+ pa.rectx= size;
+ pa.recty= size;
+ pa.disprect.xmin= 0;
+ pa.disprect.ymin= 0;
+ pa.disprect.xmax= size;
+ pa.disprect.ymax= size;
+
+ zbuffer_abuf(re, &pa, APixbuf, apsmbase, lay, 0, winmat, size, size, samples, jit, 1.0f, 1);
+ if(APixbufstrand)
+ zbuffer_strands_abuf(re, &pa, APixbufstrand, apsmbase, lay, 0, winmat, size, size, samples, jit, 1.0f, 1, NULL);
+}
+
/* different rules for speed in transparent pass... */
/* speed pointer NULL = sky, we clear */
/* else if either alpha is full or no solid was filled in: copy speed */
@@ -3902,11 +3954,7 @@ unsigned short *zbuffer_transp_shade(RenderPart *pa, RenderLayer *rl, float *pas
sampalpha= 1.0f;
/* fill the Apixbuf */
- doztra= 0;
- if(rl->layflag & SCE_LAY_ZTRA)
- doztra+= zbuffer_abuf(pa, APixbuf, &apsmbase, rl, rl->lay);
- if((rl->layflag & SCE_LAY_STRAND) && APixbufstrand)
- doztra+= zbuffer_strands_abuf(&R, pa, rl, APixbufstrand, &apsmbase, sscache);
+ doztra= zbuffer_abuf_render(pa, APixbuf, APixbufstrand, &apsmbase, rl, sscache);
if(doztra == 0) {
/* nothing filled in */
diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt
index cb2fc92a1b6..7deac8a4aa0 100644
--- a/source/blender/windowmanager/CMakeLists.txt
+++ b/source/blender/windowmanager/CMakeLists.txt
@@ -70,6 +70,10 @@ IF(WIN32)
SET(INC ${INC} ${PTHREADS_INC})
ENDIF(WIN32)
+IF(WITH_COCOA)
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/wm_apple.c")
+ENDIF(WITH_COCOA)
+
# TODO buildinfo
IF(BF_BUILDINFO)
ADD_DEFINITIONS(-DNAN_BUILDINFO)
diff --git a/source/blender/windowmanager/SConscript b/source/blender/windowmanager/SConscript
index 91635904524..08a291871f1 100644
--- a/source/blender/windowmanager/SConscript
+++ b/source/blender/windowmanager/SConscript
@@ -19,4 +19,11 @@ defs = []
if not env['WITH_BF_PYTHON']:
defs.append('DISABLE_PYTHON')
+if env['OURPLATFORM'] == 'linux2':
+ cflags='-pthread'
+ incs += ' ../../../extern/binreloc/include'
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), defs, libtype=['core'], priority=[5] )
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 6610c5d8931..958b388f574 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -41,6 +41,7 @@ struct wmNotifier;
struct rcti;
struct PointerRNA;
struct EnumPropertyItem;
+struct MenuType;
typedef struct wmJob wmJob;
@@ -75,28 +76,37 @@ 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_cursor_grab(struct wmWindow *win, int warp);
+void WM_cursor_ungrab(wmWindow *win, int restore);
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);
void WM_paint_cursor_end(struct wmWindowManager *wm, void *handle);
- /* keymap */
+ /* keyconfig and keymap */
+wmKeyConfig *WM_keyconfig_add (struct wmWindowManager *wm, char *idname);
+void WM_keyconfig_free (struct wmKeyConfig *keyconf);
+void WM_keyconfig_userdef(struct wmWindowManager *wm);
+
void WM_keymap_init (struct bContext *C);
-wmKeymapItem *WM_keymap_verify_item(ListBase *lb, char *idname, short type,
- short val, int modifier, short keymodifier);
-wmKeymapItem *WM_keymap_add_item(ListBase *lb, char *idname, short type,
- short val, int modifier, short keymodifier);
-void WM_keymap_tweak (ListBase *lb, short type, short val, int modifier, short keymodifier);
-ListBase *WM_keymap_listbase (struct wmWindowManager *wm, const char *nameid,
- short spaceid, short regionid);
+void WM_keymap_free (struct wmKeyMap *keymap);
+
+wmKeyMapItem *WM_keymap_verify_item(struct wmKeyMap *keymap, char *idname, int type,
+ int val, int modifier, int keymodifier);
+wmKeyMapItem *WM_keymap_add_item(struct wmKeyMap *keymap, char *idname, int type,
+ int val, int modifier, int keymodifier);
+void WM_keymap_remove_item(struct wmKeyMap *keymap, struct wmKeyMapItem *kmi);
+char *WM_keymap_item_to_string(wmKeyMapItem *kmi, char *str, int len);
-wmKeyMap *WM_modalkeymap_add(struct wmWindowManager *wm, const char *nameid, struct EnumPropertyItem *items);
-wmKeyMap *WM_modalkeymap_get(struct wmWindowManager *wm, const char *nameid);
-void WM_modalkeymap_add_item(wmKeyMap *km, short type, short val, int modifier, short keymodifier, short value);
-void WM_modalkeymap_assign(wmKeyMap *km, const char *opname);
+wmKeyMap *WM_keymap_find(struct wmKeyConfig *keyconf, char *idname, int spaceid, int regionid);
+wmKeyMap *WM_keymap_active(struct wmWindowManager *wm, struct wmKeyMap *keymap);
+wmKeyMap *WM_keymap_copy_to_user(struct wmKeyMap *keymap);
+void WM_keymap_restore_to_default(struct wmKeyMap *keymap);
-int WM_key_event_is_tweak(short type);
+wmKeyMap *WM_modalkeymap_add(struct wmKeyConfig *keyconf, char *idname, struct EnumPropertyItem *items);
+wmKeyMap *WM_modalkeymap_get(struct wmKeyConfig *keyconf, char *idname);
+void WM_modalkeymap_add_item(struct wmKeyMap *km, int type, int val, int modifier, int keymodifier, int value);
+void WM_modalkeymap_assign(struct wmKeyMap *km, char *opname);
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);
@@ -104,13 +114,13 @@ void WM_key_event_operator_change(const struct bContext *C, const char *opname,
/* handlers */
-struct wmEventHandler *WM_event_add_keymap_handler(ListBase *handlers, ListBase *keymap);
+struct wmEventHandler *WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap);
/* boundbox, optional subwindow boundbox for offset */
-struct wmEventHandler *WM_event_add_keymap_handler_bb(ListBase *handlers, ListBase *keymap, rcti *bb, rcti *swinbb);
+struct wmEventHandler *WM_event_add_keymap_handler_bb(ListBase *handlers, wmKeyMap *keymap, rcti *bb, rcti *swinbb);
/* priority not implemented, it adds in begin */
-struct wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers, ListBase *keymap, int priority);
+struct wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers, wmKeyMap *keymap, int priority);
-void WM_event_remove_keymap_handler(ListBase *handlers, ListBase *keymap);
+void WM_event_remove_keymap_handler(ListBase *handlers, wmKeyMap *keymap);
struct wmEventHandler *WM_event_add_ui_handler(const struct bContext *C, ListBase *handlers,
int (*func)(struct bContext *C, struct wmEvent *event, void *userdata),
@@ -119,13 +129,14 @@ void WM_event_remove_ui_handler(ListBase *handlers,
int (*func)(struct bContext *C, struct wmEvent *event, void *userdata),
void (*remove)(struct bContext *C, void *userdata), void *userdata);
-struct wmEventHandler *WM_event_add_modal_handler(struct bContext *C, ListBase *handlers, struct wmOperator *op);
+struct wmEventHandler *WM_event_add_modal_handler(struct bContext *C, struct wmOperator *op);
void WM_event_remove_handlers(struct bContext *C, ListBase *handlers);
void WM_event_add_mousemove(struct bContext *C);
int WM_modal_tweak_exit(struct wmEvent *evt, int tweak_event);
-void WM_event_add_notifier(const struct bContext *C, unsigned int type, void *data);
+void WM_event_add_notifier(const struct bContext *C, unsigned int type, void *reference);
+void WM_main_add_notifier(unsigned int type, void *reference);
void wm_event_add (struct wmWindow *win, struct wmEvent *event_to_add); /* XXX only for warning */
@@ -147,6 +158,8 @@ int WM_operator_winactive (struct bContext *C);
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);
+int WM_operator_confirm_message(struct bContext *C, struct wmOperator *op, char *message);
+
/* operator api */
void WM_operator_free (struct wmOperator *op);
void WM_operator_stack_clear(struct bContext *C);
@@ -162,11 +175,13 @@ wmOperatorType *WM_operatortype_append_macro(char *idname, char *name, int flag)
wmOperatorTypeMacro *WM_operatortype_macro_define(wmOperatorType *ot, const char *idname);
+int WM_operator_poll (struct bContext *C, struct wmOperatorType *ot);
int WM_operator_call (struct bContext *C, struct wmOperator *op);
int WM_operator_repeat (struct bContext *C, struct wmOperator *op);
int WM_operator_name_call (struct bContext *C, const char *opstring, int context, struct PointerRNA *properties);
int WM_operator_call_py(struct bContext *C, struct wmOperatorType *ot, int context, struct PointerRNA *properties, struct ReportList *reports);
+void WM_operator_properties_alloc(struct PointerRNA **ptr, struct IDProperty **properties, const char *opstring); /* used for keymap and macro items */
void WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring);
void WM_operator_properties_free(struct PointerRNA *ptr);
void WM_operator_properties_filesel(struct wmOperatorType *ot, int filter, short type);
@@ -176,6 +191,12 @@ char *WM_operator_pystring(struct bContext *C, struct wmOperatorType *ot, struc
void WM_operator_bl_idname(char *to, const char *from);
void WM_operator_py_idname(char *to, const char *from);
+/* *************** menu types ******************** */
+struct MenuType *WM_menutype_find(const char *idname, int quiet);
+int WM_menutype_add(struct MenuType* mt);
+void WM_menutype_freelink(struct MenuType* mt);
+void WM_menutype_free(void);
+
/* default operator callbacks for border/circle/lasso */
int WM_border_select_invoke (struct bContext *C, struct wmOperator *op, struct wmEvent *event);
int WM_border_select_modal (struct bContext *C, struct wmOperator *op, struct wmEvent *event);
@@ -225,8 +246,10 @@ void WM_set_framebuffer_index_color(int index);
int WM_framebuffer_to_index(unsigned int col);
/* threaded Jobs Manager */
+#define WM_JOB_PRIORITY 1
+#define WM_JOB_EXCL_RENDER 2
-struct wmJob *WM_jobs_get(struct wmWindowManager *wm, struct wmWindow *win, void *owner);
+struct wmJob *WM_jobs_get(struct wmWindowManager *wm, struct wmWindow *win, void *owner, int flag);
int WM_jobs_test(struct wmWindowManager *wm, void *owner);
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 806f5409b0a..31cb5ee0832 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -44,6 +44,7 @@ struct wmWindowManager;
#define OPTYPE_UNDO 2 /* do undo push after after */
#define OPTYPE_BLOCKING 4 /* let blender grab all input from the WM (X11) */
#define OPTYPE_MACRO 8
+#define OPTYPE_GRAB_POINTER 16 /* */
/* context to call operator in for WM_operator_name_call */
/* rna_ui.c contains EnumPropertyItem's of these, keep in sync */
@@ -183,9 +184,12 @@ typedef struct wmNotifier {
#define ND_SHADING_DRAW (31<<16)
/* NC_LAMP Lamp */
-#define ND_LIGHTING (44<<16)
-#define ND_LIGHTING_DRAW (45<<16)
-#define ND_SKY (46<<16)
+#define ND_LIGHTING (40<<16)
+#define ND_LIGHTING_DRAW (41<<16)
+#define ND_SKY (42<<16)
+
+ /* NC_WORLD World */
+#define ND_WORLD_DRAW (45<<16)
/* NC_TEXT Text */
#define ND_CURSOR (50<<16)
@@ -276,12 +280,8 @@ typedef struct wmGesture {
} wmGesture;
/* ************** custom wmEvent data ************** */
-
-#define DEV_STYLUS 1
-#define DEV_ERASER 2
-
typedef struct wmTabletData {
- int Active; /* 0=None, 1=Stylus, 2=Eraser */
+ int Active; /* 0=EVT_TABLET_NONE, 1=EVT_TABLET_STYLUS, 2=EVT_TABLET_ERASER */
float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */
float Xtilt; /* range 0.0 (upright) to 1.0 (tilted fully against the tablet surface) */
float Ytilt; /* as above */
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index 4405b52888d..5b7f892592b 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -26,6 +26,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include "string.h"
+
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
@@ -39,6 +41,7 @@
#include "BKE_idprop.h"
#include "BKE_library.h"
#include "BKE_main.h"
+#include "BKE_screen.h"
#include "BKE_report.h"
#include "WM_api.h"
@@ -128,16 +131,69 @@ void WM_operator_stack_clear(bContext *C)
/* ****************************************** */
+static ListBase menutypes = {NULL, NULL}; /* global menutype list */
+
+MenuType *WM_menutype_find(const char *idname, int quiet)
+{
+ MenuType* mt;
+
+ if (idname[0]) {
+ for(mt=menutypes.first; mt; mt=mt->next)
+ if(strcmp(idname, mt->idname)==0)
+ return mt;
+ }
+
+ if(!quiet)
+ printf("search for unknown menutype %s\n", idname);
+
+ return NULL;
+}
+
+int WM_menutype_add(MenuType* mt)
+{
+ BLI_addtail(&menutypes, mt);
+ return 1;
+}
+
+void WM_menutype_freelink(MenuType* mt)
+{
+ BLI_freelinkN(&menutypes, mt);
+}
+
+void WM_menutype_free(void)
+{
+ MenuType* mt= menutypes.first, *mt_next;
+
+ while(mt) {
+ mt_next= mt->next;
+
+ if(mt->ext.free)
+ mt->ext.free(mt->ext.data);
+
+ WM_menutype_freelink(mt);
+
+ mt= mt_next;
+ }
+}
+
+/* ****************************************** */
+
void WM_keymap_init(bContext *C)
{
wmWindowManager *wm= CTX_wm_manager(C);
+ if(!wm->defaultconf)
+ wm->defaultconf= WM_keyconfig_add(wm, "Blender");
+
if(wm && CTX_py_init_get(C) && (wm->initialized & WM_INIT_KEYMAP) == 0) {
- wm_window_keymap(wm);
- ED_spacetypes_keymap(wm);
+ /* create default key config */
+ wm_window_keymap(wm->defaultconf);
+ ED_spacetypes_keymap(wm->defaultconf);
wm->initialized |= WM_INIT_KEYMAP;
}
+
+ WM_keyconfig_userdef(wm);
}
void wm_check(bContext *C)
@@ -151,15 +207,16 @@ void wm_check(bContext *C)
}
if(wm==NULL) return;
if(wm->windows.first==NULL) return;
+
+ /* case: fileread */
+ if((wm->initialized & WM_INIT_WINDOW) == 0)
+ WM_keymap_init(C);
/* case: no open windows at all, for old file reads */
wm_window_add_ghostwindows(wm);
/* case: fileread */
if((wm->initialized & WM_INIT_WINDOW) == 0) {
-
- WM_keymap_init(C);
-
ED_screens_initialize(wm);
wm->initialized |= WM_INIT_WINDOW;
}
@@ -211,8 +268,7 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm)
{
wmWindow *win;
wmOperator *op;
- wmKeyMap *km;
- wmKeymapItem *kmi;
+ wmKeyConfig *keyconf;
while((win= wm->windows.first)) {
BLI_remlink(&wm->windows, win);
@@ -226,19 +282,11 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm)
WM_operator_free(op);
}
- while((km= wm->keymaps.first)) {
- for(kmi=km->keymap.first; kmi; kmi=kmi->next) {
- if(kmi->ptr) {
- WM_operator_properties_free(kmi->ptr);
- MEM_freeN(kmi->ptr);
- }
- }
-
- BLI_freelistN(&km->keymap);
- BLI_remlink(&wm->keymaps, km);
- MEM_freeN(km);
+ while((keyconf=wm->keyconfigs.first)) {
+ BLI_remlink(&wm->keyconfigs, keyconf);
+ WM_keyconfig_free(keyconf);
}
-
+
BLI_freelistN(&wm->queue);
BLI_freelistN(&wm->paintcursors);
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c
index 56a8d76d8bf..c1dfd9ee9fb 100644
--- a/source/blender/windowmanager/intern/wm_cursors.c
+++ b/source/blender/windowmanager/intern/wm_cursors.c
@@ -163,10 +163,21 @@ void WM_cursor_wait(int val)
}
}
-void WM_cursor_grab(wmWindow *win, int val)
+void WM_cursor_grab(wmWindow *win, int warp)
{
- if(win)
- GHOST_SetCursorGrab(win->ghostwin, val);
+ /* Only grab cursor when not running debug.
+ * It helps not to get a stuck WM when hitting a breakpoint
+ * */
+ if ((G.f & G_DEBUG) == 0)
+ if(win)
+ GHOST_SetCursorGrab(win->ghostwin, 1, warp, -1);
+}
+
+void WM_cursor_ungrab(wmWindow *win, int restore)
+{
+ if ((G.f & G_DEBUG) == 0)
+ if(win)
+ GHOST_SetCursorGrab(win->ghostwin, 0, -1, restore);
}
/* afer this you can call restore too */
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 306b99dcfcc..f1104feaf5b 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -45,6 +45,7 @@
#include "BKE_context.h"
#include "BKE_idprop.h"
#include "BKE_global.h"
+#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_scene.h"
@@ -118,6 +119,26 @@ void WM_event_add_notifier(const bContext *C, unsigned int type, void *reference
note->reference= reference;
}
+void WM_main_add_notifier(unsigned int type, void *reference)
+{
+ Main *bmain= G.main;
+ wmWindowManager *wm= bmain->wm.first;
+
+ if(wm) {
+ wmNotifier *note= MEM_callocN(sizeof(wmNotifier), "notifier");
+
+ note->wm= wm;
+ BLI_addtail(&note->wm->queue, note);
+
+ note->category= type & NOTE_CATEGORY;
+ note->data= type & NOTE_DATA;
+ note->subtype= type & NOTE_SUBTYPE;
+ note->action= type & NOTE_ACTION;
+
+ note->reference= reference;
+ }
+}
+
static wmNotifier *wm_notifier_next(wmWindowManager *wm)
{
wmNotifier *note= wm->queue.first;
@@ -239,7 +260,7 @@ void wm_event_do_notifiers(bContext *C)
if(G.rendering==0) { // XXX make lock in future, or separated derivedmesh users in scene
- /* update all objects, ipos, matrices, displists, etc. Flags set by depgraph or manual,
+ /* update all objects, drivers, matrices, displists, etc. Flags set by depgraph or manual,
no layer check here, gets correct flushed */
/* sets first, we allow per definition current scene to have dependencies on sets */
if(scene->set) {
@@ -259,20 +280,23 @@ void wm_event_do_notifiers(bContext *C)
/* ********************* operators ******************* */
-static int wm_operator_poll(bContext *C, wmOperatorType *ot)
+int WM_operator_poll(bContext *C, wmOperatorType *ot)
{
wmOperatorTypeMacro *otmacro;
for(otmacro= ot->macro.first; otmacro; otmacro= otmacro->next) {
wmOperatorType *ot= WM_operatortype_find(otmacro->idname, 0);
- if(0==wm_operator_poll(C, ot))
+ if(0==WM_operator_poll(C, ot))
return 0;
}
- if(ot->poll)
+ /* python needs operator type, so we added exception for it */
+ if(ot->pyop_poll)
+ return ot->pyop_poll(C, ot);
+ else if(ot->poll)
return ot->poll(C);
-
+
return 1;
}
@@ -284,7 +308,7 @@ static int wm_operator_exec(bContext *C, wmOperator *op, int repeat)
if(op==NULL || op->type==NULL)
return retval;
- if(0==wm_operator_poll(C, op->type))
+ if(0==WM_operator_poll(C, op->type))
return retval;
if(op->type->exec)
@@ -295,6 +319,8 @@ static int wm_operator_exec(bContext *C, wmOperator *op, int repeat)
uiPupMenuReports(C, op->reports);
if(retval & OPERATOR_FINISHED) {
+ op->customdata= NULL;
+
if(op->type->flag & OPTYPE_UNDO)
ED_undo_push_op(C, op);
@@ -397,7 +423,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
wmWindowManager *wm= CTX_wm_manager(C);
int retval= OPERATOR_PASS_THROUGH;
- if(wm_operator_poll(C, ot)) {
+ if(WM_operator_poll(C, ot)) {
wmOperator *op= wm_operator_create(wm, ot, properties, reports); /* if reports==NULL, theyll be initialized */
if((G.f & G_DEBUG) && event && event->type!=MOUSEMOVE)
@@ -412,7 +438,9 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
else
printf("invalid operator call %s\n", ot->idname); /* debug, important to leave a while, should never happen */
- if(!(retval & OPERATOR_RUNNING_MODAL)) {
+ /* Note, if the report is given as an argument then assume the caller will deal with displaying them
+ * currently python only uses this */
+ if(!(retval & OPERATOR_RUNNING_MODAL) && reports==NULL) {
if(op->reports->list.first) /* only show the report if the report list was not given in the function */
uiPupMenuReports(C, op->reports);
@@ -422,6 +450,8 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
}
if(retval & OPERATOR_FINISHED) {
+ op->customdata= NULL;
+
if(ot->flag & OPTYPE_UNDO)
ED_undo_push_op(C, op);
@@ -432,8 +462,10 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
}
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);
+ if(ot->flag & OPTYPE_BLOCKING) {
+ int warp = (U.uiflag & USER_CONTINUOUS_MOUSE) && ((op->flag & OP_GRAB_POINTER) || (ot->flag & OPTYPE_GRAB_POINTER));
+ WM_cursor_grab(CTX_wm_window(C), warp);
+ }
}
else
WM_operator_free(op);
@@ -628,8 +660,8 @@ void WM_event_remove_handlers(bContext *C, ListBase *handlers)
CTX_wm_region_set(C, region);
}
+ WM_cursor_ungrab(CTX_wm_window(C), TRUE);
WM_operator_free(handler->op);
- WM_cursor_grab(CTX_wm_window(C), 0);
}
else if(handler->ui_remove) {
ScrArea *area= CTX_wm_area(C);
@@ -695,16 +727,16 @@ static int wm_userdef_event_map(int kmitype)
return kmitype;
}
-static int wm_eventmatch(wmEvent *winevent, wmKeymapItem *kmi)
+static int wm_eventmatch(wmEvent *winevent, wmKeyMapItem *kmi)
{
int kmitype= wm_userdef_event_map(kmi->type);
- if(kmi->inactive) return 0;
+ if(kmi->flag & KMI_INACTIVE) return 0;
/* exception for middlemouse emulation */
if((U.flag & USER_TWOBUTTONMOUSE) && (kmi->type == MIDDLEMOUSE)) {
if(winevent->type == LEFTMOUSE && winevent->alt) {
- wmKeymapItem tmp= *kmi;
+ wmKeyMapItem tmp= *kmi;
tmp.type= winevent->type;
tmp.alt= winevent->alt;
@@ -715,7 +747,7 @@ static int wm_eventmatch(wmEvent *winevent, wmKeymapItem *kmi)
/* the matching rules */
if(kmitype==KM_TEXTINPUT)
- if(ISKEYBOARD(winevent->type) && winevent->ascii) return 1;
+ if(ISTEXTINPUT(winevent->type) && winevent->ascii) return 1;
if(kmitype!=KM_ANY)
if(winevent->type!=kmitype) return 0;
@@ -738,7 +770,7 @@ static int wm_eventmatch(wmEvent *winevent, wmKeymapItem *kmi)
/* key modifiers always check when event has it */
/* otherwise regular keypresses with keymodifier still work */
if(winevent->keymodifier)
- if(ISKEYBOARD(winevent->type))
+ if(ISTEXTINPUT(winevent->type))
if(winevent->keymodifier!=kmi->keymodifier) return 0;
return 1;
@@ -754,9 +786,9 @@ static int wm_event_always_pass(wmEvent *event)
static void wm_event_modalkeymap(wmOperator *op, wmEvent *event)
{
if(op->type->modalkeymap) {
- wmKeymapItem *kmi;
+ wmKeyMapItem *kmi;
- for(kmi= op->type->modalkeymap->keymap.first; kmi; kmi= kmi->next) {
+ for(kmi= op->type->modalkeymap->items.first; kmi; kmi= kmi->next) {
if(wm_eventmatch(event, kmi)) {
event->type= EVT_MODAL_MAP;
@@ -808,6 +840,8 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
}
if(retval & OPERATOR_FINISHED) {
+ op->customdata= NULL;
+
if(ot->flag & OPTYPE_UNDO)
ED_undo_push_op(C, op);
@@ -824,7 +858,7 @@ 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);
+ WM_cursor_ungrab(CTX_wm_window(C), TRUE);
BLI_remlink(handlers, handler);
wm_event_free_handler(handler);
@@ -931,14 +965,14 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
/* remlink now, for load file case */
BLI_remlink(handlers, handler);
+ wm_handler_op_context(C, handler);
+
if(event->val==EVT_FILESELECT_EXEC) {
- wm_handler_op_context(C, handler);
-
/* a bit weak, might become arg for WM_event_fileselect? */
/* XXX also extension code in image-save doesnt work for this yet */
if(strncmp(handler->op->type->name, "Save", 4)==0) {
/* this gives ownership to pupmenu */
- uiPupMenuSaveOver(C, handler->op, path);
+ uiPupMenuSaveOver(C, handler->op, (path)? path: "");
}
else {
int retval= handler->op->type->exec(C, handler->op);
@@ -949,14 +983,19 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
WM_operator_free(handler->op);
}
-
- CTX_wm_area_set(C, NULL);
}
- else
+ else {
+ if(handler->op->type->cancel)
+ handler->op->type->cancel(C, handler->op);
+
WM_operator_free(handler->op);
+ }
+
+ CTX_wm_area_set(C, NULL);
wm_event_free_handler(handler);
- MEM_freeN(path);
+ if(path)
+ MEM_freeN(path);
action= WM_HANDLER_BREAK;
}
@@ -994,12 +1033,13 @@ static int handler_boundbox_test(wmEventHandler *handler, wmEvent *event)
static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
{
+ wmWindowManager *wm= CTX_wm_manager(C);
wmEventHandler *handler, *nexthandler;
int action= WM_HANDLER_CONTINUE;
int always_pass;
if(handlers==NULL) return action;
-
+
/* modal handlers can get removed in this loop, we keep the loop this way */
for(handler= handlers->first; handler; handler= nexthandler) {
nexthandler= handler->next;
@@ -1014,16 +1054,19 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
action= WM_HANDLER_BREAK;
if(handler->keymap) {
- wmKeymapItem *kmi;
+ wmKeyMap *keymap= WM_keymap_active(wm, handler->keymap);
+ wmKeyMapItem *kmi;
- for(kmi= handler->keymap->first; kmi; kmi= kmi->next) {
- if(wm_eventmatch(event, kmi)) {
-
- event->keymap_idname= kmi->idname; /* weak, but allows interactive callback to not use rawkey */
-
- action= wm_handler_operator_call(C, handlers, handler, event, kmi->ptr);
- if(action==WM_HANDLER_BREAK) /* not wm_event_always_pass(event) here, it denotes removed handler */
- break;
+ if(!keymap->poll || keymap->poll(C)) {
+ for(kmi= keymap->items.first; kmi; kmi= kmi->next) {
+ if(wm_eventmatch(event, kmi)) {
+
+ event->keymap_idname= kmi->idname; /* weak, but allows interactive callback to not use rawkey */
+
+ action= wm_handler_operator_call(C, handlers, handler, event, kmi->ptr);
+ if(action==WM_HANDLER_BREAK) /* not always_pass here, it denotes removed handler */
+ break;
+ }
}
}
}
@@ -1039,8 +1082,12 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
action= wm_handler_operator_call(C, handlers, handler, event, NULL);
}
- if(!always_pass && action==WM_HANDLER_BREAK)
- break;
+ if(action==WM_HANDLER_BREAK) {
+ if(always_pass)
+ action= WM_HANDLER_CONTINUE;
+ else
+ break;
+ }
}
/* fileread case */
@@ -1052,6 +1099,8 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
static int wm_event_inside_i(wmEvent *event, rcti *rect)
{
+ if(wm_event_always_pass(event))
+ return 1;
if(BLI_in_rcti(rect, event->x, event->y))
return 1;
if(event->type==MOUSEMOVE) {
@@ -1143,7 +1192,7 @@ void wm_event_do_handlers(bContext *C)
while( (event= win->queue.first) ) {
int action;
-
+
CTX_wm_window_set(C, win);
/* we let modal handlers get active area/region, also wm_paintcursor_test needs it */
@@ -1153,61 +1202,73 @@ void wm_event_do_handlers(bContext *C)
/* MVC demands to not draw in event handlers... but we need to leave it for ogl selecting etc */
wm_window_make_drawable(C, win);
- action= wm_handlers_do(C, event, &win->handlers);
+ /* first we do priority handlers, modal + some limited keymaps */
+ action= wm_handlers_do(C, event, &win->modalhandlers);
/* fileread case */
- if(CTX_wm_window(C)==NULL) {
+ if(CTX_wm_window(C)==NULL)
return;
- }
/* builtin tweak, if action is break it removes tweak */
- if(!wm_event_always_pass(event))
- wm_tweakevent_test(C, event, action);
-
- if(wm_event_always_pass(event) || action==WM_HANDLER_CONTINUE) {
+ wm_tweakevent_test(C, event, action);
+
+ if(action==WM_HANDLER_CONTINUE) {
ScrArea *sa;
ARegion *ar;
int doit= 0;
/* XXX to solve, here screen handlers? */
- if(!wm_event_always_pass(event)) {
- if(event->type==MOUSEMOVE) {
- /* state variables in screen, cursors */
- ED_screen_set_subwinactive(win, event);
- /* for regions having custom cursors */
- wm_paintcursor_test(C, event);
- }
+ if(event->type==MOUSEMOVE) {
+ /* state variables in screen, cursors */
+ ED_screen_set_subwinactive(win, event);
+ /* for regions having custom cursors */
+ wm_paintcursor_test(C, event);
}
-
+
for(sa= win->screen->areabase.first; sa; sa= sa->next) {
- if(wm_event_always_pass(event) || wm_event_inside_i(event, &sa->totrct)) {
-
+ if(wm_event_inside_i(event, &sa->totrct)) {
CTX_wm_area_set(C, sa);
- CTX_wm_region_set(C, NULL);
- action= wm_handlers_do(C, event, &sa->handlers);
- if(wm_event_always_pass(event) || action==WM_HANDLER_CONTINUE) {
+ if(action==WM_HANDLER_CONTINUE) {
for(ar=sa->regionbase.first; ar; ar= ar->next) {
- if(wm_event_always_pass(event) || wm_event_inside_i(event, &ar->winrct)) {
+ if(wm_event_inside_i(event, &ar->winrct)) {
CTX_wm_region_set(C, ar);
action= wm_handlers_do(C, event, &ar->handlers);
doit |= (BLI_in_rcti(&ar->winrct, event->x, event->y));
- if(!wm_event_always_pass(event)) {
- if(action==WM_HANDLER_BREAK)
- break;
- }
+ if(action==WM_HANDLER_BREAK)
+ break;
}
}
}
+
+ CTX_wm_region_set(C, NULL);
+
+ if(action==WM_HANDLER_CONTINUE)
+ action= wm_handlers_do(C, event, &sa->handlers);
+
+ CTX_wm_area_set(C, NULL);
+
/* NOTE: do not escape on WM_HANDLER_BREAK, mousemove needs handled for previous area */
}
}
+ if(action==WM_HANDLER_CONTINUE) {
+ /* also some non-modal handlers need active area/region */
+ CTX_wm_area_set(C, area_event_inside(C, event->x, event->y));
+ CTX_wm_region_set(C, region_event_inside(C, event->x, event->y));
+
+ action= wm_handlers_do(C, event, &win->handlers);
+
+ /* fileread case */
+ if(CTX_wm_window(C)==NULL)
+ return;
+ }
+
/* XXX hrmf, this gives reliable previous mouse coord for area change, feels bad?
doing it on ghost queue gives errors when mousemoves go over area borders */
- if(doit && win->screen->subwinactive != win->screen->mainwin) {
+ if(doit && win->screen && win->screen->subwinactive != win->screen->mainwin) {
win->eventstate->prevx= event->x;
win->eventstate->prevy= event->y;
}
@@ -1220,7 +1281,7 @@ void wm_event_do_handlers(bContext *C)
}
/* only add mousemove when queue was read entirely */
- if(win->addmousemove) {
+ if(win->addmousemove && win->eventstate) {
wmEvent event= *(win->eventstate);
event.type= MOUSEMOVE;
event.prevx= event.x;
@@ -1271,7 +1332,7 @@ void WM_event_add_fileselect(bContext *C, wmOperator *op)
handler->op_region= CTX_wm_region(C);
handler->filescreen= CTX_wm_screen(C);
- BLI_addhead(&win->handlers, handler);
+ BLI_addhead(&win->modalhandlers, handler);
WM_event_fileselect_event(C, op, full?EVT_FILESELECT_FULL_OPEN:EVT_FILESELECT_OPEN);
}
@@ -1282,9 +1343,10 @@ void WM_event_set_handler_flag(wmEventHandler *handler, int flag)
handler->flag= flag;
}
-wmEventHandler *WM_event_add_modal_handler(bContext *C, ListBase *handlers, wmOperator *op)
+wmEventHandler *WM_event_add_modal_handler(bContext *C, wmOperator *op)
{
wmEventHandler *handler= MEM_callocN(sizeof(wmEventHandler), "event modal handler");
+ wmWindow *win= CTX_wm_window(C);
/* operator was part of macro */
if(op->opm) {
@@ -1299,15 +1361,20 @@ wmEventHandler *WM_event_add_modal_handler(bContext *C, ListBase *handlers, wmOp
handler->op_area= CTX_wm_area(C); /* means frozen screen context for modal handlers! */
handler->op_region= CTX_wm_region(C);
- BLI_addhead(handlers, handler);
+ BLI_addhead(&win->modalhandlers, handler);
return handler;
}
-wmEventHandler *WM_event_add_keymap_handler(ListBase *handlers, ListBase *keymap)
+wmEventHandler *WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
{
wmEventHandler *handler;
+ if(!keymap) {
+ printf("WM_event_add_keymap_handler called with NULL keymap\n");
+ return NULL;
+ }
+
/* only allow same keymap once */
for(handler= handlers->first; handler; handler= handler->next)
if(handler->keymap==keymap)
@@ -1321,7 +1388,7 @@ wmEventHandler *WM_event_add_keymap_handler(ListBase *handlers, ListBase *keymap
}
/* priorities not implemented yet, for time being just insert in begin of list */
-wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers, ListBase *keymap, int priority)
+wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers, wmKeyMap *keymap, int priority)
{
wmEventHandler *handler;
@@ -1334,7 +1401,7 @@ wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers, ListBas
return handler;
}
-wmEventHandler *WM_event_add_keymap_handler_bb(ListBase *handlers, ListBase *keymap, rcti *bblocal, rcti *bbwin)
+wmEventHandler *WM_event_add_keymap_handler_bb(ListBase *handlers, wmKeyMap *keymap, rcti *bblocal, rcti *bbwin)
{
wmEventHandler *handler= WM_event_add_keymap_handler(handlers, keymap);
@@ -1345,7 +1412,7 @@ wmEventHandler *WM_event_add_keymap_handler_bb(ListBase *handlers, ListBase *key
return handler;
}
-void WM_event_remove_keymap_handler(ListBase *handlers, ListBase *keymap)
+void WM_event_remove_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
{
wmEventHandler *handler;
@@ -1498,10 +1565,10 @@ static void update_tablet_data(wmWindow *win, wmEvent *event)
const GHOST_TabletData *td= GHOST_GetTabletData(win->ghostwin);
/* if there's tablet data from an active tablet device then add it */
- if ((td != NULL) && td->Active) {
+ if ((td != NULL) && td->Active != GHOST_kTabletModeNone) {
struct wmTabletData *wmtab= MEM_mallocN(sizeof(wmTabletData), "customdata tablet");
- wmtab->Active = td->Active;
+ wmtab->Active = (int)td->Active;
wmtab->Pressure = td->Pressure;
wmtab->Xtilt = td->Xtilt;
wmtab->Ytilt = td->Ytilt;
@@ -1526,14 +1593,18 @@ void wm_event_add_ghostevent(wmWindow *win, int type, void *customdata)
case GHOST_kEventCursorMove: {
if(win->active) {
GHOST_TEventCursorData *cd= customdata;
+#if defined(__APPLE__) && defined(GHOST_COCOA)
+ //Cocoa already uses coordinates with y=0 at bottom, and returns inwindow coordinates on mouse moved event
+ event.type= MOUSEMOVE;
+ event.x= evt->x = cd->x;
+ event.y = evt->y = cd->y;
+#else
int cx, cy;
-
GHOST_ScreenToClient(win->ghostwin, cd->x, cd->y, &cx, &cy);
-
event.type= MOUSEMOVE;
event.x= evt->x= cx;
event.y= evt->y= (win->sizey-1) - cy;
-
+#endif
update_tablet_data(win, &event);
wm_event_add(win, &event);
}
@@ -1543,12 +1614,16 @@ void wm_event_add_ghostevent(wmWindow *win, int type, void *customdata)
case GHOST_kEventButtonDown:
case GHOST_kEventButtonUp: {
GHOST_TEventButtonData *bd= customdata;
- event.val= (type==GHOST_kEventButtonDown);
+ event.val= (type==GHOST_kEventButtonDown) ? KM_PRESS:KM_RELEASE; /* Note!, this starts as 0/1 but later is converted to KM_PRESS/KM_RELEASE by tweak */
if (bd->button == GHOST_kButtonMaskLeft)
event.type= LEFTMOUSE;
else if (bd->button == GHOST_kButtonMaskRight)
event.type= RIGHTMOUSE;
+ else if (bd->button == GHOST_kButtonMaskButton4)
+ event.type= BUTTON4MOUSE;
+ else if (bd->button == GHOST_kButtonMaskButton5)
+ event.type= BUTTON5MOUSE;
else
event.type= MIDDLEMOUSE;
@@ -1566,7 +1641,7 @@ void wm_event_add_ghostevent(wmWindow *win, int type, void *customdata)
event.val= (type==GHOST_kEventKeyDown)?KM_PRESS:KM_RELEASE;
/* exclude arrow keys, esc, etc from text input */
- if(type==GHOST_kEventKeyUp || (event.ascii<32 && event.ascii>14))
+ if(type==GHOST_kEventKeyUp || (event.ascii<32 && event.ascii>0))
event.ascii= '\0';
/* modifiers */
@@ -1596,6 +1671,13 @@ void wm_event_add_ghostevent(wmWindow *win, int type, void *customdata)
else if(event.val==KM_RELEASE && event.keymodifier==event.type)
event.keymodifier= evt->keymodifier= 0;
}
+
+ /* this case happens on some systems that on holding a key pressed,
+ generate press events without release, we still want to keep the
+ modifier in win->eventstate, but for the press event of the same
+ key we don't want the key modifier */
+ if(event.keymodifier == event.type)
+ event.keymodifier= 0;
/* if test_break set, it catches this. XXX Keep global for now? */
if(event.type==ESCKEY)
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 9694a8fa1c6..ff0e69b74d4 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -195,6 +195,7 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist)
/* ensure making new keymaps and set space types */
wm->initialized= 0;
+ wm->winactive= NULL;
/* only first wm in list has ghostwins */
for(win= wm->windows.first; win; win= win->next) {
@@ -202,6 +203,10 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist)
if(oldwin->winid == win->winid ) {
win->ghostwin= oldwin->ghostwin;
+ win->active= oldwin->active;
+ if(win->active)
+ wm->winactive= win;
+
GHOST_SetWindowUserData(win->ghostwin, win); /* pointer back */
oldwin->ghostwin= NULL;
@@ -528,7 +533,7 @@ void WM_write_file(bContext *C, char *target, int compress, ReportList *reports)
packAll(G.main, reports);
}
- ED_object_exit_editmode(C, 0);
+ ED_object_exit_editmode(C, EM_DO_UNDO);
do_history(di, reports);
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index d05bc07ce95..bdafedfb65e 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -79,7 +79,7 @@
#include "ED_armature.h"
#include "ED_keyframing.h"
#include "ED_node.h"
-#include "ED_previewrender.h"
+#include "ED_render.h"
#include "ED_space_api.h"
#include "ED_screen.h"
#include "ED_util.h"
@@ -87,9 +87,11 @@
#include "UI_interface.h"
#include "BLF_api.h"
+#include "gpu_buffers.h"
#include "GPU_extensions.h"
#include "GPU_draw.h"
+#include "BKE_depsgraph.h"
#include "BKE_sound.h"
static void wm_init_reports(bContext *C)
@@ -113,6 +115,7 @@ void WM_init(bContext *C)
set_free_windowmanager_cb(wm_close_and_free); /* library.c */
set_blender_test_break_cb(wm_window_testbreak); /* blender.c */
+ DAG_editors_update_cb(ED_render_id_flush_update); /* depsgraph.c */
ED_spacetypes_init(); /* editors/space_api/spacetype.c */
@@ -129,6 +132,8 @@ void WM_init(bContext *C)
wm_init_reports(C); /* reports cant be initialized before the wm */
+ GPU_extensions_init();
+
UI_init();
// clear_matcopybuf(); /* XXX */
@@ -139,8 +144,6 @@ void WM_init(bContext *C)
ED_preview_init_dbase();
- GPU_extensions_init();
-
G.ndofdevice = -1; /* XXX bad initializer, needs set otherwise buttons show! */
read_Blog();
@@ -167,6 +170,7 @@ extern wchar_t *copybufinfo;
// XXX copy/paste buffer stuff...
extern void free_anim_copybuf();
+extern void free_anim_drivers_copybuf();
extern void free_posebuf();
/* called in creator.c even... tsk, split this! */
@@ -187,10 +191,12 @@ void WM_exit(bContext *C)
CTX_wm_window_set(C, win); /* needed by operator close callbacks */
WM_event_remove_handlers(C, &win->handlers);
+ WM_event_remove_handlers(C, &win->modalhandlers);
ED_screen_exit(C, win, win->screen);
}
}
wm_operatortype_free();
+ WM_menutype_free();
/* all non-screen and non-space stuff editors did, like editmode */
if(C)
@@ -209,10 +215,14 @@ void WM_exit(bContext *C)
fastshade_free_render(); /* shaded view */
ED_preview_free_dbase(); /* frees a Main dbase, before free_blender! */
- wm_free_reports(C); /* before free_blender! - since the ListBases get freed there */
+
+ if(C && CTX_wm_manager(C))
+ wm_free_reports(C); /* before free_blender! - since the ListBases get freed there */
+
free_blender(); /* blender.c, does entire library and spacetypes */
// free_matcopybuf();
free_anim_copybuf();
+ free_anim_drivers_copybuf();
free_posebuf();
// free_vertexpaint();
// free_imagepaint();
@@ -248,6 +258,7 @@ void WM_exit(bContext *C)
// XXX UI_filelist_free_icons();
}
+ GPU_buffer_pool_free(0);
GPU_extensions_exit();
// if (copybuf) MEM_freeN(copybuf);
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c
index bef3268920d..9e16ce4082f 100644
--- a/source/blender/windowmanager/intern/wm_jobs.c
+++ b/source/blender/windowmanager/intern/wm_jobs.c
@@ -107,6 +107,7 @@ struct wmJob {
/* internal */
void *owner;
+ int flag;
short suspended, running, ready, do_update, stop;
/* once running, we store this separately */
@@ -123,7 +124,7 @@ struct wmJob {
/* returns current or adds new job, but doesnt run it */
/* every owner only gets a single job, adding a new one will stop running stop and
when stopped it starts the new one */
-wmJob *WM_jobs_get(wmWindowManager *wm, wmWindow *win, void *owner)
+wmJob *WM_jobs_get(wmWindowManager *wm, wmWindow *win, void *owner, int flag)
{
wmJob *steve;
@@ -137,6 +138,7 @@ wmJob *WM_jobs_get(wmWindowManager *wm, wmWindow *win, void *owner)
BLI_addtail(&wm->jobs, steve);
steve->win= win;
steve->owner= owner;
+ steve->flag= flag;
}
return steve;
@@ -198,20 +200,25 @@ static void *do_job_thread(void *job_v)
}
/* dont allow same startjob to be executed twice */
-static void wm_jobs_test_suspend(wmWindowManager *wm, wmJob *test)
+static void wm_jobs_test_suspend_stop(wmWindowManager *wm, wmJob *test)
{
wmJob *steve;
+ int suspend= 0;
- for(steve= wm->jobs.first; steve; steve= steve->next)
- if(steve!=test)
- if(steve->running)
- if(steve->startjob==test->startjob)
- break;
-
- if(steve)
- test->suspended= 1;
- else
- test->suspended= 0;
+ for(steve= wm->jobs.first; steve; steve= steve->next) {
+ if(steve==test || !steve->running) continue;
+ if(steve->startjob!=test->startjob && !(test->flag & WM_JOB_EXCL_RENDER)) continue;
+ if((test->flag & WM_JOB_EXCL_RENDER) && !(steve->flag & WM_JOB_EXCL_RENDER)) continue;
+
+ suspend= 1;
+
+ /* if this job has higher priority, stop others */
+ if(test->flag & WM_JOB_PRIORITY)
+ steve->stop= 1;
+ }
+
+ /* possible suspend ourselfs, waiting for other jobs, or de-suspend */
+ test->suspended= suspend;
}
/* if job running, the same owner gave it a new job */
@@ -225,7 +232,7 @@ void WM_jobs_start(wmWindowManager *wm, wmJob *steve)
else {
if(steve->customdata && steve->startjob) {
- wm_jobs_test_suspend(wm, steve);
+ wm_jobs_test_suspend_stop(wm, steve);
if(steve->suspended==0) {
/* copy to ensure proper free in end */
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 5566aeba260..eedacb056b7 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -29,6 +29,7 @@
#include <string.h>
#include "DNA_screen_types.h"
+#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
@@ -52,9 +53,76 @@
#include "wm_event_system.h"
#include "wm_event_types.h"
+/* ********************* key config ***********************/
+
+static void keymap_properties_set(wmKeyMapItem *kmi)
+{
+ WM_operator_properties_alloc(&(kmi->ptr), &(kmi->properties), kmi->idname);
+}
+
+wmKeyConfig *WM_keyconfig_add(wmWindowManager *wm, char *idname)
+{
+ wmKeyConfig *keyconf;
+
+ keyconf= MEM_callocN(sizeof(wmKeyConfig), "wmKeyConfig");
+ BLI_strncpy(keyconf->idname, idname, sizeof(keyconf->idname));
+ BLI_addtail(&wm->keyconfigs, keyconf);
+
+ return keyconf;
+}
+
+void WM_keyconfig_free(wmKeyConfig *keyconf)
+{
+ wmKeyMap *km;
+
+ while((km= keyconf->keymaps.first)) {
+ WM_keymap_free(km);
+ BLI_freelinkN(&keyconf->keymaps, km);
+ }
+
+ MEM_freeN(keyconf);
+}
+
+void WM_keyconfig_userdef(wmWindowManager *wm)
+{
+ wmKeyMap *km;
+ wmKeyMapItem *kmi;
+
+ for(km=U.keymaps.first; km; km=km->next)
+ for(kmi=km->items.first; kmi; kmi=kmi->next)
+ keymap_properties_set(kmi);
+}
+
+static wmKeyConfig *wm_keyconfig_list_find(ListBase *lb, char *idname)
+{
+ wmKeyConfig *kc;
+
+ for(kc= lb->first; kc; kc= kc->next)
+ if(0==strncmp(idname, kc->idname, KMAP_MAX_NAME))
+ return kc;
+
+ return NULL;
+}
+
+/* ************************ free ************************* */
+
+void WM_keymap_free(wmKeyMap *keymap)
+{
+ wmKeyMapItem *kmi;
+
+ for(kmi=keymap->items.first; kmi; kmi=kmi->next) {
+ if(kmi->ptr) {
+ WM_operator_properties_free(kmi->ptr);
+ MEM_freeN(kmi->ptr);
+ }
+ }
+
+ BLI_freelistN(&keymap->items);
+}
+
/* ***************** generic call, exported **************** */
-static void keymap_event_set(wmKeymapItem *kmi, short type, short val, int modifier, short keymodifier)
+static void keymap_event_set(wmKeyMapItem *kmi, short type, short val, int modifier, short keymodifier)
{
kmi->type= type;
kmi->val= val;
@@ -87,26 +155,18 @@ static void keymap_event_set(wmKeymapItem *kmi, short type, short val, int modif
}
}
-static void keymap_properties_set(wmKeymapItem *kmi)
-{
- if(!kmi->ptr) {
- kmi->ptr= MEM_callocN(sizeof(PointerRNA), "wmKeymapItemPtr");
- WM_operator_properties_create(kmi->ptr, kmi->idname);
- }
-}
-
/* if item was added, then bail out */
-wmKeymapItem *WM_keymap_verify_item(ListBase *lb, char *idname, short type, short val, int modifier, short keymodifier)
+wmKeyMapItem *WM_keymap_verify_item(wmKeyMap *keymap, char *idname, int type, int val, int modifier, int keymodifier)
{
- wmKeymapItem *kmi;
+ wmKeyMapItem *kmi;
- for(kmi= lb->first; kmi; kmi= kmi->next)
+ for(kmi= keymap->items.first; kmi; kmi= kmi->next)
if(strncmp(kmi->idname, idname, OP_MAX_TYPENAME)==0)
break;
if(kmi==NULL) {
- kmi= MEM_callocN(sizeof(wmKeymapItem), "keymap entry");
+ kmi= MEM_callocN(sizeof(wmKeyMapItem), "keymap entry");
- BLI_addtail(lb, kmi);
+ BLI_addtail(&keymap->items, kmi);
BLI_strncpy(kmi->idname, idname, OP_MAX_TYPENAME);
keymap_event_set(kmi, type, val, modifier, keymodifier);
@@ -116,11 +176,11 @@ wmKeymapItem *WM_keymap_verify_item(ListBase *lb, char *idname, short type, shor
}
/* always add item */
-wmKeymapItem *WM_keymap_add_item(ListBase *lb, char *idname, short type, short val, int modifier, short keymodifier)
+wmKeyMapItem *WM_keymap_add_item(wmKeyMap *keymap, char *idname, int type, int val, int modifier, int keymodifier)
{
- wmKeymapItem *kmi= MEM_callocN(sizeof(wmKeymapItem), "keymap entry");
+ wmKeyMapItem *kmi= MEM_callocN(sizeof(wmKeyMapItem), "keymap entry");
- BLI_addtail(lb, kmi);
+ BLI_addtail(&keymap->items, kmi);
BLI_strncpy(kmi->idname, idname, OP_MAX_TYPENAME);
keymap_event_set(kmi, type, val, modifier, keymodifier);
@@ -128,75 +188,87 @@ wmKeymapItem *WM_keymap_add_item(ListBase *lb, char *idname, short type, short v
return kmi;
}
+void WM_keymap_remove_item(wmKeyMap *keymap, wmKeyMapItem *kmi)
+{
+ if(BLI_findindex(&keymap->items, kmi) != -1) {
+ if(kmi->ptr) {
+ WM_operator_properties_free(kmi->ptr);
+ MEM_freeN(kmi->ptr);
+ }
+ BLI_freelinkN(&keymap->items, kmi);
+ }
+}
+
/* ****************** storage in WM ************ */
/* name id's are for storing general or multiple keymaps,
space/region ids are same as DNA_space_types.h */
/* gets free'd in wm.c */
-static wmKeyMap *wm_keymap_add(wmWindowManager *wm, const char *nameid, short spaceid, short regionid)
+static wmKeyMap *wm_keymap_list_find(ListBase *lb, char *idname, int spaceid, int regionid)
{
wmKeyMap *km;
-
- for(km= wm->keymaps.first; km; km= km->next)
+
+ for(km= lb->first; km; km= km->next)
if(km->spaceid==spaceid && km->regionid==regionid)
- if(0==strncmp(nameid, km->nameid, KMAP_MAX_NAME))
- break;
+ if(0==strncmp(idname, km->idname, KMAP_MAX_NAME))
+ return km;
+
+ return NULL;
+}
+
+wmKeyMap *WM_keymap_find(wmKeyConfig *keyconf, char *idname, int spaceid, int regionid)
+{
+ wmKeyMap *km= wm_keymap_list_find(&keyconf->keymaps, idname, spaceid, regionid);
if(km==NULL) {
km= MEM_callocN(sizeof(struct wmKeyMap), "keymap list");
- BLI_strncpy(km->nameid, nameid, KMAP_MAX_NAME);
+ BLI_strncpy(km->idname, idname, KMAP_MAX_NAME);
km->spaceid= spaceid;
km->regionid= regionid;
- BLI_addtail(&wm->keymaps, km);
+ BLI_addtail(&keyconf->keymaps, km);
}
return km;
}
-ListBase *WM_keymap_listbase(wmWindowManager *wm, const char *nameid, short spaceid, short regionid)
-{
- wmKeyMap *km= wm_keymap_add(wm, nameid, spaceid, regionid);
- return &km->keymap;
-}
-
/* ****************** modal keymaps ************ */
/* modal maps get linked to a running operator, and filter the keys before sending to modal() callback */
-wmKeyMap *WM_modalkeymap_add(wmWindowManager *wm, const char *nameid, EnumPropertyItem *items)
+wmKeyMap *WM_modalkeymap_add(wmKeyConfig *keyconf, char *idname, EnumPropertyItem *items)
{
- wmKeyMap *km= wm_keymap_add(wm, nameid, 0, 0);
- km->is_modal= 1;
- km->items= items;
+ wmKeyMap *km= WM_keymap_find(keyconf, idname, 0, 0);
+ km->flag |= KEYMAP_MODAL;
+ km->modal_items= items;
return km;
}
-wmKeyMap *WM_modalkeymap_get(wmWindowManager *wm, const char *nameid)
+wmKeyMap *WM_modalkeymap_get(wmKeyConfig *keyconf, char *idname)
{
wmKeyMap *km;
- for(km= wm->keymaps.first; km; km= km->next)
- if(km->is_modal)
- if(0==strncmp(nameid, km->nameid, KMAP_MAX_NAME))
+ for(km= keyconf->keymaps.first; km; km= km->next)
+ if(km->flag & KEYMAP_MODAL)
+ if(0==strncmp(idname, km->idname, KMAP_MAX_NAME))
break;
return km;
}
-void WM_modalkeymap_add_item(wmKeyMap *km, short type, short val, int modifier, short keymodifier, short value)
+void WM_modalkeymap_add_item(wmKeyMap *km, int type, int val, int modifier, int keymodifier, int value)
{
- wmKeymapItem *kmi= MEM_callocN(sizeof(wmKeymapItem), "keymap entry");
+ wmKeyMapItem *kmi= MEM_callocN(sizeof(wmKeyMapItem), "keymap entry");
- BLI_addtail(&km->keymap, kmi);
+ BLI_addtail(&km->items, kmi);
kmi->propvalue= value;
keymap_event_set(kmi, type, val, modifier, keymodifier);
}
-void WM_modalkeymap_assign(wmKeyMap *km, const char *opname)
+void WM_modalkeymap_assign(wmKeyMap *km, char *opname)
{
wmOperatorType *ot= WM_operatortype_find(opname, 0);
@@ -206,7 +278,6 @@ void WM_modalkeymap_assign(wmKeyMap *km, const char *opname)
printf("error: modalkeymap_assign, unknown operator %s\n", opname);
}
-
/* ***************** get string from key events **************** */
const char *WM_key_event_string(short type)
@@ -218,9 +289,9 @@ const char *WM_key_event_string(short type)
return "";
}
-static char *wm_keymap_item_to_string(wmKeymapItem *kmi, char *str, int len)
+char *WM_keymap_item_to_string(wmKeyMapItem *kmi, char *str, int len)
{
- char buf[100];
+ char buf[128];
buf[0]= 0;
@@ -242,22 +313,30 @@ static char *wm_keymap_item_to_string(wmKeymapItem *kmi, char *str, int len)
return str;
}
-static wmKeymapItem *wm_keymap_item_find_handlers(ListBase *handlers, const char *opname, int opcontext, IDProperty *properties, int compare_props)
+static wmKeyMapItem *wm_keymap_item_find_handlers(const bContext *C, ListBase *handlers, const char *opname, int opcontext, IDProperty *properties, int compare_props, wmKeyMap **keymap_r)
{
+ wmWindowManager *wm= CTX_wm_manager(C);
wmEventHandler *handler;
- wmKeymapItem *kmi;
+ wmKeyMap *keymap;
+ wmKeyMapItem *kmi;
/* find keymap item in handlers */
for(handler=handlers->first; handler; handler=handler->next) {
- if(handler->keymap) {
- for(kmi=handler->keymap->first; kmi; kmi=kmi->next) {
+ keymap= WM_keymap_active(wm, handler->keymap);
+
+ if(keymap && (!keymap->poll || keymap->poll((bContext*)C))) {
+ for(kmi=keymap->items.first; kmi; kmi=kmi->next) {
if(strcmp(kmi->idname, opname) == 0 && WM_key_event_string(kmi->type)[0]) {
if(compare_props) {
- if(kmi->ptr && IDP_EqualsProperties(properties, kmi->ptr->data))
+ if(kmi->ptr && IDP_EqualsProperties(properties, kmi->ptr->data)) {
+ if(keymap_r) *keymap_r= keymap;
return kmi;
+ }
}
- else
+ else {
+ if(keymap_r) *keymap_r= keymap;
return kmi;
+ }
}
}
}
@@ -266,74 +345,162 @@ static wmKeymapItem *wm_keymap_item_find_handlers(ListBase *handlers, const char
return NULL;
}
-static wmKeymapItem *wm_keymap_item_find(const bContext *C, const char *opname, int opcontext, IDProperty *properties, int compare_props)
+static wmKeyMapItem *wm_keymap_item_find_props(const bContext *C, const char *opname, int opcontext, IDProperty *properties, int compare_props, wmKeyMap **keymap_r)
{
- wmKeymapItem *found= NULL;
+ wmWindow *win= CTX_wm_window(C);
+ ScrArea *sa= CTX_wm_area(C);
+ ARegion *ar= CTX_wm_region(C);
+ wmKeyMapItem *found= NULL;
/* look into multiple handler lists to find the item */
- if(CTX_wm_window(C))
- found= wm_keymap_item_find_handlers(&CTX_wm_window(C)->handlers, opname, opcontext, properties, compare_props);
+ if(win)
+ found= wm_keymap_item_find_handlers(C, &win->handlers, opname, opcontext, properties, compare_props, keymap_r);
- if(CTX_wm_area(C) && found==NULL)
- found= wm_keymap_item_find_handlers(&CTX_wm_area(C)->handlers, opname, opcontext, properties, compare_props);
+ if(sa && found==NULL)
+ found= wm_keymap_item_find_handlers(C, &sa->handlers, opname, opcontext, properties, compare_props, keymap_r);
if(found==NULL) {
if(ELEM(opcontext, WM_OP_EXEC_REGION_WIN, WM_OP_INVOKE_REGION_WIN)) {
- if(CTX_wm_area(C)) {
- ARegion *ar= CTX_wm_area(C)->regionbase.first;
+ if(sa) {
+ ARegion *ar= sa->regionbase.first;
for(; ar; ar= ar->next)
if(ar->regiontype==RGN_TYPE_WINDOW)
break;
if(ar)
- found= wm_keymap_item_find_handlers(&ar->handlers, opname, opcontext, properties, compare_props);
+ found= wm_keymap_item_find_handlers(C, &ar->handlers, opname, opcontext, properties, compare_props, keymap_r);
}
}
else {
- if(CTX_wm_region(C))
- found= wm_keymap_item_find_handlers(&CTX_wm_region(C)->handlers, opname, opcontext, properties, compare_props);
+ if(ar)
+ found= wm_keymap_item_find_handlers(C, &ar->handlers, opname, opcontext, properties, compare_props, keymap_r);
}
}
return found;
}
-char *WM_key_event_operator_string(const bContext *C, const char *opname, int opcontext, IDProperty *properties, char *str, int len)
+static wmKeyMapItem *wm_keymap_item_find(const bContext *C, const char *opname, int opcontext, IDProperty *properties, wmKeyMap **keymap_r)
{
- wmKeymapItem *found= wm_keymap_item_find(C, opname, opcontext, properties, 1);
+ wmKeyMapItem *found= wm_keymap_item_find_props(C, opname, opcontext, properties, 1, keymap_r);
if(!found)
- found= wm_keymap_item_find(C, opname, opcontext, properties, 0);
+ found= wm_keymap_item_find_props(C, opname, opcontext, properties, 0, keymap_r);
+
+ return found;
+}
+
+char *WM_key_event_operator_string(const bContext *C, const char *opname, int opcontext, IDProperty *properties, char *str, int len)
+{
+ wmKeyMapItem *kmi= wm_keymap_item_find(C, opname, opcontext, properties, NULL);
- if(found) {
- wm_keymap_item_to_string(found, str, len);
+ if(kmi) {
+ WM_keymap_item_to_string(kmi, str, len);
return str;
}
return NULL;
}
-/* searches context and changes keymap item, if found */
-void WM_key_event_operator_change(const bContext *C, const char *opname, int opcontext, IDProperty *properties, short key, short modifier)
-{
- wmKeymapItem *found= wm_keymap_item_find(C, opname, opcontext, properties, 1);
+/* ***************** user preferences ******************* */
- if(!found)
- found= wm_keymap_item_find(C, opname, opcontext, properties, 0);
+wmKeyMap *WM_keymap_active(wmWindowManager *wm, wmKeyMap *keymap)
+{
+ wmKeyConfig *keyconf;
+ wmKeyMap *km;
- if(found) {
- keymap_event_set(found, key, KM_PRESS, modifier, 0);
+ if(!keymap)
+ return NULL;
+
+ /* first user defined keymaps */
+ km= wm_keymap_list_find(&U.keymaps, keymap->idname, keymap->spaceid, keymap->regionid);
+ if(km)
+ return km;
+
+ /* then user key config */
+ keyconf= wm_keyconfig_list_find(&wm->keyconfigs, U.keyconfigstr);
+ if(keyconf) {
+ km= wm_keymap_list_find(&keyconf->keymaps, keymap->idname, keymap->spaceid, keymap->regionid);
+ if(km)
+ return km;
}
+
+ /* then use default */
+ km= wm_keymap_list_find(&wm->defaultconf->keymaps, keymap->idname, keymap->spaceid, keymap->regionid);
+ return km;
}
-/* ********************* */
+wmKeyMap *WM_keymap_copy_to_user(wmKeyMap *keymap)
+{
+ wmKeyMap *usermap;
+ wmKeyMapItem *kmi;
+
+ usermap= wm_keymap_list_find(&U.keymaps, keymap->idname, keymap->spaceid, keymap->regionid);
+
+ if(!usermap) {
+ /* not saved yet, duplicate existing */
+ usermap= MEM_dupallocN(keymap);
+ usermap->modal_items= NULL;
+ usermap->poll= NULL;
+ usermap->flag |= KEYMAP_USER;
+
+ BLI_addtail(&U.keymaps, usermap);
+ }
+ else {
+ /* already saved, free items for re-copy */
+ WM_keymap_free(usermap);
+ }
+
+ BLI_duplicatelist(&usermap->items, &keymap->items);
-int WM_key_event_is_tweak(short type)
+ for(kmi=usermap->items.first; kmi; kmi=kmi->next) {
+ if(kmi->properties) {
+ kmi->ptr= MEM_callocN(sizeof(PointerRNA), "UserKeyMapItemPtr");
+ WM_operator_properties_create(kmi->ptr, kmi->idname);
+
+ kmi->properties= IDP_CopyProperty(kmi->properties);
+ kmi->ptr->data= kmi->properties;
+ }
+ }
+
+ for(kmi=keymap->items.first; kmi; kmi=kmi->next)
+ kmi->flag &= ~KMI_EXPANDED;
+
+ return usermap;
+}
+
+void WM_keymap_restore_to_default(wmKeyMap *keymap)
{
- if(type>=EVT_TWEAK_L && type<=EVT_GESTURE)
- return 1;
- return 0;
+ wmKeyMap *usermap;
+
+ usermap= wm_keymap_list_find(&U.keymaps, keymap->idname, keymap->spaceid, keymap->regionid);
+
+ if(usermap) {
+ WM_keymap_free(usermap);
+ BLI_freelinkN(&U.keymaps, usermap);
+ }
}
+/* searches context and changes keymap item, if found */
+void WM_key_event_operator_change(const bContext *C, const char *opname, int opcontext, IDProperty *properties, short key, short modifier)
+{
+ wmWindowManager *wm= CTX_wm_manager(C);
+ wmKeyMap *keymap;
+ wmKeyMapItem *kmi;
+
+ kmi= wm_keymap_item_find(C, opname, opcontext, properties, &keymap);
+
+ if(kmi) {
+ /* if the existing one is in a default keymap, copy it
+ to user preferences, and lookup again so we get a
+ key map item from the user preferences we can modify */
+ if(BLI_findindex(&wm->defaultconf->keymaps, keymap) >= 0) {
+ WM_keymap_copy_to_user(keymap);
+ kmi= wm_keymap_item_find(C, opname, opcontext, properties, NULL);
+ }
+
+ keymap_event_set(kmi, key, KM_PRESS, modifier, 0);
+ }
+}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 86a02e2731a..5ad138c3890 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -58,6 +58,7 @@
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_scene.h"
+#include "BKE_screen.h" /* BKE_ST_MAXNAME */
#include "BKE_utildefines.h"
#include "BIF_gl.h"
@@ -269,8 +270,7 @@ wmOperatorTypeMacro *WM_operatortype_macro_define(wmOperatorType *ot, const char
BLI_strncpy(otmacro->idname, idname, OP_MAX_TYPENAME);
/* do this on first use, since operatordefinitions might have been not done yet */
-// otmacro->ptr= MEM_callocN(sizeof(PointerRNA), "optype macro ItemPtr");
-// WM_operator_properties_create(otmacro->ptr, idname);
+ WM_operator_properties_alloc(&(otmacro->ptr), &(otmacro->properties), idname);
BLI_addtail(&ot->macro, otmacro);
@@ -440,6 +440,25 @@ void WM_operator_properties_create(PointerRNA *ptr, const char *opstring)
RNA_pointer_create(NULL, &RNA_OperatorProperties, NULL, ptr);
}
+/* similar to the function above except its uses ID properties
+ * used for keymaps and macros */
+void WM_operator_properties_alloc(PointerRNA **ptr, IDProperty **properties, const char *opstring)
+{
+ if(*properties==NULL) {
+ IDPropertyTemplate val = {0};
+ *properties= IDP_New(IDP_GROUP, val, "wmOpItemProp");
+ }
+
+ if(*ptr==NULL) {
+ *ptr= MEM_callocN(sizeof(PointerRNA), "wmOpItemPtr");
+ WM_operator_properties_create(*ptr, opstring);
+ }
+
+ (*ptr)->data= *properties;
+
+}
+
+
void WM_operator_properties_free(PointerRNA *ptr)
{
IDProperty *properties= ptr->data;
@@ -487,20 +506,26 @@ int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_CANCELLED;
}
-/* op->invoke */
-int WM_operator_confirm(bContext *C, wmOperator *op, wmEvent *event)
+/* Can't be used as an invoke directly, needs message arg (can be NULL) */
+int WM_operator_confirm_message(bContext *C, wmOperator *op, char *message)
{
uiPopupMenu *pup;
uiLayout *layout;
pup= uiPupMenuBegin(C, "OK?", ICON_QUESTION);
layout= uiPupMenuLayout(pup);
- uiItemO(layout, NULL, 0, op->type->idname);
+ uiItemO(layout, message, 0, op->type->idname);
uiPupMenuEnd(C, pup);
return OPERATOR_CANCELLED;
}
+
+int WM_operator_confirm(bContext *C, wmOperator *op, wmEvent *event)
+{
+ return WM_operator_confirm_message(C, op, NULL);
+}
+
/* op->invoke, opens fileselect if path property not set, otherwise executes */
int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *event)
{
@@ -516,22 +541,33 @@ int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *event)
/* default properties for fileselect */
void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type)
{
- RNA_def_string_file_path(ot->srna, "path", "", FILE_MAX, "FilePath", "Path to file.");
- RNA_def_string_file_name(ot->srna, "filename", "", FILE_MAX, "FileName", "Name of the file.");
- RNA_def_string_dir_path(ot->srna, "directory", "", FILE_MAX, "Directory", "Directory of the file.");
+ PropertyRNA *prop;
- RNA_def_boolean(ot->srna, "filter_blender", (filter & BLENDERFILE), "Filter .blend files", "");
- RNA_def_boolean(ot->srna, "filter_image", (filter & IMAGEFILE), "Filter image files", "");
- RNA_def_boolean(ot->srna, "filter_movie", (filter & MOVIEFILE), "Filter movie files", "");
- RNA_def_boolean(ot->srna, "filter_python", (filter & PYSCRIPTFILE), "Filter python files", "");
- RNA_def_boolean(ot->srna, "filter_font", (filter & FTFONTFILE), "Filter font files", "");
- RNA_def_boolean(ot->srna, "filter_sound", (filter & SOUNDFILE), "Filter sound files", "");
- RNA_def_boolean(ot->srna, "filter_text", (filter & TEXTFILE), "Filter text files", "");
- RNA_def_boolean(ot->srna, "filter_folder", (filter & FOLDERFILE), "Filter folders", "");
+ RNA_def_string_file_path(ot->srna, "path", "", FILE_MAX, "File Path", "Path to file.");
+ RNA_def_string_file_name(ot->srna, "filename", "", FILE_MAX, "File Name", "Name of the file.");
+ RNA_def_string_dir_path(ot->srna, "directory", "", FILE_MAX, "Directory", "Directory of the file.");
- RNA_def_int(ot->srna, "filemode", type, FILE_LOADLIB, FILE_SPECIAL,
+ prop= RNA_def_boolean(ot->srna, "filter_blender", (filter & BLENDERFILE), "Filter .blend files", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+ prop= RNA_def_boolean(ot->srna, "filter_image", (filter & IMAGEFILE), "Filter image files", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+ prop= RNA_def_boolean(ot->srna, "filter_movie", (filter & MOVIEFILE), "Filter movie files", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+ prop= RNA_def_boolean(ot->srna, "filter_python", (filter & PYSCRIPTFILE), "Filter python files", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+ prop= RNA_def_boolean(ot->srna, "filter_font", (filter & FTFONTFILE), "Filter font files", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+ prop= RNA_def_boolean(ot->srna, "filter_sound", (filter & SOUNDFILE), "Filter sound files", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+ prop= RNA_def_boolean(ot->srna, "filter_text", (filter & TEXTFILE), "Filter text files", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+ prop= RNA_def_boolean(ot->srna, "filter_folder", (filter & FOLDERFILE), "Filter folders", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+
+ prop= RNA_def_int(ot->srna, "filemode", type, FILE_LOADLIB, FILE_SPECIAL,
"File Browser Mode", "The setting for the file browser mode to load a .blend file, a library or a special file.",
FILE_LOADLIB, FILE_SPECIAL);
+ RNA_def_property_flag(prop, PROP_HIDDEN);
}
/* op->poll */
@@ -682,7 +718,7 @@ static void operator_search_cb(const struct bContext *C, void *arg, char *str, u
for(; ot; ot= ot->next) {
if(BLI_strcasestr(ot->name, str)) {
- if(ot->poll==NULL || ot->poll((bContext *)C)) {
+ if(WM_operator_poll((bContext*)C, ot)) {
char name[256];
int len= strlen(ot->name);
@@ -766,6 +802,25 @@ static void WM_OT_search_menu(wmOperatorType *ot)
ot->poll= wm_search_menu_poll;
}
+static int wm_call_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ char idname[BKE_ST_MAXNAME];
+ RNA_string_get(op->ptr, "name", idname);
+
+ uiPupMenuInvoke(C, idname);
+
+ return OPERATOR_CANCELLED;
+}
+
+static void WM_OT_call_menu(wmOperatorType *ot)
+{
+ ot->name= "Call Menu";
+ ot->idname= "WM_OT_call_menu";
+
+ ot->invoke= wm_call_menu_invoke;
+
+ RNA_def_string(ot->srna, "name", "", BKE_ST_MAXNAME, "Name", "Name of the new sequence strip");
+}
/* ************ window / screen operator definitions ************** */
@@ -943,7 +998,7 @@ static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *event)
return WM_operator_call(C, op);
}
else {
- /* XXX solve where to get last linked library from */
+ /* XXX TODO solve where to get last linked library from */
RNA_string_set(op->ptr, "path", G.lib);
WM_event_add_fileselect(C, op);
return OPERATOR_RUNNING_MODAL;
@@ -1064,6 +1119,8 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
DAG_ids_flush_update(0);
BLO_blendhandle_close(bh);
+
+ /* XXX TODO: align G.lib with other directory storage (like last opened image etc...) */
BLI_strncpy(G.lib, dir, FILE_MAX);
WM_event_add_notifier(C, NC_WINDOW, NULL);
@@ -1081,6 +1138,8 @@ static void WM_OT_link_append(wmOperatorType *ot)
ot->exec= wm_link_append_exec;
ot->poll= WM_operator_winactive;
+ ot->flag |= OPTYPE_UNDO;
+
WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_LOADLIB);
RNA_def_boolean(ot->srna, "link", 1, "Link", "Link the objects or datablocks rather than appending.");
@@ -1360,13 +1419,13 @@ static void wm_gesture_end(bContext *C, wmOperator *op)
int WM_border_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(WM_key_event_is_tweak(event->type))
+ if(ISTWEAK(event->type))
op->customdata= WM_gesture_new(C, event, WM_GESTURE_RECT);
else
op->customdata= WM_gesture_new(C, event, WM_GESTURE_CROSS_RECT);
/* add modal handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
wm_gesture_tag_redraw(C);
@@ -1430,7 +1489,7 @@ int WM_gesture_circle_invoke(bContext *C, wmOperator *op, wmEvent *event)
op->customdata= WM_gesture_new(C, event, WM_GESTURE_CIRCLE);
/* add modal handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
wm_gesture_tag_redraw(C);
@@ -1483,7 +1542,7 @@ int WM_gesture_circle_modal(bContext *C, wmOperator *op, wmEvent *event)
case LEFTMOUSE:
case MIDDLEMOUSE:
case RIGHTMOUSE:
- if(event->val==0) { /* key release */
+ if(event->val==KM_RELEASE) { /* key release */
wm_gesture_end(C, op);
return OPERATOR_FINISHED;
}
@@ -1566,7 +1625,7 @@ static void tweak_gesture_modal(bContext *C, wmEvent *event)
if(gesture->event_type==event->type) {
WM_gesture_end(C, gesture);
window->tweak= NULL;
-
+
/* when tweak fails we should give the other keymap entries a chance */
event->val= KM_RELEASE;
}
@@ -1584,7 +1643,7 @@ void wm_tweakevent_test(bContext *C, wmEvent *event, int action)
if(win->tweak==NULL) {
if(CTX_wm_region(C)) {
- if(event->val) { // pressed
+ if(event->val==KM_PRESS) { // pressed
if( ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE) )
win->tweak= WM_gesture_new(C, event, WM_GESTURE_TWEAK);
}
@@ -1607,7 +1666,7 @@ int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, wmEvent *event)
op->customdata= WM_gesture_new(C, event, WM_GESTURE_LASSO);
/* add modal handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
wm_gesture_tag_redraw(C);
@@ -1622,7 +1681,7 @@ int WM_gesture_lines_invoke(bContext *C, wmOperator *op, wmEvent *event)
op->customdata= WM_gesture_new(C, event, WM_GESTURE_LINES);
/* add modal handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
wm_gesture_tag_redraw(C);
@@ -1684,7 +1743,7 @@ int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event)
case LEFTMOUSE:
case MIDDLEMOUSE:
case RIGHTMOUSE:
- if(event->val==0) { /* key release */
+ if(event->val==KM_RELEASE) { /* key release */
gesture_lasso_apply(C, op, event->type);
return OPERATOR_FINISHED;
}
@@ -1929,7 +1988,7 @@ int WM_radial_control_invoke(bContext *C, wmOperator *op, wmEvent *event)
wm_radial_control_paint, op->customdata);
/* add modal handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ WM_event_add_modal_handler(C, op);
WM_radial_control_modal(C, op, event);
@@ -1954,7 +2013,7 @@ void WM_radial_control_string(wmOperator *op, char str[], int maxlen)
just sets up the common parts of the radial control op. **/
void WM_OT_radial_control_partial(wmOperatorType *ot)
{
- static EnumPropertyItem prop_mode_items[] = {
+ static EnumPropertyItem radial_mode_items[] = {
{WM_RADIALCONTROL_SIZE, "SIZE", 0, "Size", ""},
{WM_RADIALCONTROL_STRENGTH, "STRENGTH", 0, "Strength", ""},
{WM_RADIALCONTROL_ANGLE, "ANGLE", 0, "Angle", ""},
@@ -1967,7 +2026,7 @@ void WM_OT_radial_control_partial(wmOperatorType *ot)
RNA_def_float(ot->srna, "new_value", 0, 0, FLT_MAX, "New Value", "", 0, FLT_MAX);
/* Should be set before calling operator */
- RNA_def_enum(ot->srna, "mode", prop_mode_items, 0, "Mode", "");
+ RNA_def_enum(ot->srna, "mode", radial_mode_items, 0, "Mode", "");
/* Internal */
RNA_def_int_vector(ot->srna, "initial_mouse", 2, NULL, INT_MIN, INT_MAX, "initial_mouse", "", INT_MIN, INT_MAX);
@@ -1977,17 +2036,19 @@ void WM_OT_radial_control_partial(wmOperatorType *ot)
/* uses no type defines, fully local testing function anyway... ;) */
-static int ten_timer_exec(bContext *C, wmOperator *op)
+static int redraw_timer_exec(bContext *C, wmOperator *op)
{
ARegion *ar= CTX_wm_region(C);
double stime= PIL_check_seconds_timer();
int type = RNA_int_get(op->ptr, "type");
- int a, time;
- char tmpstr[128];
+ int iter = RNA_int_get(op->ptr, "iterations");
+ int a;
+ float time;
+ char *infostr= "";
WM_cursor_wait(1);
-
- for(a=0; a<10; a++) {
+
+ for(a=0; a<iter; a++) {
if (type==0) {
ED_region_do_draw(C, ar);
}
@@ -2003,13 +2064,35 @@ static int ten_timer_exec(bContext *C, wmOperator *op)
wmWindow *win= CTX_wm_window(C);
ScrArea *sa;
+ ScrArea *sa_back= CTX_wm_area(C);
+ ARegion *ar_back= CTX_wm_region(C);
+
+ for(sa= CTX_wm_screen(C)->areabase.first; sa; sa= sa->next) {
+ ARegion *ar_iter;
+ CTX_wm_area_set(C, sa);
+
+ for(ar_iter= sa->regionbase.first; ar_iter; ar_iter= ar_iter->next) {
+ CTX_wm_region_set(C, ar_iter);
+ ED_region_do_draw(C, ar_iter);
+ }
+ }
+
+ CTX_wm_window_set(C, win); /* XXX context manipulation warning! */
+
+ CTX_wm_area_set(C, sa_back);
+ CTX_wm_region_set(C, ar_back);
+ }
+ else if (type==3) {
+ wmWindow *win= CTX_wm_window(C);
+ ScrArea *sa;
+
for(sa= CTX_wm_screen(C)->areabase.first; sa; sa= sa->next)
ED_area_tag_redraw(sa);
wm_draw_update(C);
CTX_wm_window_set(C, win); /* XXX context manipulation warning! */
}
- else if (type==3) {
+ else if (type==4) {
Scene *scene= CTX_data_scene(C);
if(a & 1) scene->r.cfra--;
@@ -2022,40 +2105,43 @@ static int ten_timer_exec(bContext *C, wmOperator *op)
}
}
- time= (int) ((PIL_check_seconds_timer()-stime)*1000);
+ time= ((PIL_check_seconds_timer()-stime)*1000);
- if(type==0) sprintf(tmpstr, "10 x Draw Region: %d ms", time);
- if(type==1) sprintf(tmpstr, "10 x Draw Region and Swap: %d ms", time);
- if(type==2) sprintf(tmpstr, "10 x Draw Window and Swap: %d ms", time);
- if(type==3) sprintf(tmpstr, "Anim Step: %d ms", time);
- if(type==4) sprintf(tmpstr, "10 x Undo/Redo: %d ms", time);
+ if(type==0) infostr= "Draw Region";
+ if(type==1) infostr= "Draw Region and Swap";
+ if(type==2) infostr= "Draw Window";
+ if(type==3) infostr= "Draw Window and Swap";
+ if(type==4) infostr= "Animation Steps";
+ if(type==5) infostr= "Undo/Redo";
WM_cursor_wait(0);
- uiPupMenuNotice(C, tmpstr);
+ BKE_reportf(op->reports, RPT_INFO, "%d x %s: %.2f ms, average: %.4f", iter, infostr, time, time/iter);
return OPERATOR_FINISHED;
}
-static void WM_OT_ten_timer(wmOperatorType *ot)
+static void WM_OT_redraw_timer(wmOperatorType *ot)
{
static EnumPropertyItem prop_type_items[] = {
{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", ""},
+ {1, "DRAW_SWAP", 0, "Draw Region + Swap", ""},
+ {2, "DRAW_WIN", 0, "Draw Window", ""},
+ {3, "DRAW_WIN_SWAP", 0, "Draw Window + Swap", ""},
+ {4, "ANIM_STEP", 0, "Anim Step", ""},
+ {5, "UNDO", 0, "Undo/Redo", ""},
{0, NULL, 0, NULL, NULL}};
- ot->name= "Ten Timer";
- ot->idname= "WM_OT_ten_timer";
- ot->description="Ten Timer operator.";
+ ot->name= "Redraw Timer";
+ ot->idname= "WM_OT_redraw_timer";
+ ot->description="Simple redraw timer to test the speed of updating the interface.";
ot->invoke= WM_menu_invoke;
- ot->exec= ten_timer_exec;
+ ot->exec= redraw_timer_exec;
ot->poll= WM_operator_winactive;
RNA_def_enum(ot->srna, "type", prop_type_items, 0, "Type", "");
+ RNA_def_int(ot->srna, "iterations", 10, 1,INT_MAX, "Iterations", "Number of times to redraw", 1,1000);
}
@@ -2090,15 +2176,17 @@ void wm_operatortype_init(void)
WM_operatortype_append(WM_OT_jobs_timer);
WM_operatortype_append(WM_OT_save_as_mainfile);
WM_operatortype_append(WM_OT_save_mainfile);
- WM_operatortype_append(WM_OT_ten_timer);
+ WM_operatortype_append(WM_OT_redraw_timer);
WM_operatortype_append(WM_OT_debug_menu);
WM_operatortype_append(WM_OT_search_menu);
+ WM_operatortype_append(WM_OT_call_menu);
}
/* default keymap for windows and screens, only call once per WM */
-void wm_window_keymap(wmWindowManager *wm)
+void wm_window_keymap(wmKeyConfig *keyconf)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Window", 0, 0);
+ wmKeyMap *keymap= WM_keymap_find(keyconf, "Window", 0, 0);
+ wmKeyMapItem *km;
/* items to make WM work */
WM_keymap_verify_item(keymap, "WM_OT_jobs_timer", TIMERJOBS, KM_ANY, KM_ANY, 0);
@@ -2121,13 +2209,63 @@ void wm_window_keymap(wmWindowManager *wm)
WM_keymap_add_item(keymap, "WM_OT_save_mainfile", SKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
- WM_keymap_verify_item(keymap, "WM_OT_window_fullscreen_toggle", F11KEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_verify_item(keymap, "WM_OT_window_fullscreen_toggle", F11KEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "WM_OT_exit_blender", QKEY, KM_PRESS, KM_CTRL, 0);
/* debug/testing */
- WM_keymap_verify_item(keymap, "WM_OT_ten_timer", TKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
+ WM_keymap_verify_item(keymap, "WM_OT_redraw_timer", TKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
WM_keymap_verify_item(keymap, "WM_OT_debug_menu", DKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
WM_keymap_verify_item(keymap, "WM_OT_search_menu", SPACEKEY, KM_PRESS, 0, 0);
+ /* Space switching */
+
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F2KEY, KM_PRESS, KM_SHIFT, 0); /* new in 2.5x, was DXF export */
+ RNA_string_set(km->ptr, "path", "area.type");
+ RNA_string_set(km->ptr, "value", "LOGIC_EDITOR");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F3KEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(km->ptr, "path", "area.type");
+ RNA_string_set(km->ptr, "value", "NODE_EDITOR");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F4KEY, KM_PRESS, KM_SHIFT, 0); /* new in 2.5x, was data browser */
+ RNA_string_set(km->ptr, "path", "area.type");
+ RNA_string_set(km->ptr, "value", "CONSOLE");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F5KEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(km->ptr, "path", "area.type");
+ RNA_string_set(km->ptr, "value", "VIEW_3D");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F6KEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(km->ptr, "path", "area.type");
+ RNA_string_set(km->ptr, "value", "GRAPH_EDITOR");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F7KEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(km->ptr, "path", "area.type");
+ RNA_string_set(km->ptr, "value", "PROPERTIES");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F8KEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(km->ptr, "path", "area.type");
+ RNA_string_set(km->ptr, "value", "SEQUENCE_EDITOR");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F9KEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(km->ptr, "path", "area.type");
+ RNA_string_set(km->ptr, "value", "OUTLINER");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F9KEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(km->ptr, "path", "area.type");
+ RNA_string_set(km->ptr, "value", "OUTLINER");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F10KEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(km->ptr, "path", "area.type");
+ RNA_string_set(km->ptr, "value", "IMAGE_EDITOR");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F11KEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(km->ptr, "path", "area.type");
+ RNA_string_set(km->ptr, "value", "TEXT_EDITOR");
+
+ km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F12KEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(km->ptr, "path", "area.type");
+ RNA_string_set(km->ptr, "value", "DOPESHEET_EDITOR");
}
diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c
index dc2aca7b15b..081125bf7f6 100644
--- a/source/blender/windowmanager/intern/wm_subwindow.c
+++ b/source/blender/windowmanager/intern/wm_subwindow.c
@@ -434,7 +434,7 @@ static int wm_get_colordepth(void)
/* apple seems to round colors to below and up on some configs */
-static unsigned int index_to_framebuffer(int index)
+unsigned int index_to_framebuffer(int index)
{
unsigned int i= index;
@@ -464,7 +464,7 @@ static unsigned int index_to_framebuffer(int index)
/* this is the old method as being in use for ages.... seems to work? colors are rounded to lower values */
-static unsigned int index_to_framebuffer(int index)
+unsigned int index_to_framebuffer(int index)
{
unsigned int i= index;
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index d70516ef02e..f7116a2bd1f 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -68,10 +68,10 @@ GHOST_SystemHandle g_system= NULL;
/* set by commandline */
static int prefsizx= 0, prefsizy= 0, prefstax= 0, prefstay= 0;
-
/* ******** win open & close ************ */
-/* XXX this one should correctly check for apple top header... */
+/* XXX this one should correctly check for apple top header...
+ done for Cocoa : returns window contents (and not frame) max size*/
static void wm_get_screensize(int *width_r, int *height_r)
{
unsigned int uiwidth;
@@ -90,7 +90,7 @@ static void wm_window_check_position(rcti *rect)
wm_get_screensize(&width, &height);
-#ifdef __APPLE__
+#if defined(__APPLE__) && !defined(GHOST_COCOA)
height -= 70;
#endif
@@ -146,6 +146,7 @@ void wm_window_free(bContext *C, wmWindow *win)
CTX_wm_window_set(C, NULL);
WM_event_remove_handlers(C, &win->handlers);
+ WM_event_remove_handlers(C, &win->modalhandlers);
/* end running jobs, a job end also removes its timer */
for(wt= win->timers.first; wt; wt= wtnext) {
@@ -268,7 +269,12 @@ void wm_window_title(wmWindowManager *wm, wmWindow *win)
else
GHOST_SetTitle(win->ghostwin, "Blender");
-#ifdef __APPLE__
+ /* Informs GHOST of unsaved changes, to set window modified visual indicator (MAC OS X)
+ and to give hint of unsaved changes for a user warning mechanism
+ in case of OS application terminate request (e.g. OS Shortcut Alt+F4, Cmd+Q, (...), or session end) */
+ GHOST_SetWindowModifiedState(win->ghostwin, (GHOST_TUns8)!wm->file_saved);
+
+#if defined(__APPLE__) && !defined(GHOST_COCOA)
if(wm->file_saved)
GHOST_SetWindowState(win->ghostwin, GHOST_kWindowStateUnModified);
else
@@ -291,7 +297,7 @@ static void wm_window_add_ghostwindow(wmWindowManager *wm, char *title, wmWindow
// inital_state = GHOST_kWindowStateMaximized;
inital_state = GHOST_kWindowStateNormal;
-#ifdef __APPLE__
+#if defined(__APPLE__) && !defined(GHOST_COCOA)
{
extern int macPrefState; /* creator.c */
inital_state += macPrefState;
@@ -331,14 +337,15 @@ static void wm_window_add_ghostwindow(wmWindowManager *wm, char *title, wmWindow
/* called in wm_check, also inits stuff after file read */
void wm_window_add_ghostwindows(wmWindowManager *wm)
{
- ListBase *keymap;
+ wmKeyMap *keymap;
wmWindow *win;
/* no commandline prefsize? then we set this */
if (!prefsizx) {
wm_get_screensize(&prefsizx, &prefsizy);
-#ifdef __APPLE__
+#if defined(__APPLE__) && !defined(GHOST_COCOA)
+//Cocoa provides functions to get correct max window size
{
extern void wm_set_apple_prefsize(int, int); /* wm_apple.c */
@@ -365,13 +372,16 @@ void wm_window_add_ghostwindows(wmWindowManager *wm)
/* happens after fileread */
if(win->eventstate==NULL)
win->eventstate= MEM_callocN(sizeof(wmEvent), "window event state");
-
+
/* add keymap handlers (1 handler for all keys in map!) */
- keymap= WM_keymap_listbase(wm, "Window", 0, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "Window", 0, 0);
WM_event_add_keymap_handler(&win->handlers, keymap);
- keymap= WM_keymap_listbase(wm, "Screen", 0, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "Screen", 0, 0);
WM_event_add_keymap_handler(&win->handlers, keymap);
+
+ keymap= WM_keymap_find(wm->defaultconf, "Screen Editing", 0, 0);
+ WM_event_add_keymap_handler(&win->modalhandlers, keymap);
wm_window_title(wm, win);
}
@@ -597,7 +607,13 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
GHOST_ScreenToClient(win->ghostwin, wx, wy, &cx, &cy);
win->eventstate->x= cx;
+
+#if defined(__APPLE__) && defined(GHOST_COCOA)
+ //Cocoa already uses coordinates with y=0 at bottom
+ win->eventstate->y= cy;
+#else
win->eventstate->y= (win->sizey-1) - cy;
+#endif
wm_window_make_drawable(C, win);
break;
@@ -623,6 +639,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
if(state!=GHOST_kWindowStateMinimized) {
GHOST_RectangleHandle client_rect;
int l, t, r, b, scr_w, scr_h;
+ int sizex, sizey, posx, posy;
client_rect= GHOST_GetClientBounds(win->ghostwin);
GHOST_GetRectangle(client_rect, &l, &t, &r, &b);
@@ -630,37 +647,56 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
GHOST_DisposeRectangle(client_rect);
wm_get_screensize(&scr_w, &scr_h);
- win->sizex= r-l;
- win->sizey= b-t;
- win->posx= l;
- win->posy= scr_h - t - win->sizey;
-
- /* debug prints */
- if(0) {
- state = GHOST_GetWindowState(win->ghostwin);
-
- if(state==GHOST_kWindowStateNormal) {
- if(G.f & G_DEBUG) printf("window state: normal\n");
- }
- else if(state==GHOST_kWindowStateMinimized) {
- if(G.f & G_DEBUG) printf("window state: minimized\n");
- }
- else if(state==GHOST_kWindowStateMaximized) {
- if(G.f & G_DEBUG) printf("window state: maximized\n");
+ sizex= r-l;
+ sizey= b-t;
+ posx= l;
+ posy= scr_h - t - win->sizey;
+
+ /*
+ * Ghost sometimes send size or move events when the window hasn't changed.
+ * One case of this is using compiz on linux. To alleviate the problem
+ * we ignore all such event here.
+ *
+ * It might be good to eventually do that at Ghost level, but that is for
+ * another time.
+ */
+ if (win->sizex != sizex ||
+ win->sizey != sizey ||
+ win->posx != posx ||
+ win->posy != posy)
+ {
+ win->sizex= sizex;
+ win->sizey= sizey;
+ win->posx= posx;
+ win->posy= posy;
+
+ /* debug prints */
+ if(0) {
+ state = GHOST_GetWindowState(win->ghostwin);
+
+ if(state==GHOST_kWindowStateNormal) {
+ if(G.f & G_DEBUG) printf("window state: normal\n");
+ }
+ else if(state==GHOST_kWindowStateMinimized) {
+ if(G.f & G_DEBUG) printf("window state: minimized\n");
+ }
+ else if(state==GHOST_kWindowStateMaximized) {
+ if(G.f & G_DEBUG) printf("window state: maximized\n");
+ }
+ else if(state==GHOST_kWindowStateFullScreen) {
+ if(G.f & G_DEBUG) printf("window state: fullscreen\n");
+ }
+
+ if(type!=GHOST_kEventWindowSize) {
+ if(G.f & G_DEBUG) printf("win move event pos %d %d size %d %d\n", win->posx, win->posy, win->sizex, win->sizey);
+ }
+
}
- else if(state==GHOST_kWindowStateFullScreen) {
- if(G.f & G_DEBUG) printf("window state: fullscreen\n");
- }
-
- if(type!=GHOST_kEventWindowSize) {
- if(G.f & G_DEBUG) printf("win move event pos %d %d size %d %d\n", win->posx, win->posy, win->sizex, win->sizey);
- }
-
+
+ wm_window_make_drawable(C, win);
+ wm_draw_window_clear(win);
+ WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
}
-
- wm_window_make_drawable(C, win);
- wm_draw_window_clear(win);
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
}
break;
}
diff --git a/source/blender/windowmanager/wm.h b/source/blender/windowmanager/wm.h
index a7529157072..832558b961f 100644
--- a/source/blender/windowmanager/wm.h
+++ b/source/blender/windowmanager/wm.h
@@ -54,7 +54,7 @@ extern void wm_report_free(wmReport *report);
/* wm_operator.c, for init/exit */
void wm_operatortype_free(void);
void wm_operatortype_init(void);
-void wm_window_keymap(wmWindowManager *wm);
+void wm_window_keymap(wmKeyConfig *keyconf);
void wm_tweakevent_test(bContext *C, wmEvent *event, int action);
diff --git a/source/blender/windowmanager/wm_event_system.h b/source/blender/windowmanager/wm_event_system.h
index 9a3bba9af1d..4322f70ea61 100644
--- a/source/blender/windowmanager/wm_event_system.h
+++ b/source/blender/windowmanager/wm_event_system.h
@@ -43,8 +43,7 @@ typedef struct wmEventHandler {
int type, flag; /* type default=0, rest is custom */
/* keymap handler */
- ListBase *keymap; /* pointer to builtin/custom keymaps */
-
+ wmKeyMap *keymap; /* pointer to builtin/custom keymaps */
rcti *bblocal, *bbwin; /* optional local and windowspace bb */
/* modal operator handler */
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h
index 3da621bda85..b33c4bd14e8 100644
--- a/source/blender/windowmanager/wm_event_types.h
+++ b/source/blender/windowmanager/wm_event_types.h
@@ -40,7 +40,7 @@
#define EVT_DATA_GESTURE 2
#define EVT_DATA_TIMER 3
-/* tablet active */
+/* tablet active, matches GHOST_TTabletMode */
#define EVT_TABLET_NONE 0
#define EVT_TABLET_STYLUS 1
#define EVT_TABLET_ERASER 2
@@ -56,6 +56,9 @@
/* only use if you want user option switch possible */
#define ACTIONMOUSE 0x005
#define SELECTMOUSE 0x006
+/* Extra mouse buttons */
+#define BUTTON4MOUSE 0x007
+#define BUTTON5MOUSE 0x008
/* defaults from ghost */
#define WHEELUPMOUSE 0x00a
#define WHEELDOWNMOUSE 0x00b
@@ -191,11 +194,22 @@
/* for event checks */
/* only used for KM_TEXTINPUT, so assume that we want all user-inputtable ascii codes included */
-#define ISKEYBOARD(event) (event >=' ' && event <=255)
+#define ISTEXTINPUT(event) (event >=' ' && event <=255)
-/* test whether event type is acceptable as hotkey, excluding modifiers */
-#define ISHOTKEY(event) (event >=' ' && event <=320 && !(event>=LEFTCTRLKEY && event<=ESCKEY) && !(event>=UNKNOWNKEY && event<=GRLESSKEY))
+ /* test wether the event is a key on the keyboard */
+#define ISKEYBOARD(event) (event >=' ' && event <=320)
+
+ /* test wether the event is a mouse button */
+#define ISMOUSE(event) (event >= LEFTMOUSE && event <= WHEELOUTMOUSE)
+
+ /* test wether the event is timer event */
+#define ISTIMER(event) (event >= TIMER && event <= TIMERJOBS)
+ /* test wether the event is tweak event */
+#define ISTWEAK(event) (event >= EVT_TWEAK_L && event <= EVT_GESTURE)
+
+/* test whether event type is acceptable as hotkey, excluding modifiers */
+#define ISHOTKEY(event) ((ISKEYBOARD(event) || ISMOUSE(event)) && !(event>=LEFTCTRLKEY && event<=ESCKEY) && !(event>=UNKNOWNKEY && event<=GRLESSKEY))
/* **************** BLENDER GESTURE EVENTS ********************* */
diff --git a/source/blender/windowmanager/wm_subwindow.h b/source/blender/windowmanager/wm_subwindow.h
index c0c492018ff..78d73b596b2 100644
--- a/source/blender/windowmanager/wm_subwindow.h
+++ b/source/blender/windowmanager/wm_subwindow.h
@@ -45,6 +45,7 @@ void wm_subwindow_getsize(wmWindow *win, int swinid, int *x, int *y);
void wm_subwindow_getorigin(wmWindow *win, int swinid, int *x, int *y);
void wm_subwindow_getmatrix(wmWindow *win, int swinid, float mat[][4]);
+unsigned int index_to_framebuffer(int index);
#endif /* WM_SUBWINDOW_H */
diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h
index f159f7f098d..44c31e7cb69 100644
--- a/source/blender/windowmanager/wm_window.h
+++ b/source/blender/windowmanager/wm_window.h
@@ -62,6 +62,5 @@ void wm_window_testbreak (void);
int wm_window_duplicate_op (bContext *C, wmOperator *op);
int wm_window_fullscreen_toggle_op(bContext *C, wmOperator *op);
-
#endif /* WM_WINDOW_H */